uikit 3.11.1-dev.fbcf9eec9 → 3.11.2-dev.31cd2ba38

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 (62) hide show
  1. package/CHANGELOG.md +30 -0
  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 +37 -41
  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 +2 -2
  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 +224 -195
  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 +287 -263
  41. package/dist/js/uikit.min.js +1 -1
  42. package/package.json +1 -1
  43. package/src/js/api/state.js +4 -4
  44. package/src/js/components/parallax.js +5 -16
  45. package/src/js/components/slider.js +1 -1
  46. package/src/js/components/sortable.js +1 -2
  47. package/src/js/core/core.js +2 -2
  48. package/src/js/core/drop.js +1 -1
  49. package/src/js/core/height-viewport.js +2 -2
  50. package/src/js/core/img.js +68 -92
  51. package/src/js/core/navbar.js +6 -2
  52. package/src/js/core/sticky.js +82 -50
  53. package/src/js/mixin/parallax.js +32 -21
  54. package/src/js/util/dimensions.js +28 -12
  55. package/src/js/util/fastdom.js +2 -2
  56. package/src/js/util/options.js +5 -5
  57. package/src/js/util/viewport.js +7 -3
  58. package/tests/image.html +22 -38
  59. package/tests/images/test.avif +0 -0
  60. package/tests/images/test.webp +0 -0
  61. package/tests/sticky-parallax.html +44 -41
  62. package/tests/sticky.html +56 -24
package/dist/js/uikit.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.11.1-dev.fbcf9eec9 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
1
+ /*! UIkit 3.11.2-dev.31cd2ba38 | 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);
@@ -1750,19 +1750,35 @@
1750
1750
  if ( element === void 0 ) element = window;
1751
1751
  if ( offsetDim === void 0 ) offsetDim = false;
1752
1752
 
1753
- return isNumeric(value)
1754
- ? +value
1755
- : endsWith(value, 'vh')
1756
- ? percent(height(toWindow(element)), value)
1757
- : endsWith(value, 'vw')
1758
- ? percent(width(toWindow(element)), value)
1759
- : endsWith(value, '%')
1760
- ? percent(offsetDim
1761
- ? dimension(property)(element)
1762
- : dimensions(element)[property], value)
1763
- : toFloat(value);
1753
+
1754
+ if (!isString(value)) {
1755
+ return toFloat(value);
1756
+ }
1757
+
1758
+ return parseCalc(value).reduce(function (result, value) {
1759
+ var unit = parseUnit(value);
1760
+ if (unit) {
1761
+ value = percent(
1762
+ unit === 'vh'
1763
+ ? height(toWindow(element))
1764
+ : unit === 'vw'
1765
+ ? width(toWindow(element))
1766
+ : offsetDim
1767
+ ? element[("offset" + (ucfirst(property)))]
1768
+ : dimensions$1(element)[property],
1769
+ value
1770
+ );
1771
+ }
1772
+
1773
+ return result + toFloat(value);
1774
+ }, 0);
1764
1775
  }
1765
1776
 
1777
+ var calcRe = /-?\d+(?:\.\d+)?(?:v[wh]|%|px)?/g;
1778
+ var parseCalc = memoize(function (calc) { return calc.toString().replace(/\s/g, '').match(calcRe) || []; });
1779
+ var unitRe = /(?:v[hw]|%)$/;
1780
+ var parseUnit = memoize(function (str) { return (str.match(unitRe) || [])[0]; });
1781
+
1766
1782
  function percent(base, value) {
1767
1783
  return base * toFloat(value) / 100;
1768
1784
  }
@@ -1800,8 +1816,6 @@
1800
1816
  };
1801
1817
 
1802
1818
  function flush(recursion) {
1803
- if ( recursion === void 0 ) recursion = 1;
1804
-
1805
1819
  runTasks(fastdom.reads);
1806
1820
  runTasks(fastdom.writes.splice(0));
1807
1821
 
@@ -1823,7 +1837,7 @@
1823
1837
  if (recursion && recursion < RECURSION_LIMIT) {
1824
1838
  Promise$1.resolve().then(function () { return flush(recursion); });
1825
1839
  } else {
1826
- requestAnimationFrame(function () { return flush(); });
1840
+ requestAnimationFrame(function () { return flush(1); });
1827
1841
  }
1828
1842
 
1829
1843
  }
@@ -2079,9 +2093,8 @@
2079
2093
 
2080
2094
  try {
2081
2095
 
2082
- return !options
2083
- ? {}
2084
- : startsWith(options, '{')
2096
+ return options
2097
+ ? options.match(/^[{[]/)
2085
2098
  ? JSON.parse(options)
2086
2099
  : args.length && !includes(options, ':')
2087
2100
  ? (( obj = {}, obj[args[0]] = options, obj ))
@@ -2093,7 +2106,8 @@
2093
2106
  options[key.trim()] = value.trim();
2094
2107
  }
2095
2108
  return options;
2096
- }, {});
2109
+ }, {})
2110
+ : {};
2097
2111
 
2098
2112
  } catch (e) {
2099
2113
  return {};
@@ -2241,7 +2255,11 @@
2241
2255
  element = toNode(element);
2242
2256
  }
2243
2257
 
2244
- element.scrollTop = top;
2258
+ if (isUndefined(top)) {
2259
+ return element.scrollTop;
2260
+ } else {
2261
+ element.scrollTop = top;
2262
+ }
2245
2263
  }
2246
2264
 
2247
2265
  function scrollIntoView(element, ref) {
@@ -2548,7 +2566,7 @@
2548
2566
  replaceClass: replaceClass,
2549
2567
  hasClass: hasClass,
2550
2568
  toggleClass: toggleClass,
2551
- dimensions: dimensions,
2569
+ dimensions: dimensions$1,
2552
2570
  offset: offset,
2553
2571
  position: position,
2554
2572
  offsetPosition: offsetPosition,
@@ -2673,7 +2691,8 @@
2673
2691
  scrolledOver: scrolledOver,
2674
2692
  scrollParents: scrollParents,
2675
2693
  getViewport: getViewport$1,
2676
- getViewportClientHeight: getViewportClientHeight
2694
+ getViewportClientHeight: getViewportClientHeight,
2695
+ getScrollingElement: getScrollingElement
2677
2696
  });
2678
2697
 
2679
2698
  function globalAPI (UIkit) {
@@ -3137,11 +3156,11 @@
3137
3156
  on(
3138
3157
  el,
3139
3158
  name,
3140
- !delegate
3141
- ? null
3142
- : isString(delegate)
3159
+ delegate
3160
+ ? isString(delegate)
3143
3161
  ? delegate
3144
- : delegate.call(component),
3162
+ : delegate.call(component)
3163
+ : null,
3145
3164
  isString(handler) ? component[handler] : handler.bind(component),
3146
3165
  {passive: passive, capture: capture, self: self}
3147
3166
  )
@@ -3462,7 +3481,7 @@
3462
3481
  UIkit.data = '__uikit__';
3463
3482
  UIkit.prefix = 'uk-';
3464
3483
  UIkit.options = {};
3465
- UIkit.version = '3.11.1-dev.fbcf9eec9';
3484
+ UIkit.version = '3.11.2-dev.31cd2ba38';
3466
3485
 
3467
3486
  globalAPI(UIkit);
3468
3487
  hooksAPI(UIkit);
@@ -3483,7 +3502,7 @@
3483
3502
  return;
3484
3503
  }
3485
3504
  pendingResize = true;
3486
- fastdom.write(function () { return pendingResize = false; });
3505
+ fastdom.read(function () { return pendingResize = false; });
3487
3506
  UIkit.update(null, 'resize');
3488
3507
  };
3489
3508
 
@@ -3502,7 +3521,7 @@
3502
3521
  return;
3503
3522
  }
3504
3523
  pending = true;
3505
- fastdom.write(function () { return pending = false; });
3524
+ fastdom.read(function () { return pending = false; });
3506
3525
 
3507
3526
  UIkit.update(null, e.type);
3508
3527
 
@@ -4588,7 +4607,7 @@
4588
4607
  if (active$1) {
4589
4608
 
4590
4609
  if (delay && active$1.isDelaying) {
4591
- this.showTimer = setTimeout(this.show, 10);
4610
+ this.showTimer = setTimeout(function () { return matches(target, ':hover') && this$1$1.show(); }, 10);
4592
4611
  return;
4593
4612
  }
4594
4613
 
@@ -5222,7 +5241,7 @@
5222
5241
  css(element, 'display', 'block', 'important');
5223
5242
  }
5224
5243
 
5225
- var height = dimensions(element).height - boxModelAdjust(element, 'height', 'content-box');
5244
+ var height = dimensions$1(element).height - boxModelAdjust(element, 'height', 'content-box');
5226
5245
 
5227
5246
  if (style !== false) {
5228
5247
  css(element, 'display', style);
@@ -5264,7 +5283,7 @@
5264
5283
 
5265
5284
  if (this.expand) {
5266
5285
 
5267
- minHeight = height(window) - (dimensions(document.documentElement).height - dimensions(this.$el).height) - box || '';
5286
+ minHeight = height(window) - (dimensions$1(document.documentElement).height - dimensions$1(this.$el).height) - box || '';
5268
5287
 
5269
5288
  } else {
5270
5289
 
@@ -5281,7 +5300,7 @@
5281
5300
 
5282
5301
  if (this.offsetBottom === true) {
5283
5302
 
5284
- minHeight += " - " + (dimensions(this.$el.nextElementSibling).height) + "px";
5303
+ minHeight += " - " + (dimensions$1(this.$el.nextElementSibling).height) + "px";
5285
5304
 
5286
5305
  } else if (isNumeric(this.offsetBottom)) {
5287
5306
 
@@ -5293,7 +5312,7 @@
5293
5312
 
5294
5313
  } else if (isString(this.offsetBottom)) {
5295
5314
 
5296
- minHeight += " - " + (dimensions(query(this.offsetBottom, this.$el)).height) + "px";
5315
+ minHeight += " - " + (dimensions$1(query(this.offsetBottom, this.$el)).height) + "px";
5297
5316
 
5298
5317
  }
5299
5318
 
@@ -5312,7 +5331,7 @@
5312
5331
  css(this.$el, {minHeight: minHeight});
5313
5332
 
5314
5333
  if (minHeight !== prev) {
5315
- this.$update(this.$el, 'resize');
5334
+ trigger(this.$el, 'resize');
5316
5335
  }
5317
5336
 
5318
5337
  if (this.minHeight && toFloat(css(this.$el, 'minHeight')) < this.minHeight) {
@@ -5789,10 +5808,7 @@
5789
5808
 
5790
5809
  props: {
5791
5810
  dataSrc: String,
5792
- dataSrcset: Boolean,
5793
- sizes: String,
5794
- width: Number,
5795
- height: Number,
5811
+ dataSources: String,
5796
5812
  offsetTop: String,
5797
5813
  offsetLeft: String,
5798
5814
  target: String
@@ -5800,10 +5816,7 @@
5800
5816
 
5801
5817
  data: {
5802
5818
  dataSrc: '',
5803
- dataSrcset: false,
5804
- sizes: false,
5805
- width: false,
5806
- height: false,
5819
+ dataSources: [],
5807
5820
  offsetTop: '50vh',
5808
5821
  offsetLeft: '50vw',
5809
5822
  target: false
@@ -5811,37 +5824,6 @@
5811
5824
 
5812
5825
  computed: {
5813
5826
 
5814
- cacheKey: function(ref) {
5815
- var dataSrc = ref.dataSrc;
5816
-
5817
- return ((this.$name) + "." + dataSrc);
5818
- },
5819
-
5820
- width: function(ref) {
5821
- var width = ref.width;
5822
- var dataWidth = ref.dataWidth;
5823
-
5824
- return width || dataWidth;
5825
- },
5826
-
5827
- height: function(ref) {
5828
- var height = ref.height;
5829
- var dataHeight = ref.dataHeight;
5830
-
5831
- return height || dataHeight;
5832
- },
5833
-
5834
- sizes: function(ref) {
5835
- var sizes = ref.sizes;
5836
- var dataSizes = ref.dataSizes;
5837
-
5838
- return sizes || dataSizes;
5839
- },
5840
-
5841
- isImg: function(_, $el) {
5842
- return isImg($el);
5843
- },
5844
-
5845
5827
  target: {
5846
5828
 
5847
5829
  get: function(ref) {
@@ -5854,18 +5836,6 @@
5854
5836
  this.observe();
5855
5837
  }
5856
5838
 
5857
- },
5858
-
5859
- offsetTop: function(ref) {
5860
- var offsetTop = ref.offsetTop;
5861
-
5862
- return toPx(offsetTop, 'height');
5863
- },
5864
-
5865
- offsetLeft: function(ref) {
5866
- var offsetLeft = ref.offsetLeft;
5867
-
5868
- return toPx(offsetLeft, 'width');
5869
5839
  }
5870
5840
 
5871
5841
  },
@@ -5873,21 +5843,13 @@
5873
5843
  connected: function() {
5874
5844
 
5875
5845
  if (!window.IntersectionObserver) {
5876
- setSrcAttrs(this.$el, this.dataSrc, this.dataSrcset, this.sizes);
5846
+ setSrcAttrs(this.$el, this.dataSrc);
5877
5847
  return;
5878
5848
  }
5879
5849
 
5880
- if (storage[this.cacheKey]) {
5881
- setSrcAttrs(this.$el, storage[this.cacheKey], this.dataSrcset, this.sizes);
5882
- } else if (this.isImg && this.width && this.height) {
5883
- setSrcAttrs(this.$el, getPlaceholderImage(this.width, this.height, this.sizes));
5884
- }
5885
-
5886
- this.observer = new IntersectionObserver(this.load, {
5887
- rootMargin: ((this.offsetTop) + "px " + (this.offsetLeft) + "px")
5888
- });
5889
-
5890
- requestAnimationFrame(this.observe);
5850
+ var rootMargin = (toPx(this.offsetTop, 'height')) + "px " + (toPx(this.offsetLeft, 'width')) + "px";
5851
+ this.observer = new IntersectionObserver(this.load, {rootMargin: rootMargin});
5852
+ this.observe();
5891
5853
 
5892
5854
  },
5893
5855
 
@@ -5898,34 +5860,26 @@
5898
5860
  update: {
5899
5861
 
5900
5862
  read: function(ref) {
5901
- var this$1$1 = this;
5902
5863
  var image = ref.image;
5903
5864
 
5904
5865
 
5905
- if (!this.observer) {
5906
- return false;
5907
- }
5908
-
5909
- if (!image && document.readyState === 'complete') {
5910
- this.load(this.observer.takeRecords());
5911
- }
5912
-
5913
- if (this.isImg) {
5866
+ if (!this.observer || isImg(this.$el)) {
5914
5867
  return false;
5915
5868
  }
5916
5869
 
5917
- image && image.then(function (img) { return img && img.currentSrc !== '' && setSrcAttrs(this$1$1.$el, currentSrc(img)); });
5870
+ setSrcAttrs(this.$el, image && image.currentSrc);
5918
5871
 
5919
5872
  },
5920
5873
 
5921
- write: function(data) {
5874
+ write: function(store) {
5922
5875
 
5923
- if (this.dataSrcset && window.devicePixelRatio !== 1) {
5876
+ var srcset = data(this.$el, 'data-srcset');
5877
+ if (srcset && window.devicePixelRatio !== 1) {
5924
5878
 
5925
5879
  var bgSize = css(this.$el, 'backgroundSize');
5926
- if (bgSize.match(/^(auto\s?)+$/) || toFloat(bgSize) === data.bgSize) {
5927
- data.bgSize = getSourceSize(this.dataSrcset, this.sizes);
5928
- css(this.$el, 'backgroundSize', ((data.bgSize) + "px"));
5880
+ if (bgSize.match(/^(auto\s?)+$/) || toFloat(bgSize) === store.bgSize) {
5881
+ store.bgSize = getSourceSize(srcset, data(this.$el, 'sizes'));
5882
+ css(this.$el, 'backgroundSize', ((store.bgSize) + "px"));
5929
5883
  }
5930
5884
 
5931
5885
  }
@@ -5939,21 +5893,22 @@
5939
5893
  methods: {
5940
5894
 
5941
5895
  load: function(entries) {
5942
- var this$1$1 = this;
5943
-
5944
5896
 
5945
5897
  // Old chromium based browsers (UC Browser) did not implement `isIntersecting`
5946
5898
  if (!entries.some(function (entry) { return isUndefined(entry.isIntersecting) || entry.isIntersecting; })) {
5947
5899
  return;
5948
5900
  }
5949
5901
 
5950
- this._data.image = getImage(this.dataSrc, this.dataSrcset, this.sizes).then(function (img) {
5902
+ if (this._data.image) {
5903
+ return this._data.image;
5904
+ }
5951
5905
 
5952
- setSrcAttrs(this$1$1.$el, currentSrc(img), img.srcset, img.sizes);
5953
- storage[this$1$1.cacheKey] = currentSrc(img);
5954
- return img;
5906
+ var image = isImg(this.$el)
5907
+ ? this.$el
5908
+ : getImageFromElement(this.$el, this.dataSrc, parseOptions(this.dataSources));
5955
5909
 
5956
- }, function (e) { return trigger(this$1$1.$el, new e.constructor(e.type, e)); });
5910
+ this._data.image = image;
5911
+ setSrcAttrs(this.$el, image.currentSrc || this.dataSrc);
5957
5912
 
5958
5913
  this.observer.disconnect();
5959
5914
  },
@@ -5970,13 +5925,15 @@
5970
5925
 
5971
5926
  };
5972
5927
 
5973
- function setSrcAttrs(el, src, srcset, sizes) {
5928
+ function setSrcAttrs(el, src) {
5974
5929
 
5975
5930
  if (isImg(el)) {
5976
- var set = function (prop, val) { return val && val !== el[prop] && (el[prop] = val); };
5977
- set('sizes', sizes);
5978
- set('srcset', srcset);
5979
- set('src', src);
5931
+
5932
+ var parentNode = parent(el);
5933
+ var elements = isPicture(parentNode) ? children(parentNode) : [el];
5934
+ elements.forEach(function (el) { return setSourceProps(el, el); });
5935
+ src && attr(el, 'src', src);
5936
+
5980
5937
  } else if (src) {
5981
5938
 
5982
5939
  var change = !includes(el.style.backgroundImage, src);
@@ -5989,15 +5946,43 @@
5989
5946
 
5990
5947
  }
5991
5948
 
5992
- function getPlaceholderImage(width, height, sizes) {
5993
- var assign;
5949
+ var srcProps = ['data-src', 'data-srcset', 'sizes'];
5950
+ function setSourceProps(sourceEl, targetEl) {
5951
+ srcProps.forEach(function (prop) {
5952
+ var value = data(sourceEl, prop);
5953
+ if (value) {
5954
+ attr(targetEl, prop.replace(/^(data-)+/, ''), value);
5955
+ }
5956
+ });
5957
+ }
5994
5958
 
5959
+ function getImageFromElement(el, src, sources) {
5960
+ if ( sources === void 0 ) sources = [];
5995
5961
 
5996
- if (sizes) {
5997
- ((assign = Dimensions.ratio({width: width, height: height}, 'width', toPx(sizesToPixel(sizes))), width = assign.width, height = assign.height));
5962
+
5963
+ if (!src) {
5964
+ return false;
5965
+ }
5966
+
5967
+ var img = new Image();
5968
+
5969
+ if (!isArray(sources) && isObject(sources)) {
5970
+ sources = [sources];
5971
+ }
5972
+
5973
+ if (sources.length) {
5974
+ var picture = fragment('<picture>');
5975
+ sources.forEach(function (attrs) {
5976
+ var source = fragment('<source>');
5977
+ attr(source, attrs);
5978
+ append(picture, source);
5979
+ });
5980
+ append(picture, img);
5998
5981
  }
5999
5982
 
6000
- return ("data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"" + width + "\" height=\"" + height + "\"></svg>");
5983
+ setSourceProps(el, img);
5984
+ attr(img, 'src', src);
5985
+ return img;
6001
5986
  }
6002
5987
 
6003
5988
  var sizesRe = /\s*(.*?)\s*(\w+|calc\(.*?\))\s*(?:,|$)/g;
@@ -6037,24 +6022,16 @@
6037
6022
  return descriptors.filter(function (size) { return size >= srcSize; })[0] || descriptors.pop() || '';
6038
6023
  }
6039
6024
 
6040
- function isImg(el) {
6041
- return el.tagName === 'IMG';
6025
+ function isPicture(el) {
6026
+ return isA(el, 'PICTURE');
6042
6027
  }
6043
6028
 
6044
- function currentSrc(el) {
6045
- return el.currentSrc || el.src;
6029
+ function isImg(el) {
6030
+ return isA(el, 'IMG');
6046
6031
  }
6047
6032
 
6048
- var key = '__test__';
6049
- var storage;
6050
-
6051
- // workaround for Safari's private browsing mode and accessing sessionStorage in Blink
6052
- try {
6053
- storage = window.sessionStorage || {};
6054
- storage[key] = 1;
6055
- delete storage[key];
6056
- } catch (e) {
6057
- storage = {};
6033
+ function isA(el, tagName) {
6034
+ return el && el.tagName === tagName;
6058
6035
  }
6059
6036
 
6060
6037
  var Media = {
@@ -6720,7 +6697,7 @@
6720
6697
  var current = ref.current;
6721
6698
 
6722
6699
  var active = this.getActive();
6723
- if (active && includes(active.mode, 'hover') && active.target && !within(active.target, current) && !active.tracker.movesTo(active.$el)) {
6700
+ if (active && includes(active.mode, 'hover') && active.target && !within(active.target, current) && !active.isDelaying) {
6724
6701
  active.hide(false);
6725
6702
  }
6726
6703
  }
@@ -6895,7 +6872,11 @@
6895
6872
 
6896
6873
  var active = this.getActive();
6897
6874
 
6898
- if (matches(this.dropbar, ':hover') && active && active.$el === $el) {
6875
+ if (matches(this.dropbar, ':hover')
6876
+ && active
6877
+ && active.$el === $el
6878
+ && !this.toggles.some(function (el) { return active.target !== el && matches(el, ':focus'); })
6879
+ ) {
6899
6880
  e.preventDefault();
6900
6881
  }
6901
6882
  }
@@ -7325,7 +7306,7 @@
7325
7306
 
7326
7307
  return {
7327
7308
  current: toFloat(css(this.$el, 'maxHeight')),
7328
- max: Math.max(this.minHeight, height(this.container) - (dimensions(this.content).height - height(this.$el)))
7309
+ max: Math.max(this.minHeight, height(this.container) - (dimensions$1(this.content).height - height(this.$el)))
7329
7310
  };
7330
7311
  },
7331
7312
 
@@ -7687,6 +7668,7 @@
7687
7668
  mixins: [Class, Media],
7688
7669
 
7689
7670
  props: {
7671
+ position: String,
7690
7672
  top: null,
7691
7673
  bottom: Boolean,
7692
7674
  offset: String,
@@ -7702,6 +7684,7 @@
7702
7684
  },
7703
7685
 
7704
7686
  data: {
7687
+ position: 'top',
7705
7688
  top: 0,
7706
7689
  bottom: false,
7707
7690
  offset: 0,
@@ -7718,10 +7701,23 @@
7718
7701
 
7719
7702
  computed: {
7720
7703
 
7721
- offset: function(ref) {
7704
+ position: function(ref, $el) {
7705
+ var position = ref.position;
7706
+
7707
+ return position === 'auto'
7708
+ ? (this.isFixed ? this.placeholder : $el).offsetHeight > height(window)
7709
+ ? 'bottom'
7710
+ : 'top'
7711
+ : position;
7712
+ },
7713
+
7714
+ offset: function(ref, $el) {
7722
7715
  var offset = ref.offset;
7723
7716
 
7724
- return toPx(offset);
7717
+ if (this.position === 'bottom') {
7718
+ offset += '+100vh-100%';
7719
+ }
7720
+ return toPx(offset, 'height', $el);
7725
7721
  },
7726
7722
 
7727
7723
  selTarget: function(ref, $el) {
@@ -7788,7 +7784,7 @@
7788
7784
  var this$1$1 = this;
7789
7785
 
7790
7786
 
7791
- if (!(this.targetOffset !== false && location.hash && window.pageYOffset > 0)) {
7787
+ if (!(this.targetOffset !== false && location.hash && scrollTop(window) > 0)) {
7792
7788
  return;
7793
7789
  }
7794
7790
 
@@ -7821,6 +7817,7 @@
7821
7817
 
7822
7818
  read: function(ref, types) {
7823
7819
  var height$1 = ref.height;
7820
+ var margin = ref.margin;
7824
7821
 
7825
7822
 
7826
7823
  this.inactive = !this.matchMedia || !isVisible(this.$el);
@@ -7829,46 +7826,56 @@
7829
7826
  return false;
7830
7827
  }
7831
7828
 
7832
- if (this.isActive && types.has('resize')) {
7829
+ var hide = this.isActive && types.has('resize');
7830
+ if (hide) {
7833
7831
  this.hide();
7834
- height$1 = this.$el.offsetHeight;
7835
- this.show();
7836
7832
  }
7837
7833
 
7838
- height$1 = this.isActive ? height$1 : this.$el.offsetHeight;
7834
+ if (!this.isActive) {
7835
+ height$1 = this.$el.offsetHeight;
7836
+ margin = css(this.$el, 'margin');
7837
+ }
7839
7838
 
7840
- if (height$1 + this.offset > height(window)) {
7841
- this.inactive = true;
7842
- return false;
7839
+ if (hide) {
7840
+ this.show();
7843
7841
  }
7844
7842
 
7843
+ var overflow = Math.max(0, height$1 + this.offset - height(window));
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
- var bottom = parseProp('bottom', this);
7849
+ var top = parseProp(this.top, this.$el, topOffset);
7850
+ var bottom = parseProp(this.bottom, this.$el, topOffset + height$1);
7851
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;
7852
+ var start = Math.max(top, topOffset) - this.offset;
7853
+ var end = bottom
7854
+ ? bottom - this.$el.offsetHeight + overflow - this.offset
7855
+ : getScrollingElement(this.$el).scrollHeight - height(window);
7855
7856
 
7856
7857
  return {
7858
+ start: start,
7859
+ end: end,
7860
+ overflow: overflow,
7861
+ topOffset: topOffset,
7862
+ offsetParentTop: offsetParentTop,
7857
7863
  height: height$1,
7858
- top: offsetPosition(this.placeholder)[0],
7859
- margins: css(this.$el, ['marginTop', 'marginBottom', 'marginLeft', 'marginRight'])
7864
+ margin: margin,
7865
+ width: dimensions$1(isVisible(this.widthElement) ? this.widthElement : this.$el).width,
7866
+ top: offsetPosition(this.placeholder)[0]
7860
7867
  };
7861
7868
  },
7862
7869
 
7863
7870
  write: function(ref) {
7864
7871
  var height = ref.height;
7865
- var margins = ref.margins;
7872
+ var margin = ref.margin;
7866
7873
 
7867
7874
 
7868
7875
  var ref$1 = this;
7869
7876
  var placeholder = ref$1.placeholder;
7870
7877
 
7871
- css(placeholder, assign({height: height}, margins));
7878
+ css(placeholder, {height: height, margin: margin});
7872
7879
 
7873
7880
  if (!within(placeholder, document)) {
7874
7881
  after(this.$el, placeholder);
@@ -7886,14 +7893,29 @@
7886
7893
  {
7887
7894
 
7888
7895
  read: function(ref) {
7889
- var scroll = ref.scroll; if ( scroll === void 0 ) scroll = 0;
7896
+ var prevScroll = ref.scroll; if ( prevScroll === void 0 ) prevScroll = 0;
7897
+ var prevDir = ref.dir; if ( prevDir === void 0 ) prevDir = 'down';
7898
+ var overflow = ref.overflow;
7899
+ var overflowScroll = ref.overflowScroll; if ( overflowScroll === void 0 ) overflowScroll = 0;
7900
+ var start = ref.start;
7901
+ var end = ref.end;
7890
7902
 
7891
7903
 
7892
- this.scroll = window.pageYOffset;
7904
+ var scroll = scrollTop(window);
7905
+ var dir = prevScroll <= scroll ? 'down' : 'up';
7893
7906
 
7894
7907
  return {
7895
- dir: scroll <= this.scroll ? 'down' : 'up',
7896
- scroll: this.scroll
7908
+ dir: dir,
7909
+ prevDir: prevDir,
7910
+ scroll: scroll,
7911
+ prevScroll: prevScroll,
7912
+ overflowScroll: clamp(
7913
+ overflowScroll
7914
+ + clamp(scroll, start, end)
7915
+ - clamp(prevScroll, start, end),
7916
+ 0,
7917
+ overflow
7918
+ )
7897
7919
  };
7898
7920
  },
7899
7921
 
@@ -7901,35 +7923,34 @@
7901
7923
  var this$1$1 = this;
7902
7924
 
7903
7925
 
7904
- var now = Date.now();
7905
7926
  var isScrollUpdate = types.has('scroll');
7906
7927
  var initTimestamp = data.initTimestamp; if ( initTimestamp === void 0 ) initTimestamp = 0;
7907
7928
  var dir = data.dir;
7908
- var lastDir = data.lastDir;
7909
- var lastScroll = data.lastScroll;
7929
+ var prevDir = data.prevDir;
7910
7930
  var scroll = data.scroll;
7931
+ var prevScroll = data.prevScroll; if ( prevScroll === void 0 ) prevScroll = 0;
7911
7932
  var top = data.top;
7933
+ var start = data.start;
7934
+ var topOffset = data.topOffset;
7935
+ var height = data.height;
7912
7936
 
7913
- data.lastScroll = scroll;
7914
-
7915
- if (scroll < 0 || scroll === lastScroll && isScrollUpdate || this.showOnUp && !isScrollUpdate && !this.isFixed) {
7937
+ if (scroll < 0 || scroll === prevScroll && isScrollUpdate || this.showOnUp && !isScrollUpdate && !this.isFixed) {
7916
7938
  return;
7917
7939
  }
7918
7940
 
7919
- if (now - initTimestamp > 300 || dir !== lastDir) {
7941
+ var now = Date.now();
7942
+ if (now - initTimestamp > 300 || dir !== prevDir) {
7920
7943
  data.initScroll = scroll;
7921
7944
  data.initTimestamp = now;
7922
7945
  }
7923
7946
 
7924
- data.lastDir = dir;
7925
-
7926
- if (this.showOnUp && !this.isFixed && Math.abs(data.initScroll - scroll) <= 30 && Math.abs(lastScroll - scroll) <= 10) {
7947
+ if (this.showOnUp && !this.isFixed && Math.abs(data.initScroll - scroll) <= 30 && Math.abs(prevScroll - scroll) <= 10) {
7927
7948
  return;
7928
7949
  }
7929
7950
 
7930
7951
  if (this.inactive
7931
- || scroll < this.top
7932
- || this.showOnUp && (scroll <= this.top || dir === 'down' && isScrollUpdate || dir === 'up' && !this.isFixed && scroll <= this.bottomOffset)
7952
+ || scroll < start
7953
+ || this.showOnUp && (scroll <= start || dir === 'down' && isScrollUpdate || dir === 'up' && !this.isFixed && scroll <= topOffset + height)
7933
7954
  ) {
7934
7955
 
7935
7956
  if (!this.isFixed) {
@@ -7944,7 +7965,7 @@
7944
7965
 
7945
7966
  this.isFixed = false;
7946
7967
 
7947
- if (this.animation && scroll > this.topOffset) {
7968
+ if (this.animation && scroll > topOffset) {
7948
7969
  Animation.cancel(this.$el);
7949
7970
  Animation.out(this.$el, this.animation).then(function () { return this$1$1.hide(); }, noop);
7950
7971
  } else {
@@ -7994,23 +8015,37 @@
7994
8015
 
7995
8016
  update: function() {
7996
8017
 
7997
- var active = this.top !== 0 || this.scroll > this.top;
7998
- var top = Math.max(0, this.offset);
8018
+ var ref = this._data;
8019
+ var width = ref.width;
8020
+ var scroll = ref.scroll; if ( scroll === void 0 ) scroll = 0;
8021
+ var overflow = ref.overflow;
8022
+ var overflowScroll = ref.overflowScroll; if ( overflowScroll === void 0 ) overflowScroll = 0;
8023
+ var start = ref.start;
8024
+ var end = ref.end;
8025
+ var topOffset = ref.topOffset;
8026
+ var height = ref.height;
8027
+ var offsetParentTop = ref.offsetParentTop;
8028
+ var active = start !== 0 || scroll > start;
8029
+ var top = this.offset;
7999
8030
  var position = 'fixed';
8000
8031
 
8001
- if (isNumeric(this.bottom) && this.scroll > this.bottom - this.offset) {
8002
- top = this.bottom - this.offsetParentTop;
8032
+ if (scroll > end) {
8033
+ top = end + this.offset - offsetParentTop;
8003
8034
  position = 'absolute';
8004
8035
  }
8005
8036
 
8037
+ if (overflow) {
8038
+ top -= overflowScroll;
8039
+ }
8040
+
8006
8041
  css(this.$el, {
8007
8042
  position: position,
8008
8043
  top: (top + "px"),
8009
- width: this.width
8044
+ width: width
8010
8045
  });
8011
8046
 
8012
8047
  this.isActive = active;
8013
- toggleClass(this.$el, this.clsBelow, this.scroll > this.bottomOffset);
8048
+ toggleClass(this.$el, this.clsBelow, scroll > topOffset + height);
8014
8049
  addClass(this.$el, this.clsFixed);
8015
8050
 
8016
8051
  }
@@ -8019,16 +8054,10 @@
8019
8054
 
8020
8055
  };
8021
8056
 
8022
- function parseProp(prop, ref) {
8023
- var $props = ref.$props;
8024
- var $el = ref.$el;
8025
- var propOffset = ref[(prop + "Offset")];
8026
-
8027
-
8028
- var value = $props[prop];
8057
+ function parseProp(value, el, propOffset) {
8029
8058
 
8030
8059
  if (!value) {
8031
- return;
8060
+ return 0;
8032
8061
  }
8033
8062
 
8034
8063
  if (isString(value) && value.match(/^-?\d/)) {
@@ -8037,7 +8066,7 @@
8037
8066
 
8038
8067
  } else {
8039
8068
 
8040
- return offset(value === true ? parent($el) : query(value, $el)).bottom;
8069
+ return offset(value === true ? parent(el) : query(value, el)).bottom;
8041
8070
 
8042
8071
  }
8043
8072
  }
@@ -10734,11 +10763,9 @@
10734
10763
  computed: {
10735
10764
 
10736
10765
  props: function(properties, $el) {
10737
- var this$1$1 = this;
10738
-
10739
10766
  return keys(props).reduce(function (result, prop) {
10740
10767
  if (!isUndefined(properties[prop])) {
10741
- result[prop] = props[prop].call(this$1$1, prop, $el, properties[prop].slice());
10768
+ result[prop] = props[prop](prop, $el, properties[prop].slice());
10742
10769
  }
10743
10770
  return result;
10744
10771
  }, {});
@@ -10746,6 +10773,12 @@
10746
10773
 
10747
10774
  },
10748
10775
 
10776
+ events: {
10777
+ bgimageload: function() {
10778
+ this.$emit();
10779
+ }
10780
+ },
10781
+
10749
10782
  methods: {
10750
10783
 
10751
10784
  reset: function() {
@@ -10893,15 +10926,15 @@
10893
10926
  var bgPos = css(el, 'backgroundPosition').split(' ')[prop === 'x' ? 0 : 1]; // IE 11 can't read background-position-[x|y]
10894
10927
 
10895
10928
  return getCssValue(el, 'backgroundSize', '') === 'cover'
10896
- ? backgroundCoverFn.call(this, prop, el, steps, bgPos, attr)
10929
+ ? backgroundCoverFn(prop, el, steps, bgPos, attr)
10897
10930
  : setBackgroundPosFn(prop, steps, bgPos);
10898
10931
  }
10899
10932
 
10900
10933
  function backgroundCoverFn(prop, el, steps, bgPos, attr) {
10901
10934
 
10902
- var image = getBackgroundImage.call(this, el);
10935
+ var dimImage = getBackgroundImageDimensions(el);
10903
10936
 
10904
- if (!image.naturalWidth) {
10937
+ if (!dimImage.width) {
10905
10938
  return noop;
10906
10939
  }
10907
10940
 
@@ -10917,11 +10950,6 @@
10917
10950
  height: el.offsetHeight
10918
10951
  };
10919
10952
 
10920
- var dimImage = {
10921
- width: image.naturalWidth,
10922
- height: image.naturalHeight
10923
- };
10924
-
10925
10953
  var baseDim = Dimensions.cover(dimImage, dimEl);
10926
10954
  var span = baseDim[attr] - dimEl[attr];
10927
10955
 
@@ -10952,26 +10980,34 @@
10952
10980
  };
10953
10981
  }
10954
10982
 
10955
- function getBackgroundImage(el) {
10956
- var this$1$1 = this;
10957
-
10983
+ var dimensions = {};
10984
+ function getBackgroundImageDimensions(el) {
10958
10985
  var src = css(el, 'backgroundImage').replace(/^none|url\(["']?(.+?)["']?\)$/, '$1');
10959
10986
 
10960
- var data = this._data;
10961
-
10962
- if (data[src]) {
10963
- return data[src];
10987
+ if (dimensions[src]) {
10988
+ return dimensions[src];
10964
10989
  }
10965
10990
 
10991
+ var image = new Image();
10966
10992
  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
- }
10993
+ image.src = src;
10972
10994
 
10973
- return data[src] = img;
10995
+ if (!image.naturalWidth) {
10996
+ image.onload = function () {
10997
+ dimensions[src] = toDimensions(image);
10998
+ trigger(el, 'bgimageload');
10999
+ };
11000
+ }
10974
11001
  }
11002
+
11003
+ return dimensions[src] = toDimensions(image);
11004
+ }
11005
+
11006
+ function toDimensions(image) {
11007
+ return {
11008
+ width: image.naturalWidth,
11009
+ height: image.naturalHeight
11010
+ };
10975
11011
  }
10976
11012
 
10977
11013
  function getStep(steps, percent) {
@@ -11042,16 +11078,18 @@
11042
11078
  start: function(ref) {
11043
11079
  var start = ref.start;
11044
11080
 
11045
- return parseCalc(start, this.target);
11081
+ return toPx(start, 'height', this.target, true);
11046
11082
  },
11047
11083
 
11048
11084
  end: function(ref) {
11049
11085
  var end = ref.end;
11050
11086
  var viewport = ref.viewport;
11051
11087
 
11052
- return parseCalc(
11088
+ return toPx(
11053
11089
  end || (viewport = (1 - viewport) * 100) && (viewport + "vh+" + viewport + "%"),
11054
- this.target
11090
+ 'height',
11091
+ this.target,
11092
+ true
11055
11093
  );
11056
11094
  }
11057
11095
 
@@ -11098,19 +11136,6 @@
11098
11136
 
11099
11137
  };
11100
11138
 
11101
- var calcRe = /-?\d+(?:\.\d+)?(?:v[wh]|%|px)?/g;
11102
- function parseCalc(calc, el) {
11103
- var match;
11104
- var result = 0;
11105
- calc = calc.toString().replace(/\s/g, '');
11106
- calcRe.lastIndex = 0;
11107
- while ((match = calcRe.exec(calc)) !== null) {
11108
- result += toPx(match, 'height', el, true);
11109
- }
11110
-
11111
- return result;
11112
- }
11113
-
11114
11139
  function ease(percent, easing) {
11115
11140
  return easing >= 0
11116
11141
  ? Math.pow(percent, easing + 1)
@@ -11160,10 +11185,10 @@
11160
11185
 
11161
11186
  var from = prev
11162
11187
  ? getLeft(prev, list, center)
11163
- : getLeft(next, list, center) + dimensions(next).width * dir;
11188
+ : getLeft(next, list, center) + dimensions$1(next).width * dir;
11164
11189
  var to = next
11165
11190
  ? getLeft(next, list, center)
11166
- : from + dimensions(prev).width * dir * (isRtl ? -1 : 1);
11191
+ : from + dimensions$1(prev).width * dir * (isRtl ? -1 : 1);
11167
11192
 
11168
11193
  return {
11169
11194
 
@@ -11212,7 +11237,7 @@
11212
11237
  css(list, 'transform', translate(clamp(
11213
11238
  -to + (distance - distance * percent),
11214
11239
  -getWidth(list),
11215
- dimensions(list).width
11240
+ dimensions$1(list).width
11216
11241
  ) * (isRtl ? -1 : 1), 'px'));
11217
11242
 
11218
11243
  var actives = this.getActives();
@@ -11285,30 +11310,30 @@
11285
11310
  }
11286
11311
 
11287
11312
  function getMax(list) {
11288
- return Math.max(0, getWidth(list) - dimensions(list).width);
11313
+ return Math.max(0, getWidth(list) - dimensions$1(list).width);
11289
11314
  }
11290
11315
 
11291
11316
  function getWidth(list) {
11292
- return children(list).reduce(function (right, el) { return dimensions(el).width + right; }, 0);
11317
+ return children(list).reduce(function (right, el) { return dimensions$1(el).width + right; }, 0);
11293
11318
  }
11294
11319
 
11295
11320
  function centerEl(el, list) {
11296
- return dimensions(list).width / 2 - dimensions(el).width / 2;
11321
+ return dimensions$1(list).width / 2 - dimensions$1(el).width / 2;
11297
11322
  }
11298
11323
 
11299
11324
  function getElLeft(el, list) {
11300
- return el && (position(el).left + (isRtl ? dimensions(el).width - dimensions(list).width : 0)) * (isRtl ? -1 : 1) || 0;
11325
+ return el && (position(el).left + (isRtl ? dimensions$1(el).width - dimensions$1(list).width : 0)) * (isRtl ? -1 : 1) || 0;
11301
11326
  }
11302
11327
 
11303
11328
  function inView(list, listLeft) {
11304
11329
 
11305
11330
  listLeft -= 1;
11306
- var listWidth = dimensions(list).width;
11331
+ var listWidth = dimensions$1(list).width;
11307
11332
  var listRight = listLeft + listWidth + 2;
11308
11333
 
11309
11334
  return children(list).filter(function (slide) {
11310
11335
  var slideLeft = getElLeft(slide, list);
11311
- var slideRight = slideLeft + Math.min(dimensions(slide).width, listWidth);
11336
+ var slideRight = slideLeft + Math.min(dimensions$1(slide).width, listWidth);
11312
11337
 
11313
11338
  return slideLeft >= listLeft && slideRight <= listRight;
11314
11339
  });
@@ -11346,7 +11371,7 @@
11346
11371
  finite: function(ref) {
11347
11372
  var finite = ref.finite;
11348
11373
 
11349
- return finite || Math.ceil(getWidth(this.list)) < dimensions(this.list).width + getMaxElWidth(this.list) + this.center;
11374
+ return finite || Math.ceil(getWidth(this.list)) < Math.floor(dimensions$1(this.list).width + getMaxElWidth(this.list) + this.center);
11350
11375
  },
11351
11376
 
11352
11377
  maxIndex: function() {
@@ -11367,7 +11392,7 @@
11367
11392
  return true;
11368
11393
  }
11369
11394
 
11370
- lft += dimensions(el).width;
11395
+ lft += dimensions$1(el).width;
11371
11396
 
11372
11397
  });
11373
11398
 
@@ -11383,7 +11408,7 @@
11383
11408
  return;
11384
11409
  }
11385
11410
 
11386
- var width = dimensions(this.list).width / (this.center ? 2 : 1);
11411
+ var width = dimensions$1(this.list).width / (this.center ? 2 : 1);
11387
11412
 
11388
11413
  var left = 0;
11389
11414
  var leftCenter = width;
@@ -11391,7 +11416,7 @@
11391
11416
 
11392
11417
  sets = sortBy$1(this.slides, 'offsetLeft').reduce(function (sets, slide, i) {
11393
11418
 
11394
- var slideWidth = dimensions(slide).width;
11419
+ var slideWidth = dimensions$1(slide).width;
11395
11420
  var slideRight = slideLeft + slideWidth;
11396
11421
 
11397
11422
  if (slideRight > left) {
@@ -11403,7 +11428,7 @@
11403
11428
  if (!includes(sets, i)) {
11404
11429
 
11405
11430
  var cmp = this$1$1.slides[i + 1];
11406
- if (this$1$1.center && cmp && slideWidth < leftCenter - dimensions(cmp).width / 2) {
11431
+ if (this$1$1.center && cmp && slideWidth < leftCenter - dimensions$1(cmp).width / 2) {
11407
11432
  leftCenter -= slideWidth;
11408
11433
  } else {
11409
11434
  leftCenter = width;
@@ -11491,7 +11516,7 @@
11491
11516
  }
11492
11517
 
11493
11518
  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);
11519
+ this.duration = speedUp(this.avgWidth / this.velocity) * (dimensions$1(this.slides[index]).width / this.avgWidth);
11495
11520
 
11496
11521
  this.reorder();
11497
11522
 
@@ -11531,7 +11556,7 @@
11531
11556
  }
11532
11557
 
11533
11558
  var next = this.slides[index];
11534
- var width = dimensions(this.list).width / 2 - dimensions(next).width / 2;
11559
+ var width = dimensions$1(this.list).width / 2 - dimensions$1(next).width / 2;
11535
11560
  var j = 0;
11536
11561
 
11537
11562
  while (width > 0) {
@@ -11539,7 +11564,7 @@
11539
11564
  var slide = this.slides[slideIndex];
11540
11565
 
11541
11566
  css(slide, 'order', slideIndex > index ? -2 : -1);
11542
- width -= dimensions(slide).width;
11567
+ width -= dimensions$1(slide).width;
11543
11568
  }
11544
11569
 
11545
11570
  },
@@ -11576,7 +11601,7 @@
11576
11601
  };
11577
11602
 
11578
11603
  function getMaxElWidth(list) {
11579
- return Math.max.apply(Math, [ 0 ].concat( children(list).map(function (el) { return dimensions(el).width; }) ));
11604
+ return Math.max.apply(Math, [ 0 ].concat( children(list).map(function (el) { return dimensions$1(el).width; }) ));
11580
11605
  }
11581
11606
 
11582
11607
  var sliderParallax = {
@@ -12090,7 +12115,6 @@
12090
12115
 
12091
12116
  off(document, pointerMove, this.move);
12092
12117
  off(document, pointerUp, this.end);
12093
- off(window, 'scroll', this.scroll);
12094
12118
 
12095
12119
  if (!this.drag) {
12096
12120
  return;
@@ -12173,7 +12197,7 @@
12173
12197
 
12174
12198
  var x = pos.x;
12175
12199
  var y = pos.y;
12176
- y += window.pageYOffset;
12200
+ y += scrollTop(window);
12177
12201
 
12178
12202
  var dist = (Date.now() - last) * .3;
12179
12203
  last = Date.now();