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
@@ -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(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(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,
@@ -2147,7 +2149,7 @@
2147
2149
  };
2148
2150
  App.util = util;
2149
2151
  App.options = {};
2150
- App.version = "3.17.12-dev.f1425d280";
2152
+ App.version = "3.18.1-dev.edde0251f";
2151
2153
 
2152
2154
  const PREFIX = "uk-";
2153
2155
  const DATA = "__uikit__";
@@ -2831,7 +2833,7 @@
2831
2833
  let frame;
2832
2834
  (function scroll() {
2833
2835
  frame = requestAnimationFrame(() => {
2834
- const { top } = el.getBoundingClientRect();
2836
+ const { top } = dimensions(el);
2835
2837
  if (top < 0) {
2836
2838
  scrollElement.scrollTop += top;
2837
2839
  }
@@ -3007,39 +3009,6 @@
3007
3009
  }
3008
3010
  };
3009
3011
 
3010
- let prevented;
3011
- function preventBackgroundScroll(el) {
3012
- const off = on(
3013
- el,
3014
- "touchmove",
3015
- (e) => {
3016
- if (e.targetTouches.length !== 1 || matches(e.target, 'input[type="range"')) {
3017
- return;
3018
- }
3019
- let { scrollHeight, clientHeight, scrollWidth, clientWidth } = scrollParent(e.target);
3020
- if (e.cancelable && clientHeight >= scrollHeight && clientWidth >= scrollWidth) {
3021
- e.preventDefault();
3022
- }
3023
- },
3024
- { passive: false }
3025
- );
3026
- if (prevented) {
3027
- return off;
3028
- }
3029
- prevented = true;
3030
- const { scrollingElement } = document;
3031
- css(scrollingElement, {
3032
- overflowY: CSS.supports("overflow", "clip") ? "clip" : "hidden",
3033
- touchAction: "none",
3034
- paddingRight: width(window) - scrollingElement.clientWidth || ""
3035
- });
3036
- return () => {
3037
- prevented = false;
3038
- off();
3039
- css(scrollingElement, { overflowY: "", touchAction: "", paddingRight: "" });
3040
- };
3041
- }
3042
-
3043
3012
  var Position = {
3044
3013
  props: {
3045
3014
  pos: String,
@@ -3116,6 +3085,39 @@
3116
3085
  };
3117
3086
  }
3118
3087
 
3088
+ let prevented;
3089
+ function preventBackgroundScroll(el) {
3090
+ const off = on(
3091
+ el,
3092
+ "touchmove",
3093
+ (e) => {
3094
+ if (e.targetTouches.length !== 1 || matches(e.target, 'input[type="range"')) {
3095
+ return;
3096
+ }
3097
+ let { scrollHeight, clientHeight } = scrollParent(e.target);
3098
+ if (clientHeight >= scrollHeight && e.cancelable) {
3099
+ e.preventDefault();
3100
+ }
3101
+ },
3102
+ { passive: false }
3103
+ );
3104
+ if (prevented) {
3105
+ return off;
3106
+ }
3107
+ prevented = true;
3108
+ const { scrollingElement } = document;
3109
+ css(scrollingElement, {
3110
+ overflowY: CSS.supports("overflow", "clip") ? "clip" : "hidden",
3111
+ touchAction: "none",
3112
+ paddingRight: width(window) - scrollingElement.clientWidth || ""
3113
+ });
3114
+ return () => {
3115
+ prevented = false;
3116
+ off();
3117
+ css(scrollingElement, { overflowY: "", touchAction: "", paddingRight: "" });
3118
+ };
3119
+ }
3120
+
3119
3121
  let active$1;
3120
3122
  var drop = {
3121
3123
  mixins: [Container, Position, Togglable],
@@ -3315,9 +3317,7 @@
3315
3317
  {
3316
3318
  name: "beforehide",
3317
3319
  self: true,
3318
- handler() {
3319
- this.clearTimers();
3320
- }
3320
+ handler: "clearTimers"
3321
3321
  },
3322
3322
  {
3323
3323
  name: "hide",
@@ -3541,8 +3541,12 @@
3541
3541
  dropbar = this._dropbar || query(dropbar, this.$el) || $(`+ .${this.clsDropbar}`, this.$el);
3542
3542
  return dropbar ? dropbar : this._dropbar = $("<div></div>");
3543
3543
  },
3544
- dropbarOffset() {
3545
- return 0;
3544
+ dropbarOffset({ target, targetY }, $el) {
3545
+ const { offsetTop, offsetHeight } = query(targetY || target || $el, $el);
3546
+ return offsetTop + offsetHeight + this.dropbarPositionOffset;
3547
+ },
3548
+ dropbarPositionOffset(_, $el) {
3549
+ return toPx(css($el, "--uk-position-offset"));
3546
3550
  },
3547
3551
  dropContainer(_, $el) {
3548
3552
  return this.container || $el;
@@ -3701,17 +3705,12 @@
3701
3705
  }
3702
3706
  const drop = this.getDropdown(target);
3703
3707
  const adjustHeight = () => {
3704
- const targetOffsets = parents(target, `.${this.clsDrop}`).concat(target).map((el) => offset(el));
3705
- const minTop = Math.min(...targetOffsets.map(({ top }) => top));
3706
- const maxBottom = Math.max(...targetOffsets.map(({ bottom }) => bottom));
3707
- const dropbarOffset = offset(this.dropbar);
3708
- css(
3709
- this.dropbar,
3710
- "top",
3711
- this.dropbar.offsetTop - (dropbarOffset.top - minTop) - this.dropbarOffset
3708
+ const maxBottom = Math.max(
3709
+ ...parents(target, `.${this.clsDrop}`).concat(target).map((el) => offset(el).bottom)
3712
3710
  );
3711
+ css(this.dropbar, "top", this.dropbarOffset);
3713
3712
  this.transitionTo(
3714
- maxBottom - minTop + toFloat(css(target, "marginBottom")) + this.dropbarOffset,
3713
+ maxBottom - offset(this.dropbar).top + toFloat(css(target, "marginBottom")),
3715
3714
  target
3716
3715
  );
3717
3716
  };
@@ -3765,17 +3764,21 @@
3765
3764
  const oldHeight = height(dropbar);
3766
3765
  el = oldHeight < newHeight && el;
3767
3766
  await Transition.cancel([el, dropbar]);
3767
+ if (el) {
3768
+ const diff = offset(el).top - offset(dropbar).top - oldHeight;
3769
+ if (diff > 0) {
3770
+ css(el, "transitionDelay", `${diff / newHeight * this.duration}ms`);
3771
+ }
3772
+ }
3768
3773
  css(el, "clipPath", `polygon(0 0,100% 0,100% ${oldHeight}px,0 ${oldHeight}px)`);
3769
3774
  height(dropbar, oldHeight);
3770
3775
  await Promise.all([
3771
3776
  Transition.start(dropbar, { height: newHeight }, this.duration),
3772
3777
  Transition.start(
3773
3778
  el,
3774
- {
3775
- clipPath: `polygon(0 0,100% 0,100% ${newHeight}px,0 ${newHeight}px)`
3776
- },
3779
+ { clipPath: `polygon(0 0,100% 0,100% ${newHeight}px,0 ${newHeight}px)` },
3777
3780
  this.duration
3778
- ).finally(() => css(el, { clipPath: "" }))
3781
+ ).finally(() => css(el, { clipPath: "", transitionDelay: "" }))
3779
3782
  ]).catch(noop);
3780
3783
  },
3781
3784
  getDropdown(el) {
@@ -4160,7 +4163,9 @@
4160
4163
  let heights = elements.map(getHeight);
4161
4164
  const max = Math.max(...heights);
4162
4165
  return {
4163
- heights: elements.map((el, i) => heights[i].toFixed(2) === max.toFixed(2) ? "" : max),
4166
+ heights: elements.map(
4167
+ (el, i) => heights[i].toFixed(2) === max.toFixed(2) ? "" : max - boxModelAdjust(el, "height", "content-box")
4168
+ ),
4164
4169
  elements
4165
4170
  };
4166
4171
  }
@@ -4170,11 +4175,34 @@
4170
4175
  css(element, "display", "block", "important");
4171
4176
  }
4172
4177
  css(element, "minHeight", "");
4173
- const height = dimensions(element).height - boxModelAdjust(element, "height", "content-box");
4178
+ const height = element.offsetHeight;
4174
4179
  css(element, style);
4175
4180
  return height;
4176
4181
  }
4177
4182
 
4183
+ var heightPlaceholder = {
4184
+ args: "target",
4185
+ props: {
4186
+ target: String
4187
+ },
4188
+ data: {
4189
+ target: ""
4190
+ },
4191
+ computed: {
4192
+ target: ({ target }, $el) => query(target, $el)
4193
+ },
4194
+ observe: resize({ target: ({ target }) => target }),
4195
+ update: {
4196
+ read() {
4197
+ return { height: height(this.target) };
4198
+ },
4199
+ write({ height: height2 }) {
4200
+ css(this.$el, { minHeight: height2 });
4201
+ },
4202
+ events: ["resize"]
4203
+ }
4204
+ };
4205
+
4178
4206
  var heightViewport = {
4179
4207
  props: {
4180
4208
  expand: Boolean,
@@ -4254,7 +4282,7 @@
4254
4282
 
4255
4283
  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>";
4256
4284
 
4257
- 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>";
4285
+ 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>";
4258
4286
 
4259
4287
  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>";
4260
4288
 
@@ -4382,6 +4410,7 @@
4382
4410
  "search-icon": searchIcon,
4383
4411
  "search-large": searchLarge,
4384
4412
  "search-navbar": searchNavbar,
4413
+ "search-toggle-icon": searchIcon,
4385
4414
  "slidenav-next": slidenavNext,
4386
4415
  "slidenav-next-large": slidenavNextLarge,
4387
4416
  "slidenav-previous": slidenavPrevious,
@@ -4428,11 +4457,12 @@
4428
4457
  mixins: [I18n],
4429
4458
  i18n: { toggle: "Open Search", submit: "Submit Search" },
4430
4459
  beforeConnect() {
4431
- 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;
4460
+ const isToggle = hasClass(this.$el, "uk-search-toggle") || hasClass(this.$el, "uk-navbar-toggle");
4461
+ 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;
4432
4462
  if (hasAttr(this.$el, "aria-label")) {
4433
4463
  return;
4434
4464
  }
4435
- if (hasClass(this.$el, "uk-search-toggle") || hasClass(this.$el, "uk-navbar-toggle")) {
4465
+ if (isToggle) {
4436
4466
  const label = this.t("toggle");
4437
4467
  attr(this.$el, "aria-label", label);
4438
4468
  } else {
@@ -4526,7 +4556,9 @@
4526
4556
  }
4527
4557
  };
4528
4558
  }
4559
+ const aliases = { twitter: "x" };
4529
4560
  function getIcon(icon) {
4561
+ icon = aliases[icon] || icon;
4530
4562
  if (!icons[icon]) {
4531
4563
  return null;
4532
4564
  }
@@ -4665,6 +4697,90 @@
4665
4697
  return isTag(el, "img");
4666
4698
  }
4667
4699
 
4700
+ var inverse = {
4701
+ props: {
4702
+ target: String,
4703
+ selActive: String
4704
+ },
4705
+ data: {
4706
+ target: false,
4707
+ selActive: false
4708
+ },
4709
+ computed: {
4710
+ target: ({ target }, $el) => target ? $$(target, $el) : [$el]
4711
+ },
4712
+ observe: [
4713
+ mutation({
4714
+ target: ({ target }) => target,
4715
+ options: { attributes: true, attributeFilter: ["class"], attributeOldValue: true }
4716
+ }),
4717
+ {
4718
+ target: ({ target }) => target,
4719
+ observe: (target, handler) => {
4720
+ const observer = observeResize([...target, document.documentElement], handler);
4721
+ const listener = [
4722
+ on(document, "scroll itemshown itemhidden", handler, {
4723
+ passive: true,
4724
+ capture: true
4725
+ }),
4726
+ on(document, "show hide transitionstart", (e) => {
4727
+ handler();
4728
+ return observer.observe(e.target);
4729
+ }),
4730
+ on(document, "shown hidden transitionend transitioncancel", (e) => {
4731
+ handler();
4732
+ return observer.unobserve(e.target);
4733
+ })
4734
+ ];
4735
+ return {
4736
+ disconnect() {
4737
+ observer.disconnect();
4738
+ listener.map((off) => off());
4739
+ }
4740
+ };
4741
+ },
4742
+ handler() {
4743
+ this.$emit();
4744
+ }
4745
+ }
4746
+ ],
4747
+ update: {
4748
+ read() {
4749
+ for (const target of this.target) {
4750
+ replaceClass(
4751
+ target,
4752
+ "uk-light,uk-dark",
4753
+ !this.selActive || matches(target, this.selActive) ? findTargetColor(target) : ""
4754
+ );
4755
+ }
4756
+ }
4757
+ }
4758
+ };
4759
+ function findTargetColor(target) {
4760
+ const { left, top, height, width } = dimensions(target);
4761
+ let last;
4762
+ for (const percent of [0.25, 0.5, 0.75]) {
4763
+ const elements = target.ownerDocument.elementsFromPoint(
4764
+ Math.max(0, left) + width * percent,
4765
+ Math.max(0, top) + height / 2
4766
+ );
4767
+ for (const element of elements) {
4768
+ if (target.contains(element) || element.closest('[class*="-leave"]') && elements.some((el) => element !== el && matches(el, '[class*="-enter"]'))) {
4769
+ continue;
4770
+ }
4771
+ const color = css(element, "--uk-inverse");
4772
+ if (color) {
4773
+ if (color === last) {
4774
+ return `uk-${color}`;
4775
+ }
4776
+ last = color;
4777
+ break;
4778
+ }
4779
+ }
4780
+ }
4781
+ return last ? `uk-${last}` : "";
4782
+ }
4783
+
4668
4784
  var Media = {
4669
4785
  props: {
4670
4786
  media: Boolean
@@ -4964,6 +5080,15 @@
4964
5080
  selClose: ".uk-modal-close, .uk-modal-close-default, .uk-modal-close-outside, .uk-modal-close-full"
4965
5081
  },
4966
5082
  events: [
5083
+ {
5084
+ name: "fullscreenchange webkitendfullscreen",
5085
+ capture: true,
5086
+ handler(e) {
5087
+ if (isTag(e.target, "video") && this.isToggled() && !document.fullscreenElement) {
5088
+ this.hide();
5089
+ }
5090
+ }
5091
+ },
4967
5092
  {
4968
5093
  name: "show",
4969
5094
  self: true,
@@ -5065,6 +5190,7 @@
5065
5190
  }
5066
5191
  };
5067
5192
 
5193
+ const clsNavbarTransparent = "uk-navbar-transparent";
5068
5194
  var navbar = {
5069
5195
  extends: Dropnav,
5070
5196
  props: {
@@ -5074,49 +5200,25 @@
5074
5200
  clsDrop: "uk-navbar-dropdown",
5075
5201
  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",
5076
5202
  // Simplify with :where() selector once browser target is Safari 14+
5077
- selTransparentTarget: '[class*="uk-section"]',
5078
5203
  dropbarTransparentMode: false
5079
5204
  },
5080
5205
  computed: {
5081
5206
  navbarContainer: (_, $el) => $el.closest(".uk-navbar-container"),
5082
- dropbarOffset: ({ dropbarTransparentMode }, $el) => dropbarTransparentMode === "behind" ? $el.offsetHeight : 0
5207
+ dropbarOffset({ dropbarTransparentMode }) {
5208
+ const { offsetTop, offsetHeight } = this.navbarContainer;
5209
+ return offsetTop + (dropbarTransparentMode === "behind" ? 0 : offsetHeight + this.dropbarPositionOffset);
5210
+ }
5083
5211
  },
5084
5212
  watch: {
5085
5213
  items() {
5086
5214
  const justify = hasClass(this.$el, "uk-navbar-justify");
5087
- for (const container of $$(
5088
- ".uk-navbar-nav, .uk-navbar-left, .uk-navbar-right",
5089
- this.$el
5090
- )) {
5091
- css(
5092
- container,
5093
- "flexGrow",
5094
- justify ? $$(
5095
- ".uk-navbar-nav > li > a, .uk-navbar-item, .uk-navbar-toggle",
5096
- container
5097
- ).length : ""
5098
- );
5215
+ const containers = $$(".uk-navbar-nav, .uk-navbar-left, .uk-navbar-right", this.$el);
5216
+ for (const container of containers) {
5217
+ const items = justify ? $$(".uk-navbar-nav > li > a, .uk-navbar-item, .uk-navbar-toggle", container).length : "";
5218
+ css(container, "flexGrow", items);
5099
5219
  }
5100
5220
  }
5101
5221
  },
5102
- disconnect() {
5103
- var _a;
5104
- (_a = this._colorListener) == null ? void 0 : _a.call(this);
5105
- },
5106
- observe: [
5107
- mutation({
5108
- target: ({ navbarContainer }) => navbarContainer,
5109
- handler: "registerColorListener",
5110
- options: { attributes: true, attributeFilter: ["class"], attributeOldValue: true }
5111
- }),
5112
- intersection({
5113
- handler(records) {
5114
- this._isIntersecting = records[0].isIntersecting;
5115
- this.registerColorListener();
5116
- },
5117
- args: { intersecting: false }
5118
- })
5119
- ],
5120
5222
  events: [
5121
5223
  {
5122
5224
  name: "show",
@@ -5124,21 +5226,9 @@
5124
5226
  return this.dropContainer;
5125
5227
  },
5126
5228
  handler({ target }) {
5127
- const transparentMode = this.getTransparentMode(target);
5128
- if (!transparentMode || this._mode) {
5129
- return;
5130
- }
5131
- const storePrevColor = () => this._mode = removeClasses(this.navbarContainer, "uk-light", "uk-dark");
5132
- if (transparentMode === "behind") {
5133
- const mode = getDropbarBehindColor(this.$el);
5134
- if (mode) {
5135
- storePrevColor();
5136
- addClass(this.navbarContainer, `uk-${mode}`);
5137
- }
5138
- }
5139
- if (transparentMode === "remove") {
5140
- storePrevColor();
5141
- removeClass(this.navbarContainer, "uk-navbar-transparent");
5229
+ if (this.getTransparentMode(target) === "remove" && hasClass(this.navbarContainer, clsNavbarTransparent)) {
5230
+ removeClass(this.navbarContainer, clsNavbarTransparent);
5231
+ this._transparent = true;
5142
5232
  }
5143
5233
  }
5144
5234
  },
@@ -5147,26 +5237,12 @@
5147
5237
  el() {
5148
5238
  return this.dropContainer;
5149
5239
  },
5150
- async handler({ target }) {
5151
- const transparentMode = this.getTransparentMode(target);
5152
- if (!transparentMode || !this._mode) {
5153
- return;
5154
- }
5240
+ async handler() {
5155
5241
  await awaitMacroTask();
5156
- if (this.getActive()) {
5157
- return;
5158
- }
5159
- if (transparentMode === "behind") {
5160
- const mode = getDropbarBehindColor(this.$el);
5161
- if (mode) {
5162
- removeClass(this.navbarContainer, `uk-${mode}`);
5163
- }
5164
- }
5165
- addClass(this.navbarContainer, this._mode);
5166
- if (transparentMode === "remove") {
5167
- addClass(this.navbarContainer, "uk-navbar-transparent");
5242
+ if (!this.getActive() && this._transparent) {
5243
+ addClass(this.navbarContainer, clsNavbarTransparent);
5244
+ this._transparent = null;
5168
5245
  }
5169
- this._mode = null;
5170
5246
  }
5171
5247
  }
5172
5248
  ],
@@ -5179,70 +5255,15 @@
5179
5255
  return this.dropbarTransparentMode;
5180
5256
  }
5181
5257
  const drop = this.getDropdown(el);
5182
- if (!drop || !hasClass(el, "uk-dropbar")) {
5183
- return;
5258
+ if (drop && hasClass(el, "uk-dropbar")) {
5259
+ return drop.inset ? "behind" : "remove";
5184
5260
  }
5185
- return drop.inset ? "behind" : "remove";
5186
- },
5187
- registerColorListener() {
5188
- const active = this._isIntersecting && hasClass(this.navbarContainer, "uk-navbar-transparent") && !isWithinMixBlendMode(this.navbarContainer) && !$$(".uk-drop", this.dropContainer).map(this.getDropdown).some(
5189
- (drop) => drop.isToggled() && (drop.inset || this.getTransparentMode(drop.$el) === "behind")
5190
- );
5191
- if (this._colorListener) {
5192
- if (!active) {
5193
- this._colorListener();
5194
- this._colorListener = null;
5195
- }
5196
- return;
5197
- }
5198
- if (!active) {
5199
- return;
5200
- }
5201
- this._colorListener = listenForPositionChange(this.navbarContainer, () => {
5202
- const { left, top, height } = offset(this.navbarContainer);
5203
- const startPoint = { x: left, y: Math.max(0, top) + height / 2 };
5204
- const target = $$(this.selTransparentTarget).find(
5205
- (target2) => pointInRect(startPoint, offset(target2))
5206
- );
5207
- const color = css(target, "--uk-navbar-color");
5208
- if (color) {
5209
- replaceClass(this.navbarContainer, "uk-light,uk-dark", `uk-${color}`);
5210
- }
5211
- });
5212
5261
  }
5213
5262
  }
5214
5263
  };
5215
- function removeClasses(el, ...classes) {
5216
- for (const cls of classes) {
5217
- if (hasClass(el, cls)) {
5218
- removeClass(el, cls);
5219
- return cls;
5220
- }
5221
- }
5222
- }
5223
- async function awaitMacroTask() {
5264
+ function awaitMacroTask() {
5224
5265
  return new Promise((resolve) => setTimeout(resolve));
5225
5266
  }
5226
- function getDropbarBehindColor(el) {
5227
- return css(el, "--uk-navbar-dropbar-behind-color");
5228
- }
5229
- function listenForPositionChange(el, handler) {
5230
- const parent2 = scrollParent(el, true);
5231
- const scrollEl = parent2 === document.documentElement ? document : parent2;
5232
- const off = on(scrollEl, "scroll", handler, { passive: true });
5233
- const observer = observeResize([el, parent2], handler);
5234
- return () => {
5235
- off();
5236
- observer.disconnect();
5237
- };
5238
- }
5239
- function isWithinMixBlendMode(el) {
5240
- do {
5241
- if (css(el, "mixBlendMode") !== "normal") {
5242
- return true;
5243
- }
5244
- } while (el = parent(el));
5245
- }
5246
5267
 
5247
5268
  var offcanvas = {
5248
5269
  mixins: [Modal],
@@ -5410,27 +5431,7 @@
5410
5431
  props: ["width", "height"],
5411
5432
  connected() {
5412
5433
  addClass(this.$el, "uk-responsive-width");
5413
- },
5414
- observe: resize({
5415
- target: ({ $el }) => [$el, parent($el)]
5416
- }),
5417
- update: {
5418
- read() {
5419
- return isVisible(this.$el) && this.width && this.height ? { width: width(parent(this.$el)), height: this.height } : false;
5420
- },
5421
- write(dim) {
5422
- height(
5423
- this.$el,
5424
- Dimensions.contain(
5425
- {
5426
- height: this.height,
5427
- width: this.width
5428
- },
5429
- dim
5430
- ).height
5431
- );
5432
- },
5433
- events: ["resize"]
5434
+ css(this.$el, "aspectRatio", `${this.width}/${this.height}`);
5434
5435
  }
5435
5436
  };
5436
5437
 
@@ -5576,7 +5577,7 @@
5576
5577
  toggleClass(el, this.inViewClass, inview);
5577
5578
  toggleClass(el, state.cls);
5578
5579
  if (/\buk-animation-/.test(state.cls)) {
5579
- const removeAnimationClasses = () => removeClasses$1(el, "uk-animation-[\\w-]+");
5580
+ const removeAnimationClasses = () => removeClasses(el, "uk-animation-[\\w-]+");
5580
5581
  if (inview) {
5581
5582
  state.off = once(el, "animationcancel animationend", removeAnimationClasses, {
5582
5583
  self: true
@@ -5703,7 +5704,7 @@
5703
5704
  targetOffset: false
5704
5705
  },
5705
5706
  computed: {
5706
- selTarget: ({ selTarget }, $el) => selTarget && $(selTarget, $el) || $el
5707
+ target: ({ selTarget }, $el) => selTarget && $(selTarget, $el) || $el
5707
5708
  },
5708
5709
  connected() {
5709
5710
  this.start = coerce(this.start || this.top);
@@ -5715,16 +5716,26 @@
5715
5716
  beforeDisconnect() {
5716
5717
  if (this.isFixed) {
5717
5718
  this.hide();
5718
- removeClass(this.selTarget, this.clsInactive);
5719
+ removeClass(this.target, this.clsInactive);
5719
5720
  }
5720
5721
  reset(this.$el);
5721
5722
  remove$1(this.placeholder);
5722
5723
  this.placeholder = null;
5723
5724
  },
5724
5725
  observe: [
5725
- viewport(),
5726
+ viewport({
5727
+ handler() {
5728
+ if (toPx("100vh", "height") !== this._data.viewport) {
5729
+ this.$emit("resize");
5730
+ }
5731
+ }
5732
+ }),
5726
5733
  scroll$1({ target: () => document.scrollingElement }),
5727
- resize({ target: ({ $el }) => [$el, document.scrollingElement] })
5734
+ resize({
5735
+ target: () => document.scrollingElement,
5736
+ options: { box: "content-box" }
5737
+ }),
5738
+ resize({ target: ({ $el }) => $el })
5728
5739
  ],
5729
5740
  events: [
5730
5741
  {
@@ -5769,7 +5780,7 @@
5769
5780
  }
5770
5781
  const hide = this.isFixed && !this.transitionInProgress;
5771
5782
  if (hide) {
5772
- preventTransition(this.$el);
5783
+ preventTransition(this.target);
5773
5784
  this.hide();
5774
5785
  }
5775
5786
  if (!this.active) {
@@ -5804,20 +5815,20 @@
5804
5815
  );
5805
5816
  sticky = maxScrollHeight && !this.showOnUp && start + offset$1 === topOffset && end === Math.min(
5806
5817
  maxScrollHeight,
5807
- parseProp("!*", this.$el, 0, true) - elHeight - offset$1 + overflow
5818
+ parseProp(true, this.$el, 0, true) - elHeight - offset$1 + overflow
5808
5819
  ) && css(parent(this.$el), "overflowY") === "visible";
5809
5820
  return {
5810
5821
  start,
5811
5822
  end,
5812
5823
  offset: offset$1,
5813
5824
  overflow,
5814
- topOffset,
5815
5825
  height: height$1,
5816
5826
  elHeight,
5817
5827
  width,
5818
5828
  margin,
5819
5829
  top: offsetPosition(referenceElement)[0],
5820
- sticky
5830
+ sticky,
5831
+ viewport: viewport2
5821
5832
  };
5822
5833
  },
5823
5834
  write({ height, width, margin, offset, sticky }) {
@@ -5833,10 +5844,10 @@
5833
5844
  }
5834
5845
  const { placeholder } = this;
5835
5846
  css(placeholder, { height, width, margin });
5836
- if (!document.contains(placeholder)) {
5847
+ if (parent(placeholder) !== parent(this.$el) || sticky ^ index(placeholder) < index(this.$el)) {
5848
+ (sticky ? before : after)(this.$el, placeholder);
5837
5849
  placeholder.hidden = true;
5838
5850
  }
5839
- (sticky ? before : after)(this.$el, placeholder);
5840
5851
  },
5841
5852
  events: ["resize"]
5842
5853
  },
@@ -5847,18 +5858,21 @@
5847
5858
  overflow,
5848
5859
  overflowScroll = 0,
5849
5860
  start,
5850
- end
5861
+ end,
5862
+ elHeight,
5863
+ height,
5864
+ sticky
5851
5865
  }) {
5852
5866
  const scroll2 = document.scrollingElement.scrollTop;
5853
5867
  const dir = prevScroll <= scroll2 ? "down" : "up";
5868
+ const referenceElement = this.isFixed ? this.placeholder : this.$el;
5854
5869
  return {
5855
5870
  dir,
5856
5871
  prevDir,
5857
5872
  scroll: scroll2,
5858
5873
  prevScroll,
5859
- offsetParentTop: offset(
5860
- (this.isFixed ? this.placeholder : this.$el).offsetParent
5861
- ).top,
5874
+ below: scroll2 > offset(referenceElement).top + (sticky ? Math.min(height, elHeight) : height),
5875
+ offsetParentTop: offset(referenceElement.offsetParent).top,
5862
5876
  overflowScroll: clamp(
5863
5877
  overflowScroll + clamp(scroll2, start, end) - clamp(prevScroll, start, end),
5864
5878
  0,
@@ -5876,8 +5890,7 @@
5876
5890
  prevScroll = 0,
5877
5891
  top,
5878
5892
  start,
5879
- topOffset,
5880
- height
5893
+ below
5881
5894
  } = data;
5882
5895
  if (scroll2 < 0 || scroll2 === prevScroll && isScrollUpdate || this.showOnUp && !isScrollUpdate && !this.isFixed) {
5883
5896
  return;
@@ -5890,7 +5903,7 @@
5890
5903
  if (this.showOnUp && !this.isFixed && Math.abs(data.initScroll - scroll2) <= 30 && Math.abs(prevScroll - scroll2) <= 10) {
5891
5904
  return;
5892
5905
  }
5893
- if (this.inactive || scroll2 < start || this.showOnUp && (scroll2 <= start || dir === "down" && isScrollUpdate || dir === "up" && !this.isFixed && scroll2 <= topOffset + height)) {
5906
+ if (this.inactive || scroll2 < start || this.showOnUp && (scroll2 <= start || dir === "down" && isScrollUpdate || dir === "up" && !this.isFixed && !below)) {
5894
5907
  if (!this.isFixed) {
5895
5908
  if (Animation.inProgress(this.$el) && top > scroll2) {
5896
5909
  Animation.cancel(this.$el);
@@ -5898,7 +5911,7 @@
5898
5911
  }
5899
5912
  return;
5900
5913
  }
5901
- if (this.animation && scroll2 > topOffset) {
5914
+ if (this.animation && below) {
5902
5915
  if (hasClass(this.$el, "uk-animation-leave")) {
5903
5916
  return;
5904
5917
  }
@@ -5908,11 +5921,11 @@
5908
5921
  }
5909
5922
  } else if (this.isFixed) {
5910
5923
  this.update();
5911
- } else if (this.animation && scroll2 > topOffset) {
5924
+ } else if (this.animation && below) {
5912
5925
  this.show();
5913
5926
  Animation.in(this.$el, this.animation).catch(noop);
5914
5927
  } else {
5915
- preventTransition(this.selTarget);
5928
+ preventTransition(this.target);
5916
5929
  this.show();
5917
5930
  }
5918
5931
  },
@@ -5951,11 +5964,9 @@
5951
5964
  start,
5952
5965
  end,
5953
5966
  offset,
5954
- topOffset,
5955
- height,
5956
- elHeight,
5957
5967
  offsetParentTop,
5958
- sticky
5968
+ sticky,
5969
+ below
5959
5970
  } = this._data;
5960
5971
  const active = start !== 0 || scroll2 > start;
5961
5972
  if (!sticky) {
@@ -5968,22 +5979,21 @@
5968
5979
  }
5969
5980
  css(this.$el, "top", offset - overflowScroll);
5970
5981
  this.setActive(active);
5971
- toggleClass(
5972
- this.$el,
5973
- this.clsBelow,
5974
- scroll2 > topOffset + (sticky ? Math.min(height, elHeight) : height)
5975
- );
5982
+ toggleClass(this.$el, this.clsBelow, below);
5976
5983
  addClass(this.$el, this.clsFixed);
5977
5984
  },
5978
5985
  setActive(active) {
5979
5986
  const prev = this.active;
5980
5987
  this.active = active;
5981
5988
  if (active) {
5982
- replaceClass(this.selTarget, this.clsInactive, this.clsActive);
5989
+ replaceClass(this.target, this.clsInactive, this.clsActive);
5983
5990
  prev !== active && trigger(this.$el, "active");
5984
5991
  } else {
5985
- replaceClass(this.selTarget, this.clsActive, this.clsInactive);
5986
- prev !== active && trigger(this.$el, "inactive");
5992
+ replaceClass(this.target, this.clsActive, this.clsInactive);
5993
+ if (prev !== active) {
5994
+ preventTransition(this.target);
5995
+ trigger(this.$el, "inactive");
5996
+ }
5987
5997
  }
5988
5998
  }
5989
5999
  }
@@ -6487,9 +6497,11 @@
6487
6497
  FormCustom: formCustom,
6488
6498
  Grid: grid,
6489
6499
  HeightMatch: heightMatch,
6500
+ HeightPlaceholder: heightPlaceholder,
6490
6501
  HeightViewport: heightViewport,
6491
6502
  Icon: Icon,
6492
6503
  Img: img,
6504
+ Inverse: inverse,
6493
6505
  Leader: leader,
6494
6506
  Margin: Margin,
6495
6507
  Marker: Marker,