uikit 3.14.4-dev.6a00f7fe6 → 3.14.4-dev.6c89e8709

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 (138) hide show
  1. package/CHANGELOG.md +45 -11
  2. package/build/util.js +1 -0
  3. package/dist/css/uikit-core-rtl.css +385 -110
  4. package/dist/css/uikit-core-rtl.min.css +1 -1
  5. package/dist/css/uikit-core.css +385 -110
  6. package/dist/css/uikit-core.min.css +1 -1
  7. package/dist/css/uikit-rtl.css +402 -115
  8. package/dist/css/uikit-rtl.min.css +1 -1
  9. package/dist/css/uikit.css +402 -115
  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 +185 -137
  16. package/dist/js/components/lightbox-panel.min.js +1 -1
  17. package/dist/js/components/lightbox.js +185 -137
  18. package/dist/js/components/lightbox.min.js +1 -1
  19. package/dist/js/components/notification.js +1 -1
  20. package/dist/js/components/notification.min.js +1 -1
  21. package/dist/js/components/parallax.js +4 -5
  22. package/dist/js/components/parallax.min.js +1 -1
  23. package/dist/js/components/slider-parallax.js +4 -5
  24. package/dist/js/components/slider-parallax.min.js +1 -1
  25. package/dist/js/components/slider.js +22 -7
  26. package/dist/js/components/slider.min.js +1 -1
  27. package/dist/js/components/slideshow-parallax.js +4 -5
  28. package/dist/js/components/slideshow-parallax.min.js +1 -1
  29. package/dist/js/components/slideshow.js +22 -7
  30. package/dist/js/components/slideshow.min.js +1 -1
  31. package/dist/js/components/sortable.js +3 -3
  32. package/dist/js/components/sortable.min.js +1 -1
  33. package/dist/js/components/tooltip.js +93 -132
  34. package/dist/js/components/tooltip.min.js +1 -1
  35. package/dist/js/components/upload.js +1 -1
  36. package/dist/js/components/upload.min.js +1 -1
  37. package/dist/js/uikit-core.js +1742 -1645
  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 +1023 -909
  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 +95 -61
  54. package/src/js/core/height-viewport.js +14 -6
  55. package/src/js/core/icon.js +16 -0
  56. package/src/js/core/index.js +2 -0
  57. package/src/js/core/leader.js +2 -2
  58. package/src/js/core/navbar.js +42 -30
  59. package/src/js/core/offcanvas.js +1 -47
  60. package/src/js/core/scroll.js +37 -10
  61. package/src/js/core/sticky.js +8 -9
  62. package/src/js/core/toggle.js +3 -5
  63. package/src/js/mixin/media.js +4 -5
  64. package/src/js/mixin/modal.js +97 -8
  65. package/src/js/mixin/position.js +22 -8
  66. package/src/js/mixin/slider-drag.js +20 -8
  67. package/src/js/mixin/style.js +11 -0
  68. package/src/js/mixin/togglable.js +80 -133
  69. package/src/js/util/animation.js +4 -3
  70. package/src/js/util/dimensions.js +6 -6
  71. package/src/js/util/filter.js +3 -7
  72. package/src/js/util/position.js +43 -47
  73. package/src/js/util/style.js +4 -13
  74. package/src/js/util/viewport.js +20 -36
  75. package/src/less/components/_import.less +1 -0
  76. package/src/less/components/drop.less +1 -18
  77. package/src/less/components/dropbar.less +115 -0
  78. package/src/less/components/dropdown.less +16 -16
  79. package/src/less/components/leader.less +1 -1
  80. package/src/less/components/nav.less +240 -63
  81. package/src/less/components/navbar.less +81 -38
  82. package/src/less/components/utility.less +21 -4
  83. package/src/less/theme/_import.less +1 -0
  84. package/src/less/theme/dropbar.less +44 -0
  85. package/src/less/theme/dropdown.less +0 -11
  86. package/src/less/theme/nav.less +43 -9
  87. package/src/less/theme/navbar.less +7 -11
  88. package/src/scss/components/_import.scss +1 -0
  89. package/src/scss/components/drop.scss +1 -18
  90. package/src/scss/components/dropbar.scss +115 -0
  91. package/src/scss/components/dropdown.scss +16 -16
  92. package/src/scss/components/leader.scss +1 -1
  93. package/src/scss/components/nav.scss +189 -51
  94. package/src/scss/components/navbar.scss +69 -38
  95. package/src/scss/components/utility.scss +19 -3
  96. package/src/scss/mixins-theme.scss +93 -25
  97. package/src/scss/mixins.scss +89 -17
  98. package/src/scss/theme/_import.scss +1 -0
  99. package/src/scss/theme/dropbar.scss +44 -0
  100. package/src/scss/theme/dropdown.scss +0 -8
  101. package/src/scss/theme/nav.scss +41 -9
  102. package/src/scss/theme/navbar.scss +7 -8
  103. package/src/scss/variables-theme.scss +71 -18
  104. package/src/scss/variables.scss +60 -14
  105. package/tests/accordion.html +2 -2
  106. package/tests/alert.html +2 -2
  107. package/tests/countdown.html +1 -1
  108. package/tests/drop.html +457 -371
  109. package/tests/dropbar.html +456 -0
  110. package/tests/dropdown.html +26 -401
  111. package/tests/filter.html +9 -12
  112. package/tests/form.html +1 -1
  113. package/tests/index.html +126 -107
  114. package/tests/js/index.js +1 -4
  115. package/tests/lightbox.html +5 -5
  116. package/tests/list.html +8 -8
  117. package/tests/modal.html +13 -13
  118. package/tests/nav.html +117 -75
  119. package/tests/navbar.html +1998 -1139
  120. package/tests/offcanvas.html +17 -21
  121. package/tests/parallax.html +1 -1
  122. package/tests/position.html +13 -24
  123. package/tests/progress.html +9 -9
  124. package/tests/scroll.html +7 -10
  125. package/tests/search.html +5 -5
  126. package/tests/slider.html +6 -5
  127. package/tests/slideshow.html +8 -8
  128. package/tests/sortable.html +6 -8
  129. package/tests/sticky-navbar.html +6 -6
  130. package/tests/sticky.html +8 -8
  131. package/tests/switcher.html +1 -1
  132. package/tests/tab.html +1 -1
  133. package/tests/table.html +7 -7
  134. package/tests/toggle.html +2 -2
  135. package/tests/tooltip.html +1 -1
  136. package/tests/upload.html +11 -11
  137. package/tests/utility.html +19 -0
  138. 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.6a00f7fe6 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
1
+ /*! UIkit 3.14.4-dev.6c89e8709 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
2
2
 
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
@@ -383,12 +383,8 @@
383
383
  }
384
384
 
385
385
  function closest(element, selector) {
386
- if (startsWith(selector, '>')) {
387
- selector = selector.slice(1);
388
- }
389
-
390
386
  return isElement(element) ?
391
- element.closest(selector) :
387
+ element.closest(startsWith(selector, '>') ? selector.slice(1) : selector) :
392
388
  toNodes(element).
393
389
  map((element) => closest(element, selector)).
394
390
  filter(Boolean);
@@ -396,8 +392,8 @@
396
392
 
397
393
  function within(element, selector) {
398
394
  return isString(selector) ?
399
- matches(element, selector) || !!closest(element, selector) :
400
- element === selector || toNode(selector).contains(toNode(element));
395
+ !!closest(element, selector) :
396
+ toNode(selector).contains(toNode(element));
401
397
  }
402
398
 
403
399
  function parents(element, selector) {
@@ -785,18 +781,11 @@
785
781
  return elements[0];
786
782
  }
787
783
 
788
- const propertyRe = /^\s*(["'])?(.*?)\1\s*$/;
789
- function getCssVar(name, element) {if (element === void 0) {element = document.documentElement;}
790
- return css(element, "--uk-" + name).replace(propertyRe, '$2');
791
- }
792
-
793
784
  // https://drafts.csswg.org/cssom/#dom-cssstyledeclaration-setproperty
794
785
  const propName = memoize((name) => vendorPropName(name));
795
786
 
796
- const cssPrefixes = ['webkit', 'moz'];
797
-
798
787
  function vendorPropName(name) {
799
- if (name[0] === '-') {
788
+ if (startsWith(name, '--')) {
800
789
  return name;
801
790
  }
802
791
 
@@ -808,11 +797,8 @@
808
797
  return name;
809
798
  }
810
799
 
811
- let i = cssPrefixes.length,
812
- prefixedName;
813
-
814
- while (i--) {
815
- prefixedName = "-" + cssPrefixes[i] + "-" + name;
800
+ for (const prefix of ['webkit', 'moz']) {
801
+ const prefixedName = "-" + prefix + "-" + name;
816
802
  if (prefixedName in style) {
817
803
  return prefixedName;
818
804
  }
@@ -913,13 +899,14 @@
913
899
  const Transition = {
914
900
  start: transition,
915
901
 
916
- stop(element) {
902
+ async stop(element) {
917
903
  trigger(element, 'transitionend');
918
- return Promise.resolve();
904
+ await Promise.resolve();
919
905
  },
920
906
 
921
- cancel(element) {
907
+ async cancel(element) {
922
908
  trigger(element, 'transitioncanceled');
909
+ await Promise.resolve();
923
910
  },
924
911
 
925
912
  inProgress(element) {
@@ -929,7 +916,7 @@
929
916
 
930
917
  const animationPrefix = 'uk-animation-';
931
918
 
932
- function animate$1(element, animation, duration, origin, out) {if (duration === void 0) {duration = 200;}
919
+ function animate$2(element, animation, duration, origin, out) {if (duration === void 0) {duration = 200;}
933
920
  return Promise.all(
934
921
  toNodes(element).map(
935
922
  (element) =>
@@ -965,10 +952,10 @@
965
952
 
966
953
  const inProgress = new RegExp(animationPrefix + "(enter|leave)");
967
954
  const Animation = {
968
- in: animate$1,
955
+ in: animate$2,
969
956
 
970
957
  out(element, animation, duration, origin) {
971
- return animate$1(element, animation, duration, origin, true);
958
+ return animate$2(element, animation, duration, origin, true);
972
959
  },
973
960
 
974
961
  inProgress(element) {
@@ -1060,13 +1047,13 @@
1060
1047
  }
1061
1048
 
1062
1049
  function offsetPosition(element) {
1063
- const offset = [0, 0];
1064
-
1065
1050
  element = toNode(element);
1066
1051
 
1067
- do {
1068
- offset[0] += element.offsetTop;
1069
- offset[1] += element.offsetLeft;
1052
+ const offset = [element.offsetTop, element.offsetLeft];
1053
+
1054
+ while (element = element.offsetParent) {
1055
+ offset[0] += element.offsetTop + toFloat(css(element, "borderTopWidth"));
1056
+ offset[1] += element.offsetLeft + toFloat(css(element, "borderLeftWidth"));
1070
1057
 
1071
1058
  if (css(element, 'position') === 'fixed') {
1072
1059
  const win = toWindow(element);
@@ -1074,7 +1061,7 @@
1074
1061
  offset[1] += win.scrollX;
1075
1062
  return offset;
1076
1063
  }
1077
- } while (element = element.offsetParent);
1064
+ }
1078
1065
 
1079
1066
  return offset;
1080
1067
  }
@@ -1293,9 +1280,9 @@
1293
1280
  const hasTouch = inBrowser && 'ontouchstart' in window;
1294
1281
  const hasPointerEvents = inBrowser && window.PointerEvent;
1295
1282
 
1296
- const pointerDown = hasPointerEvents ? 'pointerdown' : hasTouch ? 'touchstart' : 'mousedown';
1297
- const pointerMove = hasPointerEvents ? 'pointermove' : hasTouch ? 'touchmove' : 'mousemove';
1298
- const pointerUp = hasPointerEvents ? 'pointerup' : hasTouch ? 'touchend' : 'mouseup';
1283
+ const pointerDown$1 = hasPointerEvents ? 'pointerdown' : hasTouch ? 'touchstart' : 'mousedown';
1284
+ const pointerMove$1 = hasPointerEvents ? 'pointermove' : hasTouch ? 'touchmove' : 'mousemove';
1285
+ const pointerUp$1 = hasPointerEvents ? 'pointerup' : hasTouch ? 'touchend' : 'mouseup';
1299
1286
  const pointerEnter = hasPointerEvents ? 'pointerenter' : hasTouch ? '' : 'mouseenter';
1300
1287
  const pointerLeave = hasPointerEvents ? 'pointerleave' : hasTouch ? '' : 'mouseleave';
1301
1288
  const pointerCancel = hasPointerEvents ? 'pointercancel' : 'touchcancel';
@@ -1795,20 +1782,6 @@
1795
1782
 
1796
1783
  }
1797
1784
 
1798
- function scrollTop(element, top) {
1799
- if (isWindow(element) || isDocument(element)) {
1800
- element = scrollingElement(element);
1801
- } else {
1802
- element = toNode(element);
1803
- }
1804
-
1805
- if (isUndefined(top)) {
1806
- return element.scrollTop;
1807
- } else {
1808
- element.scrollTop = top;
1809
- }
1810
- }
1811
-
1812
1785
  function scrollIntoView(element, _temp) {let { offset: offsetBy = 0 } = _temp === void 0 ? {} : _temp;
1813
1786
  const parents = isVisible(element) ? scrollParents(element) : [];
1814
1787
  return parents.reduce(
@@ -1850,7 +1823,7 @@
1850
1823
  (function step() {
1851
1824
  const percent = ease(clamp((Date.now() - start) / duration));
1852
1825
 
1853
- scrollTop(element, scroll + top * percent);
1826
+ element.scrollTop = scroll + top * percent;
1854
1827
 
1855
1828
  // scroll more if we have not reached our destination
1856
1829
  if (percent === 1) {
@@ -1911,18 +1884,31 @@
1911
1884
  }
1912
1885
 
1913
1886
  function offsetViewport(scrollElement) {
1914
- let viewportElement = getViewport$1(scrollElement);
1887
+ const window = toWindow(scrollElement);
1888
+ const {
1889
+ document: { documentElement } } =
1890
+ window;
1891
+ let viewportElement =
1892
+ scrollElement === scrollingElement(scrollElement) ? window : scrollElement;
1893
+
1894
+ const { visualViewport } = window;
1895
+ if (isWindow(viewportElement) && visualViewport) {
1896
+ let { height, width, scale, pageTop: top, pageLeft: left } = visualViewport;
1897
+ height = Math.round(height * scale);
1898
+ width = Math.round(width * scale);
1899
+ return { height, width, top, left, bottom: top + height, right: left + width };
1900
+ }
1915
1901
 
1916
1902
  let rect = offset(viewportElement);
1917
1903
  for (let [prop, dir, start, end] of [
1918
1904
  ['width', 'x', 'left', 'right'],
1919
1905
  ['height', 'y', 'top', 'bottom']])
1920
1906
  {
1921
- if (!isWindow(viewportElement)) {
1922
- rect[start] += toFloat(css(viewportElement, "border" + ucfirst(start) + "Width"));
1923
- } else {
1907
+ if (isWindow(viewportElement)) {
1924
1908
  // iOS 12 returns <body> as scrollingElement
1925
- viewportElement = viewportElement.document.documentElement;
1909
+ viewportElement = documentElement;
1910
+ } else {
1911
+ rect[start] += toFloat(css(viewportElement, "border-" + start + "-width"));
1926
1912
  }
1927
1913
  rect[prop] = rect[dir] = viewportElement["client" + ucfirst(prop)];
1928
1914
  rect[end] = rect[prop] + rect[start];
@@ -1934,10 +1920,6 @@
1934
1920
  return toWindow(element).document.scrollingElement;
1935
1921
  }
1936
1922
 
1937
- function getViewport$1(scrollElement) {
1938
- return scrollElement === scrollingElement(scrollElement) ? window : scrollElement;
1939
- }
1940
-
1941
1923
  const dirs = [
1942
1924
  ['width', 'x', 'left', 'right'],
1943
1925
  ['height', 'y', 'top', 'bottom']];
@@ -1954,11 +1936,11 @@
1954
1936
  ...options };
1955
1937
 
1956
1938
 
1957
- const dim = options.flip ?
1958
- attachToWithFlip(element, target, options) :
1959
- attachTo(element, target, options);
1939
+ if (!isArray(target)) {
1940
+ target = [target, target];
1941
+ }
1960
1942
 
1961
- offset(element, dim);
1943
+ offset(element, getPosition(element, target, options));
1962
1944
  }
1963
1945
 
1964
1946
  function attachTo(element, target, options) {
@@ -1973,8 +1955,11 @@
1973
1955
 
1974
1956
 
1975
1957
  const position = offset(element);
1976
- const targetOffset = offset(target);
1958
+
1977
1959
  for (const [i, [prop, dir, start, end]] of Object.entries(dirs)) {
1960
+ const targetOffset =
1961
+ attach.target[i] === attach.element[i] ? offsetViewport(target[i]) : offset(target[i]);
1962
+
1978
1963
  position[start] = position[dir] =
1979
1964
  targetOffset[start] +
1980
1965
  moveBy(attach.target[i], end, targetOffset[prop]) -
@@ -1989,60 +1974,54 @@
1989
1974
  return start === 'center' ? dim / 2 : start === end ? dim : 0;
1990
1975
  }
1991
1976
 
1992
- function attachToWithFlip(element, target, options) {
1977
+ function getPosition(element, target, options) {
1993
1978
  const position = attachTo(element, target, options);
1994
- const targetDim = offset(target);
1995
1979
 
1996
1980
  let {
1997
1981
  flip,
1982
+ shift,
1998
1983
  attach: { element: elAttach, target: targetAttach },
1999
1984
  offset: elOffset,
2000
1985
  boundary,
2001
- viewport,
2002
1986
  viewportOffset } =
2003
1987
  options;
2004
1988
 
2005
- let viewports = scrollParents(element);
2006
- if (boundary === target) {
2007
- viewports = viewports.filter((viewport) => viewport !== boundary);
1989
+ if (!flip && !shift) {
1990
+ return position;
2008
1991
  }
2009
- const [scrollElement] = viewports;
2010
- viewports.push(viewport);
2011
1992
 
2012
1993
  const offsetPosition = { ...position };
2013
1994
  for (const [i, [prop, dir, start, end]] of Object.entries(dirs)) {
2014
- if (flip !== true && !includes(flip, dir)) {
2015
- continue;
2016
- }
1995
+ let viewports = scrollParents(target[i]);
1996
+ const [scrollElement] = viewports;
2017
1997
 
2018
- const willFlip =
2019
- !intersectLine(position, targetDim, i) && intersectLine(position, targetDim, 1 - i);
2020
-
2021
- viewport = getIntersectionArea(...viewports.filter(Boolean).map(offsetViewport));
1998
+ let viewport = getIntersectionArea(...viewports.map(offsetViewport));
2022
1999
 
2023
2000
  if (viewportOffset) {
2024
2001
  viewport[start] += viewportOffset;
2025
2002
  viewport[end] -= viewportOffset;
2026
2003
  }
2027
2004
 
2028
- if (boundary && !willFlip && position[prop] <= offset(boundary)[prop]) {
2029
- viewport = getIntersectionArea(viewport, offset(boundary));
2005
+ if (boundary) {
2006
+ viewport = getIntersectionArea(viewport, offsetViewport(boundary));
2030
2007
  }
2031
2008
 
2032
- const isInStartBoundary = position[start] >= viewport[start];
2033
- const isInEndBoundary = position[end] <= viewport[end];
2009
+ const isInStartViewport = position[start] >= viewport[start];
2010
+ const isInEndViewport = position[end] <= viewport[end];
2034
2011
 
2035
- if (isInStartBoundary && isInEndBoundary) {
2012
+ if (isInStartViewport && isInEndViewport) {
2036
2013
  continue;
2037
2014
  }
2038
2015
 
2039
- let offsetBy;
2016
+ let offsetBy = 0;
2017
+ const targetDim = offset(target[i]);
2040
2018
 
2041
2019
  // Flip
2042
- if (willFlip) {
2020
+ if (!intersectLine(position, targetDim, i) && intersectLine(position, targetDim, 1 - i)) {
2043
2021
  if (
2044
- elAttach[i] === end && isInStartBoundary ||
2045
- elAttach[i] === start && isInEndBoundary)
2022
+ !flip ||
2023
+ elAttach[i] === end && isInStartViewport ||
2024
+ elAttach[i] === start && isInEndViewport)
2046
2025
  {
2047
2026
  continue;
2048
2027
  }
@@ -2079,26 +2058,25 @@
2079
2058
  return false;
2080
2059
  }
2081
2060
 
2082
- if (flip === true || includes(flip, dirs[1 - i][1])) {
2083
- const newPos = attachToWithFlip(element, target, {
2084
- ...options,
2085
- attach: {
2086
- element: elAttach.map(flipDir).reverse(),
2087
- target: targetAttach.map(flipDir).reverse() },
2061
+ const newPos = getPosition(element, target, {
2062
+ ...options,
2063
+ attach: {
2064
+ element: elAttach.map(flipDir).reverse(),
2065
+ target: targetAttach.map(flipDir).reverse() },
2088
2066
 
2089
- offset: elOffset.reverse(),
2090
- flip: flip === true ? flip : [...flip, dirs[1 - i][1]],
2091
- recursion: true });
2067
+ offset: elOffset.reverse(),
2068
+ recursion: true });
2092
2069
 
2093
2070
 
2094
- if (newPos && isInScrollArea(newPos, scrollElement, 1 - i)) {
2095
- return newPos;
2096
- }
2071
+ if (newPos && isInScrollArea(newPos, scrollElement, 1 - i)) {
2072
+ return newPos;
2097
2073
  }
2074
+
2075
+ continue;
2098
2076
  }
2099
2077
 
2100
- // Move
2101
- } else {
2078
+ // Shift
2079
+ } else if (shift) {
2102
2080
  offsetBy =
2103
2081
  clamp(
2104
2082
  clamp(position[start], viewport[start], viewport[end] - position[prop]),
@@ -2154,7 +2132,7 @@
2154
2132
  getImage: getImage,
2155
2133
  transition: transition,
2156
2134
  Transition: Transition,
2157
- animate: animate$1,
2135
+ animate: animate$2,
2158
2136
  Animation: Animation,
2159
2137
  attr: attr,
2160
2138
  hasAttr: hasAttr,
@@ -2194,9 +2172,9 @@
2194
2172
  inBrowser: inBrowser,
2195
2173
  isRtl: isRtl,
2196
2174
  hasTouch: hasTouch,
2197
- pointerDown: pointerDown,
2198
- pointerMove: pointerMove,
2199
- pointerUp: pointerUp,
2175
+ pointerDown: pointerDown$1,
2176
+ pointerMove: pointerMove$1,
2177
+ pointerUp: pointerUp$1,
2200
2178
  pointerEnter: pointerEnter,
2201
2179
  pointerLeave: pointerLeave,
2202
2180
  pointerCancel: pointerCancel,
@@ -2284,10 +2262,8 @@
2284
2262
  findAll: findAll,
2285
2263
  escape: escape,
2286
2264
  css: css,
2287
- getCssVar: getCssVar,
2288
2265
  propName: propName,
2289
2266
  isInView: isInView,
2290
- scrollTop: scrollTop,
2291
2267
  scrollIntoView: scrollIntoView,
2292
2268
  scrolledOver: scrolledOver,
2293
2269
  scrollParents: scrollParents,
@@ -2610,7 +2586,7 @@
2610
2586
 
2611
2587
  value = props[key] === Boolean && value === '' ? true : coerce$1(props[key], value);
2612
2588
 
2613
- if (prop === 'target' && (!value || startsWith(value, '_'))) {
2589
+ if (prop === 'target' && startsWith(value, '_')) {
2614
2590
  continue;
2615
2591
  }
2616
2592
 
@@ -2621,7 +2597,7 @@
2621
2597
 
2622
2598
  for (const key in options) {
2623
2599
  const prop = camelize(key);
2624
- if (props[prop] !== undefined) {
2600
+ if (!isUndefined(props[prop])) {
2625
2601
  data$1[prop] = coerce$1(props[prop], options[key]);
2626
2602
  }
2627
2603
  }
@@ -2950,7 +2926,7 @@
2950
2926
  UIkit.data = '__uikit__';
2951
2927
  UIkit.prefix = 'uk-';
2952
2928
  UIkit.options = {};
2953
- UIkit.version = '3.14.4-dev.6a00f7fe6';
2929
+ UIkit.version = '3.14.4-dev.6c89e8709';
2954
2930
 
2955
2931
  globalAPI(UIkit);
2956
2932
  hooksAPI(UIkit);
@@ -3055,27 +3031,7 @@
3055
3031
  origin: false,
3056
3032
  transition: 'ease',
3057
3033
  clsEnter: 'uk-togglabe-enter',
3058
- clsLeave: 'uk-togglabe-leave',
3059
-
3060
- initProps: {
3061
- overflow: '',
3062
- maxHeight: '',
3063
- paddingTop: '',
3064
- paddingBottom: '',
3065
- marginTop: '',
3066
- marginBottom: '',
3067
- boxShadow: '' },
3068
-
3069
-
3070
- hideProps: {
3071
- overflow: 'hidden',
3072
- maxHeight: 0,
3073
- paddingTop: 0,
3074
- paddingBottom: 0,
3075
- marginTop: 0,
3076
- marginBottom: 0,
3077
- boxShadow: 'none' } },
3078
-
3034
+ clsLeave: 'uk-togglabe-leave' },
3079
3035
 
3080
3036
 
3081
3037
  computed: {
@@ -3084,7 +3040,7 @@
3084
3040
  },
3085
3041
 
3086
3042
  hasTransition(_ref2) {let { animation } = _ref2;
3087
- return startsWith(animation[0], 'slide');
3043
+ return ['slide', 'reveal'].some((transition) => startsWith(animation[0], transition));
3088
3044
  } },
3089
3045
 
3090
3046
 
@@ -3177,130 +3133,97 @@
3177
3133
  };
3178
3134
  }
3179
3135
 
3180
- function toggleTransition(cmp) {
3181
- switch (cmp.animation[0]) {
3182
- case 'slide-left':
3183
- return slideHorizontal(cmp);
3184
- case 'slide-right':
3185
- return slideHorizontal(cmp, true);}
3186
-
3187
- return slide$1(cmp);
3188
- }
3189
-
3190
- function slide$1(_ref4)
3191
-
3192
-
3136
+ function toggleTransition(cmp) {var _cmp$animation$;
3137
+ const [mode = 'reveal', startProp = 'top'] = ((_cmp$animation$ = cmp.animation[0]) == null ? void 0 : _cmp$animation$.split('-')) || [];
3193
3138
 
3139
+ const dirs = [
3140
+ ['left', 'right'],
3141
+ ['top', 'bottom']];
3194
3142
 
3143
+ const dir = dirs[includes(dirs[0], startProp) ? 0 : 1];
3144
+ const end = dir[1] === startProp;
3145
+ const props = ['width', 'height'];
3146
+ const dimProp = props[dirs.indexOf(dir)];
3147
+ const marginProp = "margin-" + dir[0];
3148
+ const marginStartProp = "margin-" + startProp;
3195
3149
 
3150
+ return async (el, show) => {
3151
+ let { duration, velocity, transition, _toggle } = cmp;
3196
3152
 
3153
+ let currentDim = dimensions$1(el)[dimProp];
3197
3154
 
3198
- {let { isToggled, duration, velocity, initProps, hideProps, transition, _toggle } = _ref4;
3199
- return (el, show) => {
3200
3155
  const inProgress = Transition.inProgress(el);
3201
- const inner =
3202
- !inProgress && el.hasChildNodes() ?
3203
- toFloat(css(el.firstElementChild, 'marginTop')) +
3204
- toFloat(css(el.lastElementChild, 'marginBottom')) :
3205
- 0;
3206
- const currentHeight = isVisible(el) ? toFloat(css(el, 'height')) + inner : 0;
3156
+ await Transition.cancel(el);
3207
3157
 
3208
- const props = inProgress ? css(el, Object.keys(initProps)) : show ? hideProps : initProps;
3209
-
3210
- Transition.cancel(el);
3211
-
3212
- if (!isToggled(el)) {
3158
+ if (show) {
3213
3159
  _toggle(el, true);
3214
3160
  }
3215
3161
 
3216
- css(el, 'maxHeight', '');
3217
-
3218
- // Update child components first
3219
- fastdom.flush();
3220
-
3221
- const endHeight = toFloat(css(el, 'height')) + inner;
3222
- duration = velocity * endHeight + duration;
3223
-
3224
- css(el, { ...props, maxHeight: currentHeight });
3225
-
3226
- return (
3227
- show ?
3228
- Transition.start(
3229
- el,
3230
- { ...initProps, overflow: 'hidden', maxHeight: endHeight },
3231
- duration * (1 - currentHeight / endHeight),
3232
- transition) :
3233
-
3234
- Transition.start(
3235
- el,
3236
- hideProps,
3237
- duration * (currentHeight / endHeight),
3238
- transition).
3239
- then(() => _toggle(el, false))).
3240
- then(() => css(el, initProps));
3241
- };
3242
- }
3162
+ const prevProps = Object.fromEntries(
3163
+ ['padding', 'border', 'width', 'height', 'overflow', marginProp, marginStartProp].map(
3164
+ (key) => [key, el.style[key]]));
3243
3165
 
3244
- function slideHorizontal(_ref5, right) {let { isToggled, duration, velocity, transition, _toggle } = _ref5;
3245
- return (el, show) => {
3246
- const visible = isVisible(el);
3247
- const marginLeft = toFloat(css(el, 'marginLeft'));
3248
3166
 
3249
- Transition.cancel(el);
3250
3167
 
3251
- const [scrollElement] = scrollParents(el);
3252
- css(scrollElement, 'overflowX', 'hidden');
3168
+ const dim = dimensions$1(el);
3169
+ const currentMargin = toFloat(css(el, marginProp));
3170
+ const marginStart = toFloat(css(el, marginStartProp));
3171
+ const endDim = dim[dimProp] + marginStart;
3253
3172
 
3254
- if (!isToggled(el)) {
3255
- _toggle(el, true);
3173
+ if (!inProgress && !show) {
3174
+ currentDim += marginStart;
3256
3175
  }
3257
3176
 
3258
- const width = toFloat(css(el, 'width'));
3259
- duration = velocity * width + duration;
3177
+ const [wrapper] = wrapInner(el, '<div>');
3178
+ css(wrapper, {
3179
+ boxSizing: 'border-box',
3180
+ height: dim.height,
3181
+ width: dim.width,
3182
+ ...css(el, [
3183
+ 'padding',
3184
+ 'borderTop',
3185
+ 'borderRight',
3186
+ 'borderBottom',
3187
+ 'borderLeft',
3188
+ 'borderImage',
3189
+ marginStartProp]) });
3260
3190
 
3261
- const percent = visible ? (width + marginLeft * (right ? -1 : 1)) / width * 100 : 0;
3262
- const offsetEl = offset(el);
3263
- const useClipPath = right ?
3264
- offsetEl.right < scrollElement.clientWidth :
3265
- Math.round(offsetEl.left) > 0;
3266
3191
 
3267
- css(el, {
3268
- clipPath: useClipPath ?
3269
- right ? "polygon(0 0," +
3270
- percent + "% 0," + percent + "% 100%,0 100%)" : "polygon(" + (
3271
- 100 - percent) + "% 0,100% 0,100% 100%," + (100 - percent) + "% 100%)" :
3272
- '',
3273
- marginLeft: (100 - percent) * (right ? 1 : -1) / 100 * width });
3274
3192
 
3193
+ css(el, {
3194
+ padding: 0,
3195
+ border: 0,
3196
+ [marginStartProp]: 0,
3197
+ width: dim.width,
3198
+ height: dim.height,
3199
+ overflow: 'hidden',
3200
+ [dimProp]: currentDim });
3275
3201
 
3276
- return (
3277
- show ?
3278
- Transition.start(
3279
- el,
3280
- {
3281
- clipPath: useClipPath ? "polygon(0 0,100% 0,100% 100%,0 100%)" : '',
3282
- marginLeft: 0 },
3283
3202
 
3284
- duration * (1 - percent / 100),
3285
- transition) :
3203
+ const percent = currentDim / endDim;
3204
+ duration = (velocity * endDim + duration) * (show ? 1 - percent : percent);
3205
+ const endProps = { [dimProp]: show ? endDim : 0 };
3286
3206
 
3287
- Transition.start(
3288
- el,
3289
- {
3290
- clipPath: useClipPath ?
3291
- right ? "polygon(0 0,0 0,0 100%,0 100%)" : "polygon(100% 0,100% 0,100% 100%,100% 100%)" :
3207
+ if (end) {
3208
+ css(el, marginProp, endDim - currentDim + currentMargin);
3209
+ endProps[marginProp] = show ? currentMargin : endDim + currentMargin;
3210
+ }
3292
3211
 
3212
+ if (!end ^ mode === 'reveal') {
3213
+ css(wrapper, marginProp, -endDim + currentDim);
3214
+ Transition.start(wrapper, { [marginProp]: show ? 0 : -endDim }, duration, transition);
3215
+ }
3293
3216
 
3294
- '',
3295
- marginLeft: (right ? 1 : -1) * width },
3217
+ try {
3218
+ await Transition.start(el, endProps, duration, transition);
3219
+ } finally {
3220
+ css(el, prevProps);
3221
+ unwrap(wrapper.firstChild);
3296
3222
 
3297
- duration * (percent / 100),
3298
- transition).
3299
- then(() => _toggle(el, false))).
3300
- then(() => {
3301
- css(scrollElement, 'overflowX', '');
3302
- css(el, { clipPath: '', marginLeft: '' });
3303
- });
3223
+ if (!show) {
3224
+ _toggle(el, false);
3225
+ }
3226
+ }
3304
3227
  };
3305
3228
  }
3306
3229
 
@@ -3325,6 +3248,7 @@
3325
3248
  mixins: [Class, Lazyload, Togglable],
3326
3249
 
3327
3250
  props: {
3251
+ animation: Boolean,
3328
3252
  targets: String,
3329
3253
  active: null,
3330
3254
  collapsible: Boolean,
@@ -3337,7 +3261,7 @@
3337
3261
  data: {
3338
3262
  targets: '> *',
3339
3263
  active: false,
3340
- animation: ['slide'],
3264
+ animation: true,
3341
3265
  collapsible: true,
3342
3266
  multiple: false,
3343
3267
  clsOpen: 'uk-open',
@@ -3383,7 +3307,7 @@
3383
3307
  hide(
3384
3308
  el,
3385
3309
  !hasClass(
3386
- this.items.find((item) => item.contains(el)),
3310
+ this.items.find((item) => within(el, item)),
3387
3311
  this.clsOpen));
3388
3312
 
3389
3313
 
@@ -3435,23 +3359,15 @@
3435
3359
  toggleClass(el, this.clsOpen, show);
3436
3360
  attr($(this.$props.toggle, el), 'aria-expanded', show);
3437
3361
 
3438
- const content = $("" + (el._wrapper ? '> * ' : '') + this.content, el);
3362
+ const content = $(this.content, el);
3439
3363
 
3440
- if (animate === false || !this.hasTransition) {
3364
+ if (animate === false || !this.animation) {
3365
+ content.hidden = !show;
3441
3366
  hide(content, !show);
3442
3367
  return;
3443
3368
  }
3444
3369
 
3445
- if (!el._wrapper) {
3446
- el._wrapper = wrapAll(content, "<div" + (show ? ' hidden' : '') + ">");
3447
- }
3448
-
3449
- hide(content, false);
3450
- await slide$1(this)(el._wrapper, show);
3451
- hide(content, !show);
3452
-
3453
- delete el._wrapper;
3454
- unwrap(content);
3370
+ await toggleTransition(this)(content, show);
3455
3371
 
3456
3372
  if (show) {
3457
3373
  const toggle = $(this.$props.toggle, el);
@@ -3477,18 +3393,17 @@
3477
3393
  args: 'animation',
3478
3394
 
3479
3395
  props: {
3396
+ animation: Boolean,
3480
3397
  close: String },
3481
3398
 
3482
3399
 
3483
3400
  data: {
3484
- animation: ['slide'],
3401
+ animation: true,
3485
3402
  selClose: '.uk-alert-close',
3486
- duration: 150,
3487
- hideProps: { opacity: 0, ...Togglable.data.hideProps } },
3403
+ duration: 150 },
3488
3404
 
3489
3405
 
3490
- events: [
3491
- {
3406
+ events: {
3492
3407
  name: 'click',
3493
3408
 
3494
3409
  delegate() {
@@ -3498,16 +3413,39 @@
3498
3413
  handler(e) {
3499
3414
  e.preventDefault();
3500
3415
  this.close();
3501
- } }],
3502
-
3416
+ } },
3503
3417
 
3504
3418
 
3505
3419
  methods: {
3506
3420
  async close() {
3507
- await this.toggleElement(this.$el);
3421
+ await this.toggleElement(this.$el, false, animate$1(this));
3508
3422
  this.$destroy(true);
3509
3423
  } } };
3510
3424
 
3425
+
3426
+
3427
+ function animate$1(_ref) {let { duration, transition, velocity } = _ref;
3428
+ return (el) => {
3429
+ const height = toFloat(css(el, 'height'));
3430
+ css(el, 'height', height);
3431
+ return Transition.start(
3432
+ el,
3433
+ {
3434
+ height: 0,
3435
+ marginTop: 0,
3436
+ marginBottom: 0,
3437
+ paddingTop: 0,
3438
+ paddingBottom: 0,
3439
+ borderTop: 0,
3440
+ borderBottom: 0,
3441
+ opacity: 0 },
3442
+
3443
+ velocity * height + duration,
3444
+ transition);
3445
+
3446
+ };
3447
+ }
3448
+
3511
3449
  var Video = {
3512
3450
  args: 'autoplay',
3513
3451
 
@@ -3656,13 +3594,17 @@
3656
3594
  props: {
3657
3595
  pos: String,
3658
3596
  offset: null,
3659
- flip: Boolean },
3597
+ flip: Boolean,
3598
+ shift: Boolean,
3599
+ inset: Boolean },
3660
3600
 
3661
3601
 
3662
3602
  data: {
3663
3603
  pos: "bottom-" + (isRtl ? 'right' : 'left'),
3604
+ offset: false,
3664
3605
  flip: true,
3665
- offset: false },
3606
+ shift: true,
3607
+ inset: false },
3666
3608
 
3667
3609
 
3668
3610
  connected() {
@@ -3676,7 +3618,7 @@
3676
3618
  let offset = [this.getPositionOffset(element), this.getShiftOffset(element)];
3677
3619
 
3678
3620
  const attach = {
3679
- element: [flipPosition(this.dir), this.align],
3621
+ element: [this.inset ? this.dir : flipPosition(this.dir), this.align],
3680
3622
  target: [this.dir, this.align] };
3681
3623
 
3682
3624
 
@@ -3687,6 +3629,9 @@
3687
3629
  offset = offset.reverse();
3688
3630
  }
3689
3631
 
3632
+ const [scrollElement] = scrollParents(element, /auto|scroll/);
3633
+ const { scrollTop, scrollLeft } = scrollElement;
3634
+
3690
3635
  // Ensure none positioned element does not generate scrollbars
3691
3636
  const elDim = dimensions$1(element);
3692
3637
  css(element, { top: -elDim.height, left: -elDim.width });
@@ -3696,92 +3641,88 @@
3696
3641
  offset,
3697
3642
  boundary,
3698
3643
  flip: this.flip,
3644
+ shift: this.shift,
3699
3645
  viewportOffset: this.getViewportOffset(element) });
3700
3646
 
3647
+
3648
+ // Restore scroll position
3649
+ scrollElement.scrollTop = scrollTop;
3650
+ scrollElement.scrollLeft = scrollLeft;
3701
3651
  },
3702
3652
 
3703
3653
  getPositionOffset(element) {
3704
3654
  return (
3705
3655
  toPx(
3706
- this.offset === false ? getCssVar('position-offset', element) : this.offset,
3656
+ this.offset === false ? css(element, '--uk-position-offset') : this.offset,
3707
3657
  this.axis === 'x' ? 'width' : 'height',
3708
3658
  element) * (
3709
- includes(['left', 'top'], this.dir) ? -1 : 1));
3659
+
3660
+ includes(['left', 'top'], this.dir) ? -1 : 1) * (
3661
+ this.inset ? -1 : 1));
3710
3662
 
3711
3663
  },
3712
3664
 
3713
3665
  getShiftOffset(element) {
3714
- return includes(['center', 'justify', 'stretch'], this.align) ?
3666
+ return this.align === 'center' ?
3715
3667
  0 :
3716
3668
  toPx(
3717
- getCssVar('position-shift-offset', element),
3669
+ css(element, '--uk-position-shift-offset'),
3718
3670
  this.axis === 'y' ? 'width' : 'height',
3719
3671
  element) * (
3720
3672
  includes(['left', 'top'], this.align) ? 1 : -1);
3721
3673
  },
3722
3674
 
3723
3675
  getViewportOffset(element) {
3724
- return toPx(getCssVar('position-viewport-offset', element));
3676
+ return toPx(css(element, '--uk-position-viewport-offset'));
3725
3677
  } } };
3726
3678
 
3727
- let active$1;
3679
+ var Style = {
3680
+ beforeConnect() {
3681
+ this._style = attr(this.$el, 'style');
3682
+ },
3683
+
3684
+ disconnected() {
3685
+ attr(this.$el, 'style', this._style);
3686
+ } };
3728
3687
 
3729
- var drop = {
3730
- mixins: [Container, Lazyload, Position, Togglable],
3688
+ const active$1 = [];
3731
3689
 
3732
- args: 'pos',
3690
+ var Modal = {
3691
+ mixins: [Class, Container, Togglable],
3733
3692
 
3734
3693
  props: {
3735
- mode: 'list',
3736
- toggle: Boolean,
3737
- boundary: Boolean,
3738
- boundaryAlign: Boolean,
3739
- delayShow: Number,
3740
- delayHide: Number,
3741
- display: String,
3742
- clsDrop: String,
3743
- animateOut: Boolean },
3694
+ selPanel: String,
3695
+ selClose: String,
3696
+ escClose: Boolean,
3697
+ bgClose: Boolean,
3698
+ stack: Boolean },
3744
3699
 
3745
3700
 
3746
3701
  data: {
3747
- mode: ['click', 'hover'],
3748
- toggle: '- *',
3749
- boundary: true,
3750
- boundaryAlign: false,
3751
- delayShow: 0,
3752
- delayHide: 800,
3753
- display: null,
3754
- clsDrop: false,
3755
- animation: ['uk-animation-fade'],
3756
3702
  cls: 'uk-open',
3757
- container: false,
3758
- animateOut: false },
3703
+ escClose: true,
3704
+ bgClose: true,
3705
+ overlay: true,
3706
+ stack: false },
3759
3707
 
3760
3708
 
3761
- created() {
3762
- this.tracker = new MouseTracker();
3763
- },
3709
+ computed: {
3710
+ panel(_ref, $el) {let { selPanel } = _ref;
3711
+ return $(selPanel, $el);
3712
+ },
3764
3713
 
3765
- beforeConnect() {
3766
- this.clsDrop = this.$props.clsDrop || "uk-" + this.$options.name;
3767
- },
3714
+ transitionElement() {
3715
+ return this.panel;
3716
+ },
3768
3717
 
3769
- connected() {
3770
- addClass(this.$el, this.clsDrop);
3718
+ bgClose(_ref2) {let { bgClose } = _ref2;
3719
+ return bgClose && this.panel;
3720
+ } },
3771
3721
 
3772
- if (this.toggle && !this.target) {
3773
- this.target = this.$create('toggle', query(this.toggle, this.$el), {
3774
- target: this.$el,
3775
- mode: this.mode }).
3776
- $el;
3777
- attr(this.target, 'aria-haspopup', true);
3778
- this.lazyload(this.target);
3779
- }
3780
- },
3781
3722
 
3782
- disconnected() {
3783
- if (this.isActive()) {
3784
- active$1 = null;
3723
+ beforeDisconnect() {
3724
+ if (includes(active$1, this)) {
3725
+ this.toggleElement(this.$el, false, false);
3785
3726
  }
3786
3727
  },
3787
3728
 
@@ -3790,99 +3731,476 @@
3790
3731
  name: 'click',
3791
3732
 
3792
3733
  delegate() {
3793
- return "." + this.clsDrop + "-close";
3734
+ return this.selClose;
3794
3735
  },
3795
3736
 
3796
3737
  handler(e) {
3797
3738
  e.preventDefault();
3798
- this.hide(false);
3739
+ this.hide();
3799
3740
  } },
3800
3741
 
3801
3742
 
3802
3743
  {
3803
- name: 'click',
3744
+ name: 'toggle',
3804
3745
 
3805
- delegate() {
3806
- return 'a[href^="#"]';
3807
- },
3746
+ self: true,
3808
3747
 
3809
- handler(_ref) {let { defaultPrevented, current: { hash } } = _ref;
3810
- if (!defaultPrevented && hash && !within(hash, this.$el)) {
3811
- this.hide(false);
3748
+ handler(e) {
3749
+ if (e.defaultPrevented) {
3750
+ return;
3812
3751
  }
3813
- } },
3814
3752
 
3753
+ e.preventDefault();
3815
3754
 
3816
- {
3817
- name: 'beforescroll',
3818
-
3819
- handler() {
3820
- this.hide(false);
3755
+ if (this.isToggled() === includes(active$1, this)) {
3756
+ this.toggle();
3757
+ }
3821
3758
  } },
3822
3759
 
3823
3760
 
3824
3761
  {
3825
- name: 'toggle',
3762
+ name: 'beforeshow',
3826
3763
 
3827
3764
  self: true,
3828
3765
 
3829
- handler(e, toggle) {
3830
- e.preventDefault();
3766
+ handler(e) {
3767
+ if (includes(active$1, this)) {
3768
+ return false;
3769
+ }
3831
3770
 
3832
- if (this.isToggled()) {
3833
- this.hide(false);
3771
+ if (!this.stack && active$1.length) {
3772
+ Promise.all(active$1.map((modal) => modal.hide())).then(this.show);
3773
+ e.preventDefault();
3834
3774
  } else {
3835
- this.show(toggle == null ? void 0 : toggle.$el, false);
3775
+ active$1.push(this);
3836
3776
  }
3837
3777
  } },
3838
3778
 
3839
3779
 
3840
3780
  {
3841
- name: 'toggleshow',
3781
+ name: 'show',
3842
3782
 
3843
3783
  self: true,
3844
3784
 
3845
- handler(e, toggle) {
3846
- e.preventDefault();
3847
- this.show(toggle == null ? void 0 : toggle.$el);
3848
- } },
3849
-
3850
-
3851
- {
3852
- name: 'togglehide',
3785
+ handler() {
3786
+ once(
3787
+ this.$el,
3788
+ 'hide',
3789
+ on(document, 'focusin', (e) => {
3790
+ if (last(active$1) === this && !within(e.target, this.$el)) {
3791
+ this.$el.focus();
3792
+ }
3793
+ }));
3853
3794
 
3854
- self: true,
3855
3795
 
3856
- handler(e) {
3857
- e.preventDefault();
3858
- if (!matches(this.$el, ':focus,:hover')) {
3859
- this.hide();
3796
+ if (this.overlay) {
3797
+ once(this.$el, 'hidden', preventOverscroll(this.$el));
3798
+ once(this.$el, 'hidden', preventBackgroundScroll());
3860
3799
  }
3861
- } },
3862
-
3863
-
3864
- {
3865
- name: pointerEnter + " focusin",
3866
-
3867
- filter() {
3868
- return includes(this.mode, 'hover');
3869
- },
3870
3800
 
3871
- handler(e) {
3872
- if (!isTouch(e)) {
3873
- this.clearTimers();
3801
+ if (this.stack) {
3802
+ css(this.$el, 'zIndex', toFloat(css(this.$el, 'zIndex')) + active$1.length);
3874
3803
  }
3875
- } },
3876
-
3877
3804
 
3878
- {
3879
- name: pointerLeave + " focusout",
3805
+ addClass(document.documentElement, this.clsPage);
3880
3806
 
3881
- filter() {
3882
- return includes(this.mode, 'hover');
3883
- },
3807
+ if (this.bgClose) {
3808
+ once(
3809
+ this.$el,
3810
+ 'hide',
3811
+ on(document, pointerDown$1, (_ref3) => {let { target } = _ref3;
3812
+ if (
3813
+ last(active$1) !== this ||
3814
+ this.overlay && !within(target, this.$el) ||
3815
+ within(target, this.panel))
3816
+ {
3817
+ return;
3818
+ }
3884
3819
 
3885
- handler(e) {
3820
+ once(
3821
+ document,
3822
+ pointerUp$1 + " " + pointerCancel + " scroll",
3823
+ (_ref4) => {let { defaultPrevented, type, target: newTarget } = _ref4;
3824
+ if (
3825
+ !defaultPrevented &&
3826
+ type === pointerUp$1 &&
3827
+ target === newTarget)
3828
+ {
3829
+ this.hide();
3830
+ }
3831
+ },
3832
+ true);
3833
+
3834
+ }),
3835
+ { self: true });
3836
+
3837
+ }
3838
+
3839
+ if (this.escClose) {
3840
+ once(
3841
+ this.$el,
3842
+ 'hide',
3843
+ on(document, 'keydown', (e) => {
3844
+ if (e.keyCode === 27 && last(active$1) === this) {
3845
+ this.hide();
3846
+ }
3847
+ }),
3848
+ { self: true });
3849
+
3850
+ }
3851
+ } },
3852
+
3853
+
3854
+ {
3855
+ name: 'shown',
3856
+
3857
+ self: true,
3858
+
3859
+ handler() {
3860
+ if (!isFocusable(this.$el)) {
3861
+ attr(this.$el, 'tabindex', '-1');
3862
+ }
3863
+
3864
+ if (!$(':focus', this.$el)) {
3865
+ this.$el.focus();
3866
+ }
3867
+ } },
3868
+
3869
+
3870
+ {
3871
+ name: 'hidden',
3872
+
3873
+ self: true,
3874
+
3875
+ handler() {
3876
+ if (includes(active$1, this)) {
3877
+ active$1.splice(active$1.indexOf(this), 1);
3878
+ }
3879
+
3880
+ css(this.$el, 'zIndex', '');
3881
+
3882
+ if (!active$1.some((modal) => modal.clsPage === this.clsPage)) {
3883
+ removeClass(document.documentElement, this.clsPage);
3884
+ }
3885
+ } }],
3886
+
3887
+
3888
+
3889
+ methods: {
3890
+ toggle() {
3891
+ return this.isToggled() ? this.hide() : this.show();
3892
+ },
3893
+
3894
+ show() {
3895
+ if (this.container && parent(this.$el) !== this.container) {
3896
+ append(this.container, this.$el);
3897
+ return new Promise((resolve) =>
3898
+ requestAnimationFrame(() => this.show().then(resolve)));
3899
+
3900
+ }
3901
+
3902
+ return this.toggleElement(this.$el, true, animate(this));
3903
+ },
3904
+
3905
+ hide() {
3906
+ return this.toggleElement(this.$el, false, animate(this));
3907
+ } } };
3908
+
3909
+
3910
+
3911
+ function animate(_ref5) {let { transitionElement, _toggle } = _ref5;
3912
+ return (el, show) =>
3913
+ new Promise((resolve, reject) =>
3914
+ once(el, 'show hide', () => {
3915
+ el._reject == null ? void 0 : el._reject();
3916
+ el._reject = reject;
3917
+
3918
+ _toggle(el, show);
3919
+
3920
+ const off = once(
3921
+ transitionElement,
3922
+ 'transitionstart',
3923
+ () => {
3924
+ once(transitionElement, 'transitionend transitioncancel', resolve, {
3925
+ self: true });
3926
+
3927
+ clearTimeout(timer);
3928
+ },
3929
+ { self: true });
3930
+
3931
+
3932
+ const timer = setTimeout(() => {
3933
+ off();
3934
+ resolve();
3935
+ }, toMs(css(transitionElement, 'transitionDuration')));
3936
+ })).
3937
+ then(() => delete el._reject);
3938
+ }
3939
+
3940
+ function toMs(time) {
3941
+ return time ? endsWith(time, 'ms') ? toFloat(time) : toFloat(time) * 1000 : 0;
3942
+ }
3943
+
3944
+ function preventOverscroll(el) {
3945
+ if (CSS.supports('overscroll-behavior', 'contain')) {
3946
+ const elements = filterChildren(el, (child) => /auto|scroll/.test(css(child, 'overflow')));
3947
+ css(elements, 'overscrollBehavior', 'contain');
3948
+ return () => css(elements, 'overscrollBehavior', '');
3949
+ }
3950
+
3951
+ let startClientY;
3952
+
3953
+ const events = [
3954
+ on(
3955
+ el,
3956
+ 'touchstart',
3957
+ (_ref6) => {let { targetTouches } = _ref6;
3958
+ if (targetTouches.length === 1) {
3959
+ startClientY = targetTouches[0].clientY;
3960
+ }
3961
+ },
3962
+ { passive: true }),
3963
+
3964
+
3965
+ on(
3966
+ el,
3967
+ 'touchmove',
3968
+ (e) => {
3969
+ if (e.targetTouches.length !== 1) {
3970
+ return;
3971
+ }
3972
+
3973
+ let [scrollParent] = scrollParents(e.target, /auto|scroll/);
3974
+ if (!within(scrollParent, el)) {
3975
+ scrollParent = el;
3976
+ }
3977
+
3978
+ const clientY = e.targetTouches[0].clientY - startClientY;
3979
+ const { scrollTop, scrollHeight, clientHeight } = scrollParent;
3980
+
3981
+ if (
3982
+ clientHeight >= scrollHeight ||
3983
+ scrollTop === 0 && clientY > 0 ||
3984
+ scrollHeight - scrollTop <= clientHeight && clientY < 0)
3985
+ {
3986
+ e.cancelable && e.preventDefault();
3987
+ }
3988
+ },
3989
+ { passive: false })];
3990
+
3991
+
3992
+
3993
+ return () => events.forEach((fn) => fn());
3994
+ }
3995
+
3996
+ let prevented;
3997
+ function preventBackgroundScroll() {
3998
+ if (prevented) {
3999
+ return noop;
4000
+ }
4001
+ prevented = true;
4002
+ const { body, documentElement } = document;
4003
+ css(body, {
4004
+ overflowY: width(window) > documentElement.clientWidth ? 'scroll' : '',
4005
+ touchAction: 'none' });
4006
+
4007
+ css(documentElement, 'overflowY', 'hidden');
4008
+ return () => {
4009
+ prevented = false;
4010
+ css(documentElement, 'overflowY', '');
4011
+ css(body, { overflowY: '', touchAction: '' });
4012
+ };
4013
+ }
4014
+
4015
+ function filterChildren(el, fn) {
4016
+ const children = [];
4017
+ apply(el, (node) => {
4018
+ if (fn(node)) {
4019
+ children.push(node);
4020
+ }
4021
+ });
4022
+ return children;
4023
+ }
4024
+
4025
+ let active;
4026
+
4027
+ var drop = {
4028
+ mixins: [Container, Lazyload, Position, Style, Togglable],
4029
+
4030
+ args: 'pos',
4031
+
4032
+ props: {
4033
+ mode: 'list',
4034
+ toggle: Boolean,
4035
+ boundary: Boolean,
4036
+ target: Boolean,
4037
+ targetX: Boolean,
4038
+ targetY: Boolean,
4039
+ stretch: Boolean,
4040
+ delayShow: Number,
4041
+ delayHide: Number,
4042
+ display: String,
4043
+ clsDrop: String,
4044
+ animateOut: Boolean,
4045
+ bgScroll: Boolean },
4046
+
4047
+
4048
+ data: {
4049
+ mode: ['click', 'hover'],
4050
+ toggle: '- *',
4051
+ boundary: false,
4052
+ target: false,
4053
+ targetX: false,
4054
+ targetY: false,
4055
+ stretch: false,
4056
+ delayShow: 0,
4057
+ delayHide: 800,
4058
+ display: null,
4059
+ clsDrop: false,
4060
+ animateOut: false,
4061
+ bgScroll: true,
4062
+ animation: ['uk-animation-fade'],
4063
+ cls: 'uk-open',
4064
+ container: false },
4065
+
4066
+
4067
+ computed: {
4068
+ target(_ref, $el) {let { target, targetX, targetY } = _ref;
4069
+ targetX = targetX || target || this.targetEl;
4070
+ targetY = targetY || target || this.targetEl;
4071
+
4072
+ return [
4073
+ targetX === true ? window : query(targetX, $el),
4074
+ targetY === true ? window : query(targetY, $el)];
4075
+
4076
+ } },
4077
+
4078
+
4079
+ created() {
4080
+ this.tracker = new MouseTracker();
4081
+ },
4082
+
4083
+ beforeConnect() {
4084
+ this.clsDrop = this.$props.clsDrop || "uk-" + this.$options.name;
4085
+ },
4086
+
4087
+ connected() {
4088
+ addClass(this.$el, this.clsDrop);
4089
+
4090
+ if (this.toggle && !this.targetEl) {
4091
+ this.targetEl = this.$create('toggle', query(this.toggle, this.$el), {
4092
+ target: this.$el,
4093
+ mode: this.mode }).
4094
+ $el;
4095
+ attr(this.targetEl, 'aria-haspopup', true);
4096
+ this.lazyload(this.targetEl);
4097
+ }
4098
+ },
4099
+
4100
+ disconnected() {
4101
+ if (this.isActive()) {
4102
+ active = null;
4103
+ }
4104
+ },
4105
+
4106
+ events: [
4107
+ {
4108
+ name: 'click',
4109
+
4110
+ delegate() {
4111
+ return "." + this.clsDrop + "-close";
4112
+ },
4113
+
4114
+ handler(e) {
4115
+ e.preventDefault();
4116
+ this.hide(false);
4117
+ } },
4118
+
4119
+
4120
+ {
4121
+ name: 'click',
4122
+
4123
+ delegate() {
4124
+ return 'a[href^="#"]';
4125
+ },
4126
+
4127
+ handler(_ref2) {let { defaultPrevented, current: { hash } } = _ref2;
4128
+ if (!defaultPrevented && hash && !within(hash, this.$el)) {
4129
+ this.hide(false);
4130
+ }
4131
+ } },
4132
+
4133
+
4134
+ {
4135
+ name: 'beforescroll',
4136
+
4137
+ handler() {
4138
+ this.hide(false);
4139
+ } },
4140
+
4141
+
4142
+ {
4143
+ name: 'toggle',
4144
+
4145
+ self: true,
4146
+
4147
+ handler(e, toggle) {
4148
+ e.preventDefault();
4149
+
4150
+ if (this.isToggled()) {
4151
+ this.hide(false);
4152
+ } else {
4153
+ this.show(toggle == null ? void 0 : toggle.$el, false);
4154
+ }
4155
+ } },
4156
+
4157
+
4158
+ {
4159
+ name: 'toggleshow',
4160
+
4161
+ self: true,
4162
+
4163
+ handler(e, toggle) {
4164
+ e.preventDefault();
4165
+ this.show(toggle == null ? void 0 : toggle.$el);
4166
+ } },
4167
+
4168
+
4169
+ {
4170
+ name: 'togglehide',
4171
+
4172
+ self: true,
4173
+
4174
+ handler(e) {
4175
+ e.preventDefault();
4176
+ if (!matches(this.$el, ':focus,:hover')) {
4177
+ this.hide();
4178
+ }
4179
+ } },
4180
+
4181
+
4182
+ {
4183
+ name: pointerEnter + " focusin",
4184
+
4185
+ filter() {
4186
+ return includes(this.mode, 'hover');
4187
+ },
4188
+
4189
+ handler(e) {
4190
+ if (!isTouch(e)) {
4191
+ this.clearTimers();
4192
+ }
4193
+ } },
4194
+
4195
+
4196
+ {
4197
+ name: pointerLeave + " focusout",
4198
+
4199
+ filter() {
4200
+ return includes(this.mode, 'hover');
4201
+ },
4202
+
4203
+ handler(e) {
3886
4204
  if (!isTouch(e) && e.relatedTarget) {
3887
4205
  this.hide();
3888
4206
  }
@@ -3910,25 +4228,25 @@
3910
4228
  self: true,
3911
4229
 
3912
4230
  handler() {
3913
- active$1 = this;
4231
+ active = this;
3914
4232
 
3915
4233
  this.tracker.init();
3916
4234
 
3917
4235
  for (const handler of [
3918
4236
  on(
3919
4237
  document,
3920
- pointerDown,
3921
- (_ref2) => {let { target } = _ref2;return (
4238
+ pointerDown$1,
4239
+ (_ref3) => {let { target } = _ref3;return (
3922
4240
  !within(target, this.$el) &&
3923
4241
  once(
3924
4242
  document,
3925
- pointerUp + " " + pointerCancel + " scroll",
3926
- (_ref3) => {let { defaultPrevented, type, target: newTarget } = _ref3;
4243
+ pointerUp$1 + " " + pointerCancel + " scroll",
4244
+ (_ref4) => {let { defaultPrevented, type, target: newTarget } = _ref4;
3927
4245
  if (
3928
4246
  !defaultPrevented &&
3929
- type === pointerUp &&
4247
+ type === pointerUp$1 &&
3930
4248
  target === newTarget &&
3931
- !(this.target && within(target, this.target)))
4249
+ !(this.targetEl && within(target, this.targetEl)))
3932
4250
  {
3933
4251
  this.hide(false);
3934
4252
  }
@@ -3943,13 +4261,17 @@
3943
4261
  }
3944
4262
  }),
3945
4263
 
3946
- ...(this.display === 'static' && this.align !== 'stretch' ?
4264
+ ...(this.bgScroll ?
4265
+ [] :
4266
+ [preventOverscroll(this.$el), preventBackgroundScroll()]),
4267
+
4268
+ ...(this.display === 'static' ?
3947
4269
  [] :
3948
4270
  (() => {
3949
4271
  const handler = () => this.$emit();
3950
4272
  return [
3951
4273
  on(window, 'resize', handler),
3952
- on(document, 'scroll', handler, true),
4274
+ on([document, scrollParents(this.$el)], 'scroll', handler),
3953
4275
  (() => {
3954
4276
  const observer = observeResize(
3955
4277
  scrollParents(this.$el),
@@ -3978,16 +4300,16 @@
3978
4300
  {
3979
4301
  name: 'hide',
3980
4302
 
3981
- handler(_ref4) {let { target } = _ref4;
4303
+ handler(_ref5) {let { target } = _ref5;
3982
4304
  if (this.$el !== target) {
3983
- active$1 =
3984
- active$1 === null && within(target, this.$el) && this.isToggled() ?
4305
+ active =
4306
+ active === null && within(target, this.$el) && this.isToggled() ?
3985
4307
  this :
3986
- active$1;
4308
+ active;
3987
4309
  return;
3988
4310
  }
3989
4311
 
3990
- active$1 = this.isActive() ? null : active$1;
4312
+ active = this.isActive() ? null : active;
3991
4313
  this.tracker.cancel();
3992
4314
  } }],
3993
4315
 
@@ -4002,12 +4324,12 @@
4002
4324
 
4003
4325
 
4004
4326
  methods: {
4005
- show(target, delay) {if (target === void 0) {target = this.target;}if (delay === void 0) {delay = true;}
4006
- if (this.isToggled() && target && this.target && target !== this.target) {
4327
+ show(target, delay) {if (target === void 0) {target = this.targetEl;}if (delay === void 0) {delay = true;}
4328
+ if (this.isToggled() && target && this.targetEl && target !== this.targetEl) {
4007
4329
  this.hide(false, false);
4008
4330
  }
4009
4331
 
4010
- this.target = target;
4332
+ this.targetEl = target;
4011
4333
 
4012
4334
  this.clearTimers();
4013
4335
 
@@ -4015,16 +4337,16 @@
4015
4337
  return;
4016
4338
  }
4017
4339
 
4018
- if (active$1) {
4019
- if (delay && active$1.isDelaying) {
4340
+ if (active) {
4341
+ if (delay && active.isDelaying) {
4020
4342
  this.showTimer = setTimeout(() => matches(target, ':hover') && this.show(), 10);
4021
4343
  return;
4022
4344
  }
4023
4345
 
4024
4346
  let prev;
4025
- while (active$1 && prev !== active$1 && !within(this.$el, active$1.$el)) {
4026
- prev = active$1;
4027
- active$1.hide(false, false);
4347
+ while (active && prev !== active && !within(this.$el, active.$el)) {
4348
+ prev = active;
4349
+ active.hide(false, false);
4028
4350
  }
4029
4351
  }
4030
4352
 
@@ -4065,65 +4387,74 @@
4065
4387
  },
4066
4388
 
4067
4389
  isActive() {
4068
- return active$1 === this;
4390
+ return active === this;
4069
4391
  },
4070
4392
 
4071
4393
  position() {
4072
4394
  removeClass(this.$el, this.clsDrop + "-stack");
4073
- toggleClass(this.$el, this.clsDrop + "-boundary", this.boundaryAlign);
4074
- toggleClass(this.$el, this.clsDrop + "-stretch", this.align === 'stretch');
4395
+ attr(this.$el, 'style', this._style);
4075
4396
 
4076
- const boundary = query(this.boundary, this.$el);
4077
- const target = boundary && this.boundaryAlign ? boundary : this.target;
4078
- const [scrollParent] = scrollParents(
4079
- boundary && this.boundaryAlign ? boundary : this.$el);
4397
+ // Ensure none positioned element does not generate scrollbars
4398
+ this.$el.hidden = true;
4080
4399
 
4081
- const scrollParentOffset = offset(scrollParent);
4082
- const boundaryOffset = boundary ? offset(boundary) : scrollParentOffset;
4400
+ const boundary = query(this.boundary, this.$el);
4401
+ const boundaryOffset = offsetViewport(boundary || window);
4402
+ const viewports = this.target.map((target) => offsetViewport(scrollParents(target)[0]));
4083
4403
  const viewportOffset = this.getViewportOffset(this.$el);
4084
4404
 
4085
- css(this.$el, 'maxWidth', '');
4086
- const maxWidth = scrollParentOffset.width - 2 * viewportOffset;
4405
+ const dirs = [
4406
+ [0, ['x', 'width', 'left', 'right']],
4407
+ [1, ['y', 'height', 'top', 'bottom']]];
4087
4408
 
4088
- if (this.align === 'justify') {
4089
- const prop = this.axis === 'y' ? 'width' : 'height';
4090
- css(
4091
- this.$el,
4092
- prop,
4093
- Math.min(
4094
- (boundary ? boundaryOffset : offset(this.target))[prop],
4095
- scrollParentOffset[prop] - 2 * viewportOffset));
4096
-
4097
-
4098
- } else if (this.align === 'stretch') {
4099
- this.flip = this.axis === 'y' ? 'x' : 'y';
4100
- this.display = 'static';
4101
-
4102
- const viewport = offsetViewport(scrollParent);
4103
- const targetDim = offset(target);
4104
- const elOffset = Math.abs(this.getPositionOffset(this.$el)) + viewportOffset;
4105
-
4106
- css(this.$el, {
4107
- width:
4108
- this.axis === 'y' ?
4109
- viewport.width :
4110
- (this.dir === 'left' ?
4111
- targetDim.left - viewport.left :
4112
- viewport.right - targetDim.right) - elOffset,
4113
- height:
4114
- this.axis === 'x' ?
4115
- viewport.height :
4116
- (this.dir === 'top' ?
4117
- targetDim.top - viewport.top :
4118
- viewport.bottom - targetDim.bottom) - elOffset });
4119
-
4120
- } else if (this.$el.offsetWidth > maxWidth) {
4409
+
4410
+ for (const [i, [axis, prop]] of dirs) {
4411
+ if (this.axis !== axis && includes([axis, true], this.stretch)) {
4412
+ css(this.$el, {
4413
+ [prop]: Math.min(
4414
+ boundaryOffset[prop],
4415
+ viewports[i][prop] - 2 * viewportOffset),
4416
+
4417
+ ["overflow-" + axis]: 'auto' });
4418
+
4419
+ }
4420
+ }
4421
+
4422
+ const maxWidth = viewports[0].width - 2 * viewportOffset;
4423
+
4424
+ if (this.$el.offsetWidth > maxWidth) {
4121
4425
  addClass(this.$el, this.clsDrop + "-stack");
4122
4426
  }
4123
4427
 
4124
4428
  css(this.$el, 'maxWidth', maxWidth);
4125
4429
 
4126
- this.positionAt(this.$el, target, boundary);
4430
+ this.$el.hidden = false;
4431
+
4432
+ this.positionAt(this.$el, this.target, boundary);
4433
+
4434
+ for (const [i, [axis, prop, start, end]] of dirs) {
4435
+ if (this.axis === axis && includes([axis, true], this.stretch)) {
4436
+ const positionOffset = Math.abs(this.getPositionOffset(this.$el));
4437
+ const targetOffset = offset(this.target[i]);
4438
+ const elOffset = offset(this.$el);
4439
+
4440
+ css(this.$el, {
4441
+ [prop]:
4442
+ (targetOffset[start] > elOffset[start] ?
4443
+ targetOffset[start] -
4444
+ Math.max(
4445
+ boundaryOffset[start],
4446
+ viewports[i][start] + viewportOffset) :
4447
+
4448
+ Math.min(
4449
+ boundaryOffset[end],
4450
+ viewports[i][end] - viewportOffset) -
4451
+ targetOffset[end]) - positionOffset,
4452
+ ["overflow-" + axis]: 'auto' });
4453
+
4454
+
4455
+ this.positionAt(this.$el, this.target, boundary);
4456
+ }
4457
+ }
4127
4458
  } } };
4128
4459
 
4129
4460
 
@@ -4620,8 +4951,11 @@
4620
4951
  let minHeight = '';
4621
4952
  const box = boxModelAdjust(this.$el, 'height', 'content-box');
4622
4953
 
4954
+ const { body, scrollingElement } = document;
4623
4955
  const [scrollElement] = scrollParents(this.$el, /auto|scroll/);
4624
- const { height: viewportHeight } = offsetViewport(scrollElement);
4956
+ const { height: viewportHeight } = offsetViewport(
4957
+ scrollElement === body ? scrollingElement : scrollElement);
4958
+
4625
4959
 
4626
4960
  if (this.expand) {
4627
4961
  minHeight = Math.max(
@@ -4631,14 +4965,19 @@
4631
4965
  0);
4632
4966
 
4633
4967
  } else {
4634
- // on mobile devices (iOS and Android) window.innerHeight !== 100vh
4635
- minHeight = "calc(" + (
4636
- document.scrollingElement === scrollElement ? '100vh' : viewportHeight + "px");
4968
+ const isScrollingElement =
4969
+ scrollingElement === scrollElement || body === scrollElement;
4637
4970
 
4971
+ // on mobile devices (iOS and Android) window.innerHeight !== 100vh
4972
+ minHeight = "calc(" + (isScrollingElement ? '100vh' : viewportHeight + "px");
4638
4973
 
4639
4974
  if (this.offsetTop) {
4640
- const top = offsetPosition(this.$el)[0] - offsetPosition(scrollElement)[0];
4641
- minHeight += top > 0 && top < viewportHeight / 2 ? " - " + top + "px" : '';
4975
+ if (isScrollingElement) {
4976
+ const top = offsetPosition(this.$el)[0] - offsetPosition(scrollElement)[0];
4977
+ minHeight += top > 0 && top < viewportHeight / 2 ? " - " + top + "px" : '';
4978
+ } else {
4979
+ minHeight += " - " + css(scrollElement, 'paddingTop');
4980
+ }
4642
4981
  }
4643
4982
 
4644
4983
  if (this.offsetBottom === true) {
@@ -4877,11 +5216,17 @@
4877
5216
 
4878
5217
  var closeIcon = "<svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" xmlns=\"http://www.w3.org/2000/svg\"><line fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" x1=\"1\" y1=\"1\" x2=\"13\" y2=\"13\"/><line fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" x1=\"13\" y1=\"1\" x2=\"1\" y2=\"13\"/></svg>";
4879
5218
 
4880
- var closeLarge = "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><line fill=\"none\" stroke=\"#000\" stroke-width=\"1.4\" x1=\"1\" y1=\"1\" x2=\"19\" y2=\"19\"/><line fill=\"none\" stroke=\"#000\" stroke-width=\"1.4\" x1=\"19\" y1=\"1\" x2=\"1\" y2=\"19\"/></svg>";
5219
+ var closeLarge = "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><line fill=\"none\" stroke=\"#000\" stroke-width=\"1.4\" x1=\"1\" y1=\"1\" x2=\"19\" y2=\"19\"/><line fill=\"none\" stroke=\"#000\" stroke-width=\"1.4\" x1=\"19\" y1=\"1\" x2=\"1\" y2=\"19\"/></svg>";
5220
+
5221
+ var marker = "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><rect x=\"9\" y=\"4\" width=\"1\" height=\"11\"/><rect x=\"4\" y=\"9\" width=\"11\" height=\"1\"/></svg>";
5222
+
5223
+ var navParentIcon = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"12\" viewBox=\"0 0 12 12\"><polyline fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" points=\"1 3.5 6 8.5 11 3.5\"/></svg>";
5224
+
5225
+ var navParentIconLarge = "<svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" xmlns=\"http://www.w3.org/2000/svg\"><polyline fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" points=\"1 4 7 10 13 4\"/></svg>";
4881
5226
 
4882
- 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>";
5227
+ var navbarParentIcon = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"12\" viewBox=\"0 0 12 12\"><polyline fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" points=\"1 3.5 6 8.5 11 3.5\"/></svg>";
4883
5228
 
4884
- 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>";
5229
+ var navbarToggleIcon = "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><style>.uk-navbar-toggle svg > [class*='line-'] {\n transition: 0.2s ease-in-out;\n transition-property: transform, opacity,;\n transform-origin: center;\n opacity: 1;\n }\n\n .uk-navbar-toggle[aria-expanded=\"true\"] svg > .line-2 { transform: rotate(45deg); }\n .uk-navbar-toggle[aria-expanded=\"true\"] svg > .line-3 { transform: rotate(-45deg); }\n\n .uk-navbar-toggle[aria-expanded=\"true\"] svg > .line-1,\n .uk-navbar-toggle[aria-expanded=\"true\"] svg > .line-4 { opacity: 0; }\n .uk-navbar-toggle[aria-expanded=\"true\"] svg > .line-1 { transform: translateY(6px) scaleX(0); }\n .uk-navbar-toggle[aria-expanded=\"true\"] svg > .line-4 { transform: translateY(-6px) scaleX(0); }</style><rect class=\"line-1\" y=\"3\" width=\"20\" height=\"2\"/><rect class=\"line-2\" y=\"9\" width=\"20\" height=\"2\"/><rect class=\"line-3\" y=\"9\" width=\"20\" height=\"2\"/><rect class=\"line-4\" y=\"15\" width=\"20\" height=\"2\"/></svg>";
4885
5230
 
4886
5231
  var overlayIcon = "<svg width=\"40\" height=\"40\" viewBox=\"0 0 40 40\" xmlns=\"http://www.w3.org/2000/svg\"><rect x=\"19\" y=\"0\" width=\"1\" height=\"40\"/><rect x=\"0\" y=\"19\" width=\"40\" height=\"1\"/></svg>";
4887
5232
 
@@ -4913,6 +5258,9 @@
4913
5258
  marker,
4914
5259
  'close-icon': closeIcon,
4915
5260
  'close-large': closeLarge,
5261
+ 'nav-parent-icon': navParentIcon,
5262
+ 'nav-parent-icon-large': navParentIconLarge,
5263
+ 'navbar-parent-icon': navbarParentIcon,
4916
5264
  'navbar-toggle-icon': navbarToggleIcon,
4917
5265
  'overlay-icon': overlayIcon,
4918
5266
  'pagination-next': paginationNext,
@@ -4970,6 +5318,15 @@
4970
5318
  } };
4971
5319
 
4972
5320
 
5321
+ const NavParentIcon = {
5322
+ extends: IconComponent,
5323
+
5324
+ beforeConnect() {
5325
+ const icon = this.$props.icon;
5326
+ this.icon = closest(this.$el, '.uk-nav-primary') ? icon + "-large" : icon;
5327
+ } };
5328
+
5329
+
4973
5330
  const Slidenav = {
4974
5331
  extends: IconComponent,
4975
5332
 
@@ -5181,385 +5538,133 @@
5181
5538
  append(picture, source);
5182
5539
  }
5183
5540
  append(picture, img);
5184
- }
5185
- }
5186
-
5187
- function parseSources(sources) {
5188
- if (!sources) {
5189
- return [];
5190
- }
5191
-
5192
- if (startsWith(sources, '[')) {
5193
- try {
5194
- sources = JSON.parse(sources);
5195
- } catch (e) {
5196
- sources = [];
5197
- }
5198
- } else {
5199
- sources = parseOptions(sources);
5200
- }
5201
-
5202
- if (!isArray(sources)) {
5203
- sources = [sources];
5204
- }
5205
-
5206
- return sources.filter((source) => !isEmpty(source));
5207
- }
5208
-
5209
- function ensureSrcAttribute(el) {
5210
- if (isImg(el) && !hasAttr(el, 'src')) {
5211
- attr(el, 'src', 'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg"></svg>');
5212
- }
5213
- }
5214
-
5215
- function isPicture(el) {
5216
- return isTag(el, 'picture');
5217
- }
5218
-
5219
- function isImg(el) {
5220
- return isTag(el, 'img');
5221
- }
5222
-
5223
- var Media = {
5224
- props: {
5225
- media: Boolean },
5226
-
5227
-
5228
- data: {
5229
- media: false },
5230
-
5231
-
5232
- connected() {
5233
- const media = toMedia(this.media);
5234
- this.matchMedia = true;
5235
- if (media) {
5236
- this.mediaObj = window.matchMedia(media);
5237
- const handler = () => {
5238
- this.matchMedia = this.mediaObj.matches;
5239
- trigger(this.$el, createEvent('mediachange', false, true, [this.mediaObj]));
5240
- };
5241
- this.offMediaObj = on(this.mediaObj, 'change', () => {
5242
- handler();
5243
- this.$emit('resize');
5244
- });
5245
- handler();
5246
- }
5247
- },
5248
-
5249
- disconnected() {var _this$offMediaObj;
5250
- (_this$offMediaObj = this.offMediaObj) == null ? void 0 : _this$offMediaObj.call(this);
5251
- } };
5252
-
5253
-
5254
- function toMedia(value) {
5255
- if (isString(value)) {
5256
- if (startsWith(value, '@')) {
5257
- const name = "breakpoint-" + value.substr(1);
5258
- value = toFloat(getCssVar(name));
5259
- } else if (isNaN(value)) {
5260
- return value;
5261
- }
5262
- }
5263
-
5264
- return value && isNumeric(value) ? "(min-width: " + value + "px)" : '';
5265
- }
5266
-
5267
- var leader = {
5268
- mixins: [Class, Media, Resize],
5269
-
5270
- props: {
5271
- fill: String },
5272
-
5273
-
5274
- data: {
5275
- fill: '',
5276
- clsWrapper: 'uk-leader-fill',
5277
- clsHide: 'uk-leader-hide',
5278
- attrFill: 'data-fill' },
5279
-
5280
-
5281
- computed: {
5282
- fill(_ref) {let { fill } = _ref;
5283
- return fill || getCssVar('leader-fill-content');
5284
- } },
5285
-
5286
-
5287
- connected() {
5288
- [this.wrapper] = wrapInner(this.$el, "<span class=\"" + this.clsWrapper + "\">");
5289
- },
5290
-
5291
- disconnected() {
5292
- unwrap(this.wrapper.childNodes);
5293
- },
5294
-
5295
- update: {
5296
- read() {
5297
- const width = Math.trunc(this.$el.offsetWidth / 2);
5298
-
5299
- return {
5300
- width,
5301
- fill: this.fill,
5302
- hide: !this.matchMedia };
5303
-
5304
- },
5305
-
5306
- write(_ref2) {let { width, fill, hide } = _ref2;
5307
- toggleClass(this.wrapper, this.clsHide, hide);
5308
- attr(this.wrapper, this.attrFill, new Array(width).join(fill));
5309
- },
5310
-
5311
- events: ['resize'] } };
5312
-
5313
- const active = [];
5314
-
5315
- var Modal = {
5316
- mixins: [Class, Container, Togglable],
5317
-
5318
- props: {
5319
- selPanel: String,
5320
- selClose: String,
5321
- escClose: Boolean,
5322
- bgClose: Boolean,
5323
- stack: Boolean },
5324
-
5325
-
5326
- data: {
5327
- cls: 'uk-open',
5328
- escClose: true,
5329
- bgClose: true,
5330
- overlay: true,
5331
- stack: false },
5332
-
5333
-
5334
- computed: {
5335
- panel(_ref, $el) {let { selPanel } = _ref;
5336
- return $(selPanel, $el);
5337
- },
5338
-
5339
- transitionElement() {
5340
- return this.panel;
5341
- },
5342
-
5343
- bgClose(_ref2) {let { bgClose } = _ref2;
5344
- return bgClose && this.panel;
5345
- } },
5346
-
5347
-
5348
- beforeDisconnect() {
5349
- if (includes(active, this)) {
5350
- this.toggleElement(this.$el, false, false);
5351
- }
5352
- },
5353
-
5354
- events: [
5355
- {
5356
- name: 'click',
5357
-
5358
- delegate() {
5359
- return this.selClose;
5360
- },
5361
-
5362
- handler(e) {
5363
- e.preventDefault();
5364
- this.hide();
5365
- } },
5366
-
5367
-
5368
- {
5369
- name: 'toggle',
5370
-
5371
- self: true,
5372
-
5373
- handler(e) {
5374
- if (e.defaultPrevented) {
5375
- return;
5376
- }
5377
-
5378
- e.preventDefault();
5379
-
5380
- if (this.isToggled() === includes(active, this)) {
5381
- this.toggle();
5382
- }
5383
- } },
5384
-
5385
-
5386
- {
5387
- name: 'beforeshow',
5388
-
5389
- self: true,
5390
-
5391
- handler(e) {
5392
- if (includes(active, this)) {
5393
- return false;
5394
- }
5395
-
5396
- if (!this.stack && active.length) {
5397
- Promise.all(active.map((modal) => modal.hide())).then(this.show);
5398
- e.preventDefault();
5399
- } else {
5400
- active.push(this);
5401
- }
5402
- } },
5403
-
5404
-
5405
- {
5406
- name: 'show',
5407
-
5408
- self: true,
5409
-
5410
- handler() {
5411
- const docEl = document.documentElement;
5412
-
5413
- if (width(window) > docEl.clientWidth && this.overlay) {
5414
- css(document.body, 'overflowY', 'scroll');
5415
- }
5416
-
5417
- if (this.stack) {
5418
- css(this.$el, 'zIndex', toFloat(css(this.$el, 'zIndex')) + active.length);
5419
- }
5420
-
5421
- addClass(docEl, this.clsPage);
5422
-
5423
- if (this.bgClose) {
5424
- once(
5425
- this.$el,
5426
- 'hide',
5427
- on(document, pointerDown, (_ref3) => {let { target } = _ref3;
5428
- if (
5429
- last(active) !== this ||
5430
- this.overlay && !within(target, this.$el) ||
5431
- within(target, this.panel))
5432
- {
5433
- return;
5434
- }
5435
-
5436
- once(
5437
- document,
5438
- pointerUp + " " + pointerCancel + " scroll",
5439
- (_ref4) => {let { defaultPrevented, type, target: newTarget } = _ref4;
5440
- if (
5441
- !defaultPrevented &&
5442
- type === pointerUp &&
5443
- target === newTarget)
5444
- {
5445
- this.hide();
5446
- }
5447
- },
5448
- true);
5449
-
5450
- }),
5451
- { self: true });
5541
+ }
5542
+ }
5452
5543
 
5453
- }
5544
+ function parseSources(sources) {
5545
+ if (!sources) {
5546
+ return [];
5547
+ }
5454
5548
 
5455
- if (this.escClose) {
5456
- once(
5457
- this.$el,
5458
- 'hide',
5459
- on(document, 'keydown', (e) => {
5460
- if (e.keyCode === 27 && last(active) === this) {
5461
- this.hide();
5462
- }
5463
- }),
5464
- { self: true });
5549
+ if (startsWith(sources, '[')) {
5550
+ try {
5551
+ sources = JSON.parse(sources);
5552
+ } catch (e) {
5553
+ sources = [];
5554
+ }
5555
+ } else {
5556
+ sources = parseOptions(sources);
5557
+ }
5465
5558
 
5466
- }
5467
- } },
5559
+ if (!isArray(sources)) {
5560
+ sources = [sources];
5561
+ }
5468
5562
 
5563
+ return sources.filter((source) => !isEmpty(source));
5564
+ }
5469
5565
 
5470
- {
5471
- name: 'shown',
5566
+ function ensureSrcAttribute(el) {
5567
+ if (isImg(el) && !hasAttr(el, 'src')) {
5568
+ attr(el, 'src', 'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg"></svg>');
5569
+ }
5570
+ }
5472
5571
 
5473
- self: true,
5572
+ function isPicture(el) {
5573
+ return isTag(el, 'picture');
5574
+ }
5474
5575
 
5475
- handler() {
5476
- if (!isFocusable(this.$el)) {
5477
- attr(this.$el, 'tabindex', '-1');
5478
- }
5576
+ function isImg(el) {
5577
+ return isTag(el, 'img');
5578
+ }
5479
5579
 
5480
- if (!$(':focus', this.$el)) {
5481
- this.$el.focus();
5482
- }
5483
- } },
5580
+ var Media = {
5581
+ props: {
5582
+ media: Boolean },
5484
5583
 
5485
5584
 
5486
- {
5487
- name: 'hidden',
5585
+ data: {
5586
+ media: false },
5488
5587
 
5489
- self: true,
5490
5588
 
5491
- handler() {
5492
- if (includes(active, this)) {
5493
- active.splice(active.indexOf(this), 1);
5494
- }
5589
+ connected() {
5590
+ const media = toMedia(this.media, this.$el);
5591
+ this.matchMedia = true;
5592
+ if (media) {
5593
+ this.mediaObj = window.matchMedia(media);
5594
+ const handler = () => {
5595
+ this.matchMedia = this.mediaObj.matches;
5596
+ trigger(this.$el, createEvent('mediachange', false, true, [this.mediaObj]));
5597
+ };
5598
+ this.offMediaObj = on(this.mediaObj, 'change', () => {
5599
+ handler();
5600
+ this.$emit('resize');
5601
+ });
5602
+ handler();
5603
+ }
5604
+ },
5495
5605
 
5496
- if (!active.length) {
5497
- css(document.body, 'overflowY', '');
5498
- }
5606
+ disconnected() {var _this$offMediaObj;
5607
+ (_this$offMediaObj = this.offMediaObj) == null ? void 0 : _this$offMediaObj.call(this);
5608
+ } };
5499
5609
 
5500
- css(this.$el, 'zIndex', '');
5501
5610
 
5502
- if (!active.some((modal) => modal.clsPage === this.clsPage)) {
5503
- removeClass(document.documentElement, this.clsPage);
5504
- }
5505
- } }],
5611
+ function toMedia(value, element) {
5612
+ if (isString(value)) {
5613
+ if (startsWith(value, '@')) {
5614
+ value = toFloat(css(element, "--uk-breakpoint-" + value.substr(1)));
5615
+ } else if (isNaN(value)) {
5616
+ return value;
5617
+ }
5618
+ }
5506
5619
 
5620
+ return value && isNumeric(value) ? "(min-width: " + value + "px)" : '';
5621
+ }
5507
5622
 
5623
+ var leader = {
5624
+ mixins: [Class, Media, Resize],
5508
5625
 
5509
- methods: {
5510
- toggle() {
5511
- return this.isToggled() ? this.hide() : this.show();
5512
- },
5626
+ props: {
5627
+ fill: String },
5513
5628
 
5514
- show() {
5515
- if (this.container && parent(this.$el) !== this.container) {
5516
- append(this.container, this.$el);
5517
- return new Promise((resolve) =>
5518
- requestAnimationFrame(() => this.show().then(resolve)));
5519
5629
 
5520
- }
5630
+ data: {
5631
+ fill: '',
5632
+ clsWrapper: 'uk-leader-fill',
5633
+ clsHide: 'uk-leader-hide',
5634
+ attrFill: 'data-fill' },
5521
5635
 
5522
- return this.toggleElement(this.$el, true, animate(this));
5523
- },
5524
5636
 
5525
- hide() {
5526
- return this.toggleElement(this.$el, false, animate(this));
5527
- } } };
5637
+ computed: {
5638
+ fill(_ref) {let { fill } = _ref;
5639
+ return fill || css(this.$el, '--uk-leader-fill-content');
5640
+ } },
5528
5641
 
5529
5642
 
5643
+ connected() {
5644
+ [this.wrapper] = wrapInner(this.$el, "<span class=\"" + this.clsWrapper + "\">");
5645
+ },
5530
5646
 
5531
- function animate(_ref5) {let { transitionElement, _toggle } = _ref5;
5532
- return (el, show) =>
5533
- new Promise((resolve, reject) =>
5534
- once(el, 'show hide', () => {
5535
- el._reject == null ? void 0 : el._reject();
5536
- el._reject = reject;
5647
+ disconnected() {
5648
+ unwrap(this.wrapper.childNodes);
5649
+ },
5537
5650
 
5538
- _toggle(el, show);
5651
+ update: {
5652
+ read() {
5653
+ const width = Math.trunc(this.$el.offsetWidth / 2);
5539
5654
 
5540
- const off = once(
5541
- transitionElement,
5542
- 'transitionstart',
5543
- () => {
5544
- once(transitionElement, 'transitionend transitioncancel', resolve, {
5545
- self: true });
5655
+ return {
5656
+ width,
5657
+ fill: this.fill,
5658
+ hide: !this.matchMedia };
5546
5659
 
5547
- clearTimeout(timer);
5548
5660
  },
5549
- { self: true });
5550
5661
 
5662
+ write(_ref2) {let { width, fill, hide } = _ref2;
5663
+ toggleClass(this.wrapper, this.clsHide, hide);
5664
+ attr(this.wrapper, this.attrFill, new Array(width).join(fill));
5665
+ },
5551
5666
 
5552
- const timer = setTimeout(() => {
5553
- off();
5554
- resolve();
5555
- }, toMs(css(transitionElement, 'transitionDuration')));
5556
- })).
5557
- then(() => delete el._reject);
5558
- }
5559
-
5560
- function toMs(time) {
5561
- return time ? endsWith(time, 'ms') ? toFloat(time) : toFloat(time) * 1000 : 0;
5562
- }
5667
+ events: ['resize'] } };
5563
5668
 
5564
5669
  var modal = {
5565
5670
  install: install$2,
@@ -5723,7 +5828,7 @@
5723
5828
  align: String,
5724
5829
  offset: Number,
5725
5830
  boundary: Boolean,
5726
- boundaryAlign: Boolean,
5831
+ target: Boolean,
5727
5832
  clsDrop: String,
5728
5833
  delayShow: Number,
5729
5834
  delayHide: Number,
@@ -5740,9 +5845,12 @@
5740
5845
  offset: undefined,
5741
5846
  delayShow: undefined,
5742
5847
  delayHide: undefined,
5743
- boundaryAlign: undefined,
5744
- flip: 'x',
5848
+ flip: false,
5849
+ shift: true,
5745
5850
  boundary: true,
5851
+ target: false,
5852
+ targetX: false,
5853
+ targetY: false,
5746
5854
  dropbar: false,
5747
5855
  dropbarAnchor: false,
5748
5856
  duration: 200,
@@ -5777,7 +5885,7 @@
5777
5885
  },
5778
5886
 
5779
5887
  watch(dropbar) {
5780
- addClass(dropbar, 'uk-navbar-dropbar');
5888
+ addClass(dropbar, 'uk-dropbar', 'uk-dropbar-top', 'uk-navbar-dropbar');
5781
5889
  },
5782
5890
 
5783
5891
  immediate: true },
@@ -5793,7 +5901,7 @@
5793
5901
 
5794
5902
  if (this.dropContainer !== $el) {
5795
5903
  for (const el of $$("." + clsDrop, this.dropContainer)) {var _this$getDropdown;
5796
- const target = (_this$getDropdown = this.getDropdown(el)) == null ? void 0 : _this$getDropdown.target;
5904
+ const target = (_this$getDropdown = this.getDropdown(el)) == null ? void 0 : _this$getDropdown.targetEl;
5797
5905
  if (!includes(dropdowns, el) && target && within(target, this.$el)) {
5798
5906
  dropdowns.push(el);
5799
5907
  }
@@ -5810,8 +5918,7 @@
5810
5918
  {
5811
5919
  ...this.$props,
5812
5920
  boundary: this.boundary,
5813
- pos: this.pos,
5814
- offset: this.dropbar || this.offset });
5921
+ pos: this.pos });
5815
5922
 
5816
5923
 
5817
5924
  },
@@ -5856,8 +5963,8 @@
5856
5963
  if (
5857
5964
  active &&
5858
5965
  includes(active.mode, 'hover') &&
5859
- active.target &&
5860
- !within(active.target, current) &&
5966
+ active.targetEl &&
5967
+ !within(active.targetEl, current) &&
5861
5968
  !active.isDelaying)
5862
5969
  {
5863
5970
  active.hide(false);
@@ -5879,7 +5986,7 @@
5879
5986
  if (keyCode === keyMap.DOWN && hasAttr(current, 'aria-expanded')) {
5880
5987
  e.preventDefault();
5881
5988
 
5882
- if (!active || active.target !== current) {
5989
+ if (!active || active.targetEl !== current) {
5883
5990
  current.click();
5884
5991
  once(this.dropContainer, 'show', (_ref8) => {let { target } = _ref8;return (
5885
5992
  focusFirstFocusableElement(target));});
@@ -5929,8 +6036,8 @@
5929
6036
  }
5930
6037
  }
5931
6038
 
5932
- if (keyCode === keyMap.ESC) {var _active$target;
5933
- active == null ? void 0 : (_active$target = active.target) == null ? void 0 : _active$target.focus();
6039
+ if (keyCode === keyMap.ESC) {var _active$targetEl;
6040
+ active == null ? void 0 : (_active$targetEl = active.targetEl) == null ? void 0 : _active$targetEl.focus();
5934
6041
  }
5935
6042
 
5936
6043
  handleNavItemNavigation(e, this.toggles, active);
@@ -5972,8 +6079,8 @@
5972
6079
  return this.dropbar;
5973
6080
  },
5974
6081
 
5975
- handler(_, _ref9) {let { $el, align } = _ref9;
5976
- if (!hasClass($el, this.clsDrop) || align === 'stretch') {
6082
+ handler(_ref9) {let { target } = _ref9;
6083
+ if (!this.isDropbarDrop(target)) {
5977
6084
  return;
5978
6085
  }
5979
6086
 
@@ -5981,7 +6088,7 @@
5981
6088
  after(this.dropbarAnchor || this.$el, this.dropbar);
5982
6089
  }
5983
6090
 
5984
- addClass($el, this.clsDrop + "-dropbar");
6091
+ addClass(target, this.clsDrop + "-dropbar");
5985
6092
  } },
5986
6093
 
5987
6094
 
@@ -5996,19 +6103,24 @@
5996
6103
  return this.dropbar;
5997
6104
  },
5998
6105
 
5999
- handler(_, _ref10) {let { $el, align } = _ref10;
6000
- if (!hasClass($el, this.clsDrop) || align === 'stretch') {
6106
+ handler(_ref10) {let { target } = _ref10;
6107
+ if (!this.isDropbarDrop(target)) {
6001
6108
  return;
6002
6109
  }
6003
6110
 
6004
- this._observer = observeResize($el, () =>
6005
- this.transitionTo(
6006
- offset($el).bottom -
6007
- offset(this.dropbar).top +
6008
- toFloat(css($el, 'marginBottom')),
6009
- $el));
6010
-
6111
+ this._observer = observeResize(target, () => {
6112
+ const targetOffsets = parents(target, "." + this.clsDrop).
6113
+ concat(target).
6114
+ map((el) => offset(el));
6115
+ const minTop = Math.min(...targetOffsets.map((_ref11) => {let { top } = _ref11;return top;}));
6116
+ const maxBottom = Math.max(...targetOffsets.map((_ref12) => {let { bottom } = _ref12;return bottom;}));
6117
+ const dropbarOffset = offset(this.dropbar);
6118
+ css(this.dropbar, 'top', this.dropbar.offsetTop - (dropbarOffset.top - minTop));
6119
+ this.transitionTo(
6120
+ maxBottom - minTop + toFloat(css(target, 'marginBottom')),
6121
+ target);
6011
6122
 
6123
+ });
6012
6124
  } },
6013
6125
 
6014
6126
 
@@ -6023,13 +6135,13 @@
6023
6135
  return this.dropbar;
6024
6136
  },
6025
6137
 
6026
- handler(e, _ref11) {let { $el } = _ref11;
6138
+ handler(e) {
6027
6139
  const active = this.getActive();
6028
6140
 
6029
6141
  if (
6030
6142
  matches(this.dropbar, ':hover') &&
6031
- (active == null ? void 0 : active.$el) === $el &&
6032
- !this.toggles.some((el) => active.target !== el && matches(el, ':focus')))
6143
+ (active == null ? void 0 : active.$el) === e.target &&
6144
+ !this.toggles.some((el) => active.targetEl !== el && matches(el, ':focus')))
6033
6145
  {
6034
6146
  e.preventDefault();
6035
6147
  }
@@ -6047,8 +6159,8 @@
6047
6159
  return this.dropbar;
6048
6160
  },
6049
6161
 
6050
- handler(_, _ref12) {let { $el, align } = _ref12;
6051
- if (!hasClass($el, this.clsDrop) || align === 'stretch') {
6162
+ handler(_ref13) {let { target } = _ref13;
6163
+ if (!this.isDropbarDrop(target)) {
6052
6164
  return;
6053
6165
  }
6054
6166
 
@@ -6056,7 +6168,7 @@
6056
6168
 
6057
6169
  const active = this.getActive();
6058
6170
 
6059
- if (!active || (active == null ? void 0 : active.$el) === $el) {
6171
+ if (!active || (active == null ? void 0 : active.$el) === target) {
6060
6172
  this.transitionTo(0);
6061
6173
  }
6062
6174
  } }],
@@ -6065,7 +6177,7 @@
6065
6177
 
6066
6178
  methods: {
6067
6179
  getActive() {
6068
- return active$1 && within(active$1.target, this.$el) && active$1;
6180
+ return active && within(active.targetEl, this.$el) && active;
6069
6181
  },
6070
6182
 
6071
6183
  transitionTo(newHeight, el) {
@@ -6095,13 +6207,17 @@
6095
6207
 
6096
6208
  getDropdown(el) {
6097
6209
  return this.$getComponent(el, 'drop') || this.$getComponent(el, 'dropdown');
6210
+ },
6211
+
6212
+ isDropbarDrop(el) {
6213
+ return this.getDropdown(el) && hasClass(el, this.clsDrop);
6098
6214
  } } };
6099
6215
 
6100
6216
 
6101
6217
 
6102
6218
  function handleNavItemNavigation(e, toggles, active) {
6103
6219
  const { current, keyCode } = e;
6104
- const target = (active == null ? void 0 : active.target) || current;
6220
+ const target = (active == null ? void 0 : active.targetEl) || current;
6105
6221
  const i = toggles.indexOf(target);
6106
6222
 
6107
6223
  // Left
@@ -6158,7 +6274,7 @@
6158
6274
 
6159
6275
  registerEvent(this, {
6160
6276
  el: this.swipeTarget,
6161
- name: pointerDown,
6277
+ name: pointerDown$1,
6162
6278
  passive: true,
6163
6279
  handler(e) {
6164
6280
  if (!isTouch(e)) {
@@ -6168,7 +6284,7 @@
6168
6284
  // Handle Swipe Gesture
6169
6285
  const pos = getEventPos(e);
6170
6286
  const target = 'tagName' in e.target ? e.target : parent(e.target);
6171
- once(document, pointerUp + " " + pointerCancel + " scroll", (e) => {
6287
+ once(document, pointerUp$1 + " " + pointerCancel + " scroll", (e) => {
6172
6288
  const { x, y } = getEventPos(e);
6173
6289
 
6174
6290
  // swipe
@@ -6275,22 +6391,6 @@
6275
6391
  } },
6276
6392
 
6277
6393
 
6278
- {
6279
- name: 'touchstart',
6280
-
6281
- passive: true,
6282
-
6283
- el() {
6284
- return this.panel;
6285
- },
6286
-
6287
- handler(_ref8) {let { targetTouches } = _ref8;
6288
- if (targetTouches.length === 1) {
6289
- this.clientY = targetTouches[0].clientY;
6290
- }
6291
- } },
6292
-
6293
-
6294
6394
  {
6295
6395
  name: 'touchmove',
6296
6396
 
@@ -6306,33 +6406,6 @@
6306
6406
  } },
6307
6407
 
6308
6408
 
6309
- {
6310
- name: 'touchmove',
6311
-
6312
- passive: false,
6313
-
6314
- el() {
6315
- return this.panel;
6316
- },
6317
-
6318
- handler(e) {
6319
- if (e.targetTouches.length !== 1) {
6320
- return;
6321
- }
6322
-
6323
- const clientY = e.targetTouches[0].clientY - this.clientY;
6324
- const { scrollTop, scrollHeight, clientHeight } = this.panel;
6325
-
6326
- if (
6327
- clientHeight >= scrollHeight ||
6328
- scrollTop === 0 && clientY > 0 ||
6329
- scrollHeight - scrollTop <= clientHeight && clientY < 0)
6330
- {
6331
- e.cancelable && e.preventDefault();
6332
- }
6333
- } },
6334
-
6335
-
6336
6409
  {
6337
6410
  name: 'show',
6338
6411
 
@@ -6344,7 +6417,6 @@
6344
6417
  addClass(parent(this.panel), this.clsMode);
6345
6418
  }
6346
6419
 
6347
- css(document.documentElement, 'overflowY', this.overlay ? 'hidden' : '');
6348
6420
  addClass(document.body, this.clsContainer, this.clsFlip);
6349
6421
  css(document.body, 'touch-action', 'pan-y pinch-zoom');
6350
6422
  css(this.$el, 'display', 'block');
@@ -6352,7 +6424,7 @@
6352
6424
  addClass(
6353
6425
  this.panel,
6354
6426
  this.clsSidebarAnimation,
6355
- this.mode !== 'reveal' ? this.clsMode : '');
6427
+ this.mode === 'reveal' ? '' : this.clsMode);
6356
6428
 
6357
6429
 
6358
6430
  height(document.body); // force reflow
@@ -6389,8 +6461,6 @@
6389
6461
  removeClass(this.$el, this.clsOverlay);
6390
6462
  css(this.$el, 'display', '');
6391
6463
  removeClass(document.body, this.clsContainer, this.clsFlip);
6392
-
6393
- css(document.documentElement, 'overflowY', '');
6394
6464
  } },
6395
6465
 
6396
6466
 
@@ -6515,6 +6585,14 @@
6515
6585
  offset: 0 },
6516
6586
 
6517
6587
 
6588
+ connected() {
6589
+ registerClick(this);
6590
+ },
6591
+
6592
+ disconnected() {
6593
+ unregisterClick(this);
6594
+ },
6595
+
6518
6596
  methods: {
6519
6597
  async scrollTo(el) {
6520
6598
  el = el && $(el) || document.body;
@@ -6523,20 +6601,39 @@
6523
6601
  await scrollIntoView(el, { offset: this.offset });
6524
6602
  trigger(this.$el, 'scrolled', [this, el]);
6525
6603
  }
6526
- } },
6604
+ } } };
6527
6605
 
6528
6606
 
6529
- events: {
6530
- click(e) {
6531
- if (e.defaultPrevented) {
6532
- return;
6533
- }
6534
6607
 
6535
- e.preventDefault();
6536
- this.scrollTo(getTargetElement(this.$el));
6537
- } } };
6608
+ const components$2 = new Set();
6609
+ function registerClick(cmp) {
6610
+ if (!components$2.size) {
6611
+ on(document, 'click', clickHandler);
6612
+ }
6613
+
6614
+ components$2.add(cmp);
6615
+ }
6616
+
6617
+ function unregisterClick(cmp) {
6618
+ components$2.delete(cmp);
6619
+
6620
+ if (!components$2.length) {
6621
+ off(document, 'click', clickHandler);
6622
+ }
6623
+ }
6538
6624
 
6625
+ function clickHandler(e) {
6626
+ if (e.defaultPrevented) {
6627
+ return;
6628
+ }
6539
6629
 
6630
+ for (const component of components$2) {
6631
+ if (within(e.target, component.$el)) {
6632
+ e.preventDefault();
6633
+ component.scrollTo(getTargetElement(component.$el));
6634
+ }
6635
+ }
6636
+ }
6540
6637
 
6541
6638
  function getTargetElement(el) {
6542
6639
  return document.getElementById(decodeURIComponent(el.hash).substring(1));
@@ -6866,7 +6963,9 @@
6866
6963
  },
6867
6964
 
6868
6965
  handler() {
6869
- if (!location.hash || scrollTop(window) === 0) {
6966
+ const { scrollingElement } = document;
6967
+
6968
+ if (!location.hash || scrollingElement.scrollTop === 0) {
6870
6969
  return;
6871
6970
  }
6872
6971
 
@@ -6875,13 +6974,11 @@
6875
6974
  const elOffset = offset(this.$el);
6876
6975
 
6877
6976
  if (this.isFixed && intersectRect(targetOffset, elOffset)) {
6878
- scrollTop(
6879
- window,
6977
+ scrollingElement.scrollTop =
6880
6978
  targetOffset.top -
6881
6979
  elOffset.height -
6882
6980
  toPx(this.targetOffset, 'height', this.placeholder) -
6883
- toPx(this.offset, 'height', this.placeholder));
6884
-
6981
+ toPx(this.offset, 'height', this.placeholder);
6885
6982
  }
6886
6983
  });
6887
6984
  } }],
@@ -6979,7 +7076,7 @@
6979
7076
 
6980
7077
 
6981
7078
  {let { scroll: prevScroll = 0, dir: prevDir = 'down', overflow, overflowScroll = 0, start, end } = _ref4;
6982
- const scroll = scrollTop(window);
7079
+ const scroll = document.scrollingElement.scrollTop;
6983
7080
  const dir = prevScroll <= scroll ? 'down' : 'up';
6984
7081
 
6985
7082
  return {
@@ -7388,7 +7485,7 @@
7388
7485
 
7389
7486
  events: [
7390
7487
  {
7391
- name: pointerDown,
7488
+ name: pointerDown$1,
7392
7489
 
7393
7490
  filter() {
7394
7491
  return includes(this.mode, 'hover');
@@ -7406,7 +7503,7 @@
7406
7503
  trigger(this.$el, 'focus');
7407
7504
  once(
7408
7505
  document,
7409
- pointerDown,
7506
+ pointerDown$1,
7410
7507
  () => trigger(this.$el, 'blur'),
7411
7508
  true,
7412
7509
  (e) => !within(e.target, this.$el));
@@ -7499,7 +7596,7 @@
7499
7596
 
7500
7597
 
7501
7598
  {
7502
- name: 'toggled',
7599
+ name: 'hide show',
7503
7600
 
7504
7601
  self: true,
7505
7602
 
@@ -7507,10 +7604,8 @@
7507
7604
  return this.target;
7508
7605
  },
7509
7606
 
7510
- handler(e, toggled) {
7511
- if (e.target === this.target[0]) {
7512
- this.updateAria(toggled);
7513
- }
7607
+ handler(_ref2) {let { type } = _ref2;
7608
+ this.updateAria(type === 'show');
7514
7609
  } },
7515
7610
 
7516
7611
 
@@ -7605,10 +7700,12 @@
7605
7700
  Video: Video,
7606
7701
  Close: Close,
7607
7702
  Spinner: Spinner,
7703
+ NavParentIcon: NavParentIcon,
7608
7704
  SlidenavNext: Slidenav,
7609
7705
  SlidenavPrevious: Slidenav,
7610
7706
  SearchIcon: Search,
7611
7707
  Marker: IconComponent,
7708
+ NavbarParentIcon: IconComponent,
7612
7709
  NavbarToggleIcon: IconComponent,
7613
7710
  OverlayIcon: IconComponent,
7614
7711
  PaginationNext: IconComponent,
@@ -8098,7 +8195,7 @@
8098
8195
 
8099
8196
  },
8100
8197
 
8101
- setState(state, animate) {if (animate === void 0) {animate = true;}
8198
+ async setState(state, animate) {if (animate === void 0) {animate = true;}
8102
8199
  state = { filter: { '': '' }, sort: [], ...state };
8103
8200
 
8104
8201
  trigger(this.$el, 'beforeFilter', [this, state]);
@@ -8107,15 +8204,17 @@
8107
8204
  toggleClass(el, this.cls, !!matchFilter(el, this.attrItem, state)));
8108
8205
 
8109
8206
 
8110
- Promise.all(
8207
+ await Promise.all(
8111
8208
  $$(this.target, this.$el).map((target) => {
8112
8209
  const filterFn = () => {
8113
8210
  applyState(state, target, children(target));
8114
8211
  this.$update(this.$el);
8115
8212
  };
8116
8213
  return animate ? this.animate(filterFn, target) : filterFn();
8117
- })).
8118
- then(() => trigger(this.$el, 'afterFilter', [this]));
8214
+ }));
8215
+
8216
+
8217
+ trigger(this.$el, 'afterFilter', [this]);
8119
8218
  },
8120
8219
 
8121
8220
  updateState() {
@@ -8405,6 +8504,11 @@
8405
8504
  this.interval && clearInterval(this.interval);
8406
8505
  } } };
8407
8506
 
8507
+ const pointerOptions = { passive: false, capture: true };
8508
+ const pointerDown = 'touchstart mousedown';
8509
+ const pointerMove = 'touchmove mousemove';
8510
+ const pointerUp = 'touchend touchcancel mouseup click input';
8511
+
8408
8512
  var SliderDrag = {
8409
8513
  props: {
8410
8514
  draggable: Boolean },
@@ -8457,7 +8561,17 @@
8457
8561
 
8458
8562
  handler(e) {
8459
8563
  e.preventDefault();
8460
- } }],
8564
+ } },
8565
+
8566
+
8567
+ {
8568
+ // iOS workaround for slider stopping if swiping fast
8569
+ name: pointerMove + " " + pointerUp,
8570
+ el() {
8571
+ return this.list;
8572
+ },
8573
+ handler: noop,
8574
+ ...pointerOptions }],
8461
8575
 
8462
8576
 
8463
8577
 
@@ -8479,10 +8593,10 @@
8479
8593
  this.prevIndex = this.index;
8480
8594
  }
8481
8595
 
8482
- on(document, pointerMove, this.move, { passive: false });
8596
+ on(document, pointerMove, this.move, pointerOptions);
8483
8597
 
8484
8598
  // 'input' event is triggered by video controls
8485
- on(document, pointerUp + " " + pointerCancel + " input", this.end, true);
8599
+ on(document, pointerUp, this.end, pointerOptions);
8486
8600
 
8487
8601
  css(this.list, 'userSelect', 'none');
8488
8602
  },
@@ -8562,8 +8676,8 @@
8562
8676
  },
8563
8677
 
8564
8678
  end() {
8565
- off(document, pointerMove, this.move, { passive: false });
8566
- off(document, pointerUp + " " + pointerCancel + " input", this.end, true);
8679
+ off(document, pointerMove, this.move, pointerOptions);
8680
+ off(document, pointerUp, this.end, pointerOptions);
8567
8681
 
8568
8682
  if (this.dragging) {
8569
8683
  this.dragging = null;
@@ -8971,7 +9085,7 @@
8971
9085
 
8972
9086
  events: [
8973
9087
  {
8974
- name: pointerMove + " " + pointerDown + " keydown",
9088
+ name: pointerMove$1 + " " + pointerDown$1 + " keydown",
8975
9089
 
8976
9090
  handler: 'showControls' },
8977
9091
 
@@ -10626,7 +10740,7 @@
10626
10740
  },
10627
10741
 
10628
10742
  events: {
10629
- name: pointerDown,
10743
+ name: pointerDown$1,
10630
10744
  passive: false,
10631
10745
  handler: 'init' },
10632
10746
 
@@ -10756,8 +10870,8 @@
10756
10870
  this.placeholder = placeholder;
10757
10871
  this.origin = { target, index: index(placeholder), ...this.pos };
10758
10872
 
10759
- on(document, pointerMove, this.move);
10760
- on(document, pointerUp, this.end);
10873
+ on(document, pointerMove$1, this.move);
10874
+ on(document, pointerUp$1, this.end);
10761
10875
 
10762
10876
  if (!this.threshold) {
10763
10877
  this.start(e);
@@ -10793,8 +10907,8 @@
10793
10907
  },
10794
10908
 
10795
10909
  end() {
10796
- off(document, pointerMove, this.move);
10797
- off(document, pointerUp, this.end);
10910
+ off(document, pointerMove$1, this.move);
10911
+ off(document, pointerUp$1, this.end);
10798
10912
 
10799
10913
  if (!this.drag) {
10800
10914
  return;
@@ -10863,7 +10977,7 @@
10863
10977
  let last = Date.now();
10864
10978
  trackTimer = setInterval(() => {
10865
10979
  let { x, y } = pos;
10866
- y += scrollTop(window);
10980
+ y += document.scrollingElement.scrollTop;
10867
10981
 
10868
10982
  const dist = (Date.now() - last) * 0.3;
10869
10983
  last = Date.now();
@@ -10884,7 +10998,7 @@
10884
10998
  }
10885
10999
 
10886
11000
  if (scroll > 0 && scroll < scrollHeight - height) {
10887
- scrollTop(scrollEl, scroll);
11001
+ scrollEl.scrollTop = scroll;
10888
11002
  return true;
10889
11003
  }
10890
11004
  });
@@ -11029,11 +11143,11 @@
11029
11143
 
11030
11144
  this._unbind = once(
11031
11145
  document, "show keydown " +
11032
- pointerDown,
11146
+ pointerDown$1,
11033
11147
  this.hide,
11034
11148
  false,
11035
11149
  (e) =>
11036
- e.type === pointerDown && !within(e.target, this.$el) ||
11150
+ e.type === pointerDown$1 && !within(e.target, this.$el) ||
11037
11151
  e.type === 'keydown' && e.keyCode === 27 ||
11038
11152
  e.type === 'show' && e.detail[0] !== this && e.detail[0].$name === this.$name);
11039
11153
 
@@ -11104,7 +11218,7 @@
11104
11218
 
11105
11219
  // Clicking a button does not give it focus on all browsers and platforms
11106
11220
  // https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#clicking_and_focus
11107
- [pointerDown](e) {
11221
+ [pointerDown$1](e) {
11108
11222
  if (isTouch(e)) {
11109
11223
  this.show();
11110
11224
  }