uikit 3.14.4-dev.f2e3be255 → 3.14.4-dev.fab1c7b7c

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 (135) hide show
  1. package/CHANGELOG.md +37 -18
  2. package/build/util.js +1 -0
  3. package/dist/css/uikit-core-rtl.css +349 -109
  4. package/dist/css/uikit-core-rtl.min.css +1 -1
  5. package/dist/css/uikit-core.css +349 -109
  6. package/dist/css/uikit-core.min.css +1 -1
  7. package/dist/css/uikit-rtl.css +369 -113
  8. package/dist/css/uikit-rtl.min.css +1 -1
  9. package/dist/css/uikit.css +369 -113
  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 +96 -139
  16. package/dist/js/components/lightbox-panel.min.js +1 -1
  17. package/dist/js/components/lightbox.js +96 -139
  18. package/dist/js/components/lightbox.min.js +1 -1
  19. package/dist/js/components/notification.js +4 -2
  20. package/dist/js/components/notification.min.js +1 -1
  21. package/dist/js/components/parallax.js +4 -5
  22. package/dist/js/components/parallax.min.js +1 -1
  23. package/dist/js/components/slider-parallax.js +4 -5
  24. package/dist/js/components/slider-parallax.min.js +1 -1
  25. package/dist/js/components/slider.js +1 -1
  26. package/dist/js/components/slider.min.js +1 -1
  27. package/dist/js/components/slideshow-parallax.js +4 -5
  28. package/dist/js/components/slideshow-parallax.min.js +1 -1
  29. package/dist/js/components/slideshow.js +1 -1
  30. package/dist/js/components/slideshow.min.js +1 -1
  31. package/dist/js/components/sortable.js +1 -1
  32. package/dist/js/components/sortable.min.js +1 -1
  33. package/dist/js/components/tooltip.js +102 -147
  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 +509 -483
  38. package/dist/js/uikit-core.min.js +17 -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 +518 -488
  42. package/dist/js/uikit.min.js +17 -1
  43. package/package.json +11 -11
  44. package/src/images/{backgrounds/nav-parent-close.svg → components/nav-parent-icon-large.svg} +0 -0
  45. package/src/images/{backgrounds/navbar-parent-close.svg → components/nav-parent-icon.svg} +0 -0
  46. package/src/images/{backgrounds/navbar-parent-open.svg → components/navbar-parent-icon.svg} +1 -1
  47. package/src/images/components/navbar-toggle-icon.svg +25 -3
  48. package/src/js/api/state.js +2 -2
  49. package/src/js/components/filter.js +5 -3
  50. package/src/js/components/notification.js +3 -1
  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 +110 -82
  54. package/src/js/core/height-viewport.js +6 -2
  55. package/src/js/core/icon.js +16 -0
  56. package/src/js/core/index.js +2 -0
  57. package/src/js/core/leader.js +2 -2
  58. package/src/js/core/navbar.js +30 -45
  59. package/src/js/core/scroll.js +37 -10
  60. package/src/js/core/toggle.js +3 -5
  61. package/src/js/mixin/media.js +4 -5
  62. package/src/js/mixin/modal.js +15 -12
  63. package/src/js/mixin/position.js +24 -26
  64. package/src/js/mixin/style.js +11 -0
  65. package/src/js/mixin/togglable.js +88 -133
  66. package/src/js/util/animation.js +9 -7
  67. package/src/js/util/class.js +3 -1
  68. package/src/js/util/filter.js +3 -7
  69. package/src/js/util/position.js +107 -107
  70. package/src/js/util/style.js +4 -13
  71. package/src/js/util/viewport.js +3 -5
  72. package/src/less/components/_import.less +1 -0
  73. package/src/less/components/drop.less +1 -18
  74. package/src/less/components/dropbar.less +126 -0
  75. package/src/less/components/dropdown.less +11 -19
  76. package/src/less/components/leader.less +1 -1
  77. package/src/less/components/nav.less +218 -59
  78. package/src/less/components/navbar.less +62 -47
  79. package/src/less/components/utility.less +10 -2
  80. package/src/less/theme/_import.less +1 -0
  81. package/src/less/theme/dropbar.less +44 -0
  82. package/src/less/theme/dropdown.less +0 -11
  83. package/src/less/theme/nav.less +45 -7
  84. package/src/less/theme/navbar.less +1 -5
  85. package/src/scss/components/_import.scss +1 -0
  86. package/src/scss/components/drop.scss +1 -18
  87. package/src/scss/components/dropbar.scss +126 -0
  88. package/src/scss/components/dropdown.scss +11 -19
  89. package/src/scss/components/leader.scss +1 -1
  90. package/src/scss/components/nav.scss +167 -47
  91. package/src/scss/components/navbar.scss +50 -47
  92. package/src/scss/components/utility.scss +8 -1
  93. package/src/scss/mixins-theme.scss +92 -21
  94. package/src/scss/mixins.scss +89 -17
  95. package/src/scss/theme/_import.scss +1 -0
  96. package/src/scss/theme/dropbar.scss +44 -0
  97. package/src/scss/theme/dropdown.scss +0 -8
  98. package/src/scss/theme/nav.scss +43 -7
  99. package/src/scss/theme/navbar.scss +1 -5
  100. package/src/scss/variables-theme.scss +60 -19
  101. package/src/scss/variables.scss +49 -17
  102. package/tests/accordion.html +2 -2
  103. package/tests/alert.html +2 -2
  104. package/tests/countdown.html +1 -1
  105. package/tests/drop.html +446 -416
  106. package/tests/dropbar.html +458 -0
  107. package/tests/dropdown.html +8 -470
  108. package/tests/filter.html +9 -12
  109. package/tests/form.html +1 -1
  110. package/tests/index.html +126 -107
  111. package/tests/js/index.js +1 -4
  112. package/tests/lightbox.html +5 -5
  113. package/tests/list.html +8 -8
  114. package/tests/modal.html +13 -13
  115. package/tests/nav.html +117 -75
  116. package/tests/navbar.html +126 -246
  117. package/tests/offcanvas.html +17 -21
  118. package/tests/parallax.html +1 -1
  119. package/tests/position.html +18 -16
  120. package/tests/progress.html +9 -9
  121. package/tests/scroll.html +7 -10
  122. package/tests/search.html +6 -6
  123. package/tests/slider.html +6 -5
  124. package/tests/slideshow.html +8 -8
  125. package/tests/sortable.html +6 -8
  126. package/tests/sticky-navbar.html +15 -15
  127. package/tests/sticky.html +8 -8
  128. package/tests/switcher.html +1 -1
  129. package/tests/tab.html +1 -1
  130. package/tests/table.html +7 -7
  131. package/tests/toggle.html +2 -2
  132. package/tests/tooltip.html +1 -1
  133. package/tests/upload.html +11 -11
  134. package/tests/utility.html +19 -0
  135. package/src/images/backgrounds/nav-parent-open.svg +0 -3
package/dist/js/uikit.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.14.4-dev.f2e3be255 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
1
+ /*! UIkit 3.14.4-dev.fab1c7b7c | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
2
2
 
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
@@ -383,12 +383,8 @@
383
383
  }
384
384
 
385
385
  function closest(element, selector) {
386
- if (startsWith(selector, '>')) {
387
- selector = selector.slice(1);
388
- }
389
-
390
386
  return isElement(element) ?
391
- element.closest(selector) :
387
+ element.closest(startsWith(selector, '>') ? selector.slice(1) : selector) :
392
388
  toNodes(element).
393
389
  map((element) => closest(element, selector)).
394
390
  filter(Boolean);
@@ -396,8 +392,8 @@
396
392
 
397
393
  function within(element, selector) {
398
394
  return isString(selector) ?
399
- matches(element, selector) || !!closest(element, selector) :
400
- element === selector || toNode(selector).contains(toNode(element));
395
+ !!closest(element, selector) :
396
+ toNode(selector).contains(toNode(element));
401
397
  }
402
398
 
403
399
  function parents(element, selector) {
@@ -785,18 +781,11 @@
785
781
  return elements[0];
786
782
  }
787
783
 
788
- const propertyRe = /^\s*(["'])?(.*?)\1\s*$/;
789
- function getCssVar(name, element) {if (element === void 0) {element = document.documentElement;}
790
- return css(element, "--uk-" + name).replace(propertyRe, '$2');
791
- }
792
-
793
784
  // https://drafts.csswg.org/cssom/#dom-cssstyledeclaration-setproperty
794
785
  const propName = memoize((name) => vendorPropName(name));
795
786
 
796
- const cssPrefixes = ['webkit', 'moz'];
797
-
798
787
  function vendorPropName(name) {
799
- if (name[0] === '-') {
788
+ if (startsWith(name, '--')) {
800
789
  return name;
801
790
  }
802
791
 
@@ -808,11 +797,8 @@
808
797
  return name;
809
798
  }
810
799
 
811
- let i = cssPrefixes.length,
812
- prefixedName;
813
-
814
- while (i--) {
815
- prefixedName = "-" + cssPrefixes[i] + "-" + name;
800
+ for (const prefix of ['webkit', 'moz']) {
801
+ const prefixedName = "-" + prefix + "-" + name;
816
802
  if (prefixedName in style) {
817
803
  return prefixedName;
818
804
  }
@@ -828,7 +814,9 @@
828
814
  }
829
815
 
830
816
  function removeClasses(element, cls) {
831
- attr(element, 'class', (value) => (value || '').replace(new RegExp("\\b" + cls + "\\b", 'g'), ''));
817
+ attr(element, 'class', (value) =>
818
+ (value || '').replace(new RegExp("\\b" + cls + "\\b\\s?", 'g'), ''));
819
+
832
820
  }
833
821
 
834
822
  function replaceClass(element) {
@@ -913,13 +901,14 @@
913
901
  const Transition = {
914
902
  start: transition,
915
903
 
916
- stop(element) {
904
+ async stop(element) {
917
905
  trigger(element, 'transitionend');
918
- return Promise.resolve();
906
+ await Promise.resolve();
919
907
  },
920
908
 
921
- cancel(element) {
909
+ async cancel(element) {
922
910
  trigger(element, 'transitioncanceled');
911
+ await Promise.resolve();
923
912
  },
924
913
 
925
914
  inProgress(element) {
@@ -929,7 +918,7 @@
929
918
 
930
919
  const animationPrefix = 'uk-animation-';
931
920
 
932
- function animate$1(element, animation, duration, origin, out) {if (duration === void 0) {duration = 200;}
921
+ function animate$2(element, animation, duration, origin, out) {if (duration === void 0) {duration = 200;}
933
922
  return Promise.all(
934
923
  toNodes(element).map(
935
924
  (element) =>
@@ -963,16 +952,17 @@
963
952
 
964
953
  }
965
954
 
966
- const inProgress = new RegExp(animationPrefix + "(enter|leave)");
955
+ const inProgressRe = new RegExp(animationPrefix + "(enter|leave)");
956
+
967
957
  const Animation = {
968
- in: animate$1,
958
+ in: animate$2,
969
959
 
970
960
  out(element, animation, duration, origin) {
971
- return animate$1(element, animation, duration, origin, true);
961
+ return animate$2(element, animation, duration, origin, true);
972
962
  },
973
963
 
974
964
  inProgress(element) {
975
- return inProgress.test(attr(element, 'class'));
965
+ return inProgressRe.test(attr(element, 'class'));
976
966
  },
977
967
 
978
968
  cancel(element) {
@@ -1899,12 +1889,10 @@
1899
1889
  function offsetViewport(scrollElement) {
1900
1890
  const window = toWindow(scrollElement);
1901
1891
  const {
1902
- document: { body, documentElement } } =
1892
+ document: { documentElement } } =
1903
1893
  window;
1904
1894
  let viewportElement =
1905
- scrollElement === scrollingElement(scrollElement) || scrollElement === body ?
1906
- window :
1907
- scrollElement;
1895
+ scrollElement === scrollingElement(scrollElement) ? window : scrollElement;
1908
1896
 
1909
1897
  const { visualViewport } = window;
1910
1898
  if (isWindow(viewportElement) && visualViewport) {
@@ -1923,7 +1911,7 @@
1923
1911
  // iOS 12 returns <body> as scrollingElement
1924
1912
  viewportElement = documentElement;
1925
1913
  } else {
1926
- rect[start] += toFloat(css(viewportElement, "border" + ucfirst(start) + "Width"));
1914
+ rect[start] += toFloat(css(viewportElement, "border-" + start + "-width"));
1927
1915
  }
1928
1916
  rect[prop] = rect[dir] = viewportElement["client" + ucfirst(prop)];
1929
1917
  rect[end] = rect[prop] + rect[start];
@@ -1948,126 +1936,65 @@
1948
1936
  ...options.attach },
1949
1937
 
1950
1938
  offset: [0, 0],
1939
+ placement: [],
1951
1940
  ...options };
1952
1941
 
1953
1942
 
1954
- const dim = options.flip ?
1955
- attachToWithFlip(element, target, options) :
1956
- attachTo(element, target, options);
1957
-
1958
- offset(element, dim);
1959
- }
1960
-
1961
- function attachTo(element, target, options) {
1962
- let { attach, offset: offsetBy } = {
1963
- attach: {
1964
- element: ['left', 'top'],
1965
- target: ['left', 'top'],
1966
- ...options.attach },
1967
-
1968
- offset: [0, 0],
1969
- ...options };
1970
-
1971
-
1972
- const position = offset(element);
1973
- const targetOffset = offset(target);
1974
- for (const [i, [prop, dir, start, end]] of Object.entries(dirs)) {
1975
- position[start] = position[dir] =
1976
- targetOffset[start] +
1977
- moveBy(attach.target[i], end, targetOffset[prop]) -
1978
- moveBy(attach.element[i], end, position[prop]) +
1979
- +offsetBy[i];
1980
- position[end] = position[start] + position[prop];
1943
+ if (!isArray(target)) {
1944
+ target = [target, target];
1981
1945
  }
1982
- return position;
1983
- }
1984
1946
 
1985
- function moveBy(start, end, dim) {
1986
- return start === 'center' ? dim / 2 : start === end ? dim : 0;
1947
+ offset(element, getPosition(element, target, options));
1987
1948
  }
1988
1949
 
1989
- function attachToWithFlip(element, target, options) {
1950
+ function getPosition(element, target, options) {
1990
1951
  const position = attachTo(element, target, options);
1991
- const targetDim = offset(target);
1992
1952
 
1993
1953
  let {
1994
- flip,
1995
1954
  attach: { element: elAttach, target: targetAttach },
1996
1955
  offset: elOffset,
1997
1956
  boundary,
1998
- viewport,
1999
- viewportOffset } =
1957
+ viewportOffset,
1958
+ placement } =
2000
1959
  options;
2001
1960
 
2002
- let viewports = scrollParents(element);
2003
- if (boundary === target) {
2004
- viewports = viewports.filter((viewport) => viewport !== boundary);
2005
- }
2006
- const [scrollElement] = viewports;
2007
- viewports.push(viewport);
2008
-
2009
- const offsetPosition = { ...position };
2010
- for (const [i, [prop, dir, start, end]] of Object.entries(dirs)) {
2011
- if (flip !== true && !includes(flip, dir)) {
2012
- continue;
2013
- }
1961
+ let offsetPosition = position;
1962
+ for (const [i, [prop,, start, end]] of Object.entries(dirs)) {
1963
+ let viewports = scrollParents(target[i]);
1964
+ const [scrollElement] = viewports;
2014
1965
 
2015
- const willFlip =
2016
- !intersectLine(position, targetDim, i) && intersectLine(position, targetDim, 1 - i);
2017
-
2018
- viewport = getIntersectionArea(...viewports.filter(Boolean).map(offsetViewport));
1966
+ let viewport = getIntersectionArea(...viewports.map(offsetViewport));
2019
1967
 
2020
1968
  if (viewportOffset) {
2021
1969
  viewport[start] += viewportOffset;
2022
1970
  viewport[end] -= viewportOffset;
2023
1971
  }
2024
1972
 
2025
- if (boundary && !willFlip && position[prop] <= offset(boundary)[prop]) {
2026
- viewport = getIntersectionArea(viewport, offset(boundary));
1973
+ if (boundary) {
1974
+ viewport = getIntersectionArea(viewport, offsetViewport(boundary));
2027
1975
  }
2028
1976
 
2029
- const isInStartBoundary = position[start] >= viewport[start];
2030
- const isInEndBoundary = position[end] <= viewport[end];
1977
+ const isInStartViewport = position[start] >= viewport[start];
1978
+ const isInEndViewport = position[end] <= viewport[end];
2031
1979
 
2032
- if (isInStartBoundary && isInEndBoundary) {
1980
+ if (isInStartViewport && isInEndViewport) {
2033
1981
  continue;
2034
1982
  }
2035
1983
 
2036
- let offsetBy;
1984
+ let offsetBy = 0;
2037
1985
 
2038
1986
  // Flip
2039
- if (willFlip) {
1987
+ if (placement[i] === 'flip') {
2040
1988
  if (
2041
- elAttach[i] === end && isInStartBoundary ||
2042
- elAttach[i] === start && isInEndBoundary)
1989
+ targetAttach[i] === end && isInEndViewport ||
1990
+ targetAttach[i] === start && isInStartViewport)
2043
1991
  {
2044
1992
  continue;
2045
1993
  }
2046
1994
 
2047
- offsetBy =
2048
- (elAttach[i] === start ?
2049
- -position[prop] :
2050
- elAttach[i] === end ?
2051
- position[prop] :
2052
- 0) + (
2053
- targetAttach[i] === start ?
2054
- targetDim[prop] :
2055
- targetAttach[i] === end ?
2056
- -targetDim[prop] :
2057
- 0) -
2058
- elOffset[i] * 2;
2059
-
2060
- if (
2061
- !isInScrollArea(
2062
- {
2063
- ...position,
2064
- [start]: position[start] + offsetBy,
2065
- [end]: position[end] + offsetBy },
2066
-
2067
- scrollElement,
2068
- i))
1995
+ offsetBy = flip(element, target, options, i)[start] - position[start];
2069
1996
 
2070
- {
1997
+ if (!isInScrollArea(applyOffset(position, offsetBy, i), scrollElement, i)) {
2071
1998
  if (isInScrollArea(position, scrollElement, i)) {
2072
1999
  continue;
2073
2000
  }
@@ -2076,27 +2003,27 @@
2076
2003
  return false;
2077
2004
  }
2078
2005
 
2079
- if (flip === true || includes(flip, dirs[1 - i][1])) {
2080
- const newPos = attachToWithFlip(element, target, {
2081
- ...options,
2082
- attach: {
2083
- element: elAttach.map(flipDir).reverse(),
2084
- target: targetAttach.map(flipDir).reverse() },
2006
+ const newPos = getPosition(element, target, {
2007
+ ...options,
2008
+ attach: {
2009
+ element: elAttach.map(flipAxis).reverse(),
2010
+ target: targetAttach.map(flipAxis).reverse() },
2085
2011
 
2086
- offset: elOffset.reverse(),
2087
- flip: flip === true ? flip : [...flip, dirs[1 - i][1]],
2088
- recursion: true });
2012
+ offset: elOffset.reverse(),
2013
+ placement: placement.reverse(),
2014
+ recursion: true });
2089
2015
 
2090
2016
 
2091
- if (newPos && isInScrollArea(newPos, scrollElement, 1 - i)) {
2092
- return newPos;
2093
- }
2017
+ if (newPos && isInScrollArea(newPos, scrollElement, 1 - i)) {
2018
+ return newPos;
2094
2019
  }
2020
+
2095
2021
  continue;
2096
2022
  }
2097
2023
 
2098
- // Move
2099
- } else {
2024
+ // Shift
2025
+ } else if (placement[i] === 'shift') {
2026
+ const targetDim = offset(target[i]);
2100
2027
  offsetBy =
2101
2028
  clamp(
2102
2029
  clamp(position[start], viewport[start], viewport[end] - position[prop]),
@@ -2105,13 +2032,54 @@
2105
2032
  position[start];
2106
2033
  }
2107
2034
 
2108
- offsetPosition[start] = position[dir] = position[start] + offsetBy;
2109
- offsetPosition[end] += offsetBy;
2035
+ offsetPosition = applyOffset(offsetPosition, offsetBy, i);
2110
2036
  }
2111
2037
 
2112
2038
  return offsetPosition;
2113
2039
  }
2114
2040
 
2041
+ function attachTo(element, target, options) {
2042
+ let { attach, offset: offsetBy } = {
2043
+ attach: {
2044
+ element: ['left', 'top'],
2045
+ target: ['left', 'top'],
2046
+ ...options.attach },
2047
+
2048
+ offset: [0, 0],
2049
+ ...options };
2050
+
2051
+
2052
+ let elOffset = offset(element);
2053
+
2054
+ for (const [i, [prop,, start, end]] of Object.entries(dirs)) {
2055
+ const targetOffset =
2056
+ attach.target[i] === attach.element[i] ? offsetViewport(target[i]) : offset(target[i]);
2057
+
2058
+ elOffset = applyOffset(
2059
+ elOffset,
2060
+ targetOffset[start] -
2061
+ elOffset[start] +
2062
+ moveBy(attach.target[i], end, targetOffset[prop]) -
2063
+ moveBy(attach.element[i], end, elOffset[prop]) +
2064
+ +offsetBy[i],
2065
+ i);
2066
+
2067
+ }
2068
+ return elOffset;
2069
+ }
2070
+
2071
+ function applyOffset(position, offset, i) {
2072
+ const [, dir, start, end] = dirs[i];
2073
+ const newPos = { ...position };
2074
+ newPos[start] = position[dir] = position[start] + offset;
2075
+ newPos[end] += offset;
2076
+ return newPos;
2077
+ }
2078
+
2079
+ function moveBy(attach, end, dim) {
2080
+ return attach === 'center' ? dim / 2 : attach === end ? dim : 0;
2081
+ }
2082
+
2115
2083
  function getIntersectionArea() {
2116
2084
  let area = {};for (var _len = arguments.length, rects = new Array(_len), _key = 0; _key < _len; _key++) {rects[_key] = arguments[_key];}
2117
2085
  for (const rect of rects) {
@@ -2132,12 +2100,32 @@
2132
2100
  return position[start] >= viewport[start] && position[end] <= viewport[end];
2133
2101
  }
2134
2102
 
2135
- function intersectLine(dimA, dimB, dir) {
2136
- const [,, start, end] = dirs[dir];
2137
- return dimA[end] > dimB[start] && dimB[end] > dimA[start];
2103
+ function flip(element, target, _ref, i) {let { offset, attach } = _ref;
2104
+ return attachTo(element, target, {
2105
+ attach: {
2106
+ element: flipAttach(attach.element, i),
2107
+ target: flipAttach(attach.target, i) },
2108
+
2109
+ offset: flipOffset(offset, i) });
2110
+
2111
+ }
2112
+
2113
+ function flipAttach(attach, i) {
2114
+ const newAttach = [...attach];
2115
+ const index = dirs[i].indexOf(attach[i]);
2116
+ if (~index) {
2117
+ newAttach[i] = dirs[i][1 - index % 2 + 2];
2118
+ }
2119
+ return newAttach;
2120
+ }
2121
+
2122
+ function flipOffset(offset, i) {
2123
+ offset = [...offset];
2124
+ offset[i] *= -1;
2125
+ return offset;
2138
2126
  }
2139
2127
 
2140
- function flipDir(prop) {
2128
+ function flipAxis(prop) {
2141
2129
  for (let i = 0; i < dirs.length; i++) {
2142
2130
  const index = dirs[i].indexOf(prop);
2143
2131
  if (~index) {
@@ -2150,9 +2138,7 @@
2150
2138
  __proto__: null,
2151
2139
  ajax: ajax,
2152
2140
  getImage: getImage,
2153
- transition: transition,
2154
2141
  Transition: Transition,
2155
- animate: animate$1,
2156
2142
  Animation: Animation,
2157
2143
  attr: attr,
2158
2144
  hasAttr: hasAttr,
@@ -2282,7 +2268,6 @@
2282
2268
  findAll: findAll,
2283
2269
  escape: escape,
2284
2270
  css: css,
2285
- getCssVar: getCssVar,
2286
2271
  propName: propName,
2287
2272
  isInView: isInView,
2288
2273
  scrollIntoView: scrollIntoView,
@@ -2607,7 +2592,7 @@
2607
2592
 
2608
2593
  value = props[key] === Boolean && value === '' ? true : coerce$1(props[key], value);
2609
2594
 
2610
- if (prop === 'target' && (!value || startsWith(value, '_'))) {
2595
+ if (prop === 'target' && startsWith(value, '_')) {
2611
2596
  continue;
2612
2597
  }
2613
2598
 
@@ -2618,7 +2603,7 @@
2618
2603
 
2619
2604
  for (const key in options) {
2620
2605
  const prop = camelize(key);
2621
- if (props[prop] !== undefined) {
2606
+ if (!isUndefined(props[prop])) {
2622
2607
  data$1[prop] = coerce$1(props[prop], options[key]);
2623
2608
  }
2624
2609
  }
@@ -2947,7 +2932,7 @@
2947
2932
  UIkit.data = '__uikit__';
2948
2933
  UIkit.prefix = 'uk-';
2949
2934
  UIkit.options = {};
2950
- UIkit.version = '3.14.4-dev.f2e3be255';
2935
+ UIkit.version = '3.14.4-dev.fab1c7b7c';
2951
2936
 
2952
2937
  globalAPI(UIkit);
2953
2938
  hooksAPI(UIkit);
@@ -3052,27 +3037,7 @@
3052
3037
  origin: false,
3053
3038
  transition: 'ease',
3054
3039
  clsEnter: 'uk-togglabe-enter',
3055
- clsLeave: 'uk-togglabe-leave',
3056
-
3057
- initProps: {
3058
- overflow: '',
3059
- maxHeight: '',
3060
- paddingTop: '',
3061
- paddingBottom: '',
3062
- marginTop: '',
3063
- marginBottom: '',
3064
- boxShadow: '' },
3065
-
3066
-
3067
- hideProps: {
3068
- overflow: 'hidden',
3069
- maxHeight: 0,
3070
- paddingTop: 0,
3071
- paddingBottom: 0,
3072
- marginTop: 0,
3073
- marginBottom: 0,
3074
- boxShadow: 'none' } },
3075
-
3040
+ clsLeave: 'uk-togglabe-leave' },
3076
3041
 
3077
3042
 
3078
3043
  computed: {
@@ -3081,7 +3046,7 @@
3081
3046
  },
3082
3047
 
3083
3048
  hasTransition(_ref2) {let { animation } = _ref2;
3084
- return startsWith(animation[0], 'slide');
3049
+ return ['slide', 'reveal'].some((transition) => startsWith(animation[0], transition));
3085
3050
  } },
3086
3051
 
3087
3052
 
@@ -3174,130 +3139,105 @@
3174
3139
  };
3175
3140
  }
3176
3141
 
3177
- function toggleTransition(cmp) {
3178
- switch (cmp.animation[0]) {
3179
- case 'slide-left':
3180
- return slideHorizontal(cmp);
3181
- case 'slide-right':
3182
- return slideHorizontal(cmp, true);}
3183
-
3184
- return slide$1(cmp);
3185
- }
3186
-
3187
- function slide$1(_ref4)
3188
-
3189
-
3142
+ function toggleTransition(cmp) {var _cmp$animation$;
3143
+ const [mode = 'reveal', startProp = 'top'] = ((_cmp$animation$ = cmp.animation[0]) == null ? void 0 : _cmp$animation$.split('-')) || [];
3190
3144
 
3145
+ const dirs = [
3146
+ ['left', 'right'],
3147
+ ['top', 'bottom']];
3191
3148
 
3149
+ const dir = dirs[includes(dirs[0], startProp) ? 0 : 1];
3150
+ const end = dir[1] === startProp;
3151
+ const props = ['width', 'height'];
3152
+ const dimProp = props[dirs.indexOf(dir)];
3153
+ const marginProp = "margin-" + dir[0];
3154
+ const marginStartProp = "margin-" + startProp;
3192
3155
 
3156
+ return async (el, show) => {
3157
+ let { duration, velocity, transition, _toggle } = cmp;
3193
3158
 
3159
+ let currentDim = dimensions$1(el)[dimProp];
3194
3160
 
3195
- {let { isToggled, duration, velocity, initProps, hideProps, transition, _toggle } = _ref4;
3196
- return (el, show) => {
3197
3161
  const inProgress = Transition.inProgress(el);
3198
- const inner =
3199
- !inProgress && el.hasChildNodes() ?
3200
- toFloat(css(el.firstElementChild, 'marginTop')) +
3201
- toFloat(css(el.lastElementChild, 'marginBottom')) :
3202
- 0;
3203
- const currentHeight = isVisible(el) ? toFloat(css(el, 'height')) + inner : 0;
3204
-
3205
- const props = inProgress ? css(el, Object.keys(initProps)) : show ? hideProps : initProps;
3162
+ await Transition.cancel(el);
3206
3163
 
3207
- Transition.cancel(el);
3208
-
3209
- if (!isToggled(el)) {
3164
+ if (show) {
3210
3165
  _toggle(el, true);
3211
3166
  }
3212
3167
 
3213
- css(el, 'maxHeight', '');
3214
-
3215
- // Update child components first
3216
- fastdom.flush();
3217
-
3218
- const endHeight = toFloat(css(el, 'height')) + inner;
3219
- duration = velocity * endHeight + duration;
3220
-
3221
- css(el, { ...props, maxHeight: currentHeight });
3222
-
3223
- return (
3224
- show ?
3225
- Transition.start(
3226
- el,
3227
- { ...initProps, overflow: 'hidden', maxHeight: endHeight },
3228
- duration * (1 - currentHeight / endHeight),
3229
- transition) :
3230
-
3231
- Transition.start(
3232
- el,
3233
- hideProps,
3234
- duration * (currentHeight / endHeight),
3235
- transition).
3236
- then(() => _toggle(el, false))).
3237
- then(() => css(el, initProps));
3238
- };
3239
- }
3240
-
3241
- function slideHorizontal(_ref5, right) {let { isToggled, duration, velocity, transition, _toggle } = _ref5;
3242
- return (el, show) => {
3243
- const visible = isVisible(el);
3244
- const marginLeft = toFloat(css(el, 'marginLeft'));
3245
-
3246
- Transition.cancel(el);
3247
-
3248
- const [scrollElement] = scrollParents(el);
3249
- css(scrollElement, 'overflowX', 'hidden');
3250
-
3251
- if (!isToggled(el)) {
3252
- _toggle(el, true);
3253
- }
3168
+ const prevProps = Object.fromEntries(
3169
+ [
3170
+ 'padding',
3171
+ 'border',
3172
+ 'width',
3173
+ 'height',
3174
+ 'overflowY',
3175
+ 'overflowX',
3176
+ marginProp,
3177
+ marginStartProp].
3178
+ map((key) => [key, el.style[key]]));
3179
+
3180
+
3181
+ const dim = dimensions$1(el);
3182
+ const currentMargin = toFloat(css(el, marginProp));
3183
+ const marginStart = toFloat(css(el, marginStartProp));
3184
+ const endDim = dim[dimProp] + marginStart;
3185
+
3186
+ if (!inProgress && !show) {
3187
+ currentDim += marginStart;
3188
+ }
3189
+
3190
+ const [wrapper] = wrapInner(el, '<div>');
3191
+ css(wrapper, {
3192
+ boxSizing: 'border-box',
3193
+ height: dim.height,
3194
+ width: dim.width,
3195
+ ...css(el, [
3196
+ 'overflow',
3197
+ 'padding',
3198
+ 'borderTop',
3199
+ 'borderRight',
3200
+ 'borderBottom',
3201
+ 'borderLeft',
3202
+ 'borderImage',
3203
+ marginStartProp]) });
3254
3204
 
3255
- const width = toFloat(css(el, 'width'));
3256
- duration = velocity * width + duration;
3257
3205
 
3258
- const percent = visible ? (width + marginLeft * (right ? -1 : 1)) / width * 100 : 0;
3259
- const offsetEl = offset(el);
3260
- const useClipPath = right ?
3261
- offsetEl.right < scrollElement.clientWidth :
3262
- Math.round(offsetEl.left) > 0;
3263
3206
 
3264
3207
  css(el, {
3265
- clipPath: useClipPath ?
3266
- right ? "polygon(0 0," +
3267
- percent + "% 0," + percent + "% 100%,0 100%)" : "polygon(" + (
3268
- 100 - percent) + "% 0,100% 0,100% 100%," + (100 - percent) + "% 100%)" :
3269
- '',
3270
- marginLeft: (100 - percent) * (right ? 1 : -1) / 100 * width });
3271
-
3208
+ padding: 0,
3209
+ border: 0,
3210
+ [marginStartProp]: 0,
3211
+ width: dim.width,
3212
+ height: dim.height,
3213
+ overflow: 'hidden',
3214
+ [dimProp]: currentDim });
3272
3215
 
3273
- return (
3274
- show ?
3275
- Transition.start(
3276
- el,
3277
- {
3278
- clipPath: useClipPath ? "polygon(0 0,100% 0,100% 100%,0 100%)" : '',
3279
- marginLeft: 0 },
3280
3216
 
3281
- duration * (1 - percent / 100),
3282
- transition) :
3217
+ const percent = currentDim / endDim;
3218
+ duration = (velocity * endDim + duration) * (show ? 1 - percent : percent);
3219
+ const endProps = { [dimProp]: show ? endDim : 0 };
3283
3220
 
3284
- Transition.start(
3285
- el,
3286
- {
3287
- clipPath: useClipPath ?
3288
- right ? "polygon(0 0,0 0,0 100%,0 100%)" : "polygon(100% 0,100% 0,100% 100%,100% 100%)" :
3221
+ if (end) {
3222
+ css(el, marginProp, endDim - currentDim + currentMargin);
3223
+ endProps[marginProp] = show ? currentMargin : endDim + currentMargin;
3224
+ }
3289
3225
 
3226
+ if (!end ^ mode === 'reveal') {
3227
+ css(wrapper, marginProp, -endDim + currentDim);
3228
+ Transition.start(wrapper, { [marginProp]: show ? 0 : -endDim }, duration, transition);
3229
+ }
3290
3230
 
3291
- '',
3292
- marginLeft: (right ? 1 : -1) * width },
3231
+ try {
3232
+ await Transition.start(el, endProps, duration, transition);
3233
+ } finally {
3234
+ css(el, prevProps);
3235
+ unwrap(wrapper.firstChild);
3293
3236
 
3294
- duration * (percent / 100),
3295
- transition).
3296
- then(() => _toggle(el, false))).
3297
- then(() => {
3298
- css(scrollElement, 'overflowX', '');
3299
- css(el, { clipPath: '', marginLeft: '' });
3300
- });
3237
+ if (!show) {
3238
+ _toggle(el, false);
3239
+ }
3240
+ }
3301
3241
  };
3302
3242
  }
3303
3243
 
@@ -3322,6 +3262,7 @@
3322
3262
  mixins: [Class, Lazyload, Togglable],
3323
3263
 
3324
3264
  props: {
3265
+ animation: Boolean,
3325
3266
  targets: String,
3326
3267
  active: null,
3327
3268
  collapsible: Boolean,
@@ -3334,7 +3275,7 @@
3334
3275
  data: {
3335
3276
  targets: '> *',
3336
3277
  active: false,
3337
- animation: ['slide'],
3278
+ animation: true,
3338
3279
  collapsible: true,
3339
3280
  multiple: false,
3340
3281
  clsOpen: 'uk-open',
@@ -3380,7 +3321,7 @@
3380
3321
  hide(
3381
3322
  el,
3382
3323
  !hasClass(
3383
- this.items.find((item) => item.contains(el)),
3324
+ this.items.find((item) => within(el, item)),
3384
3325
  this.clsOpen));
3385
3326
 
3386
3327
 
@@ -3432,23 +3373,15 @@
3432
3373
  toggleClass(el, this.clsOpen, show);
3433
3374
  attr($(this.$props.toggle, el), 'aria-expanded', show);
3434
3375
 
3435
- const content = $("" + (el._wrapper ? '> * ' : '') + this.content, el);
3376
+ const content = $(this.content, el);
3436
3377
 
3437
- if (animate === false || !this.hasTransition) {
3378
+ if (animate === false || !this.animation) {
3379
+ content.hidden = !show;
3438
3380
  hide(content, !show);
3439
3381
  return;
3440
3382
  }
3441
3383
 
3442
- if (!el._wrapper) {
3443
- el._wrapper = wrapAll(content, "<div" + (show ? ' hidden' : '') + ">");
3444
- }
3445
-
3446
- hide(content, false);
3447
- await slide$1(this)(el._wrapper, show);
3448
- hide(content, !show);
3449
-
3450
- delete el._wrapper;
3451
- unwrap(content);
3384
+ await toggleTransition(this)(content, show);
3452
3385
 
3453
3386
  if (show) {
3454
3387
  const toggle = $(this.$props.toggle, el);
@@ -3474,18 +3407,17 @@
3474
3407
  args: 'animation',
3475
3408
 
3476
3409
  props: {
3410
+ animation: Boolean,
3477
3411
  close: String },
3478
3412
 
3479
3413
 
3480
3414
  data: {
3481
- animation: ['slide'],
3415
+ animation: true,
3482
3416
  selClose: '.uk-alert-close',
3483
- duration: 150,
3484
- hideProps: { opacity: 0, ...Togglable.data.hideProps } },
3417
+ duration: 150 },
3485
3418
 
3486
3419
 
3487
- events: [
3488
- {
3420
+ events: {
3489
3421
  name: 'click',
3490
3422
 
3491
3423
  delegate() {
@@ -3495,16 +3427,39 @@
3495
3427
  handler(e) {
3496
3428
  e.preventDefault();
3497
3429
  this.close();
3498
- } }],
3499
-
3430
+ } },
3500
3431
 
3501
3432
 
3502
3433
  methods: {
3503
3434
  async close() {
3504
- await this.toggleElement(this.$el);
3435
+ await this.toggleElement(this.$el, false, animate$1(this));
3505
3436
  this.$destroy(true);
3506
3437
  } } };
3507
3438
 
3439
+
3440
+
3441
+ function animate$1(_ref) {let { duration, transition, velocity } = _ref;
3442
+ return (el) => {
3443
+ const height = toFloat(css(el, 'height'));
3444
+ css(el, 'height', height);
3445
+ return Transition.start(
3446
+ el,
3447
+ {
3448
+ height: 0,
3449
+ marginTop: 0,
3450
+ marginBottom: 0,
3451
+ paddingTop: 0,
3452
+ paddingBottom: 0,
3453
+ borderTop: 0,
3454
+ borderBottom: 0,
3455
+ opacity: 0 },
3456
+
3457
+ velocity * height + duration,
3458
+ transition);
3459
+
3460
+ };
3461
+ }
3462
+
3508
3463
  var Video = {
3509
3464
  args: 'autoplay',
3510
3465
 
@@ -3653,13 +3608,17 @@
3653
3608
  props: {
3654
3609
  pos: String,
3655
3610
  offset: null,
3656
- flip: Boolean },
3611
+ flip: Boolean,
3612
+ shift: Boolean,
3613
+ inset: Boolean },
3657
3614
 
3658
3615
 
3659
3616
  data: {
3660
3617
  pos: "bottom-" + (isRtl ? 'right' : 'left'),
3618
+ offset: false,
3661
3619
  flip: true,
3662
- offset: false },
3620
+ shift: true,
3621
+ inset: false },
3663
3622
 
3664
3623
 
3665
3624
  connected() {
@@ -3671,17 +3630,19 @@
3671
3630
  methods: {
3672
3631
  positionAt(element, target, boundary) {
3673
3632
  let offset = [this.getPositionOffset(element), this.getShiftOffset(element)];
3633
+ const placement = [this.flip && 'flip', this.shift && 'shift'];
3674
3634
 
3675
3635
  const attach = {
3676
- element: [flipPosition(this.dir), this.align],
3636
+ element: [this.inset ? this.dir : flipPosition(this.dir), this.align],
3677
3637
  target: [this.dir, this.align] };
3678
3638
 
3679
3639
 
3680
3640
  if (this.axis === 'y') {
3681
3641
  for (const prop in attach) {
3682
- attach[prop] = attach[prop].reverse();
3642
+ attach[prop].reverse();
3683
3643
  }
3684
- offset = offset.reverse();
3644
+ offset.reverse();
3645
+ placement.reverse();
3685
3646
  }
3686
3647
 
3687
3648
  const [scrollElement] = scrollParents(element, /auto|scroll/);
@@ -3691,22 +3652,14 @@
3691
3652
  const elDim = dimensions$1(element);
3692
3653
  css(element, { top: -elDim.height, left: -elDim.width });
3693
3654
 
3694
- const args = [
3695
- element,
3696
- target,
3697
- {
3655
+ positionAt(element, target, {
3698
3656
  attach,
3699
3657
  offset,
3700
3658
  boundary,
3701
- flip: this.flip,
3702
- viewportOffset: this.getViewportOffset(element) }];
3659
+ placement,
3660
+ viewportOffset: this.getViewportOffset(element) });
3703
3661
 
3704
3662
 
3705
-
3706
- trigger(element, 'beforeposition', args);
3707
-
3708
- positionAt(...args);
3709
-
3710
3663
  // Restore scroll position
3711
3664
  scrollElement.scrollTop = scrollTop;
3712
3665
  scrollElement.scrollLeft = scrollLeft;
@@ -3715,27 +3668,38 @@
3715
3668
  getPositionOffset(element) {
3716
3669
  return (
3717
3670
  toPx(
3718
- this.offset === false ? getCssVar('position-offset', element) : this.offset,
3671
+ this.offset === false ? css(element, '--uk-position-offset') : this.offset,
3719
3672
  this.axis === 'x' ? 'width' : 'height',
3720
3673
  element) * (
3721
- includes(['left', 'top'], this.dir) ? -1 : 1));
3674
+
3675
+ includes(['left', 'top'], this.dir) ? -1 : 1) * (
3676
+ this.inset ? -1 : 1));
3722
3677
 
3723
3678
  },
3724
3679
 
3725
3680
  getShiftOffset(element) {
3726
- return includes(['center', 'justify', 'stretch'], this.align) ?
3681
+ return this.align === 'center' ?
3727
3682
  0 :
3728
3683
  toPx(
3729
- getCssVar('position-shift-offset', element),
3684
+ css(element, '--uk-position-shift-offset'),
3730
3685
  this.axis === 'y' ? 'width' : 'height',
3731
3686
  element) * (
3732
3687
  includes(['left', 'top'], this.align) ? 1 : -1);
3733
3688
  },
3734
3689
 
3735
3690
  getViewportOffset(element) {
3736
- return toPx(getCssVar('position-viewport-offset', element));
3691
+ return toPx(css(element, '--uk-position-viewport-offset'));
3737
3692
  } } };
3738
3693
 
3694
+ var Style = {
3695
+ beforeConnect() {
3696
+ this._style = attr(this.$el, 'style');
3697
+ },
3698
+
3699
+ disconnected() {
3700
+ attr(this.$el, 'style', this._style);
3701
+ } };
3702
+
3739
3703
  const active$1 = [];
3740
3704
 
3741
3705
  var Modal = {
@@ -3845,8 +3809,8 @@
3845
3809
 
3846
3810
 
3847
3811
  if (this.overlay) {
3848
- once(this.$el, 'hide', preventOverscroll(this.$el));
3849
- once(this.$el, 'hide', preventBackgroundScroll());
3812
+ once(this.$el, 'hidden', preventOverscroll(this.$el), { self: true });
3813
+ once(this.$el, 'hidden', preventBackgroundScroll(), { self: true });
3850
3814
  }
3851
3815
 
3852
3816
  if (this.stack) {
@@ -3928,10 +3892,6 @@
3928
3892
  active$1.splice(active$1.indexOf(this), 1);
3929
3893
  }
3930
3894
 
3931
- if (!active$1.length) {
3932
- css(document.body, 'overflowY', '');
3933
- }
3934
-
3935
3895
  css(this.$el, 'zIndex', '');
3936
3896
 
3937
3897
  if (!active$1.some((modal) => modal.clsPage === this.clsPage)) {
@@ -4048,16 +4008,22 @@
4048
4008
  return () => events.forEach((fn) => fn());
4049
4009
  }
4050
4010
 
4011
+ let prevented;
4051
4012
  function preventBackgroundScroll() {
4052
- const { body, documentElement } = document;
4053
- css(body, {
4054
- overflowY: width(window) > documentElement.clientWidth ? 'scroll' : '',
4055
- touchAction: 'none' });
4013
+ if (prevented) {
4014
+ return noop;
4015
+ }
4016
+ prevented = true;
4017
+
4018
+ const { scrollingElement } = document;
4019
+ css(scrollingElement, {
4020
+ overflowY: 'hidden',
4021
+ touchAction: 'none',
4022
+ paddingRight: width(window) - scrollingElement.clientWidth });
4056
4023
 
4057
- css(documentElement, 'overflowY', 'hidden');
4058
4024
  return () => {
4059
- css(documentElement, 'overflowY', '');
4060
- css(body, { overflowY: '', touchAction: '' });
4025
+ prevented = false;
4026
+ css(scrollingElement, { overflowY: '', touchAction: '', paddingRight: '' });
4061
4027
  };
4062
4028
  }
4063
4029
 
@@ -4074,7 +4040,7 @@
4074
4040
  let active;
4075
4041
 
4076
4042
  var drop = {
4077
- mixins: [Container, Lazyload, Position, Togglable],
4043
+ mixins: [Container, Lazyload, Position, Style, Togglable],
4078
4044
 
4079
4045
  args: 'pos',
4080
4046
 
@@ -4082,10 +4048,13 @@
4082
4048
  mode: 'list',
4083
4049
  toggle: Boolean,
4084
4050
  boundary: Boolean,
4085
- boundaryAlign: Boolean,
4051
+ target: Boolean,
4052
+ targetX: Boolean,
4053
+ targetY: Boolean,
4054
+ stretch: Boolean,
4086
4055
  delayShow: Number,
4087
4056
  delayHide: Number,
4088
- display: String,
4057
+ autoUpdate: Boolean,
4089
4058
  clsDrop: String,
4090
4059
  animateOut: Boolean,
4091
4060
  bgScroll: Boolean },
@@ -4094,17 +4063,32 @@
4094
4063
  data: {
4095
4064
  mode: ['click', 'hover'],
4096
4065
  toggle: '- *',
4097
- boundary: true,
4098
- boundaryAlign: false,
4066
+ boundary: false,
4067
+ target: false,
4068
+ targetX: false,
4069
+ targetY: false,
4070
+ stretch: false,
4099
4071
  delayShow: 0,
4100
4072
  delayHide: 800,
4101
- display: null,
4073
+ autoUpdate: true,
4102
4074
  clsDrop: false,
4075
+ animateOut: false,
4076
+ bgScroll: true,
4103
4077
  animation: ['uk-animation-fade'],
4104
4078
  cls: 'uk-open',
4105
- container: false,
4106
- animateOut: false,
4107
- bgScroll: true },
4079
+ container: false },
4080
+
4081
+
4082
+ computed: {
4083
+ target(_ref, $el) {let { target, targetX, targetY } = _ref;
4084
+ targetX = targetX || target || this.targetEl;
4085
+ targetY = targetY || target || this.targetEl;
4086
+
4087
+ return [
4088
+ targetX === true ? window : query(targetX, $el),
4089
+ targetY === true ? window : query(targetY, $el)];
4090
+
4091
+ } },
4108
4092
 
4109
4093
 
4110
4094
  created() {
@@ -4118,18 +4102,19 @@
4118
4102
  connected() {
4119
4103
  addClass(this.$el, this.clsDrop);
4120
4104
 
4121
- if (this.toggle && !this.target) {
4122
- this.target = this.$create('toggle', query(this.toggle, this.$el), {
4105
+ if (this.toggle && !this.targetEl) {
4106
+ this.targetEl = this.$create('toggle', query(this.toggle, this.$el), {
4123
4107
  target: this.$el,
4124
4108
  mode: this.mode }).
4125
4109
  $el;
4126
- attr(this.target, 'aria-haspopup', true);
4127
- this.lazyload(this.target);
4110
+ attr(this.targetEl, 'aria-haspopup', true);
4111
+ this.lazyload(this.targetEl);
4128
4112
  }
4129
4113
  },
4130
4114
 
4131
4115
  disconnected() {
4132
4116
  if (this.isActive()) {
4117
+ this.hide(false);
4133
4118
  active = null;
4134
4119
  }
4135
4120
  },
@@ -4155,7 +4140,7 @@
4155
4140
  return 'a[href^="#"]';
4156
4141
  },
4157
4142
 
4158
- handler(_ref) {let { defaultPrevented, current: { hash } } = _ref;
4143
+ handler(_ref2) {let { defaultPrevented, current: { hash } } = _ref2;
4159
4144
  if (!defaultPrevented && hash && !within(hash, this.$el)) {
4160
4145
  this.hide(false);
4161
4146
  }
@@ -4263,21 +4248,22 @@
4263
4248
 
4264
4249
  this.tracker.init();
4265
4250
 
4266
- for (const handler of [
4251
+ const update = () => this.$emit();
4252
+ const handlers = [
4267
4253
  on(
4268
4254
  document,
4269
4255
  pointerDown$1,
4270
- (_ref2) => {let { target } = _ref2;return (
4256
+ (_ref3) => {let { target } = _ref3;return (
4271
4257
  !within(target, this.$el) &&
4272
4258
  once(
4273
4259
  document,
4274
4260
  pointerUp$1 + " " + pointerCancel + " scroll",
4275
- (_ref3) => {let { defaultPrevented, type, target: newTarget } = _ref3;
4261
+ (_ref4) => {let { defaultPrevented, type, target: newTarget } = _ref4;
4276
4262
  if (
4277
4263
  !defaultPrevented &&
4278
4264
  type === pointerUp$1 &&
4279
4265
  target === newTarget &&
4280
- !(this.target && within(target, this.target)))
4266
+ !(this.targetEl && within(target, this.targetEl)))
4281
4267
  {
4282
4268
  this.hide(false);
4283
4269
  }
@@ -4292,29 +4278,28 @@
4292
4278
  }
4293
4279
  }),
4294
4280
 
4281
+ on(window, 'resize', update),
4282
+
4283
+ (() => {
4284
+ const observer = observeResize(
4285
+ scrollParents(this.$el).concat(this.targetEl),
4286
+ update);
4287
+
4288
+ return () => observer.disconnect();
4289
+ })(),
4290
+
4291
+ ...(this.autoUpdate ?
4292
+ [on([document, scrollParents(this.$el)], 'scroll', update)] :
4293
+ []),
4294
+
4295
4295
  ...(this.bgScroll ?
4296
4296
  [] :
4297
- [preventOverscroll(this.$el), preventBackgroundScroll()]),
4297
+ [preventOverscroll(this.$el), preventBackgroundScroll()])];
4298
+
4299
+
4300
+ once(this.$el, 'hide', () => handlers.forEach((handler) => handler()), {
4301
+ self: true });
4298
4302
 
4299
- ...(this.display === 'static' && this.align !== 'stretch' ?
4300
- [] :
4301
- (() => {
4302
- const handler = () => this.$emit();
4303
- return [
4304
- on(window, 'resize', handler),
4305
- on(document, 'scroll', handler, true),
4306
- (() => {
4307
- const observer = observeResize(
4308
- scrollParents(this.$el),
4309
- handler);
4310
-
4311
- return () => observer.disconnect();
4312
- })()];
4313
-
4314
- })())])
4315
- {
4316
- once(this.$el, 'hide', handler, { self: true });
4317
- }
4318
4303
  } },
4319
4304
 
4320
4305
 
@@ -4331,7 +4316,7 @@
4331
4316
  {
4332
4317
  name: 'hide',
4333
4318
 
4334
- handler(_ref4) {let { target } = _ref4;
4319
+ handler(_ref5) {let { target } = _ref5;
4335
4320
  if (this.$el !== target) {
4336
4321
  active =
4337
4322
  active === null && within(target, this.$el) && this.isToggled() ?
@@ -4355,12 +4340,12 @@
4355
4340
 
4356
4341
 
4357
4342
  methods: {
4358
- show(target, delay) {if (target === void 0) {target = this.target;}if (delay === void 0) {delay = true;}
4359
- if (this.isToggled() && target && this.target && target !== this.target) {
4343
+ show(target, delay) {if (target === void 0) {target = this.targetEl;}if (delay === void 0) {delay = true;}
4344
+ if (this.isToggled() && target && this.targetEl && target !== this.targetEl) {
4360
4345
  this.hide(false, false);
4361
4346
  }
4362
4347
 
4363
- this.target = target;
4348
+ this.targetEl = target;
4364
4349
 
4365
4350
  this.clearTimers();
4366
4351
 
@@ -4423,60 +4408,69 @@
4423
4408
 
4424
4409
  position() {
4425
4410
  removeClass(this.$el, this.clsDrop + "-stack");
4426
- toggleClass(this.$el, this.clsDrop + "-boundary", this.boundaryAlign);
4427
- toggleClass(this.$el, this.clsDrop + "-stretch", this.align === 'stretch');
4411
+ attr(this.$el, 'style', this._style);
4428
4412
 
4429
- const boundary = query(this.boundary, this.$el);
4430
- const target = boundary && this.boundaryAlign ? boundary : this.target;
4431
- const [scrollParent] = scrollParents(
4432
- boundary && this.boundaryAlign ? boundary : this.$el);
4413
+ // Ensure none positioned element does not generate scrollbars
4414
+ this.$el.hidden = true;
4433
4415
 
4434
- const scrollParentOffset = offset(scrollParent);
4435
- const boundaryOffset = boundary ? offset(boundary) : scrollParentOffset;
4416
+ const boundary = query(this.boundary, this.$el);
4417
+ const boundaryOffset = offsetViewport(boundary || window);
4418
+ const viewports = this.target.map((target) => offsetViewport(scrollParents(target)[0]));
4436
4419
  const viewportOffset = this.getViewportOffset(this.$el);
4437
4420
 
4438
- css(this.$el, 'maxWidth', '');
4439
- const maxWidth = scrollParentOffset.width - 2 * viewportOffset;
4421
+ const dirs = [
4422
+ [0, ['x', 'width', 'left', 'right']],
4423
+ [1, ['y', 'height', 'top', 'bottom']]];
4440
4424
 
4441
- if (this.align === 'justify') {
4442
- const prop = this.axis === 'y' ? 'width' : 'height';
4443
- css(
4444
- this.$el,
4445
- prop,
4446
- Math.min(
4447
- (boundary ? boundaryOffset : offset(this.target))[prop],
4448
- scrollParentOffset[prop] - 2 * viewportOffset));
4449
-
4450
-
4451
- } else if (this.align === 'stretch') {
4452
- this.flip = this.axis === 'y' ? 'x' : 'y';
4453
- this.display = 'static';
4454
-
4455
- const viewport = offsetViewport(scrollParent);
4456
- const targetDim = offset(target);
4457
- const elOffset = Math.abs(this.getPositionOffset(this.$el)) + viewportOffset;
4458
-
4459
- css(this.$el, {
4460
- width:
4461
- this.axis === 'y' ?
4462
- viewport.width :
4463
- (this.dir === 'left' ?
4464
- targetDim.left - viewport.left :
4465
- viewport.right - targetDim.right) - elOffset,
4466
- height:
4467
- this.axis === 'x' ?
4468
- viewport.height :
4469
- (this.dir === 'top' ?
4470
- targetDim.top - viewport.top :
4471
- viewport.bottom - targetDim.bottom) - elOffset });
4472
-
4473
- } else if (this.$el.offsetWidth > maxWidth) {
4425
+
4426
+ for (const [i, [axis, prop]] of dirs) {
4427
+ if (this.axis !== axis && includes([axis, true], this.stretch)) {
4428
+ css(this.$el, {
4429
+ [prop]: Math.min(
4430
+ boundaryOffset[prop],
4431
+ viewports[i][prop] - 2 * viewportOffset),
4432
+
4433
+ ["overflow-" + axis]: 'auto' });
4434
+
4435
+ }
4436
+ }
4437
+
4438
+ const maxWidth = viewports[0].width - 2 * viewportOffset;
4439
+
4440
+ if (this.$el.offsetWidth > maxWidth) {
4474
4441
  addClass(this.$el, this.clsDrop + "-stack");
4475
4442
  }
4476
4443
 
4477
4444
  css(this.$el, 'maxWidth', maxWidth);
4478
4445
 
4479
- this.positionAt(this.$el, target, boundary);
4446
+ this.$el.hidden = false;
4447
+
4448
+ this.positionAt(this.$el, this.target, boundary);
4449
+
4450
+ for (const [i, [axis, prop, start, end]] of dirs) {
4451
+ if (this.axis === axis && includes([axis, true], this.stretch)) {
4452
+ const positionOffset = Math.abs(this.getPositionOffset(this.$el));
4453
+ const targetOffset = offset(this.target[i]);
4454
+ const elOffset = offset(this.$el);
4455
+
4456
+ css(this.$el, {
4457
+ [prop]:
4458
+ (targetOffset[start] > elOffset[start] ?
4459
+ targetOffset[start] -
4460
+ Math.max(
4461
+ boundaryOffset[start],
4462
+ viewports[i][start] + viewportOffset) :
4463
+
4464
+ Math.min(
4465
+ boundaryOffset[end],
4466
+ viewports[i][end] - viewportOffset) -
4467
+ targetOffset[end]) - positionOffset,
4468
+ ["overflow-" + axis]: 'auto' });
4469
+
4470
+
4471
+ this.positionAt(this.$el, this.target, boundary);
4472
+ }
4473
+ }
4480
4474
  } } };
4481
4475
 
4482
4476
 
@@ -4973,8 +4967,11 @@
4973
4967
  let minHeight = '';
4974
4968
  const box = boxModelAdjust(this.$el, 'height', 'content-box');
4975
4969
 
4970
+ const { body, scrollingElement } = document;
4976
4971
  const [scrollElement] = scrollParents(this.$el, /auto|scroll/);
4977
- const { height: viewportHeight } = offsetViewport(scrollElement);
4972
+ const { height: viewportHeight } = offsetViewport(
4973
+ scrollElement === body ? scrollingElement : scrollElement);
4974
+
4978
4975
 
4979
4976
  if (this.expand) {
4980
4977
  minHeight = Math.max(
@@ -4984,7 +4981,8 @@
4984
4981
  0);
4985
4982
 
4986
4983
  } else {
4987
- const isScrollingElement = document.scrollingElement === scrollElement;
4984
+ const isScrollingElement =
4985
+ scrollingElement === scrollElement || body === scrollElement;
4988
4986
 
4989
4987
  // on mobile devices (iOS and Android) window.innerHeight !== 100vh
4990
4988
  minHeight = "calc(" + (isScrollingElement ? '100vh' : viewportHeight + "px");
@@ -5238,7 +5236,13 @@
5238
5236
 
5239
5237
  var marker = "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><rect x=\"9\" y=\"4\" width=\"1\" height=\"11\"/><rect x=\"4\" y=\"9\" width=\"11\" height=\"1\"/></svg>";
5240
5238
 
5241
- var navbarToggleIcon = "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><rect y=\"9\" width=\"20\" height=\"2\"/><rect y=\"3\" width=\"20\" height=\"2\"/><rect y=\"15\" width=\"20\" height=\"2\"/></svg>";
5239
+ var navParentIcon = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"12\" viewBox=\"0 0 12 12\"><polyline fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" points=\"1 3.5 6 8.5 11 3.5\"/></svg>";
5240
+
5241
+ var navParentIconLarge = "<svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" xmlns=\"http://www.w3.org/2000/svg\"><polyline fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" points=\"1 4 7 10 13 4\"/></svg>";
5242
+
5243
+ var navbarParentIcon = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"12\" viewBox=\"0 0 12 12\"><polyline fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" points=\"1 3.5 6 8.5 11 3.5\"/></svg>";
5244
+
5245
+ var navbarToggleIcon = "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><style>.uk-navbar-toggle-animate 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 svg > .line-3 { opacity: 0; }\n .uk-navbar-toggle-animate[aria-expanded=\"true\"] svg > .line-3 { opacity: 1; }\n\n .uk-navbar-toggle-animate[aria-expanded=\"true\"] svg > .line-2 { transform: rotate(45deg); }\n .uk-navbar-toggle-animate[aria-expanded=\"true\"] svg > .line-3 { transform: rotate(-45deg); }\n\n .uk-navbar-toggle-animate[aria-expanded=\"true\"] svg > .line-1,\n .uk-navbar-toggle-animate[aria-expanded=\"true\"] svg > .line-4 { opacity: 0; }\n .uk-navbar-toggle-animate[aria-expanded=\"true\"] svg > .line-1 { transform: translateY(6px) scaleX(0); }\n .uk-navbar-toggle-animate[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>";
5242
5246
 
5243
5247
  var overlayIcon = "<svg width=\"40\" height=\"40\" viewBox=\"0 0 40 40\" xmlns=\"http://www.w3.org/2000/svg\"><rect x=\"19\" y=\"0\" width=\"1\" height=\"40\"/><rect x=\"0\" y=\"19\" width=\"40\" height=\"1\"/></svg>";
5244
5248
 
@@ -5270,6 +5274,9 @@
5270
5274
  marker,
5271
5275
  'close-icon': closeIcon,
5272
5276
  'close-large': closeLarge,
5277
+ 'nav-parent-icon': navParentIcon,
5278
+ 'nav-parent-icon-large': navParentIconLarge,
5279
+ 'navbar-parent-icon': navbarParentIcon,
5273
5280
  'navbar-toggle-icon': navbarToggleIcon,
5274
5281
  'overlay-icon': overlayIcon,
5275
5282
  'pagination-next': paginationNext,
@@ -5327,6 +5334,15 @@
5327
5334
  } };
5328
5335
 
5329
5336
 
5337
+ const NavParentIcon = {
5338
+ extends: IconComponent,
5339
+
5340
+ beforeConnect() {
5341
+ const icon = this.$props.icon;
5342
+ this.icon = closest(this.$el, '.uk-nav-primary') ? icon + "-large" : icon;
5343
+ } };
5344
+
5345
+
5330
5346
  const Slidenav = {
5331
5347
  extends: IconComponent,
5332
5348
 
@@ -5587,7 +5603,7 @@
5587
5603
 
5588
5604
 
5589
5605
  connected() {
5590
- const media = toMedia(this.media);
5606
+ const media = toMedia(this.media, this.$el);
5591
5607
  this.matchMedia = true;
5592
5608
  if (media) {
5593
5609
  this.mediaObj = window.matchMedia(media);
@@ -5608,11 +5624,10 @@
5608
5624
  } };
5609
5625
 
5610
5626
 
5611
- function toMedia(value) {
5627
+ function toMedia(value, element) {
5612
5628
  if (isString(value)) {
5613
5629
  if (startsWith(value, '@')) {
5614
- const name = "breakpoint-" + value.substr(1);
5615
- value = toFloat(getCssVar(name));
5630
+ value = toFloat(css(element, "--uk-breakpoint-" + value.substr(1)));
5616
5631
  } else if (isNaN(value)) {
5617
5632
  return value;
5618
5633
  }
@@ -5637,7 +5652,7 @@
5637
5652
 
5638
5653
  computed: {
5639
5654
  fill(_ref) {let { fill } = _ref;
5640
- return fill || getCssVar('leader-fill-content');
5655
+ return fill || css(this.$el, '--uk-leader-fill-content');
5641
5656
  } },
5642
5657
 
5643
5658
 
@@ -5829,7 +5844,9 @@
5829
5844
  align: String,
5830
5845
  offset: Number,
5831
5846
  boundary: Boolean,
5832
- boundaryAlign: Boolean,
5847
+ target: Boolean,
5848
+ targetX: Boolean,
5849
+ targetY: Boolean,
5833
5850
  clsDrop: String,
5834
5851
  delayShow: Number,
5835
5852
  delayHide: Number,
@@ -5846,9 +5863,12 @@
5846
5863
  offset: undefined,
5847
5864
  delayShow: undefined,
5848
5865
  delayHide: undefined,
5849
- boundaryAlign: undefined,
5850
- flip: 'x',
5866
+ flip: false,
5867
+ shift: true,
5851
5868
  boundary: true,
5869
+ target: false,
5870
+ targetX: false,
5871
+ targetY: false,
5852
5872
  dropbar: false,
5853
5873
  dropbarAnchor: false,
5854
5874
  duration: 200,
@@ -5883,7 +5903,7 @@
5883
5903
  },
5884
5904
 
5885
5905
  watch(dropbar) {
5886
- addClass(dropbar, 'uk-navbar-dropbar');
5906
+ addClass(dropbar, 'uk-dropbar', 'uk-dropbar-top', 'uk-navbar-dropbar');
5887
5907
  },
5888
5908
 
5889
5909
  immediate: true },
@@ -5899,7 +5919,7 @@
5899
5919
 
5900
5920
  if (this.dropContainer !== $el) {
5901
5921
  for (const el of $$("." + clsDrop, this.dropContainer)) {var _this$getDropdown;
5902
- const target = (_this$getDropdown = this.getDropdown(el)) == null ? void 0 : _this$getDropdown.target;
5922
+ const target = (_this$getDropdown = this.getDropdown(el)) == null ? void 0 : _this$getDropdown.targetEl;
5903
5923
  if (!includes(dropdowns, el) && target && within(target, this.$el)) {
5904
5924
  dropdowns.push(el);
5905
5925
  }
@@ -5961,8 +5981,8 @@
5961
5981
  if (
5962
5982
  active &&
5963
5983
  includes(active.mode, 'hover') &&
5964
- active.target &&
5965
- !within(active.target, current) &&
5984
+ active.targetEl &&
5985
+ !within(active.targetEl, current) &&
5966
5986
  !active.isDelaying)
5967
5987
  {
5968
5988
  active.hide(false);
@@ -5984,7 +6004,7 @@
5984
6004
  if (keyCode === keyMap.DOWN && hasAttr(current, 'aria-expanded')) {
5985
6005
  e.preventDefault();
5986
6006
 
5987
- if (!active || active.target !== current) {
6007
+ if (!active || active.targetEl !== current) {
5988
6008
  current.click();
5989
6009
  once(this.dropContainer, 'show', (_ref8) => {let { target } = _ref8;return (
5990
6010
  focusFirstFocusableElement(target));});
@@ -6034,8 +6054,8 @@
6034
6054
  }
6035
6055
  }
6036
6056
 
6037
- if (keyCode === keyMap.ESC) {var _active$target;
6038
- active == null ? void 0 : (_active$target = active.target) == null ? void 0 : _active$target.focus();
6057
+ if (keyCode === keyMap.ESC) {var _active$targetEl;
6058
+ active == null ? void 0 : (_active$targetEl = active.targetEl) == null ? void 0 : _active$targetEl.focus();
6039
6059
  }
6040
6060
 
6041
6061
  handleNavItemNavigation(e, this.toggles, active);
@@ -6106,39 +6126,19 @@
6106
6126
  return;
6107
6127
  }
6108
6128
 
6109
- this._observer = observeResize(target, () =>
6110
- this.transitionTo(
6111
- offset(target).bottom -
6112
- offset(this.dropbar).top +
6113
- toFloat(css(target, 'marginBottom')),
6114
- target));
6115
-
6116
-
6117
- } },
6118
-
6119
-
6120
- {
6121
- name: 'beforeposition',
6122
-
6123
- el() {
6124
- return this.dropContainer;
6125
- },
6126
-
6127
- filter() {
6128
- return this.dropbar;
6129
- },
6130
-
6131
- handler(e, element, target, options) {
6132
- if (!this.isDropbarDrop(element)) {
6133
- return;
6134
- }
6135
-
6136
- const dropbarOffset = offset(this.dropbar);
6137
-
6138
- css(element, 'maxWidth', dropbarOffset.width - options.viewportOffset * 2);
6129
+ this._observer = observeResize(target, () => {
6130
+ const targetOffsets = parents(target, "." + this.clsDrop).
6131
+ concat(target).
6132
+ map((el) => offset(el));
6133
+ const minTop = Math.min(...targetOffsets.map((_ref11) => {let { top } = _ref11;return top;}));
6134
+ const maxBottom = Math.max(...targetOffsets.map((_ref12) => {let { bottom } = _ref12;return bottom;}));
6135
+ const dropbarOffset = offset(this.dropbar);
6136
+ css(this.dropbar, 'top', this.dropbar.offsetTop - (dropbarOffset.top - minTop));
6137
+ this.transitionTo(
6138
+ maxBottom - minTop + toFloat(css(target, 'marginBottom')),
6139
+ target);
6139
6140
 
6140
- options.offset[1] = dropbarOffset.top - offset(target).bottom;
6141
- options.viewportOffset += dropbarOffset.left;
6141
+ });
6142
6142
  } },
6143
6143
 
6144
6144
 
@@ -6159,7 +6159,7 @@
6159
6159
  if (
6160
6160
  matches(this.dropbar, ':hover') &&
6161
6161
  (active == null ? void 0 : active.$el) === e.target &&
6162
- !this.toggles.some((el) => active.target !== el && matches(el, ':focus')))
6162
+ !this.toggles.some((el) => active.targetEl !== el && matches(el, ':focus')))
6163
6163
  {
6164
6164
  e.preventDefault();
6165
6165
  }
@@ -6177,7 +6177,7 @@
6177
6177
  return this.dropbar;
6178
6178
  },
6179
6179
 
6180
- handler(_ref11) {let { target } = _ref11;
6180
+ handler(_ref13) {let { target } = _ref13;
6181
6181
  if (!this.isDropbarDrop(target)) {
6182
6182
  return;
6183
6183
  }
@@ -6195,7 +6195,7 @@
6195
6195
 
6196
6196
  methods: {
6197
6197
  getActive() {
6198
- return active && within(active.target, this.$el) && active;
6198
+ return includes(this.dropdowns, active == null ? void 0 : active.$el) && active;
6199
6199
  },
6200
6200
 
6201
6201
  transitionTo(newHeight, el) {
@@ -6228,15 +6228,14 @@
6228
6228
  },
6229
6229
 
6230
6230
  isDropbarDrop(el) {
6231
- const drop = this.getDropdown(el);
6232
- return drop && hasClass(el, this.clsDrop) && drop.align !== 'stretch';
6231
+ return this.getDropdown(el) && hasClass(el, this.clsDrop);
6233
6232
  } } };
6234
6233
 
6235
6234
 
6236
6235
 
6237
6236
  function handleNavItemNavigation(e, toggles, active) {
6238
6237
  const { current, keyCode } = e;
6239
- const target = (active == null ? void 0 : active.target) || current;
6238
+ const target = (active == null ? void 0 : active.targetEl) || current;
6240
6239
  const i = toggles.indexOf(target);
6241
6240
 
6242
6241
  // Left
@@ -6604,6 +6603,14 @@
6604
6603
  offset: 0 },
6605
6604
 
6606
6605
 
6606
+ connected() {
6607
+ registerClick(this);
6608
+ },
6609
+
6610
+ disconnected() {
6611
+ unregisterClick(this);
6612
+ },
6613
+
6607
6614
  methods: {
6608
6615
  async scrollTo(el) {
6609
6616
  el = el && $(el) || document.body;
@@ -6612,20 +6619,39 @@
6612
6619
  await scrollIntoView(el, { offset: this.offset });
6613
6620
  trigger(this.$el, 'scrolled', [this, el]);
6614
6621
  }
6615
- } },
6622
+ } } };
6616
6623
 
6617
6624
 
6618
- events: {
6619
- click(e) {
6620
- if (e.defaultPrevented) {
6621
- return;
6622
- }
6623
6625
 
6624
- e.preventDefault();
6625
- this.scrollTo(getTargetElement(this.$el));
6626
- } } };
6626
+ const components$2 = new Set();
6627
+ function registerClick(cmp) {
6628
+ if (!components$2.size) {
6629
+ on(document, 'click', clickHandler);
6630
+ }
6627
6631
 
6632
+ components$2.add(cmp);
6633
+ }
6628
6634
 
6635
+ function unregisterClick(cmp) {
6636
+ components$2.delete(cmp);
6637
+
6638
+ if (!components$2.length) {
6639
+ off(document, 'click', clickHandler);
6640
+ }
6641
+ }
6642
+
6643
+ function clickHandler(e) {
6644
+ if (e.defaultPrevented) {
6645
+ return;
6646
+ }
6647
+
6648
+ for (const component of components$2) {
6649
+ if (within(e.target, component.$el)) {
6650
+ e.preventDefault();
6651
+ component.scrollTo(getTargetElement(component.$el));
6652
+ }
6653
+ }
6654
+ }
6629
6655
 
6630
6656
  function getTargetElement(el) {
6631
6657
  return document.getElementById(decodeURIComponent(el.hash).substring(1));
@@ -7588,7 +7614,7 @@
7588
7614
 
7589
7615
 
7590
7616
  {
7591
- name: 'toggled',
7617
+ name: 'hide show',
7592
7618
 
7593
7619
  self: true,
7594
7620
 
@@ -7596,10 +7622,8 @@
7596
7622
  return this.target;
7597
7623
  },
7598
7624
 
7599
- handler(e, toggled) {
7600
- if (e.target === this.target[0]) {
7601
- this.updateAria(toggled);
7602
- }
7625
+ handler(_ref2) {let { type } = _ref2;
7626
+ this.updateAria(type === 'show');
7603
7627
  } },
7604
7628
 
7605
7629
 
@@ -7694,10 +7718,12 @@
7694
7718
  Video: Video,
7695
7719
  Close: Close,
7696
7720
  Spinner: Spinner,
7721
+ NavParentIcon: NavParentIcon,
7697
7722
  SlidenavNext: Slidenav,
7698
7723
  SlidenavPrevious: Slidenav,
7699
7724
  SearchIcon: Search,
7700
7725
  Marker: IconComponent,
7726
+ NavbarParentIcon: IconComponent,
7701
7727
  NavbarToggleIcon: IconComponent,
7702
7728
  OverlayIcon: IconComponent,
7703
7729
  PaginationNext: IconComponent,
@@ -8187,7 +8213,7 @@
8187
8213
 
8188
8214
  },
8189
8215
 
8190
- setState(state, animate) {if (animate === void 0) {animate = true;}
8216
+ async setState(state, animate) {if (animate === void 0) {animate = true;}
8191
8217
  state = { filter: { '': '' }, sort: [], ...state };
8192
8218
 
8193
8219
  trigger(this.$el, 'beforeFilter', [this, state]);
@@ -8196,15 +8222,17 @@
8196
8222
  toggleClass(el, this.cls, !!matchFilter(el, this.attrItem, state)));
8197
8223
 
8198
8224
 
8199
- Promise.all(
8225
+ await Promise.all(
8200
8226
  $$(this.target, this.$el).map((target) => {
8201
8227
  const filterFn = () => {
8202
8228
  applyState(state, target, children(target));
8203
8229
  this.$update(this.$el);
8204
8230
  };
8205
8231
  return animate ? this.animate(filterFn, target) : filterFn();
8206
- })).
8207
- then(() => trigger(this.$el, 'afterFilter', [this]));
8232
+ }));
8233
+
8234
+
8235
+ trigger(this.$el, 'afterFilter', [this]);
8208
8236
  },
8209
8237
 
8210
8238
  updateState() {
@@ -9476,7 +9504,9 @@
9476
9504
  this.$mount(
9477
9505
  append(
9478
9506
  container, "<div class=\"" +
9479
- this.clsMsg + (this.status ? " " + this.clsMsg + "-" + this.status : '') + "\"> <a href class=\"" +
9507
+ this.clsMsg + (
9508
+ this.status ? " " + this.clsMsg + "-" + this.status : '') + "\" role=\"alert\"> <a href class=\"" +
9509
+
9480
9510
  this.clsClose + "\" data-uk-close></a> <div>" +
9481
9511
  this.message + "</div> </div>"));
9482
9512