uikit 3.14.4-dev.0097ef093 → 3.14.4-dev.07daf8fb8

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 (136) hide show
  1. package/CHANGELOG.md +40 -14
  2. package/build/util.js +1 -0
  3. package/dist/css/uikit-core-rtl.css +364 -100
  4. package/dist/css/uikit-core-rtl.min.css +1 -1
  5. package/dist/css/uikit-core.css +364 -100
  6. package/dist/css/uikit-core.min.css +1 -1
  7. package/dist/css/uikit-rtl.css +384 -105
  8. package/dist/css/uikit-rtl.min.css +1 -1
  9. package/dist/css/uikit.css +384 -105
  10. package/dist/css/uikit.min.css +1 -1
  11. package/dist/js/components/countdown.js +1 -1
  12. package/dist/js/components/countdown.min.js +1 -1
  13. package/dist/js/components/filter.js +7 -5
  14. package/dist/js/components/filter.min.js +1 -1
  15. package/dist/js/components/lightbox-panel.js +99 -135
  16. package/dist/js/components/lightbox-panel.min.js +1 -1
  17. package/dist/js/components/lightbox.js +99 -135
  18. package/dist/js/components/lightbox.min.js +1 -1
  19. package/dist/js/components/notification.js +1 -1
  20. package/dist/js/components/notification.min.js +1 -1
  21. package/dist/js/components/parallax.js +4 -5
  22. package/dist/js/components/parallax.min.js +1 -1
  23. package/dist/js/components/slider-parallax.js +4 -5
  24. package/dist/js/components/slider-parallax.min.js +1 -1
  25. package/dist/js/components/slider.js +22 -7
  26. package/dist/js/components/slider.min.js +1 -1
  27. package/dist/js/components/slideshow-parallax.js +4 -5
  28. package/dist/js/components/slideshow-parallax.min.js +1 -1
  29. package/dist/js/components/slideshow.js +22 -7
  30. package/dist/js/components/slideshow.min.js +1 -1
  31. package/dist/js/components/sortable.js +3 -3
  32. package/dist/js/components/sortable.min.js +1 -1
  33. package/dist/js/components/tooltip.js +93 -132
  34. package/dist/js/components/tooltip.min.js +1 -1
  35. package/dist/js/components/upload.js +1 -1
  36. package/dist/js/components/upload.min.js +1 -1
  37. package/dist/js/uikit-core.js +427 -383
  38. package/dist/js/uikit-core.min.js +14 -1
  39. package/dist/js/uikit-icons.js +1 -1
  40. package/dist/js/uikit-icons.min.js +1 -1
  41. package/dist/js/uikit.js +480 -419
  42. package/dist/js/uikit.min.js +14 -1
  43. package/package.json +1 -1
  44. package/src/images/{backgrounds/nav-parent-open.svg → components/nav-parent-icon-large.svg} +0 -0
  45. package/src/images/components/nav-parent-icon.svg +3 -0
  46. package/src/images/components/navbar-parent-icon.svg +3 -0
  47. package/src/images/components/navbar-toggle-icon.svg +22 -3
  48. package/src/js/api/state.js +2 -2
  49. package/src/js/components/filter.js +5 -3
  50. package/src/js/components/sortable.js +2 -3
  51. package/src/js/core/accordion.js +9 -17
  52. package/src/js/core/alert.js +35 -14
  53. package/src/js/core/drop.js +89 -62
  54. package/src/js/core/height-viewport.js +14 -6
  55. package/src/js/core/icon.js +16 -0
  56. package/src/js/core/index.js +2 -0
  57. package/src/js/core/leader.js +2 -2
  58. package/src/js/core/navbar.js +42 -30
  59. package/src/js/core/scroll.js +37 -10
  60. package/src/js/core/sticky.js +8 -9
  61. package/src/js/mixin/media.js +4 -5
  62. package/src/js/mixin/modal.js +9 -6
  63. package/src/js/mixin/position.js +22 -8
  64. package/src/js/mixin/slider-drag.js +20 -8
  65. package/src/js/mixin/style.js +11 -0
  66. package/src/js/mixin/togglable.js +80 -133
  67. package/src/js/util/animation.js +4 -3
  68. package/src/js/util/dimensions.js +6 -6
  69. package/src/js/util/filter.js +3 -7
  70. package/src/js/util/position.js +43 -47
  71. package/src/js/util/style.js +4 -13
  72. package/src/js/util/viewport.js +5 -32
  73. package/src/less/components/_import.less +1 -0
  74. package/src/less/components/drop.less +1 -18
  75. package/src/less/components/dropbar.less +115 -0
  76. package/src/less/components/dropdown.less +16 -16
  77. package/src/less/components/leader.less +1 -1
  78. package/src/less/components/nav.less +218 -59
  79. package/src/less/components/navbar.less +73 -28
  80. package/src/less/components/utility.less +21 -4
  81. package/src/less/theme/_import.less +1 -0
  82. package/src/less/theme/dropbar.less +44 -0
  83. package/src/less/theme/dropdown.less +0 -11
  84. package/src/less/theme/nav.less +45 -7
  85. package/src/less/theme/navbar.less +4 -10
  86. package/src/scss/components/_import.scss +1 -0
  87. package/src/scss/components/drop.scss +1 -18
  88. package/src/scss/components/dropbar.scss +115 -0
  89. package/src/scss/components/dropdown.scss +16 -16
  90. package/src/scss/components/leader.scss +1 -1
  91. package/src/scss/components/nav.scss +167 -47
  92. package/src/scss/components/navbar.scss +61 -28
  93. package/src/scss/components/utility.scss +19 -3
  94. package/src/scss/mixins-theme.scss +92 -24
  95. package/src/scss/mixins.scss +89 -17
  96. package/src/scss/theme/_import.scss +1 -0
  97. package/src/scss/theme/dropbar.scss +44 -0
  98. package/src/scss/theme/dropdown.scss +0 -8
  99. package/src/scss/theme/nav.scss +43 -7
  100. package/src/scss/theme/navbar.scss +4 -7
  101. package/src/scss/variables-theme.scss +61 -14
  102. package/src/scss/variables.scss +50 -11
  103. package/tests/accordion.html +2 -2
  104. package/tests/alert.html +2 -2
  105. package/tests/countdown.html +1 -1
  106. package/tests/drop.html +451 -371
  107. package/tests/dropbar.html +456 -0
  108. package/tests/dropdown.html +26 -401
  109. package/tests/filter.html +9 -12
  110. package/tests/form.html +1 -1
  111. package/tests/index.html +126 -107
  112. package/tests/js/index.js +1 -4
  113. package/tests/lightbox.html +5 -5
  114. package/tests/list.html +8 -8
  115. package/tests/modal.html +13 -13
  116. package/tests/nav.html +117 -75
  117. package/tests/navbar.html +1997 -1138
  118. package/tests/offcanvas.html +17 -21
  119. package/tests/parallax.html +1 -1
  120. package/tests/position.html +13 -24
  121. package/tests/progress.html +9 -9
  122. package/tests/scroll.html +7 -10
  123. package/tests/search.html +5 -5
  124. package/tests/slider.html +6 -5
  125. package/tests/slideshow.html +8 -8
  126. package/tests/sortable.html +6 -8
  127. package/tests/sticky-navbar.html +6 -6
  128. package/tests/sticky.html +8 -8
  129. package/tests/switcher.html +1 -1
  130. package/tests/tab.html +1 -1
  131. package/tests/table.html +7 -7
  132. package/tests/toggle.html +2 -2
  133. package/tests/tooltip.html +1 -1
  134. package/tests/upload.html +11 -11
  135. package/tests/utility.html +19 -0
  136. package/src/images/backgrounds/nav-parent-close.svg +0 -3
package/dist/js/uikit.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.14.4-dev.0097ef093 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
1
+ /*! UIkit 3.14.4-dev.07daf8fb8 | 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
- matches(element, selector) || !!closest(element, selector) :
400
- element === selector || toNode(selector).contains(toNode(element));
395
+ !!closest(element, selector) :
396
+ toNode(selector).contains(toNode(element));
401
397
  }
402
398
 
403
399
  function parents(element, selector) {
@@ -785,18 +781,11 @@
785
781
  return elements[0];
786
782
  }
787
783
 
788
- const propertyRe = /^\s*(["'])?(.*?)\1\s*$/;
789
- function getCssVar(name, element) {if (element === void 0) {element = document.documentElement;}
790
- return css(element, "--uk-" + name).replace(propertyRe, '$2');
791
- }
792
-
793
784
  // https://drafts.csswg.org/cssom/#dom-cssstyledeclaration-setproperty
794
785
  const propName = memoize((name) => vendorPropName(name));
795
786
 
796
- const cssPrefixes = ['webkit', 'moz'];
797
-
798
787
  function vendorPropName(name) {
799
- if (name[0] === '-') {
788
+ if (startsWith(name, '--')) {
800
789
  return name;
801
790
  }
802
791
 
@@ -808,11 +797,8 @@
808
797
  return name;
809
798
  }
810
799
 
811
- let i = cssPrefixes.length,
812
- prefixedName;
813
-
814
- while (i--) {
815
- prefixedName = "-" + cssPrefixes[i] + "-" + name;
800
+ for (const prefix of ['webkit', 'moz']) {
801
+ const prefixedName = "-" + prefix + "-" + name;
816
802
  if (prefixedName in style) {
817
803
  return prefixedName;
818
804
  }
@@ -913,13 +899,14 @@
913
899
  const Transition = {
914
900
  start: transition,
915
901
 
916
- stop(element) {
902
+ async stop(element) {
917
903
  trigger(element, 'transitionend');
918
- return Promise.resolve();
904
+ await Promise.resolve();
919
905
  },
920
906
 
921
- cancel(element) {
907
+ async cancel(element) {
922
908
  trigger(element, 'transitioncanceled');
909
+ await Promise.resolve();
923
910
  },
924
911
 
925
912
  inProgress(element) {
@@ -929,7 +916,7 @@
929
916
 
930
917
  const animationPrefix = 'uk-animation-';
931
918
 
932
- function animate$1(element, animation, duration, origin, out) {if (duration === void 0) {duration = 200;}
919
+ function animate$2(element, animation, duration, origin, out) {if (duration === void 0) {duration = 200;}
933
920
  return Promise.all(
934
921
  toNodes(element).map(
935
922
  (element) =>
@@ -965,10 +952,10 @@
965
952
 
966
953
  const inProgress = new RegExp(animationPrefix + "(enter|leave)");
967
954
  const Animation = {
968
- in: animate$1,
955
+ in: animate$2,
969
956
 
970
957
  out(element, animation, duration, origin) {
971
- return animate$1(element, animation, duration, origin, true);
958
+ return animate$2(element, animation, duration, origin, true);
972
959
  },
973
960
 
974
961
  inProgress(element) {
@@ -1060,13 +1047,13 @@
1060
1047
  }
1061
1048
 
1062
1049
  function offsetPosition(element) {
1063
- const offset = [0, 0];
1064
-
1065
1050
  element = toNode(element);
1066
1051
 
1067
- do {
1068
- offset[0] += element.offsetTop;
1069
- offset[1] += element.offsetLeft;
1052
+ const offset = [element.offsetTop, element.offsetLeft];
1053
+
1054
+ while (element = element.offsetParent) {
1055
+ offset[0] += element.offsetTop + toFloat(css(element, "borderTopWidth"));
1056
+ offset[1] += element.offsetLeft + toFloat(css(element, "borderLeftWidth"));
1070
1057
 
1071
1058
  if (css(element, 'position') === 'fixed') {
1072
1059
  const win = toWindow(element);
@@ -1074,7 +1061,7 @@
1074
1061
  offset[1] += win.scrollX;
1075
1062
  return offset;
1076
1063
  }
1077
- } while (element = element.offsetParent);
1064
+ }
1078
1065
 
1079
1066
  return offset;
1080
1067
  }
@@ -1293,9 +1280,9 @@
1293
1280
  const hasTouch = inBrowser && 'ontouchstart' in window;
1294
1281
  const hasPointerEvents = inBrowser && window.PointerEvent;
1295
1282
 
1296
- const pointerDown = hasPointerEvents ? 'pointerdown' : hasTouch ? 'touchstart' : 'mousedown';
1297
- const pointerMove = hasPointerEvents ? 'pointermove' : hasTouch ? 'touchmove' : 'mousemove';
1298
- const pointerUp = hasPointerEvents ? 'pointerup' : hasTouch ? 'touchend' : 'mouseup';
1283
+ const pointerDown$1 = hasPointerEvents ? 'pointerdown' : hasTouch ? 'touchstart' : 'mousedown';
1284
+ const pointerMove$1 = hasPointerEvents ? 'pointermove' : hasTouch ? 'touchmove' : 'mousemove';
1285
+ const pointerUp$1 = hasPointerEvents ? 'pointerup' : hasTouch ? 'touchend' : 'mouseup';
1299
1286
  const pointerEnter = hasPointerEvents ? 'pointerenter' : hasTouch ? '' : 'mouseenter';
1300
1287
  const pointerLeave = hasPointerEvents ? 'pointerleave' : hasTouch ? '' : 'mouseleave';
1301
1288
  const pointerCancel = hasPointerEvents ? 'pointercancel' : 'touchcancel';
@@ -1795,20 +1782,6 @@
1795
1782
 
1796
1783
  }
1797
1784
 
1798
- function scrollTop(element, top) {
1799
- if (isWindow(element) || isDocument(element)) {
1800
- element = scrollingElement(element);
1801
- } else {
1802
- element = toNode(element);
1803
- }
1804
-
1805
- if (isUndefined(top)) {
1806
- return element.scrollTop;
1807
- } else {
1808
- element.scrollTop = top;
1809
- }
1810
- }
1811
-
1812
1785
  function scrollIntoView(element, _temp) {let { offset: offsetBy = 0 } = _temp === void 0 ? {} : _temp;
1813
1786
  const parents = isVisible(element) ? scrollParents(element) : [];
1814
1787
  return parents.reduce(
@@ -1850,7 +1823,7 @@
1850
1823
  (function step() {
1851
1824
  const percent = ease(clamp((Date.now() - start) / duration));
1852
1825
 
1853
- scrollTop(element, scroll + top * percent);
1826
+ element.scrollTop = scroll + top * percent;
1854
1827
 
1855
1828
  // scroll more if we have not reached our destination
1856
1829
  if (percent === 1) {
@@ -1913,12 +1886,10 @@
1913
1886
  function offsetViewport(scrollElement) {
1914
1887
  const window = toWindow(scrollElement);
1915
1888
  const {
1916
- document: { body, documentElement } } =
1889
+ document: { documentElement } } =
1917
1890
  window;
1918
1891
  let viewportElement =
1919
- scrollElement === scrollingElement(scrollElement) || scrollElement === body ?
1920
- window :
1921
- scrollElement;
1892
+ scrollElement === scrollingElement(scrollElement) ? window : scrollElement;
1922
1893
 
1923
1894
  const { visualViewport } = window;
1924
1895
  if (isWindow(viewportElement) && visualViewport) {
@@ -1937,7 +1908,7 @@
1937
1908
  // iOS 12 returns <body> as scrollingElement
1938
1909
  viewportElement = documentElement;
1939
1910
  } else {
1940
- rect[start] += toFloat(css(viewportElement, "border" + ucfirst(start) + "Width"));
1911
+ rect[start] += toFloat(css(viewportElement, "border-" + start + "-width"));
1941
1912
  }
1942
1913
  rect[prop] = rect[dir] = viewportElement["client" + ucfirst(prop)];
1943
1914
  rect[end] = rect[prop] + rect[start];
@@ -1965,11 +1936,11 @@
1965
1936
  ...options };
1966
1937
 
1967
1938
 
1968
- const dim = options.flip ?
1969
- attachToWithFlip(element, target, options) :
1970
- attachTo(element, target, options);
1939
+ if (!isArray(target)) {
1940
+ target = [target, target];
1941
+ }
1971
1942
 
1972
- offset(element, dim);
1943
+ offset(element, getPosition(element, target, options));
1973
1944
  }
1974
1945
 
1975
1946
  function attachTo(element, target, options) {
@@ -1984,8 +1955,11 @@
1984
1955
 
1985
1956
 
1986
1957
  const position = offset(element);
1987
- const targetOffset = offset(target);
1958
+
1988
1959
  for (const [i, [prop, dir, start, end]] of Object.entries(dirs)) {
1960
+ const targetOffset =
1961
+ attach.target[i] === attach.element[i] ? offsetViewport(target[i]) : offset(target[i]);
1962
+
1989
1963
  position[start] = position[dir] =
1990
1964
  targetOffset[start] +
1991
1965
  moveBy(attach.target[i], end, targetOffset[prop]) -
@@ -2000,60 +1974,54 @@
2000
1974
  return start === 'center' ? dim / 2 : start === end ? dim : 0;
2001
1975
  }
2002
1976
 
2003
- function attachToWithFlip(element, target, options) {
1977
+ function getPosition(element, target, options) {
2004
1978
  const position = attachTo(element, target, options);
2005
- const targetDim = offset(target);
2006
1979
 
2007
1980
  let {
2008
1981
  flip,
1982
+ shift,
2009
1983
  attach: { element: elAttach, target: targetAttach },
2010
1984
  offset: elOffset,
2011
1985
  boundary,
2012
- viewport,
2013
1986
  viewportOffset } =
2014
1987
  options;
2015
1988
 
2016
- let viewports = scrollParents(element);
2017
- if (boundary === target) {
2018
- viewports = viewports.filter((viewport) => viewport !== boundary);
1989
+ if (!flip && !shift) {
1990
+ return position;
2019
1991
  }
2020
- const [scrollElement] = viewports;
2021
- viewports.push(viewport);
2022
1992
 
2023
1993
  const offsetPosition = { ...position };
2024
1994
  for (const [i, [prop, dir, start, end]] of Object.entries(dirs)) {
2025
- if (flip !== true && !includes(flip, dir)) {
2026
- continue;
2027
- }
2028
-
2029
- const willFlip =
2030
- !intersectLine(position, targetDim, i) && intersectLine(position, targetDim, 1 - i);
1995
+ let viewports = scrollParents(target[i]);
1996
+ const [scrollElement] = viewports;
2031
1997
 
2032
- viewport = getIntersectionArea(...viewports.filter(Boolean).map(offsetViewport));
1998
+ let viewport = getIntersectionArea(...viewports.map(offsetViewport));
2033
1999
 
2034
2000
  if (viewportOffset) {
2035
2001
  viewport[start] += viewportOffset;
2036
2002
  viewport[end] -= viewportOffset;
2037
2003
  }
2038
2004
 
2039
- if (boundary && !willFlip && position[prop] <= offset(boundary)[prop]) {
2040
- viewport = getIntersectionArea(viewport, offset(boundary));
2005
+ if (boundary) {
2006
+ viewport = getIntersectionArea(viewport, offsetViewport(boundary));
2041
2007
  }
2042
2008
 
2043
- const isInStartBoundary = position[start] >= viewport[start];
2044
- const isInEndBoundary = position[end] <= viewport[end];
2009
+ const isInStartViewport = position[start] >= viewport[start];
2010
+ const isInEndViewport = position[end] <= viewport[end];
2045
2011
 
2046
- if (isInStartBoundary && isInEndBoundary) {
2012
+ if (isInStartViewport && isInEndViewport) {
2047
2013
  continue;
2048
2014
  }
2049
2015
 
2050
- let offsetBy;
2016
+ let offsetBy = 0;
2017
+ const targetDim = offset(target[i]);
2051
2018
 
2052
2019
  // Flip
2053
- if (willFlip) {
2020
+ if (!intersectLine(position, targetDim, i) && intersectLine(position, targetDim, 1 - i)) {
2054
2021
  if (
2055
- elAttach[i] === end && isInStartBoundary ||
2056
- elAttach[i] === start && isInEndBoundary)
2022
+ !flip ||
2023
+ elAttach[i] === end && isInStartViewport ||
2024
+ elAttach[i] === start && isInEndViewport)
2057
2025
  {
2058
2026
  continue;
2059
2027
  }
@@ -2090,26 +2058,25 @@
2090
2058
  return false;
2091
2059
  }
2092
2060
 
2093
- if (flip === true || includes(flip, dirs[1 - i][1])) {
2094
- const newPos = attachToWithFlip(element, target, {
2095
- ...options,
2096
- attach: {
2097
- element: elAttach.map(flipDir).reverse(),
2098
- target: targetAttach.map(flipDir).reverse() },
2061
+ const newPos = getPosition(element, target, {
2062
+ ...options,
2063
+ attach: {
2064
+ element: elAttach.map(flipDir).reverse(),
2065
+ target: targetAttach.map(flipDir).reverse() },
2099
2066
 
2100
- offset: elOffset.reverse(),
2101
- flip: flip === true ? flip : [...flip, dirs[1 - i][1]],
2102
- recursion: true });
2067
+ offset: elOffset.reverse(),
2068
+ recursion: true });
2103
2069
 
2104
2070
 
2105
- if (newPos && isInScrollArea(newPos, scrollElement, 1 - i)) {
2106
- return newPos;
2107
- }
2071
+ if (newPos && isInScrollArea(newPos, scrollElement, 1 - i)) {
2072
+ return newPos;
2108
2073
  }
2074
+
2075
+ continue;
2109
2076
  }
2110
2077
 
2111
- // Move
2112
- } else {
2078
+ // Shift
2079
+ } else if (shift) {
2113
2080
  offsetBy =
2114
2081
  clamp(
2115
2082
  clamp(position[start], viewport[start], viewport[end] - position[prop]),
@@ -2165,7 +2132,7 @@
2165
2132
  getImage: getImage,
2166
2133
  transition: transition,
2167
2134
  Transition: Transition,
2168
- animate: animate$1,
2135
+ animate: animate$2,
2169
2136
  Animation: Animation,
2170
2137
  attr: attr,
2171
2138
  hasAttr: hasAttr,
@@ -2205,9 +2172,9 @@
2205
2172
  inBrowser: inBrowser,
2206
2173
  isRtl: isRtl,
2207
2174
  hasTouch: hasTouch,
2208
- pointerDown: pointerDown,
2209
- pointerMove: pointerMove,
2210
- pointerUp: pointerUp,
2175
+ pointerDown: pointerDown$1,
2176
+ pointerMove: pointerMove$1,
2177
+ pointerUp: pointerUp$1,
2211
2178
  pointerEnter: pointerEnter,
2212
2179
  pointerLeave: pointerLeave,
2213
2180
  pointerCancel: pointerCancel,
@@ -2295,10 +2262,8 @@
2295
2262
  findAll: findAll,
2296
2263
  escape: escape,
2297
2264
  css: css,
2298
- getCssVar: getCssVar,
2299
2265
  propName: propName,
2300
2266
  isInView: isInView,
2301
- scrollTop: scrollTop,
2302
2267
  scrollIntoView: scrollIntoView,
2303
2268
  scrolledOver: scrolledOver,
2304
2269
  scrollParents: scrollParents,
@@ -2621,7 +2586,7 @@
2621
2586
 
2622
2587
  value = props[key] === Boolean && value === '' ? true : coerce$1(props[key], value);
2623
2588
 
2624
- if (prop === 'target' && (!value || startsWith(value, '_'))) {
2589
+ if (prop === 'target' && startsWith(value, '_')) {
2625
2590
  continue;
2626
2591
  }
2627
2592
 
@@ -2632,7 +2597,7 @@
2632
2597
 
2633
2598
  for (const key in options) {
2634
2599
  const prop = camelize(key);
2635
- if (props[prop] !== undefined) {
2600
+ if (!isUndefined(props[prop])) {
2636
2601
  data$1[prop] = coerce$1(props[prop], options[key]);
2637
2602
  }
2638
2603
  }
@@ -2961,7 +2926,7 @@
2961
2926
  UIkit.data = '__uikit__';
2962
2927
  UIkit.prefix = 'uk-';
2963
2928
  UIkit.options = {};
2964
- UIkit.version = '3.14.4-dev.0097ef093';
2929
+ UIkit.version = '3.14.4-dev.07daf8fb8';
2965
2930
 
2966
2931
  globalAPI(UIkit);
2967
2932
  hooksAPI(UIkit);
@@ -3066,27 +3031,7 @@
3066
3031
  origin: false,
3067
3032
  transition: 'ease',
3068
3033
  clsEnter: 'uk-togglabe-enter',
3069
- clsLeave: 'uk-togglabe-leave',
3070
-
3071
- initProps: {
3072
- overflow: '',
3073
- maxHeight: '',
3074
- paddingTop: '',
3075
- paddingBottom: '',
3076
- marginTop: '',
3077
- marginBottom: '',
3078
- boxShadow: '' },
3079
-
3080
-
3081
- hideProps: {
3082
- overflow: 'hidden',
3083
- maxHeight: 0,
3084
- paddingTop: 0,
3085
- paddingBottom: 0,
3086
- marginTop: 0,
3087
- marginBottom: 0,
3088
- boxShadow: 'none' } },
3089
-
3034
+ clsLeave: 'uk-togglabe-leave' },
3090
3035
 
3091
3036
 
3092
3037
  computed: {
@@ -3095,7 +3040,7 @@
3095
3040
  },
3096
3041
 
3097
3042
  hasTransition(_ref2) {let { animation } = _ref2;
3098
- return startsWith(animation[0], 'slide');
3043
+ return ['slide', 'reveal'].some((transition) => startsWith(animation[0], transition));
3099
3044
  } },
3100
3045
 
3101
3046
 
@@ -3188,130 +3133,97 @@
3188
3133
  };
3189
3134
  }
3190
3135
 
3191
- function toggleTransition(cmp) {
3192
- switch (cmp.animation[0]) {
3193
- case 'slide-left':
3194
- return slideHorizontal(cmp);
3195
- case 'slide-right':
3196
- return slideHorizontal(cmp, true);}
3197
-
3198
- return slide$1(cmp);
3199
- }
3200
-
3201
- function slide$1(_ref4)
3202
-
3203
-
3136
+ function toggleTransition(cmp) {var _cmp$animation$;
3137
+ const [mode = 'reveal', startProp = 'top'] = ((_cmp$animation$ = cmp.animation[0]) == null ? void 0 : _cmp$animation$.split('-')) || [];
3204
3138
 
3139
+ const dirs = [
3140
+ ['left', 'right'],
3141
+ ['top', 'bottom']];
3205
3142
 
3143
+ const dir = dirs[includes(dirs[0], startProp) ? 0 : 1];
3144
+ const end = dir[1] === startProp;
3145
+ const props = ['width', 'height'];
3146
+ const dimProp = props[dirs.indexOf(dir)];
3147
+ const marginProp = "margin-" + dir[0];
3148
+ const marginStartProp = "margin-" + startProp;
3206
3149
 
3150
+ return async (el, show) => {
3151
+ let { duration, velocity, transition, _toggle } = cmp;
3207
3152
 
3153
+ let currentDim = dimensions$1(el)[dimProp];
3208
3154
 
3209
- {let { isToggled, duration, velocity, initProps, hideProps, transition, _toggle } = _ref4;
3210
- return (el, show) => {
3211
3155
  const inProgress = Transition.inProgress(el);
3212
- const inner =
3213
- !inProgress && el.hasChildNodes() ?
3214
- toFloat(css(el.firstElementChild, 'marginTop')) +
3215
- toFloat(css(el.lastElementChild, 'marginBottom')) :
3216
- 0;
3217
- const currentHeight = isVisible(el) ? toFloat(css(el, 'height')) + inner : 0;
3218
-
3219
- const props = inProgress ? css(el, Object.keys(initProps)) : show ? hideProps : initProps;
3220
-
3221
- Transition.cancel(el);
3156
+ await Transition.cancel(el);
3222
3157
 
3223
- if (!isToggled(el)) {
3158
+ if (show) {
3224
3159
  _toggle(el, true);
3225
3160
  }
3226
3161
 
3227
- css(el, 'maxHeight', '');
3228
-
3229
- // Update child components first
3230
- fastdom.flush();
3162
+ const prevProps = Object.fromEntries(
3163
+ ['padding', 'border', 'width', 'height', 'overflow', marginProp, marginStartProp].map(
3164
+ (key) => [key, el.style[key]]));
3231
3165
 
3232
- const endHeight = toFloat(css(el, 'height')) + inner;
3233
- duration = velocity * endHeight + duration;
3234
3166
 
3235
- css(el, { ...props, maxHeight: currentHeight });
3236
3167
 
3237
- return (
3238
- show ?
3239
- Transition.start(
3240
- el,
3241
- { ...initProps, overflow: 'hidden', maxHeight: endHeight },
3242
- duration * (1 - currentHeight / endHeight),
3243
- transition) :
3168
+ const dim = dimensions$1(el);
3169
+ const currentMargin = toFloat(css(el, marginProp));
3170
+ const marginStart = toFloat(css(el, marginStartProp));
3171
+ const endDim = dim[dimProp] + marginStart;
3244
3172
 
3245
- Transition.start(
3246
- el,
3247
- hideProps,
3248
- duration * (currentHeight / endHeight),
3249
- transition).
3250
- then(() => _toggle(el, false))).
3251
- then(() => css(el, initProps));
3252
- };
3253
- }
3254
-
3255
- function slideHorizontal(_ref5, right) {let { isToggled, duration, velocity, transition, _toggle } = _ref5;
3256
- return (el, show) => {
3257
- const visible = isVisible(el);
3258
- const marginLeft = toFloat(css(el, 'marginLeft'));
3259
-
3260
- Transition.cancel(el);
3261
-
3262
- const [scrollElement] = scrollParents(el);
3263
- css(scrollElement, 'overflowX', 'hidden');
3264
-
3265
- if (!isToggled(el)) {
3266
- _toggle(el, true);
3173
+ if (!inProgress && !show) {
3174
+ currentDim += marginStart;
3267
3175
  }
3268
3176
 
3269
- const width = toFloat(css(el, 'width'));
3270
- duration = velocity * width + duration;
3177
+ const [wrapper] = wrapInner(el, '<div>');
3178
+ css(wrapper, {
3179
+ boxSizing: 'border-box',
3180
+ height: dim.height,
3181
+ width: dim.width,
3182
+ ...css(el, [
3183
+ 'padding',
3184
+ 'borderTop',
3185
+ 'borderRight',
3186
+ 'borderBottom',
3187
+ 'borderLeft',
3188
+ 'borderImage',
3189
+ marginStartProp]) });
3271
3190
 
3272
- const percent = visible ? (width + marginLeft * (right ? -1 : 1)) / width * 100 : 0;
3273
- const offsetEl = offset(el);
3274
- const useClipPath = right ?
3275
- offsetEl.right < scrollElement.clientWidth :
3276
- Math.round(offsetEl.left) > 0;
3277
3191
 
3278
- css(el, {
3279
- clipPath: useClipPath ?
3280
- right ? "polygon(0 0," +
3281
- percent + "% 0," + percent + "% 100%,0 100%)" : "polygon(" + (
3282
- 100 - percent) + "% 0,100% 0,100% 100%," + (100 - percent) + "% 100%)" :
3283
- '',
3284
- marginLeft: (100 - percent) * (right ? 1 : -1) / 100 * width });
3285
3192
 
3193
+ css(el, {
3194
+ padding: 0,
3195
+ border: 0,
3196
+ [marginStartProp]: 0,
3197
+ width: dim.width,
3198
+ height: dim.height,
3199
+ overflow: 'hidden',
3200
+ [dimProp]: currentDim });
3286
3201
 
3287
- return (
3288
- show ?
3289
- Transition.start(
3290
- el,
3291
- {
3292
- clipPath: useClipPath ? "polygon(0 0,100% 0,100% 100%,0 100%)" : '',
3293
- marginLeft: 0 },
3294
3202
 
3295
- duration * (1 - percent / 100),
3296
- transition) :
3203
+ const percent = currentDim / endDim;
3204
+ duration = (velocity * endDim + duration) * (show ? 1 - percent : percent);
3205
+ const endProps = { [dimProp]: show ? endDim : 0 };
3297
3206
 
3298
- Transition.start(
3299
- el,
3300
- {
3301
- clipPath: useClipPath ?
3302
- right ? "polygon(0 0,0 0,0 100%,0 100%)" : "polygon(100% 0,100% 0,100% 100%,100% 100%)" :
3207
+ if (end) {
3208
+ css(el, marginProp, endDim - currentDim + currentMargin);
3209
+ endProps[marginProp] = show ? currentMargin : endDim + currentMargin;
3210
+ }
3303
3211
 
3212
+ if (!end ^ mode === 'reveal') {
3213
+ css(wrapper, marginProp, -endDim + currentDim);
3214
+ Transition.start(wrapper, { [marginProp]: show ? 0 : -endDim }, duration, transition);
3215
+ }
3304
3216
 
3305
- '',
3306
- marginLeft: (right ? 1 : -1) * width },
3217
+ try {
3218
+ await Transition.start(el, endProps, duration, transition);
3219
+ } finally {
3220
+ css(el, prevProps);
3221
+ unwrap(wrapper.firstChild);
3307
3222
 
3308
- duration * (percent / 100),
3309
- transition).
3310
- then(() => _toggle(el, false))).
3311
- then(() => {
3312
- css(scrollElement, 'overflowX', '');
3313
- css(el, { clipPath: '', marginLeft: '' });
3314
- });
3223
+ if (!show) {
3224
+ _toggle(el, false);
3225
+ }
3226
+ }
3315
3227
  };
3316
3228
  }
3317
3229
 
@@ -3336,6 +3248,7 @@
3336
3248
  mixins: [Class, Lazyload, Togglable],
3337
3249
 
3338
3250
  props: {
3251
+ animation: Boolean,
3339
3252
  targets: String,
3340
3253
  active: null,
3341
3254
  collapsible: Boolean,
@@ -3348,7 +3261,7 @@
3348
3261
  data: {
3349
3262
  targets: '> *',
3350
3263
  active: false,
3351
- animation: ['slide'],
3264
+ animation: true,
3352
3265
  collapsible: true,
3353
3266
  multiple: false,
3354
3267
  clsOpen: 'uk-open',
@@ -3394,7 +3307,7 @@
3394
3307
  hide(
3395
3308
  el,
3396
3309
  !hasClass(
3397
- this.items.find((item) => item.contains(el)),
3310
+ this.items.find((item) => within(el, item)),
3398
3311
  this.clsOpen));
3399
3312
 
3400
3313
 
@@ -3446,23 +3359,15 @@
3446
3359
  toggleClass(el, this.clsOpen, show);
3447
3360
  attr($(this.$props.toggle, el), 'aria-expanded', show);
3448
3361
 
3449
- const content = $("" + (el._wrapper ? '> * ' : '') + this.content, el);
3362
+ const content = $(this.content, el);
3450
3363
 
3451
- if (animate === false || !this.hasTransition) {
3364
+ if (animate === false || !this.animation) {
3365
+ content.hidden = !show;
3452
3366
  hide(content, !show);
3453
3367
  return;
3454
3368
  }
3455
3369
 
3456
- if (!el._wrapper) {
3457
- el._wrapper = wrapAll(content, "<div" + (show ? ' hidden' : '') + ">");
3458
- }
3459
-
3460
- hide(content, false);
3461
- await slide$1(this)(el._wrapper, show);
3462
- hide(content, !show);
3463
-
3464
- delete el._wrapper;
3465
- unwrap(content);
3370
+ await toggleTransition(this)(content, show);
3466
3371
 
3467
3372
  if (show) {
3468
3373
  const toggle = $(this.$props.toggle, el);
@@ -3488,18 +3393,17 @@
3488
3393
  args: 'animation',
3489
3394
 
3490
3395
  props: {
3396
+ animation: Boolean,
3491
3397
  close: String },
3492
3398
 
3493
3399
 
3494
3400
  data: {
3495
- animation: ['slide'],
3401
+ animation: true,
3496
3402
  selClose: '.uk-alert-close',
3497
- duration: 150,
3498
- hideProps: { opacity: 0, ...Togglable.data.hideProps } },
3403
+ duration: 150 },
3499
3404
 
3500
3405
 
3501
- events: [
3502
- {
3406
+ events: {
3503
3407
  name: 'click',
3504
3408
 
3505
3409
  delegate() {
@@ -3509,16 +3413,39 @@
3509
3413
  handler(e) {
3510
3414
  e.preventDefault();
3511
3415
  this.close();
3512
- } }],
3513
-
3416
+ } },
3514
3417
 
3515
3418
 
3516
3419
  methods: {
3517
3420
  async close() {
3518
- await this.toggleElement(this.$el);
3421
+ await this.toggleElement(this.$el, false, animate$1(this));
3519
3422
  this.$destroy(true);
3520
3423
  } } };
3521
3424
 
3425
+
3426
+
3427
+ function animate$1(_ref) {let { duration, transition, velocity } = _ref;
3428
+ return (el) => {
3429
+ const height = toFloat(css(el, 'height'));
3430
+ css(el, 'height', height);
3431
+ return Transition.start(
3432
+ el,
3433
+ {
3434
+ height: 0,
3435
+ marginTop: 0,
3436
+ marginBottom: 0,
3437
+ paddingTop: 0,
3438
+ paddingBottom: 0,
3439
+ borderTop: 0,
3440
+ borderBottom: 0,
3441
+ opacity: 0 },
3442
+
3443
+ velocity * height + duration,
3444
+ transition);
3445
+
3446
+ };
3447
+ }
3448
+
3522
3449
  var Video = {
3523
3450
  args: 'autoplay',
3524
3451
 
@@ -3667,13 +3594,17 @@
3667
3594
  props: {
3668
3595
  pos: String,
3669
3596
  offset: null,
3670
- flip: Boolean },
3597
+ flip: Boolean,
3598
+ shift: Boolean,
3599
+ inset: Boolean },
3671
3600
 
3672
3601
 
3673
3602
  data: {
3674
3603
  pos: "bottom-" + (isRtl ? 'right' : 'left'),
3604
+ offset: false,
3675
3605
  flip: true,
3676
- offset: false },
3606
+ shift: true,
3607
+ inset: false },
3677
3608
 
3678
3609
 
3679
3610
  connected() {
@@ -3687,7 +3618,7 @@
3687
3618
  let offset = [this.getPositionOffset(element), this.getShiftOffset(element)];
3688
3619
 
3689
3620
  const attach = {
3690
- element: [flipPosition(this.dir), this.align],
3621
+ element: [this.inset ? this.dir : flipPosition(this.dir), this.align],
3691
3622
  target: [this.dir, this.align] };
3692
3623
 
3693
3624
 
@@ -3698,6 +3629,9 @@
3698
3629
  offset = offset.reverse();
3699
3630
  }
3700
3631
 
3632
+ const [scrollElement] = scrollParents(element, /auto|scroll/);
3633
+ const { scrollTop, scrollLeft } = scrollElement;
3634
+
3701
3635
  // Ensure none positioned element does not generate scrollbars
3702
3636
  const elDim = dimensions$1(element);
3703
3637
  css(element, { top: -elDim.height, left: -elDim.width });
@@ -3707,34 +3641,50 @@
3707
3641
  offset,
3708
3642
  boundary,
3709
3643
  flip: this.flip,
3644
+ shift: this.shift,
3710
3645
  viewportOffset: this.getViewportOffset(element) });
3711
3646
 
3647
+
3648
+ // Restore scroll position
3649
+ scrollElement.scrollTop = scrollTop;
3650
+ scrollElement.scrollLeft = scrollLeft;
3712
3651
  },
3713
3652
 
3714
3653
  getPositionOffset(element) {
3715
3654
  return (
3716
3655
  toPx(
3717
- this.offset === false ? getCssVar('position-offset', element) : this.offset,
3656
+ this.offset === false ? css(element, '--uk-position-offset') : this.offset,
3718
3657
  this.axis === 'x' ? 'width' : 'height',
3719
3658
  element) * (
3720
- includes(['left', 'top'], this.dir) ? -1 : 1));
3659
+
3660
+ includes(['left', 'top'], this.dir) ? -1 : 1) * (
3661
+ this.inset ? -1 : 1));
3721
3662
 
3722
3663
  },
3723
3664
 
3724
3665
  getShiftOffset(element) {
3725
- return includes(['center', 'justify', 'stretch'], this.align) ?
3666
+ return this.align === 'center' ?
3726
3667
  0 :
3727
3668
  toPx(
3728
- getCssVar('position-shift-offset', element),
3669
+ css(element, '--uk-position-shift-offset'),
3729
3670
  this.axis === 'y' ? 'width' : 'height',
3730
3671
  element) * (
3731
3672
  includes(['left', 'top'], this.align) ? 1 : -1);
3732
3673
  },
3733
3674
 
3734
3675
  getViewportOffset(element) {
3735
- return toPx(getCssVar('position-viewport-offset', element));
3676
+ return toPx(css(element, '--uk-position-viewport-offset'));
3736
3677
  } } };
3737
3678
 
3679
+ var Style = {
3680
+ beforeConnect() {
3681
+ this._style = attr(this.$el, 'style');
3682
+ },
3683
+
3684
+ disconnected() {
3685
+ attr(this.$el, 'style', this._style);
3686
+ } };
3687
+
3738
3688
  const active$1 = [];
3739
3689
 
3740
3690
  var Modal = {
@@ -3844,8 +3794,8 @@
3844
3794
 
3845
3795
 
3846
3796
  if (this.overlay) {
3847
- once(this.$el, 'hide', preventOverscroll(this.$el));
3848
- once(this.$el, 'hide', preventBackgroundScroll());
3797
+ once(this.$el, 'hidden', preventOverscroll(this.$el));
3798
+ once(this.$el, 'hidden', preventBackgroundScroll());
3849
3799
  }
3850
3800
 
3851
3801
  if (this.stack) {
@@ -3858,7 +3808,7 @@
3858
3808
  once(
3859
3809
  this.$el,
3860
3810
  'hide',
3861
- on(document, pointerDown, (_ref3) => {let { target } = _ref3;
3811
+ on(document, pointerDown$1, (_ref3) => {let { target } = _ref3;
3862
3812
  if (
3863
3813
  last(active$1) !== this ||
3864
3814
  this.overlay && !within(target, this.$el) ||
@@ -3869,11 +3819,11 @@
3869
3819
 
3870
3820
  once(
3871
3821
  document,
3872
- pointerUp + " " + pointerCancel + " scroll",
3822
+ pointerUp$1 + " " + pointerCancel + " scroll",
3873
3823
  (_ref4) => {let { defaultPrevented, type, target: newTarget } = _ref4;
3874
3824
  if (
3875
3825
  !defaultPrevented &&
3876
- type === pointerUp &&
3826
+ type === pointerUp$1 &&
3877
3827
  target === newTarget)
3878
3828
  {
3879
3829
  this.hide();
@@ -3927,10 +3877,6 @@
3927
3877
  active$1.splice(active$1.indexOf(this), 1);
3928
3878
  }
3929
3879
 
3930
- if (!active$1.length) {
3931
- css(document.body, 'overflowY', '');
3932
- }
3933
-
3934
3880
  css(this.$el, 'zIndex', '');
3935
3881
 
3936
3882
  if (!active$1.some((modal) => modal.clsPage === this.clsPage)) {
@@ -4047,7 +3993,12 @@
4047
3993
  return () => events.forEach((fn) => fn());
4048
3994
  }
4049
3995
 
3996
+ let prevented;
4050
3997
  function preventBackgroundScroll() {
3998
+ if (prevented) {
3999
+ return noop;
4000
+ }
4001
+ prevented = true;
4051
4002
  const { body, documentElement } = document;
4052
4003
  css(body, {
4053
4004
  overflowY: width(window) > documentElement.clientWidth ? 'scroll' : '',
@@ -4055,6 +4006,7 @@
4055
4006
 
4056
4007
  css(documentElement, 'overflowY', 'hidden');
4057
4008
  return () => {
4009
+ prevented = false;
4058
4010
  css(documentElement, 'overflowY', '');
4059
4011
  css(body, { overflowY: '', touchAction: '' });
4060
4012
  };
@@ -4073,7 +4025,7 @@
4073
4025
  let active;
4074
4026
 
4075
4027
  var drop = {
4076
- mixins: [Container, Lazyload, Position, Togglable],
4028
+ mixins: [Container, Lazyload, Position, Style, Togglable],
4077
4029
 
4078
4030
  args: 'pos',
4079
4031
 
@@ -4081,7 +4033,10 @@
4081
4033
  mode: 'list',
4082
4034
  toggle: Boolean,
4083
4035
  boundary: Boolean,
4084
- boundaryAlign: Boolean,
4036
+ target: Boolean,
4037
+ targetX: Boolean,
4038
+ targetY: Boolean,
4039
+ stretch: Boolean,
4085
4040
  delayShow: Number,
4086
4041
  delayHide: Number,
4087
4042
  display: String,
@@ -4093,17 +4048,32 @@
4093
4048
  data: {
4094
4049
  mode: ['click', 'hover'],
4095
4050
  toggle: '- *',
4096
- boundary: true,
4097
- boundaryAlign: false,
4051
+ boundary: false,
4052
+ target: false,
4053
+ targetX: false,
4054
+ targetY: false,
4055
+ stretch: false,
4098
4056
  delayShow: 0,
4099
4057
  delayHide: 800,
4100
4058
  display: null,
4101
4059
  clsDrop: false,
4060
+ animateOut: false,
4061
+ bgScroll: true,
4102
4062
  animation: ['uk-animation-fade'],
4103
4063
  cls: 'uk-open',
4104
- container: false,
4105
- animateOut: false,
4106
- bgScroll: true },
4064
+ container: false },
4065
+
4066
+
4067
+ computed: {
4068
+ target(_ref, $el) {let { target, targetX, targetY } = _ref;
4069
+ targetX = targetX || target || this.targetEl;
4070
+ targetY = targetY || target || this.targetEl;
4071
+
4072
+ return [
4073
+ targetX === true ? window : query(targetX, $el),
4074
+ targetY === true ? window : query(targetY, $el)];
4075
+
4076
+ } },
4107
4077
 
4108
4078
 
4109
4079
  created() {
@@ -4117,13 +4087,13 @@
4117
4087
  connected() {
4118
4088
  addClass(this.$el, this.clsDrop);
4119
4089
 
4120
- if (this.toggle && !this.target) {
4121
- this.target = this.$create('toggle', query(this.toggle, this.$el), {
4090
+ if (this.toggle && !this.targetEl) {
4091
+ this.targetEl = this.$create('toggle', query(this.toggle, this.$el), {
4122
4092
  target: this.$el,
4123
4093
  mode: this.mode }).
4124
4094
  $el;
4125
- attr(this.target, 'aria-haspopup', true);
4126
- this.lazyload(this.target);
4095
+ attr(this.targetEl, 'aria-haspopup', true);
4096
+ this.lazyload(this.targetEl);
4127
4097
  }
4128
4098
  },
4129
4099
 
@@ -4154,7 +4124,7 @@
4154
4124
  return 'a[href^="#"]';
4155
4125
  },
4156
4126
 
4157
- handler(_ref) {let { defaultPrevented, current: { hash } } = _ref;
4127
+ handler(_ref2) {let { defaultPrevented, current: { hash } } = _ref2;
4158
4128
  if (!defaultPrevented && hash && !within(hash, this.$el)) {
4159
4129
  this.hide(false);
4160
4130
  }
@@ -4265,18 +4235,18 @@
4265
4235
  for (const handler of [
4266
4236
  on(
4267
4237
  document,
4268
- pointerDown,
4269
- (_ref2) => {let { target } = _ref2;return (
4238
+ pointerDown$1,
4239
+ (_ref3) => {let { target } = _ref3;return (
4270
4240
  !within(target, this.$el) &&
4271
4241
  once(
4272
4242
  document,
4273
- pointerUp + " " + pointerCancel + " scroll",
4274
- (_ref3) => {let { defaultPrevented, type, target: newTarget } = _ref3;
4243
+ pointerUp$1 + " " + pointerCancel + " scroll",
4244
+ (_ref4) => {let { defaultPrevented, type, target: newTarget } = _ref4;
4275
4245
  if (
4276
4246
  !defaultPrevented &&
4277
- type === pointerUp &&
4247
+ type === pointerUp$1 &&
4278
4248
  target === newTarget &&
4279
- !(this.target && within(target, this.target)))
4249
+ !(this.targetEl && within(target, this.targetEl)))
4280
4250
  {
4281
4251
  this.hide(false);
4282
4252
  }
@@ -4295,13 +4265,13 @@
4295
4265
  [] :
4296
4266
  [preventOverscroll(this.$el), preventBackgroundScroll()]),
4297
4267
 
4298
- ...(this.display === 'static' && this.align !== 'stretch' ?
4268
+ ...(this.display === 'static' ?
4299
4269
  [] :
4300
4270
  (() => {
4301
4271
  const handler = () => this.$emit();
4302
4272
  return [
4303
4273
  on(window, 'resize', handler),
4304
- on(document, 'scroll', handler, true),
4274
+ on([document, scrollParents(this.$el)], 'scroll', handler),
4305
4275
  (() => {
4306
4276
  const observer = observeResize(
4307
4277
  scrollParents(this.$el),
@@ -4330,7 +4300,7 @@
4330
4300
  {
4331
4301
  name: 'hide',
4332
4302
 
4333
- handler(_ref4) {let { target } = _ref4;
4303
+ handler(_ref5) {let { target } = _ref5;
4334
4304
  if (this.$el !== target) {
4335
4305
  active =
4336
4306
  active === null && within(target, this.$el) && this.isToggled() ?
@@ -4354,12 +4324,12 @@
4354
4324
 
4355
4325
 
4356
4326
  methods: {
4357
- show(target, delay) {if (target === void 0) {target = this.target;}if (delay === void 0) {delay = true;}
4358
- if (this.isToggled() && target && this.target && target !== this.target) {
4327
+ show(target, delay) {if (target === void 0) {target = this.targetEl;}if (delay === void 0) {delay = true;}
4328
+ if (this.isToggled() && target && this.targetEl && target !== this.targetEl) {
4359
4329
  this.hide(false, false);
4360
4330
  }
4361
4331
 
4362
- this.target = target;
4332
+ this.targetEl = target;
4363
4333
 
4364
4334
  this.clearTimers();
4365
4335
 
@@ -4422,60 +4392,69 @@
4422
4392
 
4423
4393
  position() {
4424
4394
  removeClass(this.$el, this.clsDrop + "-stack");
4425
- toggleClass(this.$el, this.clsDrop + "-boundary", this.boundaryAlign);
4426
- toggleClass(this.$el, this.clsDrop + "-stretch", this.align === 'stretch');
4395
+ attr(this.$el, 'style', this._style);
4427
4396
 
4428
- const boundary = query(this.boundary, this.$el);
4429
- const target = boundary && this.boundaryAlign ? boundary : this.target;
4430
- const [scrollParent] = scrollParents(
4431
- boundary && this.boundaryAlign ? boundary : this.$el);
4397
+ // Ensure none positioned element does not generate scrollbars
4398
+ this.$el.hidden = true;
4432
4399
 
4433
- const scrollParentOffset = offset(scrollParent);
4434
- const boundaryOffset = boundary ? offset(boundary) : scrollParentOffset;
4400
+ const boundary = query(this.boundary, this.$el);
4401
+ const boundaryOffset = offsetViewport(boundary || window);
4402
+ const viewports = this.target.map((target) => offsetViewport(scrollParents(target)[0]));
4435
4403
  const viewportOffset = this.getViewportOffset(this.$el);
4436
4404
 
4437
- css(this.$el, 'maxWidth', '');
4438
- const maxWidth = scrollParentOffset.width - 2 * viewportOffset;
4405
+ const dirs = [
4406
+ [0, ['x', 'width', 'left', 'right']],
4407
+ [1, ['y', 'height', 'top', 'bottom']]];
4439
4408
 
4440
- if (this.align === 'justify') {
4441
- const prop = this.axis === 'y' ? 'width' : 'height';
4442
- css(
4443
- this.$el,
4444
- prop,
4445
- Math.min(
4446
- (boundary ? boundaryOffset : offset(this.target))[prop],
4447
- scrollParentOffset[prop] - 2 * viewportOffset));
4448
-
4449
-
4450
- } else if (this.align === 'stretch') {
4451
- this.flip = this.axis === 'y' ? 'x' : 'y';
4452
- this.display = 'static';
4453
-
4454
- const viewport = offsetViewport(scrollParent);
4455
- const targetDim = offset(target);
4456
- const elOffset = Math.abs(this.getPositionOffset(this.$el)) + viewportOffset;
4457
-
4458
- css(this.$el, {
4459
- width:
4460
- this.axis === 'y' ?
4461
- viewport.width :
4462
- (this.dir === 'left' ?
4463
- targetDim.left - viewport.left :
4464
- viewport.right - targetDim.right) - elOffset,
4465
- height:
4466
- this.axis === 'x' ?
4467
- viewport.height :
4468
- (this.dir === 'top' ?
4469
- targetDim.top - viewport.top :
4470
- viewport.bottom - targetDim.bottom) - elOffset });
4471
-
4472
- } else if (this.$el.offsetWidth > maxWidth) {
4409
+
4410
+ for (const [i, [axis, prop]] of dirs) {
4411
+ if (this.axis !== axis && includes([axis, true], this.stretch)) {
4412
+ css(this.$el, {
4413
+ [prop]: Math.min(
4414
+ boundaryOffset[prop],
4415
+ viewports[i][prop] - 2 * viewportOffset),
4416
+
4417
+ ["overflow-" + axis]: 'auto' });
4418
+
4419
+ }
4420
+ }
4421
+
4422
+ const maxWidth = viewports[0].width - 2 * viewportOffset;
4423
+
4424
+ if (this.$el.offsetWidth > maxWidth) {
4473
4425
  addClass(this.$el, this.clsDrop + "-stack");
4474
4426
  }
4475
4427
 
4476
4428
  css(this.$el, 'maxWidth', maxWidth);
4477
4429
 
4478
- this.positionAt(this.$el, target, boundary);
4430
+ this.$el.hidden = false;
4431
+
4432
+ this.positionAt(this.$el, this.target, boundary);
4433
+
4434
+ for (const [i, [axis, prop, start, end]] of dirs) {
4435
+ if (this.axis === axis && includes([axis, true], this.stretch)) {
4436
+ const positionOffset = Math.abs(this.getPositionOffset(this.$el));
4437
+ const targetOffset = offset(this.target[i]);
4438
+ const elOffset = offset(this.$el);
4439
+
4440
+ css(this.$el, {
4441
+ [prop]:
4442
+ (targetOffset[start] > elOffset[start] ?
4443
+ targetOffset[start] -
4444
+ Math.max(
4445
+ boundaryOffset[start],
4446
+ viewports[i][start] + viewportOffset) :
4447
+
4448
+ Math.min(
4449
+ boundaryOffset[end],
4450
+ viewports[i][end] - viewportOffset) -
4451
+ targetOffset[end]) - positionOffset,
4452
+ ["overflow-" + axis]: 'auto' });
4453
+
4454
+
4455
+ this.positionAt(this.$el, this.target, boundary);
4456
+ }
4457
+ }
4479
4458
  } } };
4480
4459
 
4481
4460
 
@@ -4972,8 +4951,11 @@
4972
4951
  let minHeight = '';
4973
4952
  const box = boxModelAdjust(this.$el, 'height', 'content-box');
4974
4953
 
4954
+ const { body, scrollingElement } = document;
4975
4955
  const [scrollElement] = scrollParents(this.$el, /auto|scroll/);
4976
- const { height: viewportHeight } = offsetViewport(scrollElement);
4956
+ const { height: viewportHeight } = offsetViewport(
4957
+ scrollElement === body ? scrollingElement : scrollElement);
4958
+
4977
4959
 
4978
4960
  if (this.expand) {
4979
4961
  minHeight = Math.max(
@@ -4983,14 +4965,19 @@
4983
4965
  0);
4984
4966
 
4985
4967
  } else {
4986
- // on mobile devices (iOS and Android) window.innerHeight !== 100vh
4987
- minHeight = "calc(" + (
4988
- document.scrollingElement === scrollElement ? '100vh' : viewportHeight + "px");
4968
+ const isScrollingElement =
4969
+ scrollingElement === scrollElement || body === scrollElement;
4989
4970
 
4971
+ // on mobile devices (iOS and Android) window.innerHeight !== 100vh
4972
+ minHeight = "calc(" + (isScrollingElement ? '100vh' : viewportHeight + "px");
4990
4973
 
4991
4974
  if (this.offsetTop) {
4992
- const top = offsetPosition(this.$el)[0] - offsetPosition(scrollElement)[0];
4993
- minHeight += top > 0 && top < viewportHeight / 2 ? " - " + top + "px" : '';
4975
+ if (isScrollingElement) {
4976
+ const top = offsetPosition(this.$el)[0] - offsetPosition(scrollElement)[0];
4977
+ minHeight += top > 0 && top < viewportHeight / 2 ? " - " + top + "px" : '';
4978
+ } else {
4979
+ minHeight += " - " + css(scrollElement, 'paddingTop');
4980
+ }
4994
4981
  }
4995
4982
 
4996
4983
  if (this.offsetBottom === true) {
@@ -5233,7 +5220,13 @@
5233
5220
 
5234
5221
  var marker = "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><rect x=\"9\" y=\"4\" width=\"1\" height=\"11\"/><rect x=\"4\" y=\"9\" width=\"11\" height=\"1\"/></svg>";
5235
5222
 
5236
- var navbarToggleIcon = "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><rect y=\"9\" width=\"20\" height=\"2\"/><rect y=\"3\" width=\"20\" height=\"2\"/><rect y=\"15\" width=\"20\" height=\"2\"/></svg>";
5223
+ var navParentIcon = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"12\" viewBox=\"0 0 12 12\"><polyline fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" points=\"1 3.5 6 8.5 11 3.5\"/></svg>";
5224
+
5225
+ var navParentIconLarge = "<svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" xmlns=\"http://www.w3.org/2000/svg\"><polyline fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" points=\"1 4 7 10 13 4\"/></svg>";
5226
+
5227
+ 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>";
5228
+
5229
+ var navbarToggleIcon = "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><style>.uk-navbar-toggle 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[aria-expanded=\"true\"] svg > .line-2 { transform: rotate(45deg); }\n .uk-navbar-toggle[aria-expanded=\"true\"] svg > .line-3 { transform: rotate(-45deg); }\n\n .uk-navbar-toggle[aria-expanded=\"true\"] svg > .line-1,\n .uk-navbar-toggle[aria-expanded=\"true\"] svg > .line-4 { opacity: 0; }\n .uk-navbar-toggle[aria-expanded=\"true\"] svg > .line-1 { transform: translateY(6px) scaleX(0); }\n .uk-navbar-toggle[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>";
5237
5230
 
5238
5231
  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>";
5239
5232
 
@@ -5265,6 +5258,9 @@
5265
5258
  marker,
5266
5259
  'close-icon': closeIcon,
5267
5260
  'close-large': closeLarge,
5261
+ 'nav-parent-icon': navParentIcon,
5262
+ 'nav-parent-icon-large': navParentIconLarge,
5263
+ 'navbar-parent-icon': navbarParentIcon,
5268
5264
  'navbar-toggle-icon': navbarToggleIcon,
5269
5265
  'overlay-icon': overlayIcon,
5270
5266
  'pagination-next': paginationNext,
@@ -5322,6 +5318,15 @@
5322
5318
  } };
5323
5319
 
5324
5320
 
5321
+ const NavParentIcon = {
5322
+ extends: IconComponent,
5323
+
5324
+ beforeConnect() {
5325
+ const icon = this.$props.icon;
5326
+ this.icon = closest(this.$el, '.uk-nav-primary') ? icon + "-large" : icon;
5327
+ } };
5328
+
5329
+
5325
5330
  const Slidenav = {
5326
5331
  extends: IconComponent,
5327
5332
 
@@ -5582,7 +5587,7 @@
5582
5587
 
5583
5588
 
5584
5589
  connected() {
5585
- const media = toMedia(this.media);
5590
+ const media = toMedia(this.media, this.$el);
5586
5591
  this.matchMedia = true;
5587
5592
  if (media) {
5588
5593
  this.mediaObj = window.matchMedia(media);
@@ -5603,11 +5608,10 @@
5603
5608
  } };
5604
5609
 
5605
5610
 
5606
- function toMedia(value) {
5611
+ function toMedia(value, element) {
5607
5612
  if (isString(value)) {
5608
5613
  if (startsWith(value, '@')) {
5609
- const name = "breakpoint-" + value.substr(1);
5610
- value = toFloat(getCssVar(name));
5614
+ value = toFloat(css(element, "--uk-breakpoint-" + value.substr(1)));
5611
5615
  } else if (isNaN(value)) {
5612
5616
  return value;
5613
5617
  }
@@ -5632,7 +5636,7 @@
5632
5636
 
5633
5637
  computed: {
5634
5638
  fill(_ref) {let { fill } = _ref;
5635
- return fill || getCssVar('leader-fill-content');
5639
+ return fill || css(this.$el, '--uk-leader-fill-content');
5636
5640
  } },
5637
5641
 
5638
5642
 
@@ -5824,7 +5828,7 @@
5824
5828
  align: String,
5825
5829
  offset: Number,
5826
5830
  boundary: Boolean,
5827
- boundaryAlign: Boolean,
5831
+ target: Boolean,
5828
5832
  clsDrop: String,
5829
5833
  delayShow: Number,
5830
5834
  delayHide: Number,
@@ -5841,9 +5845,12 @@
5841
5845
  offset: undefined,
5842
5846
  delayShow: undefined,
5843
5847
  delayHide: undefined,
5844
- boundaryAlign: undefined,
5845
- flip: 'x',
5848
+ flip: false,
5849
+ shift: true,
5846
5850
  boundary: true,
5851
+ target: false,
5852
+ targetX: false,
5853
+ targetY: false,
5847
5854
  dropbar: false,
5848
5855
  dropbarAnchor: false,
5849
5856
  duration: 200,
@@ -5878,7 +5885,7 @@
5878
5885
  },
5879
5886
 
5880
5887
  watch(dropbar) {
5881
- addClass(dropbar, 'uk-navbar-dropbar');
5888
+ addClass(dropbar, 'uk-dropbar', 'uk-dropbar-top', 'uk-navbar-dropbar');
5882
5889
  },
5883
5890
 
5884
5891
  immediate: true },
@@ -5894,7 +5901,7 @@
5894
5901
 
5895
5902
  if (this.dropContainer !== $el) {
5896
5903
  for (const el of $$("." + clsDrop, this.dropContainer)) {var _this$getDropdown;
5897
- const target = (_this$getDropdown = this.getDropdown(el)) == null ? void 0 : _this$getDropdown.target;
5904
+ const target = (_this$getDropdown = this.getDropdown(el)) == null ? void 0 : _this$getDropdown.targetEl;
5898
5905
  if (!includes(dropdowns, el) && target && within(target, this.$el)) {
5899
5906
  dropdowns.push(el);
5900
5907
  }
@@ -5911,8 +5918,7 @@
5911
5918
  {
5912
5919
  ...this.$props,
5913
5920
  boundary: this.boundary,
5914
- pos: this.pos,
5915
- offset: this.dropbar || this.offset });
5921
+ pos: this.pos });
5916
5922
 
5917
5923
 
5918
5924
  },
@@ -5957,8 +5963,8 @@
5957
5963
  if (
5958
5964
  active &&
5959
5965
  includes(active.mode, 'hover') &&
5960
- active.target &&
5961
- !within(active.target, current) &&
5966
+ active.targetEl &&
5967
+ !within(active.targetEl, current) &&
5962
5968
  !active.isDelaying)
5963
5969
  {
5964
5970
  active.hide(false);
@@ -5980,7 +5986,7 @@
5980
5986
  if (keyCode === keyMap.DOWN && hasAttr(current, 'aria-expanded')) {
5981
5987
  e.preventDefault();
5982
5988
 
5983
- if (!active || active.target !== current) {
5989
+ if (!active || active.targetEl !== current) {
5984
5990
  current.click();
5985
5991
  once(this.dropContainer, 'show', (_ref8) => {let { target } = _ref8;return (
5986
5992
  focusFirstFocusableElement(target));});
@@ -6030,8 +6036,8 @@
6030
6036
  }
6031
6037
  }
6032
6038
 
6033
- if (keyCode === keyMap.ESC) {var _active$target;
6034
- active == null ? void 0 : (_active$target = active.target) == null ? void 0 : _active$target.focus();
6039
+ if (keyCode === keyMap.ESC) {var _active$targetEl;
6040
+ active == null ? void 0 : (_active$targetEl = active.targetEl) == null ? void 0 : _active$targetEl.focus();
6035
6041
  }
6036
6042
 
6037
6043
  handleNavItemNavigation(e, this.toggles, active);
@@ -6073,8 +6079,8 @@
6073
6079
  return this.dropbar;
6074
6080
  },
6075
6081
 
6076
- handler(_, _ref9) {let { $el, align } = _ref9;
6077
- if (!hasClass($el, this.clsDrop) || align === 'stretch') {
6082
+ handler(_ref9) {let { target } = _ref9;
6083
+ if (!this.isDropbarDrop(target)) {
6078
6084
  return;
6079
6085
  }
6080
6086
 
@@ -6082,7 +6088,7 @@
6082
6088
  after(this.dropbarAnchor || this.$el, this.dropbar);
6083
6089
  }
6084
6090
 
6085
- addClass($el, this.clsDrop + "-dropbar");
6091
+ addClass(target, this.clsDrop + "-dropbar");
6086
6092
  } },
6087
6093
 
6088
6094
 
@@ -6097,19 +6103,24 @@
6097
6103
  return this.dropbar;
6098
6104
  },
6099
6105
 
6100
- handler(_, _ref10) {let { $el, align } = _ref10;
6101
- if (!hasClass($el, this.clsDrop) || align === 'stretch') {
6106
+ handler(_ref10) {let { target } = _ref10;
6107
+ if (!this.isDropbarDrop(target)) {
6102
6108
  return;
6103
6109
  }
6104
6110
 
6105
- this._observer = observeResize($el, () =>
6106
- this.transitionTo(
6107
- offset($el).bottom -
6108
- offset(this.dropbar).top +
6109
- toFloat(css($el, 'marginBottom')),
6110
- $el));
6111
-
6111
+ this._observer = observeResize(target, () => {
6112
+ const targetOffsets = parents(target, "." + this.clsDrop).
6113
+ concat(target).
6114
+ map((el) => offset(el));
6115
+ const minTop = Math.min(...targetOffsets.map((_ref11) => {let { top } = _ref11;return top;}));
6116
+ const maxBottom = Math.max(...targetOffsets.map((_ref12) => {let { bottom } = _ref12;return bottom;}));
6117
+ const dropbarOffset = offset(this.dropbar);
6118
+ css(this.dropbar, 'top', this.dropbar.offsetTop - (dropbarOffset.top - minTop));
6119
+ this.transitionTo(
6120
+ maxBottom - minTop + toFloat(css(target, 'marginBottom')),
6121
+ target);
6112
6122
 
6123
+ });
6113
6124
  } },
6114
6125
 
6115
6126
 
@@ -6124,13 +6135,13 @@
6124
6135
  return this.dropbar;
6125
6136
  },
6126
6137
 
6127
- handler(e, _ref11) {let { $el } = _ref11;
6138
+ handler(e) {
6128
6139
  const active = this.getActive();
6129
6140
 
6130
6141
  if (
6131
6142
  matches(this.dropbar, ':hover') &&
6132
- (active == null ? void 0 : active.$el) === $el &&
6133
- !this.toggles.some((el) => active.target !== el && matches(el, ':focus')))
6143
+ (active == null ? void 0 : active.$el) === e.target &&
6144
+ !this.toggles.some((el) => active.targetEl !== el && matches(el, ':focus')))
6134
6145
  {
6135
6146
  e.preventDefault();
6136
6147
  }
@@ -6148,8 +6159,8 @@
6148
6159
  return this.dropbar;
6149
6160
  },
6150
6161
 
6151
- handler(_, _ref12) {let { $el, align } = _ref12;
6152
- if (!hasClass($el, this.clsDrop) || align === 'stretch') {
6162
+ handler(_ref13) {let { target } = _ref13;
6163
+ if (!this.isDropbarDrop(target)) {
6153
6164
  return;
6154
6165
  }
6155
6166
 
@@ -6157,7 +6168,7 @@
6157
6168
 
6158
6169
  const active = this.getActive();
6159
6170
 
6160
- if (!active || (active == null ? void 0 : active.$el) === $el) {
6171
+ if (!active || (active == null ? void 0 : active.$el) === target) {
6161
6172
  this.transitionTo(0);
6162
6173
  }
6163
6174
  } }],
@@ -6166,7 +6177,7 @@
6166
6177
 
6167
6178
  methods: {
6168
6179
  getActive() {
6169
- return active && within(active.target, this.$el) && active;
6180
+ return active && within(active.targetEl, this.$el) && active;
6170
6181
  },
6171
6182
 
6172
6183
  transitionTo(newHeight, el) {
@@ -6196,13 +6207,17 @@
6196
6207
 
6197
6208
  getDropdown(el) {
6198
6209
  return this.$getComponent(el, 'drop') || this.$getComponent(el, 'dropdown');
6210
+ },
6211
+
6212
+ isDropbarDrop(el) {
6213
+ return this.getDropdown(el) && hasClass(el, this.clsDrop);
6199
6214
  } } };
6200
6215
 
6201
6216
 
6202
6217
 
6203
6218
  function handleNavItemNavigation(e, toggles, active) {
6204
6219
  const { current, keyCode } = e;
6205
- const target = (active == null ? void 0 : active.target) || current;
6220
+ const target = (active == null ? void 0 : active.targetEl) || current;
6206
6221
  const i = toggles.indexOf(target);
6207
6222
 
6208
6223
  // Left
@@ -6259,7 +6274,7 @@
6259
6274
 
6260
6275
  registerEvent(this, {
6261
6276
  el: this.swipeTarget,
6262
- name: pointerDown,
6277
+ name: pointerDown$1,
6263
6278
  passive: true,
6264
6279
  handler(e) {
6265
6280
  if (!isTouch(e)) {
@@ -6269,7 +6284,7 @@
6269
6284
  // Handle Swipe Gesture
6270
6285
  const pos = getEventPos(e);
6271
6286
  const target = 'tagName' in e.target ? e.target : parent(e.target);
6272
- once(document, pointerUp + " " + pointerCancel + " scroll", (e) => {
6287
+ once(document, pointerUp$1 + " " + pointerCancel + " scroll", (e) => {
6273
6288
  const { x, y } = getEventPos(e);
6274
6289
 
6275
6290
  // swipe
@@ -6570,6 +6585,14 @@
6570
6585
  offset: 0 },
6571
6586
 
6572
6587
 
6588
+ connected() {
6589
+ registerClick(this);
6590
+ },
6591
+
6592
+ disconnected() {
6593
+ unregisterClick(this);
6594
+ },
6595
+
6573
6596
  methods: {
6574
6597
  async scrollTo(el) {
6575
6598
  el = el && $(el) || document.body;
@@ -6578,20 +6601,39 @@
6578
6601
  await scrollIntoView(el, { offset: this.offset });
6579
6602
  trigger(this.$el, 'scrolled', [this, el]);
6580
6603
  }
6581
- } },
6604
+ } } };
6582
6605
 
6583
6606
 
6584
- events: {
6585
- click(e) {
6586
- if (e.defaultPrevented) {
6587
- return;
6588
- }
6589
6607
 
6590
- e.preventDefault();
6591
- this.scrollTo(getTargetElement(this.$el));
6592
- } } };
6608
+ const components$2 = new Set();
6609
+ function registerClick(cmp) {
6610
+ if (!components$2.size) {
6611
+ on(document, 'click', clickHandler);
6612
+ }
6593
6613
 
6614
+ components$2.add(cmp);
6615
+ }
6594
6616
 
6617
+ function unregisterClick(cmp) {
6618
+ components$2.delete(cmp);
6619
+
6620
+ if (!components$2.length) {
6621
+ off(document, 'click', clickHandler);
6622
+ }
6623
+ }
6624
+
6625
+ function clickHandler(e) {
6626
+ if (e.defaultPrevented) {
6627
+ return;
6628
+ }
6629
+
6630
+ for (const component of components$2) {
6631
+ if (within(e.target, component.$el)) {
6632
+ e.preventDefault();
6633
+ component.scrollTo(getTargetElement(component.$el));
6634
+ }
6635
+ }
6636
+ }
6595
6637
 
6596
6638
  function getTargetElement(el) {
6597
6639
  return document.getElementById(decodeURIComponent(el.hash).substring(1));
@@ -6921,7 +6963,9 @@
6921
6963
  },
6922
6964
 
6923
6965
  handler() {
6924
- if (!location.hash || scrollTop(window) === 0) {
6966
+ const { scrollingElement } = document;
6967
+
6968
+ if (!location.hash || scrollingElement.scrollTop === 0) {
6925
6969
  return;
6926
6970
  }
6927
6971
 
@@ -6930,13 +6974,11 @@
6930
6974
  const elOffset = offset(this.$el);
6931
6975
 
6932
6976
  if (this.isFixed && intersectRect(targetOffset, elOffset)) {
6933
- scrollTop(
6934
- window,
6977
+ scrollingElement.scrollTop =
6935
6978
  targetOffset.top -
6936
6979
  elOffset.height -
6937
6980
  toPx(this.targetOffset, 'height', this.placeholder) -
6938
- toPx(this.offset, 'height', this.placeholder));
6939
-
6981
+ toPx(this.offset, 'height', this.placeholder);
6940
6982
  }
6941
6983
  });
6942
6984
  } }],
@@ -7034,7 +7076,7 @@
7034
7076
 
7035
7077
 
7036
7078
  {let { scroll: prevScroll = 0, dir: prevDir = 'down', overflow, overflowScroll = 0, start, end } = _ref4;
7037
- const scroll = scrollTop(window);
7079
+ const scroll = document.scrollingElement.scrollTop;
7038
7080
  const dir = prevScroll <= scroll ? 'down' : 'up';
7039
7081
 
7040
7082
  return {
@@ -7443,7 +7485,7 @@
7443
7485
 
7444
7486
  events: [
7445
7487
  {
7446
- name: pointerDown,
7488
+ name: pointerDown$1,
7447
7489
 
7448
7490
  filter() {
7449
7491
  return includes(this.mode, 'hover');
@@ -7461,7 +7503,7 @@
7461
7503
  trigger(this.$el, 'focus');
7462
7504
  once(
7463
7505
  document,
7464
- pointerDown,
7506
+ pointerDown$1,
7465
7507
  () => trigger(this.$el, 'blur'),
7466
7508
  true,
7467
7509
  (e) => !within(e.target, this.$el));
@@ -7660,10 +7702,12 @@
7660
7702
  Video: Video,
7661
7703
  Close: Close,
7662
7704
  Spinner: Spinner,
7705
+ NavParentIcon: NavParentIcon,
7663
7706
  SlidenavNext: Slidenav,
7664
7707
  SlidenavPrevious: Slidenav,
7665
7708
  SearchIcon: Search,
7666
7709
  Marker: IconComponent,
7710
+ NavbarParentIcon: IconComponent,
7667
7711
  NavbarToggleIcon: IconComponent,
7668
7712
  OverlayIcon: IconComponent,
7669
7713
  PaginationNext: IconComponent,
@@ -8153,7 +8197,7 @@
8153
8197
 
8154
8198
  },
8155
8199
 
8156
- setState(state, animate) {if (animate === void 0) {animate = true;}
8200
+ async setState(state, animate) {if (animate === void 0) {animate = true;}
8157
8201
  state = { filter: { '': '' }, sort: [], ...state };
8158
8202
 
8159
8203
  trigger(this.$el, 'beforeFilter', [this, state]);
@@ -8162,15 +8206,17 @@
8162
8206
  toggleClass(el, this.cls, !!matchFilter(el, this.attrItem, state)));
8163
8207
 
8164
8208
 
8165
- Promise.all(
8209
+ await Promise.all(
8166
8210
  $$(this.target, this.$el).map((target) => {
8167
8211
  const filterFn = () => {
8168
8212
  applyState(state, target, children(target));
8169
8213
  this.$update(this.$el);
8170
8214
  };
8171
8215
  return animate ? this.animate(filterFn, target) : filterFn();
8172
- })).
8173
- then(() => trigger(this.$el, 'afterFilter', [this]));
8216
+ }));
8217
+
8218
+
8219
+ trigger(this.$el, 'afterFilter', [this]);
8174
8220
  },
8175
8221
 
8176
8222
  updateState() {
@@ -8460,6 +8506,11 @@
8460
8506
  this.interval && clearInterval(this.interval);
8461
8507
  } } };
8462
8508
 
8509
+ const pointerOptions = { passive: false, capture: true };
8510
+ const pointerDown = 'touchstart mousedown';
8511
+ const pointerMove = 'touchmove mousemove';
8512
+ const pointerUp = 'touchend touchcancel mouseup click input';
8513
+
8463
8514
  var SliderDrag = {
8464
8515
  props: {
8465
8516
  draggable: Boolean },
@@ -8512,7 +8563,17 @@
8512
8563
 
8513
8564
  handler(e) {
8514
8565
  e.preventDefault();
8515
- } }],
8566
+ } },
8567
+
8568
+
8569
+ {
8570
+ // iOS workaround for slider stopping if swiping fast
8571
+ name: pointerMove + " " + pointerUp,
8572
+ el() {
8573
+ return this.list;
8574
+ },
8575
+ handler: noop,
8576
+ ...pointerOptions }],
8516
8577
 
8517
8578
 
8518
8579
 
@@ -8534,10 +8595,10 @@
8534
8595
  this.prevIndex = this.index;
8535
8596
  }
8536
8597
 
8537
- on(document, pointerMove, this.move, { passive: false });
8598
+ on(document, pointerMove, this.move, pointerOptions);
8538
8599
 
8539
8600
  // 'input' event is triggered by video controls
8540
- on(document, pointerUp + " " + pointerCancel + " input", this.end, true);
8601
+ on(document, pointerUp, this.end, pointerOptions);
8541
8602
 
8542
8603
  css(this.list, 'userSelect', 'none');
8543
8604
  },
@@ -8617,8 +8678,8 @@
8617
8678
  },
8618
8679
 
8619
8680
  end() {
8620
- off(document, pointerMove, this.move, { passive: false });
8621
- off(document, pointerUp + " " + pointerCancel + " input", this.end, true);
8681
+ off(document, pointerMove, this.move, pointerOptions);
8682
+ off(document, pointerUp, this.end, pointerOptions);
8622
8683
 
8623
8684
  if (this.dragging) {
8624
8685
  this.dragging = null;
@@ -9026,7 +9087,7 @@
9026
9087
 
9027
9088
  events: [
9028
9089
  {
9029
- name: pointerMove + " " + pointerDown + " keydown",
9090
+ name: pointerMove$1 + " " + pointerDown$1 + " keydown",
9030
9091
 
9031
9092
  handler: 'showControls' },
9032
9093
 
@@ -10681,7 +10742,7 @@
10681
10742
  },
10682
10743
 
10683
10744
  events: {
10684
- name: pointerDown,
10745
+ name: pointerDown$1,
10685
10746
  passive: false,
10686
10747
  handler: 'init' },
10687
10748
 
@@ -10811,8 +10872,8 @@
10811
10872
  this.placeholder = placeholder;
10812
10873
  this.origin = { target, index: index(placeholder), ...this.pos };
10813
10874
 
10814
- on(document, pointerMove, this.move);
10815
- on(document, pointerUp, this.end);
10875
+ on(document, pointerMove$1, this.move);
10876
+ on(document, pointerUp$1, this.end);
10816
10877
 
10817
10878
  if (!this.threshold) {
10818
10879
  this.start(e);
@@ -10848,8 +10909,8 @@
10848
10909
  },
10849
10910
 
10850
10911
  end() {
10851
- off(document, pointerMove, this.move);
10852
- off(document, pointerUp, this.end);
10912
+ off(document, pointerMove$1, this.move);
10913
+ off(document, pointerUp$1, this.end);
10853
10914
 
10854
10915
  if (!this.drag) {
10855
10916
  return;
@@ -10918,7 +10979,7 @@
10918
10979
  let last = Date.now();
10919
10980
  trackTimer = setInterval(() => {
10920
10981
  let { x, y } = pos;
10921
- y += scrollTop(window);
10982
+ y += document.scrollingElement.scrollTop;
10922
10983
 
10923
10984
  const dist = (Date.now() - last) * 0.3;
10924
10985
  last = Date.now();
@@ -10939,7 +11000,7 @@
10939
11000
  }
10940
11001
 
10941
11002
  if (scroll > 0 && scroll < scrollHeight - height) {
10942
- scrollTop(scrollEl, scroll);
11003
+ scrollEl.scrollTop = scroll;
10943
11004
  return true;
10944
11005
  }
10945
11006
  });
@@ -11084,11 +11145,11 @@
11084
11145
 
11085
11146
  this._unbind = once(
11086
11147
  document, "show keydown " +
11087
- pointerDown,
11148
+ pointerDown$1,
11088
11149
  this.hide,
11089
11150
  false,
11090
11151
  (e) =>
11091
- e.type === pointerDown && !within(e.target, this.$el) ||
11152
+ e.type === pointerDown$1 && !within(e.target, this.$el) ||
11092
11153
  e.type === 'keydown' && e.keyCode === 27 ||
11093
11154
  e.type === 'show' && e.detail[0] !== this && e.detail[0].$name === this.$name);
11094
11155
 
@@ -11159,7 +11220,7 @@
11159
11220
 
11160
11221
  // Clicking a button does not give it focus on all browsers and platforms
11161
11222
  // https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#clicking_and_focus
11162
- [pointerDown](e) {
11223
+ [pointerDown$1](e) {
11163
11224
  if (isTouch(e)) {
11164
11225
  this.show();
11165
11226
  }