uikit 3.13.8-dev.fd15ccb29 → 3.13.10-dev.4de12886e

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 (73) hide show
  1. package/CHANGELOG.md +33 -3
  2. package/build/build.js +4 -1
  3. package/dist/css/uikit-core-rtl.css +11 -2
  4. package/dist/css/uikit-core-rtl.min.css +1 -1
  5. package/dist/css/uikit-core.css +11 -2
  6. package/dist/css/uikit-core.min.css +1 -1
  7. package/dist/css/uikit-rtl.css +11 -2
  8. package/dist/css/uikit-rtl.min.css +1 -1
  9. package/dist/css/uikit.css +11 -2
  10. package/dist/css/uikit.min.css +1 -1
  11. package/dist/js/components/countdown.js +1 -1
  12. package/dist/js/components/countdown.min.js +1 -1
  13. package/dist/js/components/filter.js +1 -1
  14. package/dist/js/components/filter.min.js +1 -1
  15. package/dist/js/components/lightbox-panel.js +7 -3
  16. package/dist/js/components/lightbox-panel.min.js +1 -1
  17. package/dist/js/components/lightbox.js +7 -3
  18. package/dist/js/components/lightbox.min.js +1 -1
  19. package/dist/js/components/notification.js +1 -1
  20. package/dist/js/components/notification.min.js +1 -1
  21. package/dist/js/components/parallax.js +6 -2
  22. package/dist/js/components/parallax.min.js +1 -1
  23. package/dist/js/components/slider-parallax.js +6 -2
  24. package/dist/js/components/slider-parallax.min.js +1 -1
  25. package/dist/js/components/slider.js +1 -1
  26. package/dist/js/components/slider.min.js +1 -1
  27. package/dist/js/components/slideshow-parallax.js +6 -2
  28. package/dist/js/components/slideshow-parallax.min.js +1 -1
  29. package/dist/js/components/slideshow.js +1 -1
  30. package/dist/js/components/slideshow.min.js +1 -1
  31. package/dist/js/components/sortable.js +2 -2
  32. package/dist/js/components/sortable.min.js +1 -1
  33. package/dist/js/components/tooltip.js +4 -2
  34. package/dist/js/components/tooltip.min.js +1 -1
  35. package/dist/js/components/upload.js +1 -1
  36. package/dist/js/components/upload.min.js +1 -1
  37. package/dist/js/uikit-core.js +203 -134
  38. package/dist/js/uikit-core.min.js +1 -1
  39. package/dist/js/uikit-icons.js +1 -1
  40. package/dist/js/uikit-icons.min.js +1 -1
  41. package/dist/js/uikit.js +209 -136
  42. package/dist/js/uikit.min.js +1 -1
  43. package/package.json +1 -1
  44. package/src/js/components/sortable.js +2 -3
  45. package/src/js/core/drop.js +19 -12
  46. package/src/js/core/height-match.js +1 -2
  47. package/src/js/core/margin.js +1 -1
  48. package/src/js/core/navbar.js +17 -7
  49. package/src/js/core/scrollspy-nav.js +4 -9
  50. package/src/js/core/sticky.js +26 -13
  51. package/src/js/core/toggle.js +8 -8
  52. package/src/js/mixin/modal.js +6 -2
  53. package/src/js/mixin/parallax.js +5 -1
  54. package/src/js/mixin/position.js +2 -0
  55. package/src/js/uikit-core.js +0 -4
  56. package/src/js/util/lang.js +0 -4
  57. package/src/js/util/position.js +80 -24
  58. package/src/js/util/viewport.js +42 -22
  59. package/src/less/components/drop.less +0 -1
  60. package/src/less/components/navbar.less +11 -0
  61. package/src/less/components/search.less +2 -0
  62. package/src/less/theme/search.less +6 -0
  63. package/src/scss/components/drop.scss +0 -1
  64. package/src/scss/components/navbar.scss +11 -0
  65. package/src/scss/components/search.scss +2 -0
  66. package/src/scss/mixins-theme.scss +1 -0
  67. package/src/scss/mixins.scss +1 -0
  68. package/src/scss/theme/search.scss +6 -0
  69. package/tests/animation.html +216 -214
  70. package/tests/navbar.html +37 -0
  71. package/tests/sticky-parallax.html +16 -0
  72. package/tests/sticky.html +212 -36
  73. package/src/js/core/core.js +0 -25
package/dist/js/uikit.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.13.8-dev.fd15ccb29 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
1
+ /*! UIkit 3.13.10-dev.4de12886e | 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() :
@@ -141,10 +141,6 @@
141
141
  return (document == null ? void 0 : document.defaultView) || window;
142
142
  }
143
143
 
144
- function toMs(time) {
145
- return time ? endsWith(time, 'ms') ? toFloat(time) : toFloat(time) * 1000 : 0;
146
- }
147
-
148
144
  function isEqual(value, other) {
149
145
  return (
150
146
  value === other ||
@@ -1788,7 +1784,7 @@
1788
1784
  return intersectRect(
1789
1785
  ...scrollParents(element).
1790
1786
  map((parent) => {
1791
- const { top, left, bottom, right } = offset(getViewport$1(parent));
1787
+ const { top, left, bottom, right } = offsetViewport(parent);
1792
1788
 
1793
1789
  return {
1794
1790
  top: top - offsetTop,
@@ -1803,7 +1799,7 @@
1803
1799
 
1804
1800
  function scrollTop(element, top) {
1805
1801
  if (isWindow(element) || isDocument(element)) {
1806
- element = getScrollingElement(element);
1802
+ element = scrollingElement(element);
1807
1803
  } else {
1808
1804
  element = toNode(element);
1809
1805
  }
@@ -1820,12 +1816,13 @@
1820
1816
  return parents.reduce(
1821
1817
  (fn, scrollElement, i) => {
1822
1818
  const { scrollTop, scrollHeight, offsetHeight } = scrollElement;
1823
- const maxScroll = scrollHeight - getViewportClientHeight(scrollElement);
1824
- const { height: elHeight, top: elTop } = offset(parents[i - 1] || element);
1825
-
1826
- let top = Math.ceil(
1827
- elTop - offset(getViewport$1(scrollElement)).top - offsetBy + scrollTop);
1819
+ const viewport = offsetViewport(scrollElement);
1820
+ const maxScroll = scrollHeight - viewport.height;
1821
+ const { height: elHeight, top: elTop } = parents[i - 1] ?
1822
+ offsetViewport(parents[i - 1]) :
1823
+ offset(element);
1828
1824
 
1825
+ let top = Math.ceil(elTop - viewport.top - offsetBy + scrollTop);
1829
1826
 
1830
1827
  if (offsetBy > 0 && offsetHeight < elHeight + offsetBy) {
1831
1828
  top += offsetBy;
@@ -1883,7 +1880,7 @@
1883
1880
 
1884
1881
  const [scrollElement] = scrollParents(element, /auto|scroll/, true);
1885
1882
  const { scrollHeight, scrollTop } = scrollElement;
1886
- const viewportHeight = getViewportClientHeight(scrollElement);
1883
+ const { height: viewportHeight } = offsetViewport(scrollElement);
1887
1884
  const maxScroll = scrollHeight - viewportHeight;
1888
1885
  const elementOffsetTop = offsetPosition(element)[0] - offsetPosition(scrollElement)[0];
1889
1886
 
@@ -1894,7 +1891,7 @@
1894
1891
  }
1895
1892
 
1896
1893
  function scrollParents(element, overflowRe, scrollable) {if (overflowRe === void 0) {overflowRe = /auto|scroll|hidden/;}if (scrollable === void 0) {scrollable = false;}
1897
- const scrollEl = getScrollingElement(element);
1894
+ const scrollEl = scrollingElement(element);
1898
1895
 
1899
1896
  let ancestors = parents(element).reverse();
1900
1897
  ancestors = ancestors.slice(ancestors.indexOf(scrollEl) + 1);
@@ -1909,28 +1906,45 @@
1909
1906
  ancestors.filter(
1910
1907
  (parent) =>
1911
1908
  overflowRe.test(css(parent, 'overflow')) && (
1912
- !scrollable || parent.scrollHeight > getViewportClientHeight(parent)))).
1909
+ !scrollable || parent.scrollHeight > offsetViewport(parent).height))).
1913
1910
 
1914
1911
 
1915
1912
  reverse();
1916
1913
  }
1917
1914
 
1918
- function getViewport$1(scrollElement) {
1919
- return scrollElement === getScrollingElement(scrollElement) ? window : scrollElement;
1915
+ function offsetViewport(scrollElement) {
1916
+ let viewportElement = getViewport$1(scrollElement);
1917
+
1918
+ // iOS 12 returns <body> as scrollingElement
1919
+ if (viewportElement === scrollingElement(viewportElement)) {
1920
+ viewportElement = document.documentElement;
1921
+ }
1922
+
1923
+ let rect = offset(viewportElement);
1924
+ for (let [prop, dir, start, end] of [
1925
+ ['width', 'x', 'left', 'right'],
1926
+ ['height', 'y', 'top', 'bottom']])
1927
+ {
1928
+ if (!isWindow(getViewport$1(viewportElement))) {
1929
+ rect[start] += toFloat(css(viewportElement, "border" + ucfirst(start) + "Width"));
1930
+ }
1931
+ rect[prop] = rect[dir] = (
1932
+ isWindow(viewportElement) ? scrollingElement(viewportElement) : viewportElement)["client" +
1933
+ ucfirst(prop)];
1934
+ rect[end] = rect[prop] + rect[start];
1935
+ }
1936
+ return rect;
1920
1937
  }
1921
1938
 
1922
- // iOS 12 returns <body> as scrollingElement
1923
- function getViewportClientHeight(scrollElement) {
1924
- return (
1925
- scrollElement === getScrollingElement(scrollElement) ?
1926
- document.documentElement :
1927
- scrollElement).
1928
- clientHeight;
1939
+ function scrollingElement(element) {
1940
+ const {
1941
+ document: { scrollingElement } } =
1942
+ toWindow(element);
1943
+ return scrollingElement;
1929
1944
  }
1930
1945
 
1931
- function getScrollingElement(element) {
1932
- const { document } = toWindow(element);
1933
- return document.scrollingElement || document.documentElement;
1946
+ function getViewport$1(scrollElement) {
1947
+ return scrollElement === scrollingElement(scrollElement) ? window : scrollElement;
1934
1948
  }
1935
1949
 
1936
1950
  const dirs = [
@@ -1984,18 +1998,21 @@
1984
1998
  function attachToWithFlip(element, target, options) {
1985
1999
  const position = attachTo(element, target, options);
1986
2000
  const targetDim = offset(target);
1987
- const viewports = scrollParents(element).map(getViewport$1);
2001
+ const viewports = scrollParents(element, /auto|scroll/);
2002
+ const [scrollElement] = viewports;
1988
2003
 
1989
2004
  let {
1990
2005
  flip,
1991
2006
  attach: { element: elAttach, target: targetAttach },
1992
2007
  offset: elOffset,
1993
2008
  boundary,
1994
- viewport } =
2009
+ viewport,
2010
+ viewportPadding } =
1995
2011
  options;
1996
2012
 
1997
2013
  viewports.push(viewport);
1998
2014
 
2015
+ const offsetPosition = { ...position };
1999
2016
  for (const i in dirs) {
2000
2017
  const [prop, dir, start, end] = dirs[i];
2001
2018
 
@@ -2006,9 +2023,16 @@
2006
2023
  const willFlip =
2007
2024
  !intersectLine(position, targetDim, i) && intersectLine(position, targetDim, 1 - i);
2008
2025
 
2009
- viewport = getIntersectionArea(
2010
- ...viewports,
2011
- willFlip || position[prop] > offset(boundary)[prop] ? null : boundary);
2026
+ viewport = getIntersectionArea(...viewports.filter(Boolean).map(offsetViewport));
2027
+
2028
+ if (viewportPadding) {
2029
+ viewport[start] += viewportPadding;
2030
+ viewport[end] -= viewportPadding;
2031
+ }
2032
+
2033
+ if (boundary && !(willFlip || position[prop] > offset(boundary)[prop])) {
2034
+ viewport = getIntersectionArea(viewport, offset(boundary));
2035
+ }
2012
2036
 
2013
2037
  const isInStartBoundary = position[start] >= viewport[start];
2014
2038
  const isInEndBoundary = position[end] <= viewport[end];
@@ -2041,6 +2065,41 @@
2041
2065
  0) -
2042
2066
  elOffset[i] * 2;
2043
2067
 
2068
+ if (
2069
+ !isInScrollArea(
2070
+ {
2071
+ ...position,
2072
+ [start]: position[start] + offsetBy,
2073
+ [end]: position[end] + offsetBy },
2074
+
2075
+ scrollElement,
2076
+ i))
2077
+
2078
+ {
2079
+ if (isInScrollArea(position, scrollElement, i)) {
2080
+ continue;
2081
+ }
2082
+
2083
+ if (options.recursion) {
2084
+ return false;
2085
+ }
2086
+
2087
+ const newPos = attachToWithFlip(element, target, {
2088
+ ...options,
2089
+ attach: {
2090
+ element: elAttach.map(flipDir).reverse(),
2091
+ target: targetAttach.map(flipDir).reverse() },
2092
+
2093
+ offset: elOffset.reverse(),
2094
+ flip: flip === true ? flip : [...flip, dirs[1 - i][1]],
2095
+ recursion: true });
2096
+
2097
+
2098
+ if (newPos && isInScrollArea(newPos, scrollElement, 1 - i)) {
2099
+ return newPos;
2100
+ }
2101
+ }
2102
+
2044
2103
  // Move
2045
2104
  } else {
2046
2105
  offsetBy =
@@ -2051,11 +2110,11 @@
2051
2110
  position[start];
2052
2111
  }
2053
2112
 
2054
- position[start] = position[dir] = position[start] + offsetBy;
2055
- position[end] += offsetBy;
2113
+ offsetPosition[start] = position[dir] = position[start] + offsetBy;
2114
+ offsetPosition[end] += offsetBy;
2056
2115
  }
2057
2116
 
2058
- return position;
2117
+ return offsetPosition;
2059
2118
  }
2060
2119
 
2061
2120
  function moveBy(start, end, dim) {
@@ -2063,21 +2122,23 @@
2063
2122
  }
2064
2123
 
2065
2124
  function getIntersectionArea() {
2066
- let intersection;for (var _len = arguments.length, elements = new Array(_len), _key = 0; _key < _len; _key++) {elements[_key] = arguments[_key];}
2067
- for (const el of elements.filter(Boolean)) {
2068
- const rect = offset(el);
2069
- if (!intersection) {
2070
- intersection = rect;
2071
- continue;
2072
- }
2073
- for (const prop of ['left', 'top']) {
2074
- intersection[prop] = Math.max(rect[prop], intersection[prop]);
2075
- }
2076
- for (const prop of ['right', 'bottom']) {
2077
- intersection[prop] = Math.min(rect[prop], intersection[prop]);
2125
+ let area = {};for (var _len = arguments.length, rects = new Array(_len), _key = 0; _key < _len; _key++) {rects[_key] = arguments[_key];}
2126
+ for (const rect of rects) {
2127
+ for (const [,, start, end] of dirs) {
2128
+ area[start] = Math.max(area[start] || 0, rect[start]);
2129
+ area[end] = Math.min(...[area[end], rect[end]].filter(Boolean));
2078
2130
  }
2079
2131
  }
2080
- return intersection;
2132
+ return area;
2133
+ }
2134
+
2135
+ function isInScrollArea(position, scrollElement, dir) {
2136
+ const viewport = offsetViewport(scrollElement);
2137
+ const [prop,, start, end] = dirs[dir];
2138
+ viewport[start] -= scrollElement["scroll" + ucfirst(start)];
2139
+ viewport[end] = viewport[start] + scrollElement["scroll" + ucfirst(prop)];
2140
+
2141
+ return position[start] >= viewport[start] && position[end] <= viewport[end];
2081
2142
  }
2082
2143
 
2083
2144
  function intersectLine(dimA, dimB, dir) {
@@ -2085,6 +2146,15 @@
2085
2146
  return dimA[end] > dimB[start] && dimB[end] > dimA[start];
2086
2147
  }
2087
2148
 
2149
+ function flipDir(prop) {
2150
+ for (const i in dirs) {
2151
+ const index = dirs[i].indexOf(prop);
2152
+ if (~index) {
2153
+ return dirs[1 - i][index % 2 + 2];
2154
+ }
2155
+ }
2156
+ }
2157
+
2088
2158
  var util = /*#__PURE__*/Object.freeze({
2089
2159
  __proto__: null,
2090
2160
  ajax: ajax,
@@ -2191,7 +2261,6 @@
2191
2261
  toNode: toNode,
2192
2262
  toNodes: toNodes,
2193
2263
  toWindow: toWindow,
2194
- toMs: toMs,
2195
2264
  isEqual: isEqual,
2196
2265
  swap: swap,
2197
2266
  last: last,
@@ -2230,9 +2299,7 @@
2230
2299
  scrollIntoView: scrollIntoView,
2231
2300
  scrolledOver: scrolledOver,
2232
2301
  scrollParents: scrollParents,
2233
- getViewport: getViewport$1,
2234
- getViewportClientHeight: getViewportClientHeight,
2235
- getScrollingElement: getScrollingElement
2302
+ offsetViewport: offsetViewport
2236
2303
  });
2237
2304
 
2238
2305
  function globalAPI (UIkit) {
@@ -2891,7 +2958,7 @@
2891
2958
  UIkit.data = '__uikit__';
2892
2959
  UIkit.prefix = 'uk-';
2893
2960
  UIkit.options = {};
2894
- UIkit.version = '3.13.8-dev.fd15ccb29';
2961
+ UIkit.version = '3.13.10-dev.4de12886e';
2895
2962
 
2896
2963
  globalAPI(UIkit);
2897
2964
  hooksAPI(UIkit);
@@ -2899,30 +2966,6 @@
2899
2966
  componentAPI(UIkit);
2900
2967
  instanceAPI(UIkit);
2901
2968
 
2902
- function Core () {
2903
- if (!inBrowser) {
2904
- return;
2905
- }
2906
-
2907
- let started = 0;
2908
- on(
2909
- document,
2910
- 'animationstart',
2911
- (_ref) => {let { target } = _ref;
2912
- if ((css(target, 'animationName') || '').match(/^uk-.*(left|right)/)) {
2913
- started++;
2914
- css(document.documentElement, 'overflowX', 'hidden');
2915
- setTimeout(() => {
2916
- if (! --started) {
2917
- css(document.documentElement, 'overflowX', '');
2918
- }
2919
- }, toMs(css(target, 'animationDuration')) + 100);
2920
- }
2921
- },
2922
- true);
2923
-
2924
- }
2925
-
2926
2969
  function boot (UIkit) {
2927
2970
  const { connect, disconnect } = UIkit;
2928
2971
 
@@ -3500,7 +3543,8 @@
3500
3543
  data: {
3501
3544
  pos: "bottom-" + (isRtl ? 'right' : 'left'),
3502
3545
  flip: true,
3503
- offset: false },
3546
+ offset: false,
3547
+ viewportPadding: 10 },
3504
3548
 
3505
3549
 
3506
3550
  connected() {
@@ -3539,6 +3583,7 @@
3539
3583
  attach,
3540
3584
  offset: offset$1,
3541
3585
  boundary,
3586
+ viewportPadding: this.viewportPadding,
3542
3587
  flip: this.flip });
3543
3588
 
3544
3589
  } } };
@@ -3757,7 +3802,7 @@
3757
3802
  this.hide(false);
3758
3803
  }
3759
3804
  }),
3760
- on(window, 'resize', () => this.$emit('resize'))])
3805
+ on(window, 'resize', () => this.$emit())])
3761
3806
  {
3762
3807
  once(this.$el, 'hide', handler, { self: true });
3763
3808
  }
@@ -3797,9 +3842,7 @@
3797
3842
  if (this.isToggled() && !hasClass(this.$el, this.clsEnter)) {
3798
3843
  this.position();
3799
3844
  }
3800
- },
3801
-
3802
- events: ['resize'] },
3845
+ } },
3803
3846
 
3804
3847
 
3805
3848
  methods: {
@@ -3870,26 +3913,33 @@
3870
3913
  },
3871
3914
 
3872
3915
  position() {
3873
- const boundary = query(this.boundary, this.$el) || window;
3874
3916
  removeClass(this.$el, this.clsDrop + "-stack");
3875
3917
  toggleClass(this.$el, this.clsDrop + "-boundary", this.boundaryAlign);
3876
3918
 
3877
- const boundaryOffset = offset(boundary);
3878
- const targetOffset = offset(this.target);
3879
- const alignTo = this.boundaryAlign ? boundaryOffset : targetOffset;
3880
- const prop = this.axis === 'y' ? 'width' : 'height';
3919
+ const boundary = query(this.boundary, this.$el);
3920
+ const [scrollParent] = scrollParents(this.$el);
3921
+ const scrollParentOffset = offsetViewport(scrollParent);
3922
+ const boundaryOffset = boundary ? offset(boundary) : scrollParentOffset;
3881
3923
 
3882
- css(this.$el, "max-" + prop, '');
3924
+ css(this.$el, 'maxWidth', '');
3925
+ const maxWidth = scrollParentOffset.width - (boundary ? 0 : 2 * this.viewportPadding);
3883
3926
 
3884
3927
  if (this.pos[1] === 'justify') {
3928
+ const prop = this.axis === 'y' ? 'width' : 'height';
3929
+ const targetOffset = offset(this.target);
3930
+ const alignTo = this.boundaryAlign ? boundaryOffset : targetOffset;
3885
3931
  css(this.$el, prop, alignTo[prop]);
3886
- } else if (this.$el.offsetWidth > boundaryOffset.width) {
3932
+ } else if (this.$el.offsetWidth > maxWidth) {
3887
3933
  addClass(this.$el, this.clsDrop + "-stack");
3888
3934
  }
3889
3935
 
3890
- css(this.$el, "max-" + prop, boundaryOffset[prop]);
3936
+ css(this.$el, 'maxWidth', maxWidth);
3937
+
3938
+ this.positionAt(
3939
+ this.$el,
3940
+ boundary && this.boundaryAlign ? boundary : this.target,
3941
+ boundary);
3891
3942
 
3892
- this.positionAt(this.$el, this.boundaryAlign ? boundary : this.target, boundary);
3893
3943
  } } };
3894
3944
 
3895
3945
 
@@ -3987,7 +4037,7 @@
3987
4037
 
3988
4038
 
3989
4039
  resizeTargets() {
3990
- return this.$el.children;
4040
+ return [this.$el, this.$el.children];
3991
4041
  },
3992
4042
 
3993
4043
  connected() {
@@ -4288,8 +4338,7 @@
4288
4338
 
4289
4339
  data: {
4290
4340
  target: '> *',
4291
- row: true,
4292
- forceHeight: true },
4341
+ row: true },
4293
4342
 
4294
4343
 
4295
4344
  computed: {
@@ -4305,7 +4354,7 @@
4305
4354
 
4306
4355
 
4307
4356
  resizeTargets() {
4308
- return this.elements;
4357
+ return [this.$el, this.elements];
4309
4358
  },
4310
4359
 
4311
4360
  update: {
@@ -5295,7 +5344,7 @@
5295
5344
  return (el, show) =>
5296
5345
  new Promise((resolve, reject) =>
5297
5346
  once(el, 'show hide', () => {
5298
- el._reject && el._reject();
5347
+ el._reject == null ? void 0 : el._reject();
5299
5348
  el._reject = reject;
5300
5349
 
5301
5350
  _toggle(el, show);
@@ -5320,6 +5369,10 @@
5320
5369
  then(() => delete el._reject);
5321
5370
  }
5322
5371
 
5372
+ function toMs(time) {
5373
+ return time ? endsWith(time, 'ms') ? toFloat(time) : toFloat(time) * 1000 : 0;
5374
+ }
5375
+
5323
5376
  var modal = {
5324
5377
  install: install$2,
5325
5378
 
@@ -5473,8 +5526,6 @@
5473
5526
  toggle: '> a',
5474
5527
  content: '> ul' } };
5475
5528
 
5476
- const navItem = '.uk-navbar-nav > li > a, .uk-navbar-item, .uk-navbar-toggle';
5477
-
5478
5529
  var navbar = {
5479
5530
  mixins: [Class, Container],
5480
5531
 
@@ -5494,7 +5545,7 @@
5494
5545
 
5495
5546
 
5496
5547
  data: {
5497
- dropdown: navItem,
5548
+ dropdown: '.uk-navbar-nav > li > a, .uk-navbar-item, .uk-navbar-toggle',
5498
5549
  align: isRtl ? 'right' : 'left',
5499
5550
  clsDrop: 'uk-navbar-dropdown',
5500
5551
  mode: undefined,
@@ -5507,8 +5558,6 @@
5507
5558
  dropbar: false,
5508
5559
  dropbarAnchor: false,
5509
5560
  duration: 200,
5510
- forceHeight: true,
5511
- selMinHeight: navItem,
5512
5561
  container: false },
5513
5562
 
5514
5563
 
@@ -5582,9 +5631,23 @@
5582
5631
  immediate: true },
5583
5632
 
5584
5633
 
5585
- toggles(_ref6, $el) {let { dropdown } = _ref6;
5586
- return $$(dropdown, $el);
5587
- } },
5634
+ toggles: {
5635
+ get(_ref6, $el) {let { dropdown } = _ref6;
5636
+ return $$(dropdown, $el);
5637
+ },
5638
+
5639
+ watch() {
5640
+ const justify = hasClass(this.$el, 'uk-navbar-justify');
5641
+ for (const container of $$(
5642
+ '.uk-navbar-nav, .uk-navbar-left, .uk-navbar-right',
5643
+ this.$el))
5644
+ {
5645
+ css(container, 'flexGrow', justify ? $$(this.dropdown, container).length : '');
5646
+ }
5647
+ },
5648
+
5649
+ immediate: true } },
5650
+
5588
5651
 
5589
5652
 
5590
5653
  disconnected() {
@@ -6479,19 +6542,15 @@
6479
6542
 
6480
6543
  const [scrollElement] = scrollParents(targets, /auto|scroll/, true);
6481
6544
  const { scrollTop, scrollHeight } = scrollElement;
6482
- const max = scrollHeight - getViewportClientHeight(scrollElement);
6545
+ const viewport = offsetViewport(scrollElement);
6546
+ const max = scrollHeight - viewport.height;
6483
6547
  let active = false;
6484
6548
 
6485
6549
  if (scrollTop === max) {
6486
6550
  active = length - 1;
6487
6551
  } else {
6488
6552
  for (const i in targets) {
6489
- if (
6490
- offset(targets[i]).top -
6491
- offset(getViewport$1(scrollElement)).top -
6492
- this.offset >
6493
- 0)
6494
- {
6553
+ if (offset(targets[i]).top - viewport.top - this.offset > 0) {
6495
6554
  break;
6496
6555
  }
6497
6556
  active = +i;
@@ -6525,8 +6584,10 @@
6525
6584
 
6526
6585
  props: {
6527
6586
  position: String,
6528
- top: null,
6587
+ top: Boolean,
6529
6588
  bottom: Boolean,
6589
+ start: Boolean,
6590
+ end: Boolean,
6530
6591
  offset: String,
6531
6592
  animation: String,
6532
6593
  clsActive: String,
@@ -6540,8 +6601,10 @@
6540
6601
 
6541
6602
  data: {
6542
6603
  position: 'top',
6543
- top: 0,
6604
+ top: false,
6544
6605
  bottom: false,
6606
+ start: false,
6607
+ end: false,
6545
6608
  offset: 0,
6546
6609
  animation: '',
6547
6610
  clsActive: 'uk-active',
@@ -6564,6 +6627,9 @@
6564
6627
  },
6565
6628
 
6566
6629
  connected() {
6630
+ this.start = this.start || this.top;
6631
+ this.end = this.end || this.bottom;
6632
+
6567
6633
  this.placeholder =
6568
6634
  $('+ .uk-sticky-placeholder', this.$el) ||
6569
6635
  $('<div class="uk-sticky-placeholder"></div>');
@@ -6657,13 +6723,17 @@
6657
6723
  const overflow = Math.max(0, height$1 + offset$1 - windowHeight);
6658
6724
  const topOffset = offset(referenceElement).top;
6659
6725
 
6660
- const top = parseProp(this.top, this.$el, topOffset);
6661
- const bottom = parseProp(this.bottom, this.$el, topOffset + height$1, true);
6662
-
6663
- const start = Math.max(top, topOffset) - offset$1;
6664
- const end = bottom ?
6665
- bottom - offset(this.$el).height + overflow - offset$1 :
6666
- getScrollingElement(this.$el).scrollHeight - windowHeight;
6726
+ const start =
6727
+ (this.start === false ?
6728
+ topOffset :
6729
+ parseProp(this.start, this.$el, topOffset)) - offset$1;
6730
+ const end =
6731
+ this.end === false ?
6732
+ document.scrollingElement.scrollHeight - windowHeight :
6733
+ parseProp(this.end, this.$el, topOffset + height$1, true) -
6734
+ offset(this.$el).height +
6735
+ overflow -
6736
+ offset$1;
6667
6737
 
6668
6738
  return {
6669
6739
  start,
@@ -6709,7 +6779,9 @@
6709
6779
  prevDir,
6710
6780
  scroll,
6711
6781
  prevScroll,
6712
- offsetParentTop: offset(this.$el.offsetParent).top,
6782
+ offsetParentTop: offset(
6783
+ (this.isFixed ? this.placeholder : this.$el).offsetParent).
6784
+ top,
6713
6785
  overflowScroll: clamp(
6714
6786
  overflowScroll + clamp(scroll, start, end) - clamp(prevScroll, start, end),
6715
6787
  0,
@@ -6864,8 +6936,8 @@
6864
6936
  return 0;
6865
6937
  }
6866
6938
 
6867
- if (isString(value) && value.match(/^-?\d/)) {
6868
- return propOffset + toPx(value);
6939
+ if (isNumeric(value) || isString(value) && value.match(/^-?\d/)) {
6940
+ return propOffset + toPx(value, 'height', el, true);
6869
6941
  } else {
6870
6942
  const refElement = value === true ? parent(el) : query(value, el);
6871
6943
  return (
@@ -7185,15 +7257,7 @@
7185
7257
  {
7186
7258
  name: 'click',
7187
7259
 
7188
- filter() {
7189
- return includes(this.mode, 'click');
7190
- },
7191
-
7192
7260
  handler(e) {
7193
- if (this._preventClick) {
7194
- return this._preventClick = null;
7195
- }
7196
-
7197
7261
  let link;
7198
7262
  if (
7199
7263
  closest(e.target, 'a[href="#"], a[href=""]') ||
@@ -7204,6 +7268,14 @@
7204
7268
  e.preventDefault();
7205
7269
  }
7206
7270
 
7271
+ if (this._preventClick) {
7272
+ return this._preventClick = null;
7273
+ }
7274
+
7275
+ if (!includes(this.mode, 'click')) {
7276
+ return;
7277
+ }
7278
+
7207
7279
  this.toggle();
7208
7280
  } },
7209
7281
 
@@ -7329,9 +7401,6 @@
7329
7401
  // register components
7330
7402
  each(components$1, (component, name) => UIkit.component(name, component));
7331
7403
 
7332
- // core functionality
7333
- UIkit.use(Core);
7334
-
7335
7404
  boot(UIkit);
7336
7405
 
7337
7406
  const units = ['days', 'hours', 'minutes', 'seconds'];
@@ -9226,12 +9295,16 @@
9226
9295
 
9227
9296
 
9228
9297
  function transformFn(prop, el, stops) {
9229
- const unit = getUnit(stops) || { x: 'px', y: 'px', rotate: 'deg' }[prop] || '';
9298
+ let unit = getUnit(stops) || { x: 'px', y: 'px', rotate: 'deg' }[prop] || '';
9230
9299
  let transformFn;
9231
9300
 
9232
9301
  if (prop === 'x' || prop === 'y') {
9233
9302
  prop = "translate" + ucfirst(prop);
9234
9303
  transformFn = (stop) => toFloat(toFloat(stop).toFixed(unit === 'px' ? 0 : 6));
9304
+ } else if (prop === 'scale') {
9305
+ unit = '';
9306
+ transformFn = (stop) =>
9307
+ getUnit([stop]) ? toPx(stop, 'width', el, true) / el.offsetWidth : stop;
9235
9308
  }
9236
9309
 
9237
9310
  if (stops.length === 1) {
@@ -10545,7 +10618,7 @@
10545
10618
  some((scrollEl) => {
10546
10619
  let { scrollTop: scroll, scrollHeight } = scrollEl;
10547
10620
 
10548
- const { top, bottom, height } = offset(getViewport$1(scrollEl));
10621
+ const { top, bottom, height } = offsetViewport(scrollEl);
10549
10622
 
10550
10623
  if (top < y && top + 35 > y) {
10551
10624
  scroll -= dist;