uikit 3.13.2-dev.13a8eb3ff → 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 (64) hide show
  1. package/.eslintrc.json +9 -0
  2. package/CHANGELOG.md +11 -0
  3. package/dist/css/uikit-core-rtl.css +15 -63
  4. package/dist/css/uikit-core-rtl.min.css +1 -1
  5. package/dist/css/uikit-core.css +15 -63
  6. package/dist/css/uikit-core.min.css +1 -1
  7. package/dist/css/uikit-rtl.css +15 -63
  8. package/dist/css/uikit-rtl.min.css +1 -1
  9. package/dist/css/uikit.css +15 -63
  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 +207 -185
  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 -188
  42. package/dist/js/uikit.min.js +1 -1
  43. package/package.json +1 -1
  44. package/src/js/components/tooltip.js +2 -3
  45. package/src/js/core/drop.js +7 -10
  46. package/src/js/core/navbar.js +10 -5
  47. package/src/js/core/sticky.js +1 -1
  48. package/src/js/mixin/media.js +4 -4
  49. package/src/js/mixin/position.js +53 -24
  50. package/src/js/util/dimensions.js +2 -2
  51. package/src/js/util/position.js +125 -129
  52. package/src/js/util/style.js +13 -19
  53. package/src/less/components/drop.less +3 -11
  54. package/src/less/components/dropdown.less +3 -11
  55. package/src/less/components/navbar.less +11 -12
  56. package/src/less/components/tooltip.less +2 -11
  57. package/src/scss/components/drop.scss +3 -11
  58. package/src/scss/components/dropdown.scss +3 -11
  59. package/src/scss/components/navbar.scss +11 -12
  60. package/src/scss/components/tooltip.scss +2 -11
  61. package/src/scss/variables-theme.scss +5 -4
  62. package/src/scss/variables.scss +5 -4
  63. package/tests/drop.html +1 -1
  64. package/tests/position.html +38 -39
package/dist/js/uikit.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.13.2-dev.13a8eb3ff | 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'] };
1941
-
1933
+ const dirs = [
1934
+ ['width', 'x', 'left', 'right'],
1935
+ ['height', 'y', 'top', 'bottom']];
1942
1936
 
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);
1955
1937
 
1956
- const flipped = { element: elAttach, target: targetAttach };
1938
+ function positionAt(element, target, options) {
1939
+ options = {
1940
+ attach: {
1941
+ element: ['left', 'top'],
1942
+ target: ['left', 'top'],
1943
+ ...options.attach },
1957
1944
 
1958
- if (!element || !target) {
1959
- return flipped;
1960
- }
1945
+ offset: [0, 0],
1946
+ ...options };
1961
1947
 
1962
- const dim = offset(element);
1963
- const targetDim = offset(target);
1964
- const position = targetDim;
1965
1948
 
1966
- moveTo(position, elAttach, dim, -1);
1967
- moveTo(position, targetAttach, targetDim, 1);
1949
+ const dim = options.flip ?
1950
+ attachToWithFlip(element, target, options) :
1951
+ attachTo(element, target, options);
1968
1952
 
1969
- elOffset = getOffsets(elOffset, dim.width, dim.height);
1970
- targetOffset = getOffsets(targetOffset, targetDim.width, targetDim.height);
1953
+ offset(element, dim);
1954
+ }
1971
1955
 
1972
- elOffset['x'] += targetOffset['x'];
1973
- elOffset['y'] += targetOffset['y'];
1956
+ function attachTo(element, target, options) {
1957
+ let { attach, offset: offsetBy } = {
1958
+ attach: {
1959
+ element: ['left', 'top'],
1960
+ target: ['left', 'top'],
1961
+ ...options.attach },
1974
1962
 
1975
- position.left += elOffset['x'];
1976
- position.top += elOffset['y'];
1963
+ offset: [0, 0],
1964
+ ...options };
1977
1965
 
1978
- if (flip) {
1979
- let boundaries = scrollParents(element).map(getViewport$1);
1980
1966
 
1981
- if (boundary && !includes(boundaries, boundary)) {
1982
- boundaries.unshift(boundary);
1983
- }
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
+ }
1984
1980
 
1985
- boundaries = boundaries.map((el) => offset(el));
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);
1986
1985
 
1987
- each(dirs, (_ref, prop) => {let [dir, align, alignFlip] = _ref;
1988
- if (!(flip === true || includes(flip, dir))) {
1989
- return;
1990
- }
1986
+ let {
1987
+ flip,
1988
+ attach: { element: elAttach, target: targetAttach },
1989
+ offset: elOffset,
1990
+ boundary,
1991
+ viewport } =
1992
+ options;
1991
1993
 
1992
- boundaries.some((boundary) => {
1993
- const elemOffset =
1994
- elAttach[dir] === align ?
1995
- -dim[prop] :
1996
- elAttach[dir] === alignFlip ?
1997
- dim[prop] :
1998
- 0;
1994
+ viewports.push(viewport);
1999
1995
 
2000
- const targetOffset =
2001
- targetAttach[dir] === align ?
2002
- targetDim[prop] :
2003
- targetAttach[dir] === alignFlip ?
2004
- -targetDim[prop] :
2005
- 0;
1996
+ for (const i in dirs) {
1997
+ const [prop, dir, start, end] = dirs[i];
2006
1998
 
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;
1999
+ if (flip !== true && !includes(flip, dir)) {
2000
+ continue;
2001
+ }
2014
2002
 
2015
- return (
2016
- elAttach[dir] === 'center' && (
2017
- apply(centerOffset, centerTargetOffset) ||
2018
- apply(-centerOffset, -centerTargetOffset)) ||
2019
- apply(elemOffset, targetOffset));
2003
+ const willFlip =
2004
+ !intersectLine(position, targetDim, i) && intersectLine(position, targetDim, 1 - i);
2020
2005
 
2021
- }
2006
+ viewport = getIntersectionArea(...viewports, willFlip ? null : boundary);
2007
+ const isInStartBoundary = position[start] >= viewport[start];
2008
+ const isInEndBoundary = position[end] <= viewport[end];
2022
2009
 
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.2-dev.13a8eb3ff';
2888
+ UIkit.version = '3.13.2-dev.696f00752';
2898
2889
 
2899
2890
  globalAPI(UIkit);
2900
2891
  hooksAPI(UIkit);
@@ -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;
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] });
3546
3533
 
3547
- this.dir = axis === 'x' ? x : y;
3548
- this.align = axis === 'x' ? y : x;
3549
3534
 
3550
- toggleClass(element, this.clsPos + "-" + this.dir + "-" + this.align, this.offset === false);
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
  }
@@ -5788,10 +5806,16 @@
5788
5806
  return this.dropbar;
5789
5807
  },
5790
5808
 
5791
- handler() {
5809
+ handler(_, _ref9) {let { $el } = _ref9;
5810
+ if (!hasClass($el, this.clsDrop)) {
5811
+ return;
5812
+ }
5813
+
5792
5814
  if (!parent(this.dropbar)) {
5793
5815
  after(this.dropbarAnchor || this.$el, this.dropbar);
5794
5816
  }
5817
+
5818
+ addClass($el, this.clsDrop + "-dropbar");
5795
5819
  } },
5796
5820
 
5797
5821
 
@@ -5806,17 +5830,15 @@
5806
5830
  return this.dropbar;
5807
5831
  },
5808
5832
 
5809
- handler(_, _ref9) {let { $el, dir } = _ref9;
5833
+ handler(_, _ref10) {let { $el, dir } = _ref10;
5810
5834
  if (!hasClass($el, this.clsDrop)) {
5811
5835
  return;
5812
5836
  }
5813
5837
 
5814
- this.clsDrop && addClass($el, this.clsDrop + "-dropbar");
5815
-
5816
5838
  if (dir === 'bottom') {
5817
5839
  this.transitionTo(
5818
- $el.offsetHeight +
5819
- toFloat(css($el, 'marginTop')) +
5840
+ offset($el).bottom -
5841
+ offset(this.dropbar).top +
5820
5842
  toFloat(css($el, 'marginBottom')),
5821
5843
  $el);
5822
5844
 
@@ -5835,7 +5857,7 @@
5835
5857
  return this.dropbar;
5836
5858
  },
5837
5859
 
5838
- handler(e, _ref10) {let { $el } = _ref10;
5860
+ handler(e, _ref11) {let { $el } = _ref11;
5839
5861
  const active = this.getActive();
5840
5862
 
5841
5863
  if (
@@ -5859,7 +5881,7 @@
5859
5881
  return this.dropbar;
5860
5882
  },
5861
5883
 
5862
- handler(_, _ref11) {let { $el } = _ref11;
5884
+ handler(_, _ref12) {let { $el } = _ref12;
5863
5885
  if (!hasClass($el, this.clsDrop)) {
5864
5886
  return;
5865
5887
  }
@@ -10720,8 +10742,7 @@
10720
10742
  delay: 0,
10721
10743
  animation: ['uk-animation-scale-up'],
10722
10744
  duration: 100,
10723
- cls: 'uk-active',
10724
- clsPos: 'uk-tooltip' },
10745
+ cls: 'uk-active' },
10725
10746
 
10726
10747
 
10727
10748
  beforeConnect() {
@@ -10776,9 +10797,9 @@
10776
10797
 
10777
10798
  _show() {
10778
10799
  this.tooltip = append(
10779
- this.container, "<div class=\"" +
10780
- this.clsPos + "\"> <div class=\"" +
10781
- this.clsPos + "-inner\">" + this.title + "</div> </div>");
10800
+ this.container, "<div class=\"uk-" +
10801
+ this.$options.name + "\"> <div class=\"uk-" +
10802
+ this.$options.name + "-inner\">" + this.title + "</div> </div>");
10782
10803
 
10783
10804
 
10784
10805