uikit 3.13.1-dev.dedbd3fce → 3.13.2-dev.696f00752

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 (75) hide show
  1. package/.eslintrc.json +9 -0
  2. package/CHANGELOG.md +22 -0
  3. package/dist/css/uikit-core-rtl.css +31 -71
  4. package/dist/css/uikit-core-rtl.min.css +1 -1
  5. package/dist/css/uikit-core.css +31 -71
  6. package/dist/css/uikit-core.min.css +1 -1
  7. package/dist/css/uikit-rtl.css +31 -71
  8. package/dist/css/uikit-rtl.min.css +1 -1
  9. package/dist/css/uikit.css +31 -71
  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 +1 -1
  16. package/dist/js/components/lightbox-panel.min.js +1 -1
  17. package/dist/js/components/lightbox.js +1 -1
  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 +1 -1
  22. package/dist/js/components/parallax.min.js +1 -1
  23. package/dist/js/components/slider-parallax.js +1 -1
  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 +1 -1
  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 +1 -1
  32. package/dist/js/components/sortable.min.js +1 -1
  33. package/dist/js/components/tooltip.js +60 -31
  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 +218 -208
  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 +220 -211
  42. package/dist/js/uikit.min.js +1 -1
  43. package/package.json +10 -10
  44. package/src/js/components/tooltip.js +2 -3
  45. package/src/js/core/cover.js +1 -1
  46. package/src/js/core/drop.js +7 -10
  47. package/src/js/core/navbar.js +12 -13
  48. package/src/js/core/responsive.js +1 -1
  49. package/src/js/core/sticky.js +1 -1
  50. package/src/js/core/switcher.js +7 -13
  51. package/src/js/mixin/media.js +4 -4
  52. package/src/js/mixin/position.js +53 -24
  53. package/src/js/util/dimensions.js +2 -2
  54. package/src/js/util/position.js +125 -129
  55. package/src/js/util/style.js +13 -19
  56. package/src/less/components/drop.less +3 -11
  57. package/src/less/components/dropdown.less +3 -11
  58. package/src/less/components/navbar.less +13 -23
  59. package/src/less/components/offcanvas.less +19 -1
  60. package/src/less/components/tooltip.less +2 -11
  61. package/src/less/theme/navbar.less +1 -3
  62. package/src/scss/components/drop.scss +3 -11
  63. package/src/scss/components/dropdown.scss +3 -11
  64. package/src/scss/components/navbar.scss +13 -23
  65. package/src/scss/components/offcanvas.scss +19 -1
  66. package/src/scss/components/tooltip.scss +2 -11
  67. package/src/scss/mixins-theme.scss +1 -2
  68. package/src/scss/mixins.scss +0 -1
  69. package/src/scss/theme/navbar.scss +0 -2
  70. package/src/scss/variables-theme.scss +7 -5
  71. package/src/scss/variables.scss +7 -5
  72. package/tests/drop.html +1 -1
  73. package/tests/navbar.html +2 -8
  74. package/tests/position.html +38 -39
  75. package/tests/search.html +1 -1
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.13.1-dev.dedbd3fce | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
1
+ /*! UIkit 3.13.2-dev.696f00752 | 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() :
@@ -767,21 +767,22 @@
767
767
  property = propName(property);
768
768
 
769
769
  if (isUndefined(value)) {
770
- return getStyle(element, property);
771
- } else if (!value && !isNumber(value)) {
772
- element.style.removeProperty(property);
770
+ return getComputedStyle(element).getPropertyValue(property);
773
771
  } else {
774
772
  element.style.setProperty(
775
773
  property,
776
- isNumeric(value) && !cssNumber[property] ? value + "px" : value,
774
+ isNumeric(value) && !cssNumber[property] ?
775
+ value + "px" :
776
+ value || isNumber(value) ?
777
+ value :
778
+ '',
777
779
  priority);
778
780
 
779
781
  }
780
782
  } else if (isArray(property)) {
781
- const styles = getStyles(element);
782
783
  const props = {};
783
784
  for (const prop of property) {
784
- props[prop] = styles[propName(prop)];
785
+ props[prop] = css(element, prop);
785
786
  }
786
787
  return props;
787
788
  } else if (isObject(property)) {
@@ -792,19 +793,9 @@
792
793
  return elements[0];
793
794
  }
794
795
 
795
- function getStyles(element, pseudoElt) {
796
- return toWindow(element).getComputedStyle(element, pseudoElt);
797
- }
798
-
799
- function getStyle(element, property, pseudoElt) {
800
- return getStyles(element, pseudoElt)[property];
801
- }
802
-
803
796
  const propertyRe = /^\s*(["'])?(.*?)\1\s*$/;
804
- function getCssVar(name) {
805
- return getStyles(document.documentElement).
806
- getPropertyValue("--uk-" + name).
807
- replace(propertyRe, '$2');
797
+ function getCssVar(name, element) {if (element === void 0) {element = document.documentElement;}
798
+ return css(element, "--uk-" + name).replace(propertyRe, '$2');
808
799
  }
809
800
 
810
801
  // https://drafts.csswg.org/cssom/#dom-cssstyledeclaration-setproperty
@@ -813,6 +804,10 @@
813
804
  const cssPrefixes = ['webkit', 'moz'];
814
805
 
815
806
  function vendorPropName(name) {
807
+ if (name[0] === '-') {
808
+ return name;
809
+ }
810
+
816
811
  name = hyphenate(name);
817
812
 
818
813
  const { style } = document.documentElement;
@@ -1019,8 +1014,8 @@
1019
1014
  const offsetBy = { height: scrollY, width: scrollX };
1020
1015
 
1021
1016
  for (const dir in dirs$1) {
1022
- for (const i in dirs$1[dir]) {
1023
- currentOffset[dirs$1[dir][i]] += offsetBy[dir];
1017
+ for (const prop of dirs$1[dir]) {
1018
+ currentOffset[prop] += offsetBy[dir];
1024
1019
  }
1025
1020
  }
1026
1021
  }
@@ -1935,157 +1930,153 @@
1935
1930
  return document.scrollingElement || document.documentElement;
1936
1931
  }
1937
1932
 
1938
- const dirs = {
1939
- width: ['x', 'left', 'right'],
1940
- height: ['y', 'top', 'bottom'] };
1933
+ const dirs = [
1934
+ ['width', 'x', 'left', 'right'],
1935
+ ['height', 'y', 'top', 'bottom']];
1941
1936
 
1942
1937
 
1943
- function positionAt(
1944
- element,
1945
- target,
1946
- elAttach,
1947
- targetAttach,
1948
- elOffset,
1949
- targetOffset,
1950
- flip,
1951
- boundary)
1952
- {
1953
- elAttach = getPos(elAttach);
1954
- targetAttach = getPos(targetAttach);
1938
+ function positionAt(element, target, options) {
1939
+ options = {
1940
+ attach: {
1941
+ element: ['left', 'top'],
1942
+ target: ['left', 'top'],
1943
+ ...options.attach },
1955
1944
 
1956
- const flipped = { element: elAttach, target: targetAttach };
1945
+ offset: [0, 0],
1946
+ ...options };
1957
1947
 
1958
- if (!element || !target) {
1959
- return flipped;
1960
- }
1961
1948
 
1962
- const dim = offset(element);
1963
- const targetDim = offset(target);
1964
- const position = targetDim;
1949
+ const dim = options.flip ?
1950
+ attachToWithFlip(element, target, options) :
1951
+ attachTo(element, target, options);
1965
1952
 
1966
- moveTo(position, elAttach, dim, -1);
1967
- moveTo(position, targetAttach, targetDim, 1);
1953
+ offset(element, dim);
1954
+ }
1968
1955
 
1969
- elOffset = getOffsets(elOffset, dim.width, dim.height);
1970
- targetOffset = getOffsets(targetOffset, targetDim.width, targetDim.height);
1956
+ function attachTo(element, target, options) {
1957
+ let { attach, offset: offsetBy } = {
1958
+ attach: {
1959
+ element: ['left', 'top'],
1960
+ target: ['left', 'top'],
1961
+ ...options.attach },
1971
1962
 
1972
- elOffset['x'] += targetOffset['x'];
1973
- elOffset['y'] += targetOffset['y'];
1963
+ offset: [0, 0],
1964
+ ...options };
1974
1965
 
1975
- position.left += elOffset['x'];
1976
- position.top += elOffset['y'];
1977
1966
 
1978
- if (flip) {
1979
- let boundaries = scrollParents(element).map(getViewport$1);
1967
+ const position = offset(element);
1968
+ const targetOffset = offset(target);
1969
+ for (const i in dirs) {
1970
+ const [prop, dir, start, end] = dirs[i];
1971
+ position[start] = position[dir] =
1972
+ targetOffset[start] +
1973
+ moveBy(attach.target[i], end, targetOffset[prop]) -
1974
+ moveBy(attach.element[i], end, position[prop]) +
1975
+ +offsetBy[i];
1976
+ position[end] = position[start] + position[prop];
1977
+ }
1978
+ return position;
1979
+ }
1980
1980
 
1981
- if (boundary && !includes(boundaries, boundary)) {
1982
- boundaries.unshift(boundary);
1983
- }
1981
+ function attachToWithFlip(element, target, options) {
1982
+ const position = attachTo(element, target, options);
1983
+ const targetDim = offset(target);
1984
+ const viewports = scrollParents(element).map(getViewport$1);
1984
1985
 
1985
- boundaries = boundaries.map((el) => offset(el));
1986
+ let {
1987
+ flip,
1988
+ attach: { element: elAttach, target: targetAttach },
1989
+ offset: elOffset,
1990
+ boundary,
1991
+ viewport } =
1992
+ options;
1986
1993
 
1987
- each(dirs, (_ref, prop) => {let [dir, align, alignFlip] = _ref;
1988
- if (!(flip === true || includes(flip, dir))) {
1989
- return;
1990
- }
1994
+ viewports.push(viewport);
1991
1995
 
1992
- boundaries.some((boundary) => {
1993
- const elemOffset =
1994
- elAttach[dir] === align ?
1995
- -dim[prop] :
1996
- elAttach[dir] === alignFlip ?
1997
- dim[prop] :
1998
- 0;
1996
+ for (const i in dirs) {
1997
+ const [prop, dir, start, end] = dirs[i];
1999
1998
 
2000
- const targetOffset =
2001
- targetAttach[dir] === align ?
2002
- targetDim[prop] :
2003
- targetAttach[dir] === alignFlip ?
2004
- -targetDim[prop] :
2005
- 0;
1999
+ if (flip !== true && !includes(flip, dir)) {
2000
+ continue;
2001
+ }
2006
2002
 
2007
- if (
2008
- position[align] < boundary[align] ||
2009
- position[align] + dim[prop] > boundary[alignFlip])
2010
- {
2011
- const centerOffset = dim[prop] / 2;
2012
- const centerTargetOffset =
2013
- targetAttach[dir] === 'center' ? -targetDim[prop] / 2 : 0;
2003
+ const willFlip =
2004
+ !intersectLine(position, targetDim, i) && intersectLine(position, targetDim, 1 - i);
2014
2005
 
2015
- return (
2016
- elAttach[dir] === 'center' && (
2017
- apply(centerOffset, centerTargetOffset) ||
2018
- apply(-centerOffset, -centerTargetOffset)) ||
2019
- apply(elemOffset, targetOffset));
2006
+ viewport = getIntersectionArea(...viewports, willFlip ? null : boundary);
2007
+ const isInStartBoundary = position[start] >= viewport[start];
2008
+ const isInEndBoundary = position[end] <= viewport[end];
2020
2009
 
2021
- }
2022
-
2023
- function apply(elemOffset, targetOffset) {
2024
- const newVal = toFloat(
2025
- (position[align] + elemOffset + targetOffset - elOffset[dir] * 2).toFixed(4));
2010
+ if (isInStartBoundary && isInEndBoundary) {
2011
+ continue;
2012
+ }
2026
2013
 
2014
+ let offsetBy;
2027
2015
 
2028
- if (newVal >= boundary[align] && newVal + dim[prop] <= boundary[alignFlip]) {
2029
- position[align] = newVal;
2016
+ // Flip
2017
+ if (willFlip) {
2018
+ if (
2019
+ elAttach[i] === end && isInStartBoundary ||
2020
+ elAttach[i] === start && isInEndBoundary)
2021
+ {
2022
+ continue;
2023
+ }
2030
2024
 
2031
- for (const el of ['element', 'target']) {
2032
- if (elemOffset) {
2033
- flipped[el][dir] =
2034
- flipped[el][dir] === dirs[prop][1] ?
2035
- dirs[prop][2] :
2036
- dirs[prop][1];
2037
- }
2038
- }
2025
+ offsetBy =
2026
+ (elAttach[i] === start ?
2027
+ -position[prop] :
2028
+ elAttach[i] === end ?
2029
+ position[prop] :
2030
+ 0) + (
2031
+ targetAttach[i] === start ?
2032
+ targetDim[prop] :
2033
+ targetAttach[i] === end ?
2034
+ -targetDim[prop] :
2035
+ 0) -
2036
+ elOffset[i] * 2;
2037
+
2038
+ // Move
2039
+ } else {
2040
+ offsetBy =
2041
+ clamp(
2042
+ clamp(position[start], viewport[start], viewport[end] - position[prop]),
2043
+ targetDim[start] - position[prop] + elOffset[i],
2044
+ targetDim[end] - elOffset[i]) -
2045
+ position[start];
2046
+ }
2039
2047
 
2040
- return true;
2041
- }
2042
- }
2043
- });
2044
- });
2048
+ position[start] = position[dir] = position[start] + offsetBy;
2049
+ position[end] += offsetBy;
2045
2050
  }
2046
2051
 
2047
- offset(element, position);
2048
-
2049
- return flipped;
2052
+ return position;
2050
2053
  }
2051
2054
 
2052
- function moveTo(position, attach, dim, factor) {
2053
- each(dirs, (_ref2, prop) => {let [dir, align, alignFlip] = _ref2;
2054
- if (attach[dir] === alignFlip) {
2055
- position[align] += dim[prop] * factor;
2056
- } else if (attach[dir] === 'center') {
2057
- position[align] += dim[prop] * factor / 2;
2058
- }
2059
- });
2055
+ function moveBy(start, end, dim) {
2056
+ return start === 'center' ? dim / 2 : start === end ? dim : 0;
2060
2057
  }
2061
2058
 
2062
- function getPos(pos) {
2063
- const x = /left|center|right/;
2064
- const y = /top|center|bottom/;
2065
-
2066
- pos = (pos || '').split(' ');
2067
-
2068
- if (pos.length === 1) {
2069
- pos = x.test(pos[0]) ?
2070
- pos.concat('center') :
2071
- y.test(pos[0]) ?
2072
- ['center'].concat(pos) :
2073
- ['center', 'center'];
2059
+ function getIntersectionArea() {
2060
+ let intersection;for (var _len = arguments.length, elements = new Array(_len), _key = 0; _key < _len; _key++) {elements[_key] = arguments[_key];}
2061
+ for (const el of elements.filter(Boolean)) {
2062
+ const rect = offset(el);
2063
+ if (!intersection) {
2064
+ intersection = rect;
2065
+ continue;
2066
+ }
2067
+ for (const prop of ['left', 'top']) {
2068
+ intersection[prop] = Math.max(rect[prop], intersection[prop]);
2069
+ }
2070
+ for (const prop of ['right', 'bottom']) {
2071
+ intersection[prop] = Math.min(rect[prop], intersection[prop]);
2072
+ }
2074
2073
  }
2075
-
2076
- return {
2077
- x: x.test(pos[0]) ? pos[0] : 'center',
2078
- y: y.test(pos[1]) ? pos[1] : 'center' };
2079
-
2074
+ return intersection;
2080
2075
  }
2081
2076
 
2082
- function getOffsets(offsets, width, height) {
2083
- const [x, y] = (offsets || '').split(' ');
2084
-
2085
- return {
2086
- x: x ? toFloat(x) * (endsWith(x, '%') ? width / 100 : 1) : 0,
2087
- y: y ? toFloat(y) * (endsWith(y, '%') ? height / 100 : 1) : 0 };
2088
-
2077
+ function intersectLine(dimA, dimB, dir) {
2078
+ const [,, start, end] = dirs[dir];
2079
+ return dimA[end] > dimB[start] && dimB[end] > dimA[start];
2089
2080
  }
2090
2081
 
2091
2082
  var util = /*#__PURE__*/Object.freeze({
@@ -2894,7 +2885,7 @@
2894
2885
  UIkit.data = '__uikit__';
2895
2886
  UIkit.prefix = 'uk-';
2896
2887
  UIkit.options = {};
2897
- UIkit.version = '3.13.1-dev.dedbd3fce';
2888
+ UIkit.version = '3.13.2-dev.696f00752';
2898
2889
 
2899
2890
  globalAPI(UIkit);
2900
2891
  hooksAPI(UIkit);
@@ -3431,7 +3422,7 @@
3431
3422
 
3432
3423
 
3433
3424
  events: {
3434
- load() {
3425
+ 'load loadedmetadata'() {
3435
3426
  this.$emit('resize');
3436
3427
  } },
3437
3428
 
@@ -3497,15 +3488,13 @@
3497
3488
  props: {
3498
3489
  pos: String,
3499
3490
  offset: null,
3500
- flip: Boolean,
3501
- clsPos: String },
3491
+ flip: Boolean },
3502
3492
 
3503
3493
 
3504
3494
  data: {
3505
3495
  pos: "bottom-" + (isRtl ? 'right' : 'left'),
3506
3496
  flip: true,
3507
- offset: false,
3508
- clsPos: '' },
3497
+ offset: false },
3509
3498
 
3510
3499
 
3511
3500
  connected() {
@@ -3516,13 +3505,11 @@
3516
3505
 
3517
3506
  methods: {
3518
3507
  positionAt(element, target, boundary) {
3519
- removeClasses(element, this.clsPos + "-(top|bottom|left|right)(-[a-z]+)?");
3520
-
3521
- let { offset: offset$1 } = this;
3522
3508
  const axis = this.getAxis();
3523
3509
  const dir = this.pos[0];
3524
3510
  const align = this.pos[1];
3525
3511
 
3512
+ let { offset: offset$1 } = this;
3526
3513
  if (!isNumeric(offset$1)) {
3527
3514
  const node = $(offset$1);
3528
3515
  offset$1 = node ?
@@ -3530,30 +3517,64 @@
3530
3517
  offset(target)[axis === 'x' ? 'right' : 'bottom'] :
3531
3518
  0;
3532
3519
  }
3520
+ offset$1 += toPx(getCssVar('position-margin-offset', element));
3533
3521
 
3534
- const { x, y } = positionAt(
3535
- element,
3536
- target,
3537
- axis === 'x' ? flipPosition(dir) + " " + align : align + " " + flipPosition(dir),
3538
- axis === 'x' ? dir + " " + align : align + " " + dir,
3539
- axis === 'x' ? "" + (
3540
- dir === 'left' ? -offset$1 : offset$1) : " " + (
3541
- dir === 'top' ? -offset$1 : offset$1),
3542
- null,
3543
- this.flip,
3544
- boundary).
3545
- target;
3546
-
3547
- this.dir = axis === 'x' ? x : y;
3548
- this.align = axis === 'x' ? y : x;
3549
-
3550
- toggleClass(element, this.clsPos + "-" + this.dir + "-" + this.align, this.offset === false);
3522
+ positionAt(element, target, {
3523
+ boundary,
3524
+ flip: this.flip,
3525
+ attach: {
3526
+ element: axis === 'x' ? [flipPosition(dir), align] : [align, flipPosition(dir)],
3527
+ target: axis === 'x' ? [dir, align] : [align, dir] },
3528
+
3529
+ offset:
3530
+ axis === 'x' ?
3531
+ [dir === 'left' ? -offset$1 : +offset$1, 0] :
3532
+ [0, dir === 'top' ? -offset$1 : +offset$1] });
3533
+
3534
+
3535
+ [this.dir, this.align] = getAlignment(element, target);
3536
+ console.log(this.dir, this.align);
3551
3537
  },
3552
3538
 
3553
3539
  getAxis() {
3554
- return this.dir === 'top' || this.dir === 'bottom' ? 'y' : 'x';
3540
+ return includes(['top', 'bottom'], this.dir) ? 'y' : 'x';
3555
3541
  } } };
3556
3542
 
3543
+
3544
+
3545
+ function getAlignment(el, target) {
3546
+ const elOffset = offset(el);
3547
+ const targetOffset = offset(target);
3548
+ const properties = [
3549
+ ['left', 'right'],
3550
+ ['top', 'bottom']];
3551
+
3552
+
3553
+ let dir;
3554
+ for (const props of properties) {
3555
+ if (elOffset[props[0]] > targetOffset[props[1]]) {
3556
+ dir = props[1];
3557
+ break;
3558
+ }
3559
+ if (elOffset[props[1]] < targetOffset[props[0]]) {
3560
+ dir = props[0];
3561
+ break;
3562
+ }
3563
+ }
3564
+
3565
+ let align;
3566
+ const props = includes(properties[0], dir) ? properties[1] : properties[0];
3567
+ if (elOffset[props[0]] === targetOffset[props[0]]) {
3568
+ align = props[0];
3569
+ } else if (elOffset[props[1]] === targetOffset[props[1]]) {
3570
+ align = props[1];
3571
+ } else {
3572
+ align = 'center';
3573
+ }
3574
+
3575
+ return [dir, align];
3576
+ }
3577
+
3557
3578
  let active$1;
3558
3579
 
3559
3580
  var drop = {
@@ -3589,7 +3610,7 @@
3589
3610
  },
3590
3611
 
3591
3612
  connected() {
3592
- this.clsPos = this.clsDrop = this.$props.clsDrop || "uk-" + this.$options.name;
3613
+ this.clsDrop = this.$props.clsDrop || "uk-" + this.$options.name;
3593
3614
  addClass(this.$el, this.clsDrop);
3594
3615
 
3595
3616
  if (this.toggle && !this.target) {
@@ -3655,7 +3676,7 @@
3655
3676
  if (this.isToggled()) {
3656
3677
  this.hide(false);
3657
3678
  } else {
3658
- this.show(toggle.$el, false);
3679
+ this.show(toggle == null ? void 0 : toggle.$el, false);
3659
3680
  }
3660
3681
  } },
3661
3682
 
@@ -3667,7 +3688,7 @@
3667
3688
 
3668
3689
  handler(e, toggle) {
3669
3690
  e.preventDefault();
3670
- this.show(toggle.$el);
3691
+ this.show(toggle == null ? void 0 : toggle.$el);
3671
3692
  } },
3672
3693
 
3673
3694
 
@@ -3878,23 +3899,20 @@
3878
3899
  },
3879
3900
 
3880
3901
  position() {
3881
- const boundary = this.boundary === true ? window : query(this.boundary, this.$el);
3902
+ const boundary = query(this.boundary, this.$el) || window;
3882
3903
  removeClass(this.$el, this.clsDrop + "-stack");
3883
3904
  toggleClass(this.$el, this.clsDrop + "-boundary", this.boundaryAlign);
3884
3905
 
3885
3906
  const boundaryOffset = offset(boundary);
3886
- const alignTo = this.boundaryAlign ? boundaryOffset : offset(this.target);
3907
+ const targetOffset = offset(this.target);
3908
+ const alignTo = this.boundaryAlign ? boundaryOffset : targetOffset;
3887
3909
 
3888
3910
  if (this.align === 'justify') {
3889
3911
  const prop = this.getAxis() === 'y' ? 'width' : 'height';
3890
3912
  css(this.$el, prop, alignTo[prop]);
3891
3913
  } else if (
3892
- boundary &&
3893
3914
  this.$el.offsetWidth >
3894
- Math.max(
3895
- boundaryOffset.right - alignTo.left,
3896
- alignTo.right - boundaryOffset.left))
3897
-
3915
+ Math.max(boundaryOffset.right - alignTo.left, alignTo.right - boundaryOffset.left))
3898
3916
  {
3899
3917
  addClass(this.$el, this.clsDrop + "-stack");
3900
3918
  }
@@ -5556,7 +5574,6 @@
5556
5574
  delayShow: Number,
5557
5575
  delayHide: Number,
5558
5576
  dropbar: Boolean,
5559
- dropbarMode: String,
5560
5577
  dropbarAnchor: Boolean,
5561
5578
  duration: Number },
5562
5579
 
@@ -5573,7 +5590,6 @@
5573
5590
  flip: 'x',
5574
5591
  boundary: true,
5575
5592
  dropbar: false,
5576
- dropbarMode: 'slide',
5577
5593
  dropbarAnchor: false,
5578
5594
  duration: 200,
5579
5595
  forceHeight: true,
@@ -5582,8 +5598,8 @@
5582
5598
 
5583
5599
 
5584
5600
  computed: {
5585
- boundary(_ref, $el) {let { boundary, boundaryAlign } = _ref;
5586
- return boundary === true || boundaryAlign ? $el : boundary;
5601
+ boundary(_ref, $el) {let { boundary } = _ref;
5602
+ return boundary === true ? $el : boundary;
5587
5603
  },
5588
5604
 
5589
5605
  dropbarAnchor(_ref2, $el) {let { dropbarAnchor } = _ref2;
@@ -5790,10 +5806,16 @@
5790
5806
  return this.dropbar;
5791
5807
  },
5792
5808
 
5793
- handler() {
5809
+ handler(_, _ref9) {let { $el } = _ref9;
5810
+ if (!hasClass($el, this.clsDrop)) {
5811
+ return;
5812
+ }
5813
+
5794
5814
  if (!parent(this.dropbar)) {
5795
5815
  after(this.dropbarAnchor || this.$el, this.dropbar);
5796
5816
  }
5817
+
5818
+ addClass($el, this.clsDrop + "-dropbar");
5797
5819
  } },
5798
5820
 
5799
5821
 
@@ -5808,21 +5830,15 @@
5808
5830
  return this.dropbar;
5809
5831
  },
5810
5832
 
5811
- handler(_, _ref9) {let { $el, dir } = _ref9;
5833
+ handler(_, _ref10) {let { $el, dir } = _ref10;
5812
5834
  if (!hasClass($el, this.clsDrop)) {
5813
5835
  return;
5814
5836
  }
5815
5837
 
5816
- if (this.dropbarMode === 'slide') {
5817
- addClass(this.dropbar, 'uk-navbar-dropbar-slide');
5818
- }
5819
-
5820
- this.clsDrop && addClass($el, this.clsDrop + "-dropbar");
5821
-
5822
5838
  if (dir === 'bottom') {
5823
5839
  this.transitionTo(
5824
- $el.offsetHeight +
5825
- toFloat(css($el, 'marginTop')) +
5840
+ offset($el).bottom -
5841
+ offset(this.dropbar).top +
5826
5842
  toFloat(css($el, 'marginBottom')),
5827
5843
  $el);
5828
5844
 
@@ -5841,7 +5857,7 @@
5841
5857
  return this.dropbar;
5842
5858
  },
5843
5859
 
5844
- handler(e, _ref10) {let { $el } = _ref10;
5860
+ handler(e, _ref11) {let { $el } = _ref11;
5845
5861
  const active = this.getActive();
5846
5862
 
5847
5863
  if (
@@ -5865,7 +5881,7 @@
5865
5881
  return this.dropbar;
5866
5882
  },
5867
5883
 
5868
- handler(_, _ref11) {let { $el } = _ref11;
5884
+ handler(_, _ref12) {let { $el } = _ref12;
5869
5885
  if (!hasClass($el, this.clsDrop)) {
5870
5886
  return;
5871
5887
  }
@@ -6289,7 +6305,7 @@
6289
6305
  events: ['resize'] } };
6290
6306
 
6291
6307
  var responsive = {
6292
- mixin: [Resize],
6308
+ mixins: [Resize],
6293
6309
 
6294
6310
  props: ['width', 'height'],
6295
6311
 
@@ -7057,27 +7073,21 @@
7057
7073
 
7058
7074
  show(item) {
7059
7075
  const prev = this.index();
7060
- const next = getIndex(
7061
- this.children[getIndex(item, this.toggles, prev)],
7062
- children(this.$el));
7063
-
7064
-
7065
- if (prev === next) {
7066
- return;
7067
- }
7068
-
7076
+ const next = getIndex(item, this.toggles, prev);
7077
+ const active = getIndex(this.children[next], children(this.$el));
7069
7078
  children(this.$el).forEach((child, i) => {
7070
- toggleClass(child, this.cls, next === i);
7071
- attr(this.toggles[i], 'aria-expanded', next === i);
7079
+ toggleClass(child, this.cls, active === i);
7080
+ attr(this.toggles[i], 'aria-expanded', active === i);
7072
7081
  });
7073
7082
 
7083
+ const animate = prev >= 0 && prev !== next;
7074
7084
  this.connects.forEach(async (_ref4) => {let { children } = _ref4;
7075
7085
  await this.toggleElement(
7076
7086
  toNodes(children).filter((child) => hasClass(child, this.cls)),
7077
7087
  false,
7078
- prev >= 0);
7088
+ animate);
7079
7089
 
7080
- await this.toggleElement(children[next], true, prev >= 0);
7090
+ await this.toggleElement(children[active], true, animate);
7081
7091
  });
7082
7092
  } } };
7083
7093