uikit 3.14.4-dev.10a07fe5a → 3.14.4-dev.154737924

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 (137) hide show
  1. package/CHANGELOG.md +41 -12
  2. package/build/util.js +1 -0
  3. package/dist/css/uikit-core-rtl.css +380 -102
  4. package/dist/css/uikit-core-rtl.min.css +1 -1
  5. package/dist/css/uikit-core.css +380 -102
  6. package/dist/css/uikit-core.min.css +1 -1
  7. package/dist/css/uikit-rtl.css +397 -107
  8. package/dist/css/uikit-rtl.min.css +1 -1
  9. package/dist/css/uikit.css +397 -107
  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 +117 -138
  16. package/dist/js/components/lightbox-panel.min.js +1 -1
  17. package/dist/js/components/lightbox.js +117 -138
  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 +113 -136
  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 +518 -453
  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 +571 -489
  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 +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 +10 -7
  64. package/src/js/mixin/position.js +26 -11
  65. package/src/js/mixin/slider-drag.js +20 -8
  66. package/src/js/mixin/style.js +11 -0
  67. package/src/js/mixin/togglable.js +95 -133
  68. package/src/js/util/animation.js +4 -3
  69. package/src/js/util/dimensions.js +6 -6
  70. package/src/js/util/filter.js +3 -7
  71. package/src/js/util/position.js +108 -107
  72. package/src/js/util/style.js +4 -13
  73. package/src/js/util/viewport.js +5 -32
  74. package/src/less/components/_import.less +1 -0
  75. package/src/less/components/drop.less +1 -18
  76. package/src/less/components/dropbar.less +115 -0
  77. package/src/less/components/dropdown.less +16 -16
  78. package/src/less/components/leader.less +1 -1
  79. package/src/less/components/nav.less +240 -63
  80. package/src/less/components/navbar.less +73 -28
  81. package/src/less/components/utility.less +21 -4
  82. package/src/less/theme/_import.less +1 -0
  83. package/src/less/theme/dropbar.less +44 -0
  84. package/src/less/theme/dropdown.less +0 -11
  85. package/src/less/theme/nav.less +43 -9
  86. package/src/less/theme/navbar.less +4 -10
  87. package/src/scss/components/_import.scss +1 -0
  88. package/src/scss/components/drop.scss +1 -18
  89. package/src/scss/components/dropbar.scss +115 -0
  90. package/src/scss/components/dropdown.scss +16 -16
  91. package/src/scss/components/leader.scss +1 -1
  92. package/src/scss/components/nav.scss +189 -51
  93. package/src/scss/components/navbar.scss +61 -28
  94. package/src/scss/components/utility.scss +19 -3
  95. package/src/scss/mixins-theme.scss +93 -25
  96. package/src/scss/mixins.scss +89 -17
  97. package/src/scss/theme/_import.scss +1 -0
  98. package/src/scss/theme/dropbar.scss +44 -0
  99. package/src/scss/theme/dropdown.scss +0 -8
  100. package/src/scss/theme/nav.scss +41 -9
  101. package/src/scss/theme/navbar.scss +4 -7
  102. package/src/scss/variables-theme.scss +69 -17
  103. package/src/scss/variables.scss +58 -13
  104. package/tests/accordion.html +2 -2
  105. package/tests/alert.html +2 -2
  106. package/tests/countdown.html +1 -1
  107. package/tests/drop.html +451 -371
  108. package/tests/dropbar.html +456 -0
  109. package/tests/dropdown.html +26 -401
  110. package/tests/filter.html +9 -12
  111. package/tests/form.html +1 -1
  112. package/tests/index.html +126 -107
  113. package/tests/js/index.js +1 -4
  114. package/tests/lightbox.html +5 -5
  115. package/tests/list.html +8 -8
  116. package/tests/modal.html +13 -13
  117. package/tests/nav.html +117 -75
  118. package/tests/navbar.html +2001 -1130
  119. package/tests/offcanvas.html +17 -21
  120. package/tests/parallax.html +1 -1
  121. package/tests/position.html +18 -16
  122. package/tests/progress.html +9 -9
  123. package/tests/scroll.html +7 -10
  124. package/tests/search.html +5 -5
  125. package/tests/slider.html +6 -5
  126. package/tests/slideshow.html +8 -8
  127. package/tests/sortable.html +6 -8
  128. package/tests/sticky-navbar.html +6 -6
  129. package/tests/sticky.html +8 -8
  130. package/tests/switcher.html +1 -1
  131. package/tests/tab.html +1 -1
  132. package/tests/table.html +7 -7
  133. package/tests/toggle.html +2 -2
  134. package/tests/tooltip.html +1 -1
  135. package/tests/upload.html +11 -11
  136. package/tests/utility.html +19 -0
  137. package/src/images/backgrounds/nav-parent-close.svg +0 -3
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.14.4-dev.10a07fe5a | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
1
+ /*! UIkit 3.14.4-dev.154737924 | 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
  }
@@ -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];
@@ -1962,126 +1933,65 @@
1962
1933
  ...options.attach },
1963
1934
 
1964
1935
  offset: [0, 0],
1936
+ placement: [],
1965
1937
  ...options };
1966
1938
 
1967
1939
 
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];
1940
+ if (!isArray(target)) {
1941
+ target = [target, target];
1995
1942
  }
1996
- return position;
1997
- }
1998
1943
 
1999
- function moveBy(start, end, dim) {
2000
- return start === 'center' ? dim / 2 : start === end ? dim : 0;
1944
+ offset(element, getPosition(element, target, options));
2001
1945
  }
2002
1946
 
2003
- function attachToWithFlip(element, target, options) {
1947
+ function getPosition(element, target, options) {
2004
1948
  const position = attachTo(element, target, options);
2005
- const targetDim = offset(target);
2006
1949
 
2007
1950
  let {
2008
- flip,
2009
1951
  attach: { element: elAttach, target: targetAttach },
2010
1952
  offset: elOffset,
2011
1953
  boundary,
2012
- viewport,
2013
- viewportOffset } =
1954
+ viewportOffset,
1955
+ placement } =
2014
1956
  options;
2015
1957
 
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);
2022
-
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
- }
1958
+ let offsetPosition = position;
1959
+ for (const [i, [prop,, start, end]] of Object.entries(dirs)) {
1960
+ let viewports = scrollParents(target[i]);
1961
+ const [scrollElement] = viewports;
2028
1962
 
2029
- const willFlip =
2030
- !intersectLine(position, targetDim, i) && intersectLine(position, targetDim, 1 - i);
2031
-
2032
- viewport = getIntersectionArea(...viewports.filter(Boolean).map(offsetViewport));
1963
+ let viewport = getIntersectionArea(...viewports.map(offsetViewport));
2033
1964
 
2034
1965
  if (viewportOffset) {
2035
1966
  viewport[start] += viewportOffset;
2036
1967
  viewport[end] -= viewportOffset;
2037
1968
  }
2038
1969
 
2039
- if (boundary && !willFlip && position[prop] <= offset(boundary)[prop]) {
2040
- viewport = getIntersectionArea(viewport, offset(boundary));
1970
+ if (boundary) {
1971
+ viewport = getIntersectionArea(viewport, offsetViewport(boundary));
2041
1972
  }
2042
1973
 
2043
- const isInStartBoundary = position[start] >= viewport[start];
2044
- const isInEndBoundary = position[end] <= viewport[end];
1974
+ const isInStartViewport = position[start] >= viewport[start];
1975
+ const isInEndViewport = position[end] <= viewport[end];
2045
1976
 
2046
- if (isInStartBoundary && isInEndBoundary) {
1977
+ if (isInStartViewport && isInEndViewport) {
2047
1978
  continue;
2048
1979
  }
2049
1980
 
2050
- let offsetBy;
1981
+ let offsetBy = 0;
2051
1982
 
2052
1983
  // Flip
2053
- if (willFlip) {
1984
+ if (placement[i] === 'flip') {
2054
1985
  if (
2055
- elAttach[i] === end && isInStartBoundary ||
2056
- elAttach[i] === start && isInEndBoundary)
1986
+ targetAttach[i] === end && isInEndViewport ||
1987
+ targetAttach[i] === start && isInStartViewport)
2057
1988
  {
2058
1989
  continue;
2059
1990
  }
2060
1991
 
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))
1992
+ offsetBy = flip(element, target, options, i)[start] - position[start];
2083
1993
 
2084
- {
1994
+ if (!isInScrollArea(applyOffset(position, offsetBy, i), scrollElement, i)) {
2085
1995
  if (isInScrollArea(position, scrollElement, i)) {
2086
1996
  continue;
2087
1997
  }
@@ -2090,26 +2000,27 @@
2090
2000
  return false;
2091
2001
  }
2092
2002
 
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() },
2003
+ const newPos = getPosition(element, target, {
2004
+ ...options,
2005
+ attach: {
2006
+ element: elAttach.map(flipAxis).reverse(),
2007
+ target: targetAttach.map(flipAxis).reverse() },
2099
2008
 
2100
- offset: elOffset.reverse(),
2101
- flip: flip === true ? flip : [...flip, dirs[1 - i][1]],
2102
- recursion: true });
2009
+ offset: elOffset.reverse(),
2010
+ placement: placement.reverse(),
2011
+ recursion: true });
2103
2012
 
2104
2013
 
2105
- if (newPos && isInScrollArea(newPos, scrollElement, 1 - i)) {
2106
- return newPos;
2107
- }
2014
+ if (newPos && isInScrollArea(newPos, scrollElement, 1 - i)) {
2015
+ return newPos;
2108
2016
  }
2017
+
2018
+ continue;
2109
2019
  }
2110
2020
 
2111
- // Move
2112
- } else {
2021
+ // Shift
2022
+ } else if (placement[i] === 'shift') {
2023
+ const targetDim = offset(target[i]);
2113
2024
  offsetBy =
2114
2025
  clamp(
2115
2026
  clamp(position[start], viewport[start], viewport[end] - position[prop]),
@@ -2118,13 +2029,54 @@
2118
2029
  position[start];
2119
2030
  }
2120
2031
 
2121
- offsetPosition[start] = position[dir] = position[start] + offsetBy;
2122
- offsetPosition[end] += offsetBy;
2032
+ offsetPosition = applyOffset(offsetPosition, offsetBy, i);
2123
2033
  }
2124
2034
 
2125
2035
  return offsetPosition;
2126
2036
  }
2127
2037
 
2038
+ function attachTo(element, target, options) {
2039
+ let { attach, offset: offsetBy } = {
2040
+ attach: {
2041
+ element: ['left', 'top'],
2042
+ target: ['left', 'top'],
2043
+ ...options.attach },
2044
+
2045
+ offset: [0, 0],
2046
+ ...options };
2047
+
2048
+
2049
+ let elOffset = offset(element);
2050
+
2051
+ for (const [i, [prop,, start, end]] of Object.entries(dirs)) {
2052
+ const targetOffset =
2053
+ attach.target[i] === attach.element[i] ? offsetViewport(target[i]) : offset(target[i]);
2054
+
2055
+ elOffset = applyOffset(
2056
+ elOffset,
2057
+ targetOffset[start] -
2058
+ elOffset[start] +
2059
+ moveBy(attach.target[i], end, targetOffset[prop]) -
2060
+ moveBy(attach.element[i], end, elOffset[prop]) +
2061
+ +offsetBy[i],
2062
+ i);
2063
+
2064
+ }
2065
+ return elOffset;
2066
+ }
2067
+
2068
+ function applyOffset(position, offset, i) {
2069
+ const [, dir, start, end] = dirs[i];
2070
+ const newPos = { ...position };
2071
+ newPos[start] = position[dir] = position[start] + offset;
2072
+ newPos[end] += offset;
2073
+ return newPos;
2074
+ }
2075
+
2076
+ function moveBy(attach, end, dim) {
2077
+ return attach === 'center' ? dim / 2 : attach === end ? dim : 0;
2078
+ }
2079
+
2128
2080
  function getIntersectionArea() {
2129
2081
  let area = {};for (var _len = arguments.length, rects = new Array(_len), _key = 0; _key < _len; _key++) {rects[_key] = arguments[_key];}
2130
2082
  for (const rect of rects) {
@@ -2145,12 +2097,32 @@
2145
2097
  return position[start] >= viewport[start] && position[end] <= viewport[end];
2146
2098
  }
2147
2099
 
2148
- function intersectLine(dimA, dimB, dir) {
2149
- const [,, start, end] = dirs[dir];
2150
- return dimA[end] > dimB[start] && dimB[end] > dimA[start];
2100
+ function flip(element, target, _ref, i) {let { offset, attach } = _ref;
2101
+ return attachTo(element, target, {
2102
+ attach: {
2103
+ element: flipAttach(attach.element, i),
2104
+ target: flipAttach(attach.target, i) },
2105
+
2106
+ offset: flipOffset(offset, i) });
2107
+
2108
+ }
2109
+
2110
+ function flipAttach(attach, i) {
2111
+ const newAttach = [...attach];
2112
+ const index = dirs[i].indexOf(attach[i]);
2113
+ if (~index) {
2114
+ newAttach[i] = dirs[i][1 - index % 2 + 2];
2115
+ }
2116
+ return newAttach;
2151
2117
  }
2152
2118
 
2153
- function flipDir(prop) {
2119
+ function flipOffset(offset, i) {
2120
+ offset = [...offset];
2121
+ offset[i] *= -1;
2122
+ return offset;
2123
+ }
2124
+
2125
+ function flipAxis(prop) {
2154
2126
  for (let i = 0; i < dirs.length; i++) {
2155
2127
  const index = dirs[i].indexOf(prop);
2156
2128
  if (~index) {
@@ -2165,7 +2137,7 @@
2165
2137
  getImage: getImage,
2166
2138
  transition: transition,
2167
2139
  Transition: Transition,
2168
- animate: animate$1,
2140
+ animate: animate$2,
2169
2141
  Animation: Animation,
2170
2142
  attr: attr,
2171
2143
  hasAttr: hasAttr,
@@ -2295,10 +2267,8 @@
2295
2267
  findAll: findAll,
2296
2268
  escape: escape,
2297
2269
  css: css,
2298
- getCssVar: getCssVar,
2299
2270
  propName: propName,
2300
2271
  isInView: isInView,
2301
- scrollTop: scrollTop,
2302
2272
  scrollIntoView: scrollIntoView,
2303
2273
  scrolledOver: scrolledOver,
2304
2274
  scrollParents: scrollParents,
@@ -2621,7 +2591,7 @@
2621
2591
 
2622
2592
  value = props[key] === Boolean && value === '' ? true : coerce$1(props[key], value);
2623
2593
 
2624
- if (prop === 'target' && (!value || startsWith(value, '_'))) {
2594
+ if (prop === 'target' && startsWith(value, '_')) {
2625
2595
  continue;
2626
2596
  }
2627
2597
 
@@ -2632,7 +2602,7 @@
2632
2602
 
2633
2603
  for (const key in options) {
2634
2604
  const prop = camelize(key);
2635
- if (props[prop] !== undefined) {
2605
+ if (!isUndefined(props[prop])) {
2636
2606
  data$1[prop] = coerce$1(props[prop], options[key]);
2637
2607
  }
2638
2608
  }
@@ -2961,7 +2931,7 @@
2961
2931
  UIkit.data = '__uikit__';
2962
2932
  UIkit.prefix = 'uk-';
2963
2933
  UIkit.options = {};
2964
- UIkit.version = '3.14.4-dev.10a07fe5a';
2934
+ UIkit.version = '3.14.4-dev.154737924';
2965
2935
 
2966
2936
  globalAPI(UIkit);
2967
2937
  hooksAPI(UIkit);
@@ -3066,27 +3036,7 @@
3066
3036
  origin: false,
3067
3037
  transition: 'ease',
3068
3038
  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
-
3039
+ clsLeave: 'uk-togglabe-leave' },
3090
3040
 
3091
3041
 
3092
3042
  computed: {
@@ -3095,7 +3045,7 @@
3095
3045
  },
3096
3046
 
3097
3047
  hasTransition(_ref2) {let { animation } = _ref2;
3098
- return startsWith(animation[0], 'slide');
3048
+ return ['slide', 'reveal'].some((transition) => startsWith(animation[0], transition));
3099
3049
  } },
3100
3050
 
3101
3051
 
@@ -3188,130 +3138,98 @@
3188
3138
  };
3189
3139
  }
3190
3140
 
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(cmp);
3199
- }
3200
-
3201
- function slide(_ref4)
3141
+ function toggleTransition(cmp) {var _cmp$animation$;
3142
+ const [mode = 'reveal', startProp = 'top'] = ((_cmp$animation$ = cmp.animation[0]) == null ? void 0 : _cmp$animation$.split('-')) || [];
3202
3143
 
3144
+ const dirs = [
3145
+ ['left', 'right'],
3146
+ ['top', 'bottom']];
3203
3147
 
3148
+ const dir = dirs[includes(dirs[0], startProp) ? 0 : 1];
3149
+ const end = dir[1] === startProp;
3150
+ const props = ['width', 'height'];
3151
+ const dimProp = props[dirs.indexOf(dir)];
3152
+ const marginProp = "margin-" + dir[0];
3153
+ const marginStartProp = "margin-" + startProp;
3204
3154
 
3155
+ return async (el, show) => {
3156
+ let { duration, velocity, transition, _toggle } = cmp;
3205
3157
 
3158
+ let currentDim = dimensions(el)[dimProp];
3206
3159
 
3207
-
3208
-
3209
- {let { isToggled, duration, velocity, initProps, hideProps, transition, _toggle } = _ref4;
3210
- return (el, show) => {
3211
3160
  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;
3161
+ await Transition.cancel(el);
3218
3162
 
3219
- const props = inProgress ? css(el, Object.keys(initProps)) : show ? hideProps : initProps;
3220
-
3221
- Transition.cancel(el);
3222
-
3223
- if (!isToggled(el)) {
3163
+ if (show) {
3224
3164
  _toggle(el, true);
3225
3165
  }
3226
3166
 
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
- }
3167
+ const prevProps = Object.fromEntries(
3168
+ ['padding', 'border', 'width', 'height', 'overflow', marginProp, marginStartProp].map(
3169
+ (key) => [key, el.style[key]]));
3254
3170
 
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
3171
 
3260
- Transition.cancel(el);
3261
3172
 
3262
- const [scrollElement] = scrollParents(el);
3263
- css(scrollElement, 'overflowX', 'hidden');
3173
+ const dim = dimensions(el);
3174
+ const currentMargin = toFloat(css(el, marginProp));
3175
+ const marginStart = toFloat(css(el, marginStartProp));
3176
+ const endDim = dim[dimProp] + marginStart;
3177
+ const overflow = getOverflow(el);
3264
3178
 
3265
- if (!isToggled(el)) {
3266
- _toggle(el, true);
3179
+ if (!inProgress && !show) {
3180
+ currentDim += marginStart;
3267
3181
  }
3268
3182
 
3269
- const width = toFloat(css(el, 'width'));
3270
- duration = velocity * width + duration;
3183
+ const [wrapper] = wrapInner(el, '<div>');
3184
+ css(wrapper, {
3185
+ boxSizing: 'border-box',
3186
+ height: dim.height,
3187
+ width: dim.width,
3188
+ ...css(el, [
3189
+ 'padding',
3190
+ 'borderTop',
3191
+ 'borderRight',
3192
+ 'borderBottom',
3193
+ 'borderLeft',
3194
+ 'borderImage',
3195
+ marginStartProp]) });
3271
3196
 
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
3197
 
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
3198
 
3199
+ css(el, {
3200
+ overflow,
3201
+ padding: 0,
3202
+ border: 0,
3203
+ [marginStartProp]: 0,
3204
+ width: dim.width,
3205
+ height: dim.height,
3206
+ [dimProp]: currentDim });
3286
3207
 
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
3208
 
3295
- duration * (1 - percent / 100),
3296
- transition) :
3209
+ const percent = currentDim / endDim;
3210
+ duration = (velocity * endDim + duration) * (show ? 1 - percent : percent);
3211
+ const endProps = { [dimProp]: show ? endDim : 0 };
3297
3212
 
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%)" :
3213
+ if (end) {
3214
+ css(el, marginProp, endDim - currentDim + currentMargin);
3215
+ endProps[marginProp] = show ? currentMargin : endDim + currentMargin;
3216
+ }
3303
3217
 
3218
+ if (!end ^ mode === 'reveal') {
3219
+ css(wrapper, marginProp, -endDim + currentDim);
3220
+ Transition.start(wrapper, { [marginProp]: show ? 0 : -endDim }, duration, transition);
3221
+ }
3304
3222
 
3305
- '',
3306
- marginLeft: (right ? 1 : -1) * width },
3223
+ try {
3224
+ await Transition.start(el, endProps, duration, transition);
3225
+ } finally {
3226
+ css(el, prevProps);
3227
+ unwrap(wrapper.firstChild);
3307
3228
 
3308
- duration * (percent / 100),
3309
- transition).
3310
- then(() => _toggle(el, false))).
3311
- then(() => {
3312
- css(scrollElement, 'overflowX', '');
3313
- css(el, { clipPath: '', marginLeft: '' });
3314
- });
3229
+ if (!show) {
3230
+ _toggle(el, false);
3231
+ }
3232
+ }
3315
3233
  };
3316
3234
  }
3317
3235
 
@@ -3332,10 +3250,25 @@
3332
3250
  };
3333
3251
  }
3334
3252
 
3253
+ function getOverflow(el) {
3254
+ return [
3255
+ ['X', 'Width'],
3256
+ ['Y', 'Height']].
3257
+
3258
+ map((_ref4) => {let [axis, prop] = _ref4;return (
3259
+ includes(['auto', 'scroll'], css(el, "overflow" + axis)) &&
3260
+ el["scroll" + prop] > el["client" + prop] ?
3261
+ 'scroll' :
3262
+ 'hidden');}).
3263
+
3264
+ join(' ');
3265
+ }
3266
+
3335
3267
  var Accordion = {
3336
3268
  mixins: [Class, Lazyload, Togglable],
3337
3269
 
3338
3270
  props: {
3271
+ animation: Boolean,
3339
3272
  targets: String,
3340
3273
  active: null,
3341
3274
  collapsible: Boolean,
@@ -3348,7 +3281,7 @@
3348
3281
  data: {
3349
3282
  targets: '> *',
3350
3283
  active: false,
3351
- animation: ['slide'],
3284
+ animation: true,
3352
3285
  collapsible: true,
3353
3286
  multiple: false,
3354
3287
  clsOpen: 'uk-open',
@@ -3394,7 +3327,7 @@
3394
3327
  hide(
3395
3328
  el,
3396
3329
  !hasClass(
3397
- this.items.find((item) => item.contains(el)),
3330
+ this.items.find((item) => within(el, item)),
3398
3331
  this.clsOpen));
3399
3332
 
3400
3333
 
@@ -3446,23 +3379,15 @@
3446
3379
  toggleClass(el, this.clsOpen, show);
3447
3380
  attr($(this.$props.toggle, el), 'aria-expanded', show);
3448
3381
 
3449
- const content = $("" + (el._wrapper ? '> * ' : '') + this.content, el);
3382
+ const content = $(this.content, el);
3450
3383
 
3451
- if (animate === false || !this.hasTransition) {
3384
+ if (animate === false || !this.animation) {
3385
+ content.hidden = !show;
3452
3386
  hide(content, !show);
3453
3387
  return;
3454
3388
  }
3455
3389
 
3456
- if (!el._wrapper) {
3457
- el._wrapper = wrapAll(content, "<div" + (show ? ' hidden' : '') + ">");
3458
- }
3459
-
3460
- hide(content, false);
3461
- await slide(this)(el._wrapper, show);
3462
- hide(content, !show);
3463
-
3464
- delete el._wrapper;
3465
- unwrap(content);
3390
+ await toggleTransition(this)(content, show);
3466
3391
 
3467
3392
  if (show) {
3468
3393
  const toggle = $(this.$props.toggle, el);
@@ -3488,18 +3413,17 @@
3488
3413
  args: 'animation',
3489
3414
 
3490
3415
  props: {
3416
+ animation: Boolean,
3491
3417
  close: String },
3492
3418
 
3493
3419
 
3494
3420
  data: {
3495
- animation: ['slide'],
3421
+ animation: true,
3496
3422
  selClose: '.uk-alert-close',
3497
- duration: 150,
3498
- hideProps: { opacity: 0, ...Togglable.data.hideProps } },
3423
+ duration: 150 },
3499
3424
 
3500
3425
 
3501
- events: [
3502
- {
3426
+ events: {
3503
3427
  name: 'click',
3504
3428
 
3505
3429
  delegate() {
@@ -3509,16 +3433,39 @@
3509
3433
  handler(e) {
3510
3434
  e.preventDefault();
3511
3435
  this.close();
3512
- } }],
3513
-
3436
+ } },
3514
3437
 
3515
3438
 
3516
3439
  methods: {
3517
3440
  async close() {
3518
- await this.toggleElement(this.$el);
3441
+ await this.toggleElement(this.$el, false, animate$1(this));
3519
3442
  this.$destroy(true);
3520
3443
  } } };
3521
3444
 
3445
+
3446
+
3447
+ function animate$1(_ref) {let { duration, transition, velocity } = _ref;
3448
+ return (el) => {
3449
+ const height = toFloat(css(el, 'height'));
3450
+ css(el, 'height', height);
3451
+ return Transition.start(
3452
+ el,
3453
+ {
3454
+ height: 0,
3455
+ marginTop: 0,
3456
+ marginBottom: 0,
3457
+ paddingTop: 0,
3458
+ paddingBottom: 0,
3459
+ borderTop: 0,
3460
+ borderBottom: 0,
3461
+ opacity: 0 },
3462
+
3463
+ velocity * height + duration,
3464
+ transition);
3465
+
3466
+ };
3467
+ }
3468
+
3522
3469
  var Video = {
3523
3470
  args: 'autoplay',
3524
3471
 
@@ -3667,13 +3614,17 @@
3667
3614
  props: {
3668
3615
  pos: String,
3669
3616
  offset: null,
3670
- flip: Boolean },
3617
+ flip: Boolean,
3618
+ shift: Boolean,
3619
+ inset: Boolean },
3671
3620
 
3672
3621
 
3673
3622
  data: {
3674
3623
  pos: "bottom-" + (isRtl ? 'right' : 'left'),
3624
+ offset: false,
3675
3625
  flip: true,
3676
- offset: false },
3626
+ shift: true,
3627
+ inset: false },
3677
3628
 
3678
3629
 
3679
3630
  connected() {
@@ -3685,19 +3636,24 @@
3685
3636
  methods: {
3686
3637
  positionAt(element, target, boundary) {
3687
3638
  let offset = [this.getPositionOffset(element), this.getShiftOffset(element)];
3639
+ const placement = [this.flip && 'flip', this.shift && 'shift'];
3688
3640
 
3689
3641
  const attach = {
3690
- element: [flipPosition(this.dir), this.align],
3642
+ element: [this.inset ? this.dir : flipPosition(this.dir), this.align],
3691
3643
  target: [this.dir, this.align] };
3692
3644
 
3693
3645
 
3694
3646
  if (this.axis === 'y') {
3695
3647
  for (const prop in attach) {
3696
- attach[prop] = attach[prop].reverse();
3648
+ attach[prop].reverse();
3697
3649
  }
3698
- offset = offset.reverse();
3650
+ offset.reverse();
3651
+ placement.reverse();
3699
3652
  }
3700
3653
 
3654
+ const [scrollElement] = scrollParents(element, /auto|scroll/);
3655
+ const { scrollTop, scrollLeft } = scrollElement;
3656
+
3701
3657
  // Ensure none positioned element does not generate scrollbars
3702
3658
  const elDim = dimensions(element);
3703
3659
  css(element, { top: -elDim.height, left: -elDim.width });
@@ -3706,35 +3662,50 @@
3706
3662
  attach,
3707
3663
  offset,
3708
3664
  boundary,
3709
- flip: this.flip,
3665
+ placement,
3710
3666
  viewportOffset: this.getViewportOffset(element) });
3711
3667
 
3668
+
3669
+ // Restore scroll position
3670
+ scrollElement.scrollTop = scrollTop;
3671
+ scrollElement.scrollLeft = scrollLeft;
3712
3672
  },
3713
3673
 
3714
3674
  getPositionOffset(element) {
3715
3675
  return (
3716
3676
  toPx(
3717
- this.offset === false ? getCssVar('position-offset', element) : this.offset,
3677
+ this.offset === false ? css(element, '--uk-position-offset') : this.offset,
3718
3678
  this.axis === 'x' ? 'width' : 'height',
3719
3679
  element) * (
3720
- includes(['left', 'top'], this.dir) ? -1 : 1));
3680
+
3681
+ includes(['left', 'top'], this.dir) ? -1 : 1) * (
3682
+ this.inset ? -1 : 1));
3721
3683
 
3722
3684
  },
3723
3685
 
3724
3686
  getShiftOffset(element) {
3725
- return includes(['center', 'justify', 'stretch'], this.align) ?
3687
+ return this.align === 'center' ?
3726
3688
  0 :
3727
3689
  toPx(
3728
- getCssVar('position-shift-offset', element),
3690
+ css(element, '--uk-position-shift-offset'),
3729
3691
  this.axis === 'y' ? 'width' : 'height',
3730
3692
  element) * (
3731
3693
  includes(['left', 'top'], this.align) ? 1 : -1);
3732
3694
  },
3733
3695
 
3734
3696
  getViewportOffset(element) {
3735
- return toPx(getCssVar('position-viewport-offset', element));
3697
+ return toPx(css(element, '--uk-position-viewport-offset'));
3736
3698
  } } };
3737
3699
 
3700
+ var Style = {
3701
+ beforeConnect() {
3702
+ this._style = attr(this.$el, 'style');
3703
+ },
3704
+
3705
+ disconnected() {
3706
+ attr(this.$el, 'style', this._style);
3707
+ } };
3708
+
3738
3709
  const active$1 = [];
3739
3710
 
3740
3711
  var Modal = {
@@ -3837,15 +3808,15 @@
3837
3808
  this.$el,
3838
3809
  'hide',
3839
3810
  on(document, 'focusin', (e) => {
3840
- if (!within(e.target, this.panel)) {
3811
+ if (last(active$1) === this && !within(e.target, this.$el)) {
3841
3812
  this.$el.focus();
3842
3813
  }
3843
3814
  }));
3844
3815
 
3845
3816
 
3846
3817
  if (this.overlay) {
3847
- once(this.$el, 'hide', preventOverscroll(this.$el));
3848
- once(this.$el, 'hide', preventBackgroundScroll());
3818
+ once(this.$el, 'hidden', preventOverscroll(this.$el), { self: true });
3819
+ once(this.$el, 'hidden', preventBackgroundScroll(), { self: true });
3849
3820
  }
3850
3821
 
3851
3822
  if (this.stack) {
@@ -3927,10 +3898,6 @@
3927
3898
  active$1.splice(active$1.indexOf(this), 1);
3928
3899
  }
3929
3900
 
3930
- if (!active$1.length) {
3931
- css(document.body, 'overflowY', '');
3932
- }
3933
-
3934
3901
  css(this.$el, 'zIndex', '');
3935
3902
 
3936
3903
  if (!active$1.some((modal) => modal.clsPage === this.clsPage)) {
@@ -4047,7 +4014,12 @@
4047
4014
  return () => events.forEach((fn) => fn());
4048
4015
  }
4049
4016
 
4017
+ let prevented;
4050
4018
  function preventBackgroundScroll() {
4019
+ if (prevented) {
4020
+ return noop;
4021
+ }
4022
+ prevented = true;
4051
4023
  const { body, documentElement } = document;
4052
4024
  css(body, {
4053
4025
  overflowY: width(window) > documentElement.clientWidth ? 'scroll' : '',
@@ -4055,6 +4027,7 @@
4055
4027
 
4056
4028
  css(documentElement, 'overflowY', 'hidden');
4057
4029
  return () => {
4030
+ prevented = false;
4058
4031
  css(documentElement, 'overflowY', '');
4059
4032
  css(body, { overflowY: '', touchAction: '' });
4060
4033
  };
@@ -4073,7 +4046,7 @@
4073
4046
  let active;
4074
4047
 
4075
4048
  var drop = {
4076
- mixins: [Container, Lazyload, Position, Togglable],
4049
+ mixins: [Container, Lazyload, Position, Style, Togglable],
4077
4050
 
4078
4051
  args: 'pos',
4079
4052
 
@@ -4081,7 +4054,10 @@
4081
4054
  mode: 'list',
4082
4055
  toggle: Boolean,
4083
4056
  boundary: Boolean,
4084
- boundaryAlign: Boolean,
4057
+ target: Boolean,
4058
+ targetX: Boolean,
4059
+ targetY: Boolean,
4060
+ stretch: Boolean,
4085
4061
  delayShow: Number,
4086
4062
  delayHide: Number,
4087
4063
  display: String,
@@ -4093,17 +4069,32 @@
4093
4069
  data: {
4094
4070
  mode: ['click', 'hover'],
4095
4071
  toggle: '- *',
4096
- boundary: true,
4097
- boundaryAlign: false,
4072
+ boundary: false,
4073
+ target: false,
4074
+ targetX: false,
4075
+ targetY: false,
4076
+ stretch: false,
4098
4077
  delayShow: 0,
4099
4078
  delayHide: 800,
4100
4079
  display: null,
4101
4080
  clsDrop: false,
4081
+ animateOut: false,
4082
+ bgScroll: true,
4102
4083
  animation: ['uk-animation-fade'],
4103
4084
  cls: 'uk-open',
4104
- container: false,
4105
- animateOut: false,
4106
- bgScroll: true },
4085
+ container: false },
4086
+
4087
+
4088
+ computed: {
4089
+ target(_ref, $el) {let { target, targetX, targetY } = _ref;
4090
+ targetX = targetX || target || this.targetEl;
4091
+ targetY = targetY || target || this.targetEl;
4092
+
4093
+ return [
4094
+ targetX === true ? window : query(targetX, $el),
4095
+ targetY === true ? window : query(targetY, $el)];
4096
+
4097
+ } },
4107
4098
 
4108
4099
 
4109
4100
  created() {
@@ -4117,13 +4108,13 @@
4117
4108
  connected() {
4118
4109
  addClass(this.$el, this.clsDrop);
4119
4110
 
4120
- if (this.toggle && !this.target) {
4121
- this.target = this.$create('toggle', query(this.toggle, this.$el), {
4111
+ if (this.toggle && !this.targetEl) {
4112
+ this.targetEl = this.$create('toggle', query(this.toggle, this.$el), {
4122
4113
  target: this.$el,
4123
4114
  mode: this.mode }).
4124
4115
  $el;
4125
- attr(this.target, 'aria-haspopup', true);
4126
- this.lazyload(this.target);
4116
+ attr(this.targetEl, 'aria-haspopup', true);
4117
+ this.lazyload(this.targetEl);
4127
4118
  }
4128
4119
  },
4129
4120
 
@@ -4154,7 +4145,7 @@
4154
4145
  return 'a[href^="#"]';
4155
4146
  },
4156
4147
 
4157
- handler(_ref) {let { defaultPrevented, current: { hash } } = _ref;
4148
+ handler(_ref2) {let { defaultPrevented, current: { hash } } = _ref2;
4158
4149
  if (!defaultPrevented && hash && !within(hash, this.$el)) {
4159
4150
  this.hide(false);
4160
4151
  }
@@ -4266,17 +4257,17 @@
4266
4257
  on(
4267
4258
  document,
4268
4259
  pointerDown,
4269
- (_ref2) => {let { target } = _ref2;return (
4260
+ (_ref3) => {let { target } = _ref3;return (
4270
4261
  !within(target, this.$el) &&
4271
4262
  once(
4272
4263
  document,
4273
4264
  pointerUp + " " + pointerCancel + " scroll",
4274
- (_ref3) => {let { defaultPrevented, type, target: newTarget } = _ref3;
4265
+ (_ref4) => {let { defaultPrevented, type, target: newTarget } = _ref4;
4275
4266
  if (
4276
4267
  !defaultPrevented &&
4277
4268
  type === pointerUp &&
4278
4269
  target === newTarget &&
4279
- !(this.target && within(target, this.target)))
4270
+ !(this.targetEl && within(target, this.targetEl)))
4280
4271
  {
4281
4272
  this.hide(false);
4282
4273
  }
@@ -4295,13 +4286,13 @@
4295
4286
  [] :
4296
4287
  [preventOverscroll(this.$el), preventBackgroundScroll()]),
4297
4288
 
4298
- ...(this.display === 'static' && this.align !== 'stretch' ?
4289
+ ...(this.display === 'static' ?
4299
4290
  [] :
4300
4291
  (() => {
4301
4292
  const handler = () => this.$emit();
4302
4293
  return [
4303
4294
  on(window, 'resize', handler),
4304
- on(document, 'scroll', handler, true),
4295
+ on([document, scrollParents(this.$el)], 'scroll', handler),
4305
4296
  (() => {
4306
4297
  const observer = observeResize(
4307
4298
  scrollParents(this.$el),
@@ -4330,7 +4321,7 @@
4330
4321
  {
4331
4322
  name: 'hide',
4332
4323
 
4333
- handler(_ref4) {let { target } = _ref4;
4324
+ handler(_ref5) {let { target } = _ref5;
4334
4325
  if (this.$el !== target) {
4335
4326
  active =
4336
4327
  active === null && within(target, this.$el) && this.isToggled() ?
@@ -4354,12 +4345,12 @@
4354
4345
 
4355
4346
 
4356
4347
  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) {
4348
+ show(target, delay) {if (target === void 0) {target = this.targetEl;}if (delay === void 0) {delay = true;}
4349
+ if (this.isToggled() && target && this.targetEl && target !== this.targetEl) {
4359
4350
  this.hide(false, false);
4360
4351
  }
4361
4352
 
4362
- this.target = target;
4353
+ this.targetEl = target;
4363
4354
 
4364
4355
  this.clearTimers();
4365
4356
 
@@ -4422,60 +4413,69 @@
4422
4413
 
4423
4414
  position() {
4424
4415
  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');
4416
+ attr(this.$el, 'style', this._style);
4427
4417
 
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);
4418
+ // Ensure none positioned element does not generate scrollbars
4419
+ this.$el.hidden = true;
4432
4420
 
4433
- const scrollParentOffset = offset(scrollParent);
4434
- const boundaryOffset = boundary ? offset(boundary) : scrollParentOffset;
4421
+ const boundary = query(this.boundary, this.$el);
4422
+ const boundaryOffset = offsetViewport(boundary || window);
4423
+ const viewports = this.target.map((target) => offsetViewport(scrollParents(target)[0]));
4435
4424
  const viewportOffset = this.getViewportOffset(this.$el);
4436
4425
 
4437
- css(this.$el, 'maxWidth', '');
4438
- const maxWidth = scrollParentOffset.width - 2 * viewportOffset;
4426
+ const dirs = [
4427
+ [0, ['x', 'width', 'left', 'right']],
4428
+ [1, ['y', 'height', 'top', 'bottom']]];
4439
4429
 
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) {
4430
+
4431
+ for (const [i, [axis, prop]] of dirs) {
4432
+ if (this.axis !== axis && includes([axis, true], this.stretch)) {
4433
+ css(this.$el, {
4434
+ [prop]: Math.min(
4435
+ boundaryOffset[prop],
4436
+ viewports[i][prop] - 2 * viewportOffset),
4437
+
4438
+ ["overflow-" + axis]: 'auto' });
4439
+
4440
+ }
4441
+ }
4442
+
4443
+ const maxWidth = viewports[0].width - 2 * viewportOffset;
4444
+
4445
+ if (this.$el.offsetWidth > maxWidth) {
4473
4446
  addClass(this.$el, this.clsDrop + "-stack");
4474
4447
  }
4475
4448
 
4476
4449
  css(this.$el, 'maxWidth', maxWidth);
4477
4450
 
4478
- this.positionAt(this.$el, target, boundary);
4451
+ this.$el.hidden = false;
4452
+
4453
+ this.positionAt(this.$el, this.target, boundary);
4454
+
4455
+ for (const [i, [axis, prop, start, end]] of dirs) {
4456
+ if (this.axis === axis && includes([axis, true], this.stretch)) {
4457
+ const positionOffset = Math.abs(this.getPositionOffset(this.$el));
4458
+ const targetOffset = offset(this.target[i]);
4459
+ const elOffset = offset(this.$el);
4460
+
4461
+ css(this.$el, {
4462
+ [prop]:
4463
+ (targetOffset[start] > elOffset[start] ?
4464
+ targetOffset[start] -
4465
+ Math.max(
4466
+ boundaryOffset[start],
4467
+ viewports[i][start] + viewportOffset) :
4468
+
4469
+ Math.min(
4470
+ boundaryOffset[end],
4471
+ viewports[i][end] - viewportOffset) -
4472
+ targetOffset[end]) - positionOffset,
4473
+ ["overflow-" + axis]: 'auto' });
4474
+
4475
+
4476
+ this.positionAt(this.$el, this.target, boundary);
4477
+ }
4478
+ }
4479
4479
  } } };
4480
4480
 
4481
4481
 
@@ -4972,8 +4972,11 @@
4972
4972
  let minHeight = '';
4973
4973
  const box = boxModelAdjust(this.$el, 'height', 'content-box');
4974
4974
 
4975
+ const { body, scrollingElement } = document;
4975
4976
  const [scrollElement] = scrollParents(this.$el, /auto|scroll/);
4976
- const { height: viewportHeight } = offsetViewport(scrollElement);
4977
+ const { height: viewportHeight } = offsetViewport(
4978
+ scrollElement === body ? scrollingElement : scrollElement);
4979
+
4977
4980
 
4978
4981
  if (this.expand) {
4979
4982
  minHeight = Math.max(
@@ -4983,14 +4986,19 @@
4983
4986
  0);
4984
4987
 
4985
4988
  } else {
4986
- // on mobile devices (iOS and Android) window.innerHeight !== 100vh
4987
- minHeight = "calc(" + (
4988
- document.scrollingElement === scrollElement ? '100vh' : viewportHeight + "px");
4989
+ const isScrollingElement =
4990
+ scrollingElement === scrollElement || body === scrollElement;
4989
4991
 
4992
+ // on mobile devices (iOS and Android) window.innerHeight !== 100vh
4993
+ minHeight = "calc(" + (isScrollingElement ? '100vh' : viewportHeight + "px");
4990
4994
 
4991
4995
  if (this.offsetTop) {
4992
- const top = offsetPosition(this.$el)[0] - offsetPosition(scrollElement)[0];
4993
- minHeight += top > 0 && top < viewportHeight / 2 ? " - " + top + "px" : '';
4996
+ if (isScrollingElement) {
4997
+ const top = offsetPosition(this.$el)[0] - offsetPosition(scrollElement)[0];
4998
+ minHeight += top > 0 && top < viewportHeight / 2 ? " - " + top + "px" : '';
4999
+ } else {
5000
+ minHeight += " - " + css(scrollElement, 'paddingTop');
5001
+ }
4994
5002
  }
4995
5003
 
4996
5004
  if (this.offsetBottom === true) {
@@ -5233,7 +5241,13 @@
5233
5241
 
5234
5242
  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
5243
 
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>";
5244
+ 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>";
5245
+
5246
+ 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>";
5247
+
5248
+ 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>";
5249
+
5250
+ 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
5251
 
5238
5252
  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
5253
 
@@ -5265,6 +5279,9 @@
5265
5279
  marker,
5266
5280
  'close-icon': closeIcon,
5267
5281
  'close-large': closeLarge,
5282
+ 'nav-parent-icon': navParentIcon,
5283
+ 'nav-parent-icon-large': navParentIconLarge,
5284
+ 'navbar-parent-icon': navbarParentIcon,
5268
5285
  'navbar-toggle-icon': navbarToggleIcon,
5269
5286
  'overlay-icon': overlayIcon,
5270
5287
  'pagination-next': paginationNext,
@@ -5322,6 +5339,15 @@
5322
5339
  } };
5323
5340
 
5324
5341
 
5342
+ const NavParentIcon = {
5343
+ extends: IconComponent,
5344
+
5345
+ beforeConnect() {
5346
+ const icon = this.$props.icon;
5347
+ this.icon = closest(this.$el, '.uk-nav-primary') ? icon + "-large" : icon;
5348
+ } };
5349
+
5350
+
5325
5351
  const Slidenav = {
5326
5352
  extends: IconComponent,
5327
5353
 
@@ -5582,7 +5608,7 @@
5582
5608
 
5583
5609
 
5584
5610
  connected() {
5585
- const media = toMedia(this.media);
5611
+ const media = toMedia(this.media, this.$el);
5586
5612
  this.matchMedia = true;
5587
5613
  if (media) {
5588
5614
  this.mediaObj = window.matchMedia(media);
@@ -5603,11 +5629,10 @@
5603
5629
  } };
5604
5630
 
5605
5631
 
5606
- function toMedia(value) {
5632
+ function toMedia(value, element) {
5607
5633
  if (isString(value)) {
5608
5634
  if (startsWith(value, '@')) {
5609
- const name = "breakpoint-" + value.substr(1);
5610
- value = toFloat(getCssVar(name));
5635
+ value = toFloat(css(element, "--uk-breakpoint-" + value.substr(1)));
5611
5636
  } else if (isNaN(value)) {
5612
5637
  return value;
5613
5638
  }
@@ -5632,7 +5657,7 @@
5632
5657
 
5633
5658
  computed: {
5634
5659
  fill(_ref) {let { fill } = _ref;
5635
- return fill || getCssVar('leader-fill-content');
5660
+ return fill || css(this.$el, '--uk-leader-fill-content');
5636
5661
  } },
5637
5662
 
5638
5663
 
@@ -5824,7 +5849,9 @@
5824
5849
  align: String,
5825
5850
  offset: Number,
5826
5851
  boundary: Boolean,
5827
- boundaryAlign: Boolean,
5852
+ target: Boolean,
5853
+ targetX: Boolean,
5854
+ targetY: Boolean,
5828
5855
  clsDrop: String,
5829
5856
  delayShow: Number,
5830
5857
  delayHide: Number,
@@ -5841,9 +5868,12 @@
5841
5868
  offset: undefined,
5842
5869
  delayShow: undefined,
5843
5870
  delayHide: undefined,
5844
- boundaryAlign: undefined,
5845
- flip: 'x',
5871
+ flip: false,
5872
+ shift: true,
5846
5873
  boundary: true,
5874
+ target: false,
5875
+ targetX: false,
5876
+ targetY: false,
5847
5877
  dropbar: false,
5848
5878
  dropbarAnchor: false,
5849
5879
  duration: 200,
@@ -5878,7 +5908,7 @@
5878
5908
  },
5879
5909
 
5880
5910
  watch(dropbar) {
5881
- addClass(dropbar, 'uk-navbar-dropbar');
5911
+ addClass(dropbar, 'uk-dropbar', 'uk-dropbar-top', 'uk-navbar-dropbar');
5882
5912
  },
5883
5913
 
5884
5914
  immediate: true },
@@ -5894,7 +5924,7 @@
5894
5924
 
5895
5925
  if (this.dropContainer !== $el) {
5896
5926
  for (const el of $$("." + clsDrop, this.dropContainer)) {var _this$getDropdown;
5897
- const target = (_this$getDropdown = this.getDropdown(el)) == null ? void 0 : _this$getDropdown.target;
5927
+ const target = (_this$getDropdown = this.getDropdown(el)) == null ? void 0 : _this$getDropdown.targetEl;
5898
5928
  if (!includes(dropdowns, el) && target && within(target, this.$el)) {
5899
5929
  dropdowns.push(el);
5900
5930
  }
@@ -5911,8 +5941,7 @@
5911
5941
  {
5912
5942
  ...this.$props,
5913
5943
  boundary: this.boundary,
5914
- pos: this.pos,
5915
- offset: this.dropbar || this.offset });
5944
+ pos: this.pos });
5916
5945
 
5917
5946
 
5918
5947
  },
@@ -5957,8 +5986,8 @@
5957
5986
  if (
5958
5987
  active &&
5959
5988
  includes(active.mode, 'hover') &&
5960
- active.target &&
5961
- !within(active.target, current) &&
5989
+ active.targetEl &&
5990
+ !within(active.targetEl, current) &&
5962
5991
  !active.isDelaying)
5963
5992
  {
5964
5993
  active.hide(false);
@@ -5980,7 +6009,7 @@
5980
6009
  if (keyCode === keyMap.DOWN && hasAttr(current, 'aria-expanded')) {
5981
6010
  e.preventDefault();
5982
6011
 
5983
- if (!active || active.target !== current) {
6012
+ if (!active || active.targetEl !== current) {
5984
6013
  current.click();
5985
6014
  once(this.dropContainer, 'show', (_ref8) => {let { target } = _ref8;return (
5986
6015
  focusFirstFocusableElement(target));});
@@ -6030,8 +6059,8 @@
6030
6059
  }
6031
6060
  }
6032
6061
 
6033
- if (keyCode === keyMap.ESC) {var _active$target;
6034
- active == null ? void 0 : (_active$target = active.target) == null ? void 0 : _active$target.focus();
6062
+ if (keyCode === keyMap.ESC) {var _active$targetEl;
6063
+ active == null ? void 0 : (_active$targetEl = active.targetEl) == null ? void 0 : _active$targetEl.focus();
6035
6064
  }
6036
6065
 
6037
6066
  handleNavItemNavigation(e, this.toggles, active);
@@ -6073,8 +6102,8 @@
6073
6102
  return this.dropbar;
6074
6103
  },
6075
6104
 
6076
- handler(_, _ref9) {let { $el, align } = _ref9;
6077
- if (!hasClass($el, this.clsDrop) || align === 'stretch') {
6105
+ handler(_ref9) {let { target } = _ref9;
6106
+ if (!this.isDropbarDrop(target)) {
6078
6107
  return;
6079
6108
  }
6080
6109
 
@@ -6082,7 +6111,7 @@
6082
6111
  after(this.dropbarAnchor || this.$el, this.dropbar);
6083
6112
  }
6084
6113
 
6085
- addClass($el, this.clsDrop + "-dropbar");
6114
+ addClass(target, this.clsDrop + "-dropbar");
6086
6115
  } },
6087
6116
 
6088
6117
 
@@ -6097,19 +6126,24 @@
6097
6126
  return this.dropbar;
6098
6127
  },
6099
6128
 
6100
- handler(_, _ref10) {let { $el, align } = _ref10;
6101
- if (!hasClass($el, this.clsDrop) || align === 'stretch') {
6129
+ handler(_ref10) {let { target } = _ref10;
6130
+ if (!this.isDropbarDrop(target)) {
6102
6131
  return;
6103
6132
  }
6104
6133
 
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
-
6134
+ this._observer = observeResize(target, () => {
6135
+ const targetOffsets = parents(target, "." + this.clsDrop).
6136
+ concat(target).
6137
+ map((el) => offset(el));
6138
+ const minTop = Math.min(...targetOffsets.map((_ref11) => {let { top } = _ref11;return top;}));
6139
+ const maxBottom = Math.max(...targetOffsets.map((_ref12) => {let { bottom } = _ref12;return bottom;}));
6140
+ const dropbarOffset = offset(this.dropbar);
6141
+ css(this.dropbar, 'top', this.dropbar.offsetTop - (dropbarOffset.top - minTop));
6142
+ this.transitionTo(
6143
+ maxBottom - minTop + toFloat(css(target, 'marginBottom')),
6144
+ target);
6112
6145
 
6146
+ });
6113
6147
  } },
6114
6148
 
6115
6149
 
@@ -6124,13 +6158,13 @@
6124
6158
  return this.dropbar;
6125
6159
  },
6126
6160
 
6127
- handler(e, _ref11) {let { $el } = _ref11;
6161
+ handler(e) {
6128
6162
  const active = this.getActive();
6129
6163
 
6130
6164
  if (
6131
6165
  matches(this.dropbar, ':hover') &&
6132
- (active == null ? void 0 : active.$el) === $el &&
6133
- !this.toggles.some((el) => active.target !== el && matches(el, ':focus')))
6166
+ (active == null ? void 0 : active.$el) === e.target &&
6167
+ !this.toggles.some((el) => active.targetEl !== el && matches(el, ':focus')))
6134
6168
  {
6135
6169
  e.preventDefault();
6136
6170
  }
@@ -6148,8 +6182,8 @@
6148
6182
  return this.dropbar;
6149
6183
  },
6150
6184
 
6151
- handler(_, _ref12) {let { $el, align } = _ref12;
6152
- if (!hasClass($el, this.clsDrop) || align === 'stretch') {
6185
+ handler(_ref13) {let { target } = _ref13;
6186
+ if (!this.isDropbarDrop(target)) {
6153
6187
  return;
6154
6188
  }
6155
6189
 
@@ -6157,7 +6191,7 @@
6157
6191
 
6158
6192
  const active = this.getActive();
6159
6193
 
6160
- if (!active || (active == null ? void 0 : active.$el) === $el) {
6194
+ if (!active || (active == null ? void 0 : active.$el) === target) {
6161
6195
  this.transitionTo(0);
6162
6196
  }
6163
6197
  } }],
@@ -6166,7 +6200,7 @@
6166
6200
 
6167
6201
  methods: {
6168
6202
  getActive() {
6169
- return active && within(active.target, this.$el) && active;
6203
+ return active && within(active.targetEl, this.$el) && active;
6170
6204
  },
6171
6205
 
6172
6206
  transitionTo(newHeight, el) {
@@ -6196,13 +6230,17 @@
6196
6230
 
6197
6231
  getDropdown(el) {
6198
6232
  return this.$getComponent(el, 'drop') || this.$getComponent(el, 'dropdown');
6233
+ },
6234
+
6235
+ isDropbarDrop(el) {
6236
+ return this.getDropdown(el) && hasClass(el, this.clsDrop);
6199
6237
  } } };
6200
6238
 
6201
6239
 
6202
6240
 
6203
6241
  function handleNavItemNavigation(e, toggles, active) {
6204
6242
  const { current, keyCode } = e;
6205
- const target = (active == null ? void 0 : active.target) || current;
6243
+ const target = (active == null ? void 0 : active.targetEl) || current;
6206
6244
  const i = toggles.indexOf(target);
6207
6245
 
6208
6246
  // Left
@@ -6570,6 +6608,14 @@
6570
6608
  offset: 0 },
6571
6609
 
6572
6610
 
6611
+ connected() {
6612
+ registerClick(this);
6613
+ },
6614
+
6615
+ disconnected() {
6616
+ unregisterClick(this);
6617
+ },
6618
+
6573
6619
  methods: {
6574
6620
  async scrollTo(el) {
6575
6621
  el = el && $(el) || document.body;
@@ -6578,20 +6624,39 @@
6578
6624
  await scrollIntoView(el, { offset: this.offset });
6579
6625
  trigger(this.$el, 'scrolled', [this, el]);
6580
6626
  }
6581
- } },
6627
+ } } };
6582
6628
 
6583
6629
 
6584
- events: {
6585
- click(e) {
6586
- if (e.defaultPrevented) {
6587
- return;
6588
- }
6589
6630
 
6590
- e.preventDefault();
6591
- this.scrollTo(getTargetElement(this.$el));
6592
- } } };
6631
+ const components$1 = new Set();
6632
+ function registerClick(cmp) {
6633
+ if (!components$1.size) {
6634
+ on(document, 'click', clickHandler);
6635
+ }
6593
6636
 
6637
+ components$1.add(cmp);
6638
+ }
6594
6639
 
6640
+ function unregisterClick(cmp) {
6641
+ components$1.delete(cmp);
6642
+
6643
+ if (!components$1.length) {
6644
+ off(document, 'click', clickHandler);
6645
+ }
6646
+ }
6647
+
6648
+ function clickHandler(e) {
6649
+ if (e.defaultPrevented) {
6650
+ return;
6651
+ }
6652
+
6653
+ for (const component of components$1) {
6654
+ if (within(e.target, component.$el)) {
6655
+ e.preventDefault();
6656
+ component.scrollTo(getTargetElement(component.$el));
6657
+ }
6658
+ }
6659
+ }
6595
6660
 
6596
6661
  function getTargetElement(el) {
6597
6662
  return document.getElementById(decodeURIComponent(el.hash).substring(1));
@@ -6921,7 +6986,9 @@
6921
6986
  },
6922
6987
 
6923
6988
  handler() {
6924
- if (!location.hash || scrollTop(window) === 0) {
6989
+ const { scrollingElement } = document;
6990
+
6991
+ if (!location.hash || scrollingElement.scrollTop === 0) {
6925
6992
  return;
6926
6993
  }
6927
6994
 
@@ -6930,13 +6997,11 @@
6930
6997
  const elOffset = offset(this.$el);
6931
6998
 
6932
6999
  if (this.isFixed && intersectRect(targetOffset, elOffset)) {
6933
- scrollTop(
6934
- window,
7000
+ scrollingElement.scrollTop =
6935
7001
  targetOffset.top -
6936
7002
  elOffset.height -
6937
7003
  toPx(this.targetOffset, 'height', this.placeholder) -
6938
- toPx(this.offset, 'height', this.placeholder));
6939
-
7004
+ toPx(this.offset, 'height', this.placeholder);
6940
7005
  }
6941
7006
  });
6942
7007
  } }],
@@ -7034,7 +7099,7 @@
7034
7099
 
7035
7100
 
7036
7101
  {let { scroll: prevScroll = 0, dir: prevDir = 'down', overflow, overflowScroll = 0, start, end } = _ref4;
7037
- const scroll = scrollTop(window);
7102
+ const scroll = document.scrollingElement.scrollTop;
7038
7103
  const dir = prevScroll <= scroll ? 'down' : 'up';
7039
7104
 
7040
7105
  return {
@@ -7554,7 +7619,7 @@
7554
7619
 
7555
7620
 
7556
7621
  {
7557
- name: 'toggled',
7622
+ name: 'hide show',
7558
7623
 
7559
7624
  self: true,
7560
7625
 
@@ -7562,10 +7627,8 @@
7562
7627
  return this.target;
7563
7628
  },
7564
7629
 
7565
- handler(e, toggled) {
7566
- if (e.target === this.target[0]) {
7567
- this.updateAria(toggled);
7568
- }
7630
+ handler(_ref2) {let { type } = _ref2;
7631
+ this.updateAria(type === 'show');
7569
7632
  } },
7570
7633
 
7571
7634
 
@@ -7660,10 +7723,12 @@
7660
7723
  Video: Video,
7661
7724
  Close: Close,
7662
7725
  Spinner: Spinner,
7726
+ NavParentIcon: NavParentIcon,
7663
7727
  SlidenavNext: Slidenav,
7664
7728
  SlidenavPrevious: Slidenav,
7665
7729
  SearchIcon: Search,
7666
7730
  Marker: IconComponent,
7731
+ NavbarParentIcon: IconComponent,
7667
7732
  NavbarToggleIcon: IconComponent,
7668
7733
  OverlayIcon: IconComponent,
7669
7734
  PaginationNext: IconComponent,