uikit 3.17.12-dev.f1425d280 → 3.18.1-dev.edde0251f

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 (258) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/dist/css/uikit-core-rtl.css +577 -504
  3. package/dist/css/uikit-core-rtl.min.css +1 -1
  4. package/dist/css/uikit-core.css +577 -504
  5. package/dist/css/uikit-core.min.css +1 -1
  6. package/dist/css/uikit-rtl.css +600 -527
  7. package/dist/css/uikit-rtl.min.css +1 -1
  8. package/dist/css/uikit.css +600 -527
  9. package/dist/css/uikit.min.css +1 -1
  10. package/dist/js/components/countdown.js +2 -4
  11. package/dist/js/components/countdown.min.js +1 -1
  12. package/dist/js/components/filter.js +1 -1
  13. package/dist/js/components/filter.min.js +1 -1
  14. package/dist/js/components/lightbox-panel.js +71 -49
  15. package/dist/js/components/lightbox-panel.min.js +1 -1
  16. package/dist/js/components/lightbox.js +71 -49
  17. package/dist/js/components/lightbox.min.js +1 -1
  18. package/dist/js/components/notification.js +1 -1
  19. package/dist/js/components/notification.min.js +1 -1
  20. package/dist/js/components/parallax.js +11 -6
  21. package/dist/js/components/parallax.min.js +1 -1
  22. package/dist/js/components/slider-parallax.js +8 -3
  23. package/dist/js/components/slider-parallax.min.js +1 -1
  24. package/dist/js/components/slider.js +735 -37
  25. package/dist/js/components/slider.min.js +1 -1
  26. package/dist/js/components/slideshow-parallax.js +8 -3
  27. package/dist/js/components/slideshow-parallax.min.js +1 -1
  28. package/dist/js/components/slideshow.js +792 -129
  29. package/dist/js/components/slideshow.min.js +1 -1
  30. package/dist/js/components/sortable.js +7 -7
  31. package/dist/js/components/sortable.min.js +1 -1
  32. package/dist/js/components/tooltip.js +2 -8
  33. package/dist/js/components/tooltip.min.js +1 -1
  34. package/dist/js/components/upload.js +1 -1
  35. package/dist/js/components/upload.min.js +1 -1
  36. package/dist/js/uikit-core.js +284 -272
  37. package/dist/js/uikit-core.min.js +1 -1
  38. package/dist/js/uikit-icons.js +9 -4
  39. package/dist/js/uikit-icons.min.js +1 -1
  40. package/dist/js/uikit.js +478 -352
  41. package/dist/js/uikit.min.js +1 -1
  42. package/package.json +3 -3
  43. package/src/images/components/navbar-toggle-icon.svg +1 -1
  44. package/src/images/icons/arrow-up-right.svg +4 -0
  45. package/src/images/icons/git-branch.svg +4 -4
  46. package/src/images/icons/git-fork.svg +4 -4
  47. package/src/images/icons/link-external.svg +5 -0
  48. package/src/images/icons/signal.svg +3 -0
  49. package/src/images/icons/telegram.svg +3 -0
  50. package/src/images/icons/threads.svg +3 -0
  51. package/src/images/icons/x.svg +3 -0
  52. package/src/js/components/countdown.js +1 -3
  53. package/src/js/components/internal/slider-preload.js +6 -0
  54. package/src/js/components/lightbox-panel.js +2 -6
  55. package/src/js/components/parallax.js +1 -20
  56. package/src/js/components/slider.js +38 -18
  57. package/src/js/components/slideshow.js +14 -46
  58. package/src/js/components/sortable.js +7 -6
  59. package/src/js/components/tooltip.js +1 -7
  60. package/src/js/core/accordion.js +1 -1
  61. package/src/js/core/drop.js +3 -5
  62. package/src/js/core/dropnav.js +24 -20
  63. package/src/js/core/height-match.js +7 -3
  64. package/src/js/core/height-placeholder.js +32 -0
  65. package/src/js/core/icon.js +12 -5
  66. package/src/js/core/index.js +2 -0
  67. package/src/js/core/inverse.js +103 -0
  68. package/src/js/core/modal.js +13 -0
  69. package/src/js/core/navbar.js +32 -172
  70. package/src/js/core/responsive.js +2 -29
  71. package/src/js/core/sticky.js +45 -29
  72. package/src/js/mixin/modal.js +1 -1
  73. package/src/js/mixin/parallax.js +19 -0
  74. package/src/js/mixin/slider-autoplay.js +1 -3
  75. package/src/js/mixin/slider-drag.js +22 -19
  76. package/src/js/mixin/slider-nav.js +10 -1
  77. package/src/js/mixin/slider-parallax.js +138 -0
  78. package/src/js/mixin/slider-reactive.js +1 -1
  79. package/src/js/mixin/slider.js +25 -3
  80. package/src/js/util/animation.js +14 -14
  81. package/src/js/util/dom.js +2 -2
  82. package/src/js/util/mouse.js +8 -11
  83. package/src/js/{mixin/internal → util}/scroll.js +2 -2
  84. package/src/js/util/selector.js +4 -2
  85. package/src/js/util/style.js +3 -3
  86. package/src/js/util/viewport.js +8 -4
  87. package/src/less/components/align.less +2 -2
  88. package/src/less/components/animation.less +2 -2
  89. package/src/less/components/article.less +2 -2
  90. package/src/less/components/base.less +3 -3
  91. package/src/less/components/card.less +13 -6
  92. package/src/less/components/column.less +3 -3
  93. package/src/less/components/container.less +3 -3
  94. package/src/less/components/divider.less +2 -2
  95. package/src/less/components/dropbar.less +1 -1
  96. package/src/less/components/dropdown.less +1 -1
  97. package/src/less/components/dropnav.less +1 -1
  98. package/src/less/components/form.less +1 -1
  99. package/src/less/components/grid.less +3 -3
  100. package/src/less/components/height.less +1 -1
  101. package/src/less/components/icon.less +3 -3
  102. package/src/less/components/inverse.less +12 -0
  103. package/src/less/components/link.less +1 -1
  104. package/src/less/components/modal.less +3 -3
  105. package/src/less/components/nav.less +66 -0
  106. package/src/less/components/navbar.less +7 -11
  107. package/src/less/components/overlay.less +5 -0
  108. package/src/less/components/position.less +7 -7
  109. package/src/less/components/section.less +6 -5
  110. package/src/less/components/sticky.less +1 -1
  111. package/src/less/components/svg.less +3 -3
  112. package/src/less/components/tile.less +10 -0
  113. package/src/less/components/transition.less +9 -9
  114. package/src/less/components/utility.less +4 -4
  115. package/src/less/components/width.less +7 -7
  116. package/src/less/theme/alert.less +1 -1
  117. package/src/less/theme/align.less +1 -1
  118. package/src/less/theme/animation.less +1 -1
  119. package/src/less/theme/article.less +1 -1
  120. package/src/less/theme/background.less +1 -1
  121. package/src/less/theme/badge.less +1 -1
  122. package/src/less/theme/base.less +1 -1
  123. package/src/less/theme/breadcrumb.less +1 -1
  124. package/src/less/theme/button.less +1 -1
  125. package/src/less/theme/card.less +1 -1
  126. package/src/less/theme/close.less +1 -1
  127. package/src/less/theme/column.less +1 -1
  128. package/src/less/theme/comment.less +1 -1
  129. package/src/less/theme/container.less +1 -1
  130. package/src/less/theme/description-list.less +1 -1
  131. package/src/less/theme/divider.less +1 -1
  132. package/src/less/theme/dotnav.less +1 -1
  133. package/src/less/theme/drop.less +1 -1
  134. package/src/less/theme/dropbar.less +1 -1
  135. package/src/less/theme/dropdown.less +1 -1
  136. package/src/less/theme/form-range.less +1 -1
  137. package/src/less/theme/height.less +1 -1
  138. package/src/less/theme/icon.less +1 -1
  139. package/src/less/theme/iconnav.less +1 -1
  140. package/src/less/theme/inverse.less +1 -1
  141. package/src/less/theme/label.less +1 -1
  142. package/src/less/theme/leader.less +1 -1
  143. package/src/less/theme/lightbox.less +1 -1
  144. package/src/less/theme/margin.less +1 -1
  145. package/src/less/theme/modal.less +1 -1
  146. package/src/less/theme/nav.less +1 -1
  147. package/src/less/theme/navbar.less +3 -3
  148. package/src/less/theme/notification.less +1 -1
  149. package/src/less/theme/offcanvas.less +1 -1
  150. package/src/less/theme/overlay.less +1 -1
  151. package/src/less/theme/padding.less +1 -1
  152. package/src/less/theme/pagination.less +1 -1
  153. package/src/less/theme/position.less +1 -1
  154. package/src/less/theme/search.less +1 -1
  155. package/src/less/theme/spinner.less +1 -1
  156. package/src/less/theme/sticky.less +1 -1
  157. package/src/less/theme/tab.less +2 -2
  158. package/src/less/theme/table.less +1 -1
  159. package/src/less/theme/thumbnav.less +1 -1
  160. package/src/less/theme/tile.less +1 -1
  161. package/src/less/theme/tooltip.less +1 -1
  162. package/src/less/theme/totop.less +1 -1
  163. package/src/less/theme/transition.less +1 -1
  164. package/src/less/theme/utility.less +1 -1
  165. package/src/less/theme/variables.less +1 -1
  166. package/src/less/theme/width.less +1 -1
  167. package/src/less/uikit.less +1 -1
  168. package/src/scss/components/align.scss +2 -2
  169. package/src/scss/components/animation.scss +2 -2
  170. package/src/scss/components/base.scss +2 -2
  171. package/src/scss/components/card.scss +12 -6
  172. package/src/scss/components/column.scss +3 -3
  173. package/src/scss/components/container.scss +3 -3
  174. package/src/scss/components/divider.scss +2 -2
  175. package/src/scss/components/dropnav.scss +1 -1
  176. package/src/scss/components/form.scss +1 -1
  177. package/src/scss/components/grid.scss +3 -3
  178. package/src/scss/components/height.scss +1 -1
  179. package/src/scss/components/icon.scss +3 -3
  180. package/src/scss/components/inverse.scss +12 -0
  181. package/src/scss/components/modal.scss +3 -3
  182. package/src/scss/components/nav.scss +63 -0
  183. package/src/scss/components/navbar.scss +5 -8
  184. package/src/scss/components/overlay.scss +4 -0
  185. package/src/scss/components/position.scss +7 -7
  186. package/src/scss/components/section.scss +6 -5
  187. package/src/scss/components/sticky.scss +1 -1
  188. package/src/scss/components/svg.scss +3 -3
  189. package/src/scss/components/tile.scss +8 -0
  190. package/src/scss/components/transition.scss +9 -9
  191. package/src/scss/components/utility.scss +4 -4
  192. package/src/scss/components/width.scss +7 -7
  193. package/src/scss/mixins-theme.scss +10 -7
  194. package/src/scss/mixins.scss +7 -4
  195. package/src/scss/theme/alert.scss +1 -0
  196. package/src/scss/theme/align.scss +1 -1
  197. package/src/scss/theme/animation.scss +1 -1
  198. package/src/scss/theme/article.scss +1 -1
  199. package/src/scss/theme/background.scss +1 -1
  200. package/src/scss/theme/badge.scss +1 -1
  201. package/src/scss/theme/base.scss +1 -1
  202. package/src/scss/theme/breadcrumb.scss +1 -1
  203. package/src/scss/theme/button.scss +1 -1
  204. package/src/scss/theme/card.scss +1 -0
  205. package/src/scss/theme/close.scss +1 -1
  206. package/src/scss/theme/column.scss +1 -1
  207. package/src/scss/theme/comment.scss +1 -1
  208. package/src/scss/theme/container.scss +1 -1
  209. package/src/scss/theme/description-list.scss +1 -1
  210. package/src/scss/theme/divider.scss +1 -1
  211. package/src/scss/theme/dotnav.scss +1 -0
  212. package/src/scss/theme/drop.scss +1 -1
  213. package/src/scss/theme/dropbar.scss +1 -1
  214. package/src/scss/theme/dropdown.scss +1 -1
  215. package/src/scss/theme/form-range.scss +1 -1
  216. package/src/scss/theme/height.scss +1 -1
  217. package/src/scss/theme/icon.scss +1 -1
  218. package/src/scss/theme/iconnav.scss +1 -1
  219. package/src/scss/theme/inverse.scss +1 -1
  220. package/src/scss/theme/label.scss +1 -1
  221. package/src/scss/theme/leader.scss +1 -1
  222. package/src/scss/theme/lightbox.scss +1 -1
  223. package/src/scss/theme/margin.scss +1 -1
  224. package/src/scss/theme/modal.scss +1 -0
  225. package/src/scss/theme/nav.scss +1 -1
  226. package/src/scss/theme/navbar.scss +1 -1
  227. package/src/scss/theme/notification.scss +1 -1
  228. package/src/scss/theme/offcanvas.scss +1 -1
  229. package/src/scss/theme/overlay.scss +1 -1
  230. package/src/scss/theme/padding.scss +1 -1
  231. package/src/scss/theme/pagination.scss +1 -1
  232. package/src/scss/theme/position.scss +1 -1
  233. package/src/scss/theme/search.scss +1 -1
  234. package/src/scss/theme/spinner.scss +1 -1
  235. package/src/scss/theme/sticky.scss +1 -1
  236. package/src/scss/theme/tab.scss +1 -1
  237. package/src/scss/theme/table.scss +1 -0
  238. package/src/scss/theme/thumbnav.scss +1 -1
  239. package/src/scss/theme/tile.scss +1 -1
  240. package/src/scss/theme/tooltip.scss +1 -1
  241. package/src/scss/theme/totop.scss +1 -1
  242. package/src/scss/theme/transition.scss +1 -1
  243. package/src/scss/theme/utility.scss +1 -1
  244. package/src/scss/theme/variables.scss +1 -1
  245. package/src/scss/theme/width.scss +1 -1
  246. package/src/scss/uikit.scss +1 -1
  247. package/src/scss/variables-theme.scss +20 -5
  248. package/src/scss/variables.scss +20 -5
  249. package/tests/height.html +58 -1
  250. package/tests/icon.html +38 -10
  251. package/tests/nav.html +42 -0
  252. package/tests/navbar.html +1 -1
  253. package/tests/offcanvas.html +8 -8
  254. package/tests/search.html +300 -202
  255. package/tests/slider.html +58 -0
  256. package/tests/slideshow.html +66 -0
  257. package/tests/sticky-navbar.html +381 -23
  258. package/src/images/icons/pagekit.svg +0 -3
package/dist/js/uikit.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.17.12-dev.f1425d280 | https://www.getuikit.com | (c) 2014 - 2024 YOOtheme | MIT License */
1
+ /*! UIkit 3.18.1-dev.edde0251f | https://www.getuikit.com | (c) 2014 - 2024 YOOtheme | MIT License */
2
2
 
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
@@ -245,7 +245,7 @@
245
245
  }
246
246
  }
247
247
  }
248
- function removeClasses$1(element, clsRegex) {
248
+ function removeClasses(element, clsRegex) {
249
249
  clsRegex = new RegExp(clsRegex);
250
250
  for (const node of toNodes(element)) {
251
251
  node.classList.remove(...toArray(node.classList).filter((cls) => cls.match(clsRegex)));
@@ -402,7 +402,9 @@
402
402
  selector += `${selector ? "," : ""}${domPath(ctx)} ${sel}`;
403
403
  }
404
404
  }
405
- context = document;
405
+ if (!isDocument(context)) {
406
+ context = context.ownerDocument;
407
+ }
406
408
  }
407
409
  try {
408
410
  return context[queryFn](selector);
@@ -410,7 +412,7 @@
410
412
  return null;
411
413
  }
412
414
  }
413
- const selectorRe = /.*?[^\\](?:,|$)/g;
415
+ const selectorRe = /.*?[^\\](?![^(]*\))(?:,|$)/g;
414
416
  const splitSelector = memoize(
415
417
  (selector) => selector.match(selectorRe).map((selector2) => selector2.replace(/,$/, "").trim())
416
418
  );
@@ -576,8 +578,9 @@
576
578
  }
577
579
  return props;
578
580
  } else if (isObject(property)) {
579
- priority = value;
580
- each(property, (value2, property2) => css(element2, property2, value2, priority));
581
+ for (const prop in property) {
582
+ css(element2, prop, property[prop], value);
583
+ }
581
584
  }
582
585
  }
583
586
  return elements[0];
@@ -601,8 +604,8 @@
601
604
  }
602
605
 
603
606
  const clsTransition = "uk-transition";
604
- const clsTransitionEnd = "transitionend";
605
- const clsTransitionCanceled = "transitioncanceled";
607
+ const transitionEnd = "transitionend";
608
+ const transitionCanceled = "transitioncanceled";
606
609
  function transition$1(element, props, duration = 400, timing = "linear") {
607
610
  duration = Math.round(duration);
608
611
  return Promise.all(
@@ -614,10 +617,10 @@
614
617
  css(element2, name, value);
615
618
  }
616
619
  }
617
- const timer = setTimeout(() => trigger(element2, clsTransitionEnd), duration);
620
+ const timer = setTimeout(() => trigger(element2, transitionEnd), duration);
618
621
  once(
619
622
  element2,
620
- [clsTransitionEnd, clsTransitionCanceled],
623
+ [transitionEnd, transitionCanceled],
621
624
  ({ type }) => {
622
625
  clearTimeout(timer);
623
626
  removeClass(element2, clsTransition);
@@ -626,7 +629,7 @@
626
629
  transitionDuration: "",
627
630
  transitionTimingFunction: ""
628
631
  });
629
- type === clsTransitionCanceled ? reject() : resolve(element2);
632
+ type === transitionCanceled ? reject() : resolve(element2);
630
633
  },
631
634
  { self: true }
632
635
  );
@@ -644,11 +647,11 @@
644
647
  const Transition = {
645
648
  start: transition$1,
646
649
  async stop(element) {
647
- trigger(element, clsTransitionEnd);
650
+ trigger(element, transitionEnd);
648
651
  await Promise.resolve();
649
652
  },
650
653
  async cancel(element) {
651
- trigger(element, clsTransitionCanceled);
654
+ trigger(element, transitionCanceled);
652
655
  await Promise.resolve();
653
656
  },
654
657
  inProgress(element) {
@@ -656,22 +659,22 @@
656
659
  }
657
660
  };
658
661
  const animationPrefix = "uk-animation-";
659
- const clsAnimationEnd = "animationend";
660
- const clsAnimationCanceled = "animationcanceled";
662
+ const animationEnd = "animationend";
663
+ const animationCanceled = "animationcanceled";
661
664
  function animate$2(element, animation, duration = 200, origin, out) {
662
665
  return Promise.all(
663
666
  toNodes(element).map(
664
667
  (element2) => new Promise((resolve, reject) => {
665
- trigger(element2, clsAnimationCanceled);
666
- const timer = setTimeout(() => trigger(element2, clsAnimationEnd), duration);
668
+ trigger(element2, animationCanceled);
669
+ const timer = setTimeout(() => trigger(element2, animationEnd), duration);
667
670
  once(
668
671
  element2,
669
- [clsAnimationEnd, clsAnimationCanceled],
672
+ [animationEnd, animationCanceled],
670
673
  ({ type }) => {
671
674
  clearTimeout(timer);
672
- type === clsAnimationCanceled ? reject() : resolve(element2);
675
+ type === animationCanceled ? reject() : resolve(element2);
673
676
  css(element2, "animationDuration", "");
674
- removeClasses$1(element2, `${animationPrefix}\\S*`);
677
+ removeClasses(element2, `${animationPrefix}\\S*`);
675
678
  },
676
679
  { self: true }
677
680
  );
@@ -695,7 +698,7 @@
695
698
  return inProgressRe.test(attr(element, "class"));
696
699
  },
697
700
  cancel(element) {
698
- trigger(element, clsAnimationCanceled);
701
+ trigger(element, animationCanceled);
699
702
  }
700
703
  };
701
704
 
@@ -737,8 +740,8 @@
737
740
  }
738
741
  function wrapAll(element, structure) {
739
742
  structure = toNode(before(element, structure));
740
- while (structure.firstChild) {
741
- structure = structure.firstChild;
743
+ while (structure.firstElementChild) {
744
+ structure = structure.firstElementChild;
742
745
  }
743
746
  append(structure, element);
744
747
  return structure;
@@ -1005,10 +1008,7 @@
1005
1008
  return ~index && array.splice(index, 1);
1006
1009
  }
1007
1010
 
1008
- function MouseTracker() {
1009
- }
1010
- MouseTracker.prototype = {
1011
- positions: [],
1011
+ class MouseTracker {
1012
1012
  init() {
1013
1013
  this.positions = [];
1014
1014
  let position;
@@ -1022,17 +1022,17 @@
1022
1022
  this.positions.shift();
1023
1023
  }
1024
1024
  }, 50);
1025
- },
1025
+ }
1026
1026
  cancel() {
1027
1027
  var _a;
1028
1028
  (_a = this.unbind) == null ? void 0 : _a.call(this);
1029
1029
  clearInterval(this.interval);
1030
- },
1030
+ }
1031
1031
  movesTo(target) {
1032
- if (this.positions.length < 2) {
1032
+ if (!this.positions || this.positions.length < 2) {
1033
1033
  return false;
1034
1034
  }
1035
- const p = target.getBoundingClientRect();
1035
+ const p = dimensions$1(target);
1036
1036
  const { left, right, top, bottom } = p;
1037
1037
  const [prevPosition] = this.positions;
1038
1038
  const position = last(this.positions);
@@ -1055,7 +1055,7 @@
1055
1055
  return intersection && pointInRect(intersection, p);
1056
1056
  });
1057
1057
  }
1058
- };
1058
+ }
1059
1059
  function intersect([{ x: x1, y: y1 }, { x: x2, y: y2 }], [{ x: x3, y: y3 }, { x: x4, y: y4 }]) {
1060
1060
  const denominator = (y4 - y3) * (x2 - x1) - (x4 - x3) * (y2 - y1);
1061
1061
  if (denominator === 0) {
@@ -1268,7 +1268,7 @@
1268
1268
  const elementOffsetTop = offsetPosition(element)[0] - offsetPosition(scrollElement)[0];
1269
1269
  const start = Math.max(0, elementOffsetTop - viewportHeight + startOffset);
1270
1270
  const end = Math.min(maxScroll, elementOffsetTop + element.offsetHeight - endOffset);
1271
- return clamp((scrollTop - start) / (end - start));
1271
+ return start < end ? clamp((scrollTop - start) / (end - start)) : 1;
1272
1272
  }
1273
1273
  function scrollParents(element, scrollable = false, props = []) {
1274
1274
  const scrollEl = scrollingElement(element);
@@ -1308,7 +1308,7 @@
1308
1308
  ["height", "y", "top", "bottom"]
1309
1309
  ]) {
1310
1310
  if (isWindow(viewportElement)) {
1311
- viewportElement = window.document.documentElement;
1311
+ viewportElement = scrollElement.ownerDocument;
1312
1312
  } else {
1313
1313
  rect[start] += toFloat(css(viewportElement, `border-${start}-width`));
1314
1314
  }
@@ -1319,8 +1319,10 @@
1319
1319
  return rect;
1320
1320
  }
1321
1321
  function getCoveringElement(target) {
1322
- return target.ownerDocument.elementsFromPoint(offset(target).left, 0).find(
1323
- (el) => !el.contains(target) && (hasPosition(el, "fixed") && zIndex(
1322
+ const { left, width, top } = dimensions$1(target);
1323
+ return target.ownerDocument.elementsFromPoint(left + width / 2, top).find(
1324
+ (el) => !el.contains(target) && // If e.g. Offcanvas is not yet closed
1325
+ !hasClass(el, "uk-togglable-leave") && (hasPosition(el, "fixed") && zIndex(
1324
1326
  parents(target).reverse().find((parent2) => !parent2.contains(el) && !hasPosition(parent2, "static"))
1325
1327
  ) < zIndex(el) || hasPosition(el, "sticky") && parent(el).contains(target))
1326
1328
  );
@@ -1628,7 +1630,7 @@
1628
1630
  remove: remove$1,
1629
1631
  removeAttr: removeAttr,
1630
1632
  removeClass: removeClass,
1631
- removeClasses: removeClasses$1,
1633
+ removeClasses: removeClasses,
1632
1634
  replaceClass: replaceClass,
1633
1635
  scrollIntoView: scrollIntoView,
1634
1636
  scrollParent: scrollParent,
@@ -1690,9 +1692,7 @@
1690
1692
  },
1691
1693
  events: {
1692
1694
  name: "visibilitychange",
1693
- el() {
1694
- return document;
1695
- },
1695
+ el: () => document,
1696
1696
  handler() {
1697
1697
  if (document.hidden) {
1698
1698
  this.stop();
@@ -2435,20 +2435,6 @@
2435
2435
  return $("a,button", el) || el;
2436
2436
  }
2437
2437
 
2438
- var Container = {
2439
- props: {
2440
- container: Boolean
2441
- },
2442
- data: {
2443
- container: true
2444
- },
2445
- computed: {
2446
- container({ container }) {
2447
- return container === true && this.$container || container && $(container);
2448
- }
2449
- }
2450
- };
2451
-
2452
2438
  let prevented;
2453
2439
  function preventBackgroundScroll(el) {
2454
2440
  const off = on(
@@ -2458,8 +2444,8 @@
2458
2444
  if (e.targetTouches.length !== 1 || matches(e.target, 'input[type="range"')) {
2459
2445
  return;
2460
2446
  }
2461
- let { scrollHeight, clientHeight, scrollWidth, clientWidth } = scrollParent(e.target);
2462
- if (e.cancelable && clientHeight >= scrollHeight && clientWidth >= scrollWidth) {
2447
+ let { scrollHeight, clientHeight } = scrollParent(e.target);
2448
+ if (clientHeight >= scrollHeight && e.cancelable) {
2463
2449
  e.preventDefault();
2464
2450
  }
2465
2451
  },
@@ -2482,6 +2468,20 @@
2482
2468
  };
2483
2469
  }
2484
2470
 
2471
+ var Container = {
2472
+ props: {
2473
+ container: Boolean
2474
+ },
2475
+ data: {
2476
+ container: true
2477
+ },
2478
+ computed: {
2479
+ container({ container }) {
2480
+ return container === true && this.$container || container && $(container);
2481
+ }
2482
+ }
2483
+ };
2484
+
2485
2485
  var Togglable = {
2486
2486
  props: {
2487
2487
  cls: Boolean,
@@ -2999,9 +2999,7 @@
2999
2999
  events: [
3000
3000
  {
3001
3001
  name: "visibilitychange",
3002
- el() {
3003
- return document;
3004
- },
3002
+ el: () => document,
3005
3003
  filter() {
3006
3004
  return this.autoplay;
3007
3005
  },
@@ -3034,6 +3032,7 @@
3034
3032
  const pointerDown = "touchstart mousedown";
3035
3033
  const pointerMove = "touchmove mousemove";
3036
3034
  const pointerUp = "touchend touchcancel mouseup click input scroll";
3035
+ const preventClick = (e) => e.preventDefault();
3037
3036
  var SliderDrag = {
3038
3037
  props: {
3039
3038
  draggable: Boolean
@@ -3061,7 +3060,7 @@
3061
3060
  return `${this.selList} > *`;
3062
3061
  },
3063
3062
  handler(e) {
3064
- if (!this.draggable || !isTouch(e) && hasSelectableText(e.target) || e.target.closest(selInput) || e.button > 0 || this.length < 2) {
3063
+ if (!this.draggable || this.parallax || !isTouch(e) && hasSelectableText(e.target) || e.target.closest(selInput) || e.button > 0 || this.length < 2) {
3065
3064
  return;
3066
3065
  }
3067
3066
  this.start(e);
@@ -3105,20 +3104,22 @@
3105
3104
  if (distance === 0 || this.prevPos === this.pos || !this.dragging && Math.abs(distance) < this.threshold) {
3106
3105
  return;
3107
3106
  }
3108
- css(this.list, "pointerEvents", "none");
3107
+ if (!this.dragging) {
3108
+ on(this.list, "click", preventClick, pointerOptions);
3109
+ }
3109
3110
  e.cancelable && e.preventDefault();
3110
3111
  this.dragging = true;
3111
3112
  this.dir = distance < 0 ? 1 : -1;
3112
3113
  let { slides, prevIndex } = this;
3113
3114
  let dis = Math.abs(distance);
3114
3115
  let nextIndex = this.getIndex(prevIndex + this.dir);
3115
- let width = this._getDistance(prevIndex, nextIndex);
3116
+ let width = getDistance.call(this, prevIndex, nextIndex);
3116
3117
  while (nextIndex !== prevIndex && dis > width) {
3117
3118
  this.drag -= width * this.dir;
3118
3119
  prevIndex = nextIndex;
3119
3120
  dis -= width;
3120
3121
  nextIndex = this.getIndex(prevIndex + this.dir);
3121
- width = this._getDistance(prevIndex, nextIndex);
3122
+ width = getDistance.call(this, prevIndex, nextIndex);
3122
3123
  }
3123
3124
  this.percent = dis / width;
3124
3125
  const prev = slides[prevIndex];
@@ -3141,14 +3142,14 @@
3141
3142
  if (changed) {
3142
3143
  this.prevIndex = prevIndex;
3143
3144
  this.index = nextIndex;
3144
- !edge && trigger(prev, "beforeitemhide", [this]);
3145
+ if (!edge) {
3146
+ trigger(prev, "beforeitemhide", [this]);
3147
+ trigger(prev, "itemhide", [this]);
3148
+ }
3145
3149
  trigger(next, "beforeitemshow", [this]);
3146
- }
3147
- this._transitioner = this._translate(Math.abs(this.percent), prev, !edge && next);
3148
- if (changed) {
3149
- !edge && trigger(prev, "itemhide", [this]);
3150
3150
  trigger(next, "itemshow", [this]);
3151
3151
  }
3152
+ this._transitioner = this._translate(Math.abs(this.percent), prev, !edge && next);
3152
3153
  },
3153
3154
  end() {
3154
3155
  off(document, pointerMove, this.move, pointerOptions);
@@ -3172,14 +3173,15 @@
3172
3173
  );
3173
3174
  }
3174
3175
  }
3175
- css(this.list, { userSelect: "", pointerEvents: "" });
3176
+ setTimeout(() => off(this.list, "click", preventClick, pointerOptions));
3177
+ css(this.list, { userSelect: "" });
3176
3178
  this.drag = this.percent = null;
3177
- },
3178
- _getDistance(prev, next) {
3179
- return this._getTransitioner(prev, prev !== next && next).getDistance() || this.slides[prev].offsetWidth;
3180
3179
  }
3181
3180
  }
3182
3181
  };
3182
+ function getDistance(prev, next) {
3183
+ return this._getTransitioner(prev, prev !== next && next).getDistance() || this.slides[prev].offsetWidth;
3184
+ }
3183
3185
  function hasSelectableText(el) {
3184
3186
  return css(el, "userSelect") !== "none" && toArray(el.childNodes).some((el2) => el2.nodeType === 3 && el2.textContent.trim());
3185
3187
  }
@@ -3514,7 +3516,7 @@
3514
3516
  };
3515
3517
  App.util = util;
3516
3518
  App.options = {};
3517
- App.version = "3.17.12-dev.f1425d280";
3519
+ App.version = "3.18.1-dev.edde0251f";
3518
3520
 
3519
3521
  const PREFIX = "uk-";
3520
3522
  const DATA = "__uikit__";
@@ -3782,6 +3784,9 @@
3782
3784
  delegate() {
3783
3785
  return this.selNavItem;
3784
3786
  },
3787
+ filter() {
3788
+ return !this.parallax;
3789
+ },
3785
3790
  handler(e) {
3786
3791
  if (e.target.closest("a,button") && (e.type === "click" || e.keyCode === keyMap.SPACE)) {
3787
3792
  e.preventDefault();
@@ -3798,6 +3803,9 @@
3798
3803
  delegate() {
3799
3804
  return this.selNavItem;
3800
3805
  },
3806
+ filter() {
3807
+ return !this.parallax;
3808
+ },
3801
3809
  handler(e) {
3802
3810
  const { current, keyCode } = e;
3803
3811
  const cmd = data(current, this.attrItem);
@@ -3822,9 +3830,10 @@
3822
3830
  const item = toNumber(cmd);
3823
3831
  const active = item === index;
3824
3832
  toggleClass(el, this.clsActive, active);
3833
+ toggleClass(button, "uk-disabled", this.parallax);
3825
3834
  attr(button, {
3826
3835
  "aria-selected": active,
3827
- tabindex: active ? null : -1
3836
+ tabindex: active && !this.parallax ? null : -1
3828
3837
  });
3829
3838
  if (active && button && matches(parent(el), ":focus-within")) {
3830
3839
  button.focus();
@@ -3844,7 +3853,7 @@
3844
3853
  var Slider = {
3845
3854
  mixins: [SliderAutoplay, SliderDrag, SliderNav, I18n],
3846
3855
  props: {
3847
- clsActivated: Boolean,
3856
+ clsActivated: String,
3848
3857
  easing: String,
3849
3858
  index: Number,
3850
3859
  finite: Boolean,
@@ -3859,7 +3868,10 @@
3859
3868
  stack: [],
3860
3869
  percent: 0,
3861
3870
  clsActive: "uk-active",
3862
- clsActivated: false,
3871
+ clsActivated: "",
3872
+ clsEnter: "uk-slide-enter",
3873
+ clsLeave: "uk-slide-leave",
3874
+ clsSlideActive: "uk-slide-active",
3863
3875
  Transitioner: false,
3864
3876
  transitionOptions: {}
3865
3877
  }),
@@ -3892,10 +3904,24 @@
3892
3904
  }
3893
3905
  },
3894
3906
  observe: resize(),
3907
+ events: {
3908
+ itemshow({ target }) {
3909
+ addClass(target, this.clsEnter, this.clsSlideActive);
3910
+ },
3911
+ itemshown({ target }) {
3912
+ removeClass(target, this.clsEnter);
3913
+ },
3914
+ itemhide({ target }) {
3915
+ addClass(target, this.clsLeave);
3916
+ },
3917
+ itemhidden({ target }) {
3918
+ removeClass(target, this.clsLeave, this.clsSlideActive);
3919
+ }
3920
+ },
3895
3921
  methods: {
3896
3922
  show(index, force = false) {
3897
3923
  var _a;
3898
- if (this.dragging || !this.length) {
3924
+ if (this.dragging || !this.length || this.parallax) {
3899
3925
  return;
3900
3926
  }
3901
3927
  const { stack } = this;
@@ -4110,9 +4136,7 @@
4110
4136
  {
4111
4137
  name: "shown",
4112
4138
  self: true,
4113
- handler() {
4114
- this.showControls();
4115
- }
4139
+ handler: "showControls"
4116
4140
  },
4117
4141
  {
4118
4142
  name: "hide",
@@ -4132,9 +4156,7 @@
4132
4156
  },
4133
4157
  {
4134
4158
  name: "keyup",
4135
- el() {
4136
- return document;
4137
- },
4159
+ el: () => document,
4138
4160
  handler({ keyCode }) {
4139
4161
  if (!this.isToggled(this.$el) || !this.draggable) {
4140
4162
  return;
@@ -4803,6 +4825,9 @@
4803
4825
  return data;
4804
4826
  }, {});
4805
4827
  }
4828
+ function ease(percent, easing) {
4829
+ return easing >= 0 ? Math.pow(percent, easing + 1) : 1 - Math.pow(1 - percent, 1 - easing);
4830
+ }
4806
4831
 
4807
4832
  var parallax = {
4808
4833
  mixins: [Parallax],
@@ -4868,17 +4893,122 @@
4868
4893
  events: ["scroll", "resize"]
4869
4894
  }
4870
4895
  };
4871
- function ease(percent, easing) {
4872
- return easing >= 0 ? Math.pow(percent, easing + 1) : 1 - Math.pow(1 - percent, 1 - easing);
4873
- }
4874
4896
  function getOffsetElement(el) {
4875
4897
  return el ? "offsetTop" in el ? el : getOffsetElement(parent(el)) : document.documentElement;
4876
4898
  }
4877
4899
 
4900
+ var SliderParallax = {
4901
+ props: {
4902
+ parallax: Boolean,
4903
+ parallaxTarget: Boolean,
4904
+ parallaxStart: String,
4905
+ parallaxEnd: String,
4906
+ parallaxEasing: Number
4907
+ },
4908
+ data: {
4909
+ parallax: false,
4910
+ parallaxTarget: false,
4911
+ parallaxStart: 0,
4912
+ parallaxEnd: 0,
4913
+ parallaxEasing: 0
4914
+ },
4915
+ observe: [
4916
+ resize({
4917
+ target: ({ $el, parallaxTarget }) => [$el, parallaxTarget],
4918
+ filter: ({ parallax }) => parallax
4919
+ }),
4920
+ scroll$1({ filter: ({ parallax }) => parallax })
4921
+ ],
4922
+ computed: {
4923
+ parallaxTarget({ parallaxTarget }, $el) {
4924
+ return parallaxTarget && query(parallaxTarget, $el) || this.list;
4925
+ }
4926
+ },
4927
+ update: {
4928
+ write() {
4929
+ if (!this.parallax) {
4930
+ return;
4931
+ }
4932
+ const target = this.parallaxTarget;
4933
+ const start = toPx(this.parallaxStart, "height", target, true);
4934
+ const end = toPx(this.parallaxEnd, "height", target, true);
4935
+ const percent = ease(scrolledOver(target, start, end), this.parallaxEasing);
4936
+ const [prevIndex, slidePercent] = this.getIndexAt(percent);
4937
+ const nextIndex = this.getValidIndex(prevIndex + Math.ceil(slidePercent));
4938
+ const prev = this.slides[prevIndex];
4939
+ const next = this.slides[nextIndex];
4940
+ const { triggerShow, triggerShown, triggerHide, triggerHidden } = useTriggers(this);
4941
+ if (~this.prevIndex) {
4942
+ for (const i of /* @__PURE__ */ new Set([this.index, this.prevIndex])) {
4943
+ if (!includes([nextIndex, prevIndex], i)) {
4944
+ triggerHide(this.slides[i]);
4945
+ triggerHidden(this.slides[i]);
4946
+ }
4947
+ }
4948
+ }
4949
+ const changed = this.prevIndex !== prevIndex || this.index !== nextIndex;
4950
+ this.dir = 1;
4951
+ this.prevIndex = prevIndex;
4952
+ this.index = nextIndex;
4953
+ if (prev !== next) {
4954
+ triggerHide(prev);
4955
+ }
4956
+ triggerShow(next);
4957
+ if (changed) {
4958
+ triggerShown(prev);
4959
+ }
4960
+ this._translate(prev === next ? 1 : slidePercent, prev, next);
4961
+ },
4962
+ events: ["scroll", "resize"]
4963
+ },
4964
+ methods: {
4965
+ getIndexAt(percent) {
4966
+ const index = percent * (this.length - 1);
4967
+ return [Math.floor(index), index % 1];
4968
+ }
4969
+ }
4970
+ };
4971
+ function useTriggers(cmp) {
4972
+ const { clsSlideActive, clsEnter, clsLeave } = cmp;
4973
+ return { triggerShow, triggerShown, triggerHide, triggerHidden };
4974
+ function triggerShow(el) {
4975
+ if (hasClass(el, clsLeave)) {
4976
+ triggerHide(el);
4977
+ triggerHidden(el);
4978
+ }
4979
+ if (!hasClass(el, clsSlideActive)) {
4980
+ trigger(el, "beforeitemshow", [cmp]);
4981
+ trigger(el, "itemshow", [cmp]);
4982
+ }
4983
+ }
4984
+ function triggerShown(el) {
4985
+ if (hasClass(el, clsEnter)) {
4986
+ trigger(el, "itemshown", [cmp]);
4987
+ }
4988
+ }
4989
+ function triggerHide(el) {
4990
+ if (!hasClass(el, clsSlideActive)) {
4991
+ triggerShow(el);
4992
+ }
4993
+ if (hasClass(el, clsEnter)) {
4994
+ triggerShown(el);
4995
+ }
4996
+ if (!hasClass(el, clsLeave)) {
4997
+ trigger(el, "beforeitemhide", [cmp]);
4998
+ trigger(el, "itemhide", [cmp]);
4999
+ }
5000
+ }
5001
+ function triggerHidden(el) {
5002
+ if (hasClass(el, clsLeave)) {
5003
+ trigger(el, "itemhidden", [cmp]);
5004
+ }
5005
+ }
5006
+ }
5007
+
4878
5008
  var SliderReactive = {
4879
5009
  update: {
4880
5010
  write() {
4881
- if (this.stack.length || this.dragging) {
5011
+ if (this.stack.length || this.dragging || this.parallax) {
4882
5012
  return;
4883
5013
  }
4884
5014
  const index = this.getValidIndex();
@@ -4896,7 +5026,12 @@
4896
5026
  observe: lazyload({
4897
5027
  target: ({ slides }) => slides,
4898
5028
  targets: (instance) => instance.getAdjacentSlides()
4899
- })
5029
+ }),
5030
+ methods: {
5031
+ getAdjacentSlides() {
5032
+ return [1, -1].map((i) => this.slides[this.getIndex(this.index + i)]);
5033
+ }
5034
+ }
4900
5035
  };
4901
5036
 
4902
5037
  function Transitioner(prev, next, dir, { center, easing, list }) {
@@ -5020,7 +5155,7 @@
5020
5155
  }
5021
5156
 
5022
5157
  var slider = {
5023
- mixins: [Class, Slider, SliderReactive, SliderPreload],
5158
+ mixins: [Class, Slider, SliderReactive, SliderParallax, SliderPreload],
5024
5159
  props: {
5025
5160
  center: Boolean,
5026
5161
  sets: Boolean
@@ -5035,9 +5170,6 @@
5035
5170
  Transitioner
5036
5171
  },
5037
5172
  computed: {
5038
- avgWidth() {
5039
- return getWidth(this.list) / this.length;
5040
- },
5041
5173
  finite({ finite }) {
5042
5174
  return finite || isFinite(this.list, this.center);
5043
5175
  },
@@ -5059,7 +5191,7 @@
5059
5191
  return ~index ? index : this.length - 1;
5060
5192
  },
5061
5193
  sets({ sets: enabled }) {
5062
- if (!enabled) {
5194
+ if (!enabled || this.parallax) {
5063
5195
  return;
5064
5196
  }
5065
5197
  let left = 0;
@@ -5071,7 +5203,7 @@
5071
5203
  left = 0;
5072
5204
  }
5073
5205
  if (this.center) {
5074
- if (left < width / 2 && left + slideWidth + dimensions$1(getIndex(+i + 1, this.slides)).width / 2 > width / 2) {
5206
+ if (left < width / 2 && left + slideWidth + dimensions$1(this.slides[getIndex(+i + 1, this.slides)]).width / 2 > width / 2) {
5075
5207
  sets.push(+i);
5076
5208
  left = width / 2 - slideWidth / 2;
5077
5209
  }
@@ -5108,10 +5240,7 @@
5108
5240
  el.hidden = !this.maxIndex || index > this.maxIndex || this.sets && !includes(this.sets, index);
5109
5241
  }
5110
5242
  }
5111
- if (this.length && !this.dragging && !this.stack.length) {
5112
- this.reorder();
5113
- this._translate(1);
5114
- }
5243
+ this.reorder();
5115
5244
  this.updateActiveClasses();
5116
5245
  },
5117
5246
  events: ["resize"]
@@ -5132,13 +5261,15 @@
5132
5261
  return;
5133
5262
  }
5134
5263
  const index = this.dir < 0 || !this.slides[this.prevIndex] ? this.index : this.prevIndex;
5135
- this.duration = speedUp(this.avgWidth / this.velocity) * (dimensions$1(this.slides[index]).width / this.avgWidth);
5264
+ const avgWidth = getWidth(this.list) / this.length;
5265
+ this.duration = speedUp(avgWidth / this.velocity) * (dimensions$1(this.slides[index]).width / avgWidth);
5136
5266
  this.reorder();
5137
5267
  },
5138
5268
  itemshow() {
5139
5269
  if (~this.prevIndex) {
5140
5270
  addClass(this._getTransitioner().getItemIn(), this.clsActive);
5141
5271
  }
5272
+ this.updateActiveClasses(this.prevIndex);
5142
5273
  },
5143
5274
  itemshown() {
5144
5275
  this.updateActiveClasses();
@@ -5171,11 +5302,11 @@
5171
5302
  width -= dimensions$1(slide).width;
5172
5303
  }
5173
5304
  },
5174
- updateActiveClasses() {
5175
- const actives = this._getTransitioner(this.index).getActives();
5305
+ updateActiveClasses(currentIndex = this.index) {
5306
+ const actives = this._getTransitioner(currentIndex).getActives();
5176
5307
  const activeClasses = [
5177
5308
  this.clsActive,
5178
- (!this.sets || includes(this.sets, toFloat(this.index))) && this.clsActivated || ""
5309
+ !this.sets || includes(this.sets, toFloat(this.index)) ? this.clsActivated : ""
5179
5310
  ];
5180
5311
  for (const slide of this.slides) {
5181
5312
  const active = includes(actives, slide);
@@ -5221,6 +5352,21 @@
5221
5352
  } while (this.length > j && currentLeft > left && currentLeft < right);
5222
5353
  }
5223
5354
  return Array.from(slides);
5355
+ },
5356
+ getIndexAt(percent) {
5357
+ let index = -1;
5358
+ const firstSlideWidth = dimensions$1(this.slides[0]).width;
5359
+ const lastSlideWidth = dimensions$1(last(this.slides)).width;
5360
+ const scrollDist = getWidth(this.list) - (this.center ? firstSlideWidth / 2 + lastSlideWidth / 2 : lastSlideWidth);
5361
+ let dist = percent * scrollDist;
5362
+ let slidePercent = 0;
5363
+ do {
5364
+ const slideWidth = dimensions$1(this.slides[++index]).width;
5365
+ const slideDist = this.center ? slideWidth / 2 + dimensions$1(this.slides[index + 1]).width / 2 : slideWidth;
5366
+ slidePercent = dist / slideDist % 1;
5367
+ dist -= slideDist;
5368
+ } while (dist >= 0 && index < this.maxIndex);
5369
+ return [index, slidePercent];
5224
5370
  }
5225
5371
  }
5226
5372
  };
@@ -5412,18 +5558,17 @@
5412
5558
  }
5413
5559
  };
5414
5560
 
5415
- const supportsAspectRatio = inBrowser && CSS.supports("aspect-ratio", "1/1");
5416
5561
  var slideshow = {
5417
- mixins: [Class, Slideshow, SliderReactive, SliderPreload],
5562
+ mixins: [Class, Slideshow, SliderReactive, SliderParallax, SliderPreload],
5418
5563
  props: {
5419
5564
  ratio: String,
5420
- minHeight: Number,
5421
- maxHeight: Number
5565
+ minHeight: String,
5566
+ maxHeight: String
5422
5567
  },
5423
5568
  data: {
5424
5569
  ratio: "16:9",
5425
- minHeight: false,
5426
- maxHeight: false,
5570
+ minHeight: void 0,
5571
+ maxHeight: void 0,
5427
5572
  selList: ".uk-slideshow-items",
5428
5573
  attrItem: "uk-slideshow-item",
5429
5574
  selNav: ".uk-slideshow-nav",
@@ -5431,38 +5576,15 @@
5431
5576
  },
5432
5577
  watch: {
5433
5578
  list(list) {
5434
- if (list && supportsAspectRatio) {
5435
- css(list, {
5436
- aspectRatio: this.ratio.replace(":", "/"),
5437
- minHeight: this.minHeight || "",
5438
- maxHeight: this.maxHeight || "",
5439
- minWidth: "100%",
5440
- maxWidth: "100%"
5441
- });
5442
- }
5579
+ css(list, {
5580
+ aspectRatio: this.ratio ? this.ratio.replace(":", "/") : void 0,
5581
+ minHeight: this.minHeight,
5582
+ maxHeight: this.maxHeight,
5583
+ minWidth: "100%",
5584
+ maxWidth: "100%"
5585
+ });
5443
5586
  }
5444
5587
  },
5445
- update: {
5446
- // deprecated: Remove with iOS 17
5447
- read() {
5448
- if (!this.list || supportsAspectRatio) {
5449
- return false;
5450
- }
5451
- let [width, height] = this.ratio.split(":").map(Number);
5452
- height = height * this.list.offsetWidth / width || 0;
5453
- if (this.minHeight) {
5454
- height = Math.max(this.minHeight, height);
5455
- }
5456
- if (this.maxHeight) {
5457
- height = Math.min(this.maxHeight, height);
5458
- }
5459
- return { height: height - boxModelAdjust(this.list, "height", "content-box") };
5460
- },
5461
- write({ height }) {
5462
- height > 0 && css(this.list, "minHeight", height);
5463
- },
5464
- events: ["resize"]
5465
- },
5466
5588
  methods: {
5467
5589
  getAdjacentSlides() {
5468
5590
  return [1, -1].map((i) => this.slides[this.getIndex(this.index + i)]);
@@ -5605,7 +5727,7 @@
5605
5727
  },
5606
5728
  start(e) {
5607
5729
  this.drag = appendDrag(this.$container, this.placeholder);
5608
- const { left, top } = this.placeholder.getBoundingClientRect();
5730
+ const { left, top } = dimensions$1(this.placeholder);
5609
5731
  assign(this.origin, { offsetLeft: this.pos.x - left, offsetTop: this.pos.y - top });
5610
5732
  addClass(this.drag, this.clsDrag, this.clsCustom);
5611
5733
  addClass(this.placeholder, this.clsPlaceholder);
@@ -5721,20 +5843,20 @@
5721
5843
  return clone;
5722
5844
  }
5723
5845
  function findTarget(items, point) {
5724
- return items[findIndex(items, (item) => pointInRect(point, item.getBoundingClientRect()))];
5846
+ return items[findIndex(items, (item) => pointInRect(point, dimensions$1(item)))];
5725
5847
  }
5726
5848
  function findInsertTarget(list, target, placeholder, x, y, sameList) {
5727
5849
  if (!children(list).length) {
5728
5850
  return;
5729
5851
  }
5730
- const rect = target.getBoundingClientRect();
5852
+ const rect = dimensions$1(target);
5731
5853
  if (!sameList) {
5732
5854
  if (!isHorizontal(list, placeholder)) {
5733
5855
  return y < rect.top + rect.height / 2 ? target : target.nextElementSibling;
5734
5856
  }
5735
5857
  return target;
5736
5858
  }
5737
- const placeholderRect = placeholder.getBoundingClientRect();
5859
+ const placeholderRect = dimensions$1(placeholder);
5738
5860
  const sameRow = linesIntersect(
5739
5861
  [rect.top, rect.bottom],
5740
5862
  [placeholderRect.top, placeholderRect.bottom]
@@ -5759,9 +5881,9 @@
5759
5881
  }
5760
5882
  const items = children(list);
5761
5883
  const isHorizontal2 = items.some((el, i) => {
5762
- const rectA = el.getBoundingClientRect();
5884
+ const rectA = dimensions$1(el);
5763
5885
  return items.slice(i + 1).some((el2) => {
5764
- const rectB = el2.getBoundingClientRect();
5886
+ const rectB = dimensions$1(el2);
5765
5887
  return !linesIntersect([rectA.left, rectA.right], [rectB.left, rectB.right]);
5766
5888
  });
5767
5889
  });
@@ -5964,13 +6086,7 @@
5964
6086
  }
5965
6087
  }
5966
6088
  const props = includes(properties[0], dir) ? properties[1] : properties[0];
5967
- if (elOffset[props[0]] === targetOffset[props[0]]) {
5968
- align = props[0];
5969
- } else if (elOffset[props[1]] === targetOffset[props[1]]) {
5970
- align = props[1];
5971
- } else {
5972
- align = "center";
5973
- }
6089
+ align = props.find((prop) => elOffset[prop] === targetOffset[prop]) || "center";
5974
6090
  return [dir, align];
5975
6091
  }
5976
6092
  function parseProps(options) {
@@ -6441,7 +6557,7 @@
6441
6557
  let frame;
6442
6558
  (function scroll() {
6443
6559
  frame = requestAnimationFrame(() => {
6444
- const { top } = el.getBoundingClientRect();
6560
+ const { top } = dimensions$1(el);
6445
6561
  if (top < 0) {
6446
6562
  scrollElement.scrollTop += top;
6447
6563
  }
@@ -6802,9 +6918,7 @@
6802
6918
  {
6803
6919
  name: "beforehide",
6804
6920
  self: true,
6805
- handler() {
6806
- this.clearTimers();
6807
- }
6921
+ handler: "clearTimers"
6808
6922
  },
6809
6923
  {
6810
6924
  name: "hide",
@@ -7028,8 +7142,12 @@
7028
7142
  dropbar = this._dropbar || query(dropbar, this.$el) || $(`+ .${this.clsDropbar}`, this.$el);
7029
7143
  return dropbar ? dropbar : this._dropbar = $("<div></div>");
7030
7144
  },
7031
- dropbarOffset() {
7032
- return 0;
7145
+ dropbarOffset({ target, targetY }, $el) {
7146
+ const { offsetTop, offsetHeight } = query(targetY || target || $el, $el);
7147
+ return offsetTop + offsetHeight + this.dropbarPositionOffset;
7148
+ },
7149
+ dropbarPositionOffset(_, $el) {
7150
+ return toPx(css($el, "--uk-position-offset"));
7033
7151
  },
7034
7152
  dropContainer(_, $el) {
7035
7153
  return this.container || $el;
@@ -7188,17 +7306,12 @@
7188
7306
  }
7189
7307
  const drop = this.getDropdown(target);
7190
7308
  const adjustHeight = () => {
7191
- const targetOffsets = parents(target, `.${this.clsDrop}`).concat(target).map((el) => offset(el));
7192
- const minTop = Math.min(...targetOffsets.map(({ top }) => top));
7193
- const maxBottom = Math.max(...targetOffsets.map(({ bottom }) => bottom));
7194
- const dropbarOffset = offset(this.dropbar);
7195
- css(
7196
- this.dropbar,
7197
- "top",
7198
- this.dropbar.offsetTop - (dropbarOffset.top - minTop) - this.dropbarOffset
7309
+ const maxBottom = Math.max(
7310
+ ...parents(target, `.${this.clsDrop}`).concat(target).map((el) => offset(el).bottom)
7199
7311
  );
7312
+ css(this.dropbar, "top", this.dropbarOffset);
7200
7313
  this.transitionTo(
7201
- maxBottom - minTop + toFloat(css(target, "marginBottom")) + this.dropbarOffset,
7314
+ maxBottom - offset(this.dropbar).top + toFloat(css(target, "marginBottom")),
7202
7315
  target
7203
7316
  );
7204
7317
  };
@@ -7252,17 +7365,21 @@
7252
7365
  const oldHeight = height(dropbar);
7253
7366
  el = oldHeight < newHeight && el;
7254
7367
  await Transition.cancel([el, dropbar]);
7368
+ if (el) {
7369
+ const diff = offset(el).top - offset(dropbar).top - oldHeight;
7370
+ if (diff > 0) {
7371
+ css(el, "transitionDelay", `${diff / newHeight * this.duration}ms`);
7372
+ }
7373
+ }
7255
7374
  css(el, "clipPath", `polygon(0 0,100% 0,100% ${oldHeight}px,0 ${oldHeight}px)`);
7256
7375
  height(dropbar, oldHeight);
7257
7376
  await Promise.all([
7258
7377
  Transition.start(dropbar, { height: newHeight }, this.duration),
7259
7378
  Transition.start(
7260
7379
  el,
7261
- {
7262
- clipPath: `polygon(0 0,100% 0,100% ${newHeight}px,0 ${newHeight}px)`
7263
- },
7380
+ { clipPath: `polygon(0 0,100% 0,100% ${newHeight}px,0 ${newHeight}px)` },
7264
7381
  this.duration
7265
- ).finally(() => css(el, { clipPath: "" }))
7382
+ ).finally(() => css(el, { clipPath: "", transitionDelay: "" }))
7266
7383
  ]).catch(noop);
7267
7384
  },
7268
7385
  getDropdown(el) {
@@ -7556,7 +7673,9 @@
7556
7673
  let heights = elements.map(getHeight);
7557
7674
  const max = Math.max(...heights);
7558
7675
  return {
7559
- heights: elements.map((el, i) => heights[i].toFixed(2) === max.toFixed(2) ? "" : max),
7676
+ heights: elements.map(
7677
+ (el, i) => heights[i].toFixed(2) === max.toFixed(2) ? "" : max - boxModelAdjust(el, "height", "content-box")
7678
+ ),
7560
7679
  elements
7561
7680
  };
7562
7681
  }
@@ -7566,11 +7685,34 @@
7566
7685
  css(element, "display", "block", "important");
7567
7686
  }
7568
7687
  css(element, "minHeight", "");
7569
- const height = dimensions$1(element).height - boxModelAdjust(element, "height", "content-box");
7688
+ const height = element.offsetHeight;
7570
7689
  css(element, style);
7571
7690
  return height;
7572
7691
  }
7573
7692
 
7693
+ var heightPlaceholder = {
7694
+ args: "target",
7695
+ props: {
7696
+ target: String
7697
+ },
7698
+ data: {
7699
+ target: ""
7700
+ },
7701
+ computed: {
7702
+ target: ({ target }, $el) => query(target, $el)
7703
+ },
7704
+ observe: resize({ target: ({ target }) => target }),
7705
+ update: {
7706
+ read() {
7707
+ return { height: height(this.target) };
7708
+ },
7709
+ write({ height: height2 }) {
7710
+ css(this.$el, { minHeight: height2 });
7711
+ },
7712
+ events: ["resize"]
7713
+ }
7714
+ };
7715
+
7574
7716
  var heightViewport = {
7575
7717
  props: {
7576
7718
  expand: Boolean,
@@ -7650,7 +7792,7 @@
7650
7792
 
7651
7793
  var navbarParentIcon = "<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>";
7652
7794
 
7653
- var navbarToggleIcon = "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\"><style>.uk-navbar-toggle-animate svg&gt;[class*=&quot;line-&quot;]{transition:0.2s ease-in-out;transition-property:transform, opacity;transform-origin:center;opacity:1}.uk-navbar-toggle svg&gt;.line-3{opacity:0}.uk-navbar-toggle-animate[aria-expanded=&quot;true&quot;] svg&gt;.line-3{opacity:1}.uk-navbar-toggle-animate[aria-expanded=&quot;true&quot;] svg&gt;.line-2{transform:rotate(45deg)}.uk-navbar-toggle-animate[aria-expanded=&quot;true&quot;] svg&gt;.line-3{transform:rotate(-45deg)}.uk-navbar-toggle-animate[aria-expanded=&quot;true&quot;] svg&gt;.line-1,.uk-navbar-toggle-animate[aria-expanded=&quot;true&quot;] svg&gt;.line-4{opacity:0}.uk-navbar-toggle-animate[aria-expanded=&quot;true&quot;] svg&gt;.line-1{transform:translateY(6px) scaleX(0)}.uk-navbar-toggle-animate[aria-expanded=&quot;true&quot;] svg&gt;.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>";
7795
+ var navbarToggleIcon = "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\"><style>.uk-navbar-toggle-animate svg&gt;[class*=&quot;line-&quot;]{transition:0.2s ease-in-out;transition-property:transform, opacity;transform-origin:center;opacity:1}.uk-navbar-toggle-animate svg&gt;.line-3{opacity:0}.uk-navbar-toggle-animate[aria-expanded=&quot;true&quot;] svg&gt;.line-3{opacity:1}.uk-navbar-toggle-animate[aria-expanded=&quot;true&quot;] svg&gt;.line-2{transform:rotate(45deg)}.uk-navbar-toggle-animate[aria-expanded=&quot;true&quot;] svg&gt;.line-3{transform:rotate(-45deg)}.uk-navbar-toggle-animate[aria-expanded=&quot;true&quot;] svg&gt;.line-1,.uk-navbar-toggle-animate[aria-expanded=&quot;true&quot;] svg&gt;.line-4{opacity:0}.uk-navbar-toggle-animate[aria-expanded=&quot;true&quot;] svg&gt;.line-1{transform:translateY(6px) scaleX(0)}.uk-navbar-toggle-animate[aria-expanded=&quot;true&quot;] svg&gt;.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>";
7654
7796
 
7655
7797
  var overlayIcon = "<svg width=\"40\" height=\"40\" viewBox=\"0 0 40 40\"><rect x=\"19\" y=\"0\" width=\"1\" height=\"40\"/><rect x=\"0\" y=\"19\" width=\"40\" height=\"1\"/></svg>";
7656
7798
 
@@ -7759,6 +7901,7 @@
7759
7901
  "search-icon": searchIcon,
7760
7902
  "search-large": searchLarge,
7761
7903
  "search-navbar": searchNavbar,
7904
+ "search-toggle-icon": searchIcon,
7762
7905
  "slidenav-next": slidenavNext,
7763
7906
  "slidenav-next-large": slidenavNextLarge,
7764
7907
  "slidenav-previous": slidenavPrevious,
@@ -7805,11 +7948,12 @@
7805
7948
  mixins: [I18n],
7806
7949
  i18n: { toggle: "Open Search", submit: "Submit Search" },
7807
7950
  beforeConnect() {
7808
- this.icon = hasClass(this.$el, "uk-search-icon") && parents(this.$el, ".uk-search-large").length ? "search-large" : parents(this.$el, ".uk-search-navbar").length ? "search-navbar" : this.$props.icon;
7951
+ const isToggle = hasClass(this.$el, "uk-search-toggle") || hasClass(this.$el, "uk-navbar-toggle");
7952
+ this.icon = isToggle ? "search-toggle-icon" : hasClass(this.$el, "uk-search-icon") && closest(this.$el, ".uk-search-large") ? "search-large" : closest(this.$el, ".uk-search-navbar") ? "search-navbar" : this.$props.icon;
7809
7953
  if (hasAttr(this.$el, "aria-label")) {
7810
7954
  return;
7811
7955
  }
7812
- if (hasClass(this.$el, "uk-search-toggle") || hasClass(this.$el, "uk-navbar-toggle")) {
7956
+ if (isToggle) {
7813
7957
  const label = this.t("toggle");
7814
7958
  attr(this.$el, "aria-label", label);
7815
7959
  } else {
@@ -7903,7 +8047,9 @@
7903
8047
  }
7904
8048
  };
7905
8049
  }
8050
+ const aliases = { twitter: "x" };
7906
8051
  function getIcon(icon) {
8052
+ icon = aliases[icon] || icon;
7907
8053
  if (!icons[icon]) {
7908
8054
  return null;
7909
8055
  }
@@ -8042,6 +8188,90 @@
8042
8188
  return isTag(el, "img");
8043
8189
  }
8044
8190
 
8191
+ var inverse = {
8192
+ props: {
8193
+ target: String,
8194
+ selActive: String
8195
+ },
8196
+ data: {
8197
+ target: false,
8198
+ selActive: false
8199
+ },
8200
+ computed: {
8201
+ target: ({ target }, $el) => target ? $$(target, $el) : [$el]
8202
+ },
8203
+ observe: [
8204
+ mutation({
8205
+ target: ({ target }) => target,
8206
+ options: { attributes: true, attributeFilter: ["class"], attributeOldValue: true }
8207
+ }),
8208
+ {
8209
+ target: ({ target }) => target,
8210
+ observe: (target, handler) => {
8211
+ const observer = observeResize([...target, document.documentElement], handler);
8212
+ const listener = [
8213
+ on(document, "scroll itemshown itemhidden", handler, {
8214
+ passive: true,
8215
+ capture: true
8216
+ }),
8217
+ on(document, "show hide transitionstart", (e) => {
8218
+ handler();
8219
+ return observer.observe(e.target);
8220
+ }),
8221
+ on(document, "shown hidden transitionend transitioncancel", (e) => {
8222
+ handler();
8223
+ return observer.unobserve(e.target);
8224
+ })
8225
+ ];
8226
+ return {
8227
+ disconnect() {
8228
+ observer.disconnect();
8229
+ listener.map((off) => off());
8230
+ }
8231
+ };
8232
+ },
8233
+ handler() {
8234
+ this.$emit();
8235
+ }
8236
+ }
8237
+ ],
8238
+ update: {
8239
+ read() {
8240
+ for (const target of this.target) {
8241
+ replaceClass(
8242
+ target,
8243
+ "uk-light,uk-dark",
8244
+ !this.selActive || matches(target, this.selActive) ? findTargetColor(target) : ""
8245
+ );
8246
+ }
8247
+ }
8248
+ }
8249
+ };
8250
+ function findTargetColor(target) {
8251
+ const { left, top, height, width } = dimensions$1(target);
8252
+ let last;
8253
+ for (const percent of [0.25, 0.5, 0.75]) {
8254
+ const elements = target.ownerDocument.elementsFromPoint(
8255
+ Math.max(0, left) + width * percent,
8256
+ Math.max(0, top) + height / 2
8257
+ );
8258
+ for (const element of elements) {
8259
+ if (target.contains(element) || element.closest('[class*="-leave"]') && elements.some((el) => element !== el && matches(el, '[class*="-enter"]'))) {
8260
+ continue;
8261
+ }
8262
+ const color = css(element, "--uk-inverse");
8263
+ if (color) {
8264
+ if (color === last) {
8265
+ return `uk-${color}`;
8266
+ }
8267
+ last = color;
8268
+ break;
8269
+ }
8270
+ }
8271
+ }
8272
+ return last ? `uk-${last}` : "";
8273
+ }
8274
+
8045
8275
  var leader = {
8046
8276
  mixins: [Class, Media],
8047
8277
  props: {
@@ -8089,6 +8319,15 @@
8089
8319
  selClose: ".uk-modal-close, .uk-modal-close-default, .uk-modal-close-outside, .uk-modal-close-full"
8090
8320
  },
8091
8321
  events: [
8322
+ {
8323
+ name: "fullscreenchange webkitendfullscreen",
8324
+ capture: true,
8325
+ handler(e) {
8326
+ if (isTag(e.target, "video") && this.isToggled() && !document.fullscreenElement) {
8327
+ this.hide();
8328
+ }
8329
+ }
8330
+ },
8092
8331
  {
8093
8332
  name: "show",
8094
8333
  self: true,
@@ -8190,6 +8429,7 @@
8190
8429
  }
8191
8430
  };
8192
8431
 
8432
+ const clsNavbarTransparent = "uk-navbar-transparent";
8193
8433
  var navbar = {
8194
8434
  extends: Dropnav,
8195
8435
  props: {
@@ -8199,49 +8439,25 @@
8199
8439
  clsDrop: "uk-navbar-dropdown",
8200
8440
  selNavItem: ".uk-navbar-nav > li > a,a.uk-navbar-item,button.uk-navbar-item,.uk-navbar-item a,.uk-navbar-item button,.uk-navbar-toggle",
8201
8441
  // Simplify with :where() selector once browser target is Safari 14+
8202
- selTransparentTarget: '[class*="uk-section"]',
8203
8442
  dropbarTransparentMode: false
8204
8443
  },
8205
8444
  computed: {
8206
8445
  navbarContainer: (_, $el) => $el.closest(".uk-navbar-container"),
8207
- dropbarOffset: ({ dropbarTransparentMode }, $el) => dropbarTransparentMode === "behind" ? $el.offsetHeight : 0
8446
+ dropbarOffset({ dropbarTransparentMode }) {
8447
+ const { offsetTop, offsetHeight } = this.navbarContainer;
8448
+ return offsetTop + (dropbarTransparentMode === "behind" ? 0 : offsetHeight + this.dropbarPositionOffset);
8449
+ }
8208
8450
  },
8209
8451
  watch: {
8210
8452
  items() {
8211
8453
  const justify = hasClass(this.$el, "uk-navbar-justify");
8212
- for (const container of $$(
8213
- ".uk-navbar-nav, .uk-navbar-left, .uk-navbar-right",
8214
- this.$el
8215
- )) {
8216
- css(
8217
- container,
8218
- "flexGrow",
8219
- justify ? $$(
8220
- ".uk-navbar-nav > li > a, .uk-navbar-item, .uk-navbar-toggle",
8221
- container
8222
- ).length : ""
8223
- );
8454
+ const containers = $$(".uk-navbar-nav, .uk-navbar-left, .uk-navbar-right", this.$el);
8455
+ for (const container of containers) {
8456
+ const items = justify ? $$(".uk-navbar-nav > li > a, .uk-navbar-item, .uk-navbar-toggle", container).length : "";
8457
+ css(container, "flexGrow", items);
8224
8458
  }
8225
8459
  }
8226
8460
  },
8227
- disconnect() {
8228
- var _a;
8229
- (_a = this._colorListener) == null ? void 0 : _a.call(this);
8230
- },
8231
- observe: [
8232
- mutation({
8233
- target: ({ navbarContainer }) => navbarContainer,
8234
- handler: "registerColorListener",
8235
- options: { attributes: true, attributeFilter: ["class"], attributeOldValue: true }
8236
- }),
8237
- intersection({
8238
- handler(records) {
8239
- this._isIntersecting = records[0].isIntersecting;
8240
- this.registerColorListener();
8241
- },
8242
- args: { intersecting: false }
8243
- })
8244
- ],
8245
8461
  events: [
8246
8462
  {
8247
8463
  name: "show",
@@ -8249,21 +8465,9 @@
8249
8465
  return this.dropContainer;
8250
8466
  },
8251
8467
  handler({ target }) {
8252
- const transparentMode = this.getTransparentMode(target);
8253
- if (!transparentMode || this._mode) {
8254
- return;
8255
- }
8256
- const storePrevColor = () => this._mode = removeClasses(this.navbarContainer, "uk-light", "uk-dark");
8257
- if (transparentMode === "behind") {
8258
- const mode = getDropbarBehindColor(this.$el);
8259
- if (mode) {
8260
- storePrevColor();
8261
- addClass(this.navbarContainer, `uk-${mode}`);
8262
- }
8263
- }
8264
- if (transparentMode === "remove") {
8265
- storePrevColor();
8266
- removeClass(this.navbarContainer, "uk-navbar-transparent");
8468
+ if (this.getTransparentMode(target) === "remove" && hasClass(this.navbarContainer, clsNavbarTransparent)) {
8469
+ removeClass(this.navbarContainer, clsNavbarTransparent);
8470
+ this._transparent = true;
8267
8471
  }
8268
8472
  }
8269
8473
  },
@@ -8272,26 +8476,12 @@
8272
8476
  el() {
8273
8477
  return this.dropContainer;
8274
8478
  },
8275
- async handler({ target }) {
8276
- const transparentMode = this.getTransparentMode(target);
8277
- if (!transparentMode || !this._mode) {
8278
- return;
8279
- }
8479
+ async handler() {
8280
8480
  await awaitMacroTask();
8281
- if (this.getActive()) {
8282
- return;
8283
- }
8284
- if (transparentMode === "behind") {
8285
- const mode = getDropbarBehindColor(this.$el);
8286
- if (mode) {
8287
- removeClass(this.navbarContainer, `uk-${mode}`);
8288
- }
8289
- }
8290
- addClass(this.navbarContainer, this._mode);
8291
- if (transparentMode === "remove") {
8292
- addClass(this.navbarContainer, "uk-navbar-transparent");
8481
+ if (!this.getActive() && this._transparent) {
8482
+ addClass(this.navbarContainer, clsNavbarTransparent);
8483
+ this._transparent = null;
8293
8484
  }
8294
- this._mode = null;
8295
8485
  }
8296
8486
  }
8297
8487
  ],
@@ -8304,70 +8494,15 @@
8304
8494
  return this.dropbarTransparentMode;
8305
8495
  }
8306
8496
  const drop = this.getDropdown(el);
8307
- if (!drop || !hasClass(el, "uk-dropbar")) {
8308
- return;
8309
- }
8310
- return drop.inset ? "behind" : "remove";
8311
- },
8312
- registerColorListener() {
8313
- const active = this._isIntersecting && hasClass(this.navbarContainer, "uk-navbar-transparent") && !isWithinMixBlendMode(this.navbarContainer) && !$$(".uk-drop", this.dropContainer).map(this.getDropdown).some(
8314
- (drop) => drop.isToggled() && (drop.inset || this.getTransparentMode(drop.$el) === "behind")
8315
- );
8316
- if (this._colorListener) {
8317
- if (!active) {
8318
- this._colorListener();
8319
- this._colorListener = null;
8320
- }
8321
- return;
8497
+ if (drop && hasClass(el, "uk-dropbar")) {
8498
+ return drop.inset ? "behind" : "remove";
8322
8499
  }
8323
- if (!active) {
8324
- return;
8325
- }
8326
- this._colorListener = listenForPositionChange(this.navbarContainer, () => {
8327
- const { left, top, height } = offset(this.navbarContainer);
8328
- const startPoint = { x: left, y: Math.max(0, top) + height / 2 };
8329
- const target = $$(this.selTransparentTarget).find(
8330
- (target2) => pointInRect(startPoint, offset(target2))
8331
- );
8332
- const color = css(target, "--uk-navbar-color");
8333
- if (color) {
8334
- replaceClass(this.navbarContainer, "uk-light,uk-dark", `uk-${color}`);
8335
- }
8336
- });
8337
8500
  }
8338
8501
  }
8339
8502
  };
8340
- function removeClasses(el, ...classes) {
8341
- for (const cls of classes) {
8342
- if (hasClass(el, cls)) {
8343
- removeClass(el, cls);
8344
- return cls;
8345
- }
8346
- }
8347
- }
8348
- async function awaitMacroTask() {
8503
+ function awaitMacroTask() {
8349
8504
  return new Promise((resolve) => setTimeout(resolve));
8350
8505
  }
8351
- function getDropbarBehindColor(el) {
8352
- return css(el, "--uk-navbar-dropbar-behind-color");
8353
- }
8354
- function listenForPositionChange(el, handler) {
8355
- const parent2 = scrollParent(el, true);
8356
- const scrollEl = parent2 === document.documentElement ? document : parent2;
8357
- const off = on(scrollEl, "scroll", handler, { passive: true });
8358
- const observer = observeResize([el, parent2], handler);
8359
- return () => {
8360
- off();
8361
- observer.disconnect();
8362
- };
8363
- }
8364
- function isWithinMixBlendMode(el) {
8365
- do {
8366
- if (css(el, "mixBlendMode") !== "normal") {
8367
- return true;
8368
- }
8369
- } while (el = parent(el));
8370
- }
8371
8506
 
8372
8507
  var offcanvas = {
8373
8508
  mixins: [Modal],
@@ -8535,27 +8670,7 @@
8535
8670
  props: ["width", "height"],
8536
8671
  connected() {
8537
8672
  addClass(this.$el, "uk-responsive-width");
8538
- },
8539
- observe: resize({
8540
- target: ({ $el }) => [$el, parent($el)]
8541
- }),
8542
- update: {
8543
- read() {
8544
- return isVisible(this.$el) && this.width && this.height ? { width: width(parent(this.$el)), height: this.height } : false;
8545
- },
8546
- write(dim) {
8547
- height(
8548
- this.$el,
8549
- Dimensions.contain(
8550
- {
8551
- height: this.height,
8552
- width: this.width
8553
- },
8554
- dim
8555
- ).height
8556
- );
8557
- },
8558
- events: ["resize"]
8673
+ css(this.$el, "aspectRatio", `${this.width}/${this.height}`);
8559
8674
  }
8560
8675
  };
8561
8676
 
@@ -8701,7 +8816,7 @@
8701
8816
  toggleClass(el, this.inViewClass, inview);
8702
8817
  toggleClass(el, state.cls);
8703
8818
  if (/\buk-animation-/.test(state.cls)) {
8704
- const removeAnimationClasses = () => removeClasses$1(el, "uk-animation-[\\w-]+");
8819
+ const removeAnimationClasses = () => removeClasses(el, "uk-animation-[\\w-]+");
8705
8820
  if (inview) {
8706
8821
  state.off = once(el, "animationcancel animationend", removeAnimationClasses, {
8707
8822
  self: true
@@ -8828,7 +8943,7 @@
8828
8943
  targetOffset: false
8829
8944
  },
8830
8945
  computed: {
8831
- selTarget: ({ selTarget }, $el) => selTarget && $(selTarget, $el) || $el
8946
+ target: ({ selTarget }, $el) => selTarget && $(selTarget, $el) || $el
8832
8947
  },
8833
8948
  connected() {
8834
8949
  this.start = coerce(this.start || this.top);
@@ -8840,16 +8955,26 @@
8840
8955
  beforeDisconnect() {
8841
8956
  if (this.isFixed) {
8842
8957
  this.hide();
8843
- removeClass(this.selTarget, this.clsInactive);
8958
+ removeClass(this.target, this.clsInactive);
8844
8959
  }
8845
8960
  reset(this.$el);
8846
8961
  remove$1(this.placeholder);
8847
8962
  this.placeholder = null;
8848
8963
  },
8849
8964
  observe: [
8850
- viewport(),
8965
+ viewport({
8966
+ handler() {
8967
+ if (toPx("100vh", "height") !== this._data.viewport) {
8968
+ this.$emit("resize");
8969
+ }
8970
+ }
8971
+ }),
8851
8972
  scroll$1({ target: () => document.scrollingElement }),
8852
- resize({ target: ({ $el }) => [$el, document.scrollingElement] })
8973
+ resize({
8974
+ target: () => document.scrollingElement,
8975
+ options: { box: "content-box" }
8976
+ }),
8977
+ resize({ target: ({ $el }) => $el })
8853
8978
  ],
8854
8979
  events: [
8855
8980
  {
@@ -8894,7 +9019,7 @@
8894
9019
  }
8895
9020
  const hide = this.isFixed && !this.transitionInProgress;
8896
9021
  if (hide) {
8897
- preventTransition(this.$el);
9022
+ preventTransition(this.target);
8898
9023
  this.hide();
8899
9024
  }
8900
9025
  if (!this.active) {
@@ -8929,20 +9054,20 @@
8929
9054
  );
8930
9055
  sticky = maxScrollHeight && !this.showOnUp && start + offset$1 === topOffset && end === Math.min(
8931
9056
  maxScrollHeight,
8932
- parseProp("!*", this.$el, 0, true) - elHeight - offset$1 + overflow
9057
+ parseProp(true, this.$el, 0, true) - elHeight - offset$1 + overflow
8933
9058
  ) && css(parent(this.$el), "overflowY") === "visible";
8934
9059
  return {
8935
9060
  start,
8936
9061
  end,
8937
9062
  offset: offset$1,
8938
9063
  overflow,
8939
- topOffset,
8940
9064
  height: height$1,
8941
9065
  elHeight,
8942
9066
  width,
8943
9067
  margin,
8944
9068
  top: offsetPosition(referenceElement)[0],
8945
- sticky
9069
+ sticky,
9070
+ viewport: viewport2
8946
9071
  };
8947
9072
  },
8948
9073
  write({ height, width, margin, offset, sticky }) {
@@ -8958,10 +9083,10 @@
8958
9083
  }
8959
9084
  const { placeholder } = this;
8960
9085
  css(placeholder, { height, width, margin });
8961
- if (!document.contains(placeholder)) {
9086
+ if (parent(placeholder) !== parent(this.$el) || sticky ^ index(placeholder) < index(this.$el)) {
9087
+ (sticky ? before : after)(this.$el, placeholder);
8962
9088
  placeholder.hidden = true;
8963
9089
  }
8964
- (sticky ? before : after)(this.$el, placeholder);
8965
9090
  },
8966
9091
  events: ["resize"]
8967
9092
  },
@@ -8972,18 +9097,21 @@
8972
9097
  overflow,
8973
9098
  overflowScroll = 0,
8974
9099
  start,
8975
- end
9100
+ end,
9101
+ elHeight,
9102
+ height,
9103
+ sticky
8976
9104
  }) {
8977
9105
  const scroll2 = document.scrollingElement.scrollTop;
8978
9106
  const dir = prevScroll <= scroll2 ? "down" : "up";
9107
+ const referenceElement = this.isFixed ? this.placeholder : this.$el;
8979
9108
  return {
8980
9109
  dir,
8981
9110
  prevDir,
8982
9111
  scroll: scroll2,
8983
9112
  prevScroll,
8984
- offsetParentTop: offset(
8985
- (this.isFixed ? this.placeholder : this.$el).offsetParent
8986
- ).top,
9113
+ below: scroll2 > offset(referenceElement).top + (sticky ? Math.min(height, elHeight) : height),
9114
+ offsetParentTop: offset(referenceElement.offsetParent).top,
8987
9115
  overflowScroll: clamp(
8988
9116
  overflowScroll + clamp(scroll2, start, end) - clamp(prevScroll, start, end),
8989
9117
  0,
@@ -9001,8 +9129,7 @@
9001
9129
  prevScroll = 0,
9002
9130
  top,
9003
9131
  start,
9004
- topOffset,
9005
- height
9132
+ below
9006
9133
  } = data;
9007
9134
  if (scroll2 < 0 || scroll2 === prevScroll && isScrollUpdate || this.showOnUp && !isScrollUpdate && !this.isFixed) {
9008
9135
  return;
@@ -9015,7 +9142,7 @@
9015
9142
  if (this.showOnUp && !this.isFixed && Math.abs(data.initScroll - scroll2) <= 30 && Math.abs(prevScroll - scroll2) <= 10) {
9016
9143
  return;
9017
9144
  }
9018
- if (this.inactive || scroll2 < start || this.showOnUp && (scroll2 <= start || dir === "down" && isScrollUpdate || dir === "up" && !this.isFixed && scroll2 <= topOffset + height)) {
9145
+ if (this.inactive || scroll2 < start || this.showOnUp && (scroll2 <= start || dir === "down" && isScrollUpdate || dir === "up" && !this.isFixed && !below)) {
9019
9146
  if (!this.isFixed) {
9020
9147
  if (Animation.inProgress(this.$el) && top > scroll2) {
9021
9148
  Animation.cancel(this.$el);
@@ -9023,7 +9150,7 @@
9023
9150
  }
9024
9151
  return;
9025
9152
  }
9026
- if (this.animation && scroll2 > topOffset) {
9153
+ if (this.animation && below) {
9027
9154
  if (hasClass(this.$el, "uk-animation-leave")) {
9028
9155
  return;
9029
9156
  }
@@ -9033,11 +9160,11 @@
9033
9160
  }
9034
9161
  } else if (this.isFixed) {
9035
9162
  this.update();
9036
- } else if (this.animation && scroll2 > topOffset) {
9163
+ } else if (this.animation && below) {
9037
9164
  this.show();
9038
9165
  Animation.in(this.$el, this.animation).catch(noop);
9039
9166
  } else {
9040
- preventTransition(this.selTarget);
9167
+ preventTransition(this.target);
9041
9168
  this.show();
9042
9169
  }
9043
9170
  },
@@ -9076,11 +9203,9 @@
9076
9203
  start,
9077
9204
  end,
9078
9205
  offset,
9079
- topOffset,
9080
- height,
9081
- elHeight,
9082
9206
  offsetParentTop,
9083
- sticky
9207
+ sticky,
9208
+ below
9084
9209
  } = this._data;
9085
9210
  const active = start !== 0 || scroll2 > start;
9086
9211
  if (!sticky) {
@@ -9093,22 +9218,21 @@
9093
9218
  }
9094
9219
  css(this.$el, "top", offset - overflowScroll);
9095
9220
  this.setActive(active);
9096
- toggleClass(
9097
- this.$el,
9098
- this.clsBelow,
9099
- scroll2 > topOffset + (sticky ? Math.min(height, elHeight) : height)
9100
- );
9221
+ toggleClass(this.$el, this.clsBelow, below);
9101
9222
  addClass(this.$el, this.clsFixed);
9102
9223
  },
9103
9224
  setActive(active) {
9104
9225
  const prev = this.active;
9105
9226
  this.active = active;
9106
9227
  if (active) {
9107
- replaceClass(this.selTarget, this.clsInactive, this.clsActive);
9228
+ replaceClass(this.target, this.clsInactive, this.clsActive);
9108
9229
  prev !== active && trigger(this.$el, "active");
9109
9230
  } else {
9110
- replaceClass(this.selTarget, this.clsActive, this.clsInactive);
9111
- prev !== active && trigger(this.$el, "inactive");
9231
+ replaceClass(this.target, this.clsActive, this.clsInactive);
9232
+ if (prev !== active) {
9233
+ preventTransition(this.target);
9234
+ trigger(this.$el, "inactive");
9235
+ }
9112
9236
  }
9113
9237
  }
9114
9238
  }
@@ -9597,9 +9721,11 @@
9597
9721
  FormCustom: formCustom,
9598
9722
  Grid: grid,
9599
9723
  HeightMatch: heightMatch,
9724
+ HeightPlaceholder: heightPlaceholder,
9600
9725
  HeightViewport: heightViewport,
9601
9726
  Icon: Icon,
9602
9727
  Img: img,
9728
+ Inverse: inverse,
9603
9729
  Leader: leader,
9604
9730
  Margin: Margin,
9605
9731
  Marker: Marker,