uikit 3.23.13 → 3.23.14-dev.be820cd99

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 (128) hide show
  1. package/.prettierignore +1 -0
  2. package/CHANGELOG.md +36 -0
  3. package/dist/css/uikit-core-rtl.css +301 -111
  4. package/dist/css/uikit-core-rtl.min.css +1 -1
  5. package/dist/css/uikit-core.css +301 -111
  6. package/dist/css/uikit-core.min.css +1 -1
  7. package/dist/css/uikit-rtl.css +305 -111
  8. package/dist/css/uikit-rtl.min.css +1 -1
  9. package/dist/css/uikit.css +305 -111
  10. package/dist/css/uikit.min.css +1 -1
  11. package/dist/js/components/countdown.js +1 -1
  12. package/dist/js/components/countdown.min.js +1 -1
  13. package/dist/js/components/filter.js +49 -23
  14. package/dist/js/components/filter.min.js +1 -1
  15. package/dist/js/components/lightbox-panel.js +19 -14
  16. package/dist/js/components/lightbox-panel.min.js +1 -1
  17. package/dist/js/components/lightbox.js +19 -14
  18. package/dist/js/components/lightbox.min.js +1 -1
  19. package/dist/js/components/notification.js +1 -1
  20. package/dist/js/components/notification.min.js +1 -1
  21. package/dist/js/components/parallax.js +2 -2
  22. package/dist/js/components/parallax.min.js +1 -1
  23. package/dist/js/components/slider-parallax.js +2 -2
  24. package/dist/js/components/slider-parallax.min.js +1 -1
  25. package/dist/js/components/slider.js +8 -3
  26. package/dist/js/components/slider.min.js +1 -1
  27. package/dist/js/components/slideshow-parallax.js +2 -2
  28. package/dist/js/components/slideshow-parallax.min.js +1 -1
  29. package/dist/js/components/slideshow.js +8 -3
  30. package/dist/js/components/slideshow.min.js +1 -1
  31. package/dist/js/components/sortable.js +48 -22
  32. package/dist/js/components/sortable.min.js +1 -1
  33. package/dist/js/components/tooltip.js +3 -3
  34. package/dist/js/components/tooltip.min.js +1 -1
  35. package/dist/js/components/upload.js +2 -2
  36. package/dist/js/components/upload.min.js +1 -1
  37. package/dist/js/uikit-core.js +136 -63
  38. package/dist/js/uikit-core.min.js +1 -1
  39. package/dist/js/uikit-icons.js +1 -1
  40. package/dist/js/uikit-icons.min.js +1 -1
  41. package/dist/js/uikit.js +185 -90
  42. package/dist/js/uikit.min.js +1 -1
  43. package/eslint.config.mjs +1 -1
  44. package/package.json +1 -1
  45. package/src/images/backgrounds/form-checkbox.svg +2 -2
  46. package/src/images/components/navbar-toggle-icon.svg +14 -7
  47. package/src/js/api/options.js +1 -1
  48. package/src/js/components/lightbox-panel.js +6 -4
  49. package/src/js/components/upload.js +1 -3
  50. package/src/js/core/drop.js +3 -8
  51. package/src/js/core/dropnav.js +4 -4
  52. package/src/js/core/img.js +1 -1
  53. package/src/js/core/index.js +1 -0
  54. package/src/js/core/navbar.js +3 -5
  55. package/src/js/core/overflow-fade.js +67 -0
  56. package/src/js/core/scrollspy.js +10 -10
  57. package/src/js/core/sticky.js +18 -16
  58. package/src/js/core/toggle.js +3 -5
  59. package/src/js/core/video.js +36 -10
  60. package/src/js/mixin/internal/animate-fade.js +32 -15
  61. package/src/js/mixin/internal/animate-slide.js +27 -9
  62. package/src/js/mixin/modal.js +3 -4
  63. package/src/js/mixin/slider.js +3 -1
  64. package/src/js/mixin/togglable.js +1 -1
  65. package/src/js/util/animation.js +3 -4
  66. package/src/js/util/await.js +7 -0
  67. package/src/js/util/player.js +1 -3
  68. package/src/js/util/scroll.js +2 -2
  69. package/src/js/util/selector.js +1 -1
  70. package/src/js/util/viewport.js +3 -1
  71. package/src/less/components/base.less +19 -4
  72. package/src/less/components/card.less +40 -1
  73. package/src/less/components/countdown.less +4 -42
  74. package/src/less/components/form.less +87 -67
  75. package/src/less/components/heading.less +0 -84
  76. package/src/less/components/icon.less +44 -0
  77. package/src/less/components/navbar.less +23 -9
  78. package/src/less/components/position.less +1 -1
  79. package/src/less/components/section.less +33 -0
  80. package/src/less/components/subnav.less +1 -1
  81. package/src/less/components/utility.less +45 -0
  82. package/src/less/components/visibility.less +1 -1
  83. package/src/less/components/width.less +0 -5
  84. package/src/less/theme/card.less +13 -0
  85. package/src/less/theme/icon.less +14 -0
  86. package/src/scss/components/base.scss +19 -4
  87. package/src/scss/components/card.scss +35 -1
  88. package/src/scss/components/countdown.scss +2 -40
  89. package/src/scss/components/form.scss +73 -55
  90. package/src/scss/components/heading.scss +0 -83
  91. package/src/scss/components/icon.scss +22 -0
  92. package/src/scss/components/navbar.scss +23 -9
  93. package/src/scss/components/position.scss +1 -1
  94. package/src/scss/components/section.scss +33 -0
  95. package/src/scss/components/subnav.scss +1 -1
  96. package/src/scss/components/utility.scss +45 -0
  97. package/src/scss/components/visibility.scss +1 -1
  98. package/src/scss/components/width.scss +0 -15
  99. package/src/scss/mixins-theme.scss +28 -8
  100. package/src/scss/mixins.scss +25 -8
  101. package/src/scss/variables-theme.scss +27 -30
  102. package/src/scss/variables.scss +25 -30
  103. package/tests/article.html +7 -7
  104. package/tests/base.html +13 -13
  105. package/tests/card.html +9 -1
  106. package/tests/column.html +1 -1
  107. package/tests/countdown.html +595 -8
  108. package/tests/cover.html +7 -13
  109. package/tests/dropbar.html +3 -3
  110. package/tests/dropdown.html +13 -13
  111. package/tests/dropnav.html +9 -9
  112. package/tests/form.html +56 -3
  113. package/tests/icon.html +31 -0
  114. package/tests/index.html +68 -58
  115. package/tests/js/index.js +76 -83
  116. package/tests/lightbox.html +4 -4
  117. package/tests/link.html +71 -8
  118. package/tests/modal.html +1 -1
  119. package/tests/navbar.html +32 -32
  120. package/tests/notification.html +5 -5
  121. package/tests/search.html +3 -3
  122. package/tests/slideshow.html +3 -3
  123. package/tests/sticky-navbar.html +72 -72
  124. package/tests/subnav.html +106 -2
  125. package/tests/tab.html +68 -21
  126. package/tests/table.html +8 -8
  127. package/tests/utility.html +159 -1
  128. package/tests/video.html +137 -10
package/dist/js/uikit.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.23.13 | https://www.getuikit.com | (c) 2014 - 2025 YOOtheme | MIT License */
1
+ /*! UIkit 3.23.14-dev.be820cd99 | https://www.getuikit.com | (c) 2014 - 2025 YOOtheme | MIT License */
2
2
 
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
@@ -442,7 +442,7 @@
442
442
  function _doQuery(context, queryFn, selector) {
443
443
  try {
444
444
  return context[queryFn](selector);
445
- } catch (e) {
445
+ } catch {
446
446
  return null;
447
447
  }
448
448
  }
@@ -643,13 +643,13 @@
643
643
  const clsTransition = "uk-transition";
644
644
  const transitionEnd = "transitionend";
645
645
  const transitionCanceled = "transitioncanceled";
646
- function transition$1(element, props, duration = 400, timing = "linear") {
646
+ function transition$1(element, props, duration = 400, timing = "linear", skipReflow) {
647
647
  duration = Math.round(duration);
648
648
  return Promise.all(
649
649
  toNodes(element).map(
650
650
  (element2) => new Promise((resolve, reject) => {
651
- for (const name in props) {
652
- css(element2, name);
651
+ if (!skipReflow) {
652
+ element2.offsetHeight;
653
653
  }
654
654
  const timer = setTimeout(() => trigger(element2, transitionEnd), duration);
655
655
  once(
@@ -1186,7 +1186,7 @@
1186
1186
  try {
1187
1187
  data = JSON.parse(data);
1188
1188
  return youtube && (data == null ? void 0 : data.id) === id && data.event === "onReady" || vimeo && Number(data == null ? void 0 : data.player_id) === id;
1189
- } catch (e) {
1189
+ } catch {
1190
1190
  }
1191
1191
  });
1192
1192
  el.src = `${el.src}${includes(el.src, "?") ? "&" : "?"}${youtube ? "enablejsapi=1" : `api=1&player_id=${id}`}`;
@@ -1332,10 +1332,12 @@
1332
1332
  return rect;
1333
1333
  }
1334
1334
  function getCoveringElement(target) {
1335
+ const { document } = toWindow(target);
1336
+ target = target || document.body;
1335
1337
  const { left, width, top } = dimensions$1(target);
1336
1338
  for (const position of top ? [0, top] : [0]) {
1337
1339
  let coverEl;
1338
- for (const el of toWindow(target).document.elementsFromPoint(left + width / 2, position)) {
1340
+ for (const el of document.elementsFromPoint(left + width / 2, position)) {
1339
1341
  if (!el.contains(target) && // If e.g. Offcanvas is not yet closed
1340
1342
  !hasClass(el, "uk-togglable-leave") && (hasPosition(el, "fixed") && zIndex(
1341
1343
  parents(target).reverse().find(
@@ -1865,7 +1867,7 @@
1865
1867
  }
1866
1868
  return options2;
1867
1869
  }, {}) : {};
1868
- } catch (e) {
1870
+ } catch {
1869
1871
  return {};
1870
1872
  }
1871
1873
  }
@@ -2128,6 +2130,13 @@
2128
2130
  };
2129
2131
  }
2130
2132
 
2133
+ function awaitFrame() {
2134
+ return new Promise((resolve) => requestAnimationFrame(resolve));
2135
+ }
2136
+ function awaitTimeout(timeout) {
2137
+ return new Promise((resolve) => setTimeout(resolve, timeout));
2138
+ }
2139
+
2131
2140
  const clsLeave = "uk-transition-leave";
2132
2141
  const clsEnter = "uk-transition-enter";
2133
2142
  function fade(action, target, duration, stagger = 0) {
@@ -2138,12 +2147,18 @@
2138
2147
  const wrapIndexFn = (fn) => () => isCurrentIndex() ? fn() : Promise.reject();
2139
2148
  const leaveFn = wrapIndexFn(async () => {
2140
2149
  addClass(target, clsLeave);
2141
- await (stagger ? Promise.all(
2142
- getTransitionNodes(target).map(async (child, i) => {
2143
- await awaitTimeout(i * stagger);
2144
- return Transition.start(child, propsOut, duration / 2, "ease");
2145
- })
2146
- ) : Transition.start(target, propsOut, duration / 2, "ease"));
2150
+ await (stagger ? getTransitionNodes(target).reduce(async (promise, child, i, array) => {
2151
+ await promise;
2152
+ if (!isInView(child) || !isCurrentIndex()) {
2153
+ css(child, propsOut);
2154
+ return;
2155
+ }
2156
+ await awaitTimeout(stagger);
2157
+ const transition = Transition.start(child, propsOut, duration / 2, "ease");
2158
+ if (array.length - 1 === i) {
2159
+ await transition;
2160
+ }
2161
+ }, Promise.resolve()) : Transition.start(target, propsOut, duration / 2, "ease"));
2147
2162
  removeClass(target, clsLeave);
2148
2163
  });
2149
2164
  const enterFn = wrapIndexFn(async () => {
@@ -2162,13 +2177,20 @@
2162
2177
  if (stagger) {
2163
2178
  const nodes = getTransitionNodes(target);
2164
2179
  css(children(target), propsOut);
2165
- transitions = nodes.map(async (child, i) => {
2166
- await awaitTimeout(i * stagger);
2167
- await Transition.start(child, propsIn, duration / 2, "ease");
2168
- if (isCurrentIndex()) {
2180
+ transitions = nodes.reduce(async (promise, child, i, array) => {
2181
+ await promise;
2182
+ if (!isInView(child) || !isCurrentIndex()) {
2169
2183
  resetProps(child, propsIn);
2184
+ return;
2170
2185
  }
2171
- });
2186
+ await awaitTimeout(stagger);
2187
+ const transition = Transition.start(child, propsIn, duration / 2, "ease").then(
2188
+ () => isCurrentIndex() && resetProps(child, propsIn)
2189
+ );
2190
+ if (array.length - 1 === i) {
2191
+ await transition;
2192
+ }
2193
+ }, Promise.resolve());
2172
2194
  targetDuration += nodes.length * stagger;
2173
2195
  }
2174
2196
  if (!stagger || oldHeight !== newHeight) {
@@ -2200,31 +2222,35 @@
2200
2222
  function getTransitionNodes(target) {
2201
2223
  return getRows(children(target)).flat().filter(isVisible);
2202
2224
  }
2203
- function awaitTimeout(timeout) {
2204
- return new Promise((resolve) => setTimeout(resolve, timeout));
2205
- }
2206
2225
 
2207
2226
  async function slide(action, target, duration) {
2208
2227
  await awaitFrame();
2209
2228
  let nodes = children(target);
2210
2229
  const currentProps = nodes.map((el) => getProps$1(el, true));
2211
2230
  const targetProps = { ...css(target, ["height", "padding"]), display: "block" };
2231
+ const transitionNodes = nodes.filter((node) => isInView(node));
2212
2232
  const targets = nodes.concat(target);
2213
2233
  await Promise.all(targets.map(Transition.cancel));
2214
2234
  css(targets, "transitionProperty", "none");
2215
2235
  await action();
2216
- nodes = nodes.concat(children(target).filter((el) => !includes(nodes, el)));
2236
+ const newNodes = children(target).filter((el) => !includes(nodes, el));
2237
+ nodes = nodes.concat(newNodes);
2217
2238
  await Promise.resolve();
2218
2239
  css(targets, "transitionProperty", "");
2219
2240
  const targetStyle = attr(target, "style");
2220
2241
  const targetPropsTo = css(target, ["height", "padding"]);
2221
2242
  const [propsTo, propsFrom] = getTransitionProps(target, nodes, currentProps);
2222
2243
  const attrsTo = nodes.map((el) => ({ style: attr(el, "style") }));
2244
+ transitionNodes.push(...nodes.filter((node) => isInView(node)));
2223
2245
  nodes.forEach((el, i) => propsFrom[i] && css(el, propsFrom[i]));
2224
2246
  css(target, targetProps);
2225
2247
  trigger(target, "scroll");
2226
2248
  await awaitFrame();
2227
- const transitions = nodes.map((el, i) => parent(el) === target && Transition.start(el, propsTo[i], duration, "ease")).concat(Transition.start(target, targetPropsTo, duration, "ease"));
2249
+ const transitions = nodes.map((el, i) => {
2250
+ if (parent(el) === target && transitionNodes.includes(el)) {
2251
+ return Transition.start(el, propsTo[i], duration, "ease", !newNodes.includes(el));
2252
+ }
2253
+ }).concat(Transition.start(target, targetPropsTo, duration, "ease", true));
2228
2254
  try {
2229
2255
  await Promise.all(transitions);
2230
2256
  nodes.forEach((el, i) => {
@@ -2234,7 +2260,7 @@
2234
2260
  }
2235
2261
  });
2236
2262
  attr(target, "style", targetStyle);
2237
- } catch (e) {
2263
+ } catch {
2238
2264
  attr(nodes, "style", "");
2239
2265
  resetProps(target, targetProps);
2240
2266
  }
@@ -2275,17 +2301,19 @@
2275
2301
  }
2276
2302
  function getPositionWithMargin(el) {
2277
2303
  const { height, width } = dimensions$1(el);
2304
+ let { top, left } = position(el);
2305
+ const viewport = offsetViewport(el.ownerDocument);
2306
+ top = clamp(top, viewport.top - height - viewport.height, viewport.bottom + viewport.height);
2307
+ left = clamp(left, viewport.left - width - viewport.width, viewport.right + viewport.width);
2278
2308
  return {
2279
2309
  height,
2280
2310
  width,
2311
+ top,
2312
+ left,
2281
2313
  transform: "",
2282
- ...position(el),
2283
2314
  ...css(el, ["marginTop", "marginLeft"])
2284
2315
  };
2285
2316
  }
2286
- function awaitFrame() {
2287
- return new Promise((resolve) => requestAnimationFrame(resolve));
2288
- }
2289
2317
 
2290
2318
  var Animate = {
2291
2319
  props: {
@@ -2567,7 +2595,7 @@
2567
2595
  if (startsWith(sources, "[")) {
2568
2596
  try {
2569
2597
  sources = JSON.parse(sources);
2570
- } catch (e) {
2598
+ } catch {
2571
2599
  sources = [];
2572
2600
  }
2573
2601
  } else {
@@ -2625,7 +2653,7 @@
2625
2653
  const props = {
2626
2654
  overflowY: CSS.supports("overflow", "clip") ? "clip" : "hidden",
2627
2655
  touchAction: "none",
2628
- paddingRight: width(window) - scrollingElement.clientWidth || ""
2656
+ scrollbarGutter: "stable"
2629
2657
  };
2630
2658
  css(scrollingElement, props);
2631
2659
  return () => {
@@ -2778,7 +2806,7 @@
2778
2806
  })
2779
2807
  );
2780
2808
  return true;
2781
- } catch (e) {
2809
+ } catch {
2782
2810
  return false;
2783
2811
  }
2784
2812
  },
@@ -3053,12 +3081,10 @@
3053
3081
  toggle() {
3054
3082
  return this.isToggled() ? this.hide() : this.show();
3055
3083
  },
3056
- show() {
3084
+ async show() {
3057
3085
  if (this.container && parent(this.$el) !== this.container) {
3058
3086
  append(this.container, this.$el);
3059
- return new Promise(
3060
- (resolve) => requestAnimationFrame(() => this.show().then(resolve))
3061
- );
3087
+ await awaitFrame();
3062
3088
  }
3063
3089
  return this.toggleElement(this.$el, true, animate$1);
3064
3090
  },
@@ -3756,7 +3782,7 @@
3756
3782
  };
3757
3783
  App.util = util;
3758
3784
  App.options = {};
3759
- App.version = "3.23.13";
3785
+ App.version = "3.23.14-dev.be820cd99";
3760
3786
 
3761
3787
  const PREFIX = "uk-";
3762
3788
  const DATA = "__uikit__";
@@ -4201,8 +4227,9 @@
4201
4227
  trigger(next, "itemshown", [this]);
4202
4228
  stack.shift();
4203
4229
  this._transitioner = null;
4230
+ await awaitFrame();
4204
4231
  if (stack.length) {
4205
- requestAnimationFrame(() => stack.length && this.show(stack.shift(), true));
4232
+ this.show(stack.shift(), true);
4206
4233
  }
4207
4234
  },
4208
4235
  getIndex(index = this.index, prev = this.index) {
@@ -4579,7 +4606,7 @@
4579
4606
  allowfullscreen: "",
4580
4607
  style: "max-width: 100%; box-sizing: border-box;",
4581
4608
  "uk-responsive": "",
4582
- "uk-video": `${Boolean(this.videoAutoplay)}`
4609
+ "uk-video": Boolean(this.videoAutoplay)
4583
4610
  };
4584
4611
  if (type === "image" || isImage(src)) {
4585
4612
  const img = createEl("img");
@@ -4598,8 +4625,9 @@
4598
4625
  playsinline: "",
4599
4626
  controls: inline ? null : "",
4600
4627
  loop: inline ? "" : null,
4628
+ muted: inline ? "" : null,
4601
4629
  poster: this.videoAutoplay ? null : item.poster,
4602
- "uk-video": inline ? "automute: true" : Boolean(this.videoAutoplay),
4630
+ "uk-video": Boolean(this.videoAutoplay),
4603
4631
  ...attrs
4604
4632
  });
4605
4633
  on(video, "loadedmetadata", () => this.setItem(item, video));
@@ -4645,7 +4673,7 @@
4645
4673
  ...attrs
4646
4674
  })
4647
4675
  );
4648
- } catch (e) {
4676
+ } catch {
4649
4677
  this.setError(item);
4650
4678
  }
4651
4679
  }
@@ -4712,7 +4740,8 @@
4712
4740
  src: item.thumb,
4713
4741
  loop: "",
4714
4742
  playsinline: "",
4715
- "uk-video": `autoplay: ${Boolean(videoAutoplay)}; automute: true`
4743
+ muted: "",
4744
+ "uk-video": videoAutoplay === "inline"
4716
4745
  }) : createEl("canvas");
4717
4746
  if (item.thumbRatio) {
4718
4747
  el.style.aspectRatio = item.thumbRatio;
@@ -6556,7 +6585,7 @@
6556
6585
  if (prop in xhr) {
6557
6586
  try {
6558
6587
  xhr[prop] = env[prop];
6559
- } catch (e) {
6588
+ } catch {
6560
6589
  }
6561
6590
  }
6562
6591
  }
@@ -6896,63 +6925,77 @@
6896
6925
  args: "autoplay",
6897
6926
  props: {
6898
6927
  automute: Boolean,
6899
- autoplay: Boolean
6928
+ autoplay: Boolean,
6929
+ restart: Boolean,
6930
+ hoverTarget: Boolean
6900
6931
  },
6901
6932
  data: {
6902
6933
  automute: false,
6903
- autoplay: true
6934
+ autoplay: true,
6935
+ restart: false,
6936
+ hoverTarget: false
6904
6937
  },
6905
6938
  beforeConnect() {
6906
- if (this.autoplay === "inview" && !hasAttr(this.$el, "preload")) {
6939
+ const isVideo = isTag(this.$el, "video");
6940
+ if (this.autoplay === "inview" && isVideo && !hasAttr(this.$el, "preload")) {
6907
6941
  this.$el.preload = "none";
6908
6942
  }
6909
- if (isTag(this.$el, "iframe") && !hasAttr(this.$el, "allow")) {
6943
+ if (!isVideo && !hasAttr(this.$el, "allow")) {
6910
6944
  this.$el.allow = "autoplay";
6911
6945
  }
6912
6946
  if (this.autoplay === "hover") {
6913
- if (isTag(this.$el, "video")) {
6947
+ if (isVideo) {
6914
6948
  this.$el.tabIndex = 0;
6915
6949
  } else {
6916
6950
  this.autoplay = true;
6917
6951
  }
6918
6952
  }
6919
- if (this.automute) {
6953
+ if (this.automute || hasAttr(this.$el, "muted")) {
6920
6954
  mute(this.$el);
6921
6955
  }
6922
6956
  },
6923
6957
  events: [
6924
6958
  {
6925
6959
  name: `${pointerEnter} focusin`,
6960
+ el: ({ hoverTarget, $el }) => query(hoverTarget, $el) || $el,
6926
6961
  filter: ({ autoplay }) => includes(autoplay, "hover"),
6927
6962
  handler(e) {
6928
6963
  if (!isTouch(e) || !isPlaying(this.$el)) {
6929
6964
  play(this.$el);
6930
6965
  } else {
6931
- pause(this.$el);
6966
+ pauseHover(this.$el, this.restart);
6932
6967
  }
6933
6968
  }
6934
6969
  },
6935
6970
  {
6936
6971
  name: `${pointerLeave} focusout`,
6972
+ el: ({ hoverTarget, $el }) => query(hoverTarget, $el) || $el,
6937
6973
  filter: ({ autoplay }) => includes(autoplay, "hover"),
6938
6974
  handler(e) {
6939
6975
  if (!isTouch(e)) {
6940
- pause(this.$el);
6976
+ pauseHover(this.$el, this.restart);
6941
6977
  }
6942
6978
  }
6943
6979
  }
6944
6980
  ],
6945
6981
  observe: [
6946
6982
  intersection({
6947
- filter: ({ autoplay }) => autoplay !== "hover",
6948
- handler([{ isIntersecting }]) {
6983
+ filter: ({ $el }) => $el.preload === "none",
6984
+ handler([{ target }]) {
6985
+ target.preload = "";
6986
+ this.$reset();
6987
+ }
6988
+ }),
6989
+ intersection({
6990
+ filter: ({ $el, autoplay }) => autoplay !== "hover" && $el.preload !== "none",
6991
+ handler([{ isIntersecting, target }]) {
6949
6992
  if (!document.fullscreenElement) {
6950
6993
  if (isIntersecting) {
6951
6994
  if (this.autoplay) {
6952
- play(this.$el);
6995
+ play(target);
6953
6996
  }
6954
6997
  } else {
6955
- pause(this.$el);
6998
+ pauseHover(target, this.restart);
6956
6999
  }
6957
7000
  }
6958
7001
  },
@@ -6966,6 +7009,12 @@
6966
7009
  function isPlaying(videoEl) {
6967
7010
  return !videoEl.paused && !videoEl.ended;
6968
7011
  }
7012
+ function pauseHover(el, restart) {
7013
+ pause(el);
7014
+ if (restart && isTag(el, "video")) {
7015
+ el.currentTime = 0;
7016
+ }
7017
+ }
6969
7018
 
6970
7019
  var cover = {
6971
7020
  mixins: [Video],
@@ -7012,7 +7061,7 @@
7012
7061
 
7013
7062
  let active;
7014
7063
  var drop = {
7015
- mixins: [Container, Position, Togglable],
7064
+ mixins: [Class, Container, Position, Togglable],
7016
7065
  args: "pos",
7017
7066
  props: {
7018
7067
  mode: "list",
@@ -7027,7 +7076,6 @@
7027
7076
  delayShow: Number,
7028
7077
  delayHide: Number,
7029
7078
  autoUpdate: Boolean,
7030
- clsDrop: String,
7031
7079
  animateOut: Boolean,
7032
7080
  bgScroll: Boolean,
7033
7081
  closeOnScroll: Boolean
@@ -7045,7 +7093,6 @@
7045
7093
  delayShow: 0,
7046
7094
  delayHide: 800,
7047
7095
  autoUpdate: true,
7048
- clsDrop: false,
7049
7096
  animateOut: false,
7050
7097
  bgScroll: true,
7051
7098
  animation: ["uk-animation-fade"],
@@ -7073,11 +7120,8 @@
7073
7120
  created() {
7074
7121
  this.tracker = new MouseTracker();
7075
7122
  },
7076
- beforeConnect() {
7077
- this.clsDrop = this.$props.clsDrop || this.$options.id;
7078
- },
7079
7123
  connected() {
7080
- addClass(this.$el, "uk-drop", this.clsDrop);
7124
+ addClass(this.$el, "uk-drop");
7081
7125
  if (this.toggle && !this.targetEl) {
7082
7126
  this.targetEl = createToggleComponent(this);
7083
7127
  }
@@ -7386,7 +7430,6 @@
7386
7430
  mixins: [Class, Container],
7387
7431
  props: {
7388
7432
  align: String,
7389
- clsDrop: String,
7390
7433
  boundary: Boolean,
7391
7434
  dropbar: Boolean,
7392
7435
  dropbarAnchor: Boolean,
@@ -7410,6 +7453,7 @@
7410
7453
  boundary: true,
7411
7454
  dropbar: false,
7412
7455
  dropbarAnchor: false,
7456
+ flip: true,
7413
7457
  delayShow: 160,
7414
7458
  duration: 200,
7415
7459
  container: false,
@@ -7422,7 +7466,7 @@
7422
7466
  return null;
7423
7467
  }
7424
7468
  dropbar = this._dropbar || query(dropbar, this.$el) || $(`+ .${this.clsDropbar}`, this.$el);
7425
- return dropbar ? dropbar : this._dropbar = $("<div></div>");
7469
+ return dropbar ? dropbar : this._dropbar = $("<div>");
7426
7470
  },
7427
7471
  dropContainer(_, $el) {
7428
7472
  return this.container || $el;
@@ -7668,10 +7712,10 @@
7668
7712
  this.dropdowns.filter((el) => !this.getDropdown(el)),
7669
7713
  {
7670
7714
  ...this.$props,
7671
- flip: false,
7715
+ flip: this.flip && !this.$props.dropbar,
7672
7716
  shift: true,
7673
7717
  pos: `bottom-${this.align}`,
7674
- boundary: this.boundary === true ? this.$el : this.boundary
7718
+ boundaryX: this.boundary === true ? this.$el : this.boundary
7675
7719
  }
7676
7720
  );
7677
7721
  }
@@ -8080,7 +8124,7 @@
8080
8124
 
8081
8125
  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>";
8082
8126
 
8083
- var navbarToggleIcon = "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\"><style>.uk-navbar-toggle-icon svg&gt;[class*=&quot;line-&quot;]{transition:0.2s ease-in-out;transition-property:transform, opacity;transform-origin:center;opacity:1}.uk-navbar-toggle-icon 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 width=\"20\" height=\"2\" y=\"3\" class=\"line-1\"/><rect width=\"20\" height=\"2\" y=\"9\" class=\"line-2\"/><rect width=\"20\" height=\"2\" y=\"9\" class=\"line-3\"/><rect width=\"20\" height=\"2\" y=\"15\" class=\"line-4\"/></svg>";
8127
+ var navbarToggleIcon = "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\"><style>.uk-navbar-toggle-icon svg&gt;[class*=&quot;line-&quot;]{transition:0.2s ease-in-out;transition-property:transform, opacity;transform-origin:center;opacity:1}.uk-navbar-toggle-icon svg&gt;.line-3{opacity:0}[aria-expanded=&quot;true&quot;].uk-navbar-toggle-icon svg&gt;.line-3,[aria-expanded=&quot;true&quot;]&gt;.uk-navbar-toggle-icon svg&gt;.line-3{opacity:1}[aria-expanded=&quot;true&quot;].uk-navbar-toggle-icon svg&gt;.line-2,[aria-expanded=&quot;true&quot;]&gt;.uk-navbar-toggle-icon svg&gt;.line-2{transform:rotate(45deg)}[aria-expanded=&quot;true&quot;].uk-navbar-toggle-icon svg&gt;.line-3,[aria-expanded=&quot;true&quot;]&gt;.uk-navbar-toggle-icon svg&gt;.line-3{transform:rotate(-45deg)}[aria-expanded=&quot;true&quot;].uk-navbar-toggle-icon svg&gt;.line-1,[aria-expanded=&quot;true&quot;]&gt;.uk-navbar-toggle-icon svg&gt;.line-1,[aria-expanded=&quot;true&quot;].uk-navbar-toggle-icon svg&gt;.line-4,[aria-expanded=&quot;true&quot;]&gt;.uk-navbar-toggle-icon svg&gt;.line-4{opacity:0}[aria-expanded=&quot;true&quot;].uk-navbar-toggle-icon svg&gt;.line-1,[aria-expanded=&quot;true&quot;]&gt;.uk-navbar-toggle-icon svg&gt;.line-1{transform:translateY(6px) scaleX(0)}[aria-expanded=&quot;true&quot;].uk-navbar-toggle-icon svg&gt;.line-4,[aria-expanded=&quot;true&quot;]&gt;.uk-navbar-toggle-icon svg&gt;.line-4{transform:translateY(-6px) scaleX(0)}</style><rect width=\"20\" height=\"2\" y=\"3\" class=\"line-1\"/><rect width=\"20\" height=\"2\" y=\"9\" class=\"line-2\"/><rect width=\"20\" height=\"2\" y=\"9\" class=\"line-3\"/><rect width=\"20\" height=\"2\" y=\"15\" class=\"line-4\"/></svg>";
8084
8128
 
8085
8129
  var overlayIcon = "<svg width=\"40\" height=\"40\" viewBox=\"0 0 40 40\"><rect width=\"1\" height=\"40\" x=\"19\" y=\"0\"/><rect width=\"40\" height=\"1\" x=\"0\" y=\"19\"/></svg>";
8086
8130
 
@@ -8671,6 +8715,7 @@
8671
8715
  dropbarTransparentMode: Boolean
8672
8716
  },
8673
8717
  data: {
8718
+ flip: false,
8674
8719
  delayShow: 200,
8675
8720
  clsDrop: "uk-navbar-dropdown",
8676
8721
  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",
@@ -8705,7 +8750,7 @@
8705
8750
  name: "hide",
8706
8751
  el: ({ dropContainer }) => dropContainer,
8707
8752
  async handler() {
8708
- await awaitMacroTask();
8753
+ await awaitTimeout();
8709
8754
  if (this._transparent && (!active || !this.dropContainer.contains(active.$el))) {
8710
8755
  addClass(this.navbarContainer, clsNavbarTransparent);
8711
8756
  this._transparent = null;
@@ -8732,9 +8777,6 @@
8732
8777
  }
8733
8778
  }
8734
8779
  };
8735
- function awaitMacroTask() {
8736
- return new Promise((resolve) => setTimeout(resolve));
8737
- }
8738
8780
 
8739
8781
  var offcanvas = {
8740
8782
  mixins: [Modal],
@@ -8895,6 +8937,59 @@
8895
8937
  }
8896
8938
  };
8897
8939
 
8940
+ var overflowFade = {
8941
+ data: {
8942
+ fadeDuration: 0.05
8943
+ },
8944
+ events: {
8945
+ name: "scroll",
8946
+ self: true,
8947
+ passive: true,
8948
+ handler() {
8949
+ this.$emit();
8950
+ }
8951
+ },
8952
+ observe: [
8953
+ mutation({
8954
+ options: {
8955
+ subtree: true,
8956
+ childList: true
8957
+ }
8958
+ }),
8959
+ resize({
8960
+ target: ({ $el }) => [$el, ...children($el)]
8961
+ })
8962
+ ],
8963
+ update: {
8964
+ read() {
8965
+ const overflow = [];
8966
+ for (const prop of ["Width", "Height"]) {
8967
+ overflow.push(this.$el[`scroll${prop}`] - this.$el[`client${prop}`]);
8968
+ }
8969
+ return { overflow };
8970
+ },
8971
+ write({ overflow }) {
8972
+ for (let i = 0; i < 2; i++) {
8973
+ toggleClass(
8974
+ this.$el,
8975
+ `${this.$options.id}-${i ? "vertical" : "horizontal"}`,
8976
+ overflow[i] && !overflow[i - 1]
8977
+ );
8978
+ if (!overflow[i - 1]) {
8979
+ const dir = i ? "Top" : "Left";
8980
+ const percent = overflow[i] ? this.$el[`scroll${dir}`] / overflow[i] : 0;
8981
+ const toValue = (value) => overflow[i] ? clamp((this.fadeDuration - value) / this.fadeDuration) : 1;
8982
+ css(this.$el, {
8983
+ "--uk-overflow-fade-start-opacity": toValue(percent),
8984
+ "--uk-overflow-fade-end-opacity": toValue(1 - percent)
8985
+ });
8986
+ }
8987
+ }
8988
+ },
8989
+ events: ["resize"]
8990
+ }
8991
+ };
8992
+
8898
8993
  var responsive = {
8899
8994
  props: ["width", "height"],
8900
8995
  connected() {
@@ -8988,7 +9083,7 @@
8988
9083
  },
8989
9084
  disconnected() {
8990
9085
  for (const [el, state] of this.elementData.entries()) {
8991
- removeClass(el, clsInView, (state == null ? void 0 : state.cls) || "");
9086
+ removeClass(el, clsInView, state.cls || "");
8992
9087
  }
8993
9088
  delete this.elementData;
8994
9089
  },
@@ -9019,7 +9114,8 @@
9019
9114
  for (const [el, state] of this.elementData.entries()) {
9020
9115
  if (state.show && !state.inview && !state.queued) {
9021
9116
  state.queued = true;
9022
- data.promise = (data.promise || Promise.resolve()).then(() => new Promise((resolve) => setTimeout(resolve, this.delay))).then(() => {
9117
+ data.promise = (data.promise || Promise.resolve()).then(async () => {
9118
+ await awaitTimeout(state.show ? this.delay : 0);
9023
9119
  this.toggle(el, true);
9024
9120
  setTimeout(() => {
9025
9121
  state.queued = false;
@@ -9215,20 +9311,19 @@
9215
9311
  name: "load hashchange popstate",
9216
9312
  el: () => window,
9217
9313
  filter: ({ targetOffset }) => targetOffset !== false,
9218
- handler() {
9314
+ async handler() {
9219
9315
  const { scrollingElement } = document;
9220
9316
  if (!location.hash || scrollingElement.scrollTop === 0) {
9221
9317
  return;
9222
9318
  }
9223
- setTimeout(() => {
9224
- const targetOffset = offset($(location.hash));
9225
- const elOffset = offset(this.$el);
9226
- if (this.isFixed && intersectRect(targetOffset, elOffset)) {
9227
- scrollingElement.scrollTop = Math.ceil(
9228
- targetOffset.top - elOffset.height - toPx(this.targetOffset, "height", this.placeholder) - toPx(this.offset, "height", this.placeholder)
9229
- );
9230
- }
9231
- });
9319
+ await awaitTimeout();
9320
+ const targetOffset = offset($(location.hash));
9321
+ const elOffset = offset(this.$el);
9322
+ if (this.isFixed && intersectRect(targetOffset, elOffset)) {
9323
+ scrollingElement.scrollTop = Math.ceil(
9324
+ targetOffset.top - elOffset.height - toPx(this.targetOffset, "height", this.placeholder) - toPx(this.offset, "height", this.placeholder)
9325
+ );
9326
+ }
9232
9327
  }
9233
9328
  }
9234
9329
  ],
@@ -9487,10 +9582,11 @@
9487
9582
  css(el, { position: "", top: "", marginTop: "", width: "" });
9488
9583
  }
9489
9584
  const clsTransitionDisable = "uk-transition-disable";
9490
- function preventTransition(element) {
9585
+ async function preventTransition(element) {
9491
9586
  if (!hasClass(element, clsTransitionDisable)) {
9492
9587
  addClass(element, clsTransitionDisable);
9493
- requestAnimationFrame(() => removeClass(element, clsTransitionDisable));
9588
+ await awaitFrame();
9589
+ removeClass(element, clsTransitionDisable);
9494
9590
  }
9495
9591
  }
9496
9592
  function getVisibleParent(element) {
@@ -9828,17 +9924,15 @@
9828
9924
  }
9829
9925
  },
9830
9926
  {
9831
- // mouseenter mouseleave are added because of Firefox bug,
9832
- // where pointerleave is triggered immediately after pointerenter on scroll
9833
- name: `mouseenter mouseleave ${pointerEnter} ${pointerLeave} focus blur`,
9927
+ name: `${pointerEnter} ${pointerLeave} focus blur`,
9834
9928
  filter: ({ mode }) => includes(mode, "hover"),
9835
9929
  handler(e) {
9836
9930
  if (isTouch(e) || this.$el.disabled || document.readyState === "loading") {
9837
9931
  return;
9838
9932
  }
9839
- const show = includes(["mouseenter", pointerEnter, "focus"], e.type);
9933
+ const show = includes([pointerEnter, "focus"], e.type);
9840
9934
  const expanded = this.isToggled(this.target);
9841
- if (!show && (!isBoolean(this._showState) || e.type !== "blur" && matches(this.$el, ":focus") || e.type === "blur" && matches(this.$el, ":hover"))) {
9935
+ if (!show && (!isBoolean(this._showState) || e.type === pointerLeave && matches(this.$el, ":focus") || e.type === "blur" && matches(this.$el, ":hover"))) {
9842
9936
  if (expanded === this._showState) {
9843
9937
  this._showState = null;
9844
9938
  }
@@ -9948,6 +10042,7 @@
9948
10042
  NavbarToggleIcon: NavbarToggleIcon,
9949
10043
  Offcanvas: offcanvas,
9950
10044
  OverflowAuto: overflowAuto,
10045
+ OverflowFade: overflowFade,
9951
10046
  OverlayIcon: IconComponent,
9952
10047
  PaginationNext: PaginationNext,
9953
10048
  PaginationPrevious: PaginationPrevious,