uikit 3.14.4-dev.2dc50ec60 → 3.14.4-dev.3c3ec2cad

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 +39 -18
  2. package/build/util.js +1 -0
  3. package/dist/css/uikit-core-rtl.css +330 -78
  4. package/dist/css/uikit-core-rtl.min.css +1 -1
  5. package/dist/css/uikit-core.css +330 -78
  6. package/dist/css/uikit-core.min.css +1 -1
  7. package/dist/css/uikit-rtl.css +352 -107
  8. package/dist/css/uikit-rtl.min.css +1 -1
  9. package/dist/css/uikit.css +352 -107
  10. package/dist/css/uikit.min.css +1 -1
  11. package/dist/js/components/countdown.js +1 -1
  12. package/dist/js/components/countdown.min.js +1 -1
  13. package/dist/js/components/filter.js +1 -1
  14. package/dist/js/components/filter.min.js +1 -1
  15. package/dist/js/components/lightbox-panel.js +98 -131
  16. package/dist/js/components/lightbox-panel.min.js +1 -1
  17. package/dist/js/components/lightbox.js +98 -131
  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 +104 -139
  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 +531 -503
  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 +534 -504
  42. package/dist/js/uikit.min.js +17 -1
  43. package/package.json +11 -11
  44. package/src/images/components/navbar-toggle-icon.svg +25 -3
  45. package/src/js/api/hooks.js +5 -1
  46. package/src/js/api/state.js +2 -2
  47. package/src/js/components/notification.js +3 -1
  48. package/src/js/core/accordion.js +9 -17
  49. package/src/js/core/alert.js +35 -14
  50. package/src/js/core/drop.js +110 -82
  51. package/src/js/core/height-viewport.js +4 -2
  52. package/src/js/core/index.js +1 -1
  53. package/src/js/core/leader.js +2 -2
  54. package/src/js/core/navbar.js +30 -45
  55. package/src/js/core/offcanvas.js +8 -4
  56. package/src/js/core/scroll.js +37 -10
  57. package/src/js/core/toggle.js +3 -5
  58. package/src/js/mixin/media.js +4 -5
  59. package/src/js/mixin/modal.js +15 -12
  60. package/src/js/mixin/position.js +24 -26
  61. package/src/js/mixin/style.js +11 -0
  62. package/src/js/mixin/togglable.js +90 -124
  63. package/src/js/util/animation.js +9 -7
  64. package/src/js/util/class.js +3 -1
  65. package/src/js/util/filter.js +3 -7
  66. package/src/js/util/position.js +136 -130
  67. package/src/js/util/style.js +4 -13
  68. package/src/js/util/viewport.js +3 -5
  69. package/src/less/components/_import.less +1 -0
  70. package/src/less/components/drop.less +1 -18
  71. package/src/less/components/dropbar.less +126 -0
  72. package/src/less/components/dropdown.less +11 -19
  73. package/src/less/components/leader.less +1 -1
  74. package/src/less/components/nav.less +217 -33
  75. package/src/less/components/navbar.less +33 -54
  76. package/src/less/components/utility.less +10 -2
  77. package/src/less/theme/_import.less +1 -0
  78. package/src/less/theme/dropbar.less +44 -0
  79. package/src/less/theme/dropdown.less +0 -11
  80. package/src/less/theme/nav.less +45 -7
  81. package/src/less/theme/navbar.less +5 -36
  82. package/src/scss/components/_import.scss +1 -0
  83. package/src/scss/components/drop.scss +1 -18
  84. package/src/scss/components/dropbar.scss +126 -0
  85. package/src/scss/components/dropdown.scss +11 -19
  86. package/src/scss/components/leader.scss +1 -1
  87. package/src/scss/components/nav.scss +166 -32
  88. package/src/scss/components/navbar.scss +33 -54
  89. package/src/scss/components/utility.scss +8 -1
  90. package/src/scss/mixins-theme.scss +83 -36
  91. package/src/scss/mixins.scss +79 -4
  92. package/src/scss/theme/_import.scss +1 -0
  93. package/src/scss/theme/dropbar.scss +44 -0
  94. package/src/scss/theme/dropdown.scss +0 -8
  95. package/src/scss/theme/nav.scss +43 -7
  96. package/src/scss/theme/navbar.scss +4 -8
  97. package/src/scss/variables-theme.scss +59 -18
  98. package/src/scss/variables.scss +47 -13
  99. package/tests/accordion.html +2 -2
  100. package/tests/alert.html +2 -2
  101. package/tests/countdown.html +1 -1
  102. package/tests/drop.html +446 -416
  103. package/tests/dropbar.html +458 -0
  104. package/tests/dropdown.html +8 -470
  105. package/tests/filter.html +9 -12
  106. package/tests/flex.html +36 -36
  107. package/tests/form.html +1 -1
  108. package/tests/grid.html +22 -22
  109. package/tests/height.html +6 -6
  110. package/tests/index.html +127 -108
  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 +121 -12
  116. package/tests/navbar.html +111 -226
  117. package/tests/offcanvas.html +10 -14
  118. package/tests/pagination.html +6 -6
  119. package/tests/parallax.html +1 -1
  120. package/tests/position.html +18 -16
  121. package/tests/progress.html +9 -9
  122. package/tests/scroll.html +7 -10
  123. package/tests/search.html +6 -6
  124. package/tests/slider.html +6 -5
  125. package/tests/slideshow.html +8 -8
  126. package/tests/sortable.html +6 -8
  127. package/tests/sticky-navbar.html +15 -15
  128. package/tests/sticky.html +8 -8
  129. package/tests/switcher.html +1 -1
  130. package/tests/tab.html +1 -1
  131. package/tests/table.html +7 -7
  132. package/tests/toggle.html +2 -2
  133. package/tests/tooltip.html +1 -1
  134. package/tests/upload.html +11 -11
  135. package/tests/utility.html +35 -16
package/dist/js/uikit.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.14.4-dev.2dc50ec60 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
1
+ /*! UIkit 3.14.4-dev.3c3ec2cad | 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,127 +1936,47 @@
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
-
1993
- let {
1994
- flip,
1995
- attach: { element: elAttach, target: targetAttach },
1996
- offset: elOffset,
1997
- boundary,
1998
- viewport,
1999
- viewportOffset } =
2000
- options;
2001
-
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
- }
1952
+ const { boundary, viewportOffset = 0, placement } = options;
2014
1953
 
2015
- const willFlip =
2016
- !intersectLine(position, targetDim, i) && intersectLine(position, targetDim, 1 - i);
1954
+ let offsetPosition = position;
1955
+ for (const [i, [prop,, start, end]] of Object.entries(dirs)) {
1956
+ const viewport = getViewport$1(target[i], viewportOffset, boundary, i);
2017
1957
 
2018
- viewport = getIntersectionArea(...viewports.filter(Boolean).map(offsetViewport));
2019
-
2020
- if (viewportOffset) {
2021
- viewport[start] += viewportOffset;
2022
- viewport[end] -= viewportOffset;
2023
- }
2024
-
2025
- if (boundary && !willFlip && position[prop] <= offset(boundary)[prop]) {
2026
- viewport = getIntersectionArea(viewport, offset(boundary));
2027
- }
2028
-
2029
- const isInStartBoundary = position[start] >= viewport[start];
2030
- const isInEndBoundary = position[end] <= viewport[end];
2031
-
2032
- if (isInStartBoundary && isInEndBoundary) {
1958
+ if (isWithin(position, viewport, i)) {
2033
1959
  continue;
2034
1960
  }
2035
1961
 
2036
- let offsetBy;
1962
+ let offsetBy = 0;
2037
1963
 
2038
1964
  // Flip
2039
- if (willFlip) {
1965
+ if (placement[i] === 'flip') {
1966
+ const attach = options.attach.target[i];
2040
1967
  if (
2041
- elAttach[i] === end && isInStartBoundary ||
2042
- elAttach[i] === start && isInEndBoundary)
1968
+ attach === end && position[end] <= viewport[end] ||
1969
+ attach === start && position[start] >= viewport[start])
2043
1970
  {
2044
1971
  continue;
2045
1972
  }
2046
1973
 
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;
1974
+ offsetBy = flip(element, target, options, i)[start] - position[start];
2059
1975
 
2060
- if (
2061
- !isInScrollArea(
2062
- {
2063
- ...position,
2064
- [start]: position[start] + offsetBy,
2065
- [end]: position[end] + offsetBy },
1976
+ const scrollArea = getScrollArea(target[i], viewportOffset, i);
2066
1977
 
2067
- scrollElement,
2068
- i))
2069
-
2070
- {
2071
- if (isInScrollArea(position, scrollElement, i)) {
1978
+ if (!isWithin(applyOffset(position, offsetBy, i), scrollArea, i)) {
1979
+ if (isWithin(position, scrollArea, i)) {
2072
1980
  continue;
2073
1981
  }
2074
1982
 
@@ -2076,27 +1984,19 @@
2076
1984
  return false;
2077
1985
  }
2078
1986
 
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() },
2085
-
2086
- offset: elOffset.reverse(),
2087
- flip: flip === true ? flip : [...flip, dirs[1 - i][1]],
2088
- recursion: true });
1987
+ const newPos = flipAxis(element, target, options);
2089
1988
 
2090
-
2091
- if (newPos && isInScrollArea(newPos, scrollElement, 1 - i)) {
2092
- return newPos;
2093
- }
1989
+ if (newPos && isWithin(newPos, scrollArea, 1 - i)) {
1990
+ return newPos;
2094
1991
  }
1992
+
2095
1993
  continue;
2096
1994
  }
2097
1995
 
2098
- // Move
2099
- } else {
1996
+ // Shift
1997
+ } else if (placement[i] === 'shift') {
1998
+ const targetDim = offset(target[i]);
1999
+ const { offset: elOffset } = options;
2100
2000
  offsetBy =
2101
2001
  clamp(
2102
2002
  clamp(position[start], viewport[start], viewport[end] - position[prop]),
@@ -2105,13 +2005,78 @@
2105
2005
  position[start];
2106
2006
  }
2107
2007
 
2108
- offsetPosition[start] = position[dir] = position[start] + offsetBy;
2109
- offsetPosition[end] += offsetBy;
2008
+ offsetPosition = applyOffset(offsetPosition, offsetBy, i);
2110
2009
  }
2111
2010
 
2112
2011
  return offsetPosition;
2113
2012
  }
2114
2013
 
2014
+ function attachTo(element, target, options) {
2015
+ let { attach, offset: offsetBy } = {
2016
+ attach: {
2017
+ element: ['left', 'top'],
2018
+ target: ['left', 'top'],
2019
+ ...options.attach },
2020
+
2021
+ offset: [0, 0],
2022
+ ...options };
2023
+
2024
+
2025
+ let elOffset = offset(element);
2026
+
2027
+ for (const [i, [prop,, start, end]] of Object.entries(dirs)) {
2028
+ const targetOffset =
2029
+ attach.target[i] === attach.element[i] ? offsetViewport(target[i]) : offset(target[i]);
2030
+
2031
+ elOffset = applyOffset(
2032
+ elOffset,
2033
+ targetOffset[start] -
2034
+ elOffset[start] +
2035
+ moveBy(attach.target[i], end, targetOffset[prop]) -
2036
+ moveBy(attach.element[i], end, elOffset[prop]) +
2037
+ +offsetBy[i],
2038
+ i);
2039
+
2040
+ }
2041
+ return elOffset;
2042
+ }
2043
+
2044
+ function applyOffset(position, offset, i) {
2045
+ const [, dir, start, end] = dirs[i];
2046
+ const newPos = { ...position };
2047
+ newPos[start] = position[dir] = position[start] + offset;
2048
+ newPos[end] += offset;
2049
+ return newPos;
2050
+ }
2051
+
2052
+ function moveBy(attach, end, dim) {
2053
+ return attach === 'center' ? dim / 2 : attach === end ? dim : 0;
2054
+ }
2055
+
2056
+ function getViewport$1(element, viewportOffset, boundary, i) {
2057
+ let viewport = getIntersectionArea(...scrollParents(element).map(offsetViewport));
2058
+
2059
+ if (viewportOffset) {
2060
+ viewport[dirs[i][2]] += viewportOffset;
2061
+ viewport[dirs[i][3]] -= viewportOffset;
2062
+ }
2063
+
2064
+ if (boundary) {
2065
+ viewport = getIntersectionArea(viewport, offset(boundary));
2066
+ }
2067
+
2068
+ return viewport;
2069
+ }
2070
+
2071
+ function getScrollArea(element, viewportOffset, i) {
2072
+ const [prop,, start, end] = dirs[i];
2073
+ const [scrollElement] = scrollParents(element);
2074
+ const viewport = offsetViewport(scrollElement);
2075
+ viewport[start] -= scrollElement["scroll" + ucfirst(start)] - viewportOffset;
2076
+ viewport[end] = viewport[start] + scrollElement["scroll" + ucfirst(prop)] - viewportOffset;
2077
+ return viewport;
2078
+ }
2079
+
2115
2080
  function getIntersectionArea() {
2116
2081
  let area = {};for (var _len = arguments.length, rects = new Array(_len), _key = 0; _key < _len; _key++) {rects[_key] = arguments[_key];}
2117
2082
  for (const rect of rects) {
@@ -2123,21 +2088,44 @@
2123
2088
  return area;
2124
2089
  }
2125
2090
 
2126
- function isInScrollArea(position, scrollElement, dir) {
2127
- const viewport = offsetViewport(scrollElement);
2128
- const [prop,, start, end] = dirs[dir];
2129
- viewport[start] -= scrollElement["scroll" + ucfirst(start)];
2130
- viewport[end] = viewport[start] + scrollElement["scroll" + ucfirst(prop)];
2091
+ function isWithin(positionA, positionB, i) {
2092
+ const [,, start, end] = dirs[i];
2093
+ return positionA[start] >= positionB[start] && positionA[end] <= positionB[end];
2094
+ }
2095
+
2096
+ function flip(element, target, _ref, i) {let { offset, attach } = _ref;
2097
+ return attachTo(element, target, {
2098
+ attach: {
2099
+ element: flipAttach(attach.element, i),
2100
+ target: flipAttach(attach.target, i) },
2101
+
2102
+ offset: flipOffset(offset, i) });
2131
2103
 
2132
- return position[start] >= viewport[start] && position[end] <= viewport[end];
2133
2104
  }
2134
2105
 
2135
- function intersectLine(dimA, dimB, dir) {
2136
- const [,, start, end] = dirs[dir];
2137
- return dimA[end] > dimB[start] && dimB[end] > dimA[start];
2106
+ function flipAxis(element, target, options) {
2107
+ return getPosition(element, target, {
2108
+ ...options,
2109
+ attach: {
2110
+ element: options.attach.element.map(flipAttachAxis).reverse(),
2111
+ target: options.attach.target.map(flipAttachAxis).reverse() },
2112
+
2113
+ offset: options.offset.reverse(),
2114
+ placement: options.placement.reverse(),
2115
+ recursion: true });
2116
+
2138
2117
  }
2139
2118
 
2140
- function flipDir(prop) {
2119
+ function flipAttach(attach, i) {
2120
+ const newAttach = [...attach];
2121
+ const index = dirs[i].indexOf(attach[i]);
2122
+ if (~index) {
2123
+ newAttach[i] = dirs[i][1 - index % 2 + 2];
2124
+ }
2125
+ return newAttach;
2126
+ }
2127
+
2128
+ function flipAttachAxis(prop) {
2141
2129
  for (let i = 0; i < dirs.length; i++) {
2142
2130
  const index = dirs[i].indexOf(prop);
2143
2131
  if (~index) {
@@ -2146,13 +2134,17 @@
2146
2134
  }
2147
2135
  }
2148
2136
 
2137
+ function flipOffset(offset, i) {
2138
+ offset = [...offset];
2139
+ offset[i] *= -1;
2140
+ return offset;
2141
+ }
2142
+
2149
2143
  var util = /*#__PURE__*/Object.freeze({
2150
2144
  __proto__: null,
2151
2145
  ajax: ajax,
2152
2146
  getImage: getImage,
2153
- transition: transition,
2154
2147
  Transition: Transition,
2155
- animate: animate$1,
2156
2148
  Animation: Animation,
2157
2149
  attr: attr,
2158
2150
  hasAttr: hasAttr,
@@ -2282,7 +2274,6 @@
2282
2274
  findAll: findAll,
2283
2275
  escape: escape,
2284
2276
  css: css,
2285
- getCssVar: getCssVar,
2286
2277
  propName: propName,
2287
2278
  isInView: isInView,
2288
2279
  scrollIntoView: scrollIntoView,
@@ -2458,7 +2449,11 @@
2458
2449
  }
2459
2450
 
2460
2451
  if (write && result !== false) {
2461
- fastdom.write(() => write.call(this, this._data, types));
2452
+ fastdom.write(() => {
2453
+ if (this._connected) {
2454
+ write.call(this, this._data, types);
2455
+ }
2456
+ });
2462
2457
  }
2463
2458
  }
2464
2459
  }
@@ -2607,7 +2602,7 @@
2607
2602
 
2608
2603
  value = props[key] === Boolean && value === '' ? true : coerce$1(props[key], value);
2609
2604
 
2610
- if (prop === 'target' && (!value || startsWith(value, '_'))) {
2605
+ if (prop === 'target' && startsWith(value, '_')) {
2611
2606
  continue;
2612
2607
  }
2613
2608
 
@@ -2618,7 +2613,7 @@
2618
2613
 
2619
2614
  for (const key in options) {
2620
2615
  const prop = camelize(key);
2621
- if (props[prop] !== undefined) {
2616
+ if (!isUndefined(props[prop])) {
2622
2617
  data$1[prop] = coerce$1(props[prop], options[key]);
2623
2618
  }
2624
2619
  }
@@ -2947,7 +2942,7 @@
2947
2942
  UIkit.data = '__uikit__';
2948
2943
  UIkit.prefix = 'uk-';
2949
2944
  UIkit.options = {};
2950
- UIkit.version = '3.14.4-dev.2dc50ec60';
2945
+ UIkit.version = '3.14.4-dev.3c3ec2cad';
2951
2946
 
2952
2947
  globalAPI(UIkit);
2953
2948
  hooksAPI(UIkit);
@@ -3052,27 +3047,7 @@
3052
3047
  origin: false,
3053
3048
  transition: 'ease',
3054
3049
  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
-
3050
+ clsLeave: 'uk-togglabe-leave' },
3076
3051
 
3077
3052
 
3078
3053
  computed: {
@@ -3081,7 +3056,7 @@
3081
3056
  },
3082
3057
 
3083
3058
  hasTransition(_ref2) {let { animation } = _ref2;
3084
- return startsWith(animation[0], 'slide');
3059
+ return ['slide', 'reveal'].some((transition) => startsWith(animation[0], transition));
3085
3060
  } },
3086
3061
 
3087
3062
 
@@ -3174,122 +3149,107 @@
3174
3149
  };
3175
3150
  }
3176
3151
 
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
-
3152
+ function toggleTransition(cmp) {var _cmp$animation$;
3153
+ const [mode = 'reveal', startProp = 'top'] = ((_cmp$animation$ = cmp.animation[0]) == null ? void 0 : _cmp$animation$.split('-')) || [];
3190
3154
 
3155
+ const dirs = [
3156
+ ['left', 'right'],
3157
+ ['top', 'bottom']];
3191
3158
 
3159
+ const dir = dirs[includes(dirs[0], startProp) ? 0 : 1];
3160
+ const end = dir[1] === startProp;
3161
+ const props = ['width', 'height'];
3162
+ const dimProp = props[dirs.indexOf(dir)];
3163
+ const marginProp = "margin-" + dir[0];
3164
+ const marginStartProp = "margin-" + startProp;
3192
3165
 
3166
+ return async (el, show) => {
3167
+ let { duration, velocity, transition, _toggle } = cmp;
3193
3168
 
3169
+ let currentDim = dimensions$1(el)[dimProp];
3194
3170
 
3195
- {let { isToggled, duration, velocity, initProps, hideProps, transition, _toggle } = _ref4;
3196
- return (el, show) => {
3197
3171
  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;
3172
+ await Transition.cancel(el);
3204
3173
 
3205
- const props = inProgress ? css(el, Object.keys(initProps)) : show ? hideProps : initProps;
3206
-
3207
- Transition.cancel(el);
3208
-
3209
- if (!isToggled(el)) {
3174
+ if (show) {
3210
3175
  _toggle(el, true);
3211
3176
  }
3212
3177
 
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.offsetParent);
3249
- css(scrollElement, 'overflowX', 'hidden');
3250
-
3251
- if (!isToggled(el)) {
3252
- _toggle(el, true);
3253
- }
3178
+ const prevProps = Object.fromEntries(
3179
+ [
3180
+ 'padding',
3181
+ 'border',
3182
+ 'width',
3183
+ 'height',
3184
+ 'overflowY',
3185
+ 'overflowX',
3186
+ marginProp,
3187
+ marginStartProp].
3188
+ map((key) => [key, el.style[key]]));
3189
+
3190
+
3191
+ const dim = dimensions$1(el);
3192
+ const currentMargin = toFloat(css(el, marginProp));
3193
+ const marginStart = toFloat(css(el, marginStartProp));
3194
+ const endDim = dim[dimProp] + marginStart;
3195
+
3196
+ if (!inProgress && !show) {
3197
+ currentDim += marginStart;
3198
+ }
3199
+
3200
+ const [wrapper] = wrapInner(el, '<div>');
3201
+ css(wrapper, {
3202
+ boxSizing: 'border-box',
3203
+ height: dim.height,
3204
+ width: dim.width,
3205
+ ...css(el, [
3206
+ 'overflow',
3207
+ 'padding',
3208
+ 'borderTop',
3209
+ 'borderRight',
3210
+ 'borderBottom',
3211
+ 'borderLeft',
3212
+ 'borderImage',
3213
+ marginStartProp]) });
3254
3214
 
3255
- const width = toFloat(css(el, 'width'));
3256
- duration = velocity * width + duration;
3257
3215
 
3258
- const percent = visible ? (width + marginLeft * (right ? -1 : 1)) / width * 100 : 0;
3259
3216
 
3260
3217
  css(el, {
3261
- clipPath: right ? "polygon(0 0," +
3262
- percent + "% 0," + percent + "% 100%,0 100%)" : "polygon(" + (
3263
- 100 - percent) + "% 0,100% 0,100% 100%," + (100 - percent) + "% 100%)",
3264
- marginLeft: (100 - percent) * (right ? 1 : -1) / 100 * width });
3265
-
3218
+ padding: 0,
3219
+ border: 0,
3220
+ minWidth: 0,
3221
+ minHeight: 0,
3222
+ [marginStartProp]: 0,
3223
+ width: dim.width,
3224
+ height: dim.height,
3225
+ overflow: 'hidden',
3226
+ [dimProp]: currentDim });
3266
3227
 
3267
- return (
3268
- show ?
3269
- Transition.start(
3270
- el,
3271
- {
3272
- clipPath: "polygon(0 0,100% 0,100% 100%,0 100%)",
3273
- marginLeft: 0 },
3274
3228
 
3275
- duration * (1 - percent / 100),
3276
- transition) :
3229
+ const percent = currentDim / endDim;
3230
+ duration = (velocity * endDim + duration) * (show ? 1 - percent : percent);
3231
+ const endProps = { [dimProp]: show ? endDim : 0 };
3277
3232
 
3278
- Transition.start(
3279
- el,
3280
- {
3281
- clipPath: right ? "polygon(0 0,0 0,0 100%,0 100%)" : "polygon(100% 0,100% 0,100% 100%,100% 100%)",
3233
+ if (end) {
3234
+ css(el, marginProp, endDim - currentDim + currentMargin);
3235
+ endProps[marginProp] = show ? currentMargin : endDim + currentMargin;
3236
+ }
3282
3237
 
3238
+ if (!end ^ mode === 'reveal') {
3239
+ css(wrapper, marginProp, -endDim + currentDim);
3240
+ Transition.start(wrapper, { [marginProp]: show ? 0 : -endDim }, duration, transition);
3241
+ }
3283
3242
 
3284
- marginLeft: (right ? 1 : -1) * width },
3243
+ try {
3244
+ await Transition.start(el, endProps, duration, transition);
3245
+ } finally {
3246
+ css(el, prevProps);
3247
+ unwrap(wrapper.firstChild);
3285
3248
 
3286
- duration * (percent / 100),
3287
- transition).
3288
- then(() => _toggle(el, false))).
3289
- then(() => {
3290
- css(scrollElement, 'overflowX', '');
3291
- css(el, { clipPath: '', marginLeft: '' });
3292
- });
3249
+ if (!show) {
3250
+ _toggle(el, false);
3251
+ }
3252
+ }
3293
3253
  };
3294
3254
  }
3295
3255
 
@@ -3314,6 +3274,7 @@
3314
3274
  mixins: [Class, Lazyload, Togglable],
3315
3275
 
3316
3276
  props: {
3277
+ animation: Boolean,
3317
3278
  targets: String,
3318
3279
  active: null,
3319
3280
  collapsible: Boolean,
@@ -3326,7 +3287,7 @@
3326
3287
  data: {
3327
3288
  targets: '> *',
3328
3289
  active: false,
3329
- animation: ['slide'],
3290
+ animation: true,
3330
3291
  collapsible: true,
3331
3292
  multiple: false,
3332
3293
  clsOpen: 'uk-open',
@@ -3372,7 +3333,7 @@
3372
3333
  hide(
3373
3334
  el,
3374
3335
  !hasClass(
3375
- this.items.find((item) => item.contains(el)),
3336
+ this.items.find((item) => within(el, item)),
3376
3337
  this.clsOpen));
3377
3338
 
3378
3339
 
@@ -3424,23 +3385,15 @@
3424
3385
  toggleClass(el, this.clsOpen, show);
3425
3386
  attr($(this.$props.toggle, el), 'aria-expanded', show);
3426
3387
 
3427
- const content = $("" + (el._wrapper ? '> * ' : '') + this.content, el);
3388
+ const content = $(this.content, el);
3428
3389
 
3429
- if (animate === false || !this.hasTransition) {
3390
+ if (animate === false || !this.animation) {
3391
+ content.hidden = !show;
3430
3392
  hide(content, !show);
3431
3393
  return;
3432
3394
  }
3433
3395
 
3434
- if (!el._wrapper) {
3435
- el._wrapper = wrapAll(content, "<div" + (show ? ' hidden' : '') + ">");
3436
- }
3437
-
3438
- hide(content, false);
3439
- await slide$1(this)(el._wrapper, show);
3440
- hide(content, !show);
3441
-
3442
- delete el._wrapper;
3443
- unwrap(content);
3396
+ await toggleTransition(this)(content, show);
3444
3397
 
3445
3398
  if (show) {
3446
3399
  const toggle = $(this.$props.toggle, el);
@@ -3466,18 +3419,17 @@
3466
3419
  args: 'animation',
3467
3420
 
3468
3421
  props: {
3422
+ animation: Boolean,
3469
3423
  close: String },
3470
3424
 
3471
3425
 
3472
3426
  data: {
3473
- animation: ['slide'],
3427
+ animation: true,
3474
3428
  selClose: '.uk-alert-close',
3475
- duration: 150,
3476
- hideProps: { opacity: 0, ...Togglable.data.hideProps } },
3429
+ duration: 150 },
3477
3430
 
3478
3431
 
3479
- events: [
3480
- {
3432
+ events: {
3481
3433
  name: 'click',
3482
3434
 
3483
3435
  delegate() {
@@ -3487,16 +3439,39 @@
3487
3439
  handler(e) {
3488
3440
  e.preventDefault();
3489
3441
  this.close();
3490
- } }],
3491
-
3442
+ } },
3492
3443
 
3493
3444
 
3494
3445
  methods: {
3495
3446
  async close() {
3496
- await this.toggleElement(this.$el);
3447
+ await this.toggleElement(this.$el, false, animate$1(this));
3497
3448
  this.$destroy(true);
3498
3449
  } } };
3499
3450
 
3451
+
3452
+
3453
+ function animate$1(_ref) {let { duration, transition, velocity } = _ref;
3454
+ return (el) => {
3455
+ const height = toFloat(css(el, 'height'));
3456
+ css(el, 'height', height);
3457
+ return Transition.start(
3458
+ el,
3459
+ {
3460
+ height: 0,
3461
+ marginTop: 0,
3462
+ marginBottom: 0,
3463
+ paddingTop: 0,
3464
+ paddingBottom: 0,
3465
+ borderTop: 0,
3466
+ borderBottom: 0,
3467
+ opacity: 0 },
3468
+
3469
+ velocity * height + duration,
3470
+ transition);
3471
+
3472
+ };
3473
+ }
3474
+
3500
3475
  var Video = {
3501
3476
  args: 'autoplay',
3502
3477
 
@@ -3645,13 +3620,17 @@
3645
3620
  props: {
3646
3621
  pos: String,
3647
3622
  offset: null,
3648
- flip: Boolean },
3623
+ flip: Boolean,
3624
+ shift: Boolean,
3625
+ inset: Boolean },
3649
3626
 
3650
3627
 
3651
3628
  data: {
3652
3629
  pos: "bottom-" + (isRtl ? 'right' : 'left'),
3630
+ offset: false,
3653
3631
  flip: true,
3654
- offset: false },
3632
+ shift: true,
3633
+ inset: false },
3655
3634
 
3656
3635
 
3657
3636
  connected() {
@@ -3663,17 +3642,19 @@
3663
3642
  methods: {
3664
3643
  positionAt(element, target, boundary) {
3665
3644
  let offset = [this.getPositionOffset(element), this.getShiftOffset(element)];
3645
+ const placement = [this.flip && 'flip', this.shift && 'shift'];
3666
3646
 
3667
3647
  const attach = {
3668
- element: [flipPosition(this.dir), this.align],
3648
+ element: [this.inset ? this.dir : flipPosition(this.dir), this.align],
3669
3649
  target: [this.dir, this.align] };
3670
3650
 
3671
3651
 
3672
3652
  if (this.axis === 'y') {
3673
3653
  for (const prop in attach) {
3674
- attach[prop] = attach[prop].reverse();
3654
+ attach[prop].reverse();
3675
3655
  }
3676
- offset = offset.reverse();
3656
+ offset.reverse();
3657
+ placement.reverse();
3677
3658
  }
3678
3659
 
3679
3660
  const [scrollElement] = scrollParents(element, /auto|scroll/);
@@ -3683,22 +3664,14 @@
3683
3664
  const elDim = dimensions$1(element);
3684
3665
  css(element, { top: -elDim.height, left: -elDim.width });
3685
3666
 
3686
- const args = [
3687
- element,
3688
- target,
3689
- {
3667
+ positionAt(element, target, {
3690
3668
  attach,
3691
3669
  offset,
3692
3670
  boundary,
3693
- flip: this.flip,
3694
- viewportOffset: this.getViewportOffset(element) }];
3695
-
3671
+ placement,
3672
+ viewportOffset: this.getViewportOffset(element) });
3696
3673
 
3697
3674
 
3698
- trigger(element, 'beforeposition', args);
3699
-
3700
- positionAt(...args);
3701
-
3702
3675
  // Restore scroll position
3703
3676
  scrollElement.scrollTop = scrollTop;
3704
3677
  scrollElement.scrollLeft = scrollLeft;
@@ -3707,27 +3680,38 @@
3707
3680
  getPositionOffset(element) {
3708
3681
  return (
3709
3682
  toPx(
3710
- this.offset === false ? getCssVar('position-offset', element) : this.offset,
3683
+ this.offset === false ? css(element, '--uk-position-offset') : this.offset,
3711
3684
  this.axis === 'x' ? 'width' : 'height',
3712
3685
  element) * (
3713
- includes(['left', 'top'], this.dir) ? -1 : 1));
3686
+
3687
+ includes(['left', 'top'], this.dir) ? -1 : 1) * (
3688
+ this.inset ? -1 : 1));
3714
3689
 
3715
3690
  },
3716
3691
 
3717
3692
  getShiftOffset(element) {
3718
- return includes(['center', 'justify', 'stretch'], this.align) ?
3693
+ return this.align === 'center' ?
3719
3694
  0 :
3720
3695
  toPx(
3721
- getCssVar('position-shift-offset', element),
3696
+ css(element, '--uk-position-shift-offset'),
3722
3697
  this.axis === 'y' ? 'width' : 'height',
3723
3698
  element) * (
3724
3699
  includes(['left', 'top'], this.align) ? 1 : -1);
3725
3700
  },
3726
3701
 
3727
3702
  getViewportOffset(element) {
3728
- return toPx(getCssVar('position-viewport-offset', element));
3703
+ return toPx(css(element, '--uk-position-viewport-offset'));
3729
3704
  } } };
3730
3705
 
3706
+ var Style = {
3707
+ beforeConnect() {
3708
+ this._style = attr(this.$el, 'style');
3709
+ },
3710
+
3711
+ disconnected() {
3712
+ attr(this.$el, 'style', this._style);
3713
+ } };
3714
+
3731
3715
  const active$1 = [];
3732
3716
 
3733
3717
  var Modal = {
@@ -3837,8 +3821,8 @@
3837
3821
 
3838
3822
 
3839
3823
  if (this.overlay) {
3840
- once(this.$el, 'hide', preventOverscroll(this.$el));
3841
- once(this.$el, 'hide', preventBackgroundScroll());
3824
+ once(this.$el, 'hidden', preventOverscroll(this.$el), { self: true });
3825
+ once(this.$el, 'hidden', preventBackgroundScroll(), { self: true });
3842
3826
  }
3843
3827
 
3844
3828
  if (this.stack) {
@@ -3920,10 +3904,6 @@
3920
3904
  active$1.splice(active$1.indexOf(this), 1);
3921
3905
  }
3922
3906
 
3923
- if (!active$1.length) {
3924
- css(document.body, 'overflowY', '');
3925
- }
3926
-
3927
3907
  css(this.$el, 'zIndex', '');
3928
3908
 
3929
3909
  if (!active$1.some((modal) => modal.clsPage === this.clsPage)) {
@@ -4040,16 +4020,22 @@
4040
4020
  return () => events.forEach((fn) => fn());
4041
4021
  }
4042
4022
 
4023
+ let prevented;
4043
4024
  function preventBackgroundScroll() {
4044
- const { body, documentElement } = document;
4045
- css(body, {
4046
- overflowY: width(window) > documentElement.clientWidth ? 'scroll' : '',
4047
- touchAction: 'none' });
4025
+ if (prevented) {
4026
+ return noop;
4027
+ }
4028
+ prevented = true;
4029
+
4030
+ const { scrollingElement } = document;
4031
+ css(scrollingElement, {
4032
+ overflowY: 'hidden',
4033
+ touchAction: 'none',
4034
+ paddingRight: width(window) - scrollingElement.clientWidth });
4048
4035
 
4049
- css(documentElement, 'overflowY', 'hidden');
4050
4036
  return () => {
4051
- css(documentElement, 'overflowY', '');
4052
- css(body, { overflowY: '', touchAction: '' });
4037
+ prevented = false;
4038
+ css(scrollingElement, { overflowY: '', touchAction: '', paddingRight: '' });
4053
4039
  };
4054
4040
  }
4055
4041
 
@@ -4066,7 +4052,7 @@
4066
4052
  let active;
4067
4053
 
4068
4054
  var drop = {
4069
- mixins: [Container, Lazyload, Position, Togglable],
4055
+ mixins: [Container, Lazyload, Position, Style, Togglable],
4070
4056
 
4071
4057
  args: 'pos',
4072
4058
 
@@ -4074,10 +4060,13 @@
4074
4060
  mode: 'list',
4075
4061
  toggle: Boolean,
4076
4062
  boundary: Boolean,
4077
- boundaryAlign: Boolean,
4063
+ target: Boolean,
4064
+ targetX: Boolean,
4065
+ targetY: Boolean,
4066
+ stretch: Boolean,
4078
4067
  delayShow: Number,
4079
4068
  delayHide: Number,
4080
- display: String,
4069
+ autoUpdate: Boolean,
4081
4070
  clsDrop: String,
4082
4071
  animateOut: Boolean,
4083
4072
  bgScroll: Boolean },
@@ -4086,17 +4075,32 @@
4086
4075
  data: {
4087
4076
  mode: ['click', 'hover'],
4088
4077
  toggle: '- *',
4089
- boundary: true,
4090
- boundaryAlign: false,
4078
+ boundary: false,
4079
+ target: false,
4080
+ targetX: false,
4081
+ targetY: false,
4082
+ stretch: false,
4091
4083
  delayShow: 0,
4092
4084
  delayHide: 800,
4093
- display: null,
4085
+ autoUpdate: true,
4094
4086
  clsDrop: false,
4087
+ animateOut: false,
4088
+ bgScroll: true,
4095
4089
  animation: ['uk-animation-fade'],
4096
4090
  cls: 'uk-open',
4097
- container: false,
4098
- animateOut: false,
4099
- bgScroll: true },
4091
+ container: false },
4092
+
4093
+
4094
+ computed: {
4095
+ target(_ref, $el) {let { target, targetX, targetY } = _ref;
4096
+ targetX = targetX || target || this.targetEl;
4097
+ targetY = targetY || target || this.targetEl;
4098
+
4099
+ return [
4100
+ targetX === true ? window : query(targetX, $el),
4101
+ targetY === true ? window : query(targetY, $el)];
4102
+
4103
+ } },
4100
4104
 
4101
4105
 
4102
4106
  created() {
@@ -4110,18 +4114,19 @@
4110
4114
  connected() {
4111
4115
  addClass(this.$el, this.clsDrop);
4112
4116
 
4113
- if (this.toggle && !this.target) {
4114
- this.target = this.$create('toggle', query(this.toggle, this.$el), {
4117
+ if (this.toggle && !this.targetEl) {
4118
+ this.targetEl = this.$create('toggle', query(this.toggle, this.$el), {
4115
4119
  target: this.$el,
4116
4120
  mode: this.mode }).
4117
4121
  $el;
4118
- attr(this.target, 'aria-haspopup', true);
4119
- this.lazyload(this.target);
4122
+ attr(this.targetEl, 'aria-haspopup', true);
4123
+ this.lazyload(this.targetEl);
4120
4124
  }
4121
4125
  },
4122
4126
 
4123
4127
  disconnected() {
4124
4128
  if (this.isActive()) {
4129
+ this.hide(false);
4125
4130
  active = null;
4126
4131
  }
4127
4132
  },
@@ -4147,7 +4152,7 @@
4147
4152
  return 'a[href^="#"]';
4148
4153
  },
4149
4154
 
4150
- handler(_ref) {let { defaultPrevented, current: { hash } } = _ref;
4155
+ handler(_ref2) {let { defaultPrevented, current: { hash } } = _ref2;
4151
4156
  if (!defaultPrevented && hash && !within(hash, this.$el)) {
4152
4157
  this.hide(false);
4153
4158
  }
@@ -4255,21 +4260,22 @@
4255
4260
 
4256
4261
  this.tracker.init();
4257
4262
 
4258
- for (const handler of [
4263
+ const update = () => this.$emit();
4264
+ const handlers = [
4259
4265
  on(
4260
4266
  document,
4261
4267
  pointerDown$1,
4262
- (_ref2) => {let { target } = _ref2;return (
4268
+ (_ref3) => {let { target } = _ref3;return (
4263
4269
  !within(target, this.$el) &&
4264
4270
  once(
4265
4271
  document,
4266
4272
  pointerUp$1 + " " + pointerCancel + " scroll",
4267
- (_ref3) => {let { defaultPrevented, type, target: newTarget } = _ref3;
4273
+ (_ref4) => {let { defaultPrevented, type, target: newTarget } = _ref4;
4268
4274
  if (
4269
4275
  !defaultPrevented &&
4270
4276
  type === pointerUp$1 &&
4271
4277
  target === newTarget &&
4272
- !(this.target && within(target, this.target)))
4278
+ !(this.targetEl && within(target, this.targetEl)))
4273
4279
  {
4274
4280
  this.hide(false);
4275
4281
  }
@@ -4284,29 +4290,28 @@
4284
4290
  }
4285
4291
  }),
4286
4292
 
4293
+ on(window, 'resize', update),
4294
+
4295
+ (() => {
4296
+ const observer = observeResize(
4297
+ scrollParents(this.$el).concat(this.targetEl),
4298
+ update);
4299
+
4300
+ return () => observer.disconnect();
4301
+ })(),
4302
+
4303
+ ...(this.autoUpdate ?
4304
+ [on([document, scrollParents(this.$el)], 'scroll', update)] :
4305
+ []),
4306
+
4287
4307
  ...(this.bgScroll ?
4288
4308
  [] :
4289
- [preventOverscroll(this.$el), preventBackgroundScroll()]),
4309
+ [preventOverscroll(this.$el), preventBackgroundScroll()])];
4310
+
4311
+
4312
+ once(this.$el, 'hide', () => handlers.forEach((handler) => handler()), {
4313
+ self: true });
4290
4314
 
4291
- ...(this.display === 'static' && this.align !== 'stretch' ?
4292
- [] :
4293
- (() => {
4294
- const handler = () => this.$emit();
4295
- return [
4296
- on(window, 'resize', handler),
4297
- on(document, 'scroll', handler, true),
4298
- (() => {
4299
- const observer = observeResize(
4300
- scrollParents(this.$el),
4301
- handler);
4302
-
4303
- return () => observer.disconnect();
4304
- })()];
4305
-
4306
- })())])
4307
- {
4308
- once(this.$el, 'hide', handler, { self: true });
4309
- }
4310
4315
  } },
4311
4316
 
4312
4317
 
@@ -4323,7 +4328,7 @@
4323
4328
  {
4324
4329
  name: 'hide',
4325
4330
 
4326
- handler(_ref4) {let { target } = _ref4;
4331
+ handler(_ref5) {let { target } = _ref5;
4327
4332
  if (this.$el !== target) {
4328
4333
  active =
4329
4334
  active === null && within(target, this.$el) && this.isToggled() ?
@@ -4347,12 +4352,12 @@
4347
4352
 
4348
4353
 
4349
4354
  methods: {
4350
- show(target, delay) {if (target === void 0) {target = this.target;}if (delay === void 0) {delay = true;}
4351
- if (this.isToggled() && target && this.target && target !== this.target) {
4355
+ show(target, delay) {if (target === void 0) {target = this.targetEl;}if (delay === void 0) {delay = true;}
4356
+ if (this.isToggled() && target && this.targetEl && target !== this.targetEl) {
4352
4357
  this.hide(false, false);
4353
4358
  }
4354
4359
 
4355
- this.target = target;
4360
+ this.targetEl = target;
4356
4361
 
4357
4362
  this.clearTimers();
4358
4363
 
@@ -4415,60 +4420,69 @@
4415
4420
 
4416
4421
  position() {
4417
4422
  removeClass(this.$el, this.clsDrop + "-stack");
4418
- toggleClass(this.$el, this.clsDrop + "-boundary", this.boundaryAlign);
4419
- toggleClass(this.$el, this.clsDrop + "-stretch", this.align === 'stretch');
4423
+ attr(this.$el, 'style', this._style);
4420
4424
 
4421
- const boundary = query(this.boundary, this.$el);
4422
- const target = boundary && this.boundaryAlign ? boundary : this.target;
4423
- const [scrollParent] = scrollParents(
4424
- boundary && this.boundaryAlign ? boundary : this.$el);
4425
+ // Ensure none positioned element does not generate scrollbars
4426
+ this.$el.hidden = true;
4425
4427
 
4426
- const scrollParentOffset = offset(scrollParent);
4427
- const boundaryOffset = boundary ? offset(boundary) : scrollParentOffset;
4428
+ const boundary = query(this.boundary, this.$el);
4429
+ const boundaryOffset = offset(boundary || window);
4430
+ const viewports = this.target.map((target) => offsetViewport(scrollParents(target)[0]));
4428
4431
  const viewportOffset = this.getViewportOffset(this.$el);
4429
4432
 
4430
- css(this.$el, 'maxWidth', '');
4431
- const maxWidth = scrollParentOffset.width - 2 * viewportOffset;
4433
+ const dirs = [
4434
+ [0, ['x', 'width', 'left', 'right']],
4435
+ [1, ['y', 'height', 'top', 'bottom']]];
4432
4436
 
4433
- if (this.align === 'justify') {
4434
- const prop = this.axis === 'y' ? 'width' : 'height';
4435
- css(
4436
- this.$el,
4437
- prop,
4438
- Math.min(
4439
- (boundary ? boundaryOffset : offset(this.target))[prop],
4440
- scrollParentOffset[prop] - 2 * viewportOffset));
4441
-
4442
-
4443
- } else if (this.align === 'stretch') {
4444
- this.flip = this.axis === 'y' ? 'x' : 'y';
4445
- this.display = 'static';
4446
-
4447
- const viewport = offsetViewport(scrollParent);
4448
- const targetDim = offset(target);
4449
- const elOffset = Math.abs(this.getPositionOffset(this.$el)) + viewportOffset;
4450
-
4451
- css(this.$el, {
4452
- width:
4453
- this.axis === 'y' ?
4454
- viewport.width :
4455
- (this.dir === 'left' ?
4456
- targetDim.left - viewport.left :
4457
- viewport.right - targetDim.right) - elOffset,
4458
- height:
4459
- this.axis === 'x' ?
4460
- viewport.height :
4461
- (this.dir === 'top' ?
4462
- targetDim.top - viewport.top :
4463
- viewport.bottom - targetDim.bottom) - elOffset });
4464
-
4465
- } else if (this.$el.offsetWidth > maxWidth) {
4437
+
4438
+ for (const [i, [axis, prop]] of dirs) {
4439
+ if (this.axis !== axis && includes([axis, true], this.stretch)) {
4440
+ css(this.$el, {
4441
+ [prop]: Math.min(
4442
+ boundaryOffset[prop],
4443
+ viewports[i][prop] - 2 * viewportOffset),
4444
+
4445
+ ["overflow-" + axis]: 'auto' });
4446
+
4447
+ }
4448
+ }
4449
+
4450
+ const maxWidth = viewports[0].width - 2 * viewportOffset;
4451
+
4452
+ if (this.$el.offsetWidth > maxWidth) {
4466
4453
  addClass(this.$el, this.clsDrop + "-stack");
4467
4454
  }
4468
4455
 
4469
4456
  css(this.$el, 'maxWidth', maxWidth);
4470
4457
 
4471
- this.positionAt(this.$el, target, boundary);
4458
+ this.$el.hidden = false;
4459
+
4460
+ this.positionAt(this.$el, this.target, boundary);
4461
+
4462
+ for (const [i, [axis, prop, start, end]] of dirs) {
4463
+ if (this.axis === axis && includes([axis, true], this.stretch)) {
4464
+ const positionOffset = Math.abs(this.getPositionOffset(this.$el));
4465
+ const targetOffset = offset(this.target[i]);
4466
+ const elOffset = offset(this.$el);
4467
+
4468
+ css(this.$el, {
4469
+ [prop]:
4470
+ (targetOffset[start] > elOffset[start] ?
4471
+ targetOffset[start] -
4472
+ Math.max(
4473
+ boundaryOffset[start],
4474
+ viewports[i][start] + viewportOffset) :
4475
+
4476
+ Math.min(
4477
+ boundaryOffset[end],
4478
+ viewports[i][end] - viewportOffset) -
4479
+ targetOffset[end]) - positionOffset,
4480
+ ["overflow-" + axis]: 'auto' });
4481
+
4482
+
4483
+ this.positionAt(this.$el, this.target, boundary);
4484
+ }
4485
+ }
4472
4486
  } } };
4473
4487
 
4474
4488
 
@@ -4965,8 +4979,11 @@
4965
4979
  let minHeight = '';
4966
4980
  const box = boxModelAdjust(this.$el, 'height', 'content-box');
4967
4981
 
4982
+ const { body, scrollingElement } = document;
4968
4983
  const [scrollElement] = scrollParents(this.$el, /auto|scroll/);
4969
- const { height: viewportHeight } = offsetViewport(scrollElement);
4984
+ const { height: viewportHeight } = offsetViewport(
4985
+ scrollElement === body ? scrollingElement : scrollElement);
4986
+
4970
4987
 
4971
4988
  if (this.expand) {
4972
4989
  minHeight = Math.max(
@@ -4976,7 +4993,6 @@
4976
4993
  0);
4977
4994
 
4978
4995
  } else {
4979
- const { body, scrollingElement } = document;
4980
4996
  const isScrollingElement =
4981
4997
  scrollingElement === scrollElement || body === scrollElement;
4982
4998
 
@@ -5238,7 +5254,7 @@
5238
5254
 
5239
5255
  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>";
5240
5256
 
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>";
5257
+ 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
5258
 
5243
5259
  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
5260
 
@@ -5599,7 +5615,7 @@
5599
5615
 
5600
5616
 
5601
5617
  connected() {
5602
- const media = toMedia(this.media);
5618
+ const media = toMedia(this.media, this.$el);
5603
5619
  this.matchMedia = true;
5604
5620
  if (media) {
5605
5621
  this.mediaObj = window.matchMedia(media);
@@ -5620,11 +5636,10 @@
5620
5636
  } };
5621
5637
 
5622
5638
 
5623
- function toMedia(value) {
5639
+ function toMedia(value, element) {
5624
5640
  if (isString(value)) {
5625
5641
  if (startsWith(value, '@')) {
5626
- const name = "breakpoint-" + value.substr(1);
5627
- value = toFloat(getCssVar(name));
5642
+ value = toFloat(css(element, "--uk-breakpoint-" + value.substr(1)));
5628
5643
  } else if (isNaN(value)) {
5629
5644
  return value;
5630
5645
  }
@@ -5649,7 +5664,7 @@
5649
5664
 
5650
5665
  computed: {
5651
5666
  fill(_ref) {let { fill } = _ref;
5652
- return fill || getCssVar('leader-fill-content');
5667
+ return fill || css(this.$el, '--uk-leader-fill-content');
5653
5668
  } },
5654
5669
 
5655
5670
 
@@ -5841,7 +5856,9 @@
5841
5856
  align: String,
5842
5857
  offset: Number,
5843
5858
  boundary: Boolean,
5844
- boundaryAlign: Boolean,
5859
+ target: Boolean,
5860
+ targetX: Boolean,
5861
+ targetY: Boolean,
5845
5862
  clsDrop: String,
5846
5863
  delayShow: Number,
5847
5864
  delayHide: Number,
@@ -5858,9 +5875,12 @@
5858
5875
  offset: undefined,
5859
5876
  delayShow: undefined,
5860
5877
  delayHide: undefined,
5861
- boundaryAlign: undefined,
5862
- flip: 'x',
5878
+ flip: false,
5879
+ shift: true,
5863
5880
  boundary: true,
5881
+ target: false,
5882
+ targetX: false,
5883
+ targetY: false,
5864
5884
  dropbar: false,
5865
5885
  dropbarAnchor: false,
5866
5886
  duration: 200,
@@ -5895,7 +5915,7 @@
5895
5915
  },
5896
5916
 
5897
5917
  watch(dropbar) {
5898
- addClass(dropbar, 'uk-navbar-dropbar');
5918
+ addClass(dropbar, 'uk-dropbar', 'uk-dropbar-top', 'uk-navbar-dropbar');
5899
5919
  },
5900
5920
 
5901
5921
  immediate: true },
@@ -5911,7 +5931,7 @@
5911
5931
 
5912
5932
  if (this.dropContainer !== $el) {
5913
5933
  for (const el of $$("." + clsDrop, this.dropContainer)) {var _this$getDropdown;
5914
- const target = (_this$getDropdown = this.getDropdown(el)) == null ? void 0 : _this$getDropdown.target;
5934
+ const target = (_this$getDropdown = this.getDropdown(el)) == null ? void 0 : _this$getDropdown.targetEl;
5915
5935
  if (!includes(dropdowns, el) && target && within(target, this.$el)) {
5916
5936
  dropdowns.push(el);
5917
5937
  }
@@ -5973,8 +5993,8 @@
5973
5993
  if (
5974
5994
  active &&
5975
5995
  includes(active.mode, 'hover') &&
5976
- active.target &&
5977
- !within(active.target, current) &&
5996
+ active.targetEl &&
5997
+ !within(active.targetEl, current) &&
5978
5998
  !active.isDelaying)
5979
5999
  {
5980
6000
  active.hide(false);
@@ -5996,7 +6016,7 @@
5996
6016
  if (keyCode === keyMap.DOWN && hasAttr(current, 'aria-expanded')) {
5997
6017
  e.preventDefault();
5998
6018
 
5999
- if (!active || active.target !== current) {
6019
+ if (!active || active.targetEl !== current) {
6000
6020
  current.click();
6001
6021
  once(this.dropContainer, 'show', (_ref8) => {let { target } = _ref8;return (
6002
6022
  focusFirstFocusableElement(target));});
@@ -6046,8 +6066,8 @@
6046
6066
  }
6047
6067
  }
6048
6068
 
6049
- if (keyCode === keyMap.ESC) {var _active$target;
6050
- active == null ? void 0 : (_active$target = active.target) == null ? void 0 : _active$target.focus();
6069
+ if (keyCode === keyMap.ESC) {var _active$targetEl;
6070
+ active == null ? void 0 : (_active$targetEl = active.targetEl) == null ? void 0 : _active$targetEl.focus();
6051
6071
  }
6052
6072
 
6053
6073
  handleNavItemNavigation(e, this.toggles, active);
@@ -6118,39 +6138,19 @@
6118
6138
  return;
6119
6139
  }
6120
6140
 
6121
- this._observer = observeResize(target, () =>
6122
- this.transitionTo(
6123
- offset(target).bottom -
6124
- offset(this.dropbar).top +
6125
- toFloat(css(target, 'marginBottom')),
6126
- target));
6127
-
6128
-
6129
- } },
6130
-
6131
-
6132
- {
6133
- name: 'beforeposition',
6134
-
6135
- el() {
6136
- return this.dropContainer;
6137
- },
6138
-
6139
- filter() {
6140
- return this.dropbar;
6141
- },
6142
-
6143
- handler(e, element, target, options) {
6144
- if (!this.isDropbarDrop(element)) {
6145
- return;
6146
- }
6147
-
6148
- const dropbarOffset = offset(this.dropbar);
6141
+ this._observer = observeResize(target, () => {
6142
+ const targetOffsets = parents(target, "." + this.clsDrop).
6143
+ concat(target).
6144
+ map((el) => offset(el));
6145
+ const minTop = Math.min(...targetOffsets.map((_ref11) => {let { top } = _ref11;return top;}));
6146
+ const maxBottom = Math.max(...targetOffsets.map((_ref12) => {let { bottom } = _ref12;return bottom;}));
6147
+ const dropbarOffset = offset(this.dropbar);
6148
+ css(this.dropbar, 'top', this.dropbar.offsetTop - (dropbarOffset.top - minTop));
6149
+ this.transitionTo(
6150
+ maxBottom - minTop + toFloat(css(target, 'marginBottom')),
6151
+ target);
6149
6152
 
6150
- css(element, 'maxWidth', dropbarOffset.width - options.viewportOffset * 2);
6151
-
6152
- options.offset[1] = dropbarOffset.top - offset(target).bottom;
6153
- options.viewportOffset += dropbarOffset.left;
6153
+ });
6154
6154
  } },
6155
6155
 
6156
6156
 
@@ -6171,7 +6171,7 @@
6171
6171
  if (
6172
6172
  matches(this.dropbar, ':hover') &&
6173
6173
  (active == null ? void 0 : active.$el) === e.target &&
6174
- !this.toggles.some((el) => active.target !== el && matches(el, ':focus')))
6174
+ !this.toggles.some((el) => active.targetEl !== el && matches(el, ':focus')))
6175
6175
  {
6176
6176
  e.preventDefault();
6177
6177
  }
@@ -6189,7 +6189,7 @@
6189
6189
  return this.dropbar;
6190
6190
  },
6191
6191
 
6192
- handler(_ref11) {let { target } = _ref11;
6192
+ handler(_ref13) {let { target } = _ref13;
6193
6193
  if (!this.isDropbarDrop(target)) {
6194
6194
  return;
6195
6195
  }
@@ -6207,7 +6207,7 @@
6207
6207
 
6208
6208
  methods: {
6209
6209
  getActive() {
6210
- return active && within(active.target, this.$el) && active;
6210
+ return includes(this.dropdowns, active == null ? void 0 : active.$el) && active;
6211
6211
  },
6212
6212
 
6213
6213
  transitionTo(newHeight, el) {
@@ -6240,15 +6240,14 @@
6240
6240
  },
6241
6241
 
6242
6242
  isDropbarDrop(el) {
6243
- const drop = this.getDropdown(el);
6244
- return drop && hasClass(el, this.clsDrop) && drop.align !== 'stretch';
6243
+ return this.getDropdown(el) && hasClass(el, this.clsDrop);
6245
6244
  } } };
6246
6245
 
6247
6246
 
6248
6247
 
6249
6248
  function handleNavItemNavigation(e, toggles, active) {
6250
6249
  const { current, keyCode } = e;
6251
- const target = (active == null ? void 0 : active.target) || current;
6250
+ const target = (active == null ? void 0 : active.targetEl) || current;
6252
6251
  const i = toggles.indexOf(target);
6253
6252
 
6254
6253
  // Left
@@ -6448,9 +6447,12 @@
6448
6447
  addClass(parent(this.panel), this.clsMode);
6449
6448
  }
6450
6449
 
6451
- addClass(document.body, this.clsContainer, this.clsFlip);
6452
- css(document.body, 'touch-action', 'pan-y pinch-zoom');
6450
+ const { body, scrollingElement } = document;
6451
+
6452
+ addClass(body, this.clsContainer, this.clsFlip);
6453
+ css(body, 'touch-action', 'pan-y pinch-zoom');
6453
6454
  css(this.$el, 'display', 'block');
6455
+ css(this.panel, 'maxWidth', scrollingElement.clientWidth);
6454
6456
  addClass(this.$el, this.clsOverlay);
6455
6457
  addClass(
6456
6458
  this.panel,
@@ -6458,8 +6460,8 @@
6458
6460
  this.mode === 'reveal' ? '' : this.clsMode);
6459
6461
 
6460
6462
 
6461
- height(document.body); // force reflow
6462
- addClass(document.body, this.clsContainerAnimation);
6463
+ height(body); // force reflow
6464
+ addClass(body, this.clsContainerAnimation);
6463
6465
 
6464
6466
  this.clsContainerAnimation && suppressUserScale();
6465
6467
  } },
@@ -6491,6 +6493,7 @@
6491
6493
  removeClass(this.panel, this.clsSidebarAnimation, this.clsMode);
6492
6494
  removeClass(this.$el, this.clsOverlay);
6493
6495
  css(this.$el, 'display', '');
6496
+ css(this.panel, 'maxWidth', '');
6494
6497
  removeClass(document.body, this.clsContainer, this.clsFlip);
6495
6498
  } },
6496
6499
 
@@ -6616,6 +6619,14 @@
6616
6619
  offset: 0 },
6617
6620
 
6618
6621
 
6622
+ connected() {
6623
+ registerClick(this);
6624
+ },
6625
+
6626
+ disconnected() {
6627
+ unregisterClick(this);
6628
+ },
6629
+
6619
6630
  methods: {
6620
6631
  async scrollTo(el) {
6621
6632
  el = el && $(el) || document.body;
@@ -6624,20 +6635,39 @@
6624
6635
  await scrollIntoView(el, { offset: this.offset });
6625
6636
  trigger(this.$el, 'scrolled', [this, el]);
6626
6637
  }
6627
- } },
6638
+ } } };
6628
6639
 
6629
6640
 
6630
- events: {
6631
- click(e) {
6632
- if (e.defaultPrevented) {
6633
- return;
6634
- }
6635
6641
 
6636
- e.preventDefault();
6637
- this.scrollTo(getTargetElement(this.$el));
6638
- } } };
6642
+ const components$2 = new Set();
6643
+ function registerClick(cmp) {
6644
+ if (!components$2.size) {
6645
+ on(document, 'click', clickHandler);
6646
+ }
6647
+
6648
+ components$2.add(cmp);
6649
+ }
6639
6650
 
6651
+ function unregisterClick(cmp) {
6652
+ components$2.delete(cmp);
6653
+
6654
+ if (!components$2.length) {
6655
+ off(document, 'click', clickHandler);
6656
+ }
6657
+ }
6658
+
6659
+ function clickHandler(e) {
6660
+ if (e.defaultPrevented) {
6661
+ return;
6662
+ }
6640
6663
 
6664
+ for (const component of components$2) {
6665
+ if (within(e.target, component.$el)) {
6666
+ e.preventDefault();
6667
+ component.scrollTo(getTargetElement(component.$el));
6668
+ }
6669
+ }
6670
+ }
6641
6671
 
6642
6672
  function getTargetElement(el) {
6643
6673
  return document.getElementById(decodeURIComponent(el.hash).substring(1));
@@ -7600,7 +7630,7 @@
7600
7630
 
7601
7631
 
7602
7632
  {
7603
- name: 'toggled',
7633
+ name: 'hide show',
7604
7634
 
7605
7635
  self: true,
7606
7636
 
@@ -7608,10 +7638,8 @@
7608
7638
  return this.target;
7609
7639
  },
7610
7640
 
7611
- handler(e, toggled) {
7612
- if (e.target === this.target[0]) {
7613
- this.updateAria(toggled);
7614
- }
7641
+ handler(_ref2) {let { type } = _ref2;
7642
+ this.updateAria(type === 'show');
7615
7643
  } },
7616
7644
 
7617
7645
 
@@ -9492,7 +9520,9 @@
9492
9520
  this.$mount(
9493
9521
  append(
9494
9522
  container, "<div class=\"" +
9495
- this.clsMsg + (this.status ? " " + this.clsMsg + "-" + this.status : '') + "\"> <a href class=\"" +
9523
+ this.clsMsg + (
9524
+ this.status ? " " + this.clsMsg + "-" + this.status : '') + "\" role=\"alert\"> <a href class=\"" +
9525
+
9496
9526
  this.clsClose + "\" data-uk-close></a> <div>" +
9497
9527
  this.message + "</div> </div>"));
9498
9528