uikit 3.20.9-dev.449143287 → 3.20.9-dev.76ecfef9e
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 +6 -0
- package/dist/css/uikit-core-rtl.css +18 -1
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +18 -1
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +18 -1
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +18 -1
- 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 +4 -1
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +4 -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 +1 -1
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +1 -1
- package/dist/js/components/slider-parallax.min.js +1 -1
- package/dist/js/components/slider.js +11 -5
- package/dist/js/components/slider.min.js +1 -1
- package/dist/js/components/slideshow-parallax.js +1 -1
- package/dist/js/components/slideshow-parallax.min.js +1 -1
- package/dist/js/components/slideshow.js +10 -4
- 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 +1 -1
- 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 +70 -69
- 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 +88 -78
- package/dist/js/uikit.min.js +1 -1
- package/package.json +1 -1
- package/src/js/api/component.js +1 -1
- package/src/js/components/internal/slider-transitioner.js +4 -0
- package/src/js/components/slider.js +1 -1
- package/src/js/core/grid.js +4 -7
- package/src/js/core/height-placeholder.js +1 -1
- package/src/js/core/inverse.js +30 -3
- package/src/js/core/modal.js +2 -1
- package/src/js/core/scrollspy-nav.js +2 -2
- package/src/js/core/scrollspy.js +1 -1
- package/src/js/core/sticky.js +21 -28
- package/src/js/mixin/internal/slideshow-transitioner.js +4 -0
- package/src/js/mixin/slider-parallax.js +7 -3
- package/src/js/util/viewport.js +8 -8
- package/src/less/components/card.less +3 -0
- package/src/less/components/dropbar.less +1 -0
- package/src/less/components/dropdown.less +1 -0
- package/src/less/components/navbar.less +1 -0
- package/src/less/components/offcanvas.less +1 -0
- package/src/less/components/overlay.less +2 -0
- package/src/less/components/section.less +5 -0
- package/src/less/components/tile.less +4 -0
- package/src/scss/components/card.scss +3 -0
- package/src/scss/components/dropbar.scss +1 -0
- package/src/scss/components/dropdown.scss +1 -0
- package/src/scss/components/navbar.scss +1 -0
- package/src/scss/components/offcanvas.scss +1 -0
- package/src/scss/components/overlay.scss +2 -0
- package/src/scss/components/section.scss +5 -0
- package/src/scss/components/tile.scss +4 -0
package/dist/js/uikit.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.20.9-dev.
|
|
1
|
+
/*! UIkit 3.20.9-dev.76ecfef9e | https://www.getuikit.com | (c) 2014 - 2024 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
@@ -310,7 +310,7 @@
|
|
|
310
310
|
const isVisibleFn = inBrowser && Element.prototype.checkVisibility || function() {
|
|
311
311
|
return this.offsetWidth || this.offsetHeight || this.getClientRects().length;
|
|
312
312
|
};
|
|
313
|
-
function isVisible(element) {
|
|
313
|
+
function isVisible$1(element) {
|
|
314
314
|
return toNodes(element).some((element2) => isVisibleFn.call(element2));
|
|
315
315
|
}
|
|
316
316
|
const selInput = "input,select,textarea,button";
|
|
@@ -1199,7 +1199,7 @@
|
|
|
1199
1199
|
}
|
|
1200
1200
|
|
|
1201
1201
|
function isInView(element, offsetTop = 0, offsetLeft = 0) {
|
|
1202
|
-
if (!isVisible(element)) {
|
|
1202
|
+
if (!isVisible$1(element)) {
|
|
1203
1203
|
return false;
|
|
1204
1204
|
}
|
|
1205
1205
|
return intersectRect(
|
|
@@ -1215,7 +1215,7 @@
|
|
|
1215
1215
|
);
|
|
1216
1216
|
}
|
|
1217
1217
|
function scrollIntoView(element, { offset: offsetBy = 0 } = {}) {
|
|
1218
|
-
const parents2 = isVisible(element) ? scrollParents(element, false, ["hidden"]) : [];
|
|
1218
|
+
const parents2 = isVisible$1(element) ? scrollParents(element, false, ["hidden"]) : [];
|
|
1219
1219
|
return parents2.reduce(
|
|
1220
1220
|
(fn, scrollElement, i) => {
|
|
1221
1221
|
const { scrollTop, scrollHeight, offsetHeight } = scrollElement;
|
|
@@ -1274,7 +1274,7 @@
|
|
|
1274
1274
|
}
|
|
1275
1275
|
}
|
|
1276
1276
|
function scrolledOver(element, startOffset = 0, endOffset = 0) {
|
|
1277
|
-
if (!isVisible(element)) {
|
|
1277
|
+
if (!isVisible$1(element)) {
|
|
1278
1278
|
return 0;
|
|
1279
1279
|
}
|
|
1280
1280
|
const scrollElement = scrollParent(element, true);
|
|
@@ -1324,7 +1324,7 @@
|
|
|
1324
1324
|
["height", "y", "top", "bottom"]
|
|
1325
1325
|
]) {
|
|
1326
1326
|
if (isWindow(viewportElement)) {
|
|
1327
|
-
viewportElement =
|
|
1327
|
+
viewportElement = viewportElement.document;
|
|
1328
1328
|
} else {
|
|
1329
1329
|
rect[start] += toFloat(css(viewportElement, `border-${start}-width`));
|
|
1330
1330
|
}
|
|
@@ -1336,17 +1336,16 @@
|
|
|
1336
1336
|
}
|
|
1337
1337
|
function getCoveringElement(target) {
|
|
1338
1338
|
const { left, width, top } = dimensions$1(target);
|
|
1339
|
-
for (const
|
|
1340
|
-
const
|
|
1341
|
-
(
|
|
1339
|
+
for (const position of top ? [0, top] : [0]) {
|
|
1340
|
+
for (const el of toWindow(target).document.elementsFromPoint(left + width / 2, position)) {
|
|
1341
|
+
if (!el.contains(target) && // If e.g. Offcanvas is not yet closed
|
|
1342
1342
|
!hasClass(el, "uk-togglable-leave") && (hasPosition(el, "fixed") && zIndex(
|
|
1343
1343
|
parents(target).reverse().find(
|
|
1344
1344
|
(parent2) => !parent2.contains(el) && !hasPosition(parent2, "static")
|
|
1345
1345
|
)
|
|
1346
|
-
) < zIndex(el) || hasPosition(el, "sticky") && parent(el).contains(target))
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
return coverEl;
|
|
1346
|
+
) < zIndex(el) || hasPosition(el, "sticky") && parent(el).contains(target))) {
|
|
1347
|
+
return el;
|
|
1348
|
+
}
|
|
1350
1349
|
}
|
|
1351
1350
|
}
|
|
1352
1351
|
}
|
|
@@ -1611,7 +1610,7 @@
|
|
|
1611
1610
|
isTouch: isTouch,
|
|
1612
1611
|
isUndefined: isUndefined,
|
|
1613
1612
|
isVideo: isVideo,
|
|
1614
|
-
isVisible: isVisible,
|
|
1613
|
+
isVisible: isVisible$1,
|
|
1615
1614
|
isVoidElement: isVoidElement,
|
|
1616
1615
|
isWindow: isWindow,
|
|
1617
1616
|
last: last,
|
|
@@ -2065,7 +2064,7 @@
|
|
|
2065
2064
|
(el, i) => i && elements[i - 1].offsetParent !== el.offsetParent
|
|
2066
2065
|
);
|
|
2067
2066
|
for (const el of elements) {
|
|
2068
|
-
if (!isVisible(el)) {
|
|
2067
|
+
if (!isVisible$1(el)) {
|
|
2069
2068
|
continue;
|
|
2070
2069
|
}
|
|
2071
2070
|
const offset = getOffset(el, withOffset);
|
|
@@ -2149,7 +2148,7 @@
|
|
|
2149
2148
|
}
|
|
2150
2149
|
function getProps$1(el, opacity) {
|
|
2151
2150
|
const zIndex = css(el, "zIndex");
|
|
2152
|
-
return isVisible(el) ? {
|
|
2151
|
+
return isVisible$1(el) ? {
|
|
2153
2152
|
display: "",
|
|
2154
2153
|
opacity: opacity ? css(el, "opacity") : "0",
|
|
2155
2154
|
pointerEvents: "none",
|
|
@@ -2160,7 +2159,7 @@
|
|
|
2160
2159
|
}
|
|
2161
2160
|
function getTransitionProps(target, nodes, currentProps) {
|
|
2162
2161
|
const propsTo = nodes.map(
|
|
2163
|
-
(el, i) => parent(el) && i in currentProps ? currentProps[i] ? isVisible(el) ? getPositionWithMargin(el) : { opacity: 0 } : { opacity: isVisible(el) ? 1 : 0 } : false
|
|
2162
|
+
(el, i) => parent(el) && i in currentProps ? currentProps[i] ? isVisible$1(el) ? getPositionWithMargin(el) : { opacity: 0 } : { opacity: isVisible$1(el) ? 1 : 0 } : false
|
|
2164
2163
|
);
|
|
2165
2164
|
const propsFrom = propsTo.map((props, i) => {
|
|
2166
2165
|
const from = parent(nodes[i]) === target && (currentProps[i] || getProps$1(nodes[i]));
|
|
@@ -2274,7 +2273,7 @@
|
|
|
2274
2273
|
);
|
|
2275
2274
|
}
|
|
2276
2275
|
function getTransitionNodes(target) {
|
|
2277
|
-
return getRows(children(target)).flat().filter(isVisible);
|
|
2276
|
+
return getRows(children(target)).flat().filter(isVisible$1);
|
|
2278
2277
|
}
|
|
2279
2278
|
function awaitTimeout(timeout) {
|
|
2280
2279
|
return new Promise((resolve) => setTimeout(resolve, timeout));
|
|
@@ -2572,7 +2571,7 @@
|
|
|
2572
2571
|
},
|
|
2573
2572
|
isToggled(el = this.$el) {
|
|
2574
2573
|
el = toNode(el);
|
|
2575
|
-
return hasClass(el, this.clsEnter) ? true : hasClass(el, this.clsLeave) ? false : this.cls ? hasClass(el, this.cls.split(" ")[0]) : isVisible(el);
|
|
2574
|
+
return hasClass(el, this.clsEnter) ? true : hasClass(el, this.clsLeave) ? false : this.cls ? hasClass(el, this.cls.split(" ")[0]) : isVisible$1(el);
|
|
2576
2575
|
},
|
|
2577
2576
|
_toggle(el, toggled) {
|
|
2578
2577
|
if (!el) {
|
|
@@ -2587,7 +2586,7 @@
|
|
|
2587
2586
|
changed = toggled === el.hidden;
|
|
2588
2587
|
changed && (el.hidden = !toggled);
|
|
2589
2588
|
}
|
|
2590
|
-
$$("[autofocus]", el).some((el2) => isVisible(el2) ? el2.focus() || true : el2.blur());
|
|
2589
|
+
$$("[autofocus]", el).some((el2) => isVisible$1(el2) ? el2.focus() || true : el2.blur());
|
|
2591
2590
|
if (changed) {
|
|
2592
2591
|
trigger(el, "toggled", [toggled, this]);
|
|
2593
2592
|
}
|
|
@@ -2974,6 +2973,9 @@
|
|
|
2974
2973
|
return this.show(duration, percent2, true);
|
|
2975
2974
|
},
|
|
2976
2975
|
translate(percent2) {
|
|
2976
|
+
if (percent2 === this.percent()) {
|
|
2977
|
+
return;
|
|
2978
|
+
}
|
|
2977
2979
|
this.reset();
|
|
2978
2980
|
const props2 = translate(percent2, dir);
|
|
2979
2981
|
css(next, props2[1]);
|
|
@@ -3555,7 +3557,7 @@
|
|
|
3555
3557
|
};
|
|
3556
3558
|
App.util = util;
|
|
3557
3559
|
App.options = {};
|
|
3558
|
-
App.version = "3.20.9-dev.
|
|
3560
|
+
App.version = "3.20.9-dev.76ecfef9e";
|
|
3559
3561
|
|
|
3560
3562
|
const PREFIX = "uk-";
|
|
3561
3563
|
const DATA = "__uikit__";
|
|
@@ -3610,7 +3612,7 @@
|
|
|
3610
3612
|
function detachFromElement(element, instance) {
|
|
3611
3613
|
var _a;
|
|
3612
3614
|
(_a = element[DATA]) == null ? true : delete _a[instance.$options.name];
|
|
3613
|
-
if (
|
|
3615
|
+
if (isEmpty(element[DATA])) {
|
|
3614
3616
|
delete element[DATA];
|
|
3615
3617
|
}
|
|
3616
3618
|
}
|
|
@@ -4557,7 +4559,7 @@
|
|
|
4557
4559
|
}
|
|
4558
4560
|
|
|
4559
4561
|
function getMaxPathLength(el) {
|
|
4560
|
-
return isVisible(el) ? Math.ceil(Math.max(0, ...$$("[stroke]", el).map((stroke) => stroke.getTotalLength()))) : 0;
|
|
4562
|
+
return isVisible$1(el) ? Math.ceil(Math.max(0, ...$$("[stroke]", el).map((stroke) => stroke.getTotalLength()))) : 0;
|
|
4561
4563
|
}
|
|
4562
4564
|
|
|
4563
4565
|
const props = {
|
|
@@ -4904,7 +4906,7 @@
|
|
|
4904
4906
|
if (!types.has("scroll")) {
|
|
4905
4907
|
percent = false;
|
|
4906
4908
|
}
|
|
4907
|
-
if (!isVisible(this.$el)) {
|
|
4909
|
+
if (!isVisible$1(this.$el)) {
|
|
4908
4910
|
return false;
|
|
4909
4911
|
}
|
|
4910
4912
|
if (!this.matchMedia) {
|
|
@@ -4959,15 +4961,18 @@
|
|
|
4959
4961
|
}
|
|
4960
4962
|
},
|
|
4961
4963
|
update: {
|
|
4962
|
-
|
|
4964
|
+
read() {
|
|
4963
4965
|
if (!this.parallax) {
|
|
4964
|
-
return;
|
|
4966
|
+
return false;
|
|
4965
4967
|
}
|
|
4966
4968
|
const target = this.parallaxTarget;
|
|
4967
4969
|
const start = toPx(this.parallaxStart, "height", target, true);
|
|
4968
4970
|
const end = toPx(this.parallaxEnd, "height", target, true);
|
|
4969
4971
|
const percent = ease(scrolledOver(target, start, end), this.parallaxEasing);
|
|
4970
|
-
|
|
4972
|
+
return { parallax: this.getIndexAt(percent) };
|
|
4973
|
+
},
|
|
4974
|
+
write({ parallax }) {
|
|
4975
|
+
const [prevIndex, slidePercent] = parallax;
|
|
4971
4976
|
const nextIndex = this.getValidIndex(prevIndex + Math.ceil(slidePercent));
|
|
4972
4977
|
const prev = this.slides[prevIndex];
|
|
4973
4978
|
const next = this.slides[nextIndex];
|
|
@@ -5107,6 +5112,9 @@
|
|
|
5107
5112
|
return this.show(duration, percent, true);
|
|
5108
5113
|
},
|
|
5109
5114
|
translate(percent) {
|
|
5115
|
+
if (percent === this.percent()) {
|
|
5116
|
+
return;
|
|
5117
|
+
}
|
|
5110
5118
|
const distance = this.getDistance() * dir * (isRtl ? -1 : 1);
|
|
5111
5119
|
css(
|
|
5112
5120
|
list,
|
|
@@ -5259,7 +5267,7 @@
|
|
|
5259
5267
|
};
|
|
5260
5268
|
},
|
|
5261
5269
|
slides() {
|
|
5262
|
-
return children(this.list).filter(isVisible);
|
|
5270
|
+
return children(this.list).filter(isVisible$1);
|
|
5263
5271
|
}
|
|
5264
5272
|
},
|
|
5265
5273
|
connected() {
|
|
@@ -5325,7 +5333,7 @@
|
|
|
5325
5333
|
this.dir > 0 && i < index ? 1 : this.dir < 0 && i >= this.index ? -1 : ""
|
|
5326
5334
|
)
|
|
5327
5335
|
);
|
|
5328
|
-
if (!this.center) {
|
|
5336
|
+
if (!this.center || !this.length) {
|
|
5329
5337
|
return;
|
|
5330
5338
|
}
|
|
5331
5339
|
const next = this.slides[index];
|
|
@@ -7640,11 +7648,8 @@
|
|
|
7640
7648
|
},
|
|
7641
7649
|
{
|
|
7642
7650
|
read({ rows, scrollColumns, parallaxStart, parallaxEnd }) {
|
|
7643
|
-
if (scrollColumns && positionedAbsolute(rows)) {
|
|
7644
|
-
return false;
|
|
7645
|
-
}
|
|
7646
7651
|
return {
|
|
7647
|
-
scrolled: scrollColumns ? scrolledOver(this.$el, parallaxStart, parallaxEnd) : false
|
|
7652
|
+
scrolled: scrollColumns && !positionedAbsolute(rows) ? scrolledOver(this.$el, parallaxStart, parallaxEnd) : false
|
|
7648
7653
|
};
|
|
7649
7654
|
},
|
|
7650
7655
|
write({ columns, scrolled, scrollColumns, translates }) {
|
|
@@ -7766,7 +7771,7 @@
|
|
|
7766
7771
|
}
|
|
7767
7772
|
function getHeight(element) {
|
|
7768
7773
|
const style = pick(element.style, ["display", "minHeight"]);
|
|
7769
|
-
if (!isVisible(element)) {
|
|
7774
|
+
if (!isVisible$1(element)) {
|
|
7770
7775
|
css(element, "display", "block", "important");
|
|
7771
7776
|
}
|
|
7772
7777
|
css(element, "minHeight", "");
|
|
@@ -7792,7 +7797,7 @@
|
|
|
7792
7797
|
observe: resize({ target: ({ target }) => target }),
|
|
7793
7798
|
update: {
|
|
7794
7799
|
read() {
|
|
7795
|
-
return { height: this.target.offsetHeight };
|
|
7800
|
+
return this.target ? { height: this.target.offsetHeight } : false;
|
|
7796
7801
|
},
|
|
7797
7802
|
write({ height }) {
|
|
7798
7803
|
css(this.$el, { minHeight: height });
|
|
@@ -7821,7 +7826,7 @@
|
|
|
7821
7826
|
],
|
|
7822
7827
|
update: {
|
|
7823
7828
|
read() {
|
|
7824
|
-
if (!isVisible(this.$el)) {
|
|
7829
|
+
if (!isVisible$1(this.$el)) {
|
|
7825
7830
|
return false;
|
|
7826
7831
|
}
|
|
7827
7832
|
let minHeight = "";
|
|
@@ -8347,11 +8352,11 @@
|
|
|
8347
8352
|
let last;
|
|
8348
8353
|
for (const percent of [0.25, 0.5, 0.75]) {
|
|
8349
8354
|
const elements = target.ownerDocument.elementsFromPoint(
|
|
8350
|
-
Math.max(0, left
|
|
8351
|
-
Math.max(0, top
|
|
8355
|
+
Math.max(0, left + width * percent),
|
|
8356
|
+
Math.max(0, top + height / 2)
|
|
8352
8357
|
);
|
|
8353
8358
|
for (const element of elements) {
|
|
8354
|
-
if (target.contains(element) || element.closest('[class*="-leave"]') && elements.some((el) => element !== el && matches(el, '[class*="-enter"]'))) {
|
|
8359
|
+
if (target.contains(element) || !isVisible(element) || element.closest('[class*="-leave"]') && elements.some((el) => element !== el && matches(el, '[class*="-enter"]'))) {
|
|
8355
8360
|
continue;
|
|
8356
8361
|
}
|
|
8357
8362
|
const color = css(element, "--uk-inverse");
|
|
@@ -8366,6 +8371,18 @@
|
|
|
8366
8371
|
}
|
|
8367
8372
|
return last ? `uk-${last}` : "";
|
|
8368
8373
|
}
|
|
8374
|
+
function isVisible(element) {
|
|
8375
|
+
if (css(element, "visibility") !== "visible") {
|
|
8376
|
+
return false;
|
|
8377
|
+
}
|
|
8378
|
+
while (element) {
|
|
8379
|
+
if (css(element, "opacity") === "0") {
|
|
8380
|
+
return false;
|
|
8381
|
+
}
|
|
8382
|
+
element = parent(element);
|
|
8383
|
+
}
|
|
8384
|
+
return true;
|
|
8385
|
+
}
|
|
8369
8386
|
|
|
8370
8387
|
var leader = {
|
|
8371
8388
|
mixins: [Class, Media],
|
|
@@ -8479,13 +8496,14 @@
|
|
|
8479
8496
|
};
|
|
8480
8497
|
modal.prompt = function(message, value, options) {
|
|
8481
8498
|
const promise = openDialog(
|
|
8482
|
-
({ i18n }) => `<form class="uk-form-stacked"> <div class="uk-modal-body"> <label>${isString(message) ? message : html(message)}</label> <input class="uk-input"
|
|
8499
|
+
({ i18n }) => `<form class="uk-form-stacked"> <div class="uk-modal-body"> <label>${isString(message) ? message : html(message)}</label> <input class="uk-input" autofocus> </div> <div class="uk-modal-footer uk-text-right"> <button class="uk-button uk-button-default uk-modal-close" type="button">${i18n.cancel}</button> <button class="uk-button uk-button-primary">${i18n.ok}</button> </div> </form>`,
|
|
8483
8500
|
options,
|
|
8484
8501
|
() => null,
|
|
8485
8502
|
() => input.value
|
|
8486
8503
|
);
|
|
8487
8504
|
const { $el } = promise.dialog;
|
|
8488
8505
|
const input = $("input", $el);
|
|
8506
|
+
input.value = value || "";
|
|
8489
8507
|
on($el, "show", () => input.select());
|
|
8490
8508
|
return promise;
|
|
8491
8509
|
};
|
|
@@ -8638,7 +8656,7 @@
|
|
|
8638
8656
|
observe: swipe({ filter: ({ swiping }) => swiping }),
|
|
8639
8657
|
update: {
|
|
8640
8658
|
read() {
|
|
8641
|
-
if (this.isToggled() && !isVisible(this.$el)) {
|
|
8659
|
+
if (this.isToggled() && !isVisible$1(this.$el)) {
|
|
8642
8660
|
this.hide();
|
|
8643
8661
|
}
|
|
8644
8662
|
},
|
|
@@ -8745,7 +8763,7 @@
|
|
|
8745
8763
|
}),
|
|
8746
8764
|
update: {
|
|
8747
8765
|
read() {
|
|
8748
|
-
if (!this.content || !this.container || !isVisible(this.$el)) {
|
|
8766
|
+
if (!this.content || !this.container || !isVisible$1(this.$el)) {
|
|
8749
8767
|
return false;
|
|
8750
8768
|
}
|
|
8751
8769
|
return {
|
|
@@ -8902,12 +8920,12 @@
|
|
|
8902
8920
|
],
|
|
8903
8921
|
methods: {
|
|
8904
8922
|
toggle(el, inview) {
|
|
8905
|
-
var _a;
|
|
8906
|
-
const state = this.elementData.get(el);
|
|
8923
|
+
var _a, _b;
|
|
8924
|
+
const state = (_a = this.elementData) == null ? void 0 : _a.get(el);
|
|
8907
8925
|
if (!state) {
|
|
8908
8926
|
return;
|
|
8909
8927
|
}
|
|
8910
|
-
(
|
|
8928
|
+
(_b = state.off) == null ? void 0 : _b.call(state);
|
|
8911
8929
|
css(el, "opacity", !inview && this.hidden ? 0 : "");
|
|
8912
8930
|
toggleClass(el, this.inViewClass, inview);
|
|
8913
8931
|
toggleClass(el, state.cls);
|
|
@@ -8961,7 +8979,7 @@
|
|
|
8961
8979
|
read() {
|
|
8962
8980
|
const targets = this.links.map(getTargetedElement).filter(Boolean);
|
|
8963
8981
|
const { length } = targets;
|
|
8964
|
-
if (!length || !isVisible(this.$el)) {
|
|
8982
|
+
if (!length || !isVisible$1(this.$el)) {
|
|
8965
8983
|
return false;
|
|
8966
8984
|
}
|
|
8967
8985
|
const scrollElement = scrollParent(targets, true);
|
|
@@ -8972,9 +8990,8 @@
|
|
|
8972
8990
|
if (scrollTop === max) {
|
|
8973
8991
|
active = length - 1;
|
|
8974
8992
|
} else {
|
|
8993
|
+
const offsetBy = this.offset + offset(getCoveringElement()).height;
|
|
8975
8994
|
for (let i = 0; i < targets.length; i++) {
|
|
8976
|
-
const fixedEl = getCoveringElement(targets[i]);
|
|
8977
|
-
const offsetBy = this.offset + (fixedEl ? offset(fixedEl).height : 0);
|
|
8978
8995
|
if (offset(targets[i]).top - viewport.top - offsetBy > 0) {
|
|
8979
8996
|
break;
|
|
8980
8997
|
}
|
|
@@ -9057,19 +9074,17 @@
|
|
|
9057
9074
|
this.placeholder = null;
|
|
9058
9075
|
},
|
|
9059
9076
|
observe: [
|
|
9060
|
-
viewport(
|
|
9061
|
-
handler() {
|
|
9062
|
-
if (toPx("100vh", "height") !== this._data.viewport) {
|
|
9063
|
-
this.$emit("resize");
|
|
9064
|
-
}
|
|
9065
|
-
}
|
|
9066
|
-
}),
|
|
9077
|
+
viewport(),
|
|
9067
9078
|
scroll$1({ target: () => document.scrollingElement }),
|
|
9068
9079
|
resize({
|
|
9069
|
-
target: () => document.scrollingElement,
|
|
9070
|
-
|
|
9071
|
-
|
|
9072
|
-
|
|
9080
|
+
target: ({ $el }) => [$el, parent($el), document.scrollingElement],
|
|
9081
|
+
handler(entries) {
|
|
9082
|
+
this.$emit(
|
|
9083
|
+
this._data.resized && entries.some(({ target }) => target === parent(this.$el)) ? "update" : "resize"
|
|
9084
|
+
);
|
|
9085
|
+
this._data.resized = true;
|
|
9086
|
+
}
|
|
9087
|
+
})
|
|
9073
9088
|
],
|
|
9074
9089
|
events: [
|
|
9075
9090
|
{
|
|
@@ -9095,26 +9110,16 @@
|
|
|
9095
9110
|
}
|
|
9096
9111
|
});
|
|
9097
9112
|
}
|
|
9098
|
-
},
|
|
9099
|
-
{
|
|
9100
|
-
name: "transitionstart",
|
|
9101
|
-
handler() {
|
|
9102
|
-
this.transitionInProgress = once(
|
|
9103
|
-
this.$el,
|
|
9104
|
-
"transitionend transitioncancel",
|
|
9105
|
-
() => this.transitionInProgress = null
|
|
9106
|
-
);
|
|
9107
|
-
}
|
|
9108
9113
|
}
|
|
9109
9114
|
],
|
|
9110
9115
|
update: [
|
|
9111
9116
|
{
|
|
9112
|
-
read({ height: height$1, width, margin, sticky }) {
|
|
9113
|
-
this.inactive = !this.matchMedia || !isVisible(this.$el);
|
|
9117
|
+
read({ height: height$1, width, margin, sticky }, types) {
|
|
9118
|
+
this.inactive = !this.matchMedia || !isVisible$1(this.$el);
|
|
9114
9119
|
if (this.inactive) {
|
|
9115
9120
|
return;
|
|
9116
9121
|
}
|
|
9117
|
-
const hide = this.isFixed &&
|
|
9122
|
+
const hide = this.isFixed && types.has("update");
|
|
9118
9123
|
if (hide) {
|
|
9119
9124
|
preventTransition(this.target);
|
|
9120
9125
|
this.hide();
|
|
@@ -9164,7 +9169,8 @@
|
|
|
9164
9169
|
margin,
|
|
9165
9170
|
top: offsetPosition(referenceElement)[0],
|
|
9166
9171
|
sticky,
|
|
9167
|
-
viewport: viewport2
|
|
9172
|
+
viewport: viewport2,
|
|
9173
|
+
maxScrollHeight
|
|
9168
9174
|
};
|
|
9169
9175
|
},
|
|
9170
9176
|
write({ height, width, margin, offset, sticky }) {
|
|
@@ -9197,9 +9203,10 @@
|
|
|
9197
9203
|
end,
|
|
9198
9204
|
elHeight,
|
|
9199
9205
|
height,
|
|
9200
|
-
sticky
|
|
9206
|
+
sticky,
|
|
9207
|
+
maxScrollHeight
|
|
9201
9208
|
}) {
|
|
9202
|
-
const scroll2 = document.scrollingElement.scrollTop;
|
|
9209
|
+
const scroll2 = Math.min(document.scrollingElement.scrollTop, maxScrollHeight);
|
|
9203
9210
|
const dir = prevScroll <= scroll2 ? "down" : "up";
|
|
9204
9211
|
const referenceElement = this.isFixed ? this.placeholder : this.$el;
|
|
9205
9212
|
return {
|
|
@@ -9356,9 +9363,12 @@
|
|
|
9356
9363
|
function reset(el) {
|
|
9357
9364
|
css(el, { position: "", top: "", marginTop: "", width: "" });
|
|
9358
9365
|
}
|
|
9359
|
-
|
|
9360
|
-
|
|
9361
|
-
|
|
9366
|
+
const clsTransitionDisable = "uk-transition-disable";
|
|
9367
|
+
function preventTransition(element) {
|
|
9368
|
+
if (!hasClass(element, clsTransitionDisable)) {
|
|
9369
|
+
addClass(element, clsTransitionDisable);
|
|
9370
|
+
requestAnimationFrame(() => removeClass(element, clsTransitionDisable));
|
|
9371
|
+
}
|
|
9362
9372
|
}
|
|
9363
9373
|
|
|
9364
9374
|
var svg = {
|