uikit 3.14.4-dev.17d2f2727 → 3.14.4-dev.19f33e082

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 -15
  2. package/build/util.js +1 -0
  3. package/dist/css/uikit-core-rtl.css +353 -96
  4. package/dist/css/uikit-core-rtl.min.css +1 -1
  5. package/dist/css/uikit-core.css +353 -96
  6. package/dist/css/uikit-core.min.css +1 -1
  7. package/dist/css/uikit-rtl.css +373 -101
  8. package/dist/css/uikit-rtl.min.css +1 -1
  9. package/dist/css/uikit.css +373 -101
  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 +89 -132
  16. package/dist/js/components/lightbox-panel.min.js +1 -1
  17. package/dist/js/components/lightbox.js +89 -132
  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 +1 -1
  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 +1 -1
  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 +107 -137
  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 +508 -452
  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 +516 -458
  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 +94 -67
  54. package/src/js/core/height-viewport.js +6 -2
  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 +44 -30
  59. package/src/js/core/scroll.js +37 -10
  60. package/src/js/core/sticky.js +8 -9
  61. package/src/js/core/toggle.js +3 -5
  62. package/src/js/mixin/media.js +4 -5
  63. package/src/js/mixin/modal.js +9 -6
  64. package/src/js/mixin/position.js +26 -11
  65. package/src/js/mixin/style.js +11 -0
  66. package/src/js/mixin/togglable.js +88 -133
  67. package/src/js/util/animation.js +4 -3
  68. package/src/js/util/class.js +3 -1
  69. package/src/js/util/filter.js +3 -7
  70. package/src/js/util/position.js +108 -107
  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 -27
  80. package/src/less/components/utility.less +10 -2
  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 -27
  93. package/src/scss/components/utility.scss +8 -1
  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 +325 -228
  118. package/tests/offcanvas.html +17 -21
  119. package/tests/parallax.html +1 -1
  120. package/tests/position.html +18 -16
  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.17d2f2727 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
1
+ /*! UIkit 3.14.4-dev.19f33e082 | 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
  }
@@ -828,7 +814,9 @@
828
814
  }
829
815
 
830
816
  function removeClasses(element, cls) {
831
- attr(element, 'class', (value) => (value || '').replace(new RegExp("\\b" + cls + "\\b", 'g'), ''));
817
+ attr(element, 'class', (value) =>
818
+ (value || '').replace(new RegExp("\\b" + cls + "\\b\\s?", 'g'), ''));
819
+
832
820
  }
833
821
 
834
822
  function replaceClass(element) {
@@ -913,13 +901,14 @@
913
901
  const Transition = {
914
902
  start: transition,
915
903
 
916
- stop(element) {
904
+ async stop(element) {
917
905
  trigger(element, 'transitionend');
918
- return Promise.resolve();
906
+ await Promise.resolve();
919
907
  },
920
908
 
921
- cancel(element) {
909
+ async cancel(element) {
922
910
  trigger(element, 'transitioncanceled');
911
+ await Promise.resolve();
923
912
  },
924
913
 
925
914
  inProgress(element) {
@@ -929,7 +918,7 @@
929
918
 
930
919
  const animationPrefix = 'uk-animation-';
931
920
 
932
- function animate$1(element, animation, duration, origin, out) {if (duration === void 0) {duration = 200;}
921
+ function animate$2(element, animation, duration, origin, out) {if (duration === void 0) {duration = 200;}
933
922
  return Promise.all(
934
923
  toNodes(element).map(
935
924
  (element) =>
@@ -965,10 +954,10 @@
965
954
 
966
955
  const inProgress = new RegExp(animationPrefix + "(enter|leave)");
967
956
  const Animation = {
968
- in: animate$1,
957
+ in: animate$2,
969
958
 
970
959
  out(element, animation, duration, origin) {
971
- return animate$1(element, animation, duration, origin, true);
960
+ return animate$2(element, animation, duration, origin, true);
972
961
  },
973
962
 
974
963
  inProgress(element) {
@@ -1795,20 +1784,6 @@
1795
1784
 
1796
1785
  }
1797
1786
 
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
1787
  function scrollIntoView(element, _temp) {let { offset: offsetBy = 0 } = _temp === void 0 ? {} : _temp;
1813
1788
  const parents = isVisible(element) ? scrollParents(element) : [];
1814
1789
  return parents.reduce(
@@ -1850,7 +1825,7 @@
1850
1825
  (function step() {
1851
1826
  const percent = ease(clamp((Date.now() - start) / duration));
1852
1827
 
1853
- scrollTop(element, scroll + top * percent);
1828
+ element.scrollTop = scroll + top * percent;
1854
1829
 
1855
1830
  // scroll more if we have not reached our destination
1856
1831
  if (percent === 1) {
@@ -1913,12 +1888,10 @@
1913
1888
  function offsetViewport(scrollElement) {
1914
1889
  const window = toWindow(scrollElement);
1915
1890
  const {
1916
- document: { body, documentElement } } =
1891
+ document: { documentElement } } =
1917
1892
  window;
1918
1893
  let viewportElement =
1919
- scrollElement === scrollingElement(scrollElement) || scrollElement === body ?
1920
- window :
1921
- scrollElement;
1894
+ scrollElement === scrollingElement(scrollElement) ? window : scrollElement;
1922
1895
 
1923
1896
  const { visualViewport } = window;
1924
1897
  if (isWindow(viewportElement) && visualViewport) {
@@ -1937,7 +1910,7 @@
1937
1910
  // iOS 12 returns <body> as scrollingElement
1938
1911
  viewportElement = documentElement;
1939
1912
  } else {
1940
- rect[start] += toFloat(css(viewportElement, "border" + ucfirst(start) + "Width"));
1913
+ rect[start] += toFloat(css(viewportElement, "border-" + start + "-width"));
1941
1914
  }
1942
1915
  rect[prop] = rect[dir] = viewportElement["client" + ucfirst(prop)];
1943
1916
  rect[end] = rect[prop] + rect[start];
@@ -1962,126 +1935,65 @@
1962
1935
  ...options.attach },
1963
1936
 
1964
1937
  offset: [0, 0],
1938
+ placement: [],
1965
1939
  ...options };
1966
1940
 
1967
1941
 
1968
- const dim = options.flip ?
1969
- attachToWithFlip(element, target, options) :
1970
- attachTo(element, target, options);
1971
-
1972
- offset(element, dim);
1973
- }
1974
-
1975
- function attachTo(element, target, options) {
1976
- let { attach, offset: offsetBy } = {
1977
- attach: {
1978
- element: ['left', 'top'],
1979
- target: ['left', 'top'],
1980
- ...options.attach },
1981
-
1982
- offset: [0, 0],
1983
- ...options };
1984
-
1985
-
1986
- const position = offset(element);
1987
- const targetOffset = offset(target);
1988
- for (const [i, [prop, dir, start, end]] of Object.entries(dirs)) {
1989
- position[start] = position[dir] =
1990
- targetOffset[start] +
1991
- moveBy(attach.target[i], end, targetOffset[prop]) -
1992
- moveBy(attach.element[i], end, position[prop]) +
1993
- +offsetBy[i];
1994
- position[end] = position[start] + position[prop];
1942
+ if (!isArray(target)) {
1943
+ target = [target, target];
1995
1944
  }
1996
- return position;
1997
- }
1998
1945
 
1999
- function moveBy(start, end, dim) {
2000
- return start === 'center' ? dim / 2 : start === end ? dim : 0;
1946
+ offset(element, getPosition(element, target, options));
2001
1947
  }
2002
1948
 
2003
- function attachToWithFlip(element, target, options) {
1949
+ function getPosition(element, target, options) {
2004
1950
  const position = attachTo(element, target, options);
2005
- const targetDim = offset(target);
2006
1951
 
2007
1952
  let {
2008
- flip,
2009
1953
  attach: { element: elAttach, target: targetAttach },
2010
1954
  offset: elOffset,
2011
1955
  boundary,
2012
- viewport,
2013
- viewportOffset } =
1956
+ viewportOffset,
1957
+ placement } =
2014
1958
  options;
2015
1959
 
2016
- let viewports = scrollParents(element);
2017
- if (boundary === target) {
2018
- viewports = viewports.filter((viewport) => viewport !== boundary);
2019
- }
2020
- const [scrollElement] = viewports;
2021
- viewports.push(viewport);
1960
+ let offsetPosition = position;
1961
+ for (const [i, [prop,, start, end]] of Object.entries(dirs)) {
1962
+ let viewports = scrollParents(target[i]);
1963
+ const [scrollElement] = viewports;
2022
1964
 
2023
- const offsetPosition = { ...position };
2024
- 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);
2031
-
2032
- viewport = getIntersectionArea(...viewports.filter(Boolean).map(offsetViewport));
1965
+ let viewport = getIntersectionArea(...viewports.map(offsetViewport));
2033
1966
 
2034
1967
  if (viewportOffset) {
2035
1968
  viewport[start] += viewportOffset;
2036
1969
  viewport[end] -= viewportOffset;
2037
1970
  }
2038
1971
 
2039
- if (boundary && !willFlip && position[prop] <= offset(boundary)[prop]) {
2040
- viewport = getIntersectionArea(viewport, offset(boundary));
1972
+ if (boundary) {
1973
+ viewport = getIntersectionArea(viewport, offsetViewport(boundary));
2041
1974
  }
2042
1975
 
2043
- const isInStartBoundary = position[start] >= viewport[start];
2044
- const isInEndBoundary = position[end] <= viewport[end];
1976
+ const isInStartViewport = position[start] >= viewport[start];
1977
+ const isInEndViewport = position[end] <= viewport[end];
2045
1978
 
2046
- if (isInStartBoundary && isInEndBoundary) {
1979
+ if (isInStartViewport && isInEndViewport) {
2047
1980
  continue;
2048
1981
  }
2049
1982
 
2050
- let offsetBy;
1983
+ let offsetBy = 0;
2051
1984
 
2052
1985
  // Flip
2053
- if (willFlip) {
1986
+ if (placement[i] === 'flip') {
2054
1987
  if (
2055
- elAttach[i] === end && isInStartBoundary ||
2056
- elAttach[i] === start && isInEndBoundary)
1988
+ targetAttach[i] === end && isInEndViewport ||
1989
+ targetAttach[i] === start && isInStartViewport)
2057
1990
  {
2058
1991
  continue;
2059
1992
  }
2060
1993
 
2061
- offsetBy =
2062
- (elAttach[i] === start ?
2063
- -position[prop] :
2064
- elAttach[i] === end ?
2065
- position[prop] :
2066
- 0) + (
2067
- targetAttach[i] === start ?
2068
- targetDim[prop] :
2069
- targetAttach[i] === end ?
2070
- -targetDim[prop] :
2071
- 0) -
2072
- elOffset[i] * 2;
2073
-
2074
- if (
2075
- !isInScrollArea(
2076
- {
2077
- ...position,
2078
- [start]: position[start] + offsetBy,
2079
- [end]: position[end] + offsetBy },
2080
-
2081
- scrollElement,
2082
- i))
1994
+ offsetBy = flip(element, target, options, i)[start] - position[start];
2083
1995
 
2084
- {
1996
+ if (!isInScrollArea(applyOffset(position, offsetBy, i), scrollElement, i)) {
2085
1997
  if (isInScrollArea(position, scrollElement, i)) {
2086
1998
  continue;
2087
1999
  }
@@ -2090,26 +2002,27 @@
2090
2002
  return false;
2091
2003
  }
2092
2004
 
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() },
2005
+ const newPos = getPosition(element, target, {
2006
+ ...options,
2007
+ attach: {
2008
+ element: elAttach.map(flipAxis).reverse(),
2009
+ target: targetAttach.map(flipAxis).reverse() },
2099
2010
 
2100
- offset: elOffset.reverse(),
2101
- flip: flip === true ? flip : [...flip, dirs[1 - i][1]],
2102
- recursion: true });
2011
+ offset: elOffset.reverse(),
2012
+ placement: placement.reverse(),
2013
+ recursion: true });
2103
2014
 
2104
2015
 
2105
- if (newPos && isInScrollArea(newPos, scrollElement, 1 - i)) {
2106
- return newPos;
2107
- }
2016
+ if (newPos && isInScrollArea(newPos, scrollElement, 1 - i)) {
2017
+ return newPos;
2108
2018
  }
2019
+
2020
+ continue;
2109
2021
  }
2110
2022
 
2111
- // Move
2112
- } else {
2023
+ // Shift
2024
+ } else if (placement[i] === 'shift') {
2025
+ const targetDim = offset(target[i]);
2113
2026
  offsetBy =
2114
2027
  clamp(
2115
2028
  clamp(position[start], viewport[start], viewport[end] - position[prop]),
@@ -2118,13 +2031,54 @@
2118
2031
  position[start];
2119
2032
  }
2120
2033
 
2121
- offsetPosition[start] = position[dir] = position[start] + offsetBy;
2122
- offsetPosition[end] += offsetBy;
2034
+ offsetPosition = applyOffset(offsetPosition, offsetBy, i);
2123
2035
  }
2124
2036
 
2125
2037
  return offsetPosition;
2126
2038
  }
2127
2039
 
2040
+ function attachTo(element, target, options) {
2041
+ let { attach, offset: offsetBy } = {
2042
+ attach: {
2043
+ element: ['left', 'top'],
2044
+ target: ['left', 'top'],
2045
+ ...options.attach },
2046
+
2047
+ offset: [0, 0],
2048
+ ...options };
2049
+
2050
+
2051
+ let elOffset = offset(element);
2052
+
2053
+ for (const [i, [prop,, start, end]] of Object.entries(dirs)) {
2054
+ const targetOffset =
2055
+ attach.target[i] === attach.element[i] ? offsetViewport(target[i]) : offset(target[i]);
2056
+
2057
+ elOffset = applyOffset(
2058
+ elOffset,
2059
+ targetOffset[start] -
2060
+ elOffset[start] +
2061
+ moveBy(attach.target[i], end, targetOffset[prop]) -
2062
+ moveBy(attach.element[i], end, elOffset[prop]) +
2063
+ +offsetBy[i],
2064
+ i);
2065
+
2066
+ }
2067
+ return elOffset;
2068
+ }
2069
+
2070
+ function applyOffset(position, offset, i) {
2071
+ const [, dir, start, end] = dirs[i];
2072
+ const newPos = { ...position };
2073
+ newPos[start] = position[dir] = position[start] + offset;
2074
+ newPos[end] += offset;
2075
+ return newPos;
2076
+ }
2077
+
2078
+ function moveBy(attach, end, dim) {
2079
+ return attach === 'center' ? dim / 2 : attach === end ? dim : 0;
2080
+ }
2081
+
2128
2082
  function getIntersectionArea() {
2129
2083
  let area = {};for (var _len = arguments.length, rects = new Array(_len), _key = 0; _key < _len; _key++) {rects[_key] = arguments[_key];}
2130
2084
  for (const rect of rects) {
@@ -2145,12 +2099,32 @@
2145
2099
  return position[start] >= viewport[start] && position[end] <= viewport[end];
2146
2100
  }
2147
2101
 
2148
- function intersectLine(dimA, dimB, dir) {
2149
- const [,, start, end] = dirs[dir];
2150
- return dimA[end] > dimB[start] && dimB[end] > dimA[start];
2102
+ function flip(element, target, _ref, i) {let { offset, attach } = _ref;
2103
+ return attachTo(element, target, {
2104
+ attach: {
2105
+ element: flipAttach(attach.element, i),
2106
+ target: flipAttach(attach.target, i) },
2107
+
2108
+ offset: flipOffset(offset, i) });
2109
+
2151
2110
  }
2152
2111
 
2153
- function flipDir(prop) {
2112
+ function flipAttach(attach, i) {
2113
+ const newAttach = [...attach];
2114
+ const index = dirs[i].indexOf(attach[i]);
2115
+ if (~index) {
2116
+ newAttach[i] = dirs[i][1 - index % 2 + 2];
2117
+ }
2118
+ return newAttach;
2119
+ }
2120
+
2121
+ function flipOffset(offset, i) {
2122
+ offset = [...offset];
2123
+ offset[i] *= -1;
2124
+ return offset;
2125
+ }
2126
+
2127
+ function flipAxis(prop) {
2154
2128
  for (let i = 0; i < dirs.length; i++) {
2155
2129
  const index = dirs[i].indexOf(prop);
2156
2130
  if (~index) {
@@ -2165,7 +2139,7 @@
2165
2139
  getImage: getImage,
2166
2140
  transition: transition,
2167
2141
  Transition: Transition,
2168
- animate: animate$1,
2142
+ animate: animate$2,
2169
2143
  Animation: Animation,
2170
2144
  attr: attr,
2171
2145
  hasAttr: hasAttr,
@@ -2295,10 +2269,8 @@
2295
2269
  findAll: findAll,
2296
2270
  escape: escape,
2297
2271
  css: css,
2298
- getCssVar: getCssVar,
2299
2272
  propName: propName,
2300
2273
  isInView: isInView,
2301
- scrollTop: scrollTop,
2302
2274
  scrollIntoView: scrollIntoView,
2303
2275
  scrolledOver: scrolledOver,
2304
2276
  scrollParents: scrollParents,
@@ -2621,7 +2593,7 @@
2621
2593
 
2622
2594
  value = props[key] === Boolean && value === '' ? true : coerce$1(props[key], value);
2623
2595
 
2624
- if (prop === 'target' && (!value || startsWith(value, '_'))) {
2596
+ if (prop === 'target' && startsWith(value, '_')) {
2625
2597
  continue;
2626
2598
  }
2627
2599
 
@@ -2632,7 +2604,7 @@
2632
2604
 
2633
2605
  for (const key in options) {
2634
2606
  const prop = camelize(key);
2635
- if (props[prop] !== undefined) {
2607
+ if (!isUndefined(props[prop])) {
2636
2608
  data$1[prop] = coerce$1(props[prop], options[key]);
2637
2609
  }
2638
2610
  }
@@ -2961,7 +2933,7 @@
2961
2933
  UIkit.data = '__uikit__';
2962
2934
  UIkit.prefix = 'uk-';
2963
2935
  UIkit.options = {};
2964
- UIkit.version = '3.14.4-dev.17d2f2727';
2936
+ UIkit.version = '3.14.4-dev.19f33e082';
2965
2937
 
2966
2938
  globalAPI(UIkit);
2967
2939
  hooksAPI(UIkit);
@@ -3066,27 +3038,7 @@
3066
3038
  origin: false,
3067
3039
  transition: 'ease',
3068
3040
  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
-
3041
+ clsLeave: 'uk-togglabe-leave' },
3090
3042
 
3091
3043
 
3092
3044
  computed: {
@@ -3095,7 +3047,7 @@
3095
3047
  },
3096
3048
 
3097
3049
  hasTransition(_ref2) {let { animation } = _ref2;
3098
- return startsWith(animation[0], 'slide');
3050
+ return ['slide', 'reveal'].some((transition) => startsWith(animation[0], transition));
3099
3051
  } },
3100
3052
 
3101
3053
 
@@ -3188,130 +3140,105 @@
3188
3140
  };
3189
3141
  }
3190
3142
 
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
-
3143
+ function toggleTransition(cmp) {var _cmp$animation$;
3144
+ const [mode = 'reveal', startProp = 'top'] = ((_cmp$animation$ = cmp.animation[0]) == null ? void 0 : _cmp$animation$.split('-')) || [];
3204
3145
 
3146
+ const dirs = [
3147
+ ['left', 'right'],
3148
+ ['top', 'bottom']];
3205
3149
 
3150
+ const dir = dirs[includes(dirs[0], startProp) ? 0 : 1];
3151
+ const end = dir[1] === startProp;
3152
+ const props = ['width', 'height'];
3153
+ const dimProp = props[dirs.indexOf(dir)];
3154
+ const marginProp = "margin-" + dir[0];
3155
+ const marginStartProp = "margin-" + startProp;
3206
3156
 
3157
+ return async (el, show) => {
3158
+ let { duration, velocity, transition, _toggle } = cmp;
3207
3159
 
3160
+ let currentDim = dimensions$1(el)[dimProp];
3208
3161
 
3209
- {let { isToggled, duration, velocity, initProps, hideProps, transition, _toggle } = _ref4;
3210
- return (el, show) => {
3211
3162
  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);
3163
+ await Transition.cancel(el);
3222
3164
 
3223
- if (!isToggled(el)) {
3165
+ if (show) {
3224
3166
  _toggle(el, true);
3225
3167
  }
3226
3168
 
3227
- css(el, 'maxHeight', '');
3228
-
3229
- // Update child components first
3230
- fastdom.flush();
3231
-
3232
- const endHeight = toFloat(css(el, 'height')) + inner;
3233
- duration = velocity * endHeight + duration;
3234
-
3235
- css(el, { ...props, maxHeight: currentHeight });
3236
-
3237
- return (
3238
- show ?
3239
- Transition.start(
3240
- el,
3241
- { ...initProps, overflow: 'hidden', maxHeight: endHeight },
3242
- duration * (1 - currentHeight / endHeight),
3243
- transition) :
3244
-
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);
3267
- }
3169
+ const prevProps = Object.fromEntries(
3170
+ [
3171
+ 'padding',
3172
+ 'border',
3173
+ 'width',
3174
+ 'height',
3175
+ 'overflowY',
3176
+ 'overflowX',
3177
+ marginProp,
3178
+ marginStartProp].
3179
+ map((key) => [key, el.style[key]]));
3180
+
3181
+
3182
+ const dim = dimensions$1(el);
3183
+ const currentMargin = toFloat(css(el, marginProp));
3184
+ const marginStart = toFloat(css(el, marginStartProp));
3185
+ const endDim = dim[dimProp] + marginStart;
3186
+
3187
+ if (!inProgress && !show) {
3188
+ currentDim += marginStart;
3189
+ }
3190
+
3191
+ const [wrapper] = wrapInner(el, '<div>');
3192
+ css(wrapper, {
3193
+ boxSizing: 'border-box',
3194
+ height: dim.height,
3195
+ width: dim.width,
3196
+ ...css(el, [
3197
+ 'overflow',
3198
+ 'padding',
3199
+ 'borderTop',
3200
+ 'borderRight',
3201
+ 'borderBottom',
3202
+ 'borderLeft',
3203
+ 'borderImage',
3204
+ marginStartProp]) });
3268
3205
 
3269
- const width = toFloat(css(el, 'width'));
3270
- duration = velocity * width + duration;
3271
3206
 
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
3207
 
3278
3208
  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
-
3209
+ padding: 0,
3210
+ border: 0,
3211
+ [marginStartProp]: 0,
3212
+ width: dim.width,
3213
+ height: dim.height,
3214
+ overflow: 'hidden',
3215
+ [dimProp]: currentDim });
3286
3216
 
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
3217
 
3295
- duration * (1 - percent / 100),
3296
- transition) :
3218
+ const percent = currentDim / endDim;
3219
+ duration = (velocity * endDim + duration) * (show ? 1 - percent : percent);
3220
+ const endProps = { [dimProp]: show ? endDim : 0 };
3297
3221
 
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%)" :
3222
+ if (end) {
3223
+ css(el, marginProp, endDim - currentDim + currentMargin);
3224
+ endProps[marginProp] = show ? currentMargin : endDim + currentMargin;
3225
+ }
3303
3226
 
3227
+ if (!end ^ mode === 'reveal') {
3228
+ css(wrapper, marginProp, -endDim + currentDim);
3229
+ Transition.start(wrapper, { [marginProp]: show ? 0 : -endDim }, duration, transition);
3230
+ }
3304
3231
 
3305
- '',
3306
- marginLeft: (right ? 1 : -1) * width },
3232
+ try {
3233
+ await Transition.start(el, endProps, duration, transition);
3234
+ } finally {
3235
+ css(el, prevProps);
3236
+ unwrap(wrapper.firstChild);
3307
3237
 
3308
- duration * (percent / 100),
3309
- transition).
3310
- then(() => _toggle(el, false))).
3311
- then(() => {
3312
- css(scrollElement, 'overflowX', '');
3313
- css(el, { clipPath: '', marginLeft: '' });
3314
- });
3238
+ if (!show) {
3239
+ _toggle(el, false);
3240
+ }
3241
+ }
3315
3242
  };
3316
3243
  }
3317
3244
 
@@ -3336,6 +3263,7 @@
3336
3263
  mixins: [Class, Lazyload, Togglable],
3337
3264
 
3338
3265
  props: {
3266
+ animation: Boolean,
3339
3267
  targets: String,
3340
3268
  active: null,
3341
3269
  collapsible: Boolean,
@@ -3348,7 +3276,7 @@
3348
3276
  data: {
3349
3277
  targets: '> *',
3350
3278
  active: false,
3351
- animation: ['slide'],
3279
+ animation: true,
3352
3280
  collapsible: true,
3353
3281
  multiple: false,
3354
3282
  clsOpen: 'uk-open',
@@ -3394,7 +3322,7 @@
3394
3322
  hide(
3395
3323
  el,
3396
3324
  !hasClass(
3397
- this.items.find((item) => item.contains(el)),
3325
+ this.items.find((item) => within(el, item)),
3398
3326
  this.clsOpen));
3399
3327
 
3400
3328
 
@@ -3446,23 +3374,15 @@
3446
3374
  toggleClass(el, this.clsOpen, show);
3447
3375
  attr($(this.$props.toggle, el), 'aria-expanded', show);
3448
3376
 
3449
- const content = $("" + (el._wrapper ? '> * ' : '') + this.content, el);
3377
+ const content = $(this.content, el);
3450
3378
 
3451
- if (animate === false || !this.hasTransition) {
3379
+ if (animate === false || !this.animation) {
3380
+ content.hidden = !show;
3452
3381
  hide(content, !show);
3453
3382
  return;
3454
3383
  }
3455
3384
 
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);
3385
+ await toggleTransition(this)(content, show);
3466
3386
 
3467
3387
  if (show) {
3468
3388
  const toggle = $(this.$props.toggle, el);
@@ -3488,18 +3408,17 @@
3488
3408
  args: 'animation',
3489
3409
 
3490
3410
  props: {
3411
+ animation: Boolean,
3491
3412
  close: String },
3492
3413
 
3493
3414
 
3494
3415
  data: {
3495
- animation: ['slide'],
3416
+ animation: true,
3496
3417
  selClose: '.uk-alert-close',
3497
- duration: 150,
3498
- hideProps: { opacity: 0, ...Togglable.data.hideProps } },
3418
+ duration: 150 },
3499
3419
 
3500
3420
 
3501
- events: [
3502
- {
3421
+ events: {
3503
3422
  name: 'click',
3504
3423
 
3505
3424
  delegate() {
@@ -3509,16 +3428,39 @@
3509
3428
  handler(e) {
3510
3429
  e.preventDefault();
3511
3430
  this.close();
3512
- } }],
3513
-
3431
+ } },
3514
3432
 
3515
3433
 
3516
3434
  methods: {
3517
3435
  async close() {
3518
- await this.toggleElement(this.$el);
3436
+ await this.toggleElement(this.$el, false, animate$1(this));
3519
3437
  this.$destroy(true);
3520
3438
  } } };
3521
3439
 
3440
+
3441
+
3442
+ function animate$1(_ref) {let { duration, transition, velocity } = _ref;
3443
+ return (el) => {
3444
+ const height = toFloat(css(el, 'height'));
3445
+ css(el, 'height', height);
3446
+ return Transition.start(
3447
+ el,
3448
+ {
3449
+ height: 0,
3450
+ marginTop: 0,
3451
+ marginBottom: 0,
3452
+ paddingTop: 0,
3453
+ paddingBottom: 0,
3454
+ borderTop: 0,
3455
+ borderBottom: 0,
3456
+ opacity: 0 },
3457
+
3458
+ velocity * height + duration,
3459
+ transition);
3460
+
3461
+ };
3462
+ }
3463
+
3522
3464
  var Video = {
3523
3465
  args: 'autoplay',
3524
3466
 
@@ -3667,13 +3609,17 @@
3667
3609
  props: {
3668
3610
  pos: String,
3669
3611
  offset: null,
3670
- flip: Boolean },
3612
+ flip: Boolean,
3613
+ shift: Boolean,
3614
+ inset: Boolean },
3671
3615
 
3672
3616
 
3673
3617
  data: {
3674
3618
  pos: "bottom-" + (isRtl ? 'right' : 'left'),
3619
+ offset: false,
3675
3620
  flip: true,
3676
- offset: false },
3621
+ shift: true,
3622
+ inset: false },
3677
3623
 
3678
3624
 
3679
3625
  connected() {
@@ -3685,19 +3631,24 @@
3685
3631
  methods: {
3686
3632
  positionAt(element, target, boundary) {
3687
3633
  let offset = [this.getPositionOffset(element), this.getShiftOffset(element)];
3634
+ const placement = [this.flip && 'flip', this.shift && 'shift'];
3688
3635
 
3689
3636
  const attach = {
3690
- element: [flipPosition(this.dir), this.align],
3637
+ element: [this.inset ? this.dir : flipPosition(this.dir), this.align],
3691
3638
  target: [this.dir, this.align] };
3692
3639
 
3693
3640
 
3694
3641
  if (this.axis === 'y') {
3695
3642
  for (const prop in attach) {
3696
- attach[prop] = attach[prop].reverse();
3643
+ attach[prop].reverse();
3697
3644
  }
3698
- offset = offset.reverse();
3645
+ offset.reverse();
3646
+ placement.reverse();
3699
3647
  }
3700
3648
 
3649
+ const [scrollElement] = scrollParents(element, /auto|scroll/);
3650
+ const { scrollTop, scrollLeft } = scrollElement;
3651
+
3701
3652
  // Ensure none positioned element does not generate scrollbars
3702
3653
  const elDim = dimensions$1(element);
3703
3654
  css(element, { top: -elDim.height, left: -elDim.width });
@@ -3706,35 +3657,50 @@
3706
3657
  attach,
3707
3658
  offset,
3708
3659
  boundary,
3709
- flip: this.flip,
3660
+ placement,
3710
3661
  viewportOffset: this.getViewportOffset(element) });
3711
3662
 
3663
+
3664
+ // Restore scroll position
3665
+ scrollElement.scrollTop = scrollTop;
3666
+ scrollElement.scrollLeft = scrollLeft;
3712
3667
  },
3713
3668
 
3714
3669
  getPositionOffset(element) {
3715
3670
  return (
3716
3671
  toPx(
3717
- this.offset === false ? getCssVar('position-offset', element) : this.offset,
3672
+ this.offset === false ? css(element, '--uk-position-offset') : this.offset,
3718
3673
  this.axis === 'x' ? 'width' : 'height',
3719
3674
  element) * (
3720
- includes(['left', 'top'], this.dir) ? -1 : 1));
3675
+
3676
+ includes(['left', 'top'], this.dir) ? -1 : 1) * (
3677
+ this.inset ? -1 : 1));
3721
3678
 
3722
3679
  },
3723
3680
 
3724
3681
  getShiftOffset(element) {
3725
- return includes(['center', 'justify', 'stretch'], this.align) ?
3682
+ return this.align === 'center' ?
3726
3683
  0 :
3727
3684
  toPx(
3728
- getCssVar('position-shift-offset', element),
3685
+ css(element, '--uk-position-shift-offset'),
3729
3686
  this.axis === 'y' ? 'width' : 'height',
3730
3687
  element) * (
3731
3688
  includes(['left', 'top'], this.align) ? 1 : -1);
3732
3689
  },
3733
3690
 
3734
3691
  getViewportOffset(element) {
3735
- return toPx(getCssVar('position-viewport-offset', element));
3692
+ return toPx(css(element, '--uk-position-viewport-offset'));
3736
3693
  } } };
3737
3694
 
3695
+ var Style = {
3696
+ beforeConnect() {
3697
+ this._style = attr(this.$el, 'style');
3698
+ },
3699
+
3700
+ disconnected() {
3701
+ attr(this.$el, 'style', this._style);
3702
+ } };
3703
+
3738
3704
  const active$1 = [];
3739
3705
 
3740
3706
  var Modal = {
@@ -3844,8 +3810,8 @@
3844
3810
 
3845
3811
 
3846
3812
  if (this.overlay) {
3847
- once(this.$el, 'hide', preventOverscroll(this.$el));
3848
- once(this.$el, 'hide', preventBackgroundScroll());
3813
+ once(this.$el, 'hidden', preventOverscroll(this.$el), { self: true });
3814
+ once(this.$el, 'hidden', preventBackgroundScroll(), { self: true });
3849
3815
  }
3850
3816
 
3851
3817
  if (this.stack) {
@@ -3927,10 +3893,6 @@
3927
3893
  active$1.splice(active$1.indexOf(this), 1);
3928
3894
  }
3929
3895
 
3930
- if (!active$1.length) {
3931
- css(document.body, 'overflowY', '');
3932
- }
3933
-
3934
3896
  css(this.$el, 'zIndex', '');
3935
3897
 
3936
3898
  if (!active$1.some((modal) => modal.clsPage === this.clsPage)) {
@@ -4047,7 +4009,12 @@
4047
4009
  return () => events.forEach((fn) => fn());
4048
4010
  }
4049
4011
 
4012
+ let prevented;
4050
4013
  function preventBackgroundScroll() {
4014
+ if (prevented) {
4015
+ return noop;
4016
+ }
4017
+ prevented = true;
4051
4018
  const { body, documentElement } = document;
4052
4019
  css(body, {
4053
4020
  overflowY: width(window) > documentElement.clientWidth ? 'scroll' : '',
@@ -4055,6 +4022,7 @@
4055
4022
 
4056
4023
  css(documentElement, 'overflowY', 'hidden');
4057
4024
  return () => {
4025
+ prevented = false;
4058
4026
  css(documentElement, 'overflowY', '');
4059
4027
  css(body, { overflowY: '', touchAction: '' });
4060
4028
  };
@@ -4073,7 +4041,7 @@
4073
4041
  let active;
4074
4042
 
4075
4043
  var drop = {
4076
- mixins: [Container, Lazyload, Position, Togglable],
4044
+ mixins: [Container, Lazyload, Position, Style, Togglable],
4077
4045
 
4078
4046
  args: 'pos',
4079
4047
 
@@ -4081,10 +4049,13 @@
4081
4049
  mode: 'list',
4082
4050
  toggle: Boolean,
4083
4051
  boundary: Boolean,
4084
- boundaryAlign: Boolean,
4052
+ target: Boolean,
4053
+ targetX: Boolean,
4054
+ targetY: Boolean,
4055
+ stretch: Boolean,
4085
4056
  delayShow: Number,
4086
4057
  delayHide: Number,
4087
- display: String,
4058
+ autoUpdate: Boolean,
4088
4059
  clsDrop: String,
4089
4060
  animateOut: Boolean,
4090
4061
  bgScroll: Boolean },
@@ -4093,17 +4064,32 @@
4093
4064
  data: {
4094
4065
  mode: ['click', 'hover'],
4095
4066
  toggle: '- *',
4096
- boundary: true,
4097
- boundaryAlign: false,
4067
+ boundary: false,
4068
+ target: false,
4069
+ targetX: false,
4070
+ targetY: false,
4071
+ stretch: false,
4098
4072
  delayShow: 0,
4099
4073
  delayHide: 800,
4100
- display: null,
4074
+ autoUpdate: true,
4101
4075
  clsDrop: false,
4076
+ animateOut: false,
4077
+ bgScroll: true,
4102
4078
  animation: ['uk-animation-fade'],
4103
4079
  cls: 'uk-open',
4104
- container: false,
4105
- animateOut: false,
4106
- bgScroll: true },
4080
+ container: false },
4081
+
4082
+
4083
+ computed: {
4084
+ target(_ref, $el) {let { target, targetX, targetY } = _ref;
4085
+ targetX = targetX || target || this.targetEl;
4086
+ targetY = targetY || target || this.targetEl;
4087
+
4088
+ return [
4089
+ targetX === true ? window : query(targetX, $el),
4090
+ targetY === true ? window : query(targetY, $el)];
4091
+
4092
+ } },
4107
4093
 
4108
4094
 
4109
4095
  created() {
@@ -4117,13 +4103,13 @@
4117
4103
  connected() {
4118
4104
  addClass(this.$el, this.clsDrop);
4119
4105
 
4120
- if (this.toggle && !this.target) {
4121
- this.target = this.$create('toggle', query(this.toggle, this.$el), {
4106
+ if (this.toggle && !this.targetEl) {
4107
+ this.targetEl = this.$create('toggle', query(this.toggle, this.$el), {
4122
4108
  target: this.$el,
4123
4109
  mode: this.mode }).
4124
4110
  $el;
4125
- attr(this.target, 'aria-haspopup', true);
4126
- this.lazyload(this.target);
4111
+ attr(this.targetEl, 'aria-haspopup', true);
4112
+ this.lazyload(this.targetEl);
4127
4113
  }
4128
4114
  },
4129
4115
 
@@ -4154,7 +4140,7 @@
4154
4140
  return 'a[href^="#"]';
4155
4141
  },
4156
4142
 
4157
- handler(_ref) {let { defaultPrevented, current: { hash } } = _ref;
4143
+ handler(_ref2) {let { defaultPrevented, current: { hash } } = _ref2;
4158
4144
  if (!defaultPrevented && hash && !within(hash, this.$el)) {
4159
4145
  this.hide(false);
4160
4146
  }
@@ -4266,17 +4252,17 @@
4266
4252
  on(
4267
4253
  document,
4268
4254
  pointerDown$1,
4269
- (_ref2) => {let { target } = _ref2;return (
4255
+ (_ref3) => {let { target } = _ref3;return (
4270
4256
  !within(target, this.$el) &&
4271
4257
  once(
4272
4258
  document,
4273
4259
  pointerUp$1 + " " + pointerCancel + " scroll",
4274
- (_ref3) => {let { defaultPrevented, type, target: newTarget } = _ref3;
4260
+ (_ref4) => {let { defaultPrevented, type, target: newTarget } = _ref4;
4275
4261
  if (
4276
4262
  !defaultPrevented &&
4277
4263
  type === pointerUp$1 &&
4278
4264
  target === newTarget &&
4279
- !(this.target && within(target, this.target)))
4265
+ !(this.targetEl && within(target, this.targetEl)))
4280
4266
  {
4281
4267
  this.hide(false);
4282
4268
  }
@@ -4295,13 +4281,12 @@
4295
4281
  [] :
4296
4282
  [preventOverscroll(this.$el), preventBackgroundScroll()]),
4297
4283
 
4298
- ...(this.display === 'static' && this.align !== 'stretch' ?
4299
- [] :
4284
+ ...(this.autoUpdate ?
4300
4285
  (() => {
4301
4286
  const handler = () => this.$emit();
4302
4287
  return [
4303
4288
  on(window, 'resize', handler),
4304
- on(document, 'scroll', handler, true),
4289
+ on([document, scrollParents(this.$el)], 'scroll', handler),
4305
4290
  (() => {
4306
4291
  const observer = observeResize(
4307
4292
  scrollParents(this.$el),
@@ -4310,7 +4295,8 @@
4310
4295
  return () => observer.disconnect();
4311
4296
  })()];
4312
4297
 
4313
- })())])
4298
+ })() :
4299
+ [])])
4314
4300
  {
4315
4301
  once(this.$el, 'hide', handler, { self: true });
4316
4302
  }
@@ -4330,7 +4316,7 @@
4330
4316
  {
4331
4317
  name: 'hide',
4332
4318
 
4333
- handler(_ref4) {let { target } = _ref4;
4319
+ handler(_ref5) {let { target } = _ref5;
4334
4320
  if (this.$el !== target) {
4335
4321
  active =
4336
4322
  active === null && within(target, this.$el) && this.isToggled() ?
@@ -4354,12 +4340,12 @@
4354
4340
 
4355
4341
 
4356
4342
  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) {
4343
+ show(target, delay) {if (target === void 0) {target = this.targetEl;}if (delay === void 0) {delay = true;}
4344
+ if (this.isToggled() && target && this.targetEl && target !== this.targetEl) {
4359
4345
  this.hide(false, false);
4360
4346
  }
4361
4347
 
4362
- this.target = target;
4348
+ this.targetEl = target;
4363
4349
 
4364
4350
  this.clearTimers();
4365
4351
 
@@ -4422,60 +4408,69 @@
4422
4408
 
4423
4409
  position() {
4424
4410
  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');
4411
+ attr(this.$el, 'style', this._style);
4427
4412
 
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);
4413
+ // Ensure none positioned element does not generate scrollbars
4414
+ this.$el.hidden = true;
4432
4415
 
4433
- const scrollParentOffset = offset(scrollParent);
4434
- const boundaryOffset = boundary ? offset(boundary) : scrollParentOffset;
4416
+ const boundary = query(this.boundary, this.$el);
4417
+ const boundaryOffset = offsetViewport(boundary || window);
4418
+ const viewports = this.target.map((target) => offsetViewport(scrollParents(target)[0]));
4435
4419
  const viewportOffset = this.getViewportOffset(this.$el);
4436
4420
 
4437
- css(this.$el, 'maxWidth', '');
4438
- const maxWidth = scrollParentOffset.width - 2 * viewportOffset;
4421
+ const dirs = [
4422
+ [0, ['x', 'width', 'left', 'right']],
4423
+ [1, ['y', 'height', 'top', 'bottom']]];
4439
4424
 
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) {
4425
+
4426
+ for (const [i, [axis, prop]] of dirs) {
4427
+ if (this.axis !== axis && includes([axis, true], this.stretch)) {
4428
+ css(this.$el, {
4429
+ [prop]: Math.min(
4430
+ boundaryOffset[prop],
4431
+ viewports[i][prop] - 2 * viewportOffset),
4432
+
4433
+ ["overflow-" + axis]: 'auto' });
4434
+
4435
+ }
4436
+ }
4437
+
4438
+ const maxWidth = viewports[0].width - 2 * viewportOffset;
4439
+
4440
+ if (this.$el.offsetWidth > maxWidth) {
4473
4441
  addClass(this.$el, this.clsDrop + "-stack");
4474
4442
  }
4475
4443
 
4476
4444
  css(this.$el, 'maxWidth', maxWidth);
4477
4445
 
4478
- this.positionAt(this.$el, target, boundary);
4446
+ this.$el.hidden = false;
4447
+
4448
+ this.positionAt(this.$el, this.target, boundary);
4449
+
4450
+ for (const [i, [axis, prop, start, end]] of dirs) {
4451
+ if (this.axis === axis && includes([axis, true], this.stretch)) {
4452
+ const positionOffset = Math.abs(this.getPositionOffset(this.$el));
4453
+ const targetOffset = offset(this.target[i]);
4454
+ const elOffset = offset(this.$el);
4455
+
4456
+ css(this.$el, {
4457
+ [prop]:
4458
+ (targetOffset[start] > elOffset[start] ?
4459
+ targetOffset[start] -
4460
+ Math.max(
4461
+ boundaryOffset[start],
4462
+ viewports[i][start] + viewportOffset) :
4463
+
4464
+ Math.min(
4465
+ boundaryOffset[end],
4466
+ viewports[i][end] - viewportOffset) -
4467
+ targetOffset[end]) - positionOffset,
4468
+ ["overflow-" + axis]: 'auto' });
4469
+
4470
+
4471
+ this.positionAt(this.$el, this.target, boundary);
4472
+ }
4473
+ }
4479
4474
  } } };
4480
4475
 
4481
4476
 
@@ -4972,8 +4967,11 @@
4972
4967
  let minHeight = '';
4973
4968
  const box = boxModelAdjust(this.$el, 'height', 'content-box');
4974
4969
 
4970
+ const { body, scrollingElement } = document;
4975
4971
  const [scrollElement] = scrollParents(this.$el, /auto|scroll/);
4976
- const { height: viewportHeight } = offsetViewport(scrollElement);
4972
+ const { height: viewportHeight } = offsetViewport(
4973
+ scrollElement === body ? scrollingElement : scrollElement);
4974
+
4977
4975
 
4978
4976
  if (this.expand) {
4979
4977
  minHeight = Math.max(
@@ -4983,7 +4981,8 @@
4983
4981
  0);
4984
4982
 
4985
4983
  } else {
4986
- const isScrollingElement = document.scrollingElement === scrollElement;
4984
+ const isScrollingElement =
4985
+ scrollingElement === scrollElement || body === scrollElement;
4987
4986
 
4988
4987
  // on mobile devices (iOS and Android) window.innerHeight !== 100vh
4989
4988
  minHeight = "calc(" + (isScrollingElement ? '100vh' : viewportHeight + "px");
@@ -5237,7 +5236,13 @@
5237
5236
 
5238
5237
  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>";
5239
5238
 
5240
- 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>";
5239
+ 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>";
5240
+
5241
+ 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>";
5242
+
5243
+ 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>";
5244
+
5245
+ 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>";
5241
5246
 
5242
5247
  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>";
5243
5248
 
@@ -5269,6 +5274,9 @@
5269
5274
  marker,
5270
5275
  'close-icon': closeIcon,
5271
5276
  'close-large': closeLarge,
5277
+ 'nav-parent-icon': navParentIcon,
5278
+ 'nav-parent-icon-large': navParentIconLarge,
5279
+ 'navbar-parent-icon': navbarParentIcon,
5272
5280
  'navbar-toggle-icon': navbarToggleIcon,
5273
5281
  'overlay-icon': overlayIcon,
5274
5282
  'pagination-next': paginationNext,
@@ -5326,6 +5334,15 @@
5326
5334
  } };
5327
5335
 
5328
5336
 
5337
+ const NavParentIcon = {
5338
+ extends: IconComponent,
5339
+
5340
+ beforeConnect() {
5341
+ const icon = this.$props.icon;
5342
+ this.icon = closest(this.$el, '.uk-nav-primary') ? icon + "-large" : icon;
5343
+ } };
5344
+
5345
+
5329
5346
  const Slidenav = {
5330
5347
  extends: IconComponent,
5331
5348
 
@@ -5586,7 +5603,7 @@
5586
5603
 
5587
5604
 
5588
5605
  connected() {
5589
- const media = toMedia(this.media);
5606
+ const media = toMedia(this.media, this.$el);
5590
5607
  this.matchMedia = true;
5591
5608
  if (media) {
5592
5609
  this.mediaObj = window.matchMedia(media);
@@ -5607,11 +5624,10 @@
5607
5624
  } };
5608
5625
 
5609
5626
 
5610
- function toMedia(value) {
5627
+ function toMedia(value, element) {
5611
5628
  if (isString(value)) {
5612
5629
  if (startsWith(value, '@')) {
5613
- const name = "breakpoint-" + value.substr(1);
5614
- value = toFloat(getCssVar(name));
5630
+ value = toFloat(css(element, "--uk-breakpoint-" + value.substr(1)));
5615
5631
  } else if (isNaN(value)) {
5616
5632
  return value;
5617
5633
  }
@@ -5636,7 +5652,7 @@
5636
5652
 
5637
5653
  computed: {
5638
5654
  fill(_ref) {let { fill } = _ref;
5639
- return fill || getCssVar('leader-fill-content');
5655
+ return fill || css(this.$el, '--uk-leader-fill-content');
5640
5656
  } },
5641
5657
 
5642
5658
 
@@ -5828,7 +5844,9 @@
5828
5844
  align: String,
5829
5845
  offset: Number,
5830
5846
  boundary: Boolean,
5831
- boundaryAlign: Boolean,
5847
+ target: Boolean,
5848
+ targetX: Boolean,
5849
+ targetY: Boolean,
5832
5850
  clsDrop: String,
5833
5851
  delayShow: Number,
5834
5852
  delayHide: Number,
@@ -5845,9 +5863,12 @@
5845
5863
  offset: undefined,
5846
5864
  delayShow: undefined,
5847
5865
  delayHide: undefined,
5848
- boundaryAlign: undefined,
5849
- flip: 'x',
5866
+ flip: false,
5867
+ shift: true,
5850
5868
  boundary: true,
5869
+ target: false,
5870
+ targetX: false,
5871
+ targetY: false,
5851
5872
  dropbar: false,
5852
5873
  dropbarAnchor: false,
5853
5874
  duration: 200,
@@ -5882,7 +5903,7 @@
5882
5903
  },
5883
5904
 
5884
5905
  watch(dropbar) {
5885
- addClass(dropbar, 'uk-navbar-dropbar');
5906
+ addClass(dropbar, 'uk-dropbar', 'uk-dropbar-top', 'uk-navbar-dropbar');
5886
5907
  },
5887
5908
 
5888
5909
  immediate: true },
@@ -5898,7 +5919,7 @@
5898
5919
 
5899
5920
  if (this.dropContainer !== $el) {
5900
5921
  for (const el of $$("." + clsDrop, this.dropContainer)) {var _this$getDropdown;
5901
- const target = (_this$getDropdown = this.getDropdown(el)) == null ? void 0 : _this$getDropdown.target;
5922
+ const target = (_this$getDropdown = this.getDropdown(el)) == null ? void 0 : _this$getDropdown.targetEl;
5902
5923
  if (!includes(dropdowns, el) && target && within(target, this.$el)) {
5903
5924
  dropdowns.push(el);
5904
5925
  }
@@ -5915,8 +5936,7 @@
5915
5936
  {
5916
5937
  ...this.$props,
5917
5938
  boundary: this.boundary,
5918
- pos: this.pos,
5919
- offset: this.dropbar || this.offset });
5939
+ pos: this.pos });
5920
5940
 
5921
5941
 
5922
5942
  },
@@ -5961,8 +5981,8 @@
5961
5981
  if (
5962
5982
  active &&
5963
5983
  includes(active.mode, 'hover') &&
5964
- active.target &&
5965
- !within(active.target, current) &&
5984
+ active.targetEl &&
5985
+ !within(active.targetEl, current) &&
5966
5986
  !active.isDelaying)
5967
5987
  {
5968
5988
  active.hide(false);
@@ -5984,7 +6004,7 @@
5984
6004
  if (keyCode === keyMap.DOWN && hasAttr(current, 'aria-expanded')) {
5985
6005
  e.preventDefault();
5986
6006
 
5987
- if (!active || active.target !== current) {
6007
+ if (!active || active.targetEl !== current) {
5988
6008
  current.click();
5989
6009
  once(this.dropContainer, 'show', (_ref8) => {let { target } = _ref8;return (
5990
6010
  focusFirstFocusableElement(target));});
@@ -6034,8 +6054,8 @@
6034
6054
  }
6035
6055
  }
6036
6056
 
6037
- if (keyCode === keyMap.ESC) {var _active$target;
6038
- active == null ? void 0 : (_active$target = active.target) == null ? void 0 : _active$target.focus();
6057
+ if (keyCode === keyMap.ESC) {var _active$targetEl;
6058
+ active == null ? void 0 : (_active$targetEl = active.targetEl) == null ? void 0 : _active$targetEl.focus();
6039
6059
  }
6040
6060
 
6041
6061
  handleNavItemNavigation(e, this.toggles, active);
@@ -6077,8 +6097,8 @@
6077
6097
  return this.dropbar;
6078
6098
  },
6079
6099
 
6080
- handler(_, _ref9) {let { $el, align } = _ref9;
6081
- if (!hasClass($el, this.clsDrop) || align === 'stretch') {
6100
+ handler(_ref9) {let { target } = _ref9;
6101
+ if (!this.isDropbarDrop(target)) {
6082
6102
  return;
6083
6103
  }
6084
6104
 
@@ -6086,7 +6106,7 @@
6086
6106
  after(this.dropbarAnchor || this.$el, this.dropbar);
6087
6107
  }
6088
6108
 
6089
- addClass($el, this.clsDrop + "-dropbar");
6109
+ addClass(target, this.clsDrop + "-dropbar");
6090
6110
  } },
6091
6111
 
6092
6112
 
@@ -6101,19 +6121,24 @@
6101
6121
  return this.dropbar;
6102
6122
  },
6103
6123
 
6104
- handler(_, _ref10) {let { $el, align } = _ref10;
6105
- if (!hasClass($el, this.clsDrop) || align === 'stretch') {
6124
+ handler(_ref10) {let { target } = _ref10;
6125
+ if (!this.isDropbarDrop(target)) {
6106
6126
  return;
6107
6127
  }
6108
6128
 
6109
- this._observer = observeResize($el, () =>
6110
- this.transitionTo(
6111
- offset($el).bottom -
6112
- offset(this.dropbar).top +
6113
- toFloat(css($el, 'marginBottom')),
6114
- $el));
6115
-
6129
+ this._observer = observeResize(target, () => {
6130
+ const targetOffsets = parents(target, "." + this.clsDrop).
6131
+ concat(target).
6132
+ map((el) => offset(el));
6133
+ const minTop = Math.min(...targetOffsets.map((_ref11) => {let { top } = _ref11;return top;}));
6134
+ const maxBottom = Math.max(...targetOffsets.map((_ref12) => {let { bottom } = _ref12;return bottom;}));
6135
+ const dropbarOffset = offset(this.dropbar);
6136
+ css(this.dropbar, 'top', this.dropbar.offsetTop - (dropbarOffset.top - minTop));
6137
+ this.transitionTo(
6138
+ maxBottom - minTop + toFloat(css(target, 'marginBottom')),
6139
+ target);
6116
6140
 
6141
+ });
6117
6142
  } },
6118
6143
 
6119
6144
 
@@ -6128,13 +6153,13 @@
6128
6153
  return this.dropbar;
6129
6154
  },
6130
6155
 
6131
- handler(e, _ref11) {let { $el } = _ref11;
6156
+ handler(e) {
6132
6157
  const active = this.getActive();
6133
6158
 
6134
6159
  if (
6135
6160
  matches(this.dropbar, ':hover') &&
6136
- (active == null ? void 0 : active.$el) === $el &&
6137
- !this.toggles.some((el) => active.target !== el && matches(el, ':focus')))
6161
+ (active == null ? void 0 : active.$el) === e.target &&
6162
+ !this.toggles.some((el) => active.targetEl !== el && matches(el, ':focus')))
6138
6163
  {
6139
6164
  e.preventDefault();
6140
6165
  }
@@ -6152,8 +6177,8 @@
6152
6177
  return this.dropbar;
6153
6178
  },
6154
6179
 
6155
- handler(_, _ref12) {let { $el, align } = _ref12;
6156
- if (!hasClass($el, this.clsDrop) || align === 'stretch') {
6180
+ handler(_ref13) {let { target } = _ref13;
6181
+ if (!this.isDropbarDrop(target)) {
6157
6182
  return;
6158
6183
  }
6159
6184
 
@@ -6161,7 +6186,7 @@
6161
6186
 
6162
6187
  const active = this.getActive();
6163
6188
 
6164
- if (!active || (active == null ? void 0 : active.$el) === $el) {
6189
+ if (!active || (active == null ? void 0 : active.$el) === target) {
6165
6190
  this.transitionTo(0);
6166
6191
  }
6167
6192
  } }],
@@ -6170,7 +6195,7 @@
6170
6195
 
6171
6196
  methods: {
6172
6197
  getActive() {
6173
- return active && within(active.target, this.$el) && active;
6198
+ return active && within(active.targetEl, this.$el) && active;
6174
6199
  },
6175
6200
 
6176
6201
  transitionTo(newHeight, el) {
@@ -6200,13 +6225,17 @@
6200
6225
 
6201
6226
  getDropdown(el) {
6202
6227
  return this.$getComponent(el, 'drop') || this.$getComponent(el, 'dropdown');
6228
+ },
6229
+
6230
+ isDropbarDrop(el) {
6231
+ return this.getDropdown(el) && hasClass(el, this.clsDrop);
6203
6232
  } } };
6204
6233
 
6205
6234
 
6206
6235
 
6207
6236
  function handleNavItemNavigation(e, toggles, active) {
6208
6237
  const { current, keyCode } = e;
6209
- const target = (active == null ? void 0 : active.target) || current;
6238
+ const target = (active == null ? void 0 : active.targetEl) || current;
6210
6239
  const i = toggles.indexOf(target);
6211
6240
 
6212
6241
  // Left
@@ -6574,6 +6603,14 @@
6574
6603
  offset: 0 },
6575
6604
 
6576
6605
 
6606
+ connected() {
6607
+ registerClick(this);
6608
+ },
6609
+
6610
+ disconnected() {
6611
+ unregisterClick(this);
6612
+ },
6613
+
6577
6614
  methods: {
6578
6615
  async scrollTo(el) {
6579
6616
  el = el && $(el) || document.body;
@@ -6582,20 +6619,39 @@
6582
6619
  await scrollIntoView(el, { offset: this.offset });
6583
6620
  trigger(this.$el, 'scrolled', [this, el]);
6584
6621
  }
6585
- } },
6622
+ } } };
6586
6623
 
6587
6624
 
6588
- events: {
6589
- click(e) {
6590
- if (e.defaultPrevented) {
6591
- return;
6592
- }
6593
6625
 
6594
- e.preventDefault();
6595
- this.scrollTo(getTargetElement(this.$el));
6596
- } } };
6626
+ const components$2 = new Set();
6627
+ function registerClick(cmp) {
6628
+ if (!components$2.size) {
6629
+ on(document, 'click', clickHandler);
6630
+ }
6631
+
6632
+ components$2.add(cmp);
6633
+ }
6634
+
6635
+ function unregisterClick(cmp) {
6636
+ components$2.delete(cmp);
6597
6637
 
6638
+ if (!components$2.length) {
6639
+ off(document, 'click', clickHandler);
6640
+ }
6641
+ }
6642
+
6643
+ function clickHandler(e) {
6644
+ if (e.defaultPrevented) {
6645
+ return;
6646
+ }
6598
6647
 
6648
+ for (const component of components$2) {
6649
+ if (within(e.target, component.$el)) {
6650
+ e.preventDefault();
6651
+ component.scrollTo(getTargetElement(component.$el));
6652
+ }
6653
+ }
6654
+ }
6599
6655
 
6600
6656
  function getTargetElement(el) {
6601
6657
  return document.getElementById(decodeURIComponent(el.hash).substring(1));
@@ -6925,7 +6981,9 @@
6925
6981
  },
6926
6982
 
6927
6983
  handler() {
6928
- if (!location.hash || scrollTop(window) === 0) {
6984
+ const { scrollingElement } = document;
6985
+
6986
+ if (!location.hash || scrollingElement.scrollTop === 0) {
6929
6987
  return;
6930
6988
  }
6931
6989
 
@@ -6934,13 +6992,11 @@
6934
6992
  const elOffset = offset(this.$el);
6935
6993
 
6936
6994
  if (this.isFixed && intersectRect(targetOffset, elOffset)) {
6937
- scrollTop(
6938
- window,
6995
+ scrollingElement.scrollTop =
6939
6996
  targetOffset.top -
6940
6997
  elOffset.height -
6941
6998
  toPx(this.targetOffset, 'height', this.placeholder) -
6942
- toPx(this.offset, 'height', this.placeholder));
6943
-
6999
+ toPx(this.offset, 'height', this.placeholder);
6944
7000
  }
6945
7001
  });
6946
7002
  } }],
@@ -7038,7 +7094,7 @@
7038
7094
 
7039
7095
 
7040
7096
  {let { scroll: prevScroll = 0, dir: prevDir = 'down', overflow, overflowScroll = 0, start, end } = _ref4;
7041
- const scroll = scrollTop(window);
7097
+ const scroll = document.scrollingElement.scrollTop;
7042
7098
  const dir = prevScroll <= scroll ? 'down' : 'up';
7043
7099
 
7044
7100
  return {
@@ -7558,7 +7614,7 @@
7558
7614
 
7559
7615
 
7560
7616
  {
7561
- name: 'toggled',
7617
+ name: 'hide show',
7562
7618
 
7563
7619
  self: true,
7564
7620
 
@@ -7566,10 +7622,8 @@
7566
7622
  return this.target;
7567
7623
  },
7568
7624
 
7569
- handler(e, toggled) {
7570
- if (e.target === this.target[0]) {
7571
- this.updateAria(toggled);
7572
- }
7625
+ handler(_ref2) {let { type } = _ref2;
7626
+ this.updateAria(type === 'show');
7573
7627
  } },
7574
7628
 
7575
7629
 
@@ -7664,10 +7718,12 @@
7664
7718
  Video: Video,
7665
7719
  Close: Close,
7666
7720
  Spinner: Spinner,
7721
+ NavParentIcon: NavParentIcon,
7667
7722
  SlidenavNext: Slidenav,
7668
7723
  SlidenavPrevious: Slidenav,
7669
7724
  SearchIcon: Search,
7670
7725
  Marker: IconComponent,
7726
+ NavbarParentIcon: IconComponent,
7671
7727
  NavbarToggleIcon: IconComponent,
7672
7728
  OverlayIcon: IconComponent,
7673
7729
  PaginationNext: IconComponent,
@@ -8157,7 +8213,7 @@
8157
8213
 
8158
8214
  },
8159
8215
 
8160
- setState(state, animate) {if (animate === void 0) {animate = true;}
8216
+ async setState(state, animate) {if (animate === void 0) {animate = true;}
8161
8217
  state = { filter: { '': '' }, sort: [], ...state };
8162
8218
 
8163
8219
  trigger(this.$el, 'beforeFilter', [this, state]);
@@ -8166,15 +8222,17 @@
8166
8222
  toggleClass(el, this.cls, !!matchFilter(el, this.attrItem, state)));
8167
8223
 
8168
8224
 
8169
- Promise.all(
8225
+ await Promise.all(
8170
8226
  $$(this.target, this.$el).map((target) => {
8171
8227
  const filterFn = () => {
8172
8228
  applyState(state, target, children(target));
8173
8229
  this.$update(this.$el);
8174
8230
  };
8175
8231
  return animate ? this.animate(filterFn, target) : filterFn();
8176
- })).
8177
- then(() => trigger(this.$el, 'afterFilter', [this]));
8232
+ }));
8233
+
8234
+
8235
+ trigger(this.$el, 'afterFilter', [this]);
8178
8236
  },
8179
8237
 
8180
8238
  updateState() {
@@ -10937,7 +10995,7 @@
10937
10995
  let last = Date.now();
10938
10996
  trackTimer = setInterval(() => {
10939
10997
  let { x, y } = pos;
10940
- y += scrollTop(window);
10998
+ y += document.scrollingElement.scrollTop;
10941
10999
 
10942
11000
  const dist = (Date.now() - last) * 0.3;
10943
11001
  last = Date.now();
@@ -10958,7 +11016,7 @@
10958
11016
  }
10959
11017
 
10960
11018
  if (scroll > 0 && scroll < scrollHeight - height) {
10961
- scrollTop(scrollEl, scroll);
11019
+ scrollEl.scrollTop = scroll;
10962
11020
  return true;
10963
11021
  }
10964
11022
  });