uikit 3.13.7-dev.120e5ee9c → 3.13.8-dev.128538499
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.
- package/CHANGELOG.md +20 -1
- package/dist/css/uikit-core-rtl.css +34 -5
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +34 -5
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +34 -3
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +34 -3
- package/dist/css/uikit.min.css +1 -1
- package/dist/js/components/countdown.js +1 -1
- package/dist/js/components/countdown.min.js +1 -1
- package/dist/js/components/filter.js +1 -1
- package/dist/js/components/filter.min.js +1 -1
- package/dist/js/components/lightbox-panel.js +1 -1
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +1 -1
- package/dist/js/components/lightbox.min.js +1 -1
- package/dist/js/components/notification.js +1 -1
- package/dist/js/components/notification.min.js +1 -1
- package/dist/js/components/parallax.js +13 -10
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +13 -10
- package/dist/js/components/slider-parallax.min.js +1 -1
- package/dist/js/components/slider.js +1 -1
- package/dist/js/components/slider.min.js +1 -1
- package/dist/js/components/slideshow-parallax.js +13 -10
- package/dist/js/components/slideshow-parallax.min.js +1 -1
- package/dist/js/components/slideshow.js +1 -1
- package/dist/js/components/slideshow.min.js +1 -1
- package/dist/js/components/sortable.js +1 -1
- package/dist/js/components/sortable.min.js +1 -1
- package/dist/js/components/tooltip.js +59 -29
- package/dist/js/components/tooltip.min.js +1 -1
- package/dist/js/components/upload.js +1 -1
- package/dist/js/components/upload.min.js +1 -1
- package/dist/js/uikit-core.js +211 -195
- package/dist/js/uikit-core.min.js +1 -1
- package/dist/js/uikit-icons.js +1 -1
- package/dist/js/uikit-icons.min.js +1 -1
- package/dist/js/uikit.js +248 -199
- package/dist/js/uikit.min.js +1 -1
- package/package.json +5 -5
- package/src/js/api/hooks.js +1 -1
- package/src/js/components/tooltip.js +38 -3
- package/src/js/core/accordion.js +1 -1
- package/src/js/core/drop.js +10 -6
- package/src/js/core/height-match.js +7 -15
- package/src/js/core/navbar.js +1 -1
- package/src/js/core/scrollspy.js +39 -17
- package/src/js/core/sticky.js +2 -2
- package/src/js/mixin/media.js +12 -9
- package/src/js/mixin/position.js +22 -24
- package/src/js/util/position.js +128 -129
- package/src/less/components/dropdown.less +11 -1
- package/src/less/components/nav.less +22 -0
- package/src/less/components/navbar.less +22 -2
- package/src/less/theme/dropdown.less +2 -0
- package/src/less/theme/nav.less +4 -0
- package/src/less/theme/navbar.less +2 -0
- package/src/scss/components/dropdown.scss +11 -1
- package/src/scss/components/nav.scss +22 -0
- package/src/scss/components/navbar.scss +22 -2
- package/src/scss/mixins-theme.scss +4 -0
- package/src/scss/mixins.scss +4 -0
- package/src/scss/theme/dropdown.scss +2 -0
- package/src/scss/theme/nav.scss +4 -0
- package/src/scss/theme/navbar.scss +2 -0
- package/src/scss/variables-theme.scss +5 -1
- package/src/scss/variables.scss +5 -1
- package/tests/drop.html +0 -6
- package/tests/dropdown.html +18 -10
- package/tests/nav.html +27 -0
- package/tests/navbar.html +18 -4
- package/tests/position.html +38 -39
package/dist/js/uikit.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.13.
|
|
1
|
+
/*! UIkit 3.13.8-dev.128538499 | 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
|
-
|
|
1938
|
-
|
|
1936
|
+
const dirs = [
|
|
1937
|
+
['width', 'x', 'left', 'right'],
|
|
1938
|
+
['height', 'y', 'top', 'bottom']];
|
|
1939
1939
|
|
|
1940
1940
|
|
|
1941
|
-
function positionAt(
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
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
|
-
|
|
1948
|
+
offset: [0, 0],
|
|
1949
|
+
...options };
|
|
1955
1950
|
|
|
1956
|
-
if (!element || !target) {
|
|
1957
|
-
return flipped;
|
|
1958
|
-
}
|
|
1959
1951
|
|
|
1960
|
-
const dim =
|
|
1961
|
-
|
|
1962
|
-
|
|
1952
|
+
const dim = options.flip ?
|
|
1953
|
+
attachToWithFlip(element, target, options) :
|
|
1954
|
+
attachTo(element, target, options);
|
|
1963
1955
|
|
|
1964
|
-
|
|
1965
|
-
|
|
1956
|
+
offset(element, dim);
|
|
1957
|
+
}
|
|
1966
1958
|
|
|
1967
|
-
|
|
1968
|
-
|
|
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
|
-
|
|
1971
|
-
|
|
1966
|
+
offset: [0, 0],
|
|
1967
|
+
...options };
|
|
1972
1968
|
|
|
1973
|
-
position.left += elOffset['x'];
|
|
1974
|
-
position.top += elOffset['y'];
|
|
1975
1969
|
|
|
1976
|
-
|
|
1977
|
-
|
|
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
|
-
|
|
1980
|
-
|
|
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
|
-
|
|
1989
|
+
let {
|
|
1990
|
+
flip,
|
|
1991
|
+
attach: { element: elAttach, target: targetAttach },
|
|
1992
|
+
offset: elOffset,
|
|
1993
|
+
boundary,
|
|
1994
|
+
viewport } =
|
|
1995
|
+
options;
|
|
1984
1996
|
|
|
1985
|
-
|
|
1986
|
-
if (!(flip === true || includes(flip, dir))) {
|
|
1987
|
-
return;
|
|
1988
|
-
}
|
|
1997
|
+
viewports.push(viewport);
|
|
1989
1998
|
|
|
1990
|
-
|
|
1991
|
-
|
|
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
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
targetAttach[dir] === alignFlip ?
|
|
2002
|
-
-targetDim[prop] :
|
|
2003
|
-
0;
|
|
2002
|
+
if (flip !== true && !includes(flip, dir)) {
|
|
2003
|
+
continue;
|
|
2004
|
+
}
|
|
2004
2005
|
|
|
2005
|
-
|
|
2006
|
-
|
|
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
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
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
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2016
|
+
if (isInStartBoundary && isInEndBoundary) {
|
|
2017
|
+
continue;
|
|
2018
|
+
}
|
|
2024
2019
|
|
|
2020
|
+
let offsetBy;
|
|
2025
2021
|
|
|
2026
|
-
|
|
2027
|
-
|
|
2022
|
+
// Flip
|
|
2023
|
+
if (willFlip) {
|
|
2024
|
+
if (
|
|
2025
|
+
elAttach[i] === end && isInStartBoundary ||
|
|
2026
|
+
elAttach[i] === start && isInEndBoundary)
|
|
2027
|
+
{
|
|
2028
|
+
continue;
|
|
2029
|
+
}
|
|
2028
2030
|
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
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
|
-
|
|
2039
|
-
|
|
2040
|
-
}
|
|
2041
|
-
});
|
|
2042
|
-
});
|
|
2054
|
+
position[start] = position[dir] = position[start] + offsetBy;
|
|
2055
|
+
position[end] += offsetBy;
|
|
2043
2056
|
}
|
|
2044
2057
|
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
return flipped;
|
|
2058
|
+
return position;
|
|
2048
2059
|
}
|
|
2049
2060
|
|
|
2050
|
-
function
|
|
2051
|
-
|
|
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
|
|
2061
|
-
|
|
2062
|
-
const
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
['
|
|
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
|
|
2081
|
-
const [
|
|
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({
|
|
@@ -2412,7 +2411,7 @@
|
|
|
2412
2411
|
const {
|
|
2413
2412
|
$options: { computed } } =
|
|
2414
2413
|
this;
|
|
2415
|
-
const values = { ...this._computed };
|
|
2414
|
+
const values = { ...(initial ? {} : this._computed) };
|
|
2416
2415
|
this._computed = {};
|
|
2417
2416
|
|
|
2418
2417
|
for (const key in computed) {
|
|
@@ -2892,7 +2891,7 @@
|
|
|
2892
2891
|
UIkit.data = '__uikit__';
|
|
2893
2892
|
UIkit.prefix = 'uk-';
|
|
2894
2893
|
UIkit.options = {};
|
|
2895
|
-
UIkit.version = '3.13.
|
|
2894
|
+
UIkit.version = '3.13.8-dev.128538499';
|
|
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.
|
|
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
|
|
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
|
-
|
|
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
|
|
|
@@ -4330,22 +4330,14 @@
|
|
|
4330
4330
|
return { heights: [''], elements };
|
|
4331
4331
|
}
|
|
4332
4332
|
|
|
4333
|
+
css(elements, 'minHeight', '');
|
|
4333
4334
|
let heights = elements.map(getHeight);
|
|
4334
|
-
|
|
4335
|
-
const hasMinHeight = elements.some((el) => el.style.minHeight);
|
|
4336
|
-
const hasShrunk = elements.some((el, i) => !el.style.minHeight && heights[i] < max);
|
|
4337
|
-
|
|
4338
|
-
if (hasMinHeight && hasShrunk) {
|
|
4339
|
-
css(elements, 'minHeight', '');
|
|
4340
|
-
heights = elements.map(getHeight);
|
|
4341
|
-
max = Math.max(...heights);
|
|
4342
|
-
}
|
|
4343
|
-
|
|
4344
|
-
heights = elements.map((el, i) =>
|
|
4345
|
-
heights[i] === max && toFloat(el.style.minHeight).toFixed(2) !== max.toFixed(2) ? '' : max);
|
|
4335
|
+
const max = Math.max(...heights);
|
|
4346
4336
|
|
|
4337
|
+
return {
|
|
4338
|
+
heights: elements.map((el, i) => heights[i].toFixed(2) === max.toFixed(2) ? '' : max),
|
|
4339
|
+
elements };
|
|
4347
4340
|
|
|
4348
|
-
return { heights, elements };
|
|
4349
4341
|
}
|
|
4350
4342
|
|
|
4351
4343
|
function getHeight(element) {
|
|
@@ -5002,16 +4994,19 @@
|
|
|
5002
4994
|
|
|
5003
4995
|
connected() {
|
|
5004
4996
|
const media = toMedia(this.media);
|
|
5005
|
-
this.
|
|
5006
|
-
|
|
5007
|
-
this.
|
|
5008
|
-
|
|
5009
|
-
|
|
5010
|
-
|
|
4997
|
+
this.matchMedia = true;
|
|
4998
|
+
if (media) {
|
|
4999
|
+
this.mediaObj = window.matchMedia(media);
|
|
5000
|
+
const handler = () => {
|
|
5001
|
+
this.matchMedia = this.mediaObj.matches;
|
|
5002
|
+
trigger(this.$el, createEvent('mediachange', false, true, [this.mediaObj]));
|
|
5003
|
+
};
|
|
5004
|
+
this.offMediaObj = on(this.mediaObj, 'change', () => {
|
|
5005
|
+
handler();
|
|
5006
|
+
this.$emit('resize');
|
|
5007
|
+
});
|
|
5011
5008
|
handler();
|
|
5012
|
-
|
|
5013
|
-
});
|
|
5014
|
-
handler();
|
|
5009
|
+
}
|
|
5015
5010
|
},
|
|
5016
5011
|
|
|
5017
5012
|
disconnected() {var _this$offMediaObj;
|
|
@@ -5750,7 +5745,7 @@
|
|
|
5750
5745
|
return this.dropbar;
|
|
5751
5746
|
},
|
|
5752
5747
|
|
|
5753
|
-
handler(_, _ref10) {let { $el, dir } = _ref10;
|
|
5748
|
+
handler(_, _ref10) {let { $el, pos: [dir] = [] } = _ref10;
|
|
5754
5749
|
if (!hasClass($el, this.clsDrop)) {
|
|
5755
5750
|
return;
|
|
5756
5751
|
}
|
|
@@ -6328,27 +6323,26 @@
|
|
|
6328
6323
|
return target ? $$(target, $el) : [$el];
|
|
6329
6324
|
},
|
|
6330
6325
|
|
|
6331
|
-
watch(elements) {
|
|
6326
|
+
watch(elements, prev) {
|
|
6332
6327
|
if (this.hidden) {
|
|
6333
6328
|
css(filter$1(elements, ":not(." + this.inViewClass + ")"), 'visibility', 'hidden');
|
|
6334
6329
|
}
|
|
6330
|
+
|
|
6331
|
+
if (prev) {
|
|
6332
|
+
this.$reset();
|
|
6333
|
+
}
|
|
6335
6334
|
},
|
|
6336
6335
|
|
|
6337
6336
|
immediate: true } },
|
|
6338
6337
|
|
|
6339
6338
|
|
|
6340
6339
|
|
|
6341
|
-
|
|
6342
|
-
|
|
6343
|
-
|
|
6344
|
-
|
|
6345
|
-
|
|
6346
|
-
|
|
6347
|
-
|
|
6348
|
-
update: [
|
|
6349
|
-
{
|
|
6350
|
-
read() {
|
|
6351
|
-
for (const el of this.elements) {
|
|
6340
|
+
connected() {
|
|
6341
|
+
this.registerObserver(
|
|
6342
|
+
observeIntersection(
|
|
6343
|
+
this.elements,
|
|
6344
|
+
(records) => {
|
|
6345
|
+
for (const { target: el, isIntersecting } of records) {
|
|
6352
6346
|
if (!el[stateKey]) {
|
|
6353
6347
|
el[stateKey] = { cls: data(el, 'uk-scrollspy-class') || this.cls };
|
|
6354
6348
|
}
|
|
@@ -6357,14 +6351,38 @@
|
|
|
6357
6351
|
continue;
|
|
6358
6352
|
}
|
|
6359
6353
|
|
|
6360
|
-
el[stateKey].show =
|
|
6354
|
+
el[stateKey].show = isIntersecting;
|
|
6361
6355
|
}
|
|
6356
|
+
|
|
6357
|
+
this.$emit();
|
|
6362
6358
|
},
|
|
6359
|
+
{
|
|
6360
|
+
rootMargin: toPx(this.offsetTop, 'height') - 1 + "px " + (
|
|
6361
|
+
toPx(this.offsetLeft, 'width') - 1) + "px" },
|
|
6362
|
+
|
|
6363
|
+
|
|
6364
|
+
false));
|
|
6363
6365
|
|
|
6366
|
+
|
|
6367
|
+
},
|
|
6368
|
+
|
|
6369
|
+
disconnected() {
|
|
6370
|
+
for (const el of this.elements) {var _el$stateKey;
|
|
6371
|
+
removeClass(el, this.inViewClass, ((_el$stateKey = el[stateKey]) == null ? void 0 : _el$stateKey.cls) || '');
|
|
6372
|
+
delete el[stateKey];
|
|
6373
|
+
}
|
|
6374
|
+
},
|
|
6375
|
+
|
|
6376
|
+
update: [
|
|
6377
|
+
{
|
|
6364
6378
|
write(data) {
|
|
6365
6379
|
for (const el of this.elements) {
|
|
6366
6380
|
const state = el[stateKey];
|
|
6367
6381
|
|
|
6382
|
+
if (!state) {
|
|
6383
|
+
continue;
|
|
6384
|
+
}
|
|
6385
|
+
|
|
6368
6386
|
if (state.show && !state.inview && !state.queued) {
|
|
6369
6387
|
state.queued = true;
|
|
6370
6388
|
|
|
@@ -6381,9 +6399,7 @@
|
|
|
6381
6399
|
this.toggle(el, false);
|
|
6382
6400
|
}
|
|
6383
6401
|
}
|
|
6384
|
-
},
|
|
6385
|
-
|
|
6386
|
-
events: ['scroll', 'resize'] }],
|
|
6402
|
+
} }],
|
|
6387
6403
|
|
|
6388
6404
|
|
|
6389
6405
|
|
|
@@ -6612,13 +6628,13 @@
|
|
|
6612
6628
|
return false;
|
|
6613
6629
|
}
|
|
6614
6630
|
|
|
6615
|
-
const hide = this.
|
|
6631
|
+
const hide = this.active && types.has('resize');
|
|
6616
6632
|
if (hide) {
|
|
6617
6633
|
css(this.selTarget, 'transition', '0s');
|
|
6618
6634
|
this.hide();
|
|
6619
6635
|
}
|
|
6620
6636
|
|
|
6621
|
-
if (!this.
|
|
6637
|
+
if (!this.active) {
|
|
6622
6638
|
height$1 = offset(this.$el).height;
|
|
6623
6639
|
margin = css(this.$el, 'margin');
|
|
6624
6640
|
}
|
|
@@ -10732,10 +10748,12 @@
|
|
|
10732
10748
|
|
|
10733
10749
|
this.positionAt(this.tooltip, this.$el);
|
|
10734
10750
|
|
|
10751
|
+
const [dir, align] = getAlignment(this.tooltip, this.$el, this.pos);
|
|
10752
|
+
|
|
10735
10753
|
this.origin =
|
|
10736
|
-
this.
|
|
10737
|
-
flipPosition(
|
|
10738
|
-
|
|
10754
|
+
this.axis === 'y' ?
|
|
10755
|
+
flipPosition(dir) + "-" + align :
|
|
10756
|
+
align + "-" + flipPosition(dir);
|
|
10739
10757
|
});
|
|
10740
10758
|
|
|
10741
10759
|
this.toggleElement(this.tooltip, true);
|
|
@@ -10772,6 +10790,37 @@
|
|
|
10772
10790
|
}
|
|
10773
10791
|
}
|
|
10774
10792
|
|
|
10793
|
+
function getAlignment(el, target, _ref) {let [dir, align] = _ref;
|
|
10794
|
+
const elOffset = offset(el);
|
|
10795
|
+
const targetOffset = offset(target);
|
|
10796
|
+
const properties = [
|
|
10797
|
+
['left', 'right'],
|
|
10798
|
+
['top', 'bottom']];
|
|
10799
|
+
|
|
10800
|
+
|
|
10801
|
+
for (const props of properties) {
|
|
10802
|
+
if (elOffset[props[0]] >= targetOffset[props[1]]) {
|
|
10803
|
+
dir = props[1];
|
|
10804
|
+
break;
|
|
10805
|
+
}
|
|
10806
|
+
if (elOffset[props[1]] <= targetOffset[props[0]]) {
|
|
10807
|
+
dir = props[0];
|
|
10808
|
+
break;
|
|
10809
|
+
}
|
|
10810
|
+
}
|
|
10811
|
+
|
|
10812
|
+
const props = includes(properties[0], dir) ? properties[1] : properties[0];
|
|
10813
|
+
if (elOffset[props[0]] === targetOffset[props[0]]) {
|
|
10814
|
+
align = props[0];
|
|
10815
|
+
} else if (elOffset[props[1]] === targetOffset[props[1]]) {
|
|
10816
|
+
align = props[1];
|
|
10817
|
+
} else {
|
|
10818
|
+
align = 'center';
|
|
10819
|
+
}
|
|
10820
|
+
|
|
10821
|
+
return [dir, align];
|
|
10822
|
+
}
|
|
10823
|
+
|
|
10775
10824
|
var upload = {
|
|
10776
10825
|
props: {
|
|
10777
10826
|
allow: String,
|