uikit 3.16.7-dev.fcb5a4616 → 3.16.8-dev.dc18e16fb

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 (68) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/css/uikit-core-rtl.css +33 -19
  3. package/dist/css/uikit-core-rtl.min.css +1 -1
  4. package/dist/css/uikit-core.css +33 -19
  5. package/dist/css/uikit-core.min.css +1 -1
  6. package/dist/css/uikit-rtl.css +33 -19
  7. package/dist/css/uikit-rtl.min.css +1 -1
  8. package/dist/css/uikit.css +33 -19
  9. package/dist/css/uikit.min.css +1 -1
  10. package/dist/js/components/countdown.js +1 -1
  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 +16 -37
  15. package/dist/js/components/lightbox-panel.min.js +1 -1
  16. package/dist/js/components/lightbox.js +16 -37
  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 +2 -2
  21. package/dist/js/components/parallax.min.js +1 -1
  22. package/dist/js/components/slider-parallax.js +1 -1
  23. package/dist/js/components/slider-parallax.min.js +1 -1
  24. package/dist/js/components/slider.js +15 -36
  25. package/dist/js/components/slider.min.js +1 -1
  26. package/dist/js/components/slideshow-parallax.js +1 -1
  27. package/dist/js/components/slideshow-parallax.min.js +1 -1
  28. package/dist/js/components/slideshow.js +15 -36
  29. package/dist/js/components/slideshow.min.js +1 -1
  30. package/dist/js/components/sortable.js +1 -1
  31. package/dist/js/components/sortable.min.js +1 -1
  32. package/dist/js/components/tooltip.js +1 -1
  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 +45 -22
  37. package/dist/js/uikit-core.min.js +1 -1
  38. package/dist/js/uikit-icons.js +1 -1
  39. package/dist/js/uikit-icons.min.js +1 -1
  40. package/dist/js/uikit.js +59 -57
  41. package/dist/js/uikit.min.js +1 -1
  42. package/package.json +1 -1
  43. package/src/js/api/boot.js +10 -1
  44. package/src/js/api/observables.js +1 -1
  45. package/src/js/api/watch.js +1 -1
  46. package/src/js/core/accordion.js +4 -0
  47. package/src/js/core/dropnav.js +5 -6
  48. package/src/js/core/navbar.js +14 -4
  49. package/src/js/core/sticky.js +7 -2
  50. package/src/js/mixin/slider-autoplay.js +13 -42
  51. package/src/js/mixin/slider-nav.js +6 -1
  52. package/src/js/util/fastdom.js +2 -2
  53. package/src/js/util/scroll.js +2 -1
  54. package/src/less/components/base.less +0 -1
  55. package/src/less/components/dropbar.less +6 -0
  56. package/src/less/components/dropdown.less +5 -0
  57. package/src/less/components/navbar.less +5 -0
  58. package/src/less/components/visibility.less +25 -5
  59. package/src/scss/components/dropbar.scss +6 -0
  60. package/src/scss/components/dropdown.scss +5 -0
  61. package/src/scss/components/navbar.scss +5 -0
  62. package/src/scss/components/visibility.scss +25 -5
  63. package/src/scss/mixins-theme.scss +0 -1
  64. package/src/scss/mixins.scss +0 -1
  65. package/src/scss/variables-theme.scss +3 -0
  66. package/src/scss/variables.scss +3 -0
  67. package/tests/js/index.js +4 -3
  68. package/tests/navbar.html +2 -2
package/dist/js/uikit.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.16.7-dev.fcb5a4616 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */
1
+ /*! UIkit 3.16.8-dev.dc18e16fb | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */
2
2
 
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
@@ -959,8 +959,8 @@
959
959
  const fastdom = {
960
960
  reads: [],
961
961
  writes: [],
962
- read(task) {
963
- this.reads.push(task);
962
+ read(task, prepend) {
963
+ this.reads[prepend ? "unshift" : "push"](task);
964
964
  scheduleFlush();
965
965
  return task;
966
966
  },
@@ -1738,7 +1738,7 @@
1738
1738
  runWatches(instance, initial);
1739
1739
  }
1740
1740
  instance._watch = null;
1741
- });
1741
+ }, true);
1742
1742
  }
1743
1743
  function runWatches(instance, initial) {
1744
1744
  const values = { ...instance._computed };
@@ -2140,7 +2140,7 @@
2140
2140
  };
2141
2141
  App.util = util;
2142
2142
  App.options = {};
2143
- App.version = "3.16.7-dev.fcb5a4616";
2143
+ App.version = "3.16.8-dev.dc18e16fb";
2144
2144
 
2145
2145
  const PREFIX = "uk-";
2146
2146
  const DATA = "__uikit__";
@@ -2312,7 +2312,16 @@
2312
2312
 
2313
2313
  function boot(App) {
2314
2314
  if (inBrowser && window.MutationObserver) {
2315
- requestAnimationFrame(() => init(App));
2315
+ if (document.readyState === "interactive") {
2316
+ requestAnimationFrame(() => init(App));
2317
+ } else {
2318
+ new MutationObserver((records, observer) => {
2319
+ if (document.body) {
2320
+ init(App);
2321
+ observer.disconnect();
2322
+ }
2323
+ }).observe(document.documentElement, { childList: true });
2324
+ }
2316
2325
  }
2317
2326
  }
2318
2327
  function init(App) {
@@ -2606,7 +2615,7 @@
2606
2615
  };
2607
2616
  },
2608
2617
  {
2609
- target: window,
2618
+ target: () => window,
2610
2619
  ...options
2611
2620
  },
2612
2621
  "scroll"
@@ -2773,6 +2782,9 @@
2773
2782
  "aria-disabled": !this.collapsible && activeItems.length < 2 && active
2774
2783
  });
2775
2784
  attr(content, { role: "region", "aria-labelledby": toggle.id });
2785
+ if (isTag(content, "ul")) {
2786
+ attr(children(content), "role", "presentation");
2787
+ }
2776
2788
  }
2777
2789
  },
2778
2790
  methods: {
@@ -3091,7 +3103,7 @@
3091
3103
  el,
3092
3104
  "touchmove",
3093
3105
  (e) => {
3094
- if (e.targetTouches.length !== 1) {
3106
+ if (e.targetTouches.length !== 1 || matches(e.target, 'input[type="range"')) {
3095
3107
  return;
3096
3108
  }
3097
3109
  let [{ scrollHeight, clientHeight }] = scrollParents(e.target);
@@ -3496,7 +3508,6 @@
3496
3508
  var Dropnav = {
3497
3509
  mixins: [Class, Container],
3498
3510
  props: {
3499
- dropdown: String,
3500
3511
  align: String,
3501
3512
  clsDrop: String,
3502
3513
  boundary: Boolean,
@@ -3515,7 +3526,6 @@
3515
3526
  animateOut: Boolean
3516
3527
  },
3517
3528
  data: {
3518
- dropdown: "> li > a, > ul > li > a",
3519
3529
  align: isRtl ? "right" : "left",
3520
3530
  clsDrop: "uk-dropdown",
3521
3531
  clsDropbar: "uk-dropnav-dropbar",
@@ -3523,7 +3533,8 @@
3523
3533
  dropbar: false,
3524
3534
  dropbarAnchor: false,
3525
3535
  duration: 200,
3526
- container: false
3536
+ container: false,
3537
+ selNavItem: "> li > a, > ul > li > a"
3527
3538
  },
3528
3539
  computed: {
3529
3540
  dropbarAnchor({ dropbarAnchor }, $el) {
@@ -3581,8 +3592,8 @@
3581
3592
  immediate: true
3582
3593
  },
3583
3594
  items: {
3584
- get({ dropdown }, $el) {
3585
- return $$(dropdown, $el);
3595
+ get({ selNavItem }, $el) {
3596
+ return $$(selNavItem, $el);
3586
3597
  },
3587
3598
  watch(items) {
3588
3599
  attr(children(this.$el), "role", "presentation");
@@ -3603,7 +3614,7 @@
3603
3614
  {
3604
3615
  name: "mouseover focusin",
3605
3616
  delegate() {
3606
- return this.dropdown;
3617
+ return this.selNavItem;
3607
3618
  },
3608
3619
  handler({ current, type }) {
3609
3620
  const active2 = this.getActive();
@@ -3620,7 +3631,7 @@
3620
3631
  {
3621
3632
  name: "keydown",
3622
3633
  delegate() {
3623
- return this.dropdown;
3634
+ return this.selNavItem;
3624
3635
  },
3625
3636
  handler(e) {
3626
3637
  const { current, keyCode } = e;
@@ -5132,13 +5143,14 @@
5132
5143
  var navbar = {
5133
5144
  extends: Dropnav,
5134
5145
  data: {
5135
- dropdown: ".uk-navbar-nav > li > a, .uk-navbar-item, .uk-navbar-toggle",
5136
- clsDrop: "uk-navbar-dropdown"
5146
+ clsDrop: "uk-navbar-dropdown",
5147
+ 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"
5148
+ // Simplify with :where() selector once browser target is Safari 14+
5137
5149
  },
5138
5150
  computed: {
5139
5151
  items: {
5140
- get({ dropdown }, $el) {
5141
- return $$(dropdown, $el);
5152
+ get({ selNavItem }, $el) {
5153
+ return $$(selNavItem, $el);
5142
5154
  },
5143
5155
  watch(items) {
5144
5156
  const justify = hasClass(this.$el, "uk-navbar-justify");
@@ -5146,7 +5158,14 @@
5146
5158
  ".uk-navbar-nav, .uk-navbar-left, .uk-navbar-right",
5147
5159
  this.$el
5148
5160
  )) {
5149
- css(container, "flexGrow", justify ? $$(this.dropdown, container).length : "");
5161
+ css(
5162
+ container,
5163
+ "flexGrow",
5164
+ justify ? $$(
5165
+ ".uk-navbar-nav > li > a, .uk-navbar-item, .uk-navbar-toggle",
5166
+ container
5167
+ ).length : ""
5168
+ );
5150
5169
  }
5151
5170
  attr($$(".uk-navbar-nav", this.$el), "role", "group");
5152
5171
  attr($$(".uk-navbar-nav > *", this.$el), "role", "presentation");
@@ -5701,7 +5720,7 @@
5701
5720
  }
5702
5721
  const hide = this.isFixed && types.has("resize") && !sticky;
5703
5722
  if (hide) {
5704
- css(this.selTarget, "transition", "0s");
5723
+ preventTransition(this.selTarget);
5705
5724
  this.hide();
5706
5725
  }
5707
5726
  if (!this.active) {
@@ -5710,7 +5729,6 @@
5710
5729
  }
5711
5730
  if (hide) {
5712
5731
  this.show();
5713
- requestAnimationFrame(() => css(this.selTarget, "transition", ""));
5714
5732
  }
5715
5733
  const viewport = toPx("100vh", "height");
5716
5734
  const dynamicViewport = height(window);
@@ -5841,6 +5859,7 @@
5841
5859
  this.show();
5842
5860
  Animation.in(this.$el, this.animation).catch(noop);
5843
5861
  } else {
5862
+ preventTransition(this.selTarget);
5844
5863
  this.show();
5845
5864
  }
5846
5865
  },
@@ -5942,6 +5961,10 @@
5942
5961
  function reset(el) {
5943
5962
  css(el, { position: "", top: "", marginTop: "", width: "" });
5944
5963
  }
5964
+ function preventTransition(el) {
5965
+ css(el, "transition", "0s");
5966
+ requestAnimationFrame(() => css(el, "transition", ""));
5967
+ }
5945
5968
 
5946
5969
  const selDisabled = ".uk-disabled *, .uk-disabled, [disabled]";
5947
5970
  var Switcher = {
@@ -6909,10 +6932,12 @@
6909
6932
  next: "Next slide",
6910
6933
  previous: "Previous slide",
6911
6934
  slideX: "Slide %s",
6912
- slideLabel: "%s of %s"
6935
+ slideLabel: "%s of %s",
6936
+ role: "String"
6913
6937
  },
6914
6938
  data: {
6915
- selNav: false
6939
+ selNav: false,
6940
+ role: "region"
6916
6941
  },
6917
6942
  computed: {
6918
6943
  nav: {
@@ -6940,7 +6965,10 @@
6940
6965
  }
6941
6966
  },
6942
6967
  connected() {
6943
- attr(this.$el, "aria-roledescription", "carousel");
6968
+ attr(this.$el, {
6969
+ role: this.role,
6970
+ ariaRoleDescription: "carousel"
6971
+ });
6944
6972
  },
6945
6973
  update: [
6946
6974
  {
@@ -7233,7 +7261,7 @@
7233
7261
  pauseOnHover: true
7234
7262
  },
7235
7263
  connected() {
7236
- attr(this.list, "aria-live", "polite");
7264
+ attr(this.list, "aria-live", this.autoplay ? "off" : "polite");
7237
7265
  this.autoplay && this.startAutoplay();
7238
7266
  },
7239
7267
  disconnected() {
@@ -7258,45 +7286,19 @@
7258
7286
  this.startAutoplay();
7259
7287
  }
7260
7288
  }
7261
- },
7262
- {
7263
- name: `${pointerEnter} focusin`,
7264
- filter() {
7265
- return this.autoplay;
7266
- },
7267
- handler(e) {
7268
- if (e.type !== pointerEnter || this.pauseOnHover) {
7269
- this.stopAutoplay();
7270
- }
7271
- }
7272
- },
7273
- {
7274
- name: `${pointerLeave} focusout`,
7275
- filter() {
7276
- return this.autoplay;
7277
- },
7278
- handler(e) {
7279
- if (e.type !== pointerLeave || this.pauseOnHover) {
7280
- this.startAutoplay();
7281
- }
7282
- }
7283
7289
  }
7284
7290
  ],
7285
7291
  methods: {
7286
7292
  startAutoplay() {
7287
- if (this.draggable && matches(this.$el, ":focus-within") || this.pauseOnHover && matches(this.$el, ":hover")) {
7288
- return;
7289
- }
7290
7293
  this.stopAutoplay();
7291
- this.interval = setInterval(
7292
- () => !this.stack.length && this.show("next"),
7293
- this.autoplayInterval
7294
- );
7295
- attr(this.list, "aria-live", "off");
7294
+ this.interval = setInterval(() => {
7295
+ if (!(this.stack.length || this.draggable && matches(this.$el, ":focus-within") || this.pauseOnHover && matches(this.$el, ":hover"))) {
7296
+ this.show("next");
7297
+ }
7298
+ }, this.autoplayInterval);
7296
7299
  },
7297
7300
  stopAutoplay() {
7298
7301
  clearInterval(this.interval);
7299
- attr(this.list, "aria-live", "polite");
7300
7302
  }
7301
7303
  }
7302
7304
  };