uikit 3.11.2-dev.ec95eb0c7 → 3.11.2-dev.f2970ffaa

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 (50) hide show
  1. package/CHANGELOG.md +6 -2
  2. package/dist/css/uikit-core-rtl.css +1 -1
  3. package/dist/css/uikit-core-rtl.min.css +1 -1
  4. package/dist/css/uikit-core.css +1 -1
  5. package/dist/css/uikit-core.min.css +1 -1
  6. package/dist/css/uikit-rtl.css +1 -1
  7. package/dist/css/uikit-rtl.min.css +1 -1
  8. package/dist/css/uikit.css +1 -1
  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 +1 -1
  15. package/dist/js/components/lightbox-panel.min.js +1 -1
  16. package/dist/js/components/lightbox.js +1 -1
  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 +32 -25
  21. package/dist/js/components/parallax.min.js +1 -1
  22. package/dist/js/components/slider-parallax.js +32 -25
  23. package/dist/js/components/slider-parallax.min.js +1 -1
  24. package/dist/js/components/slider.js +3 -3
  25. package/dist/js/components/slider.min.js +1 -1
  26. package/dist/js/components/slideshow-parallax.js +32 -25
  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 +2 -3
  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 +77 -44
  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 +137 -98
  41. package/dist/js/uikit.min.js +1 -1
  42. package/package.json +1 -1
  43. package/src/js/components/slider.js +2 -2
  44. package/src/js/components/sortable.js +1 -2
  45. package/src/js/core/core.js +2 -2
  46. package/src/js/core/height-viewport.js +2 -2
  47. package/src/js/core/sticky.js +47 -34
  48. package/src/js/mixin/parallax.js +32 -21
  49. package/src/js/util/fastdom.js +2 -2
  50. package/src/js/util/viewport.js +7 -3
package/dist/js/uikit.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.11.2-dev.ec95eb0c7 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
1
+ /*! UIkit 3.11.2-dev.f2970ffaa | 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() :
@@ -1587,7 +1587,7 @@
1587
1587
  height: ['top', 'bottom']
1588
1588
  };
1589
1589
 
1590
- function dimensions(element) {
1590
+ function dimensions$1(element) {
1591
1591
 
1592
1592
  var rect = isElement(element)
1593
1593
  ? toNode(element).getBoundingClientRect()
@@ -1605,7 +1605,7 @@
1605
1605
 
1606
1606
  function offset(element, coordinates) {
1607
1607
 
1608
- var currentOffset = dimensions(element);
1608
+ var currentOffset = dimensions$1(element);
1609
1609
 
1610
1610
  if (element) {
1611
1611
  var ref = toWindow(element);
@@ -1759,7 +1759,7 @@
1759
1759
  : endsWith(value, '%')
1760
1760
  ? percent(offsetDim
1761
1761
  ? element[("offset" + (ucfirst(property)))]
1762
- : dimensions(element)[property], value)
1762
+ : dimensions$1(element)[property], value)
1763
1763
  : toFloat(value);
1764
1764
  }
1765
1765
 
@@ -1800,8 +1800,6 @@
1800
1800
  };
1801
1801
 
1802
1802
  function flush(recursion) {
1803
- if ( recursion === void 0 ) recursion = 1;
1804
-
1805
1803
  runTasks(fastdom.reads);
1806
1804
  runTasks(fastdom.writes.splice(0));
1807
1805
 
@@ -1823,7 +1821,7 @@
1823
1821
  if (recursion && recursion < RECURSION_LIMIT) {
1824
1822
  Promise$1.resolve().then(function () { return flush(recursion); });
1825
1823
  } else {
1826
- requestAnimationFrame(function () { return flush(); });
1824
+ requestAnimationFrame(function () { return flush(1); });
1827
1825
  }
1828
1826
 
1829
1827
  }
@@ -2241,7 +2239,11 @@
2241
2239
  element = toNode(element);
2242
2240
  }
2243
2241
 
2244
- element.scrollTop = top;
2242
+ if (isUndefined(top)) {
2243
+ return element.scrollTop;
2244
+ } else {
2245
+ element.scrollTop = top;
2246
+ }
2245
2247
  }
2246
2248
 
2247
2249
  function scrollIntoView(element, ref) {
@@ -2548,7 +2550,7 @@
2548
2550
  replaceClass: replaceClass,
2549
2551
  hasClass: hasClass,
2550
2552
  toggleClass: toggleClass,
2551
- dimensions: dimensions,
2553
+ dimensions: dimensions$1,
2552
2554
  offset: offset,
2553
2555
  position: position,
2554
2556
  offsetPosition: offsetPosition,
@@ -2673,7 +2675,8 @@
2673
2675
  scrolledOver: scrolledOver,
2674
2676
  scrollParents: scrollParents,
2675
2677
  getViewport: getViewport$1,
2676
- getViewportClientHeight: getViewportClientHeight
2678
+ getViewportClientHeight: getViewportClientHeight,
2679
+ getScrollingElement: getScrollingElement
2677
2680
  });
2678
2681
 
2679
2682
  function globalAPI (UIkit) {
@@ -3462,7 +3465,7 @@
3462
3465
  UIkit.data = '__uikit__';
3463
3466
  UIkit.prefix = 'uk-';
3464
3467
  UIkit.options = {};
3465
- UIkit.version = '3.11.2-dev.ec95eb0c7';
3468
+ UIkit.version = '3.11.2-dev.f2970ffaa';
3466
3469
 
3467
3470
  globalAPI(UIkit);
3468
3471
  hooksAPI(UIkit);
@@ -3483,7 +3486,7 @@
3483
3486
  return;
3484
3487
  }
3485
3488
  pendingResize = true;
3486
- fastdom.write(function () { return pendingResize = false; });
3489
+ fastdom.read(function () { return pendingResize = false; });
3487
3490
  UIkit.update(null, 'resize');
3488
3491
  };
3489
3492
 
@@ -3502,7 +3505,7 @@
3502
3505
  return;
3503
3506
  }
3504
3507
  pending = true;
3505
- fastdom.write(function () { return pending = false; });
3508
+ fastdom.read(function () { return pending = false; });
3506
3509
 
3507
3510
  UIkit.update(null, e.type);
3508
3511
 
@@ -5222,7 +5225,7 @@
5222
5225
  css(element, 'display', 'block', 'important');
5223
5226
  }
5224
5227
 
5225
- var height = dimensions(element).height - boxModelAdjust(element, 'height', 'content-box');
5228
+ var height = dimensions$1(element).height - boxModelAdjust(element, 'height', 'content-box');
5226
5229
 
5227
5230
  if (style !== false) {
5228
5231
  css(element, 'display', style);
@@ -5264,7 +5267,7 @@
5264
5267
 
5265
5268
  if (this.expand) {
5266
5269
 
5267
- minHeight = height(window) - (dimensions(document.documentElement).height - dimensions(this.$el).height) - box || '';
5270
+ minHeight = height(window) - (dimensions$1(document.documentElement).height - dimensions$1(this.$el).height) - box || '';
5268
5271
 
5269
5272
  } else {
5270
5273
 
@@ -5281,7 +5284,7 @@
5281
5284
 
5282
5285
  if (this.offsetBottom === true) {
5283
5286
 
5284
- minHeight += " - " + (dimensions(this.$el.nextElementSibling).height) + "px";
5287
+ minHeight += " - " + (dimensions$1(this.$el.nextElementSibling).height) + "px";
5285
5288
 
5286
5289
  } else if (isNumeric(this.offsetBottom)) {
5287
5290
 
@@ -5293,7 +5296,7 @@
5293
5296
 
5294
5297
  } else if (isString(this.offsetBottom)) {
5295
5298
 
5296
- minHeight += " - " + (dimensions(query(this.offsetBottom, this.$el)).height) + "px";
5299
+ minHeight += " - " + (dimensions$1(query(this.offsetBottom, this.$el)).height) + "px";
5297
5300
 
5298
5301
  }
5299
5302
 
@@ -5312,7 +5315,7 @@
5312
5315
  css(this.$el, {minHeight: minHeight});
5313
5316
 
5314
5317
  if (minHeight !== prev) {
5315
- this.$update(this.$el, 'resize');
5318
+ trigger(this.$el, 'resize');
5316
5319
  }
5317
5320
 
5318
5321
  if (this.minHeight && toFloat(css(this.$el, 'minHeight')) < this.minHeight) {
@@ -7325,7 +7328,7 @@
7325
7328
 
7326
7329
  return {
7327
7330
  current: toFloat(css(this.$el, 'maxHeight')),
7328
- max: Math.max(this.minHeight, height(this.container) - (dimensions(this.content).height - height(this.$el)))
7331
+ max: Math.max(this.minHeight, height(this.container) - (dimensions$1(this.content).height - height(this.$el)))
7329
7332
  };
7330
7333
  },
7331
7334
 
@@ -7788,7 +7791,7 @@
7788
7791
  var this$1$1 = this;
7789
7792
 
7790
7793
 
7791
- if (!(this.targetOffset !== false && location.hash && window.pageYOffset > 0)) {
7794
+ if (!(this.targetOffset !== false && location.hash && scrollTop(window) > 0)) {
7792
7795
  return;
7793
7796
  }
7794
7797
 
@@ -7837,24 +7840,26 @@
7837
7840
 
7838
7841
  height$1 = this.isActive ? height$1 : this.$el.offsetHeight;
7839
7842
 
7840
- if (height$1 + this.offset > height(window)) {
7841
- this.inactive = true;
7842
- return false;
7843
- }
7843
+ var overflow = Math.max(0, height$1 + this.offset - height(window));
7844
7844
 
7845
7845
  var referenceElement = this.isFixed ? this.placeholder : this.$el;
7846
- this.topOffset = offset(referenceElement).top;
7847
- this.bottomOffset = this.topOffset + height$1;
7848
- this.offsetParentTop = offset(referenceElement.offsetParent).top;
7846
+ var topOffset = offset(referenceElement).top;
7847
+ var offsetParentTop = offset(referenceElement.offsetParent).top;
7849
7848
 
7850
7849
  var bottom = parseProp('bottom', this);
7851
-
7852
- this.top = Math.max(toFloat(parseProp('top', this)), this.topOffset) - this.offset;
7853
- this.bottom = bottom && bottom - this.$el.offsetHeight;
7854
- this.width = dimensions(isVisible(this.widthElement) ? this.widthElement : this.$el).width;
7850
+ var start = Math.max(toFloat(parseProp('top', this)), topOffset) - this.offset;
7851
+ var end = bottom
7852
+ ? bottom - this.$el.offsetHeight + overflow - this.offset
7853
+ : getScrollingElement(this.$el).scrollHeight - height(window);
7855
7854
 
7856
7855
  return {
7856
+ start: start,
7857
+ end: end,
7858
+ overflow: overflow,
7859
+ topOffset: topOffset,
7860
+ offsetParentTop: offsetParentTop,
7857
7861
  height: height$1,
7862
+ width: dimensions$1(isVisible(this.widthElement) ? this.widthElement : this.$el).width,
7858
7863
  top: offsetPosition(this.placeholder)[0],
7859
7864
  margins: css(this.$el, ['marginTop', 'marginBottom', 'marginLeft', 'marginRight'])
7860
7865
  };
@@ -7886,14 +7891,29 @@
7886
7891
  {
7887
7892
 
7888
7893
  read: function(ref) {
7889
- var scroll = ref.scroll; if ( scroll === void 0 ) scroll = 0;
7894
+ var prevScroll = ref.scroll; if ( prevScroll === void 0 ) prevScroll = 0;
7895
+ var prevDir = ref.dir; if ( prevDir === void 0 ) prevDir = 'down';
7896
+ var overflow = ref.overflow;
7897
+ var overflowScroll = ref.overflowScroll; if ( overflowScroll === void 0 ) overflowScroll = 0;
7898
+ var start = ref.start;
7899
+ var end = ref.end;
7890
7900
 
7891
7901
 
7892
- this.scroll = window.pageYOffset;
7902
+ var scroll = scrollTop(window);
7903
+ var dir = prevScroll <= scroll ? 'down' : 'up';
7893
7904
 
7894
7905
  return {
7895
- dir: scroll <= this.scroll ? 'down' : 'up',
7896
- scroll: this.scroll
7906
+ dir: dir,
7907
+ prevDir: prevDir,
7908
+ scroll: scroll,
7909
+ prevScroll: prevScroll,
7910
+ overflowScroll: clamp(
7911
+ overflowScroll
7912
+ + clamp(scroll, start, end)
7913
+ - clamp(prevScroll, start, end),
7914
+ 0,
7915
+ overflow
7916
+ )
7897
7917
  };
7898
7918
  },
7899
7919
 
@@ -7901,35 +7921,34 @@
7901
7921
  var this$1$1 = this;
7902
7922
 
7903
7923
 
7904
- var now = Date.now();
7905
7924
  var isScrollUpdate = types.has('scroll');
7906
7925
  var initTimestamp = data.initTimestamp; if ( initTimestamp === void 0 ) initTimestamp = 0;
7907
7926
  var dir = data.dir;
7908
- var lastDir = data.lastDir;
7909
- var lastScroll = data.lastScroll;
7927
+ var prevDir = data.prevDir;
7910
7928
  var scroll = data.scroll;
7929
+ var prevScroll = data.prevScroll; if ( prevScroll === void 0 ) prevScroll = 0;
7911
7930
  var top = data.top;
7931
+ var start = data.start;
7932
+ var topOffset = data.topOffset;
7933
+ var height = data.height;
7912
7934
 
7913
- data.lastScroll = scroll;
7914
-
7915
- if (scroll < 0 || scroll === lastScroll && isScrollUpdate || this.showOnUp && !isScrollUpdate && !this.isFixed) {
7935
+ if (scroll < 0 || scroll === prevScroll && isScrollUpdate || this.showOnUp && !isScrollUpdate && !this.isFixed) {
7916
7936
  return;
7917
7937
  }
7918
7938
 
7919
- if (now - initTimestamp > 300 || dir !== lastDir) {
7939
+ var now = Date.now();
7940
+ if (now - initTimestamp > 300 || dir !== prevDir) {
7920
7941
  data.initScroll = scroll;
7921
7942
  data.initTimestamp = now;
7922
7943
  }
7923
7944
 
7924
- data.lastDir = dir;
7925
-
7926
- if (this.showOnUp && !this.isFixed && Math.abs(data.initScroll - scroll) <= 30 && Math.abs(lastScroll - scroll) <= 10) {
7945
+ if (this.showOnUp && !this.isFixed && Math.abs(data.initScroll - scroll) <= 30 && Math.abs(prevScroll - scroll) <= 10) {
7927
7946
  return;
7928
7947
  }
7929
7948
 
7930
7949
  if (this.inactive
7931
- || scroll < this.top
7932
- || this.showOnUp && (scroll <= this.top || dir === 'down' && isScrollUpdate || dir === 'up' && !this.isFixed && scroll <= this.bottomOffset)
7950
+ || scroll < start
7951
+ || this.showOnUp && (scroll <= start || dir === 'down' && isScrollUpdate || dir === 'up' && !this.isFixed && scroll <= topOffset + height)
7933
7952
  ) {
7934
7953
 
7935
7954
  if (!this.isFixed) {
@@ -7944,7 +7963,7 @@
7944
7963
 
7945
7964
  this.isFixed = false;
7946
7965
 
7947
- if (this.animation && scroll > this.topOffset) {
7966
+ if (this.animation && scroll > topOffset) {
7948
7967
  Animation.cancel(this.$el);
7949
7968
  Animation.out(this.$el, this.animation).then(function () { return this$1$1.hide(); }, noop);
7950
7969
  } else {
@@ -7994,23 +8013,37 @@
7994
8013
 
7995
8014
  update: function() {
7996
8015
 
7997
- var active = this.top !== 0 || this.scroll > this.top;
8016
+ var ref = this._data;
8017
+ var width = ref.width;
8018
+ var scroll = ref.scroll; if ( scroll === void 0 ) scroll = 0;
8019
+ var overflow = ref.overflow;
8020
+ var overflowScroll = ref.overflowScroll; if ( overflowScroll === void 0 ) overflowScroll = 0;
8021
+ var start = ref.start;
8022
+ var end = ref.end;
8023
+ var topOffset = ref.topOffset;
8024
+ var height = ref.height;
8025
+ var offsetParentTop = ref.offsetParentTop;
8026
+ var active = start !== 0 || scroll > start;
7998
8027
  var top = Math.max(0, this.offset);
7999
8028
  var position = 'fixed';
8000
8029
 
8001
- if (isNumeric(this.bottom) && this.scroll > this.bottom - this.offset) {
8002
- top = this.bottom - this.offsetParentTop;
8030
+ if (scroll > end) {
8031
+ top = end + this.offset - offsetParentTop;
8003
8032
  position = 'absolute';
8004
8033
  }
8005
8034
 
8035
+ if (overflow) {
8036
+ top -= overflowScroll;
8037
+ }
8038
+
8006
8039
  css(this.$el, {
8007
8040
  position: position,
8008
8041
  top: (top + "px"),
8009
- width: this.width
8042
+ width: width
8010
8043
  });
8011
8044
 
8012
8045
  this.isActive = active;
8013
- toggleClass(this.$el, this.clsBelow, this.scroll > this.bottomOffset);
8046
+ toggleClass(this.$el, this.clsBelow, scroll > topOffset + height);
8014
8047
  addClass(this.$el, this.clsFixed);
8015
8048
 
8016
8049
  }
@@ -10734,11 +10767,9 @@
10734
10767
  computed: {
10735
10768
 
10736
10769
  props: function(properties, $el) {
10737
- var this$1$1 = this;
10738
-
10739
10770
  return keys(props).reduce(function (result, prop) {
10740
10771
  if (!isUndefined(properties[prop])) {
10741
- result[prop] = props[prop].call(this$1$1, prop, $el, properties[prop].slice());
10772
+ result[prop] = props[prop](prop, $el, properties[prop].slice());
10742
10773
  }
10743
10774
  return result;
10744
10775
  }, {});
@@ -10746,6 +10777,12 @@
10746
10777
 
10747
10778
  },
10748
10779
 
10780
+ events: {
10781
+ bgimageload: function() {
10782
+ this.$emit();
10783
+ }
10784
+ },
10785
+
10749
10786
  methods: {
10750
10787
 
10751
10788
  reset: function() {
@@ -10893,15 +10930,15 @@
10893
10930
  var bgPos = css(el, 'backgroundPosition').split(' ')[prop === 'x' ? 0 : 1]; // IE 11 can't read background-position-[x|y]
10894
10931
 
10895
10932
  return getCssValue(el, 'backgroundSize', '') === 'cover'
10896
- ? backgroundCoverFn.call(this, prop, el, steps, bgPos, attr)
10933
+ ? backgroundCoverFn(prop, el, steps, bgPos, attr)
10897
10934
  : setBackgroundPosFn(prop, steps, bgPos);
10898
10935
  }
10899
10936
 
10900
10937
  function backgroundCoverFn(prop, el, steps, bgPos, attr) {
10901
10938
 
10902
- var image = getBackgroundImage.call(this, el);
10939
+ var dimImage = getBackgroundImageDimensions(el);
10903
10940
 
10904
- if (!image.naturalWidth) {
10941
+ if (!dimImage.width) {
10905
10942
  return noop;
10906
10943
  }
10907
10944
 
@@ -10917,11 +10954,6 @@
10917
10954
  height: el.offsetHeight
10918
10955
  };
10919
10956
 
10920
- var dimImage = {
10921
- width: image.naturalWidth,
10922
- height: image.naturalHeight
10923
- };
10924
-
10925
10957
  var baseDim = Dimensions.cover(dimImage, dimEl);
10926
10958
  var span = baseDim[attr] - dimEl[attr];
10927
10959
 
@@ -10952,26 +10984,34 @@
10952
10984
  };
10953
10985
  }
10954
10986
 
10955
- function getBackgroundImage(el) {
10956
- var this$1$1 = this;
10957
-
10987
+ var dimensions = {};
10988
+ function getBackgroundImageDimensions(el) {
10958
10989
  var src = css(el, 'backgroundImage').replace(/^none|url\(["']?(.+?)["']?\)$/, '$1');
10959
10990
 
10960
- var data = this._data;
10961
-
10962
- if (data[src]) {
10963
- return data[src];
10991
+ if (dimensions[src]) {
10992
+ return dimensions[src];
10964
10993
  }
10965
10994
 
10995
+ var image = new Image();
10966
10996
  if (src) {
10967
- var img = new Image();
10968
- img.src = src;
10969
- if (!img.naturalWidth) {
10970
- img.onload = function () { return this$1$1.$update(); };
10971
- }
10997
+ image.src = src;
10972
10998
 
10973
- return data[src] = img;
10999
+ if (!image.naturalWidth) {
11000
+ image.onload = function () {
11001
+ dimensions[src] = toDimensions(image);
11002
+ trigger(el, 'bgimageload');
11003
+ };
11004
+ }
10974
11005
  }
11006
+
11007
+ return dimensions[src] = toDimensions(image);
11008
+ }
11009
+
11010
+ function toDimensions(image) {
11011
+ return {
11012
+ width: image.naturalWidth,
11013
+ height: image.naturalHeight
11014
+ };
10975
11015
  }
10976
11016
 
10977
11017
  function getStep(steps, percent) {
@@ -11160,10 +11200,10 @@
11160
11200
 
11161
11201
  var from = prev
11162
11202
  ? getLeft(prev, list, center)
11163
- : getLeft(next, list, center) + dimensions(next).width * dir;
11203
+ : getLeft(next, list, center) + dimensions$1(next).width * dir;
11164
11204
  var to = next
11165
11205
  ? getLeft(next, list, center)
11166
- : from + dimensions(prev).width * dir * (isRtl ? -1 : 1);
11206
+ : from + dimensions$1(prev).width * dir * (isRtl ? -1 : 1);
11167
11207
 
11168
11208
  return {
11169
11209
 
@@ -11212,7 +11252,7 @@
11212
11252
  css(list, 'transform', translate(clamp(
11213
11253
  -to + (distance - distance * percent),
11214
11254
  -getWidth(list),
11215
- dimensions(list).width
11255
+ dimensions$1(list).width
11216
11256
  ) * (isRtl ? -1 : 1), 'px'));
11217
11257
 
11218
11258
  var actives = this.getActives();
@@ -11285,30 +11325,30 @@
11285
11325
  }
11286
11326
 
11287
11327
  function getMax(list) {
11288
- return Math.max(0, getWidth(list) - dimensions(list).width);
11328
+ return Math.max(0, getWidth(list) - dimensions$1(list).width);
11289
11329
  }
11290
11330
 
11291
11331
  function getWidth(list) {
11292
- return children(list).reduce(function (right, el) { return dimensions(el).width + right; }, 0);
11332
+ return children(list).reduce(function (right, el) { return dimensions$1(el).width + right; }, 0);
11293
11333
  }
11294
11334
 
11295
11335
  function centerEl(el, list) {
11296
- return dimensions(list).width / 2 - dimensions(el).width / 2;
11336
+ return dimensions$1(list).width / 2 - dimensions$1(el).width / 2;
11297
11337
  }
11298
11338
 
11299
11339
  function getElLeft(el, list) {
11300
- return el && (position(el).left + (isRtl ? dimensions(el).width - dimensions(list).width : 0)) * (isRtl ? -1 : 1) || 0;
11340
+ return el && (position(el).left + (isRtl ? dimensions$1(el).width - dimensions$1(list).width : 0)) * (isRtl ? -1 : 1) || 0;
11301
11341
  }
11302
11342
 
11303
11343
  function inView(list, listLeft) {
11304
11344
 
11305
11345
  listLeft -= 1;
11306
- var listWidth = dimensions(list).width;
11346
+ var listWidth = dimensions$1(list).width;
11307
11347
  var listRight = listLeft + listWidth + 2;
11308
11348
 
11309
11349
  return children(list).filter(function (slide) {
11310
11350
  var slideLeft = getElLeft(slide, list);
11311
- var slideRight = slideLeft + Math.min(dimensions(slide).width, listWidth);
11351
+ var slideRight = slideLeft + Math.min(dimensions$1(slide).width, listWidth);
11312
11352
 
11313
11353
  return slideLeft >= listLeft && slideRight <= listRight;
11314
11354
  });
@@ -11346,7 +11386,7 @@
11346
11386
  finite: function(ref) {
11347
11387
  var finite = ref.finite;
11348
11388
 
11349
- return finite || Math.ceil(getWidth(this.list)) < Math.floor(dimensions(this.list).width + getMaxElWidth(this.list));
11389
+ return finite || Math.ceil(getWidth(this.list)) < Math.floor(dimensions$1(this.list).width + getMaxElWidth(this.list) + this.center);
11350
11390
  },
11351
11391
 
11352
11392
  maxIndex: function() {
@@ -11367,7 +11407,7 @@
11367
11407
  return true;
11368
11408
  }
11369
11409
 
11370
- lft += dimensions(el).width;
11410
+ lft += dimensions$1(el).width;
11371
11411
 
11372
11412
  });
11373
11413
 
@@ -11383,7 +11423,7 @@
11383
11423
  return;
11384
11424
  }
11385
11425
 
11386
- var width = dimensions(this.list).width / (this.center ? 2 : 1);
11426
+ var width = dimensions$1(this.list).width / (this.center ? 2 : 1);
11387
11427
 
11388
11428
  var left = 0;
11389
11429
  var leftCenter = width;
@@ -11391,7 +11431,7 @@
11391
11431
 
11392
11432
  sets = sortBy$1(this.slides, 'offsetLeft').reduce(function (sets, slide, i) {
11393
11433
 
11394
- var slideWidth = dimensions(slide).width;
11434
+ var slideWidth = dimensions$1(slide).width;
11395
11435
  var slideRight = slideLeft + slideWidth;
11396
11436
 
11397
11437
  if (slideRight > left) {
@@ -11403,7 +11443,7 @@
11403
11443
  if (!includes(sets, i)) {
11404
11444
 
11405
11445
  var cmp = this$1$1.slides[i + 1];
11406
- if (this$1$1.center && cmp && slideWidth < leftCenter - dimensions(cmp).width / 2) {
11446
+ if (this$1$1.center && cmp && slideWidth < leftCenter - dimensions$1(cmp).width / 2) {
11407
11447
  leftCenter -= slideWidth;
11408
11448
  } else {
11409
11449
  leftCenter = width;
@@ -11491,7 +11531,7 @@
11491
11531
  }
11492
11532
 
11493
11533
  var index = this.dir < 0 || !this.slides[this.prevIndex] ? this.index : this.prevIndex;
11494
- this.duration = speedUp(this.avgWidth / this.velocity) * (dimensions(this.slides[index]).width / this.avgWidth);
11534
+ this.duration = speedUp(this.avgWidth / this.velocity) * (dimensions$1(this.slides[index]).width / this.avgWidth);
11495
11535
 
11496
11536
  this.reorder();
11497
11537
 
@@ -11531,15 +11571,15 @@
11531
11571
  }
11532
11572
 
11533
11573
  var next = this.slides[index];
11534
- var width = dimensions(this.list).width / 2 - dimensions(next).width / 2;
11574
+ var width = dimensions$1(this.list).width / 2 - dimensions$1(next).width / 2;
11535
11575
  var j = 0;
11536
11576
 
11537
- while (Math.floor(width) > 0) {
11577
+ while (width > 0) {
11538
11578
  var slideIndex = this.getIndex(--j + index, index);
11539
11579
  var slide = this.slides[slideIndex];
11540
11580
 
11541
11581
  css(slide, 'order', slideIndex > index ? -2 : -1);
11542
- width -= dimensions(slide).width;
11582
+ width -= dimensions$1(slide).width;
11543
11583
  }
11544
11584
 
11545
11585
  },
@@ -11576,7 +11616,7 @@
11576
11616
  };
11577
11617
 
11578
11618
  function getMaxElWidth(list) {
11579
- return Math.max.apply(Math, [ 0 ].concat( children(list).map(function (el) { return dimensions(el).width; }) ));
11619
+ return Math.max.apply(Math, [ 0 ].concat( children(list).map(function (el) { return dimensions$1(el).width; }) ));
11580
11620
  }
11581
11621
 
11582
11622
  var sliderParallax = {
@@ -12090,7 +12130,6 @@
12090
12130
 
12091
12131
  off(document, pointerMove, this.move);
12092
12132
  off(document, pointerUp, this.end);
12093
- off(window, 'scroll', this.scroll);
12094
12133
 
12095
12134
  if (!this.drag) {
12096
12135
  return;
@@ -12173,7 +12212,7 @@
12173
12212
 
12174
12213
  var x = pos.x;
12175
12214
  var y = pos.y;
12176
- y += window.pageYOffset;
12215
+ y += scrollTop(window);
12177
12216
 
12178
12217
  var dist = (Date.now() - last) * .3;
12179
12218
  last = Date.now();