uikit 3.13.7-dev.04818b8b8 → 3.13.8-dev.06ac04d2b

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 (71) hide show
  1. package/CHANGELOG.md +19 -1
  2. package/dist/css/uikit-core-rtl.css +34 -5
  3. package/dist/css/uikit-core-rtl.min.css +1 -1
  4. package/dist/css/uikit-core.css +34 -5
  5. package/dist/css/uikit-core.min.css +1 -1
  6. package/dist/css/uikit-rtl.css +34 -3
  7. package/dist/css/uikit-rtl.min.css +1 -1
  8. package/dist/css/uikit.css +34 -3
  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 +12 -10
  21. package/dist/js/components/parallax.min.js +1 -1
  22. package/dist/js/components/slider-parallax.js +12 -10
  23. package/dist/js/components/slider-parallax.min.js +1 -1
  24. package/dist/js/components/slider.js +1 -1
  25. package/dist/js/components/slider.min.js +1 -1
  26. package/dist/js/components/slideshow-parallax.js +12 -10
  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 +1 -1
  31. package/dist/js/components/sortable.min.js +1 -1
  32. package/dist/js/components/tooltip.js +59 -29
  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 +172 -176
  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 +209 -180
  41. package/dist/js/uikit.min.js +1 -1
  42. package/package.json +5 -5
  43. package/src/js/components/tooltip.js +38 -3
  44. package/src/js/core/accordion.js +1 -1
  45. package/src/js/core/drop.js +10 -6
  46. package/src/js/core/height-match.js +10 -15
  47. package/src/js/core/navbar.js +1 -1
  48. package/src/js/mixin/media.js +11 -9
  49. package/src/js/mixin/position.js +22 -24
  50. package/src/js/util/position.js +128 -129
  51. package/src/less/components/dropdown.less +11 -1
  52. package/src/less/components/nav.less +22 -0
  53. package/src/less/components/navbar.less +22 -2
  54. package/src/less/theme/dropdown.less +2 -0
  55. package/src/less/theme/nav.less +4 -0
  56. package/src/less/theme/navbar.less +2 -0
  57. package/src/scss/components/dropdown.scss +11 -1
  58. package/src/scss/components/nav.scss +22 -0
  59. package/src/scss/components/navbar.scss +22 -2
  60. package/src/scss/mixins-theme.scss +4 -0
  61. package/src/scss/mixins.scss +4 -0
  62. package/src/scss/theme/dropdown.scss +2 -0
  63. package/src/scss/theme/nav.scss +4 -0
  64. package/src/scss/theme/navbar.scss +2 -0
  65. package/src/scss/variables-theme.scss +5 -1
  66. package/src/scss/variables.scss +5 -1
  67. package/tests/drop.html +0 -6
  68. package/tests/dropdown.html +18 -10
  69. package/tests/nav.html +27 -0
  70. package/tests/navbar.html +18 -4
  71. package/tests/position.html +38 -39
package/dist/js/uikit.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.13.7-dev.04818b8b8 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
1
+ /*! UIkit 3.13.8-dev.06ac04d2b | 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() :
@@ -1933,157 +1933,156 @@
1933
1933
  return document.scrollingElement || document.documentElement;
1934
1934
  }
1935
1935
 
1936
- const dirs = {
1937
- width: ['x', 'left', 'right'],
1938
- height: ['y', 'top', 'bottom'] };
1936
+ const dirs = [
1937
+ ['width', 'x', 'left', 'right'],
1938
+ ['height', 'y', 'top', 'bottom']];
1939
1939
 
1940
1940
 
1941
- function positionAt(
1942
- element,
1943
- target,
1944
- elAttach,
1945
- targetAttach,
1946
- elOffset,
1947
- targetOffset,
1948
- flip,
1949
- boundary)
1950
- {
1951
- elAttach = getPos(elAttach);
1952
- targetAttach = getPos(targetAttach);
1941
+ function positionAt(element, target, options) {
1942
+ options = {
1943
+ attach: {
1944
+ element: ['left', 'top'],
1945
+ target: ['left', 'top'],
1946
+ ...options.attach },
1953
1947
 
1954
- const flipped = { element: elAttach, target: targetAttach };
1948
+ offset: [0, 0],
1949
+ ...options };
1955
1950
 
1956
- if (!element || !target) {
1957
- return flipped;
1958
- }
1959
1951
 
1960
- const dim = offset(element);
1961
- const targetDim = offset(target);
1962
- const position = targetDim;
1952
+ const dim = options.flip ?
1953
+ attachToWithFlip(element, target, options) :
1954
+ attachTo(element, target, options);
1963
1955
 
1964
- moveTo(position, elAttach, dim, -1);
1965
- moveTo(position, targetAttach, targetDim, 1);
1956
+ offset(element, dim);
1957
+ }
1966
1958
 
1967
- elOffset = getOffsets(elOffset, dim.width, dim.height);
1968
- targetOffset = getOffsets(targetOffset, targetDim.width, targetDim.height);
1959
+ function attachTo(element, target, options) {
1960
+ let { attach, offset: offsetBy } = {
1961
+ attach: {
1962
+ element: ['left', 'top'],
1963
+ target: ['left', 'top'],
1964
+ ...options.attach },
1969
1965
 
1970
- elOffset['x'] += targetOffset['x'];
1971
- elOffset['y'] += targetOffset['y'];
1966
+ offset: [0, 0],
1967
+ ...options };
1972
1968
 
1973
- position.left += elOffset['x'];
1974
- position.top += elOffset['y'];
1975
1969
 
1976
- if (flip) {
1977
- let boundaries = scrollParents(element).map(getViewport$1);
1970
+ const position = offset(element);
1971
+ const targetOffset = offset(target);
1972
+ for (const i in dirs) {
1973
+ const [prop, dir, start, end] = dirs[i];
1974
+ position[start] = position[dir] =
1975
+ targetOffset[start] +
1976
+ moveBy(attach.target[i], end, targetOffset[prop]) -
1977
+ moveBy(attach.element[i], end, position[prop]) +
1978
+ +offsetBy[i];
1979
+ position[end] = position[start] + position[prop];
1980
+ }
1981
+ return position;
1982
+ }
1978
1983
 
1979
- if (boundary && !includes(boundaries, boundary)) {
1980
- boundaries.unshift(boundary);
1981
- }
1984
+ function attachToWithFlip(element, target, options) {
1985
+ const position = attachTo(element, target, options);
1986
+ const targetDim = offset(target);
1987
+ const viewports = scrollParents(element).map(getViewport$1);
1982
1988
 
1983
- boundaries = boundaries.map((el) => offset(el));
1989
+ let {
1990
+ flip,
1991
+ attach: { element: elAttach, target: targetAttach },
1992
+ offset: elOffset,
1993
+ boundary,
1994
+ viewport } =
1995
+ options;
1984
1996
 
1985
- each(dirs, (_ref, prop) => {let [dir, align, alignFlip] = _ref;
1986
- if (!(flip === true || includes(flip, dir))) {
1987
- return;
1988
- }
1997
+ viewports.push(viewport);
1989
1998
 
1990
- boundaries.some((boundary) => {
1991
- const elemOffset =
1992
- elAttach[dir] === align ?
1993
- -dim[prop] :
1994
- elAttach[dir] === alignFlip ?
1995
- dim[prop] :
1996
- 0;
1999
+ for (const i in dirs) {
2000
+ const [prop, dir, start, end] = dirs[i];
1997
2001
 
1998
- const targetOffset =
1999
- targetAttach[dir] === align ?
2000
- targetDim[prop] :
2001
- targetAttach[dir] === alignFlip ?
2002
- -targetDim[prop] :
2003
- 0;
2002
+ if (flip !== true && !includes(flip, dir)) {
2003
+ continue;
2004
+ }
2004
2005
 
2005
- if (
2006
- position[align] < boundary[align] ||
2007
- position[align] + dim[prop] > boundary[alignFlip])
2008
- {
2009
- const centerOffset = dim[prop] / 2;
2010
- const centerTargetOffset =
2011
- targetAttach[dir] === 'center' ? -targetDim[prop] / 2 : 0;
2006
+ const willFlip =
2007
+ !intersectLine(position, targetDim, i) && intersectLine(position, targetDim, 1 - i);
2012
2008
 
2013
- return (
2014
- elAttach[dir] === 'center' && (
2015
- apply(centerOffset, centerTargetOffset) ||
2016
- apply(-centerOffset, -centerTargetOffset)) ||
2017
- apply(elemOffset, targetOffset));
2009
+ viewport = getIntersectionArea(
2010
+ ...viewports,
2011
+ willFlip || position[prop] > offset(boundary)[prop] ? null : boundary);
2018
2012
 
2019
- }
2013
+ const isInStartBoundary = position[start] >= viewport[start];
2014
+ const isInEndBoundary = position[end] <= viewport[end];
2020
2015
 
2021
- function apply(elemOffset, targetOffset) {
2022
- const newVal = toFloat(
2023
- (position[align] + elemOffset + targetOffset - elOffset[dir] * 2).toFixed(4));
2016
+ if (isInStartBoundary && isInEndBoundary) {
2017
+ continue;
2018
+ }
2024
2019
 
2020
+ let offsetBy;
2025
2021
 
2026
- if (newVal >= boundary[align] && newVal + dim[prop] <= boundary[alignFlip]) {
2027
- position[align] = newVal;
2022
+ // Flip
2023
+ if (willFlip) {
2024
+ if (
2025
+ elAttach[i] === end && isInStartBoundary ||
2026
+ elAttach[i] === start && isInEndBoundary)
2027
+ {
2028
+ continue;
2029
+ }
2028
2030
 
2029
- for (const el of ['element', 'target']) {
2030
- if (elemOffset) {
2031
- flipped[el][dir] =
2032
- flipped[el][dir] === dirs[prop][1] ?
2033
- dirs[prop][2] :
2034
- dirs[prop][1];
2035
- }
2036
- }
2031
+ offsetBy =
2032
+ (elAttach[i] === start ?
2033
+ -position[prop] :
2034
+ elAttach[i] === end ?
2035
+ position[prop] :
2036
+ 0) + (
2037
+ targetAttach[i] === start ?
2038
+ targetDim[prop] :
2039
+ targetAttach[i] === end ?
2040
+ -targetDim[prop] :
2041
+ 0) -
2042
+ elOffset[i] * 2;
2043
+
2044
+ // Move
2045
+ } else {
2046
+ offsetBy =
2047
+ clamp(
2048
+ clamp(position[start], viewport[start], viewport[end] - position[prop]),
2049
+ targetDim[start] - position[prop] + elOffset[i],
2050
+ targetDim[end] - elOffset[i]) -
2051
+ position[start];
2052
+ }
2037
2053
 
2038
- return true;
2039
- }
2040
- }
2041
- });
2042
- });
2054
+ position[start] = position[dir] = position[start] + offsetBy;
2055
+ position[end] += offsetBy;
2043
2056
  }
2044
2057
 
2045
- offset(element, position);
2046
-
2047
- return flipped;
2058
+ return position;
2048
2059
  }
2049
2060
 
2050
- function moveTo(position, attach, dim, factor) {
2051
- each(dirs, (_ref2, prop) => {let [dir, align, alignFlip] = _ref2;
2052
- if (attach[dir] === alignFlip) {
2053
- position[align] += dim[prop] * factor;
2054
- } else if (attach[dir] === 'center') {
2055
- position[align] += dim[prop] * factor / 2;
2056
- }
2057
- });
2061
+ function moveBy(start, end, dim) {
2062
+ return start === 'center' ? dim / 2 : start === end ? dim : 0;
2058
2063
  }
2059
2064
 
2060
- function getPos(pos) {
2061
- const x = /left|center|right/;
2062
- const y = /top|center|bottom/;
2063
-
2064
- pos = (pos || '').split(' ');
2065
-
2066
- if (pos.length === 1) {
2067
- pos = x.test(pos[0]) ?
2068
- pos.concat('center') :
2069
- y.test(pos[0]) ?
2070
- ['center'].concat(pos) :
2071
- ['center', 'center'];
2065
+ 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]);
2078
+ }
2072
2079
  }
2073
-
2074
- return {
2075
- x: x.test(pos[0]) ? pos[0] : 'center',
2076
- y: y.test(pos[1]) ? pos[1] : 'center' };
2077
-
2080
+ return intersection;
2078
2081
  }
2079
2082
 
2080
- function getOffsets(offsets, width, height) {
2081
- const [x, y] = (offsets || '').split(' ');
2082
-
2083
- return {
2084
- x: x ? toFloat(x) * (endsWith(x, '%') ? width / 100 : 1) : 0,
2085
- y: y ? toFloat(y) * (endsWith(y, '%') ? height / 100 : 1) : 0 };
2086
-
2083
+ function intersectLine(dimA, dimB, dir) {
2084
+ const [,, start, end] = dirs[dir];
2085
+ return dimA[end] > dimB[start] && dimB[end] > dimA[start];
2087
2086
  }
2088
2087
 
2089
2088
  var util = /*#__PURE__*/Object.freeze({
@@ -2892,7 +2891,7 @@
2892
2891
  UIkit.data = '__uikit__';
2893
2892
  UIkit.prefix = 'uk-';
2894
2893
  UIkit.options = {};
2895
- UIkit.version = '3.13.7-dev.04818b8b8';
2894
+ UIkit.version = '3.13.8-dev.06ac04d2b';
2896
2895
 
2897
2896
  globalAPI(UIkit);
2898
2897
  hooksAPI(UIkit);
@@ -3219,7 +3218,7 @@
3219
3218
  computed: {
3220
3219
  items: {
3221
3220
  get(_ref, $el) {let { targets } = _ref;
3222
- return $$(targets, $el);
3221
+ return $$(targets, $el).filter((el) => $(this.content, el));
3223
3222
  },
3224
3223
 
3225
3224
  watch(items, prev) {
@@ -3506,45 +3505,42 @@
3506
3505
 
3507
3506
  connected() {
3508
3507
  this.pos = this.$props.pos.split('-').concat('center').slice(0, 2);
3509
- this.dir = this.pos[0];
3510
- this.align = this.pos[1];
3508
+ this.axis = includes(['top', 'bottom'], this.pos[0]) ? 'y' : 'x';
3511
3509
  },
3512
3510
 
3513
3511
  methods: {
3514
3512
  positionAt(element, target, boundary) {
3515
- const axis = this.getAxis();
3516
- const dir = this.pos[0];
3517
- const align = this.pos[1];
3513
+ const [dir, align] = this.pos;
3518
3514
 
3519
3515
  let { offset: offset$1 } = this;
3520
3516
  if (!isNumeric(offset$1)) {
3521
3517
  const node = $(offset$1);
3522
3518
  offset$1 = node ?
3523
- offset(node)[axis === 'x' ? 'left' : 'top'] -
3524
- offset(target)[axis === 'x' ? 'right' : 'bottom'] :
3519
+ offset(node)[this.axis === 'x' ? 'left' : 'top'] -
3520
+ offset(target)[this.axis === 'x' ? 'right' : 'bottom'] :
3525
3521
  0;
3526
3522
  }
3527
3523
  offset$1 = toPx(offset$1) + toPx(getCssVar('position-offset', element));
3524
+ offset$1 = [includes(['left', 'top'], dir) ? -offset$1 : +offset$1, 0];
3525
+
3526
+ const attach = {
3527
+ element: [flipPosition(dir), align],
3528
+ target: [dir, align] };
3529
+
3530
+
3531
+ if (this.axis === 'y') {
3532
+ for (const prop in attach) {
3533
+ attach[prop] = attach[prop].reverse();
3534
+ }
3535
+ offset$1 = offset$1.reverse();
3536
+ }
3537
+
3538
+ positionAt(element, target, {
3539
+ attach,
3540
+ offset: offset$1,
3541
+ boundary,
3542
+ flip: this.flip });
3528
3543
 
3529
- const { x, y } = positionAt(
3530
- element,
3531
- target,
3532
- axis === 'x' ? flipPosition(dir) + " " + align : align + " " + flipPosition(dir),
3533
- axis === 'x' ? dir + " " + align : align + " " + dir,
3534
- axis === 'x' ? "" + (
3535
- dir === 'left' ? -offset$1 : offset$1) : " " + (
3536
- dir === 'top' ? -offset$1 : offset$1),
3537
- null,
3538
- this.flip,
3539
- boundary).
3540
- target;
3541
-
3542
- this.dir = axis === 'x' ? x : y;
3543
- this.align = axis === 'x' ? y : x;
3544
- },
3545
-
3546
- getAxis() {
3547
- return this.dir === 'top' || this.dir === 'bottom' ? 'y' : 'x';
3548
3544
  } } };
3549
3545
 
3550
3546
  let active$1;
@@ -3581,8 +3577,11 @@
3581
3577
  this.tracker = new MouseTracker();
3582
3578
  },
3583
3579
 
3584
- connected() {
3580
+ beforeConnect() {
3585
3581
  this.clsDrop = this.$props.clsDrop || "uk-" + this.$options.name;
3582
+ },
3583
+
3584
+ connected() {
3586
3585
  addClass(this.$el, this.clsDrop);
3587
3586
 
3588
3587
  if (this.toggle && !this.target) {
@@ -3878,17 +3877,18 @@
3878
3877
  const boundaryOffset = offset(boundary);
3879
3878
  const targetOffset = offset(this.target);
3880
3879
  const alignTo = this.boundaryAlign ? boundaryOffset : targetOffset;
3880
+ const prop = this.axis === 'y' ? 'width' : 'height';
3881
+
3882
+ css(this.$el, "max-" + prop, '');
3881
3883
 
3882
3884
  if (this.pos[1] === 'justify') {
3883
- const prop = this.getAxis() === 'y' ? 'width' : 'height';
3884
3885
  css(this.$el, prop, alignTo[prop]);
3885
- } else if (
3886
- this.$el.offsetWidth >
3887
- Math.max(boundaryOffset.right - alignTo.left, alignTo.right - boundaryOffset.left))
3888
- {
3886
+ } else if (this.$el.offsetWidth > boundaryOffset.width) {
3889
3887
  addClass(this.$el, this.clsDrop + "-stack");
3890
3888
  }
3891
3889
 
3890
+ css(this.$el, "max-" + prop, boundaryOffset[prop]);
3891
+
3892
3892
  this.positionAt(this.$el, this.boundaryAlign ? boundary : this.target, boundary);
3893
3893
  } } };
3894
3894
 
@@ -4277,6 +4277,8 @@
4277
4277
  }
4278
4278
 
4279
4279
  var heightMatch = {
4280
+ mixins: [Resize],
4281
+
4280
4282
  args: 'target',
4281
4283
 
4282
4284
  props: {
@@ -4328,22 +4330,14 @@
4328
4330
  return { heights: [''], elements };
4329
4331
  }
4330
4332
 
4333
+ css(elements, 'minHeight', '');
4331
4334
  let heights = elements.map(getHeight);
4332
- let max = Math.max(...heights);
4333
- const hasMinHeight = elements.some((el) => el.style.minHeight);
4334
- const hasShrunk = elements.some((el, i) => !el.style.minHeight && heights[i] < max);
4335
-
4336
- if (hasMinHeight && hasShrunk) {
4337
- css(elements, 'minHeight', '');
4338
- heights = elements.map(getHeight);
4339
- max = Math.max(...heights);
4340
- }
4341
-
4342
- heights = elements.map((el, i) =>
4343
- heights[i] === max && toFloat(el.style.minHeight).toFixed(2) !== max.toFixed(2) ? '' : max);
4335
+ const max = Math.max(...heights);
4344
4336
 
4337
+ return {
4338
+ heights: elements.map((el, i) => heights[i].toFixed(2) === max.toFixed(2) ? '' : max),
4339
+ elements };
4345
4340
 
4346
- return { heights, elements };
4347
4341
  }
4348
4342
 
4349
4343
  function getHeight(element) {
@@ -5000,16 +4994,18 @@
5000
4994
 
5001
4995
  connected() {
5002
4996
  const media = toMedia(this.media);
5003
- this.mediaObj = window.matchMedia(media);
5004
- const handler = () => {
5005
- this.matchMedia = this.mediaObj.matches;
5006
- trigger(this.$el, createEvent('mediachange', false, true, [this.mediaObj]));
5007
- };
5008
- this.offMediaObj = on(this.mediaObj, 'change', () => {
4997
+ if (media) {
4998
+ this.mediaObj = window.matchMedia(media);
4999
+ const handler = () => {
5000
+ this.matchMedia = this.mediaObj.matches;
5001
+ trigger(this.$el, createEvent('mediachange', false, true, [this.mediaObj]));
5002
+ };
5003
+ this.offMediaObj = on(this.mediaObj, 'change', () => {
5004
+ handler();
5005
+ this.$emit('resize');
5006
+ });
5009
5007
  handler();
5010
- this.$emit('resize');
5011
- });
5012
- handler();
5008
+ }
5013
5009
  },
5014
5010
 
5015
5011
  disconnected() {var _this$offMediaObj;
@@ -5748,7 +5744,7 @@
5748
5744
  return this.dropbar;
5749
5745
  },
5750
5746
 
5751
- handler(_, _ref10) {let { $el, dir } = _ref10;
5747
+ handler(_, _ref10) {let { $el, pos: [dir] = [] } = _ref10;
5752
5748
  if (!hasClass($el, this.clsDrop)) {
5753
5749
  return;
5754
5750
  }
@@ -10730,10 +10726,12 @@
10730
10726
 
10731
10727
  this.positionAt(this.tooltip, this.$el);
10732
10728
 
10729
+ const [dir, align] = getAlignment(this.tooltip, this.$el, this.pos);
10730
+
10733
10731
  this.origin =
10734
- this.getAxis() === 'y' ?
10735
- flipPosition(this.dir) + "-" + this.align :
10736
- this.align + "-" + flipPosition(this.dir);
10732
+ this.axis === 'y' ?
10733
+ flipPosition(dir) + "-" + align :
10734
+ align + "-" + flipPosition(dir);
10737
10735
  });
10738
10736
 
10739
10737
  this.toggleElement(this.tooltip, true);
@@ -10770,6 +10768,37 @@
10770
10768
  }
10771
10769
  }
10772
10770
 
10771
+ function getAlignment(el, target, _ref) {let [dir, align] = _ref;
10772
+ const elOffset = offset(el);
10773
+ const targetOffset = offset(target);
10774
+ const properties = [
10775
+ ['left', 'right'],
10776
+ ['top', 'bottom']];
10777
+
10778
+
10779
+ for (const props of properties) {
10780
+ if (elOffset[props[0]] >= targetOffset[props[1]]) {
10781
+ dir = props[1];
10782
+ break;
10783
+ }
10784
+ if (elOffset[props[1]] <= targetOffset[props[0]]) {
10785
+ dir = props[0];
10786
+ break;
10787
+ }
10788
+ }
10789
+
10790
+ const props = includes(properties[0], dir) ? properties[1] : properties[0];
10791
+ if (elOffset[props[0]] === targetOffset[props[0]]) {
10792
+ align = props[0];
10793
+ } else if (elOffset[props[1]] === targetOffset[props[1]]) {
10794
+ align = props[1];
10795
+ } else {
10796
+ align = 'center';
10797
+ }
10798
+
10799
+ return [dir, align];
10800
+ }
10801
+
10773
10802
  var upload = {
10774
10803
  props: {
10775
10804
  allow: String,