uikit 3.14.4-dev.e3664d0d2 → 3.14.4-dev.ed37f5c44

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 (83) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/css/uikit-core-rtl.css +108 -61
  3. package/dist/css/uikit-core-rtl.min.css +1 -1
  4. package/dist/css/uikit-core.css +108 -61
  5. package/dist/css/uikit-core.min.css +1 -1
  6. package/dist/css/uikit-rtl.css +108 -62
  7. package/dist/css/uikit-rtl.min.css +1 -1
  8. package/dist/css/uikit.css +108 -62
  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 +7 -5
  13. package/dist/js/components/filter.min.js +1 -1
  14. package/dist/js/components/lightbox-panel.js +6 -14
  15. package/dist/js/components/lightbox-panel.min.js +1 -1
  16. package/dist/js/components/lightbox.js +6 -14
  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 +4 -5
  21. package/dist/js/components/parallax.min.js +1 -1
  22. package/dist/js/components/slider-parallax.js +4 -5
  23. package/dist/js/components/slider-parallax.min.js +1 -1
  24. package/dist/js/components/slider.js +1 -1
  25. package/dist/js/components/slider.min.js +1 -1
  26. package/dist/js/components/slideshow-parallax.js +4 -5
  27. package/dist/js/components/slideshow-parallax.min.js +1 -1
  28. package/dist/js/components/slideshow.js +1 -1
  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 +19 -19
  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 +136 -70
  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 +142 -74
  41. package/dist/js/uikit.min.js +1 -1
  42. package/package.json +1 -1
  43. package/src/images/{backgrounds/nav-parent-open.svg → components/nav-parent-icon-large.svg} +0 -0
  44. package/src/images/components/nav-parent-icon.svg +3 -0
  45. package/src/images/components/navbar-parent-icon.svg +3 -0
  46. package/src/js/components/filter.js +5 -3
  47. package/src/js/core/height-viewport.js +6 -2
  48. package/src/js/core/icon.js +16 -0
  49. package/src/js/core/index.js +2 -0
  50. package/src/js/core/leader.js +2 -2
  51. package/src/js/core/navbar.js +44 -15
  52. package/src/js/core/scroll.js +38 -11
  53. package/src/js/mixin/media.js +4 -5
  54. package/src/js/mixin/position.js +19 -11
  55. package/src/js/mixin/togglable.js +8 -17
  56. package/src/js/util/style.js +4 -13
  57. package/src/js/util/viewport.js +2 -4
  58. package/src/less/components/dropdown.less +14 -0
  59. package/src/less/components/leader.less +1 -1
  60. package/src/less/components/nav.less +7 -37
  61. package/src/less/components/navbar.less +101 -13
  62. package/src/less/components/utility.less +10 -2
  63. package/src/less/theme/nav.less +0 -8
  64. package/src/less/theme/navbar.less +4 -6
  65. package/src/scss/components/dropdown.scss +14 -0
  66. package/src/scss/components/leader.scss +1 -1
  67. package/src/scss/components/nav.scss +7 -26
  68. package/src/scss/components/navbar.scss +89 -13
  69. package/src/scss/components/utility.scss +8 -1
  70. package/src/scss/mixins-theme.scss +15 -18
  71. package/src/scss/mixins.scss +14 -14
  72. package/src/scss/theme/nav.scss +0 -8
  73. package/src/scss/theme/navbar.scss +3 -2
  74. package/src/scss/variables-theme.scss +17 -11
  75. package/src/scss/variables.scss +17 -10
  76. package/tests/drop.html +66 -16
  77. package/tests/dropdown.html +103 -16
  78. package/tests/index.html +3 -3
  79. package/tests/nav.html +20 -87
  80. package/tests/navbar.html +283 -62
  81. package/tests/offcanvas.html +8 -8
  82. package/tests/utility.html +19 -0
  83. package/src/images/backgrounds/nav-parent-close.svg +0 -3
package/dist/js/uikit.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.14.4-dev.e3664d0d2 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
1
+ /*! UIkit 3.14.4-dev.ed37f5c44 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
2
2
 
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
@@ -785,18 +785,11 @@
785
785
  return elements[0];
786
786
  }
787
787
 
788
- const propertyRe = /^\s*(["'])?(.*?)\1\s*$/;
789
- function getCssVar(name, element) {if (element === void 0) {element = document.documentElement;}
790
- return css(element, "--uk-" + name).replace(propertyRe, '$2');
791
- }
792
-
793
788
  // https://drafts.csswg.org/cssom/#dom-cssstyledeclaration-setproperty
794
789
  const propName = memoize((name) => vendorPropName(name));
795
790
 
796
- const cssPrefixes = ['webkit', 'moz'];
797
-
798
791
  function vendorPropName(name) {
799
- if (name[0] === '-') {
792
+ if (startsWith(name, '--')) {
800
793
  return name;
801
794
  }
802
795
 
@@ -808,11 +801,8 @@
808
801
  return name;
809
802
  }
810
803
 
811
- let i = cssPrefixes.length,
812
- prefixedName;
813
-
814
- while (i--) {
815
- prefixedName = "-" + cssPrefixes[i] + "-" + name;
804
+ for (const prefix of ['webkit', 'moz']) {
805
+ const prefixedName = "-" + prefix + "-" + name;
816
806
  if (prefixedName in style) {
817
807
  return prefixedName;
818
808
  }
@@ -1899,12 +1889,10 @@
1899
1889
  function offsetViewport(scrollElement) {
1900
1890
  const window = toWindow(scrollElement);
1901
1891
  const {
1902
- document: { body, documentElement } } =
1892
+ document: { documentElement } } =
1903
1893
  window;
1904
1894
  let viewportElement =
1905
- scrollElement === scrollingElement(scrollElement) || scrollElement === body ?
1906
- window :
1907
- scrollElement;
1895
+ scrollElement === scrollingElement(scrollElement) ? window : scrollElement;
1908
1896
 
1909
1897
  const { visualViewport } = window;
1910
1898
  if (isWindow(viewportElement) && visualViewport) {
@@ -2282,7 +2270,6 @@
2282
2270
  findAll: findAll,
2283
2271
  escape: escape,
2284
2272
  css: css,
2285
- getCssVar: getCssVar,
2286
2273
  propName: propName,
2287
2274
  isInView: isInView,
2288
2275
  scrollIntoView: scrollIntoView,
@@ -2947,7 +2934,7 @@
2947
2934
  UIkit.data = '__uikit__';
2948
2935
  UIkit.prefix = 'uk-';
2949
2936
  UIkit.options = {};
2950
- UIkit.version = '3.14.4-dev.e3664d0d2';
2937
+ UIkit.version = '3.14.4-dev.ed37f5c44';
2951
2938
 
2952
2939
  globalAPI(UIkit);
2953
2940
  hooksAPI(UIkit);
@@ -3245,7 +3232,7 @@
3245
3232
 
3246
3233
  Transition.cancel(el);
3247
3234
 
3248
- const [scrollElement] = scrollParents(el);
3235
+ const [scrollElement] = scrollParents(el.offsetParent);
3249
3236
  css(scrollElement, 'overflowX', 'hidden');
3250
3237
 
3251
3238
  if (!isToggled(el)) {
@@ -3256,17 +3243,11 @@
3256
3243
  duration = velocity * width + duration;
3257
3244
 
3258
3245
  const percent = visible ? (width + marginLeft * (right ? -1 : 1)) / width * 100 : 0;
3259
- const offsetEl = offset(el);
3260
- const useClipPath = right ?
3261
- offsetEl.right < scrollElement.clientWidth :
3262
- Math.round(offsetEl.left) > 0;
3263
3246
 
3264
3247
  css(el, {
3265
- clipPath: useClipPath ?
3266
- right ? "polygon(0 0," +
3248
+ clipPath: right ? "polygon(0 0," +
3267
3249
  percent + "% 0," + percent + "% 100%,0 100%)" : "polygon(" + (
3268
- 100 - percent) + "% 0,100% 0,100% 100%," + (100 - percent) + "% 100%)" :
3269
- '',
3250
+ 100 - percent) + "% 0,100% 0,100% 100%," + (100 - percent) + "% 100%)",
3270
3251
  marginLeft: (100 - percent) * (right ? 1 : -1) / 100 * width });
3271
3252
 
3272
3253
 
@@ -3275,7 +3256,7 @@
3275
3256
  Transition.start(
3276
3257
  el,
3277
3258
  {
3278
- clipPath: useClipPath ? "polygon(0 0,100% 0,100% 100%,0 100%)" : '',
3259
+ clipPath: "polygon(0 0,100% 0,100% 100%,0 100%)",
3279
3260
  marginLeft: 0 },
3280
3261
 
3281
3262
  duration * (1 - percent / 100),
@@ -3284,11 +3265,9 @@
3284
3265
  Transition.start(
3285
3266
  el,
3286
3267
  {
3287
- clipPath: useClipPath ?
3288
- right ? "polygon(0 0,0 0,0 100%,0 100%)" : "polygon(100% 0,100% 0,100% 100%,100% 100%)" :
3268
+ clipPath: right ? "polygon(0 0,0 0,0 100%,0 100%)" : "polygon(100% 0,100% 0,100% 100%,100% 100%)",
3289
3269
 
3290
3270
 
3291
- '',
3292
3271
  marginLeft: (right ? 1 : -1) * width },
3293
3272
 
3294
3273
  duration * (percent / 100),
@@ -3691,13 +3670,21 @@
3691
3670
  const elDim = dimensions$1(element);
3692
3671
  css(element, { top: -elDim.height, left: -elDim.width });
3693
3672
 
3694
- positionAt(element, target, {
3673
+ const args = [
3674
+ element,
3675
+ target,
3676
+ {
3695
3677
  attach,
3696
3678
  offset,
3697
3679
  boundary,
3698
3680
  flip: this.flip,
3699
- viewportOffset: this.getViewportOffset(element) });
3681
+ viewportOffset: this.getViewportOffset(element) }];
3682
+
3683
+
3684
+
3685
+ trigger(element, 'beforeposition', args);
3700
3686
 
3687
+ positionAt(...args);
3701
3688
 
3702
3689
  // Restore scroll position
3703
3690
  scrollElement.scrollTop = scrollTop;
@@ -3707,7 +3694,7 @@
3707
3694
  getPositionOffset(element) {
3708
3695
  return (
3709
3696
  toPx(
3710
- this.offset === false ? getCssVar('position-offset', element) : this.offset,
3697
+ this.offset === false ? css(element, '--uk-position-offset') : this.offset,
3711
3698
  this.axis === 'x' ? 'width' : 'height',
3712
3699
  element) * (
3713
3700
  includes(['left', 'top'], this.dir) ? -1 : 1));
@@ -3718,14 +3705,14 @@
3718
3705
  return includes(['center', 'justify', 'stretch'], this.align) ?
3719
3706
  0 :
3720
3707
  toPx(
3721
- getCssVar('position-shift-offset', element),
3708
+ css(element, '--uk-position-shift-offset'),
3722
3709
  this.axis === 'y' ? 'width' : 'height',
3723
3710
  element) * (
3724
3711
  includes(['left', 'top'], this.align) ? 1 : -1);
3725
3712
  },
3726
3713
 
3727
3714
  getViewportOffset(element) {
3728
- return toPx(getCssVar('position-viewport-offset', element));
3715
+ return toPx(css(element, '--uk-position-viewport-offset'));
3729
3716
  } } };
3730
3717
 
3731
3718
  const active$1 = [];
@@ -4965,8 +4952,11 @@
4965
4952
  let minHeight = '';
4966
4953
  const box = boxModelAdjust(this.$el, 'height', 'content-box');
4967
4954
 
4955
+ const { body, scrollingElement } = document;
4968
4956
  const [scrollElement] = scrollParents(this.$el, /auto|scroll/);
4969
- const { height: viewportHeight } = offsetViewport(scrollElement);
4957
+ const { height: viewportHeight } = offsetViewport(
4958
+ scrollElement === body ? scrollingElement : scrollElement);
4959
+
4970
4960
 
4971
4961
  if (this.expand) {
4972
4962
  minHeight = Math.max(
@@ -4976,7 +4966,8 @@
4976
4966
  0);
4977
4967
 
4978
4968
  } else {
4979
- const isScrollingElement = document.scrollingElement === scrollElement;
4969
+ const isScrollingElement =
4970
+ scrollingElement === scrollElement || body === scrollElement;
4980
4971
 
4981
4972
  // on mobile devices (iOS and Android) window.innerHeight !== 100vh
4982
4973
  minHeight = "calc(" + (isScrollingElement ? '100vh' : viewportHeight + "px");
@@ -5230,6 +5221,12 @@
5230
5221
 
5231
5222
  var marker = "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><rect x=\"9\" y=\"4\" width=\"1\" height=\"11\"/><rect x=\"4\" y=\"9\" width=\"11\" height=\"1\"/></svg>";
5232
5223
 
5224
+ var navParentIcon = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"12\" viewBox=\"0 0 12 12\"><polyline fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" points=\"1 3.5 6 8.5 11 3.5\"/></svg>";
5225
+
5226
+ var navParentIconLarge = "<svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" xmlns=\"http://www.w3.org/2000/svg\"><polyline fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" points=\"1 4 7 10 13 4\"/></svg>";
5227
+
5228
+ var navbarParentIcon = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"12\" viewBox=\"0 0 12 12\"><polyline fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" points=\"1 3.5 6 8.5 11 3.5\"/></svg>";
5229
+
5233
5230
  var navbarToggleIcon = "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><rect y=\"9\" width=\"20\" height=\"2\"/><rect y=\"3\" width=\"20\" height=\"2\"/><rect y=\"15\" width=\"20\" height=\"2\"/></svg>";
5234
5231
 
5235
5232
  var overlayIcon = "<svg width=\"40\" height=\"40\" viewBox=\"0 0 40 40\" xmlns=\"http://www.w3.org/2000/svg\"><rect x=\"19\" y=\"0\" width=\"1\" height=\"40\"/><rect x=\"0\" y=\"19\" width=\"40\" height=\"1\"/></svg>";
@@ -5262,6 +5259,9 @@
5262
5259
  marker,
5263
5260
  'close-icon': closeIcon,
5264
5261
  'close-large': closeLarge,
5262
+ 'nav-parent-icon': navParentIcon,
5263
+ 'nav-parent-icon-large': navParentIconLarge,
5264
+ 'navbar-parent-icon': navbarParentIcon,
5265
5265
  'navbar-toggle-icon': navbarToggleIcon,
5266
5266
  'overlay-icon': overlayIcon,
5267
5267
  'pagination-next': paginationNext,
@@ -5319,6 +5319,15 @@
5319
5319
  } };
5320
5320
 
5321
5321
 
5322
+ const NavParentIcon = {
5323
+ extends: IconComponent,
5324
+
5325
+ beforeConnect() {
5326
+ const icon = this.$props.icon;
5327
+ this.icon = closest(this.$el, '.uk-nav-primary') ? icon + "-large" : icon;
5328
+ } };
5329
+
5330
+
5322
5331
  const Slidenav = {
5323
5332
  extends: IconComponent,
5324
5333
 
@@ -5579,7 +5588,7 @@
5579
5588
 
5580
5589
 
5581
5590
  connected() {
5582
- const media = toMedia(this.media);
5591
+ const media = toMedia(this.media, this.$el);
5583
5592
  this.matchMedia = true;
5584
5593
  if (media) {
5585
5594
  this.mediaObj = window.matchMedia(media);
@@ -5600,11 +5609,10 @@
5600
5609
  } };
5601
5610
 
5602
5611
 
5603
- function toMedia(value) {
5612
+ function toMedia(value, element) {
5604
5613
  if (isString(value)) {
5605
5614
  if (startsWith(value, '@')) {
5606
- const name = "breakpoint-" + value.substr(1);
5607
- value = toFloat(getCssVar(name));
5615
+ value = toFloat(css(element, "--uk-breakpoint-" + value.substr(1)));
5608
5616
  } else if (isNaN(value)) {
5609
5617
  return value;
5610
5618
  }
@@ -5629,7 +5637,7 @@
5629
5637
 
5630
5638
  computed: {
5631
5639
  fill(_ref) {let { fill } = _ref;
5632
- return fill || getCssVar('leader-fill-content');
5640
+ return fill || css(this.$el, '--uk-leader-fill-content');
5633
5641
  } },
5634
5642
 
5635
5643
 
@@ -5908,8 +5916,7 @@
5908
5916
  {
5909
5917
  ...this.$props,
5910
5918
  boundary: this.boundary,
5911
- pos: this.pos,
5912
- offset: this.dropbar || this.offset });
5919
+ pos: this.pos });
5913
5920
 
5914
5921
 
5915
5922
  },
@@ -6070,8 +6077,8 @@
6070
6077
  return this.dropbar;
6071
6078
  },
6072
6079
 
6073
- handler(_, _ref9) {let { $el, align } = _ref9;
6074
- if (!hasClass($el, this.clsDrop) || align === 'stretch') {
6080
+ handler(_ref9) {let { target } = _ref9;
6081
+ if (!this.isDropbarDrop(target)) {
6075
6082
  return;
6076
6083
  }
6077
6084
 
@@ -6079,7 +6086,7 @@
6079
6086
  after(this.dropbarAnchor || this.$el, this.dropbar);
6080
6087
  }
6081
6088
 
6082
- addClass($el, this.clsDrop + "-dropbar");
6089
+ addClass(target, this.clsDrop + "-dropbar");
6083
6090
  } },
6084
6091
 
6085
6092
 
@@ -6094,22 +6101,47 @@
6094
6101
  return this.dropbar;
6095
6102
  },
6096
6103
 
6097
- handler(_, _ref10) {let { $el, align } = _ref10;
6098
- if (!hasClass($el, this.clsDrop) || align === 'stretch') {
6104
+ handler(_ref10) {let { target } = _ref10;
6105
+ if (!this.isDropbarDrop(target)) {
6099
6106
  return;
6100
6107
  }
6101
6108
 
6102
- this._observer = observeResize($el, () =>
6109
+ this._observer = observeResize(target, () =>
6103
6110
  this.transitionTo(
6104
- offset($el).bottom -
6111
+ offset(target).bottom -
6105
6112
  offset(this.dropbar).top +
6106
- toFloat(css($el, 'marginBottom')),
6107
- $el));
6113
+ toFloat(css(target, 'marginBottom')),
6114
+ target));
6108
6115
 
6109
6116
 
6110
6117
  } },
6111
6118
 
6112
6119
 
6120
+ {
6121
+ name: 'beforeposition',
6122
+
6123
+ el() {
6124
+ return this.dropContainer;
6125
+ },
6126
+
6127
+ filter() {
6128
+ return this.dropbar;
6129
+ },
6130
+
6131
+ handler(e, element, target, options) {
6132
+ if (!this.isDropbarDrop(element)) {
6133
+ return;
6134
+ }
6135
+
6136
+ const dropbarOffset = offset(this.dropbar);
6137
+
6138
+ css(element, 'maxWidth', dropbarOffset.width - options.viewportOffset * 2);
6139
+
6140
+ options.offset[1] = dropbarOffset.top - offset(target).bottom;
6141
+ options.viewportOffset += dropbarOffset.left;
6142
+ } },
6143
+
6144
+
6113
6145
  {
6114
6146
  name: 'beforehide',
6115
6147
 
@@ -6121,12 +6153,12 @@
6121
6153
  return this.dropbar;
6122
6154
  },
6123
6155
 
6124
- handler(e, _ref11) {let { $el } = _ref11;
6156
+ handler(e) {
6125
6157
  const active = this.getActive();
6126
6158
 
6127
6159
  if (
6128
6160
  matches(this.dropbar, ':hover') &&
6129
- (active == null ? void 0 : active.$el) === $el &&
6161
+ (active == null ? void 0 : active.$el) === e.target &&
6130
6162
  !this.toggles.some((el) => active.target !== el && matches(el, ':focus')))
6131
6163
  {
6132
6164
  e.preventDefault();
@@ -6145,8 +6177,8 @@
6145
6177
  return this.dropbar;
6146
6178
  },
6147
6179
 
6148
- handler(_, _ref12) {let { $el, align } = _ref12;
6149
- if (!hasClass($el, this.clsDrop) || align === 'stretch') {
6180
+ handler(_ref11) {let { target } = _ref11;
6181
+ if (!this.isDropbarDrop(target)) {
6150
6182
  return;
6151
6183
  }
6152
6184
 
@@ -6154,7 +6186,7 @@
6154
6186
 
6155
6187
  const active = this.getActive();
6156
6188
 
6157
- if (!active || (active == null ? void 0 : active.$el) === $el) {
6189
+ if (!active || (active == null ? void 0 : active.$el) === target) {
6158
6190
  this.transitionTo(0);
6159
6191
  }
6160
6192
  } }],
@@ -6193,6 +6225,11 @@
6193
6225
 
6194
6226
  getDropdown(el) {
6195
6227
  return this.$getComponent(el, 'drop') || this.$getComponent(el, 'dropdown');
6228
+ },
6229
+
6230
+ isDropbarDrop(el) {
6231
+ const drop = this.getDropdown(el);
6232
+ return drop && hasClass(el, this.clsDrop) && drop.align !== 'stretch';
6196
6233
  } } };
6197
6234
 
6198
6235
 
@@ -6567,6 +6604,14 @@
6567
6604
  offset: 0 },
6568
6605
 
6569
6606
 
6607
+ connected() {
6608
+ registerClick(this);
6609
+ },
6610
+
6611
+ disconnected() {
6612
+ unregisterClick(this);
6613
+ },
6614
+
6570
6615
  methods: {
6571
6616
  async scrollTo(el) {
6572
6617
  el = el && $(el) || document.body;
@@ -6575,20 +6620,39 @@
6575
6620
  await scrollIntoView(el, { offset: this.offset });
6576
6621
  trigger(this.$el, 'scrolled', [this, el]);
6577
6622
  }
6578
- } },
6623
+ } } };
6579
6624
 
6580
6625
 
6581
- events: {
6582
- click(e) {
6583
- if (e.defaultPrevented) {
6584
- return;
6585
- }
6586
6626
 
6587
- e.preventDefault();
6588
- this.scrollTo(getTargetElement(this.$el));
6589
- } } };
6627
+ const components$2 = new Set();
6628
+ function registerClick(cmp) {
6629
+ if (!components$2.size) {
6630
+ on(document, 'click', clickHandler);
6631
+ }
6632
+
6633
+ components$2.add(cmp);
6634
+ }
6590
6635
 
6636
+ function unregisterClick(cmp) {
6637
+ components$2.delete(cmp);
6638
+
6639
+ if (!components$2.length) {
6640
+ off(document, 'click', clickHandler);
6641
+ }
6642
+ }
6643
+
6644
+ function clickHandler(e) {
6645
+ if (e.defaultPrevented) {
6646
+ return;
6647
+ }
6591
6648
 
6649
+ e.preventDefault();
6650
+ for (const component of components$2) {
6651
+ if (within(component.$el, e.target)) {
6652
+ component.scrollTo(getTargetElement(component.$el));
6653
+ }
6654
+ }
6655
+ }
6592
6656
 
6593
6657
  function getTargetElement(el) {
6594
6658
  return document.getElementById(decodeURIComponent(el.hash).substring(1));
@@ -7657,10 +7721,12 @@
7657
7721
  Video: Video,
7658
7722
  Close: Close,
7659
7723
  Spinner: Spinner,
7724
+ NavParentIcon: NavParentIcon,
7660
7725
  SlidenavNext: Slidenav,
7661
7726
  SlidenavPrevious: Slidenav,
7662
7727
  SearchIcon: Search,
7663
7728
  Marker: IconComponent,
7729
+ NavbarParentIcon: IconComponent,
7664
7730
  NavbarToggleIcon: IconComponent,
7665
7731
  OverlayIcon: IconComponent,
7666
7732
  PaginationNext: IconComponent,
@@ -8150,7 +8216,7 @@
8150
8216
 
8151
8217
  },
8152
8218
 
8153
- setState(state, animate) {if (animate === void 0) {animate = true;}
8219
+ async setState(state, animate) {if (animate === void 0) {animate = true;}
8154
8220
  state = { filter: { '': '' }, sort: [], ...state };
8155
8221
 
8156
8222
  trigger(this.$el, 'beforeFilter', [this, state]);
@@ -8159,15 +8225,17 @@
8159
8225
  toggleClass(el, this.cls, !!matchFilter(el, this.attrItem, state)));
8160
8226
 
8161
8227
 
8162
- Promise.all(
8228
+ await Promise.all(
8163
8229
  $$(this.target, this.$el).map((target) => {
8164
8230
  const filterFn = () => {
8165
8231
  applyState(state, target, children(target));
8166
8232
  this.$update(this.$el);
8167
8233
  };
8168
8234
  return animate ? this.animate(filterFn, target) : filterFn();
8169
- })).
8170
- then(() => trigger(this.$el, 'afterFilter', [this]));
8235
+ }));
8236
+
8237
+
8238
+ trigger(this.$el, 'afterFilter', [this]);
8171
8239
  },
8172
8240
 
8173
8241
  updateState() {