uikit 3.13.10 → 3.13.11-dev.2c16b47b1

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.
Files changed (100) hide show
  1. package/CHANGELOG.md +33 -1
  2. package/dist/css/uikit-core-rtl.css +49 -8
  3. package/dist/css/uikit-core-rtl.min.css +1 -1
  4. package/dist/css/uikit-core.css +49 -8
  5. package/dist/css/uikit-core.min.css +1 -1
  6. package/dist/css/uikit-rtl.css +49 -6
  7. package/dist/css/uikit-rtl.min.css +1 -1
  8. package/dist/css/uikit.css +49 -6
  9. package/dist/css/uikit.min.css +1 -1
  10. package/dist/js/components/countdown.js +1 -1
  11. package/dist/js/components/countdown.min.js +1 -1
  12. package/dist/js/components/filter.js +1 -1
  13. package/dist/js/components/filter.min.js +1 -1
  14. package/dist/js/components/lightbox-panel.js +7 -3
  15. package/dist/js/components/lightbox-panel.min.js +1 -1
  16. package/dist/js/components/lightbox.js +7 -3
  17. package/dist/js/components/lightbox.min.js +1 -1
  18. package/dist/js/components/notification.js +1 -1
  19. package/dist/js/components/notification.min.js +1 -1
  20. package/dist/js/components/parallax.js +21 -12
  21. package/dist/js/components/parallax.min.js +1 -1
  22. package/dist/js/components/slider-parallax.js +21 -12
  23. package/dist/js/components/slider-parallax.min.js +1 -1
  24. package/dist/js/components/slider.js +2 -2
  25. package/dist/js/components/slider.min.js +1 -1
  26. package/dist/js/components/slideshow-parallax.js +21 -12
  27. package/dist/js/components/slideshow-parallax.min.js +1 -1
  28. package/dist/js/components/slideshow.js +1 -1
  29. package/dist/js/components/slideshow.min.js +1 -1
  30. package/dist/js/components/sortable.js +2 -2
  31. package/dist/js/components/sortable.min.js +1 -1
  32. package/dist/js/components/tooltip.js +62 -30
  33. package/dist/js/components/tooltip.min.js +1 -1
  34. package/dist/js/components/upload.js +1 -1
  35. package/dist/js/components/upload.min.js +1 -1
  36. package/dist/js/uikit-core.js +412 -300
  37. package/dist/js/uikit-core.min.js +1 -1
  38. package/dist/js/uikit-icons.js +1 -1
  39. package/dist/js/uikit-icons.min.js +1 -1
  40. package/dist/js/uikit.js +459 -308
  41. package/dist/js/uikit.min.js +1 -1
  42. package/package.json +1 -1
  43. package/src/js/components/slider.js +1 -1
  44. package/src/js/components/sortable.js +2 -3
  45. package/src/js/components/tooltip.js +38 -3
  46. package/src/js/core/cover.js +27 -14
  47. package/src/js/core/drop.js +31 -10
  48. package/src/js/core/height-match.js +1 -1
  49. package/src/js/core/margin.js +9 -2
  50. package/src/js/core/navbar.js +18 -6
  51. package/src/js/core/scrollspy-nav.js +6 -11
  52. package/src/js/core/sticky.js +55 -21
  53. package/src/js/mixin/media.js +12 -9
  54. package/src/js/mixin/modal.js +6 -2
  55. package/src/js/mixin/parallax.js +8 -3
  56. package/src/js/mixin/position.js +24 -24
  57. package/src/js/uikit-core.js +0 -4
  58. package/src/js/util/lang.js +34 -42
  59. package/src/js/util/position.js +177 -125
  60. package/src/js/util/viewport.js +42 -22
  61. package/src/less/components/drop.less +0 -1
  62. package/src/less/components/dropdown.less +11 -1
  63. package/src/less/components/icon.less +3 -0
  64. package/src/less/components/nav.less +23 -0
  65. package/src/less/components/navbar.less +26 -2
  66. package/src/less/components/search.less +2 -0
  67. package/src/less/components/sticky.less +8 -3
  68. package/src/less/components/utility.less +1 -0
  69. package/src/less/theme/dropdown.less +4 -0
  70. package/src/less/theme/nav.less +6 -0
  71. package/src/less/theme/navbar.less +4 -0
  72. package/src/less/theme/search.less +6 -0
  73. package/src/scss/components/drop.scss +0 -1
  74. package/src/scss/components/dropdown.scss +11 -1
  75. package/src/scss/components/icon.scss +3 -0
  76. package/src/scss/components/nav.scss +23 -0
  77. package/src/scss/components/navbar.scss +26 -2
  78. package/src/scss/components/search.scss +2 -0
  79. package/src/scss/components/sticky.scss +8 -3
  80. package/src/scss/components/utility.scss +1 -0
  81. package/src/scss/mixins-theme.scss +5 -0
  82. package/src/scss/mixins.scss +5 -0
  83. package/src/scss/theme/dropdown.scss +4 -0
  84. package/src/scss/theme/nav.scss +6 -0
  85. package/src/scss/theme/navbar.scss +4 -0
  86. package/src/scss/theme/search.scss +6 -0
  87. package/src/scss/variables-theme.scss +5 -1
  88. package/src/scss/variables.scss +5 -1
  89. package/tests/alert.html +1 -1
  90. package/tests/animation.html +216 -214
  91. package/tests/drop.html +135 -80
  92. package/tests/dropdown.html +16 -2
  93. package/tests/nav.html +27 -0
  94. package/tests/navbar.html +56 -5
  95. package/tests/parallax.html +5 -5
  96. package/tests/position.html +38 -39
  97. package/tests/sticky-navbar.html +6 -6
  98. package/tests/sticky-parallax.html +29 -13
  99. package/tests/sticky.html +300 -49
  100. package/src/js/core/core.js +0 -25
package/dist/js/uikit.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.13.10 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
1
+ /*! UIkit 3.13.11-dev.2c16b47b1 | 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 ||
@@ -212,48 +208,44 @@
212
208
 
213
209
  }
214
210
 
215
- const Dimensions = {
216
- ratio(dimensions, prop, value) {
217
- const aProp = prop === 'width' ? 'height' : 'width';
211
+ function ratio(dimensions, prop, value) {
212
+ const aProp = prop === 'width' ? 'height' : 'width';
218
213
 
219
- return {
220
- [aProp]: dimensions[prop] ?
221
- Math.round(value * dimensions[aProp] / dimensions[prop]) :
222
- dimensions[aProp],
223
- [prop]: value };
214
+ return {
215
+ [aProp]: dimensions[prop] ?
216
+ Math.round(value * dimensions[aProp] / dimensions[prop]) :
217
+ dimensions[aProp],
218
+ [prop]: value };
224
219
 
225
- },
220
+ }
226
221
 
227
- contain(dimensions, maxDimensions) {
228
- dimensions = { ...dimensions };
222
+ function contain(dimensions, maxDimensions) {
223
+ dimensions = { ...dimensions };
229
224
 
230
- each(
231
- dimensions,
232
- (_, prop) =>
225
+ for (const prop in dimensions) {
233
226
  dimensions =
234
227
  dimensions[prop] > maxDimensions[prop] ?
235
- this.ratio(dimensions, prop, maxDimensions[prop]) :
236
- dimensions);
237
-
228
+ ratio(dimensions, prop, maxDimensions[prop]) :
229
+ dimensions;
230
+ }
238
231
 
239
- return dimensions;
240
- },
232
+ return dimensions;
233
+ }
241
234
 
242
- cover(dimensions, maxDimensions) {
243
- dimensions = this.contain(dimensions, maxDimensions);
235
+ function cover$1(dimensions, maxDimensions) {
236
+ dimensions = contain(dimensions, maxDimensions);
244
237
 
245
- each(
246
- dimensions,
247
- (_, prop) =>
238
+ for (const prop in dimensions) {
248
239
  dimensions =
249
240
  dimensions[prop] < maxDimensions[prop] ?
250
- this.ratio(dimensions, prop, maxDimensions[prop]) :
251
- dimensions);
252
-
241
+ ratio(dimensions, prop, maxDimensions[prop]) :
242
+ dimensions;
243
+ }
253
244
 
254
- return dimensions;
255
- } };
245
+ return dimensions;
246
+ }
256
247
 
248
+ const Dimensions = { ratio, contain, cover: cover$1 };
257
249
 
258
250
  function getIndex(i, elements, current, finite) {if (current === void 0) {current = 0;}if (finite === void 0) {finite = false;}
259
251
  elements = toNodes(elements);
@@ -1788,7 +1780,7 @@
1788
1780
  return intersectRect(
1789
1781
  ...scrollParents(element).
1790
1782
  map((parent) => {
1791
- const { top, left, bottom, right } = offset(getViewport$1(parent));
1783
+ const { top, left, bottom, right } = offsetViewport(parent);
1792
1784
 
1793
1785
  return {
1794
1786
  top: top - offsetTop,
@@ -1803,7 +1795,7 @@
1803
1795
 
1804
1796
  function scrollTop(element, top) {
1805
1797
  if (isWindow(element) || isDocument(element)) {
1806
- element = getScrollingElement(element);
1798
+ element = scrollingElement(element);
1807
1799
  } else {
1808
1800
  element = toNode(element);
1809
1801
  }
@@ -1820,12 +1812,13 @@
1820
1812
  return parents.reduce(
1821
1813
  (fn, scrollElement, i) => {
1822
1814
  const { scrollTop, scrollHeight, offsetHeight } = scrollElement;
1823
- const maxScroll = scrollHeight - getViewportClientHeight(scrollElement);
1824
- const { height: elHeight, top: elTop } = offset(parents[i - 1] || element);
1825
-
1826
- let top = Math.ceil(
1827
- elTop - offset(getViewport$1(scrollElement)).top - offsetBy + scrollTop);
1815
+ const viewport = offsetViewport(scrollElement);
1816
+ const maxScroll = scrollHeight - viewport.height;
1817
+ const { height: elHeight, top: elTop } = parents[i - 1] ?
1818
+ offsetViewport(parents[i - 1]) :
1819
+ offset(element);
1828
1820
 
1821
+ let top = Math.ceil(elTop - viewport.top - offsetBy + scrollTop);
1829
1822
 
1830
1823
  if (offsetBy > 0 && offsetHeight < elHeight + offsetBy) {
1831
1824
  top += offsetBy;
@@ -1883,7 +1876,7 @@
1883
1876
 
1884
1877
  const [scrollElement] = scrollParents(element, /auto|scroll/, true);
1885
1878
  const { scrollHeight, scrollTop } = scrollElement;
1886
- const viewportHeight = getViewportClientHeight(scrollElement);
1879
+ const { height: viewportHeight } = offsetViewport(scrollElement);
1887
1880
  const maxScroll = scrollHeight - viewportHeight;
1888
1881
  const elementOffsetTop = offsetPosition(element)[0] - offsetPosition(scrollElement)[0];
1889
1882
 
@@ -1894,7 +1887,7 @@
1894
1887
  }
1895
1888
 
1896
1889
  function scrollParents(element, overflowRe, scrollable) {if (overflowRe === void 0) {overflowRe = /auto|scroll|hidden/;}if (scrollable === void 0) {scrollable = false;}
1897
- const scrollEl = getScrollingElement(element);
1890
+ const scrollEl = scrollingElement(element);
1898
1891
 
1899
1892
  let ancestors = parents(element).reverse();
1900
1893
  ancestors = ancestors.slice(ancestors.indexOf(scrollEl) + 1);
@@ -1909,181 +1902,250 @@
1909
1902
  ancestors.filter(
1910
1903
  (parent) =>
1911
1904
  overflowRe.test(css(parent, 'overflow')) && (
1912
- !scrollable || parent.scrollHeight > getViewportClientHeight(parent)))).
1905
+ !scrollable || parent.scrollHeight > offsetViewport(parent).height))).
1913
1906
 
1914
1907
 
1915
1908
  reverse();
1916
1909
  }
1917
1910
 
1918
- function getViewport$1(scrollElement) {
1919
- return scrollElement === getScrollingElement(scrollElement) ? window : scrollElement;
1911
+ function offsetViewport(scrollElement) {
1912
+ let viewportElement = getViewport$1(scrollElement);
1913
+
1914
+ // iOS 12 returns <body> as scrollingElement
1915
+ if (viewportElement === scrollingElement(viewportElement)) {
1916
+ viewportElement = document.documentElement;
1917
+ }
1918
+
1919
+ let rect = offset(viewportElement);
1920
+ for (let [prop, dir, start, end] of [
1921
+ ['width', 'x', 'left', 'right'],
1922
+ ['height', 'y', 'top', 'bottom']])
1923
+ {
1924
+ if (!isWindow(getViewport$1(viewportElement))) {
1925
+ rect[start] += toFloat(css(viewportElement, "border" + ucfirst(start) + "Width"));
1926
+ }
1927
+ rect[prop] = rect[dir] = (
1928
+ isWindow(viewportElement) ? scrollingElement(viewportElement) : viewportElement)["client" +
1929
+ ucfirst(prop)];
1930
+ rect[end] = rect[prop] + rect[start];
1931
+ }
1932
+ return rect;
1920
1933
  }
1921
1934
 
1922
- // iOS 12 returns <body> as scrollingElement
1923
- function getViewportClientHeight(scrollElement) {
1924
- return (
1925
- scrollElement === getScrollingElement(scrollElement) ?
1926
- document.documentElement :
1927
- scrollElement).
1928
- clientHeight;
1935
+ function scrollingElement(element) {
1936
+ const {
1937
+ document: { scrollingElement } } =
1938
+ toWindow(element);
1939
+ return scrollingElement;
1929
1940
  }
1930
1941
 
1931
- function getScrollingElement(element) {
1932
- const { document } = toWindow(element);
1933
- return document.scrollingElement || document.documentElement;
1942
+ function getViewport$1(scrollElement) {
1943
+ return scrollElement === scrollingElement(scrollElement) ? window : scrollElement;
1934
1944
  }
1935
1945
 
1936
- const dirs = {
1937
- width: ['x', 'left', 'right'],
1938
- height: ['y', 'top', 'bottom'] };
1946
+ const dirs = [
1947
+ ['width', 'x', 'left', 'right'],
1948
+ ['height', 'y', 'top', 'bottom']];
1949
+
1950
+
1951
+ function positionAt(element, target, options) {
1952
+ options = {
1953
+ attach: {
1954
+ element: ['left', 'top'],
1955
+ target: ['left', 'top'],
1956
+ ...options.attach },
1957
+
1958
+ offset: [0, 0],
1959
+ ...options };
1960
+
1961
+
1962
+ const dim = options.flip ?
1963
+ attachToWithFlip(element, target, options) :
1964
+ attachTo(element, target, options);
1965
+
1966
+ offset(element, dim);
1967
+ }
1939
1968
 
1969
+ function attachTo(element, target, options) {
1970
+ let { attach, offset: offsetBy } = {
1971
+ attach: {
1972
+ element: ['left', 'top'],
1973
+ target: ['left', 'top'],
1974
+ ...options.attach },
1940
1975
 
1941
- function positionAt(
1942
- element,
1943
- target,
1944
- elAttach,
1945
- targetAttach,
1946
- elOffset,
1947
- targetOffset,
1948
- flip,
1949
- boundary)
1950
- {
1951
- elAttach = getPos(elAttach);
1952
- targetAttach = getPos(targetAttach);
1976
+ offset: [0, 0],
1977
+ ...options };
1953
1978
 
1954
- const flipped = { element: elAttach, target: targetAttach };
1955
1979
 
1956
- if (!element || !target) {
1957
- return flipped;
1980
+ const position = offset(element);
1981
+ const targetOffset = offset(target);
1982
+ for (const [i, [prop, dir, start, end]] of Object.entries(dirs)) {
1983
+ position[start] = position[dir] =
1984
+ targetOffset[start] +
1985
+ moveBy(attach.target[i], end, targetOffset[prop]) -
1986
+ moveBy(attach.element[i], end, position[prop]) +
1987
+ +offsetBy[i];
1988
+ position[end] = position[start] + position[prop];
1958
1989
  }
1990
+ return position;
1991
+ }
1959
1992
 
1960
- const dim = offset(element);
1993
+ function attachToWithFlip(element, target, options) {
1994
+ const position = attachTo(element, target, options);
1961
1995
  const targetDim = offset(target);
1962
- const position = targetDim;
1996
+ const viewports = scrollParents(element);
1997
+ const [scrollElement] = viewports;
1998
+
1999
+ let {
2000
+ flip,
2001
+ attach: { element: elAttach, target: targetAttach },
2002
+ offset: elOffset,
2003
+ boundary,
2004
+ viewport,
2005
+ viewportPadding } =
2006
+ options;
2007
+
2008
+ viewports.push(viewport);
2009
+
2010
+ const offsetPosition = { ...position };
2011
+ for (const [i, [prop, dir, start, end]] of Object.entries(dirs)) {
2012
+ if (flip !== true && !includes(flip, dir)) {
2013
+ continue;
2014
+ }
1963
2015
 
1964
- moveTo(position, elAttach, dim, -1);
1965
- moveTo(position, targetAttach, targetDim, 1);
2016
+ const willFlip =
2017
+ !intersectLine(position, targetDim, i) && intersectLine(position, targetDim, 1 - i);
1966
2018
 
1967
- elOffset = getOffsets(elOffset, dim.width, dim.height);
1968
- targetOffset = getOffsets(targetOffset, targetDim.width, targetDim.height);
2019
+ viewport = getIntersectionArea(...viewports.filter(Boolean).map(offsetViewport));
1969
2020
 
1970
- elOffset['x'] += targetOffset['x'];
1971
- elOffset['y'] += targetOffset['y'];
2021
+ if (viewportPadding) {
2022
+ viewport[start] += viewportPadding;
2023
+ viewport[end] -= viewportPadding;
2024
+ }
1972
2025
 
1973
- position.left += elOffset['x'];
1974
- position.top += elOffset['y'];
2026
+ if (boundary && !(willFlip || position[prop] > offset(boundary)[prop])) {
2027
+ viewport = getIntersectionArea(viewport, offset(boundary));
2028
+ }
1975
2029
 
1976
- if (flip) {
1977
- let boundaries = scrollParents(element).map(getViewport$1);
2030
+ const isInStartBoundary = position[start] >= viewport[start];
2031
+ const isInEndBoundary = position[end] <= viewport[end];
1978
2032
 
1979
- if (boundary && !includes(boundaries, boundary)) {
1980
- boundaries.unshift(boundary);
2033
+ if (isInStartBoundary && isInEndBoundary) {
2034
+ continue;
1981
2035
  }
1982
2036
 
1983
- boundaries = boundaries.map((el) => offset(el));
2037
+ let offsetBy;
1984
2038
 
1985
- each(dirs, (_ref, prop) => {let [dir, align, alignFlip] = _ref;
1986
- if (!(flip === true || includes(flip, dir))) {
1987
- return;
2039
+ // Flip
2040
+ if (willFlip) {
2041
+ if (
2042
+ elAttach[i] === end && isInStartBoundary ||
2043
+ elAttach[i] === start && isInEndBoundary)
2044
+ {
2045
+ continue;
1988
2046
  }
1989
2047
 
1990
- boundaries.some((boundary) => {
1991
- const elemOffset =
1992
- elAttach[dir] === align ?
1993
- -dim[prop] :
1994
- elAttach[dir] === alignFlip ?
1995
- dim[prop] :
1996
- 0;
1997
-
1998
- const targetOffset =
1999
- targetAttach[dir] === align ?
2000
- targetDim[prop] :
2001
- targetAttach[dir] === alignFlip ?
2002
- -targetDim[prop] :
2003
- 0;
2048
+ offsetBy =
2049
+ (elAttach[i] === start ?
2050
+ -position[prop] :
2051
+ elAttach[i] === end ?
2052
+ position[prop] :
2053
+ 0) + (
2054
+ targetAttach[i] === start ?
2055
+ targetDim[prop] :
2056
+ targetAttach[i] === end ?
2057
+ -targetDim[prop] :
2058
+ 0) -
2059
+ elOffset[i] * 2;
2004
2060
 
2005
- if (
2006
- position[align] < boundary[align] ||
2007
- position[align] + dim[prop] > boundary[alignFlip])
2008
- {
2009
- const centerOffset = dim[prop] / 2;
2010
- const centerTargetOffset =
2011
- targetAttach[dir] === 'center' ? -targetDim[prop] / 2 : 0;
2061
+ if (
2062
+ !isInScrollArea(
2063
+ {
2064
+ ...position,
2065
+ [start]: position[start] + offsetBy,
2066
+ [end]: position[end] + offsetBy },
2012
2067
 
2013
- return (
2014
- elAttach[dir] === 'center' && (
2015
- apply(centerOffset, centerTargetOffset) ||
2016
- apply(-centerOffset, -centerTargetOffset)) ||
2017
- apply(elemOffset, targetOffset));
2068
+ scrollElement,
2069
+ i))
2018
2070
 
2071
+ {
2072
+ if (isInScrollArea(position, scrollElement, i)) {
2073
+ continue;
2019
2074
  }
2020
2075
 
2021
- function apply(elemOffset, targetOffset) {
2022
- const newVal = toFloat(
2023
- (position[align] + elemOffset + targetOffset - elOffset[dir] * 2).toFixed(4));
2076
+ if (options.recursion) {
2077
+ return false;
2078
+ }
2024
2079
 
2080
+ const newPos = attachToWithFlip(element, target, {
2081
+ ...options,
2082
+ attach: {
2083
+ element: elAttach.map(flipDir).reverse(),
2084
+ target: targetAttach.map(flipDir).reverse() },
2025
2085
 
2026
- if (newVal >= boundary[align] && newVal + dim[prop] <= boundary[alignFlip]) {
2027
- position[align] = newVal;
2086
+ offset: elOffset.reverse(),
2087
+ flip: flip === true ? flip : [...flip, dirs[1 - i][1]],
2088
+ recursion: true });
2028
2089
 
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
2090
 
2038
- return true;
2039
- }
2091
+ if (newPos && isInScrollArea(newPos, scrollElement, 1 - i)) {
2092
+ return newPos;
2040
2093
  }
2041
- });
2042
- });
2043
- }
2094
+ }
2044
2095
 
2045
- offset(element, position);
2096
+ // Move
2097
+ } else {
2098
+ offsetBy =
2099
+ clamp(
2100
+ clamp(position[start], viewport[start], viewport[end] - position[prop]),
2101
+ targetDim[start] - position[prop] + elOffset[i],
2102
+ targetDim[end] - elOffset[i]) -
2103
+ position[start];
2104
+ }
2046
2105
 
2047
- return flipped;
2048
- }
2106
+ offsetPosition[start] = position[dir] = position[start] + offsetBy;
2107
+ offsetPosition[end] += offsetBy;
2108
+ }
2049
2109
 
2050
- function moveTo(position, attach, dim, factor) {
2051
- each(dirs, (_ref2, prop) => {let [dir, align, alignFlip] = _ref2;
2052
- if (attach[dir] === alignFlip) {
2053
- position[align] += dim[prop] * factor;
2054
- } else if (attach[dir] === 'center') {
2055
- position[align] += dim[prop] * factor / 2;
2056
- }
2057
- });
2110
+ return offsetPosition;
2058
2111
  }
2059
2112
 
2060
- function getPos(pos) {
2061
- const x = /left|center|right/;
2062
- const y = /top|center|bottom/;
2063
-
2064
- pos = (pos || '').split(' ');
2113
+ function moveBy(start, end, dim) {
2114
+ return start === 'center' ? dim / 2 : start === end ? dim : 0;
2115
+ }
2065
2116
 
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'];
2117
+ function getIntersectionArea() {
2118
+ let area = {};for (var _len = arguments.length, rects = new Array(_len), _key = 0; _key < _len; _key++) {rects[_key] = arguments[_key];}
2119
+ for (const rect of rects) {
2120
+ for (const [,, start, end] of dirs) {
2121
+ area[start] = Math.max(area[start] || 0, rect[start]);
2122
+ area[end] = Math.min(...[area[end], rect[end]].filter(Boolean));
2123
+ }
2072
2124
  }
2125
+ return area;
2126
+ }
2073
2127
 
2074
- return {
2075
- x: x.test(pos[0]) ? pos[0] : 'center',
2076
- y: y.test(pos[1]) ? pos[1] : 'center' };
2128
+ function isInScrollArea(position, scrollElement, dir) {
2129
+ const viewport = offsetViewport(scrollElement);
2130
+ const [prop,, start, end] = dirs[dir];
2131
+ viewport[start] -= scrollElement["scroll" + ucfirst(start)];
2132
+ viewport[end] = viewport[start] + scrollElement["scroll" + ucfirst(prop)];
2077
2133
 
2134
+ return position[start] >= viewport[start] && position[end] <= viewport[end];
2078
2135
  }
2079
2136
 
2080
- function getOffsets(offsets, width, height) {
2081
- const [x, y] = (offsets || '').split(' ');
2082
-
2083
- return {
2084
- x: x ? toFloat(x) * (endsWith(x, '%') ? width / 100 : 1) : 0,
2085
- y: y ? toFloat(y) * (endsWith(y, '%') ? height / 100 : 1) : 0 };
2137
+ function intersectLine(dimA, dimB, dir) {
2138
+ const [,, start, end] = dirs[dir];
2139
+ return dimA[end] > dimB[start] && dimB[end] > dimA[start];
2140
+ }
2086
2141
 
2142
+ function flipDir(prop) {
2143
+ for (let i = 0; i < dirs.length; i++) {
2144
+ const index = dirs[i].indexOf(prop);
2145
+ if (~index) {
2146
+ return dirs[1 - i][index % 2 + 2];
2147
+ }
2148
+ }
2087
2149
  }
2088
2150
 
2089
2151
  var util = /*#__PURE__*/Object.freeze({
@@ -2192,7 +2254,6 @@
2192
2254
  toNode: toNode,
2193
2255
  toNodes: toNodes,
2194
2256
  toWindow: toWindow,
2195
- toMs: toMs,
2196
2257
  isEqual: isEqual,
2197
2258
  swap: swap,
2198
2259
  last: last,
@@ -2231,9 +2292,7 @@
2231
2292
  scrollIntoView: scrollIntoView,
2232
2293
  scrolledOver: scrolledOver,
2233
2294
  scrollParents: scrollParents,
2234
- getViewport: getViewport$1,
2235
- getViewportClientHeight: getViewportClientHeight,
2236
- getScrollingElement: getScrollingElement
2295
+ offsetViewport: offsetViewport
2237
2296
  });
2238
2297
 
2239
2298
  function globalAPI (UIkit) {
@@ -2550,7 +2609,7 @@
2550
2609
  continue;
2551
2610
  }
2552
2611
 
2553
- value = props[key] === Boolean && value === '' ? true : coerce(props[key], value);
2612
+ value = props[key] === Boolean && value === '' ? true : coerce$1(props[key], value);
2554
2613
 
2555
2614
  if (prop === 'target' && (!value || startsWith(value, '_'))) {
2556
2615
  continue;
@@ -2564,7 +2623,7 @@
2564
2623
  for (const key in options) {
2565
2624
  const prop = camelize(key);
2566
2625
  if (props[prop] !== undefined) {
2567
- data$1[prop] = coerce(props[prop], options[key]);
2626
+ data$1[prop] = coerce$1(props[prop], options[key]);
2568
2627
  }
2569
2628
  }
2570
2629
 
@@ -2629,7 +2688,7 @@
2629
2688
  return options.every((arr) => !arr || !hasOwn(arr, key));
2630
2689
  }
2631
2690
 
2632
- function coerce(type, value) {
2691
+ function coerce$1(type, value) {
2633
2692
  if (type === Boolean) {
2634
2693
  return toBoolean(value);
2635
2694
  } else if (type === Number) {
@@ -2667,7 +2726,7 @@
2667
2726
  if (isUndefined(data[key])) {
2668
2727
  delete data[key];
2669
2728
  } else if (props[key]) {
2670
- data[key] = coerce(props[key], data[key]);
2729
+ data[key] = coerce$1(props[key], data[key]);
2671
2730
  }
2672
2731
  }
2673
2732
 
@@ -2892,7 +2951,7 @@
2892
2951
  UIkit.data = '__uikit__';
2893
2952
  UIkit.prefix = 'uk-';
2894
2953
  UIkit.options = {};
2895
- UIkit.version = '3.13.10';
2954
+ UIkit.version = '3.13.11-dev.2c16b47b1';
2896
2955
 
2897
2956
  globalAPI(UIkit);
2898
2957
  hooksAPI(UIkit);
@@ -2900,30 +2959,6 @@
2900
2959
  componentAPI(UIkit);
2901
2960
  instanceAPI(UIkit);
2902
2961
 
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
2962
  function boot (UIkit) {
2928
2963
  const { connect, disconnect } = UIkit;
2929
2964
 
@@ -3440,25 +3475,38 @@
3440
3475
 
3441
3476
  update: {
3442
3477
  read() {
3443
- const el = this.$el;
3444
- const { offsetHeight: height, offsetWidth: width } =
3445
- getPositionedParent(el) || parent(el);
3446
- const dim = Dimensions.cover(
3447
- {
3448
- width: this.width || el.naturalWidth || el.videoWidth || el.clientWidth,
3449
- height: this.height || el.naturalHeight || el.videoHeight || el.clientHeight },
3478
+ const { ratio, cover } = Dimensions;
3479
+ const { $el, width, height } = this;
3450
3480
 
3451
- {
3452
- width: width + (width % 2 ? 1 : 0),
3453
- height: height + (height % 2 ? 1 : 0) });
3481
+ let dim = { width, height };
3454
3482
 
3483
+ if (!dim.width || !dim.height) {
3484
+ const intrinsic = {
3485
+ width: $el.naturalWidth || $el.videoWidth || $el.clientWidth,
3486
+ height: $el.naturalHeight || $el.videoHeight || $el.clientHeight };
3455
3487
 
3456
3488
 
3457
- if (!dim.width || !dim.height) {
3489
+ if (dim.width) {
3490
+ dim = ratio(intrinsic, 'width', dim.width);
3491
+ } else if (height) {
3492
+ dim = ratio(intrinsic, 'height', dim.height);
3493
+ } else {
3494
+ dim = intrinsic;
3495
+ }
3496
+ }
3497
+
3498
+ const { offsetHeight: coverHeight, offsetWidth: coverWidth } =
3499
+ getPositionedParent($el) || parent($el);
3500
+ const coverDim = cover(dim, {
3501
+ width: coverWidth + (coverWidth % 2 ? 1 : 0),
3502
+ height: coverHeight + (coverHeight % 2 ? 1 : 0) });
3503
+
3504
+
3505
+ if (!coverDim.width || !coverDim.height) {
3458
3506
  return false;
3459
3507
  }
3460
3508
 
3461
- return dim;
3509
+ return coverDim;
3462
3510
  },
3463
3511
 
3464
3512
  write(_ref) {let { height, width } = _ref;
@@ -3501,50 +3549,49 @@
3501
3549
  data: {
3502
3550
  pos: "bottom-" + (isRtl ? 'right' : 'left'),
3503
3551
  flip: true,
3504
- offset: false },
3552
+ offset: false,
3553
+ viewportPadding: 10 },
3505
3554
 
3506
3555
 
3507
3556
  connected() {
3508
3557
  this.pos = this.$props.pos.split('-').concat('center').slice(0, 2);
3509
- this.dir = this.pos[0];
3510
- this.align = this.pos[1];
3558
+ this.axis = includes(['top', 'bottom'], this.pos[0]) ? 'y' : 'x';
3511
3559
  },
3512
3560
 
3513
3561
  methods: {
3514
3562
  positionAt(element, target, boundary) {
3515
- const axis = this.getAxis();
3516
- const dir = this.pos[0];
3517
- const align = this.pos[1];
3563
+ const [dir, align] = this.pos;
3518
3564
 
3519
3565
  let { offset: offset$1 } = this;
3520
3566
  if (!isNumeric(offset$1)) {
3521
3567
  const node = $(offset$1);
3522
3568
  offset$1 = node ?
3523
- offset(node)[axis === 'x' ? 'left' : 'top'] -
3524
- offset(target)[axis === 'x' ? 'right' : 'bottom'] :
3569
+ offset(node)[this.axis === 'x' ? 'left' : 'top'] -
3570
+ offset(target)[this.axis === 'x' ? 'right' : 'bottom'] :
3525
3571
  0;
3526
3572
  }
3527
3573
  offset$1 = toPx(offset$1) + toPx(getCssVar('position-offset', element));
3574
+ offset$1 = [includes(['left', 'top'], dir) ? -offset$1 : +offset$1, 0];
3575
+
3576
+ const attach = {
3577
+ element: [flipPosition(dir), align],
3578
+ target: [dir, align] };
3579
+
3580
+
3581
+ if (this.axis === 'y') {
3582
+ for (const prop in attach) {
3583
+ attach[prop] = attach[prop].reverse();
3584
+ }
3585
+ offset$1 = offset$1.reverse();
3586
+ }
3587
+
3588
+ positionAt(element, target, {
3589
+ attach,
3590
+ offset: offset$1,
3591
+ boundary,
3592
+ viewportPadding: this.viewportPadding,
3593
+ flip: this.flip });
3528
3594
 
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
3595
  } } };
3549
3596
 
3550
3597
  let active$1;
@@ -3561,6 +3608,7 @@
3561
3608
  boundaryAlign: Boolean,
3562
3609
  delayShow: Number,
3563
3610
  delayHide: Number,
3611
+ display: String,
3564
3612
  clsDrop: String },
3565
3613
 
3566
3614
 
@@ -3571,6 +3619,7 @@
3571
3619
  boundaryAlign: false,
3572
3620
  delayShow: 0,
3573
3621
  delayHide: 800,
3622
+ display: null,
3574
3623
  clsDrop: false,
3575
3624
  animation: ['uk-animation-fade'],
3576
3625
  cls: 'uk-open',
@@ -3761,7 +3810,15 @@
3761
3810
  this.hide(false);
3762
3811
  }
3763
3812
  }),
3764
- on(window, 'resize', () => this.$emit())])
3813
+ on(window, 'resize', () => this.$emit()),
3814
+ this.display === 'static' ?
3815
+ noop :
3816
+ on(
3817
+ document,
3818
+ 'scroll',
3819
+ (_ref4) => {let { target } = _ref4;return target.contains(this.$el) && this.$emit();},
3820
+ true)])
3821
+
3765
3822
  {
3766
3823
  once(this.$el, 'hide', handler, { self: true });
3767
3824
  }
@@ -3781,7 +3838,7 @@
3781
3838
  {
3782
3839
  name: 'hide',
3783
3840
 
3784
- handler(_ref4) {let { target } = _ref4;
3841
+ handler(_ref5) {let { target } = _ref5;
3785
3842
  if (this.$el !== target) {
3786
3843
  active$1 =
3787
3844
  active$1 === null && within(target, this.$el) && this.isToggled() ?
@@ -3872,25 +3929,33 @@
3872
3929
  },
3873
3930
 
3874
3931
  position() {
3875
- const boundary = query(this.boundary, this.$el) || window;
3876
3932
  removeClass(this.$el, this.clsDrop + "-stack");
3877
3933
  toggleClass(this.$el, this.clsDrop + "-boundary", this.boundaryAlign);
3878
3934
 
3879
- const boundaryOffset = offset(boundary);
3880
- const targetOffset = offset(this.target);
3881
- const alignTo = this.boundaryAlign ? boundaryOffset : targetOffset;
3935
+ const boundary = query(this.boundary, this.$el);
3936
+ const [scrollParent] = scrollParents(this.$el);
3937
+ const scrollParentOffset = offsetViewport(scrollParent);
3938
+ const boundaryOffset = boundary ? offset(boundary) : scrollParentOffset;
3939
+
3940
+ css(this.$el, 'maxWidth', '');
3941
+ const maxWidth = scrollParentOffset.width - (boundary ? 0 : 2 * this.viewportPadding);
3882
3942
 
3883
3943
  if (this.pos[1] === 'justify') {
3884
- const prop = this.getAxis() === 'y' ? 'width' : 'height';
3944
+ const prop = this.axis === 'y' ? 'width' : 'height';
3945
+ const targetOffset = offset(this.target);
3946
+ const alignTo = this.boundaryAlign ? boundaryOffset : targetOffset;
3885
3947
  css(this.$el, prop, alignTo[prop]);
3886
- } else if (
3887
- this.$el.offsetWidth >
3888
- Math.max(boundaryOffset.right - alignTo.left, alignTo.right - boundaryOffset.left))
3889
- {
3948
+ } else if (this.$el.offsetWidth > maxWidth) {
3890
3949
  addClass(this.$el, this.clsDrop + "-stack");
3891
3950
  }
3892
3951
 
3893
- this.positionAt(this.$el, this.boundaryAlign ? boundary : this.target, boundary);
3952
+ css(this.$el, 'maxWidth', maxWidth);
3953
+
3954
+ this.positionAt(
3955
+ this.$el,
3956
+ boundary && this.boundaryAlign ? boundary : this.target,
3957
+ boundary);
3958
+
3894
3959
  } } };
3895
3960
 
3896
3961
 
@@ -3988,7 +4053,7 @@
3988
4053
 
3989
4054
 
3990
4055
  resizeTargets() {
3991
- return [this.$el, this.$el.children];
4056
+ return [this.$el, ...toArray(this.$el.children)];
3992
4057
  },
3993
4058
 
3994
4059
  connected() {
@@ -4305,7 +4370,7 @@
4305
4370
 
4306
4371
 
4307
4372
  resizeTargets() {
4308
- return [this.$el, this.elements];
4373
+ return [this.$el, ...this.elements];
4309
4374
  },
4310
4375
 
4311
4376
  update: {
@@ -4994,16 +5059,19 @@
4994
5059
 
4995
5060
  connected() {
4996
5061
  const media = toMedia(this.media);
4997
- this.mediaObj = window.matchMedia(media);
4998
- const handler = () => {
4999
- this.matchMedia = this.mediaObj.matches;
5000
- trigger(this.$el, createEvent('mediachange', false, true, [this.mediaObj]));
5001
- };
5002
- this.offMediaObj = on(this.mediaObj, 'change', () => {
5062
+ this.matchMedia = true;
5063
+ if (media) {
5064
+ this.mediaObj = window.matchMedia(media);
5065
+ const handler = () => {
5066
+ this.matchMedia = this.mediaObj.matches;
5067
+ trigger(this.$el, createEvent('mediachange', false, true, [this.mediaObj]));
5068
+ };
5069
+ this.offMediaObj = on(this.mediaObj, 'change', () => {
5070
+ handler();
5071
+ this.$emit('resize');
5072
+ });
5003
5073
  handler();
5004
- this.$emit('resize');
5005
- });
5006
- handler();
5074
+ }
5007
5075
  },
5008
5076
 
5009
5077
  disconnected() {var _this$offMediaObj;
@@ -5292,7 +5360,7 @@
5292
5360
  return (el, show) =>
5293
5361
  new Promise((resolve, reject) =>
5294
5362
  once(el, 'show hide', () => {
5295
- el._reject && el._reject();
5363
+ el._reject == null ? void 0 : el._reject();
5296
5364
  el._reject = reject;
5297
5365
 
5298
5366
  _toggle(el, show);
@@ -5317,6 +5385,10 @@
5317
5385
  then(() => delete el._reject);
5318
5386
  }
5319
5387
 
5388
+ function toMs(time) {
5389
+ return time ? endsWith(time, 'ms') ? toFloat(time) : toFloat(time) * 1000 : 0;
5390
+ }
5391
+
5320
5392
  var modal = {
5321
5393
  install: install$2,
5322
5394
 
@@ -5470,8 +5542,6 @@
5470
5542
  toggle: '> a',
5471
5543
  content: '> ul' } };
5472
5544
 
5473
- const navItem = '.uk-navbar-nav > li > a, .uk-navbar-item, .uk-navbar-toggle';
5474
-
5475
5545
  var navbar = {
5476
5546
  mixins: [Class, Container],
5477
5547
 
@@ -5491,7 +5561,7 @@
5491
5561
 
5492
5562
 
5493
5563
  data: {
5494
- dropdown: navItem,
5564
+ dropdown: '.uk-navbar-nav > li > a, .uk-navbar-item, .uk-navbar-toggle',
5495
5565
  align: isRtl ? 'right' : 'left',
5496
5566
  clsDrop: 'uk-navbar-dropdown',
5497
5567
  mode: undefined,
@@ -5577,9 +5647,23 @@
5577
5647
  immediate: true },
5578
5648
 
5579
5649
 
5580
- toggles(_ref6, $el) {let { dropdown } = _ref6;
5581
- return $$(dropdown, $el);
5582
- } },
5650
+ toggles: {
5651
+ get(_ref6, $el) {let { dropdown } = _ref6;
5652
+ return $$(dropdown, $el);
5653
+ },
5654
+
5655
+ watch() {
5656
+ const justify = hasClass(this.$el, 'uk-navbar-justify');
5657
+ for (const container of $$(
5658
+ '.uk-navbar-nav, .uk-navbar-left, .uk-navbar-right',
5659
+ this.$el))
5660
+ {
5661
+ css(container, 'flexGrow', justify ? $$(this.dropdown, container).length : '');
5662
+ }
5663
+ },
5664
+
5665
+ immediate: true } },
5666
+
5583
5667
 
5584
5668
 
5585
5669
  disconnected() {
@@ -5740,7 +5824,7 @@
5740
5824
  return this.dropbar;
5741
5825
  },
5742
5826
 
5743
- handler(_, _ref10) {let { $el, dir } = _ref10;
5827
+ handler(_, _ref10) {let { $el, pos: [dir] = [] } = _ref10;
5744
5828
  if (!hasClass($el, this.clsDrop)) {
5745
5829
  return;
5746
5830
  }
@@ -6474,19 +6558,15 @@
6474
6558
 
6475
6559
  const [scrollElement] = scrollParents(targets, /auto|scroll/, true);
6476
6560
  const { scrollTop, scrollHeight } = scrollElement;
6477
- const max = scrollHeight - getViewportClientHeight(scrollElement);
6561
+ const viewport = offsetViewport(scrollElement);
6562
+ const max = scrollHeight - viewport.height;
6478
6563
  let active = false;
6479
6564
 
6480
6565
  if (scrollTop === max) {
6481
6566
  active = length - 1;
6482
6567
  } else {
6483
- for (const i in targets) {
6484
- if (
6485
- offset(targets[i]).top -
6486
- offset(getViewport$1(scrollElement)).top -
6487
- this.offset >
6488
- 0)
6489
- {
6568
+ for (let i = 0; i < targets.length; i++) {
6569
+ if (offset(targets[i]).top - viewport.top - this.offset > 0) {
6490
6570
  break;
6491
6571
  }
6492
6572
  active = +i;
@@ -6504,7 +6584,7 @@
6504
6584
  const changed = active !== false && !hasClass(this.elements[active], this.cls);
6505
6585
 
6506
6586
  this.links.forEach((el) => el.blur());
6507
- for (const i in this.elements) {
6587
+ for (let i = 0; i < this.elements.length; i++) {
6508
6588
  toggleClass(this.elements[i], this.cls, +i === active);
6509
6589
  }
6510
6590
 
@@ -6521,8 +6601,11 @@
6521
6601
  props: {
6522
6602
  position: String,
6523
6603
  top: null,
6524
- bottom: Boolean,
6604
+ bottom: null,
6605
+ start: null,
6606
+ end: null,
6525
6607
  offset: String,
6608
+ overflowFlip: Boolean,
6526
6609
  animation: String,
6527
6610
  clsActive: String,
6528
6611
  clsInactive: String,
@@ -6535,9 +6618,12 @@
6535
6618
 
6536
6619
  data: {
6537
6620
  position: 'top',
6538
- top: 0,
6621
+ top: false,
6539
6622
  bottom: false,
6623
+ start: false,
6624
+ end: false,
6540
6625
  offset: 0,
6626
+ overflowFlip: false,
6541
6627
  animation: '',
6542
6628
  clsActive: 'uk-active',
6543
6629
  clsInactive: '',
@@ -6559,6 +6645,9 @@
6559
6645
  },
6560
6646
 
6561
6647
  connected() {
6648
+ this.start = coerce(this.start || this.top);
6649
+ this.end = coerce(this.end || this.bottom);
6650
+
6562
6651
  this.placeholder =
6563
6652
  $('+ .uk-sticky-placeholder', this.$el) ||
6564
6653
  $('<div class="uk-sticky-placeholder"></div>');
@@ -6577,6 +6666,17 @@
6577
6666
  },
6578
6667
 
6579
6668
  events: [
6669
+ {
6670
+ name: 'resize',
6671
+
6672
+ el() {
6673
+ return window;
6674
+ },
6675
+
6676
+ handler() {
6677
+ this.$emit('resize');
6678
+ } },
6679
+
6580
6680
  {
6581
6681
  name: 'load hashchange popstate',
6582
6682
 
@@ -6593,7 +6693,7 @@
6593
6693
  return;
6594
6694
  }
6595
6695
 
6596
- fastdom.read(() => {
6696
+ setTimeout(() => {
6597
6697
  const targetOffset = offset($(location.hash));
6598
6698
  const elOffset = offset(this.$el);
6599
6699
 
@@ -6602,8 +6702,8 @@
6602
6702
  window,
6603
6703
  targetOffset.top -
6604
6704
  elOffset.height -
6605
- toPx(this.targetOffset, 'height') -
6606
- toPx(this.offset, 'height'));
6705
+ toPx(this.targetOffset, 'height', this.placeholder) -
6706
+ toPx(this.offset, 'height', this.placeholder));
6607
6707
 
6608
6708
  }
6609
6709
  });
@@ -6633,32 +6733,38 @@
6633
6733
 
6634
6734
  if (hide) {
6635
6735
  this.show();
6636
- fastdom.write(() => css(this.selTarget, 'transition', ''));
6736
+ requestAnimationFrame(() => css(this.selTarget, 'transition', ''));
6637
6737
  }
6638
6738
 
6639
6739
  const referenceElement = this.isFixed ? this.placeholder : this.$el;
6640
6740
  const windowHeight = height(window);
6641
6741
 
6642
6742
  let position = this.position;
6643
- if (position === 'auto' && height$1 > windowHeight) {
6644
- position = 'bottom';
6743
+ if (this.overflowFlip && height$1 > windowHeight) {
6744
+ position = position === 'top' ? 'bottom' : 'top';
6645
6745
  }
6646
6746
 
6647
6747
  let offset$1 = toPx(this.offset, 'height', referenceElement);
6648
- if (position === 'bottom') {
6748
+ if (position === 'bottom' && (height$1 < windowHeight || this.overflowFlip)) {
6649
6749
  offset$1 += windowHeight - height$1;
6650
6750
  }
6651
6751
 
6652
- const overflow = Math.max(0, height$1 + offset$1 - windowHeight);
6752
+ const overflow = this.overflowFlip ?
6753
+ 0 :
6754
+ Math.max(0, height$1 + offset$1 - windowHeight);
6653
6755
  const topOffset = offset(referenceElement).top;
6654
6756
 
6655
- const top = parseProp(this.top, this.$el, topOffset);
6656
- const bottom = parseProp(this.bottom, this.$el, topOffset + height$1, true);
6657
-
6658
- const start = Math.max(top, topOffset) - offset$1;
6659
- const end = bottom ?
6660
- bottom - offset(this.$el).height + overflow - offset$1 :
6661
- getScrollingElement(this.$el).scrollHeight - windowHeight;
6757
+ const start =
6758
+ (this.start === false ?
6759
+ topOffset :
6760
+ parseProp(this.start, this.$el, topOffset)) - offset$1;
6761
+ const end =
6762
+ this.end === false ?
6763
+ document.scrollingElement.scrollHeight - windowHeight :
6764
+ parseProp(this.end, this.$el, topOffset + height$1, true) -
6765
+ offset(this.$el).height +
6766
+ overflow -
6767
+ offset$1;
6662
6768
 
6663
6769
  return {
6664
6770
  start,
@@ -6861,8 +6967,8 @@
6861
6967
  return 0;
6862
6968
  }
6863
6969
 
6864
- if (isString(value) && value.match(/^-?\d/)) {
6865
- return propOffset + toPx(value);
6970
+ if (isNumeric(value) || isString(value) && value.match(/^-?\d/)) {
6971
+ return propOffset + toPx(value, 'height', el, true);
6866
6972
  } else {
6867
6973
  const refElement = value === true ? parent(el) : query(value, el);
6868
6974
  return (
@@ -6874,6 +6980,15 @@
6874
6980
  }
6875
6981
  }
6876
6982
 
6983
+ function coerce(value) {
6984
+ if (value === 'true') {
6985
+ return true;
6986
+ } else if (value === 'false') {
6987
+ return false;
6988
+ }
6989
+ return value;
6990
+ }
6991
+
6877
6992
  var Switcher = {
6878
6993
  mixins: [Lazyload, Swipe, Togglable],
6879
6994
 
@@ -7326,9 +7441,6 @@
7326
7441
  // register components
7327
7442
  each(components$1, (component, name) => UIkit.component(name, component));
7328
7443
 
7329
- // core functionality
7330
- UIkit.use(Core);
7331
-
7332
7444
  boot(UIkit);
7333
7445
 
7334
7446
  const units = ['days', 'hours', 'minutes', 'seconds'];
@@ -9209,7 +9321,9 @@
9209
9321
 
9210
9322
  methods: {
9211
9323
  reset() {
9212
- each(this.getCss(0), (_, prop) => css(this.$el, prop, ''));
9324
+ for (const prop in this.getCss(0)) {
9325
+ css(this.$el, prop, '');
9326
+ }
9213
9327
  },
9214
9328
 
9215
9329
  getCss(percent) {
@@ -9223,12 +9337,16 @@
9223
9337
 
9224
9338
 
9225
9339
  function transformFn(prop, el, stops) {
9226
- const unit = getUnit(stops) || { x: 'px', y: 'px', rotate: 'deg' }[prop] || '';
9340
+ let unit = getUnit(stops) || { x: 'px', y: 'px', rotate: 'deg' }[prop] || '';
9227
9341
  let transformFn;
9228
9342
 
9229
9343
  if (prop === 'x' || prop === 'y') {
9230
9344
  prop = "translate" + ucfirst(prop);
9231
9345
  transformFn = (stop) => toFloat(toFloat(stop).toFixed(unit === 'px' ? 0 : 6));
9346
+ } else if (prop === 'scale') {
9347
+ unit = '';
9348
+ transformFn = (stop) =>
9349
+ getUnit([stop]) ? toPx(stop, 'width', el, true) / el.offsetWidth : stop;
9232
9350
  }
9233
9351
 
9234
9352
  if (stops.length === 1) {
@@ -9825,7 +9943,7 @@
9825
9943
  let left = 0;
9826
9944
  const sets = [];
9827
9945
  const width = dimensions$1(this.list).width;
9828
- for (let i in this.slides) {
9946
+ for (let i = 0; i < this.slides.length; i++) {
9829
9947
  const slideWidth = dimensions$1(this.slides[i]).width;
9830
9948
 
9831
9949
  if (left + slideWidth > width) {
@@ -10542,7 +10660,7 @@
10542
10660
  some((scrollEl) => {
10543
10661
  let { scrollTop: scroll, scrollHeight } = scrollEl;
10544
10662
 
10545
- const { top, bottom, height } = offset(getViewport$1(scrollEl));
10663
+ const { top, bottom, height } = offsetViewport(scrollEl);
10546
10664
 
10547
10665
  if (top < y && top + 35 > y) {
10548
10666
  scroll -= dist;
@@ -10745,10 +10863,12 @@
10745
10863
 
10746
10864
  this.positionAt(this.tooltip, this.$el);
10747
10865
 
10866
+ const [dir, align] = getAlignment(this.tooltip, this.$el, this.pos);
10867
+
10748
10868
  this.origin =
10749
- this.getAxis() === 'y' ?
10750
- flipPosition(this.dir) + "-" + this.align :
10751
- this.align + "-" + flipPosition(this.dir);
10869
+ this.axis === 'y' ?
10870
+ flipPosition(dir) + "-" + align :
10871
+ align + "-" + flipPosition(dir);
10752
10872
  });
10753
10873
 
10754
10874
  this.toggleElement(this.tooltip, true);
@@ -10785,6 +10905,37 @@
10785
10905
  }
10786
10906
  }
10787
10907
 
10908
+ function getAlignment(el, target, _ref) {let [dir, align] = _ref;
10909
+ const elOffset = offset(el);
10910
+ const targetOffset = offset(target);
10911
+ const properties = [
10912
+ ['left', 'right'],
10913
+ ['top', 'bottom']];
10914
+
10915
+
10916
+ for (const props of properties) {
10917
+ if (elOffset[props[0]] >= targetOffset[props[1]]) {
10918
+ dir = props[1];
10919
+ break;
10920
+ }
10921
+ if (elOffset[props[1]] <= targetOffset[props[0]]) {
10922
+ dir = props[0];
10923
+ break;
10924
+ }
10925
+ }
10926
+
10927
+ const props = includes(properties[0], dir) ? properties[1] : properties[0];
10928
+ if (elOffset[props[0]] === targetOffset[props[0]]) {
10929
+ align = props[0];
10930
+ } else if (elOffset[props[1]] === targetOffset[props[1]]) {
10931
+ align = props[1];
10932
+ } else {
10933
+ align = 'center';
10934
+ }
10935
+
10936
+ return [dir, align];
10937
+ }
10938
+
10788
10939
  var upload = {
10789
10940
  props: {
10790
10941
  allow: String,