uikit 3.13.9 → 3.13.11-dev.7c5279396
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 +35 -1
- package/build/build.js +4 -1
- package/dist/css/uikit-core-rtl.css +41 -6
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +41 -6
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +41 -4
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +41 -4
- 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 +7 -3
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +7 -3
- package/dist/js/components/lightbox.min.js +1 -1
- package/dist/js/components/notification.js +1 -1
- package/dist/js/components/notification.min.js +1 -1
- package/dist/js/components/parallax.js +18 -11
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +18 -11
- 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 +18 -11
- 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 +2 -2
- package/dist/js/components/sortable.min.js +1 -1
- package/dist/js/components/tooltip.js +62 -30
- 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 +354 -266
- package/dist/js/uikit-core.min.js +1 -1
- package/dist/js/uikit-icons.js +1 -1
- package/dist/js/uikit-icons.min.js +1 -1
- package/dist/js/uikit.js +397 -272
- package/dist/js/uikit.min.js +1 -1
- package/package.json +1 -1
- package/src/js/components/sortable.js +2 -3
- package/src/js/components/tooltip.js +38 -3
- package/src/js/core/drop.js +20 -16
- package/src/js/core/navbar.js +18 -6
- package/src/js/core/scrollspy-nav.js +4 -9
- package/src/js/core/sticky.js +50 -18
- package/src/js/core/toggle.js +8 -8
- package/src/js/mixin/media.js +12 -9
- package/src/js/mixin/modal.js +6 -2
- package/src/js/mixin/parallax.js +5 -1
- package/src/js/mixin/position.js +24 -24
- package/src/js/uikit-core.js +0 -4
- package/src/js/util/lang.js +0 -4
- package/src/js/util/position.js +180 -125
- package/src/js/util/viewport.js +42 -22
- package/src/less/components/drop.less +0 -1
- package/src/less/components/dropdown.less +11 -1
- package/src/less/components/icon.less +3 -0
- package/src/less/components/nav.less +22 -0
- package/src/less/components/navbar.less +26 -2
- package/src/less/components/search.less +2 -0
- package/src/less/theme/dropdown.less +4 -0
- package/src/less/theme/nav.less +6 -0
- package/src/less/theme/navbar.less +4 -0
- package/src/less/theme/search.less +6 -0
- package/src/scss/components/drop.scss +0 -1
- package/src/scss/components/dropdown.scss +11 -1
- package/src/scss/components/icon.scss +3 -0
- package/src/scss/components/nav.scss +22 -0
- package/src/scss/components/navbar.scss +26 -2
- package/src/scss/components/search.scss +2 -0
- package/src/scss/mixins-theme.scss +5 -0
- package/src/scss/mixins.scss +5 -0
- package/src/scss/theme/dropdown.scss +4 -0
- package/src/scss/theme/nav.scss +6 -0
- package/src/scss/theme/navbar.scss +4 -0
- package/src/scss/theme/search.scss +6 -0
- package/src/scss/variables-theme.scss +5 -1
- package/src/scss/variables.scss +5 -1
- package/tests/animation.html +216 -214
- package/tests/dropdown.html +16 -2
- package/tests/nav.html +27 -0
- package/tests/navbar.html +55 -4
- package/tests/parallax.html +2 -2
- package/tests/position.html +38 -39
- package/tests/sticky-parallax.html +24 -8
- package/tests/sticky.html +222 -44
- package/src/js/core/core.js +0 -25
package/dist/js/uikit.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.13.
|
|
1
|
+
/*! UIkit 3.13.11-dev.7c5279396 | 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() :
|
|
@@ -141,10 +141,6 @@
|
|
|
141
141
|
return (document == null ? void 0 : document.defaultView) || window;
|
|
142
142
|
}
|
|
143
143
|
|
|
144
|
-
function toMs(time) {
|
|
145
|
-
return time ? endsWith(time, 'ms') ? toFloat(time) : toFloat(time) * 1000 : 0;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
144
|
function isEqual(value, other) {
|
|
149
145
|
return (
|
|
150
146
|
value === other ||
|
|
@@ -1788,7 +1784,7 @@
|
|
|
1788
1784
|
return intersectRect(
|
|
1789
1785
|
...scrollParents(element).
|
|
1790
1786
|
map((parent) => {
|
|
1791
|
-
const { top, left, bottom, right } =
|
|
1787
|
+
const { top, left, bottom, right } = offsetViewport(parent);
|
|
1792
1788
|
|
|
1793
1789
|
return {
|
|
1794
1790
|
top: top - offsetTop,
|
|
@@ -1803,7 +1799,7 @@
|
|
|
1803
1799
|
|
|
1804
1800
|
function scrollTop(element, top) {
|
|
1805
1801
|
if (isWindow(element) || isDocument(element)) {
|
|
1806
|
-
element =
|
|
1802
|
+
element = scrollingElement(element);
|
|
1807
1803
|
} else {
|
|
1808
1804
|
element = toNode(element);
|
|
1809
1805
|
}
|
|
@@ -1820,12 +1816,13 @@
|
|
|
1820
1816
|
return parents.reduce(
|
|
1821
1817
|
(fn, scrollElement, i) => {
|
|
1822
1818
|
const { scrollTop, scrollHeight, offsetHeight } = scrollElement;
|
|
1823
|
-
const
|
|
1824
|
-
const
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1819
|
+
const viewport = offsetViewport(scrollElement);
|
|
1820
|
+
const maxScroll = scrollHeight - viewport.height;
|
|
1821
|
+
const { height: elHeight, top: elTop } = parents[i - 1] ?
|
|
1822
|
+
offsetViewport(parents[i - 1]) :
|
|
1823
|
+
offset(element);
|
|
1828
1824
|
|
|
1825
|
+
let top = Math.ceil(elTop - viewport.top - offsetBy + scrollTop);
|
|
1829
1826
|
|
|
1830
1827
|
if (offsetBy > 0 && offsetHeight < elHeight + offsetBy) {
|
|
1831
1828
|
top += offsetBy;
|
|
@@ -1883,7 +1880,7 @@
|
|
|
1883
1880
|
|
|
1884
1881
|
const [scrollElement] = scrollParents(element, /auto|scroll/, true);
|
|
1885
1882
|
const { scrollHeight, scrollTop } = scrollElement;
|
|
1886
|
-
const viewportHeight =
|
|
1883
|
+
const { height: viewportHeight } = offsetViewport(scrollElement);
|
|
1887
1884
|
const maxScroll = scrollHeight - viewportHeight;
|
|
1888
1885
|
const elementOffsetTop = offsetPosition(element)[0] - offsetPosition(scrollElement)[0];
|
|
1889
1886
|
|
|
@@ -1894,7 +1891,7 @@
|
|
|
1894
1891
|
}
|
|
1895
1892
|
|
|
1896
1893
|
function scrollParents(element, overflowRe, scrollable) {if (overflowRe === void 0) {overflowRe = /auto|scroll|hidden/;}if (scrollable === void 0) {scrollable = false;}
|
|
1897
|
-
const scrollEl =
|
|
1894
|
+
const scrollEl = scrollingElement(element);
|
|
1898
1895
|
|
|
1899
1896
|
let ancestors = parents(element).reverse();
|
|
1900
1897
|
ancestors = ancestors.slice(ancestors.indexOf(scrollEl) + 1);
|
|
@@ -1909,181 +1906,253 @@
|
|
|
1909
1906
|
ancestors.filter(
|
|
1910
1907
|
(parent) =>
|
|
1911
1908
|
overflowRe.test(css(parent, 'overflow')) && (
|
|
1912
|
-
!scrollable || parent.scrollHeight >
|
|
1909
|
+
!scrollable || parent.scrollHeight > offsetViewport(parent).height))).
|
|
1913
1910
|
|
|
1914
1911
|
|
|
1915
1912
|
reverse();
|
|
1916
1913
|
}
|
|
1917
1914
|
|
|
1918
|
-
function
|
|
1919
|
-
|
|
1915
|
+
function offsetViewport(scrollElement) {
|
|
1916
|
+
let viewportElement = getViewport$1(scrollElement);
|
|
1917
|
+
|
|
1918
|
+
// iOS 12 returns <body> as scrollingElement
|
|
1919
|
+
if (viewportElement === scrollingElement(viewportElement)) {
|
|
1920
|
+
viewportElement = document.documentElement;
|
|
1921
|
+
}
|
|
1922
|
+
|
|
1923
|
+
let rect = offset(viewportElement);
|
|
1924
|
+
for (let [prop, dir, start, end] of [
|
|
1925
|
+
['width', 'x', 'left', 'right'],
|
|
1926
|
+
['height', 'y', 'top', 'bottom']])
|
|
1927
|
+
{
|
|
1928
|
+
if (!isWindow(getViewport$1(viewportElement))) {
|
|
1929
|
+
rect[start] += toFloat(css(viewportElement, "border" + ucfirst(start) + "Width"));
|
|
1930
|
+
}
|
|
1931
|
+
rect[prop] = rect[dir] = (
|
|
1932
|
+
isWindow(viewportElement) ? scrollingElement(viewportElement) : viewportElement)["client" +
|
|
1933
|
+
ucfirst(prop)];
|
|
1934
|
+
rect[end] = rect[prop] + rect[start];
|
|
1935
|
+
}
|
|
1936
|
+
return rect;
|
|
1920
1937
|
}
|
|
1921
1938
|
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
scrollElement).
|
|
1928
|
-
clientHeight;
|
|
1939
|
+
function scrollingElement(element) {
|
|
1940
|
+
const {
|
|
1941
|
+
document: { scrollingElement } } =
|
|
1942
|
+
toWindow(element);
|
|
1943
|
+
return scrollingElement;
|
|
1929
1944
|
}
|
|
1930
1945
|
|
|
1931
|
-
function
|
|
1932
|
-
|
|
1933
|
-
return document.scrollingElement || document.documentElement;
|
|
1946
|
+
function getViewport$1(scrollElement) {
|
|
1947
|
+
return scrollElement === scrollingElement(scrollElement) ? window : scrollElement;
|
|
1934
1948
|
}
|
|
1935
1949
|
|
|
1936
|
-
const dirs =
|
|
1937
|
-
|
|
1938
|
-
|
|
1950
|
+
const dirs = [
|
|
1951
|
+
['width', 'x', 'left', 'right'],
|
|
1952
|
+
['height', 'y', 'top', 'bottom']];
|
|
1953
|
+
|
|
1954
|
+
|
|
1955
|
+
function positionAt(element, target, options) {
|
|
1956
|
+
options = {
|
|
1957
|
+
attach: {
|
|
1958
|
+
element: ['left', 'top'],
|
|
1959
|
+
target: ['left', 'top'],
|
|
1960
|
+
...options.attach },
|
|
1961
|
+
|
|
1962
|
+
offset: [0, 0],
|
|
1963
|
+
...options };
|
|
1964
|
+
|
|
1965
|
+
|
|
1966
|
+
const dim = options.flip ?
|
|
1967
|
+
attachToWithFlip(element, target, options) :
|
|
1968
|
+
attachTo(element, target, options);
|
|
1969
|
+
|
|
1970
|
+
offset(element, dim);
|
|
1971
|
+
}
|
|
1939
1972
|
|
|
1973
|
+
function attachTo(element, target, options) {
|
|
1974
|
+
let { attach, offset: offsetBy } = {
|
|
1975
|
+
attach: {
|
|
1976
|
+
element: ['left', 'top'],
|
|
1977
|
+
target: ['left', 'top'],
|
|
1978
|
+
...options.attach },
|
|
1940
1979
|
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
target,
|
|
1944
|
-
elAttach,
|
|
1945
|
-
targetAttach,
|
|
1946
|
-
elOffset,
|
|
1947
|
-
targetOffset,
|
|
1948
|
-
flip,
|
|
1949
|
-
boundary)
|
|
1950
|
-
{
|
|
1951
|
-
elAttach = getPos(elAttach);
|
|
1952
|
-
targetAttach = getPos(targetAttach);
|
|
1980
|
+
offset: [0, 0],
|
|
1981
|
+
...options };
|
|
1953
1982
|
|
|
1954
|
-
const flipped = { element: elAttach, target: targetAttach };
|
|
1955
1983
|
|
|
1956
|
-
|
|
1957
|
-
|
|
1984
|
+
const position = offset(element);
|
|
1985
|
+
const targetOffset = offset(target);
|
|
1986
|
+
for (const i in dirs) {
|
|
1987
|
+
const [prop, dir, start, end] = dirs[i];
|
|
1988
|
+
position[start] = position[dir] =
|
|
1989
|
+
targetOffset[start] +
|
|
1990
|
+
moveBy(attach.target[i], end, targetOffset[prop]) -
|
|
1991
|
+
moveBy(attach.element[i], end, position[prop]) +
|
|
1992
|
+
+offsetBy[i];
|
|
1993
|
+
position[end] = position[start] + position[prop];
|
|
1958
1994
|
}
|
|
1995
|
+
return position;
|
|
1996
|
+
}
|
|
1959
1997
|
|
|
1960
|
-
|
|
1998
|
+
function attachToWithFlip(element, target, options) {
|
|
1999
|
+
const position = attachTo(element, target, options);
|
|
1961
2000
|
const targetDim = offset(target);
|
|
1962
|
-
const
|
|
2001
|
+
const viewports = scrollParents(element, /auto|scroll/);
|
|
2002
|
+
const [scrollElement] = viewports;
|
|
1963
2003
|
|
|
1964
|
-
|
|
1965
|
-
|
|
2004
|
+
let {
|
|
2005
|
+
flip,
|
|
2006
|
+
attach: { element: elAttach, target: targetAttach },
|
|
2007
|
+
offset: elOffset,
|
|
2008
|
+
boundary,
|
|
2009
|
+
viewport,
|
|
2010
|
+
viewportPadding } =
|
|
2011
|
+
options;
|
|
1966
2012
|
|
|
1967
|
-
|
|
1968
|
-
targetOffset = getOffsets(targetOffset, targetDim.width, targetDim.height);
|
|
2013
|
+
viewports.push(viewport);
|
|
1969
2014
|
|
|
1970
|
-
|
|
1971
|
-
|
|
2015
|
+
const offsetPosition = { ...position };
|
|
2016
|
+
for (const i in dirs) {
|
|
2017
|
+
const [prop, dir, start, end] = dirs[i];
|
|
2018
|
+
|
|
2019
|
+
if (flip !== true && !includes(flip, dir)) {
|
|
2020
|
+
continue;
|
|
2021
|
+
}
|
|
1972
2022
|
|
|
1973
|
-
|
|
1974
|
-
|
|
2023
|
+
const willFlip =
|
|
2024
|
+
!intersectLine(position, targetDim, i) && intersectLine(position, targetDim, 1 - i);
|
|
1975
2025
|
|
|
1976
|
-
|
|
1977
|
-
let boundaries = scrollParents(element).map(getViewport$1);
|
|
2026
|
+
viewport = getIntersectionArea(...viewports.filter(Boolean).map(offsetViewport));
|
|
1978
2027
|
|
|
1979
|
-
if (
|
|
1980
|
-
|
|
2028
|
+
if (viewportPadding) {
|
|
2029
|
+
viewport[start] += viewportPadding;
|
|
2030
|
+
viewport[end] -= viewportPadding;
|
|
1981
2031
|
}
|
|
1982
2032
|
|
|
1983
|
-
|
|
2033
|
+
if (boundary && !(willFlip || position[prop] > offset(boundary)[prop])) {
|
|
2034
|
+
viewport = getIntersectionArea(viewport, offset(boundary));
|
|
2035
|
+
}
|
|
1984
2036
|
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
return;
|
|
1988
|
-
}
|
|
2037
|
+
const isInStartBoundary = position[start] >= viewport[start];
|
|
2038
|
+
const isInEndBoundary = position[end] <= viewport[end];
|
|
1989
2039
|
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
-dim[prop] :
|
|
1994
|
-
elAttach[dir] === alignFlip ?
|
|
1995
|
-
dim[prop] :
|
|
1996
|
-
0;
|
|
2040
|
+
if (isInStartBoundary && isInEndBoundary) {
|
|
2041
|
+
continue;
|
|
2042
|
+
}
|
|
1997
2043
|
|
|
1998
|
-
|
|
1999
|
-
targetAttach[dir] === align ?
|
|
2000
|
-
targetDim[prop] :
|
|
2001
|
-
targetAttach[dir] === alignFlip ?
|
|
2002
|
-
-targetDim[prop] :
|
|
2003
|
-
0;
|
|
2044
|
+
let offsetBy;
|
|
2004
2045
|
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2046
|
+
// Flip
|
|
2047
|
+
if (willFlip) {
|
|
2048
|
+
if (
|
|
2049
|
+
elAttach[i] === end && isInStartBoundary ||
|
|
2050
|
+
elAttach[i] === start && isInEndBoundary)
|
|
2051
|
+
{
|
|
2052
|
+
continue;
|
|
2053
|
+
}
|
|
2054
|
+
|
|
2055
|
+
offsetBy =
|
|
2056
|
+
(elAttach[i] === start ?
|
|
2057
|
+
-position[prop] :
|
|
2058
|
+
elAttach[i] === end ?
|
|
2059
|
+
position[prop] :
|
|
2060
|
+
0) + (
|
|
2061
|
+
targetAttach[i] === start ?
|
|
2062
|
+
targetDim[prop] :
|
|
2063
|
+
targetAttach[i] === end ?
|
|
2064
|
+
-targetDim[prop] :
|
|
2065
|
+
0) -
|
|
2066
|
+
elOffset[i] * 2;
|
|
2012
2067
|
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2068
|
+
if (
|
|
2069
|
+
!isInScrollArea(
|
|
2070
|
+
{
|
|
2071
|
+
...position,
|
|
2072
|
+
[start]: position[start] + offsetBy,
|
|
2073
|
+
[end]: position[end] + offsetBy },
|
|
2018
2074
|
|
|
2075
|
+
scrollElement,
|
|
2076
|
+
i))
|
|
2077
|
+
|
|
2078
|
+
{
|
|
2079
|
+
if (isInScrollArea(position, scrollElement, i)) {
|
|
2080
|
+
continue;
|
|
2019
2081
|
}
|
|
2020
2082
|
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2083
|
+
if (options.recursion) {
|
|
2084
|
+
return false;
|
|
2085
|
+
}
|
|
2024
2086
|
|
|
2087
|
+
const newPos = attachToWithFlip(element, target, {
|
|
2088
|
+
...options,
|
|
2089
|
+
attach: {
|
|
2090
|
+
element: elAttach.map(flipDir).reverse(),
|
|
2091
|
+
target: targetAttach.map(flipDir).reverse() },
|
|
2025
2092
|
|
|
2026
|
-
|
|
2027
|
-
|
|
2093
|
+
offset: elOffset.reverse(),
|
|
2094
|
+
flip: flip === true ? flip : [...flip, dirs[1 - i][1]],
|
|
2095
|
+
recursion: true });
|
|
2028
2096
|
|
|
2029
|
-
for (const el of ['element', 'target']) {
|
|
2030
|
-
if (elemOffset) {
|
|
2031
|
-
flipped[el][dir] =
|
|
2032
|
-
flipped[el][dir] === dirs[prop][1] ?
|
|
2033
|
-
dirs[prop][2] :
|
|
2034
|
-
dirs[prop][1];
|
|
2035
|
-
}
|
|
2036
|
-
}
|
|
2037
2097
|
|
|
2038
|
-
|
|
2039
|
-
|
|
2098
|
+
if (newPos && isInScrollArea(newPos, scrollElement, 1 - i)) {
|
|
2099
|
+
return newPos;
|
|
2040
2100
|
}
|
|
2041
|
-
}
|
|
2042
|
-
|
|
2101
|
+
}
|
|
2102
|
+
|
|
2103
|
+
// Move
|
|
2104
|
+
} else {
|
|
2105
|
+
offsetBy =
|
|
2106
|
+
clamp(
|
|
2107
|
+
clamp(position[start], viewport[start], viewport[end] - position[prop]),
|
|
2108
|
+
targetDim[start] - position[prop] + elOffset[i],
|
|
2109
|
+
targetDim[end] - elOffset[i]) -
|
|
2110
|
+
position[start];
|
|
2111
|
+
}
|
|
2112
|
+
|
|
2113
|
+
offsetPosition[start] = position[dir] = position[start] + offsetBy;
|
|
2114
|
+
offsetPosition[end] += offsetBy;
|
|
2043
2115
|
}
|
|
2044
2116
|
|
|
2045
|
-
|
|
2117
|
+
return offsetPosition;
|
|
2118
|
+
}
|
|
2046
2119
|
|
|
2047
|
-
|
|
2120
|
+
function moveBy(start, end, dim) {
|
|
2121
|
+
return start === 'center' ? dim / 2 : start === end ? dim : 0;
|
|
2048
2122
|
}
|
|
2049
2123
|
|
|
2050
|
-
function
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2124
|
+
function getIntersectionArea() {
|
|
2125
|
+
let area = {};for (var _len = arguments.length, rects = new Array(_len), _key = 0; _key < _len; _key++) {rects[_key] = arguments[_key];}
|
|
2126
|
+
for (const rect of rects) {
|
|
2127
|
+
for (const [,, start, end] of dirs) {
|
|
2128
|
+
area[start] = Math.max(area[start] || 0, rect[start]);
|
|
2129
|
+
area[end] = Math.min(...[area[end], rect[end]].filter(Boolean));
|
|
2056
2130
|
}
|
|
2057
|
-
}
|
|
2131
|
+
}
|
|
2132
|
+
return area;
|
|
2058
2133
|
}
|
|
2059
2134
|
|
|
2060
|
-
function
|
|
2061
|
-
const
|
|
2062
|
-
const
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
if (pos.length === 1) {
|
|
2067
|
-
pos = x.test(pos[0]) ?
|
|
2068
|
-
pos.concat('center') :
|
|
2069
|
-
y.test(pos[0]) ?
|
|
2070
|
-
['center'].concat(pos) :
|
|
2071
|
-
['center', 'center'];
|
|
2072
|
-
}
|
|
2073
|
-
|
|
2074
|
-
return {
|
|
2075
|
-
x: x.test(pos[0]) ? pos[0] : 'center',
|
|
2076
|
-
y: y.test(pos[1]) ? pos[1] : 'center' };
|
|
2135
|
+
function isInScrollArea(position, scrollElement, dir) {
|
|
2136
|
+
const viewport = offsetViewport(scrollElement);
|
|
2137
|
+
const [prop,, start, end] = dirs[dir];
|
|
2138
|
+
viewport[start] -= scrollElement["scroll" + ucfirst(start)];
|
|
2139
|
+
viewport[end] = viewport[start] + scrollElement["scroll" + ucfirst(prop)];
|
|
2077
2140
|
|
|
2141
|
+
return position[start] >= viewport[start] && position[end] <= viewport[end];
|
|
2078
2142
|
}
|
|
2079
2143
|
|
|
2080
|
-
function
|
|
2081
|
-
const [
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
x: x ? toFloat(x) * (endsWith(x, '%') ? width / 100 : 1) : 0,
|
|
2085
|
-
y: y ? toFloat(y) * (endsWith(y, '%') ? height / 100 : 1) : 0 };
|
|
2144
|
+
function intersectLine(dimA, dimB, dir) {
|
|
2145
|
+
const [,, start, end] = dirs[dir];
|
|
2146
|
+
return dimA[end] > dimB[start] && dimB[end] > dimA[start];
|
|
2147
|
+
}
|
|
2086
2148
|
|
|
2149
|
+
function flipDir(prop) {
|
|
2150
|
+
for (const i in dirs) {
|
|
2151
|
+
const index = dirs[i].indexOf(prop);
|
|
2152
|
+
if (~index) {
|
|
2153
|
+
return dirs[1 - i][index % 2 + 2];
|
|
2154
|
+
}
|
|
2155
|
+
}
|
|
2087
2156
|
}
|
|
2088
2157
|
|
|
2089
2158
|
var util = /*#__PURE__*/Object.freeze({
|
|
@@ -2192,7 +2261,6 @@
|
|
|
2192
2261
|
toNode: toNode,
|
|
2193
2262
|
toNodes: toNodes,
|
|
2194
2263
|
toWindow: toWindow,
|
|
2195
|
-
toMs: toMs,
|
|
2196
2264
|
isEqual: isEqual,
|
|
2197
2265
|
swap: swap,
|
|
2198
2266
|
last: last,
|
|
@@ -2231,9 +2299,7 @@
|
|
|
2231
2299
|
scrollIntoView: scrollIntoView,
|
|
2232
2300
|
scrolledOver: scrolledOver,
|
|
2233
2301
|
scrollParents: scrollParents,
|
|
2234
|
-
|
|
2235
|
-
getViewportClientHeight: getViewportClientHeight,
|
|
2236
|
-
getScrollingElement: getScrollingElement
|
|
2302
|
+
offsetViewport: offsetViewport
|
|
2237
2303
|
});
|
|
2238
2304
|
|
|
2239
2305
|
function globalAPI (UIkit) {
|
|
@@ -2550,7 +2616,7 @@
|
|
|
2550
2616
|
continue;
|
|
2551
2617
|
}
|
|
2552
2618
|
|
|
2553
|
-
value = props[key] === Boolean && value === '' ? true : coerce(props[key], value);
|
|
2619
|
+
value = props[key] === Boolean && value === '' ? true : coerce$1(props[key], value);
|
|
2554
2620
|
|
|
2555
2621
|
if (prop === 'target' && (!value || startsWith(value, '_'))) {
|
|
2556
2622
|
continue;
|
|
@@ -2564,7 +2630,7 @@
|
|
|
2564
2630
|
for (const key in options) {
|
|
2565
2631
|
const prop = camelize(key);
|
|
2566
2632
|
if (props[prop] !== undefined) {
|
|
2567
|
-
data$1[prop] = coerce(props[prop], options[key]);
|
|
2633
|
+
data$1[prop] = coerce$1(props[prop], options[key]);
|
|
2568
2634
|
}
|
|
2569
2635
|
}
|
|
2570
2636
|
|
|
@@ -2629,7 +2695,7 @@
|
|
|
2629
2695
|
return options.every((arr) => !arr || !hasOwn(arr, key));
|
|
2630
2696
|
}
|
|
2631
2697
|
|
|
2632
|
-
function coerce(type, value) {
|
|
2698
|
+
function coerce$1(type, value) {
|
|
2633
2699
|
if (type === Boolean) {
|
|
2634
2700
|
return toBoolean(value);
|
|
2635
2701
|
} else if (type === Number) {
|
|
@@ -2667,7 +2733,7 @@
|
|
|
2667
2733
|
if (isUndefined(data[key])) {
|
|
2668
2734
|
delete data[key];
|
|
2669
2735
|
} else if (props[key]) {
|
|
2670
|
-
data[key] = coerce(props[key], data[key]);
|
|
2736
|
+
data[key] = coerce$1(props[key], data[key]);
|
|
2671
2737
|
}
|
|
2672
2738
|
}
|
|
2673
2739
|
|
|
@@ -2892,7 +2958,7 @@
|
|
|
2892
2958
|
UIkit.data = '__uikit__';
|
|
2893
2959
|
UIkit.prefix = 'uk-';
|
|
2894
2960
|
UIkit.options = {};
|
|
2895
|
-
UIkit.version = '3.13.
|
|
2961
|
+
UIkit.version = '3.13.11-dev.7c5279396';
|
|
2896
2962
|
|
|
2897
2963
|
globalAPI(UIkit);
|
|
2898
2964
|
hooksAPI(UIkit);
|
|
@@ -2900,30 +2966,6 @@
|
|
|
2900
2966
|
componentAPI(UIkit);
|
|
2901
2967
|
instanceAPI(UIkit);
|
|
2902
2968
|
|
|
2903
|
-
function Core () {
|
|
2904
|
-
if (!inBrowser) {
|
|
2905
|
-
return;
|
|
2906
|
-
}
|
|
2907
|
-
|
|
2908
|
-
let started = 0;
|
|
2909
|
-
on(
|
|
2910
|
-
document,
|
|
2911
|
-
'animationstart',
|
|
2912
|
-
(_ref) => {let { target } = _ref;
|
|
2913
|
-
if ((css(target, 'animationName') || '').match(/^uk-.*(left|right)/)) {
|
|
2914
|
-
started++;
|
|
2915
|
-
css(document.documentElement, 'overflowX', 'hidden');
|
|
2916
|
-
setTimeout(() => {
|
|
2917
|
-
if (! --started) {
|
|
2918
|
-
css(document.documentElement, 'overflowX', '');
|
|
2919
|
-
}
|
|
2920
|
-
}, toMs(css(target, 'animationDuration')) + 100);
|
|
2921
|
-
}
|
|
2922
|
-
},
|
|
2923
|
-
true);
|
|
2924
|
-
|
|
2925
|
-
}
|
|
2926
|
-
|
|
2927
2969
|
function boot (UIkit) {
|
|
2928
2970
|
const { connect, disconnect } = UIkit;
|
|
2929
2971
|
|
|
@@ -3501,50 +3543,49 @@
|
|
|
3501
3543
|
data: {
|
|
3502
3544
|
pos: "bottom-" + (isRtl ? 'right' : 'left'),
|
|
3503
3545
|
flip: true,
|
|
3504
|
-
offset: false
|
|
3546
|
+
offset: false,
|
|
3547
|
+
viewportPadding: 10 },
|
|
3505
3548
|
|
|
3506
3549
|
|
|
3507
3550
|
connected() {
|
|
3508
3551
|
this.pos = this.$props.pos.split('-').concat('center').slice(0, 2);
|
|
3509
|
-
this.
|
|
3510
|
-
this.align = this.pos[1];
|
|
3552
|
+
this.axis = includes(['top', 'bottom'], this.pos[0]) ? 'y' : 'x';
|
|
3511
3553
|
},
|
|
3512
3554
|
|
|
3513
3555
|
methods: {
|
|
3514
3556
|
positionAt(element, target, boundary) {
|
|
3515
|
-
const
|
|
3516
|
-
const dir = this.pos[0];
|
|
3517
|
-
const align = this.pos[1];
|
|
3557
|
+
const [dir, align] = this.pos;
|
|
3518
3558
|
|
|
3519
3559
|
let { offset: offset$1 } = this;
|
|
3520
3560
|
if (!isNumeric(offset$1)) {
|
|
3521
3561
|
const node = $(offset$1);
|
|
3522
3562
|
offset$1 = node ?
|
|
3523
|
-
offset(node)[axis === 'x' ? 'left' : 'top'] -
|
|
3524
|
-
offset(target)[axis === 'x' ? 'right' : 'bottom'] :
|
|
3563
|
+
offset(node)[this.axis === 'x' ? 'left' : 'top'] -
|
|
3564
|
+
offset(target)[this.axis === 'x' ? 'right' : 'bottom'] :
|
|
3525
3565
|
0;
|
|
3526
3566
|
}
|
|
3527
3567
|
offset$1 = toPx(offset$1) + toPx(getCssVar('position-offset', element));
|
|
3568
|
+
offset$1 = [includes(['left', 'top'], dir) ? -offset$1 : +offset$1, 0];
|
|
3569
|
+
|
|
3570
|
+
const attach = {
|
|
3571
|
+
element: [flipPosition(dir), align],
|
|
3572
|
+
target: [dir, align] };
|
|
3573
|
+
|
|
3574
|
+
|
|
3575
|
+
if (this.axis === 'y') {
|
|
3576
|
+
for (const prop in attach) {
|
|
3577
|
+
attach[prop] = attach[prop].reverse();
|
|
3578
|
+
}
|
|
3579
|
+
offset$1 = offset$1.reverse();
|
|
3580
|
+
}
|
|
3581
|
+
|
|
3582
|
+
positionAt(element, target, {
|
|
3583
|
+
attach,
|
|
3584
|
+
offset: offset$1,
|
|
3585
|
+
boundary,
|
|
3586
|
+
viewportPadding: this.viewportPadding,
|
|
3587
|
+
flip: this.flip });
|
|
3528
3588
|
|
|
3529
|
-
const { x, y } = positionAt(
|
|
3530
|
-
element,
|
|
3531
|
-
target,
|
|
3532
|
-
axis === 'x' ? flipPosition(dir) + " " + align : align + " " + flipPosition(dir),
|
|
3533
|
-
axis === 'x' ? dir + " " + align : align + " " + dir,
|
|
3534
|
-
axis === 'x' ? "" + (
|
|
3535
|
-
dir === 'left' ? -offset$1 : offset$1) : " " + (
|
|
3536
|
-
dir === 'top' ? -offset$1 : offset$1),
|
|
3537
|
-
null,
|
|
3538
|
-
this.flip,
|
|
3539
|
-
boundary).
|
|
3540
|
-
target;
|
|
3541
|
-
|
|
3542
|
-
this.dir = axis === 'x' ? x : y;
|
|
3543
|
-
this.align = axis === 'x' ? y : x;
|
|
3544
|
-
},
|
|
3545
|
-
|
|
3546
|
-
getAxis() {
|
|
3547
|
-
return this.dir === 'top' || this.dir === 'bottom' ? 'y' : 'x';
|
|
3548
3589
|
} } };
|
|
3549
3590
|
|
|
3550
3591
|
let active$1;
|
|
@@ -3761,13 +3802,7 @@
|
|
|
3761
3802
|
this.hide(false);
|
|
3762
3803
|
}
|
|
3763
3804
|
}),
|
|
3764
|
-
on(window, 'resize', () => this.$emit())
|
|
3765
|
-
on(
|
|
3766
|
-
document,
|
|
3767
|
-
'scroll',
|
|
3768
|
-
(_ref4) => {let { target } = _ref4;return target.contains(this.$el) && this.$emit();},
|
|
3769
|
-
true)])
|
|
3770
|
-
|
|
3805
|
+
on(window, 'resize', () => this.$emit())])
|
|
3771
3806
|
{
|
|
3772
3807
|
once(this.$el, 'hide', handler, { self: true });
|
|
3773
3808
|
}
|
|
@@ -3787,7 +3822,7 @@
|
|
|
3787
3822
|
{
|
|
3788
3823
|
name: 'hide',
|
|
3789
3824
|
|
|
3790
|
-
handler(
|
|
3825
|
+
handler(_ref4) {let { target } = _ref4;
|
|
3791
3826
|
if (this.$el !== target) {
|
|
3792
3827
|
active$1 =
|
|
3793
3828
|
active$1 === null && within(target, this.$el) && this.isToggled() ?
|
|
@@ -3878,25 +3913,33 @@
|
|
|
3878
3913
|
},
|
|
3879
3914
|
|
|
3880
3915
|
position() {
|
|
3881
|
-
const boundary = query(this.boundary, this.$el) || window;
|
|
3882
3916
|
removeClass(this.$el, this.clsDrop + "-stack");
|
|
3883
3917
|
toggleClass(this.$el, this.clsDrop + "-boundary", this.boundaryAlign);
|
|
3884
3918
|
|
|
3885
|
-
const
|
|
3886
|
-
const
|
|
3887
|
-
const
|
|
3919
|
+
const boundary = query(this.boundary, this.$el);
|
|
3920
|
+
const [scrollParent] = scrollParents(this.$el);
|
|
3921
|
+
const scrollParentOffset = offsetViewport(scrollParent);
|
|
3922
|
+
const boundaryOffset = boundary ? offset(boundary) : scrollParentOffset;
|
|
3923
|
+
|
|
3924
|
+
css(this.$el, 'maxWidth', '');
|
|
3925
|
+
const maxWidth = scrollParentOffset.width - (boundary ? 0 : 2 * this.viewportPadding);
|
|
3888
3926
|
|
|
3889
3927
|
if (this.pos[1] === 'justify') {
|
|
3890
|
-
const prop = this.
|
|
3928
|
+
const prop = this.axis === 'y' ? 'width' : 'height';
|
|
3929
|
+
const targetOffset = offset(this.target);
|
|
3930
|
+
const alignTo = this.boundaryAlign ? boundaryOffset : targetOffset;
|
|
3891
3931
|
css(this.$el, prop, alignTo[prop]);
|
|
3892
|
-
} else if (
|
|
3893
|
-
this.$el.offsetWidth >
|
|
3894
|
-
Math.max(boundaryOffset.right - alignTo.left, alignTo.right - boundaryOffset.left))
|
|
3895
|
-
{
|
|
3932
|
+
} else if (this.$el.offsetWidth > maxWidth) {
|
|
3896
3933
|
addClass(this.$el, this.clsDrop + "-stack");
|
|
3897
3934
|
}
|
|
3898
3935
|
|
|
3899
|
-
|
|
3936
|
+
css(this.$el, 'maxWidth', maxWidth);
|
|
3937
|
+
|
|
3938
|
+
this.positionAt(
|
|
3939
|
+
this.$el,
|
|
3940
|
+
boundary && this.boundaryAlign ? boundary : this.target,
|
|
3941
|
+
boundary);
|
|
3942
|
+
|
|
3900
3943
|
} } };
|
|
3901
3944
|
|
|
3902
3945
|
|
|
@@ -5000,16 +5043,19 @@
|
|
|
5000
5043
|
|
|
5001
5044
|
connected() {
|
|
5002
5045
|
const media = toMedia(this.media);
|
|
5003
|
-
this.
|
|
5004
|
-
|
|
5005
|
-
this.
|
|
5006
|
-
|
|
5007
|
-
|
|
5008
|
-
|
|
5046
|
+
this.matchMedia = true;
|
|
5047
|
+
if (media) {
|
|
5048
|
+
this.mediaObj = window.matchMedia(media);
|
|
5049
|
+
const handler = () => {
|
|
5050
|
+
this.matchMedia = this.mediaObj.matches;
|
|
5051
|
+
trigger(this.$el, createEvent('mediachange', false, true, [this.mediaObj]));
|
|
5052
|
+
};
|
|
5053
|
+
this.offMediaObj = on(this.mediaObj, 'change', () => {
|
|
5054
|
+
handler();
|
|
5055
|
+
this.$emit('resize');
|
|
5056
|
+
});
|
|
5009
5057
|
handler();
|
|
5010
|
-
|
|
5011
|
-
});
|
|
5012
|
-
handler();
|
|
5058
|
+
}
|
|
5013
5059
|
},
|
|
5014
5060
|
|
|
5015
5061
|
disconnected() {var _this$offMediaObj;
|
|
@@ -5298,7 +5344,7 @@
|
|
|
5298
5344
|
return (el, show) =>
|
|
5299
5345
|
new Promise((resolve, reject) =>
|
|
5300
5346
|
once(el, 'show hide', () => {
|
|
5301
|
-
el._reject
|
|
5347
|
+
el._reject == null ? void 0 : el._reject();
|
|
5302
5348
|
el._reject = reject;
|
|
5303
5349
|
|
|
5304
5350
|
_toggle(el, show);
|
|
@@ -5323,6 +5369,10 @@
|
|
|
5323
5369
|
then(() => delete el._reject);
|
|
5324
5370
|
}
|
|
5325
5371
|
|
|
5372
|
+
function toMs(time) {
|
|
5373
|
+
return time ? endsWith(time, 'ms') ? toFloat(time) : toFloat(time) * 1000 : 0;
|
|
5374
|
+
}
|
|
5375
|
+
|
|
5326
5376
|
var modal = {
|
|
5327
5377
|
install: install$2,
|
|
5328
5378
|
|
|
@@ -5476,8 +5526,6 @@
|
|
|
5476
5526
|
toggle: '> a',
|
|
5477
5527
|
content: '> ul' } };
|
|
5478
5528
|
|
|
5479
|
-
const navItem = '.uk-navbar-nav > li > a, .uk-navbar-item, .uk-navbar-toggle';
|
|
5480
|
-
|
|
5481
5529
|
var navbar = {
|
|
5482
5530
|
mixins: [Class, Container],
|
|
5483
5531
|
|
|
@@ -5497,7 +5545,7 @@
|
|
|
5497
5545
|
|
|
5498
5546
|
|
|
5499
5547
|
data: {
|
|
5500
|
-
dropdown:
|
|
5548
|
+
dropdown: '.uk-navbar-nav > li > a, .uk-navbar-item, .uk-navbar-toggle',
|
|
5501
5549
|
align: isRtl ? 'right' : 'left',
|
|
5502
5550
|
clsDrop: 'uk-navbar-dropdown',
|
|
5503
5551
|
mode: undefined,
|
|
@@ -5583,9 +5631,23 @@
|
|
|
5583
5631
|
immediate: true },
|
|
5584
5632
|
|
|
5585
5633
|
|
|
5586
|
-
toggles
|
|
5587
|
-
|
|
5588
|
-
|
|
5634
|
+
toggles: {
|
|
5635
|
+
get(_ref6, $el) {let { dropdown } = _ref6;
|
|
5636
|
+
return $$(dropdown, $el);
|
|
5637
|
+
},
|
|
5638
|
+
|
|
5639
|
+
watch() {
|
|
5640
|
+
const justify = hasClass(this.$el, 'uk-navbar-justify');
|
|
5641
|
+
for (const container of $$(
|
|
5642
|
+
'.uk-navbar-nav, .uk-navbar-left, .uk-navbar-right',
|
|
5643
|
+
this.$el))
|
|
5644
|
+
{
|
|
5645
|
+
css(container, 'flexGrow', justify ? $$(this.dropdown, container).length : '');
|
|
5646
|
+
}
|
|
5647
|
+
},
|
|
5648
|
+
|
|
5649
|
+
immediate: true } },
|
|
5650
|
+
|
|
5589
5651
|
|
|
5590
5652
|
|
|
5591
5653
|
disconnected() {
|
|
@@ -5746,7 +5808,7 @@
|
|
|
5746
5808
|
return this.dropbar;
|
|
5747
5809
|
},
|
|
5748
5810
|
|
|
5749
|
-
handler(_, _ref10) {let { $el, dir } = _ref10;
|
|
5811
|
+
handler(_, _ref10) {let { $el, pos: [dir] = [] } = _ref10;
|
|
5750
5812
|
if (!hasClass($el, this.clsDrop)) {
|
|
5751
5813
|
return;
|
|
5752
5814
|
}
|
|
@@ -6480,19 +6542,15 @@
|
|
|
6480
6542
|
|
|
6481
6543
|
const [scrollElement] = scrollParents(targets, /auto|scroll/, true);
|
|
6482
6544
|
const { scrollTop, scrollHeight } = scrollElement;
|
|
6483
|
-
const
|
|
6545
|
+
const viewport = offsetViewport(scrollElement);
|
|
6546
|
+
const max = scrollHeight - viewport.height;
|
|
6484
6547
|
let active = false;
|
|
6485
6548
|
|
|
6486
6549
|
if (scrollTop === max) {
|
|
6487
6550
|
active = length - 1;
|
|
6488
6551
|
} else {
|
|
6489
6552
|
for (const i in targets) {
|
|
6490
|
-
if (
|
|
6491
|
-
offset(targets[i]).top -
|
|
6492
|
-
offset(getViewport$1(scrollElement)).top -
|
|
6493
|
-
this.offset >
|
|
6494
|
-
0)
|
|
6495
|
-
{
|
|
6553
|
+
if (offset(targets[i]).top - viewport.top - this.offset > 0) {
|
|
6496
6554
|
break;
|
|
6497
6555
|
}
|
|
6498
6556
|
active = +i;
|
|
@@ -6527,7 +6585,9 @@
|
|
|
6527
6585
|
props: {
|
|
6528
6586
|
position: String,
|
|
6529
6587
|
top: null,
|
|
6530
|
-
bottom:
|
|
6588
|
+
bottom: null,
|
|
6589
|
+
start: null,
|
|
6590
|
+
end: null,
|
|
6531
6591
|
offset: String,
|
|
6532
6592
|
animation: String,
|
|
6533
6593
|
clsActive: String,
|
|
@@ -6541,8 +6601,10 @@
|
|
|
6541
6601
|
|
|
6542
6602
|
data: {
|
|
6543
6603
|
position: 'top',
|
|
6544
|
-
top:
|
|
6604
|
+
top: false,
|
|
6545
6605
|
bottom: false,
|
|
6606
|
+
start: false,
|
|
6607
|
+
end: false,
|
|
6546
6608
|
offset: 0,
|
|
6547
6609
|
animation: '',
|
|
6548
6610
|
clsActive: 'uk-active',
|
|
@@ -6565,6 +6627,9 @@
|
|
|
6565
6627
|
},
|
|
6566
6628
|
|
|
6567
6629
|
connected() {
|
|
6630
|
+
this.start = coerce(this.start || this.top);
|
|
6631
|
+
this.end = coerce(this.end || this.bottom);
|
|
6632
|
+
|
|
6568
6633
|
this.placeholder =
|
|
6569
6634
|
$('+ .uk-sticky-placeholder', this.$el) ||
|
|
6570
6635
|
$('<div class="uk-sticky-placeholder"></div>');
|
|
@@ -6583,6 +6648,17 @@
|
|
|
6583
6648
|
},
|
|
6584
6649
|
|
|
6585
6650
|
events: [
|
|
6651
|
+
{
|
|
6652
|
+
name: 'resize',
|
|
6653
|
+
|
|
6654
|
+
el() {
|
|
6655
|
+
return window;
|
|
6656
|
+
},
|
|
6657
|
+
|
|
6658
|
+
handler() {
|
|
6659
|
+
this.$emit('resize');
|
|
6660
|
+
} },
|
|
6661
|
+
|
|
6586
6662
|
{
|
|
6587
6663
|
name: 'load hashchange popstate',
|
|
6588
6664
|
|
|
@@ -6599,7 +6675,7 @@
|
|
|
6599
6675
|
return;
|
|
6600
6676
|
}
|
|
6601
6677
|
|
|
6602
|
-
|
|
6678
|
+
setTimeout(() => {
|
|
6603
6679
|
const targetOffset = offset($(location.hash));
|
|
6604
6680
|
const elOffset = offset(this.$el);
|
|
6605
6681
|
|
|
@@ -6608,8 +6684,8 @@
|
|
|
6608
6684
|
window,
|
|
6609
6685
|
targetOffset.top -
|
|
6610
6686
|
elOffset.height -
|
|
6611
|
-
toPx(this.targetOffset, 'height') -
|
|
6612
|
-
toPx(this.offset, 'height'));
|
|
6687
|
+
toPx(this.targetOffset, 'height', this.placeholder) -
|
|
6688
|
+
toPx(this.offset, 'height', this.placeholder));
|
|
6613
6689
|
|
|
6614
6690
|
}
|
|
6615
6691
|
});
|
|
@@ -6639,7 +6715,7 @@
|
|
|
6639
6715
|
|
|
6640
6716
|
if (hide) {
|
|
6641
6717
|
this.show();
|
|
6642
|
-
|
|
6718
|
+
requestAnimationFrame(() => css(this.selTarget, 'transition', ''));
|
|
6643
6719
|
}
|
|
6644
6720
|
|
|
6645
6721
|
const referenceElement = this.isFixed ? this.placeholder : this.$el;
|
|
@@ -6658,13 +6734,17 @@
|
|
|
6658
6734
|
const overflow = Math.max(0, height$1 + offset$1 - windowHeight);
|
|
6659
6735
|
const topOffset = offset(referenceElement).top;
|
|
6660
6736
|
|
|
6661
|
-
const
|
|
6662
|
-
|
|
6663
|
-
|
|
6664
|
-
|
|
6665
|
-
const end =
|
|
6666
|
-
|
|
6667
|
-
|
|
6737
|
+
const start =
|
|
6738
|
+
(this.start === false ?
|
|
6739
|
+
topOffset :
|
|
6740
|
+
parseProp(this.start, this.$el, topOffset)) - offset$1;
|
|
6741
|
+
const end =
|
|
6742
|
+
this.end === false ?
|
|
6743
|
+
document.scrollingElement.scrollHeight - windowHeight :
|
|
6744
|
+
parseProp(this.end, this.$el, topOffset + height$1, true) -
|
|
6745
|
+
offset(this.$el).height +
|
|
6746
|
+
overflow -
|
|
6747
|
+
offset$1;
|
|
6668
6748
|
|
|
6669
6749
|
return {
|
|
6670
6750
|
start,
|
|
@@ -6710,7 +6790,9 @@
|
|
|
6710
6790
|
prevDir,
|
|
6711
6791
|
scroll,
|
|
6712
6792
|
prevScroll,
|
|
6713
|
-
offsetParentTop: offset(
|
|
6793
|
+
offsetParentTop: offset(
|
|
6794
|
+
(this.isFixed ? this.placeholder : this.$el).offsetParent).
|
|
6795
|
+
top,
|
|
6714
6796
|
overflowScroll: clamp(
|
|
6715
6797
|
overflowScroll + clamp(scroll, start, end) - clamp(prevScroll, start, end),
|
|
6716
6798
|
0,
|
|
@@ -6865,8 +6947,8 @@
|
|
|
6865
6947
|
return 0;
|
|
6866
6948
|
}
|
|
6867
6949
|
|
|
6868
|
-
if (isString(value) && value.match(/^-?\d/)) {
|
|
6869
|
-
return propOffset + toPx(value);
|
|
6950
|
+
if (isNumeric(value) || isString(value) && value.match(/^-?\d/)) {
|
|
6951
|
+
return propOffset + toPx(value, 'height', el, true);
|
|
6870
6952
|
} else {
|
|
6871
6953
|
const refElement = value === true ? parent(el) : query(value, el);
|
|
6872
6954
|
return (
|
|
@@ -6878,6 +6960,15 @@
|
|
|
6878
6960
|
}
|
|
6879
6961
|
}
|
|
6880
6962
|
|
|
6963
|
+
function coerce(value) {
|
|
6964
|
+
if (value === 'true') {
|
|
6965
|
+
return true;
|
|
6966
|
+
} else if (value === 'false') {
|
|
6967
|
+
return false;
|
|
6968
|
+
}
|
|
6969
|
+
return value;
|
|
6970
|
+
}
|
|
6971
|
+
|
|
6881
6972
|
var Switcher = {
|
|
6882
6973
|
mixins: [Lazyload, Swipe, Togglable],
|
|
6883
6974
|
|
|
@@ -7186,15 +7277,7 @@
|
|
|
7186
7277
|
{
|
|
7187
7278
|
name: 'click',
|
|
7188
7279
|
|
|
7189
|
-
filter() {
|
|
7190
|
-
return includes(this.mode, 'click');
|
|
7191
|
-
},
|
|
7192
|
-
|
|
7193
7280
|
handler(e) {
|
|
7194
|
-
if (this._preventClick) {
|
|
7195
|
-
return this._preventClick = null;
|
|
7196
|
-
}
|
|
7197
|
-
|
|
7198
7281
|
let link;
|
|
7199
7282
|
if (
|
|
7200
7283
|
closest(e.target, 'a[href="#"], a[href=""]') ||
|
|
@@ -7205,6 +7288,14 @@
|
|
|
7205
7288
|
e.preventDefault();
|
|
7206
7289
|
}
|
|
7207
7290
|
|
|
7291
|
+
if (this._preventClick) {
|
|
7292
|
+
return this._preventClick = null;
|
|
7293
|
+
}
|
|
7294
|
+
|
|
7295
|
+
if (!includes(this.mode, 'click')) {
|
|
7296
|
+
return;
|
|
7297
|
+
}
|
|
7298
|
+
|
|
7208
7299
|
this.toggle();
|
|
7209
7300
|
} },
|
|
7210
7301
|
|
|
@@ -7330,9 +7421,6 @@
|
|
|
7330
7421
|
// register components
|
|
7331
7422
|
each(components$1, (component, name) => UIkit.component(name, component));
|
|
7332
7423
|
|
|
7333
|
-
// core functionality
|
|
7334
|
-
UIkit.use(Core);
|
|
7335
|
-
|
|
7336
7424
|
boot(UIkit);
|
|
7337
7425
|
|
|
7338
7426
|
const units = ['days', 'hours', 'minutes', 'seconds'];
|
|
@@ -9227,12 +9315,16 @@
|
|
|
9227
9315
|
|
|
9228
9316
|
|
|
9229
9317
|
function transformFn(prop, el, stops) {
|
|
9230
|
-
|
|
9318
|
+
let unit = getUnit(stops) || { x: 'px', y: 'px', rotate: 'deg' }[prop] || '';
|
|
9231
9319
|
let transformFn;
|
|
9232
9320
|
|
|
9233
9321
|
if (prop === 'x' || prop === 'y') {
|
|
9234
9322
|
prop = "translate" + ucfirst(prop);
|
|
9235
9323
|
transformFn = (stop) => toFloat(toFloat(stop).toFixed(unit === 'px' ? 0 : 6));
|
|
9324
|
+
} else if (prop === 'scale') {
|
|
9325
|
+
unit = '';
|
|
9326
|
+
transformFn = (stop) =>
|
|
9327
|
+
getUnit([stop]) ? toPx(stop, 'width', el, true) / el.offsetWidth : stop;
|
|
9236
9328
|
}
|
|
9237
9329
|
|
|
9238
9330
|
if (stops.length === 1) {
|
|
@@ -10546,7 +10638,7 @@
|
|
|
10546
10638
|
some((scrollEl) => {
|
|
10547
10639
|
let { scrollTop: scroll, scrollHeight } = scrollEl;
|
|
10548
10640
|
|
|
10549
|
-
const { top, bottom, height } =
|
|
10641
|
+
const { top, bottom, height } = offsetViewport(scrollEl);
|
|
10550
10642
|
|
|
10551
10643
|
if (top < y && top + 35 > y) {
|
|
10552
10644
|
scroll -= dist;
|
|
@@ -10749,10 +10841,12 @@
|
|
|
10749
10841
|
|
|
10750
10842
|
this.positionAt(this.tooltip, this.$el);
|
|
10751
10843
|
|
|
10844
|
+
const [dir, align] = getAlignment(this.tooltip, this.$el, this.pos);
|
|
10845
|
+
|
|
10752
10846
|
this.origin =
|
|
10753
|
-
this.
|
|
10754
|
-
flipPosition(
|
|
10755
|
-
|
|
10847
|
+
this.axis === 'y' ?
|
|
10848
|
+
flipPosition(dir) + "-" + align :
|
|
10849
|
+
align + "-" + flipPosition(dir);
|
|
10756
10850
|
});
|
|
10757
10851
|
|
|
10758
10852
|
this.toggleElement(this.tooltip, true);
|
|
@@ -10789,6 +10883,37 @@
|
|
|
10789
10883
|
}
|
|
10790
10884
|
}
|
|
10791
10885
|
|
|
10886
|
+
function getAlignment(el, target, _ref) {let [dir, align] = _ref;
|
|
10887
|
+
const elOffset = offset(el);
|
|
10888
|
+
const targetOffset = offset(target);
|
|
10889
|
+
const properties = [
|
|
10890
|
+
['left', 'right'],
|
|
10891
|
+
['top', 'bottom']];
|
|
10892
|
+
|
|
10893
|
+
|
|
10894
|
+
for (const props of properties) {
|
|
10895
|
+
if (elOffset[props[0]] >= targetOffset[props[1]]) {
|
|
10896
|
+
dir = props[1];
|
|
10897
|
+
break;
|
|
10898
|
+
}
|
|
10899
|
+
if (elOffset[props[1]] <= targetOffset[props[0]]) {
|
|
10900
|
+
dir = props[0];
|
|
10901
|
+
break;
|
|
10902
|
+
}
|
|
10903
|
+
}
|
|
10904
|
+
|
|
10905
|
+
const props = includes(properties[0], dir) ? properties[1] : properties[0];
|
|
10906
|
+
if (elOffset[props[0]] === targetOffset[props[0]]) {
|
|
10907
|
+
align = props[0];
|
|
10908
|
+
} else if (elOffset[props[1]] === targetOffset[props[1]]) {
|
|
10909
|
+
align = props[1];
|
|
10910
|
+
} else {
|
|
10911
|
+
align = 'center';
|
|
10912
|
+
}
|
|
10913
|
+
|
|
10914
|
+
return [dir, align];
|
|
10915
|
+
}
|
|
10916
|
+
|
|
10792
10917
|
var upload = {
|
|
10793
10918
|
props: {
|
|
10794
10919
|
allow: String,
|