uikit 3.25.27-dev.2d5695a → 3.25.27-dev.9e97c1f
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 +39 -0
- package/build/prefix.js +1 -1
- package/build/publishDev.js +1 -1
- package/build/scope.js +1 -1
- package/build/scss.js +1 -1
- package/build/util.js +0 -2
- package/dist/css/uikit-core-rtl.css +1327 -1204
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +1327 -1204
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +1339 -1223
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +1339 -1223
- 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 +134 -135
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +135 -136
- package/dist/js/components/lightbox.min.js +1 -1
- package/dist/js/components/marquee.js +215 -0
- package/dist/js/components/marquee.min.js +1 -0
- package/dist/js/components/notification.js +8 -6
- package/dist/js/components/notification.min.js +1 -1
- package/dist/js/components/parallax.js +8 -12
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +8 -12
- package/dist/js/components/slider-parallax.min.js +1 -1
- package/dist/js/components/slider.js +51 -25
- package/dist/js/components/slider.min.js +1 -1
- package/dist/js/components/slideshow-parallax.js +8 -12
- package/dist/js/components/slideshow-parallax.min.js +1 -1
- package/dist/js/components/slideshow.js +81 -102
- 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 +15 -17
- 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 +874 -323
- 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 +737 -395
- package/dist/js/uikit.min.js +1 -1
- package/package.json +1 -1
- package/src/js/api/component.js +2 -3
- package/src/js/api/observables.js +16 -4
- package/src/js/api/options.js +6 -3
- package/src/js/api/props.js +1 -3
- package/src/js/api/state.js +7 -8
- package/src/js/components/index.js +1 -0
- package/src/js/components/internal/lightbox-animations.js +7 -26
- package/src/js/components/internal/slider-preload.js +1 -0
- package/src/js/components/internal/slideshow-animations.js +15 -62
- package/src/js/components/lightbox-panel.js +121 -96
- package/src/js/components/lightbox.js +5 -8
- package/src/js/components/marquee.js +156 -0
- package/src/js/components/notification.js +7 -5
- package/src/js/core/accordion.js +62 -31
- package/src/js/core/alert.js +1 -1
- package/src/js/core/drop.js +4 -3
- package/src/js/core/dropnav.js +3 -3
- package/src/js/core/grid.js +5 -19
- package/src/js/core/margin.js +3 -0
- package/src/js/core/overflow-auto.js +5 -1
- package/src/js/core/sticky.js +1 -1
- package/src/js/core/switcher.js +12 -49
- package/src/js/core/video.js +236 -21
- package/src/js/mixin/connect.js +90 -0
- package/src/js/mixin/internal/slideshow-animations.js +5 -13
- package/src/js/mixin/internal/slideshow-transitioner.js +2 -2
- package/src/js/mixin/parallax.js +1 -4
- package/src/js/mixin/position.js +1 -1
- package/src/js/mixin/scroll-driven.js +57 -0
- package/src/js/mixin/slider-parallax.js +9 -38
- package/src/js/mixin/togglable.js +13 -14
- package/src/js/util/attr.js +7 -7
- package/src/js/util/dom.js +3 -4
- package/src/js/util/lang.js +2 -2
- package/src/js/util/player.js +4 -2
- package/src/js/util/style.js +12 -13
- package/src/js/util/viewport.js +22 -25
- package/src/less/components/_import.less +8 -3
- package/src/less/components/animation.less +1 -1
- package/src/less/components/base.less +1 -1
- package/src/less/components/button.less +1 -1
- package/src/less/components/card.less +8 -8
- package/src/less/components/dropcap.less +71 -0
- package/src/less/components/floating-shadow.less +66 -0
- package/src/less/components/form.less +15 -15
- package/src/less/components/grid.less +58 -65
- package/src/less/components/lightbox.less +2 -8
- package/src/less/components/logo.less +94 -0
- package/src/less/components/margin.less +155 -124
- package/src/less/components/marquee.less +133 -0
- package/src/less/components/modal.less +1 -4
- package/src/less/components/nav.less +1 -1
- package/src/less/components/navbar.less +1 -1
- package/src/less/components/padding.less +9 -9
- package/src/less/components/position.less +9 -4
- package/src/less/components/search.less +1 -1
- package/src/less/components/slideshow.less +1 -4
- package/src/less/components/switcher.less +5 -2
- package/src/less/components/table.less +4 -4
- package/src/less/components/text.less +10 -4
- package/src/less/components/utility.less +0 -163
- package/src/less/components/visibility.less +4 -4
- package/src/less/theme/_import.less +6 -2
- package/src/less/theme/alert.less +0 -5
- package/src/less/theme/dropcap.less +29 -0
- package/src/less/theme/floating-shadow.less +20 -0
- package/src/less/theme/logo.less +29 -0
- package/src/less/theme/marquee.less +14 -0
- package/src/less/theme/thumbnav.less +1 -4
- package/src/less/theme/utility.less +0 -32
- package/src/scss/components/_import.scss +8 -3
- package/src/scss/components/animation.scss +1 -1
- package/src/scss/components/base.scss +1 -1
- package/src/scss/components/button.scss +1 -1
- package/src/scss/components/card.scss +8 -8
- package/src/scss/components/dropcap.scss +63 -0
- package/src/scss/components/floating-shadow.scss +63 -0
- package/src/scss/components/form.scss +14 -14
- package/src/scss/components/grid.scss +57 -64
- package/src/scss/components/lightbox.scss +2 -8
- package/src/scss/components/logo.scss +75 -0
- package/src/scss/components/margin.scss +155 -124
- package/src/scss/components/marquee.scss +136 -0
- package/src/scss/components/modal.scss +1 -4
- package/src/scss/components/nav.scss +1 -1
- package/src/scss/components/navbar.scss +1 -1
- package/src/scss/components/padding.scss +9 -9
- package/src/scss/components/position.scss +9 -4
- package/src/scss/components/search.scss +1 -1
- package/src/scss/components/slideshow.scss +1 -4
- package/src/scss/components/switcher.scss +5 -2
- package/src/scss/components/table.scss +4 -4
- package/src/scss/components/text.scss +10 -4
- package/src/scss/components/utility.scss +0 -129
- package/src/scss/components/visibility.scss +4 -4
- package/src/scss/mixins-theme.scss +44 -43
- package/src/scss/mixins.scss +40 -31
- package/src/scss/variables-theme.scss +14 -14
- package/src/scss/variables.scss +14 -14
- package/tests/accordion.html +77 -10
- package/tests/alert.html +1 -1
- package/tests/align.html +5 -5
- package/tests/animation.html +4 -4
- package/tests/article.html +7 -7
- package/tests/background.html +2 -2
- package/tests/badge.html +1 -1
- package/tests/base.html +2 -2
- package/tests/button.html +1 -1
- package/tests/card.html +15 -15
- package/tests/close.html +2 -2
- package/tests/comment.html +9 -9
- package/tests/container.html +2 -2
- package/tests/countdown.html +21 -21
- package/tests/cover.html +3 -3
- package/tests/description-list.html +1 -1
- package/tests/divider.html +3 -3
- package/tests/dotnav.html +1 -1
- package/tests/drop.html +7 -7
- package/tests/dropbar.html +5 -5
- package/tests/dropcap.html +26 -0
- package/tests/dropdown.html +1 -1
- package/tests/dropnav.html +18 -18
- package/tests/filter.html +3 -3
- package/tests/floating-shadow.html +44 -0
- package/tests/form.html +14 -14
- package/tests/grid.html +41 -47
- package/tests/heading.html +2 -2
- package/tests/height-viewport.html +4 -4
- package/tests/height.html +5 -5
- package/tests/icon.html +8 -8
- package/tests/image.html +6 -6
- package/tests/index.html +13 -13
- package/tests/js/index.js +1 -1
- package/tests/leader.html +5 -5
- package/tests/lightbox.html +6 -6
- package/tests/link.html +1 -1
- package/tests/list.html +4 -4
- package/tests/logo.html +84 -0
- package/tests/margin.html +59 -7
- package/tests/marker.html +3 -3
- package/tests/marquee.html +617 -0
- package/tests/modal.html +3 -3
- package/tests/nav.html +5 -5
- package/tests/navbar.html +27 -27
- package/tests/notification.html +8 -2
- package/tests/offcanvas.html +12 -12
- package/tests/overlay.html +3 -3
- package/tests/padding.html +1 -1
- package/tests/pagination.html +3 -3
- package/tests/parallax.html +1 -1
- package/tests/position.html +6 -6
- package/tests/scrollspy.html +13 -13
- package/tests/search.html +5 -5
- package/tests/section.html +17 -17
- package/tests/slidenav.html +3 -3
- package/tests/slider.html +5 -5
- package/tests/slideshow.html +33 -3
- package/tests/sortable.html +15 -15
- package/tests/sticky-navbar.html +4 -4
- package/tests/sticky-parallax.html +3 -3
- package/tests/sticky.html +3 -3
- package/tests/svg.html +3 -2
- package/tests/switcher.html +7 -7
- package/tests/tab.html +5 -5
- package/tests/text.html +9 -3
- package/tests/tile.html +4 -4
- package/tests/toggle.html +1 -1
- package/tests/tooltip.html +3 -3
- package/tests/totop.html +2 -2
- package/tests/transition.html +1 -1
- package/tests/upload.html +5 -5
- package/tests/utility.html +16 -116
- package/tests/video.html +224 -24
- package/tests/visibility.html +4 -4
- package/tests/width.html +12 -12
package/dist/js/uikit-core.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.25.27-dev.
|
|
1
|
+
/*! UIkit 3.25.27-dev.9e97c1f | https://www.getuikit.com | (c) 2014 - 2026 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
@@ -135,8 +135,8 @@
|
|
|
135
135
|
}
|
|
136
136
|
function pick(obj, props) {
|
|
137
137
|
const result = {};
|
|
138
|
-
for (const
|
|
139
|
-
result[
|
|
138
|
+
for (const key of props) {
|
|
139
|
+
result[key] = obj[key];
|
|
140
140
|
}
|
|
141
141
|
return result;
|
|
142
142
|
}
|
|
@@ -247,13 +247,12 @@
|
|
|
247
247
|
}
|
|
248
248
|
if (isUndefined(value)) {
|
|
249
249
|
return (_a = toNode(element)) == null ? void 0 : _a.getAttribute(name);
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
}
|
|
250
|
+
}
|
|
251
|
+
for (const el of toNodes(element)) {
|
|
252
|
+
if (value === null) {
|
|
253
|
+
removeAttr(el, name);
|
|
254
|
+
} else {
|
|
255
|
+
el.setAttribute(name, value);
|
|
257
256
|
}
|
|
258
257
|
}
|
|
259
258
|
}
|
|
@@ -590,19 +589,18 @@
|
|
|
590
589
|
property = propName(property);
|
|
591
590
|
if (isUndefined(value)) {
|
|
592
591
|
return getComputedStyle(element2).getPropertyValue(property);
|
|
593
|
-
} else {
|
|
594
|
-
element2.style.setProperty(
|
|
595
|
-
property,
|
|
596
|
-
isNumeric(value) && !cssNumber[property] && !isCustomProperty(property) ? `${value}px` : value || isNumber(value) ? value : "",
|
|
597
|
-
priority
|
|
598
|
-
);
|
|
599
592
|
}
|
|
593
|
+
element2.style.setProperty(
|
|
594
|
+
property,
|
|
595
|
+
isNumeric(value) && !cssNumber[property] && !isCustomProperty(property) ? `${value}px` : value || isNumber(value) ? value : "",
|
|
596
|
+
priority
|
|
597
|
+
);
|
|
600
598
|
} else if (isArray(property)) {
|
|
601
|
-
const
|
|
599
|
+
const values = {};
|
|
602
600
|
for (const prop of property) {
|
|
603
|
-
|
|
601
|
+
values[prop] = css(element2, prop);
|
|
604
602
|
}
|
|
605
|
-
return
|
|
603
|
+
return values;
|
|
606
604
|
} else if (isObject(property)) {
|
|
607
605
|
for (const prop in property) {
|
|
608
606
|
css(element2, prop, property[prop], value);
|
|
@@ -797,7 +795,9 @@
|
|
|
797
795
|
);
|
|
798
796
|
}
|
|
799
797
|
function unwrap(element) {
|
|
800
|
-
toNodes(element).map(parent)
|
|
798
|
+
for (const elementParent of new Set(toNodes(element).map(parent))) {
|
|
799
|
+
elementParent.replaceWith(...elementParent.childNodes);
|
|
800
|
+
}
|
|
801
801
|
}
|
|
802
802
|
const singleTagRe = /^<(\w+)\s*\/?>(?:<\/\1>)?$/;
|
|
803
803
|
function fragment(html2) {
|
|
@@ -837,8 +837,8 @@
|
|
|
837
837
|
width: ["left", "right"],
|
|
838
838
|
height: ["top", "bottom"]
|
|
839
839
|
};
|
|
840
|
-
function dimensions(element) {
|
|
841
|
-
const rect = isElement(element) ? toNode(element).getBoundingClientRect() : { height: height(element), width: width(element), top: 0, left: 0 };
|
|
840
|
+
function dimensions$1(element) {
|
|
841
|
+
const rect = isElement(element) ? toNode(element).getBoundingClientRect() : { height: height$1(element), width: width(element), top: 0, left: 0 };
|
|
842
842
|
return {
|
|
843
843
|
height: rect.height,
|
|
844
844
|
width: rect.width,
|
|
@@ -852,7 +852,7 @@
|
|
|
852
852
|
if (coordinates) {
|
|
853
853
|
css(element, { left: 0, top: 0 });
|
|
854
854
|
}
|
|
855
|
-
const currentOffset = dimensions(element);
|
|
855
|
+
const currentOffset = dimensions$1(element);
|
|
856
856
|
if (element) {
|
|
857
857
|
const { scrollY, scrollX } = toWindow(element);
|
|
858
858
|
const offsetBy = { height: scrollY, width: scrollX };
|
|
@@ -904,7 +904,7 @@
|
|
|
904
904
|
}
|
|
905
905
|
return offset2;
|
|
906
906
|
}
|
|
907
|
-
const height = dimension("height");
|
|
907
|
+
const height$1 = dimension("height");
|
|
908
908
|
const width = dimension("width");
|
|
909
909
|
function dimension(prop) {
|
|
910
910
|
const propName = ucfirst(prop);
|
|
@@ -953,15 +953,15 @@
|
|
|
953
953
|
return sumBy(parseCalc(value), (value2) => {
|
|
954
954
|
const unit = parseUnit(value2);
|
|
955
955
|
return unit ? percent(
|
|
956
|
-
unit === "vh" ? getViewportHeight() : unit === "vw" ? width(toWindow(element)) : offsetDim ? element[`offset${ucfirst(property)}`] : dimensions(element)[property],
|
|
956
|
+
unit === "vh" ? getViewportHeight() : unit === "vw" ? width(toWindow(element)) : offsetDim ? element[`offset${ucfirst(property)}`] : dimensions$1(element)[property],
|
|
957
957
|
value2
|
|
958
958
|
) : value2;
|
|
959
959
|
});
|
|
960
960
|
}
|
|
961
961
|
const calcRe = /-?\d+(?:\.\d+)?(?:v[wh]|%|px)?/g;
|
|
962
962
|
const parseCalc = memoize((calc) => calc.toString().replace(/\s/g, "").match(calcRe) || []);
|
|
963
|
-
const unitRe = /(?:v[hw]|%)$/;
|
|
964
|
-
const parseUnit = memoize((str) => (str.match(unitRe) || [])[0]);
|
|
963
|
+
const unitRe$1 = /(?:v[hw]|%)$/;
|
|
964
|
+
const parseUnit = memoize((str) => (str.match(unitRe$1) || [])[0]);
|
|
965
965
|
function percent(base, value) {
|
|
966
966
|
return base * toFloat(value) / 100;
|
|
967
967
|
}
|
|
@@ -1056,7 +1056,7 @@
|
|
|
1056
1056
|
if (!this.positions || this.positions.length < 2) {
|
|
1057
1057
|
return false;
|
|
1058
1058
|
}
|
|
1059
|
-
const p = dimensions(target);
|
|
1059
|
+
const p = dimensions$1(target);
|
|
1060
1060
|
const { left, right, top, bottom } = p;
|
|
1061
1061
|
const [prevPosition] = this.positions;
|
|
1062
1062
|
const position = last(this.positions);
|
|
@@ -1159,7 +1159,9 @@
|
|
|
1159
1159
|
return isTag(el, "iframe") && (isYoutube(el) || isVimeo(el));
|
|
1160
1160
|
}
|
|
1161
1161
|
function isYoutube(el) {
|
|
1162
|
-
return /\/\/.*?youtube(-nocookie)?\.[a-z]+\/(watch\?v=[^&\s]+|embed)|youtu\.be
|
|
1162
|
+
return /\/\/.*?youtube(-nocookie)?\.[a-z]+\/(watch\?v=[^&\s]+|embed)|youtu\.be\/.*/.test(
|
|
1163
|
+
el.src
|
|
1164
|
+
);
|
|
1163
1165
|
}
|
|
1164
1166
|
function isVimeo(el) {
|
|
1165
1167
|
return /vimeo\.com\/video\/.*/.test(el.src);
|
|
@@ -1171,7 +1173,7 @@
|
|
|
1171
1173
|
function post(el, cmd) {
|
|
1172
1174
|
el.contentWindow.postMessage(JSON.stringify({ event: "command", ...cmd }), "*");
|
|
1173
1175
|
}
|
|
1174
|
-
const stateKey =
|
|
1176
|
+
const stateKey = /* @__PURE__ */ Symbol();
|
|
1175
1177
|
let counter = 0;
|
|
1176
1178
|
function enableApi(el) {
|
|
1177
1179
|
if (el[stateKey]) {
|
|
@@ -1202,17 +1204,16 @@
|
|
|
1202
1204
|
if (!isVisible(element)) {
|
|
1203
1205
|
return false;
|
|
1204
1206
|
}
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
);
|
|
1207
|
+
const rects = overflowParents(element).map((parent2) => {
|
|
1208
|
+
const { top, left, bottom, right } = offsetViewport(parent2);
|
|
1209
|
+
return {
|
|
1210
|
+
top: top - offsetTop,
|
|
1211
|
+
left: left - offsetLeft,
|
|
1212
|
+
bottom: bottom + offsetTop,
|
|
1213
|
+
right: right + offsetLeft
|
|
1214
|
+
};
|
|
1215
|
+
});
|
|
1216
|
+
return intersectRect(...rects, offset(element));
|
|
1216
1217
|
}
|
|
1217
1218
|
function scrollIntoView(element, { offset: offsetBy = 0 } = {}) {
|
|
1218
1219
|
const parents2 = isVisible(element) ? scrollParents(element, false, ["hidden"]) : [];
|
|
@@ -1252,7 +1253,7 @@
|
|
|
1252
1253
|
const percent = ease(clamp((Date.now() - start) / duration));
|
|
1253
1254
|
let diff = 0;
|
|
1254
1255
|
if (parents2[0] === element2 && scroll + top < maxScroll) {
|
|
1255
|
-
diff = offset(targetEl).top + (isScrollingElement ? 0 : element2.scrollTop) - targetTop - dimensions(getCoveringElement(targetEl)).height;
|
|
1256
|
+
diff = offset(targetEl).top + (isScrollingElement ? 0 : element2.scrollTop) - targetTop - dimensions$1(getCoveringElement(targetEl)).height;
|
|
1256
1257
|
}
|
|
1257
1258
|
if (css(element2, "scrollBehavior") !== "auto") {
|
|
1258
1259
|
css(element2, "scrollBehavior", "auto");
|
|
@@ -1296,11 +1297,12 @@
|
|
|
1296
1297
|
if (~fixedIndex) {
|
|
1297
1298
|
ancestors = ancestors.slice(fixedIndex);
|
|
1298
1299
|
}
|
|
1299
|
-
return [
|
|
1300
|
-
|
|
1300
|
+
return [
|
|
1301
|
+
scrollEl,
|
|
1302
|
+
...ancestors.filter(
|
|
1301
1303
|
(parent2) => css(parent2, "overflow").split(" ").some((prop) => includes(["auto", "scroll", ...props], prop)) && (!scrollable || parent2.scrollHeight > offsetViewport(parent2).height)
|
|
1302
1304
|
)
|
|
1303
|
-
|
|
1305
|
+
].reverse();
|
|
1304
1306
|
}
|
|
1305
1307
|
function scrollParent(...args) {
|
|
1306
1308
|
return scrollParents(...args)[0];
|
|
@@ -1339,7 +1341,7 @@
|
|
|
1339
1341
|
function getCoveringElement(target) {
|
|
1340
1342
|
const { document } = toWindow(target);
|
|
1341
1343
|
target = target || document.body;
|
|
1342
|
-
const { left, width, top } = dimensions(target);
|
|
1344
|
+
const { left, width, top } = dimensions$1(target);
|
|
1343
1345
|
for (const position of top ? [0, top] : [0]) {
|
|
1344
1346
|
let coverEl;
|
|
1345
1347
|
for (const el of document.elementsFromPoint(left + width / 2, position)) {
|
|
@@ -1348,7 +1350,7 @@
|
|
|
1348
1350
|
parents(target).reverse().find(
|
|
1349
1351
|
(parent2) => !parent2.contains(el) && !hasPosition(parent2, "static")
|
|
1350
1352
|
)
|
|
1351
|
-
) < zIndex(el) || hasPosition(el, "sticky") && (!target || parent(el).contains(target))) && (!coverEl || dimensions(coverEl).height < dimensions(el).height)) {
|
|
1353
|
+
) < zIndex(el) || hasPosition(el, "sticky") && (!target || parent(el).contains(target))) && (!coverEl || dimensions$1(coverEl).height < dimensions$1(el).height)) {
|
|
1352
1354
|
coverEl = el;
|
|
1353
1355
|
}
|
|
1354
1356
|
}
|
|
@@ -1569,7 +1571,7 @@
|
|
|
1569
1571
|
createEvent: createEvent,
|
|
1570
1572
|
css: css,
|
|
1571
1573
|
data: data,
|
|
1572
|
-
dimensions: dimensions,
|
|
1574
|
+
dimensions: dimensions$1,
|
|
1573
1575
|
each: each,
|
|
1574
1576
|
empty: empty,
|
|
1575
1577
|
endsWith: endsWith,
|
|
@@ -1589,7 +1591,7 @@
|
|
|
1589
1591
|
hasClass: hasClass,
|
|
1590
1592
|
hasOwn: hasOwn,
|
|
1591
1593
|
hasTouch: hasTouch,
|
|
1592
|
-
height: height,
|
|
1594
|
+
height: height$1,
|
|
1593
1595
|
html: html,
|
|
1594
1596
|
hyphenate: hyphenate,
|
|
1595
1597
|
inBrowser: inBrowser,
|
|
@@ -1689,7 +1691,7 @@
|
|
|
1689
1691
|
wrapInner: wrapInner
|
|
1690
1692
|
});
|
|
1691
1693
|
|
|
1692
|
-
var VERSION = '3.25.27-dev.
|
|
1694
|
+
var VERSION = '3.25.27-dev.9e97c1f';
|
|
1693
1695
|
|
|
1694
1696
|
function initUpdates(instance) {
|
|
1695
1697
|
instance._data = {};
|
|
@@ -2002,11 +2004,14 @@
|
|
|
2002
2004
|
function coerce$1(type, value) {
|
|
2003
2005
|
if (type === Boolean) {
|
|
2004
2006
|
return toBoolean(value);
|
|
2005
|
-
}
|
|
2007
|
+
}
|
|
2008
|
+
if (type === Number) {
|
|
2006
2009
|
return toNumber(value);
|
|
2007
|
-
}
|
|
2010
|
+
}
|
|
2011
|
+
if (type === "list") {
|
|
2008
2012
|
return toList(value);
|
|
2009
|
-
}
|
|
2013
|
+
}
|
|
2014
|
+
if (type === Object && isString(value)) {
|
|
2010
2015
|
return parseOptions(value);
|
|
2011
2016
|
}
|
|
2012
2017
|
return type ? type(value) : value;
|
|
@@ -2056,7 +2061,7 @@
|
|
|
2056
2061
|
}
|
|
2057
2062
|
const getAttributes = memoize((id, props) => {
|
|
2058
2063
|
const attributes = Object.keys(props);
|
|
2059
|
-
const filter = attributes
|
|
2064
|
+
const filter = [...attributes, id].flatMap((key) => [hyphenate(key), `data-${hyphenate(key)}`]);
|
|
2060
2065
|
return { attributes, filter };
|
|
2061
2066
|
});
|
|
2062
2067
|
function initPropsObserver(instance) {
|
|
@@ -2146,14 +2151,10 @@
|
|
|
2146
2151
|
}
|
|
2147
2152
|
function normalizeData({ data = {} }, { args = [], props = {} }) {
|
|
2148
2153
|
if (isArray(data)) {
|
|
2149
|
-
data = data.slice(0, args.length).reduce(
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
data2[args[index]] = value;
|
|
2154
|
-
}
|
|
2155
|
-
return data2;
|
|
2156
|
-
}, {});
|
|
2154
|
+
data = data.slice(0, args.length).reduce(
|
|
2155
|
+
(data2, value, index) => assign(data2, isPlainObject(value) ? value : { [args[index]]: value }),
|
|
2156
|
+
{}
|
|
2157
|
+
);
|
|
2157
2158
|
}
|
|
2158
2159
|
for (const key in data) {
|
|
2159
2160
|
if (isUndefined(data[key])) {
|
|
@@ -2201,11 +2202,10 @@
|
|
|
2201
2202
|
function init(element2) {
|
|
2202
2203
|
const instance = getComponent(element2, name);
|
|
2203
2204
|
if (instance) {
|
|
2204
|
-
if (data) {
|
|
2205
|
-
instance.$destroy();
|
|
2206
|
-
} else {
|
|
2205
|
+
if (!data) {
|
|
2207
2206
|
return instance;
|
|
2208
2207
|
}
|
|
2208
|
+
instance.$destroy();
|
|
2209
2209
|
}
|
|
2210
2210
|
return new Component({ el: element2, data });
|
|
2211
2211
|
}
|
|
@@ -2419,9 +2419,9 @@
|
|
|
2419
2419
|
function lazyload(options = {}) {
|
|
2420
2420
|
return intersection({
|
|
2421
2421
|
handler: function(entries, observer) {
|
|
2422
|
-
const { targets = this.$el, preload = 5 } = options;
|
|
2422
|
+
const { targets = this.$el, preload = 5, media = false } = options;
|
|
2423
2423
|
for (const el of toNodes(isFunction(targets) ? targets(this) : targets)) {
|
|
2424
|
-
|
|
2424
|
+
(media ? preloadMedia : loadLazyElements)(el, preload);
|
|
2425
2425
|
}
|
|
2426
2426
|
for (const { isIntersecting, target } of entries) {
|
|
2427
2427
|
isIntersecting && observer.unobserve(target);
|
|
@@ -2430,6 +2430,15 @@
|
|
|
2430
2430
|
...options
|
|
2431
2431
|
});
|
|
2432
2432
|
}
|
|
2433
|
+
function preloadMedia(el, preload = 5) {
|
|
2434
|
+
loadLazyElements(el, preload);
|
|
2435
|
+
for (const video of $$('video[preload="none"]', el)) {
|
|
2436
|
+
video.preload = "";
|
|
2437
|
+
}
|
|
2438
|
+
}
|
|
2439
|
+
function loadLazyElements(el, preload) {
|
|
2440
|
+
$$('[loading="lazy"]', el).slice(0, preload - 1).forEach((el2) => removeAttr(el2, "loading"));
|
|
2441
|
+
}
|
|
2433
2442
|
function viewport(options) {
|
|
2434
2443
|
return observe((target, handler) => observeViewportResize(handler), options, "resize");
|
|
2435
2444
|
}
|
|
@@ -2502,62 +2511,6 @@
|
|
|
2502
2511
|
}
|
|
2503
2512
|
};
|
|
2504
2513
|
|
|
2505
|
-
const keyMap = {
|
|
2506
|
-
TAB: 9,
|
|
2507
|
-
ENTER: 13,
|
|
2508
|
-
ESC: 27,
|
|
2509
|
-
SPACE: 32,
|
|
2510
|
-
END: 35,
|
|
2511
|
-
HOME: 36,
|
|
2512
|
-
LEFT: 37,
|
|
2513
|
-
UP: 38,
|
|
2514
|
-
RIGHT: 39,
|
|
2515
|
-
DOWN: 40
|
|
2516
|
-
};
|
|
2517
|
-
function getNavigationIndex(keyCode, previousKey = keyMap.LEFT, nextKey = keyMap.RIGHT) {
|
|
2518
|
-
switch (keyCode) {
|
|
2519
|
-
case keyMap.HOME:
|
|
2520
|
-
return 0;
|
|
2521
|
-
case keyMap.END:
|
|
2522
|
-
return "last";
|
|
2523
|
-
case previousKey:
|
|
2524
|
-
return "previous";
|
|
2525
|
-
case nextKey:
|
|
2526
|
-
return "next";
|
|
2527
|
-
}
|
|
2528
|
-
return -1;
|
|
2529
|
-
}
|
|
2530
|
-
|
|
2531
|
-
function maybeDefaultPreventClick(e) {
|
|
2532
|
-
if (e.target.closest('a[href="#"],a[href=""]')) {
|
|
2533
|
-
e.preventDefault();
|
|
2534
|
-
}
|
|
2535
|
-
}
|
|
2536
|
-
function onEscape(handler, isEligible = () => true) {
|
|
2537
|
-
return on(document, "keydown", (e) => {
|
|
2538
|
-
if (e.keyCode === keyMap.ESC && isEligible()) {
|
|
2539
|
-
handler(e);
|
|
2540
|
-
}
|
|
2541
|
-
});
|
|
2542
|
-
}
|
|
2543
|
-
function onOutsidePointer(handler, isOutside, isEligible) {
|
|
2544
|
-
return on(document, pointerDown, ({ target }) => {
|
|
2545
|
-
if (!isOutside(target) || isEligible && !isEligible()) {
|
|
2546
|
-
return;
|
|
2547
|
-
}
|
|
2548
|
-
once(
|
|
2549
|
-
document,
|
|
2550
|
-
`${pointerUp} ${pointerCancel} scroll`,
|
|
2551
|
-
({ defaultPrevented, type, target: newTarget }) => {
|
|
2552
|
-
if (!defaultPrevented && type === pointerUp && target === newTarget) {
|
|
2553
|
-
handler(target);
|
|
2554
|
-
}
|
|
2555
|
-
},
|
|
2556
|
-
true
|
|
2557
|
-
);
|
|
2558
|
-
});
|
|
2559
|
-
}
|
|
2560
|
-
|
|
2561
2514
|
var Togglable = {
|
|
2562
2515
|
props: {
|
|
2563
2516
|
cls: Boolean,
|
|
@@ -2650,27 +2603,25 @@
|
|
|
2650
2603
|
const dimProp = props[dirs.indexOf(dir)];
|
|
2651
2604
|
const marginProp = `margin-${dir[0]}`;
|
|
2652
2605
|
const marginStartProp = `margin-${startProp}`;
|
|
2653
|
-
let currentDim = dimensions(el)[dimProp];
|
|
2606
|
+
let currentDim = dimensions$1(el)[dimProp];
|
|
2654
2607
|
const inProgress = Transition.inProgress(el);
|
|
2655
2608
|
await Transition.cancel(el);
|
|
2656
2609
|
if (show) {
|
|
2657
2610
|
_toggle(el, true);
|
|
2658
2611
|
}
|
|
2659
|
-
const prevProps =
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
);
|
|
2673
|
-
const dim = dimensions(el);
|
|
2612
|
+
const prevProps = pick(el.style, [
|
|
2613
|
+
"padding",
|
|
2614
|
+
"border",
|
|
2615
|
+
"width",
|
|
2616
|
+
"height",
|
|
2617
|
+
"minWidth",
|
|
2618
|
+
"minHeight",
|
|
2619
|
+
"overflowY",
|
|
2620
|
+
"overflowX",
|
|
2621
|
+
marginProp,
|
|
2622
|
+
marginStartProp
|
|
2623
|
+
]);
|
|
2624
|
+
const dim = dimensions$1(el);
|
|
2674
2625
|
const currentMargin = toFloat(css(el, marginProp));
|
|
2675
2626
|
const marginStart = toFloat(css(el, marginStartProp));
|
|
2676
2627
|
const endDim = dim[dimProp] + marginStart;
|
|
@@ -2735,29 +2686,156 @@
|
|
|
2735
2686
|
_toggle(el, false);
|
|
2736
2687
|
}
|
|
2737
2688
|
|
|
2689
|
+
const TogglableComponent = App.extend(Togglable);
|
|
2690
|
+
var Connect = {
|
|
2691
|
+
mixins: [Togglable],
|
|
2692
|
+
props: {
|
|
2693
|
+
connect: String
|
|
2694
|
+
},
|
|
2695
|
+
data: {
|
|
2696
|
+
connect: "",
|
|
2697
|
+
cls: "uk-active"
|
|
2698
|
+
},
|
|
2699
|
+
computed: {
|
|
2700
|
+
connects: {
|
|
2701
|
+
get: ({ connect }, $el) => connect ? queryAll(connect, $el) : [],
|
|
2702
|
+
observe: ({ connect }) => connect
|
|
2703
|
+
},
|
|
2704
|
+
connectChildren() {
|
|
2705
|
+
return this.connects.flatMap((el) => children(el));
|
|
2706
|
+
}
|
|
2707
|
+
},
|
|
2708
|
+
watch: {
|
|
2709
|
+
connects(connects) {
|
|
2710
|
+
for (const el of connects) {
|
|
2711
|
+
if (isTag(el, "ul")) {
|
|
2712
|
+
el.role = "presentation";
|
|
2713
|
+
}
|
|
2714
|
+
}
|
|
2715
|
+
}
|
|
2716
|
+
},
|
|
2717
|
+
observe: lazyload({ targets: ({ connectChildren }) => connectChildren }),
|
|
2718
|
+
update() {
|
|
2719
|
+
for (const index in this.toggles) {
|
|
2720
|
+
const toggle = this.toggles[index];
|
|
2721
|
+
if (!toggle) {
|
|
2722
|
+
continue;
|
|
2723
|
+
}
|
|
2724
|
+
toggle.id = generateId(this, toggle);
|
|
2725
|
+
for (const { children: children2 } of this.connects) {
|
|
2726
|
+
const item = children2[index];
|
|
2727
|
+
if (item) {
|
|
2728
|
+
attr(item, {
|
|
2729
|
+
id: generateId(this, item),
|
|
2730
|
+
role: "tabpanel",
|
|
2731
|
+
"aria-labelledby": toggle.id
|
|
2732
|
+
});
|
|
2733
|
+
}
|
|
2734
|
+
}
|
|
2735
|
+
}
|
|
2736
|
+
},
|
|
2737
|
+
methods: {
|
|
2738
|
+
showConnects(index, animate) {
|
|
2739
|
+
const toggle = async (el) => {
|
|
2740
|
+
const { children: children2 } = el;
|
|
2741
|
+
const animation = data(el, "uk-switcher-animation");
|
|
2742
|
+
let togglable = animation ? new TogglableComponent({ data: { ...this.$props, animation } }) : this;
|
|
2743
|
+
const actives = toArray(children2).filter(
|
|
2744
|
+
(child, i) => i !== index && hasClass(child, this.cls)
|
|
2745
|
+
);
|
|
2746
|
+
if (await togglable.toggleElement(actives, false, animate)) {
|
|
2747
|
+
await togglable.toggleElement(children2[index], true, animate);
|
|
2748
|
+
}
|
|
2749
|
+
};
|
|
2750
|
+
return Promise.all(this.connects.map(toggle));
|
|
2751
|
+
}
|
|
2752
|
+
}
|
|
2753
|
+
};
|
|
2754
|
+
|
|
2755
|
+
const keyMap = {
|
|
2756
|
+
TAB: 9,
|
|
2757
|
+
ENTER: 13,
|
|
2758
|
+
ESC: 27,
|
|
2759
|
+
SPACE: 32,
|
|
2760
|
+
END: 35,
|
|
2761
|
+
HOME: 36,
|
|
2762
|
+
LEFT: 37,
|
|
2763
|
+
UP: 38,
|
|
2764
|
+
RIGHT: 39,
|
|
2765
|
+
DOWN: 40
|
|
2766
|
+
};
|
|
2767
|
+
function getNavigationIndex(keyCode, previousKey = keyMap.LEFT, nextKey = keyMap.RIGHT) {
|
|
2768
|
+
switch (keyCode) {
|
|
2769
|
+
case keyMap.HOME:
|
|
2770
|
+
return 0;
|
|
2771
|
+
case keyMap.END:
|
|
2772
|
+
return "last";
|
|
2773
|
+
case previousKey:
|
|
2774
|
+
return "previous";
|
|
2775
|
+
case nextKey:
|
|
2776
|
+
return "next";
|
|
2777
|
+
}
|
|
2778
|
+
return -1;
|
|
2779
|
+
}
|
|
2780
|
+
|
|
2781
|
+
function maybeDefaultPreventClick(e) {
|
|
2782
|
+
if (e.target.closest('a[href="#"],a[href=""]')) {
|
|
2783
|
+
e.preventDefault();
|
|
2784
|
+
}
|
|
2785
|
+
}
|
|
2786
|
+
function onEscape(handler, isEligible = () => true) {
|
|
2787
|
+
return on(document, "keydown", (e) => {
|
|
2788
|
+
if (e.keyCode === keyMap.ESC && isEligible()) {
|
|
2789
|
+
handler(e);
|
|
2790
|
+
}
|
|
2791
|
+
});
|
|
2792
|
+
}
|
|
2793
|
+
function onOutsidePointer(handler, isOutside, isEligible) {
|
|
2794
|
+
return on(document, pointerDown, ({ target }) => {
|
|
2795
|
+
if (!isOutside(target) || isEligible && !isEligible()) {
|
|
2796
|
+
return;
|
|
2797
|
+
}
|
|
2798
|
+
once(
|
|
2799
|
+
document,
|
|
2800
|
+
`${pointerUp} ${pointerCancel} scroll`,
|
|
2801
|
+
({ defaultPrevented, type, target: newTarget }) => {
|
|
2802
|
+
if (!defaultPrevented && type === pointerUp && target === newTarget) {
|
|
2803
|
+
handler(target);
|
|
2804
|
+
}
|
|
2805
|
+
},
|
|
2806
|
+
true
|
|
2807
|
+
);
|
|
2808
|
+
});
|
|
2809
|
+
}
|
|
2810
|
+
|
|
2738
2811
|
const wrappers = /* @__PURE__ */ new WeakMap();
|
|
2739
2812
|
var Accordion = {
|
|
2740
|
-
mixins: [Class,
|
|
2813
|
+
mixins: [Class, Connect],
|
|
2741
2814
|
props: {
|
|
2742
|
-
animation: Boolean,
|
|
2743
2815
|
targets: String,
|
|
2744
2816
|
active: null,
|
|
2745
2817
|
collapsible: Boolean,
|
|
2746
2818
|
multiple: Boolean,
|
|
2747
2819
|
toggle: String,
|
|
2748
2820
|
content: String,
|
|
2749
|
-
offset: Number
|
|
2821
|
+
offset: Number,
|
|
2822
|
+
switcherConnect: String
|
|
2750
2823
|
},
|
|
2751
2824
|
data: {
|
|
2752
2825
|
targets: "> *",
|
|
2753
2826
|
active: false,
|
|
2754
|
-
animation: true,
|
|
2827
|
+
animation: [true],
|
|
2755
2828
|
collapsible: true,
|
|
2756
2829
|
multiple: false,
|
|
2757
2830
|
clsOpen: "uk-open",
|
|
2831
|
+
cls: "uk-active",
|
|
2758
2832
|
toggle: ".uk-accordion-title",
|
|
2759
2833
|
content: ".uk-accordion-content",
|
|
2760
|
-
offset: 0
|
|
2834
|
+
offset: 0,
|
|
2835
|
+
switcherConnect: ""
|
|
2836
|
+
},
|
|
2837
|
+
beforeConnect() {
|
|
2838
|
+
this.connect = this.$props.connect = this.switcherConnect;
|
|
2761
2839
|
},
|
|
2762
2840
|
computed: {
|
|
2763
2841
|
items: ({ targets }, $el) => $$(targets, $el),
|
|
@@ -2783,6 +2861,12 @@
|
|
|
2783
2861
|
this.toggle(active, false);
|
|
2784
2862
|
}
|
|
2785
2863
|
},
|
|
2864
|
+
connectChildren() {
|
|
2865
|
+
this.showConnects(
|
|
2866
|
+
findIndex(this.items, (el) => hasClass(el, this.clsOpen)),
|
|
2867
|
+
false
|
|
2868
|
+
);
|
|
2869
|
+
},
|
|
2786
2870
|
toggles() {
|
|
2787
2871
|
this.$emit();
|
|
2788
2872
|
},
|
|
@@ -2832,44 +2916,57 @@
|
|
|
2832
2916
|
if (!toggle || !content) {
|
|
2833
2917
|
continue;
|
|
2834
2918
|
}
|
|
2835
|
-
toggle.id = generateId(this, toggle);
|
|
2836
|
-
content.id = generateId(this, content);
|
|
2837
2919
|
const active = includes(activeItems, this.items[index2]);
|
|
2920
|
+
attr(content, {
|
|
2921
|
+
id: generateId(this, content),
|
|
2922
|
+
role: "region",
|
|
2923
|
+
"aria-labelledby": toggle.id
|
|
2924
|
+
});
|
|
2925
|
+
if (isTag(content, "ul")) {
|
|
2926
|
+
attr(children(content), "role", "presentation");
|
|
2927
|
+
}
|
|
2928
|
+
const controls = [
|
|
2929
|
+
content.id,
|
|
2930
|
+
...this.connects.map(({ children: children2 }) => {
|
|
2931
|
+
var _a;
|
|
2932
|
+
return (_a = children2[index2]) == null ? void 0 : _a.id;
|
|
2933
|
+
}).filter(Boolean)
|
|
2934
|
+
];
|
|
2838
2935
|
attr(toggle, {
|
|
2839
2936
|
role: isTag(toggle, "a") ? "button" : null,
|
|
2840
|
-
"aria-controls":
|
|
2937
|
+
"aria-controls": controls.join(" "),
|
|
2841
2938
|
"aria-expanded": active,
|
|
2842
2939
|
"aria-disabled": !this.collapsible && activeItems.length < 2 && active
|
|
2843
2940
|
});
|
|
2844
|
-
attr(content, { role: "region", "aria-labelledby": toggle.id });
|
|
2845
|
-
if (isTag(content, "ul")) {
|
|
2846
|
-
attr(children(content), "role", "presentation");
|
|
2847
|
-
}
|
|
2848
2941
|
}
|
|
2849
2942
|
},
|
|
2850
2943
|
methods: {
|
|
2851
|
-
toggle(item, animate) {
|
|
2852
|
-
|
|
2944
|
+
async toggle(item, animate) {
|
|
2945
|
+
animate = animate !== false;
|
|
2946
|
+
const next = getIndex(item, this.items);
|
|
2947
|
+
item = this.items[next];
|
|
2853
2948
|
let items = [item];
|
|
2854
2949
|
const activeItems = filter(this.items, `.${this.clsOpen}`);
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2950
|
+
const isActive = includes(activeItems, item);
|
|
2951
|
+
if (isActive && !this.collapsible && activeItems.length < 2) {
|
|
2952
|
+
return;
|
|
2953
|
+
}
|
|
2954
|
+
if (!isActive && !this.multiple) {
|
|
2955
|
+
items.push(...activeItems);
|
|
2956
|
+
}
|
|
2957
|
+
const toggle = (el) => this.toggleElement(el, !includes(activeItems, el), (el2, show) => {
|
|
2958
|
+
toggleClass(el2, this.clsOpen, show);
|
|
2959
|
+
if (!animate || !this.hasAnimation) {
|
|
2960
|
+
hide($(this.content, el2), !show);
|
|
2961
|
+
return;
|
|
2962
|
+
}
|
|
2963
|
+
return transition(el2, show, this);
|
|
2964
|
+
});
|
|
2965
|
+
const hideIndex = () => findIndex(this.items, (i) => i !== item && includes(activeItems, i));
|
|
2966
|
+
return Promise.all([
|
|
2967
|
+
...items.map(toggle),
|
|
2968
|
+
this.showConnects(isActive ? hideIndex() : next, animate)
|
|
2969
|
+
]);
|
|
2873
2970
|
}
|
|
2874
2971
|
}
|
|
2875
2972
|
};
|
|
@@ -2887,7 +2984,7 @@
|
|
|
2887
2984
|
const currentHeight = toFloat(css(wrapper, "height"));
|
|
2888
2985
|
await Transition.cancel(wrapper);
|
|
2889
2986
|
hide(content, false);
|
|
2890
|
-
const endHeight = sumBy(["marginTop", "marginBottom"], (prop) => css(content, prop)) + dimensions(content).height;
|
|
2987
|
+
const endHeight = sumBy(["marginTop", "marginBottom"], (prop) => css(content, prop)) + dimensions$1(content).height;
|
|
2891
2988
|
const percent = currentHeight / endHeight;
|
|
2892
2989
|
duration = endHeight ? (velocity * endHeight + duration) * (show ? 1 - percent : percent) : 0;
|
|
2893
2990
|
css(wrapper, "height", currentHeight);
|
|
@@ -2903,7 +3000,7 @@
|
|
|
2903
3000
|
let frame;
|
|
2904
3001
|
(function scroll() {
|
|
2905
3002
|
frame = requestAnimationFrame(() => {
|
|
2906
|
-
const { top } = dimensions(el);
|
|
3003
|
+
const { top } = dimensions$1(el);
|
|
2907
3004
|
if (top < 0) {
|
|
2908
3005
|
scrollElement.scrollTop += top;
|
|
2909
3006
|
}
|
|
@@ -2935,7 +3032,7 @@
|
|
|
2935
3032
|
},
|
|
2936
3033
|
methods: {
|
|
2937
3034
|
async close() {
|
|
2938
|
-
await this.toggleElement(this.$el, false, animate$1);
|
|
3035
|
+
await this.toggleElement(this.$el, false, this.animation ? animate$1 : false);
|
|
2939
3036
|
this.$destroy(true);
|
|
2940
3037
|
}
|
|
2941
3038
|
}
|
|
@@ -2960,60 +3057,473 @@
|
|
|
2960
3057
|
);
|
|
2961
3058
|
}
|
|
2962
3059
|
|
|
3060
|
+
var Media = {
|
|
3061
|
+
props: {
|
|
3062
|
+
media: Boolean
|
|
3063
|
+
},
|
|
3064
|
+
data: {
|
|
3065
|
+
media: false
|
|
3066
|
+
},
|
|
3067
|
+
connected() {
|
|
3068
|
+
const media = toMedia(this.media, this.$el);
|
|
3069
|
+
this.matchMedia = true;
|
|
3070
|
+
if (media) {
|
|
3071
|
+
this.mediaObj = window.matchMedia(media);
|
|
3072
|
+
const handler = () => {
|
|
3073
|
+
this.matchMedia = this.mediaObj.matches;
|
|
3074
|
+
trigger(this.$el, createEvent("mediachange", false, true, [this.mediaObj]));
|
|
3075
|
+
};
|
|
3076
|
+
this.offMediaObj = on(this.mediaObj, "change", () => {
|
|
3077
|
+
handler();
|
|
3078
|
+
this.$emit("resize");
|
|
3079
|
+
});
|
|
3080
|
+
handler();
|
|
3081
|
+
}
|
|
3082
|
+
},
|
|
3083
|
+
disconnected() {
|
|
3084
|
+
var _a;
|
|
3085
|
+
(_a = this.offMediaObj) == null ? void 0 : _a.call(this);
|
|
3086
|
+
}
|
|
3087
|
+
};
|
|
3088
|
+
function toMedia(value, element) {
|
|
3089
|
+
if (isString(value)) {
|
|
3090
|
+
if (startsWith(value, "@")) {
|
|
3091
|
+
value = toFloat(css(element, `--uk-breakpoint-${value.slice(1)}`));
|
|
3092
|
+
} else if (isNaN(value)) {
|
|
3093
|
+
return value;
|
|
3094
|
+
}
|
|
3095
|
+
}
|
|
3096
|
+
return value && isNumeric(value) ? `(min-width: ${value}px)` : "";
|
|
3097
|
+
}
|
|
3098
|
+
|
|
3099
|
+
function getMaxPathLength(el) {
|
|
3100
|
+
return isVisible(el) ? Math.ceil(
|
|
3101
|
+
Math.max(0, ...$$("[stroke]", el).map((stroke) => {
|
|
3102
|
+
var _a;
|
|
3103
|
+
return ((_a = stroke.getTotalLength) == null ? void 0 : _a.call(stroke)) || 0;
|
|
3104
|
+
}))
|
|
3105
|
+
) : 0;
|
|
3106
|
+
}
|
|
3107
|
+
|
|
3108
|
+
const props = {
|
|
3109
|
+
x: transformFn,
|
|
3110
|
+
y: transformFn,
|
|
3111
|
+
rotate: transformFn,
|
|
3112
|
+
scale: transformFn,
|
|
3113
|
+
color: colorFn,
|
|
3114
|
+
backgroundColor: colorFn,
|
|
3115
|
+
borderColor: colorFn,
|
|
3116
|
+
blur: filterFn,
|
|
3117
|
+
hue: filterFn,
|
|
3118
|
+
fopacity: filterFn,
|
|
3119
|
+
grayscale: filterFn,
|
|
3120
|
+
invert: filterFn,
|
|
3121
|
+
saturate: filterFn,
|
|
3122
|
+
sepia: filterFn,
|
|
3123
|
+
opacity: cssPropFn,
|
|
3124
|
+
stroke: strokeFn,
|
|
3125
|
+
bgx: backgroundFn,
|
|
3126
|
+
bgy: backgroundFn
|
|
3127
|
+
};
|
|
3128
|
+
const { keys } = Object;
|
|
3129
|
+
({
|
|
3130
|
+
props: fillObject(keys(props), "list"),
|
|
3131
|
+
data: fillObject(keys(props), void 0)});
|
|
3132
|
+
function transformFn(prop, el, stops) {
|
|
3133
|
+
let unit = getUnit(stops) || { x: "px", y: "px", rotate: "deg" }[prop] || "";
|
|
3134
|
+
let transformFn2;
|
|
3135
|
+
if (prop === "x" || prop === "y") {
|
|
3136
|
+
prop = `translate${ucfirst(prop)}`;
|
|
3137
|
+
transformFn2 = (stop) => toFloat(toFloat(stop).toFixed(unit === "px" ? 0 : 6));
|
|
3138
|
+
} else if (prop === "scale") {
|
|
3139
|
+
unit = "";
|
|
3140
|
+
transformFn2 = (stop) => {
|
|
3141
|
+
var _a;
|
|
3142
|
+
return getUnit([stop]) ? toPx(stop, "width", el, true) / el[`offset${((_a = stop.endsWith) == null ? void 0 : _a.call(stop, "vh")) ? "Height" : "Width"}`] : toFloat(stop);
|
|
3143
|
+
};
|
|
3144
|
+
}
|
|
3145
|
+
if (stops.length === 1) {
|
|
3146
|
+
stops.unshift(prop === "scale" ? 1 : 0);
|
|
3147
|
+
}
|
|
3148
|
+
stops = parseStops(stops, transformFn2);
|
|
3149
|
+
return (css2, percent) => {
|
|
3150
|
+
css2.transform = `${css2.transform || ""} ${prop}(${getValue(stops, percent)}${unit})`;
|
|
3151
|
+
};
|
|
3152
|
+
}
|
|
3153
|
+
function colorFn(prop, el, stops) {
|
|
3154
|
+
if (stops.length === 1) {
|
|
3155
|
+
stops.unshift(getCssValue(el, prop, ""));
|
|
3156
|
+
}
|
|
3157
|
+
stops = parseStops(stops, (stop) => parseColor(el, stop));
|
|
3158
|
+
return (css2, percent) => {
|
|
3159
|
+
const [start, end, p] = getStop(stops, percent);
|
|
3160
|
+
const value = start.map((value2, i) => {
|
|
3161
|
+
value2 += p * (end[i] - value2);
|
|
3162
|
+
return i === 3 ? toFloat(value2) : parseInt(value2, 10);
|
|
3163
|
+
}).join(",");
|
|
3164
|
+
css2[prop] = `rgba(${value})`;
|
|
3165
|
+
};
|
|
3166
|
+
}
|
|
3167
|
+
function parseColor(el, color) {
|
|
3168
|
+
return getCssValue(el, "color", color).split(/[(),]/g).slice(1, -1).concat(1).slice(0, 4).map(toFloat);
|
|
3169
|
+
}
|
|
3170
|
+
function filterFn(prop, el, stops) {
|
|
3171
|
+
if (stops.length === 1) {
|
|
3172
|
+
stops.unshift(0);
|
|
3173
|
+
}
|
|
3174
|
+
const unit = getUnit(stops) || { blur: "px", hue: "deg" }[prop] || "%";
|
|
3175
|
+
prop = { fopacity: "opacity", hue: "hue-rotate" }[prop] || prop;
|
|
3176
|
+
stops = parseStops(stops);
|
|
3177
|
+
return (css2, percent) => {
|
|
3178
|
+
const value = getValue(stops, percent);
|
|
3179
|
+
css2.filter = `${css2.filter || ""} ${prop}(${value + unit})`;
|
|
3180
|
+
};
|
|
3181
|
+
}
|
|
3182
|
+
function cssPropFn(prop, el, stops) {
|
|
3183
|
+
if (stops.length === 1) {
|
|
3184
|
+
stops.unshift(getCssValue(el, prop, ""));
|
|
3185
|
+
}
|
|
3186
|
+
stops = parseStops(stops);
|
|
3187
|
+
return (css2, percent) => {
|
|
3188
|
+
css2[prop] = getValue(stops, percent);
|
|
3189
|
+
};
|
|
3190
|
+
}
|
|
3191
|
+
function strokeFn(prop, el, stops) {
|
|
3192
|
+
if (stops.length === 1) {
|
|
3193
|
+
stops.unshift(0);
|
|
3194
|
+
}
|
|
3195
|
+
const unit = getUnit(stops);
|
|
3196
|
+
const length = getMaxPathLength(el);
|
|
3197
|
+
stops = parseStops(stops.reverse(), (stop) => {
|
|
3198
|
+
stop = toFloat(stop);
|
|
3199
|
+
return unit === "%" ? stop * length / 100 : stop;
|
|
3200
|
+
});
|
|
3201
|
+
if (!stops.some(([value]) => value)) {
|
|
3202
|
+
return noop;
|
|
3203
|
+
}
|
|
3204
|
+
css(el, "strokeDasharray", length);
|
|
3205
|
+
return (css2, percent) => {
|
|
3206
|
+
css2.strokeDashoffset = getValue(stops, percent);
|
|
3207
|
+
};
|
|
3208
|
+
}
|
|
3209
|
+
function backgroundFn(prop, el, stops, props2) {
|
|
3210
|
+
if (stops.length === 1) {
|
|
3211
|
+
stops.unshift(0);
|
|
3212
|
+
}
|
|
3213
|
+
const attr = prop === "bgy" ? "height" : "width";
|
|
3214
|
+
props2[prop] = parseStops(stops, (stop) => toPx(stop, attr, el));
|
|
3215
|
+
const bgProps = ["bgx", "bgy"].filter((prop2) => prop2 in props2);
|
|
3216
|
+
if (bgProps.length === 2 && prop === "bgx") {
|
|
3217
|
+
return noop;
|
|
3218
|
+
}
|
|
3219
|
+
if (getCssValue(el, "backgroundSize", "") === "cover") {
|
|
3220
|
+
return backgroundCoverFn(prop, el, stops, props2);
|
|
3221
|
+
}
|
|
3222
|
+
const positions = {};
|
|
3223
|
+
for (const prop2 of bgProps) {
|
|
3224
|
+
positions[prop2] = getBackgroundPos(el, prop2);
|
|
3225
|
+
}
|
|
3226
|
+
return setBackgroundPosFn(bgProps, positions, props2);
|
|
3227
|
+
}
|
|
3228
|
+
function backgroundCoverFn(prop, el, stops, props2) {
|
|
3229
|
+
const dimImage = getBackgroundImageDimensions(el);
|
|
3230
|
+
if (!dimImage.width) {
|
|
3231
|
+
return noop;
|
|
3232
|
+
}
|
|
3233
|
+
const dimEl = {
|
|
3234
|
+
width: el.offsetWidth,
|
|
3235
|
+
height: el.offsetHeight
|
|
3236
|
+
};
|
|
3237
|
+
const bgProps = ["bgx", "bgy"].filter((prop2) => prop2 in props2);
|
|
3238
|
+
const positions = {};
|
|
3239
|
+
for (const prop2 of bgProps) {
|
|
3240
|
+
const values = props2[prop2].map(([value]) => value);
|
|
3241
|
+
const min = Math.min(...values);
|
|
3242
|
+
const max = Math.max(...values);
|
|
3243
|
+
const down = values.indexOf(min) < values.indexOf(max);
|
|
3244
|
+
const diff = max - min;
|
|
3245
|
+
positions[prop2] = `${(down ? -diff : 0) - (down ? min : max)}px`;
|
|
3246
|
+
dimEl[prop2 === "bgy" ? "height" : "width"] += diff;
|
|
3247
|
+
}
|
|
3248
|
+
const dim = Dimensions.cover(dimImage, dimEl);
|
|
3249
|
+
for (const prop2 of bgProps) {
|
|
3250
|
+
const attr = prop2 === "bgy" ? "height" : "width";
|
|
3251
|
+
const overflow = dim[attr] - dimEl[attr];
|
|
3252
|
+
positions[prop2] = `max(${getBackgroundPos(el, prop2)},-${overflow}px) + ${positions[prop2]}`;
|
|
3253
|
+
}
|
|
3254
|
+
const fn = setBackgroundPosFn(bgProps, positions, props2);
|
|
3255
|
+
return (css2, percent) => {
|
|
3256
|
+
fn(css2, percent);
|
|
3257
|
+
css2.backgroundSize = `${dim.width}px ${dim.height}px`;
|
|
3258
|
+
css2.backgroundRepeat = "no-repeat";
|
|
3259
|
+
};
|
|
3260
|
+
}
|
|
3261
|
+
function getBackgroundPos(el, prop) {
|
|
3262
|
+
return getCssValue(el, `background-position-${prop.slice(-1)}`, "");
|
|
3263
|
+
}
|
|
3264
|
+
function setBackgroundPosFn(bgProps, positions, props2) {
|
|
3265
|
+
return function(css2, percent) {
|
|
3266
|
+
for (const prop of bgProps) {
|
|
3267
|
+
const value = getValue(props2[prop], percent);
|
|
3268
|
+
css2[`background-position-${prop.slice(-1)}`] = `calc(${positions[prop]} + ${value}px)`;
|
|
3269
|
+
}
|
|
3270
|
+
};
|
|
3271
|
+
}
|
|
3272
|
+
const loading = {};
|
|
3273
|
+
const dimensions = {};
|
|
3274
|
+
function getBackgroundImageDimensions(el) {
|
|
3275
|
+
const src = css(el, "backgroundImage").replace(/^none|url\(["']?(.+?)["']?\)$/, "$1");
|
|
3276
|
+
if (dimensions[src]) {
|
|
3277
|
+
return dimensions[src];
|
|
3278
|
+
}
|
|
3279
|
+
const image = new Image();
|
|
3280
|
+
if (src) {
|
|
3281
|
+
image.src = src;
|
|
3282
|
+
if (!image.naturalWidth && !loading[src]) {
|
|
3283
|
+
once(image, "error load", () => {
|
|
3284
|
+
dimensions[src] = toDimensions(image);
|
|
3285
|
+
trigger(el, createEvent("load", false));
|
|
3286
|
+
});
|
|
3287
|
+
loading[src] = true;
|
|
3288
|
+
return toDimensions(image);
|
|
3289
|
+
}
|
|
3290
|
+
}
|
|
3291
|
+
return dimensions[src] = toDimensions(image);
|
|
3292
|
+
}
|
|
3293
|
+
function toDimensions(image) {
|
|
3294
|
+
return {
|
|
3295
|
+
width: image.naturalWidth,
|
|
3296
|
+
height: image.naturalHeight
|
|
3297
|
+
};
|
|
3298
|
+
}
|
|
3299
|
+
function parseStops(stops, fn = toFloat) {
|
|
3300
|
+
const result = [];
|
|
3301
|
+
const { length } = stops;
|
|
3302
|
+
let nullIndex = 0;
|
|
3303
|
+
for (let i = 0; i < length; i++) {
|
|
3304
|
+
let [value, percent] = isString(stops[i]) ? stops[i].trim().split(/ (?![^(]*\))/) : [stops[i]];
|
|
3305
|
+
value = fn(value);
|
|
3306
|
+
percent = percent ? toFloat(percent) / 100 : null;
|
|
3307
|
+
if (i === 0) {
|
|
3308
|
+
if (percent === null) {
|
|
3309
|
+
percent = 0;
|
|
3310
|
+
} else if (percent) {
|
|
3311
|
+
result.push([value, 0]);
|
|
3312
|
+
}
|
|
3313
|
+
} else if (i === length - 1) {
|
|
3314
|
+
if (percent === null) {
|
|
3315
|
+
percent = 1;
|
|
3316
|
+
} else if (percent !== 1) {
|
|
3317
|
+
result.push([value, percent]);
|
|
3318
|
+
percent = 1;
|
|
3319
|
+
}
|
|
3320
|
+
}
|
|
3321
|
+
result.push([value, percent]);
|
|
3322
|
+
if (percent === null) {
|
|
3323
|
+
nullIndex++;
|
|
3324
|
+
} else if (nullIndex) {
|
|
3325
|
+
const leftPercent = result[i - nullIndex - 1][1];
|
|
3326
|
+
const p = (percent - leftPercent) / (nullIndex + 1);
|
|
3327
|
+
for (let j = nullIndex; j > 0; j--) {
|
|
3328
|
+
result[i - j][1] = leftPercent + p * (nullIndex - j + 1);
|
|
3329
|
+
}
|
|
3330
|
+
nullIndex = 0;
|
|
3331
|
+
}
|
|
3332
|
+
}
|
|
3333
|
+
return result;
|
|
3334
|
+
}
|
|
3335
|
+
function getStop(stops, percent) {
|
|
3336
|
+
const index = findIndex(stops.slice(1), ([, targetPercent]) => percent <= targetPercent) + 1;
|
|
3337
|
+
return [
|
|
3338
|
+
stops[index - 1][0],
|
|
3339
|
+
stops[index][0],
|
|
3340
|
+
(percent - stops[index - 1][1]) / (stops[index][1] - stops[index - 1][1])
|
|
3341
|
+
];
|
|
3342
|
+
}
|
|
3343
|
+
function getValue(stops, percent) {
|
|
3344
|
+
const [start, end, p] = getStop(stops, percent);
|
|
3345
|
+
return start + (end - start) * p;
|
|
3346
|
+
}
|
|
3347
|
+
const unitRe = /^-?\d+(?:\.\d+)?(\S+)?/;
|
|
3348
|
+
function getUnit(stops, defaultUnit) {
|
|
3349
|
+
var _a;
|
|
3350
|
+
for (const stop of stops) {
|
|
3351
|
+
const match = (_a = stop.match) == null ? void 0 : _a.call(stop, unitRe);
|
|
3352
|
+
if (match) {
|
|
3353
|
+
return match[1];
|
|
3354
|
+
}
|
|
3355
|
+
}
|
|
3356
|
+
return defaultUnit;
|
|
3357
|
+
}
|
|
3358
|
+
function getCssValue(el, prop, value) {
|
|
3359
|
+
const prev = el.style[prop];
|
|
3360
|
+
const val = css(css(el, prop, value), prop);
|
|
3361
|
+
el.style[prop] = prev;
|
|
3362
|
+
return val;
|
|
3363
|
+
}
|
|
3364
|
+
function fillObject(keys2, value) {
|
|
3365
|
+
return Object.fromEntries(keys2.map((prop) => [prop, value]));
|
|
3366
|
+
}
|
|
3367
|
+
function ease(percent, easing) {
|
|
3368
|
+
return easing >= 0 ? Math.pow(percent, easing + 1) : 1 - Math.pow(1 - percent, 1 - easing);
|
|
3369
|
+
}
|
|
3370
|
+
|
|
3371
|
+
var ScrollDriven = {
|
|
3372
|
+
props: {
|
|
3373
|
+
parallaxTarget: Boolean,
|
|
3374
|
+
parallaxStart: String,
|
|
3375
|
+
parallaxEnd: String,
|
|
3376
|
+
parallaxEasing: Number
|
|
3377
|
+
},
|
|
3378
|
+
data: {
|
|
3379
|
+
parallaxTarget: false,
|
|
3380
|
+
parallaxStart: 0,
|
|
3381
|
+
parallaxEnd: 0,
|
|
3382
|
+
parallaxEasing: 0
|
|
3383
|
+
},
|
|
3384
|
+
observe: [
|
|
3385
|
+
resize({
|
|
3386
|
+
target: ({ $el, parallaxTarget }) => [$el, parallaxTarget],
|
|
3387
|
+
filter: ({ parallax }) => parallax
|
|
3388
|
+
}),
|
|
3389
|
+
scroll$1({ filter: ({ parallax }) => parallax })
|
|
3390
|
+
],
|
|
3391
|
+
computed: {
|
|
3392
|
+
parallaxTargetFallback: ($props, $el) => $el,
|
|
3393
|
+
parallaxTarget({ parallaxTarget }, $el) {
|
|
3394
|
+
return parallaxTarget && query(parallaxTarget, $el) || this.parallaxTargetFallback;
|
|
3395
|
+
}
|
|
3396
|
+
},
|
|
3397
|
+
update: {
|
|
3398
|
+
read() {
|
|
3399
|
+
if (!this.parallax) {
|
|
3400
|
+
return;
|
|
3401
|
+
}
|
|
3402
|
+
const target = this.parallaxTarget;
|
|
3403
|
+
if (!target) {
|
|
3404
|
+
return;
|
|
3405
|
+
}
|
|
3406
|
+
const start = toPx(this.parallaxStart, "height", target, true);
|
|
3407
|
+
const end = toPx(this.parallaxEnd, "height", target, true);
|
|
3408
|
+
const percent = ease(scrolledOver(target, start, end), this.parallaxEasing);
|
|
3409
|
+
return { percent };
|
|
3410
|
+
},
|
|
3411
|
+
events: ["scroll", "resize"]
|
|
3412
|
+
}
|
|
3413
|
+
};
|
|
3414
|
+
|
|
3415
|
+
const loopKey = /* @__PURE__ */ Symbol();
|
|
2963
3416
|
var Video = {
|
|
3417
|
+
mixins: [Media, ScrollDriven],
|
|
2964
3418
|
args: "autoplay",
|
|
2965
3419
|
props: {
|
|
2966
3420
|
automute: Boolean,
|
|
2967
3421
|
autoplay: Boolean,
|
|
2968
3422
|
restart: Boolean,
|
|
2969
|
-
|
|
3423
|
+
inviewMargin: String,
|
|
3424
|
+
inviewQueued: Number,
|
|
3425
|
+
hoverTarget: Boolean,
|
|
3426
|
+
hoverRewind: Number,
|
|
3427
|
+
reducedMotionTime: Number
|
|
2970
3428
|
},
|
|
2971
3429
|
data: {
|
|
2972
3430
|
automute: false,
|
|
2973
3431
|
autoplay: true,
|
|
2974
3432
|
restart: false,
|
|
2975
|
-
|
|
3433
|
+
inviewMargin: "0px",
|
|
3434
|
+
inviewQueued: 0,
|
|
3435
|
+
hoverTarget: false,
|
|
3436
|
+
hoverRewind: 0,
|
|
3437
|
+
reducedMotionTime: 0,
|
|
3438
|
+
media: "(prefers-reduced-motion: reduce)"
|
|
2976
3439
|
},
|
|
2977
3440
|
beforeConnect() {
|
|
2978
|
-
const isVideo = isTag(this.$el, "video");
|
|
2979
|
-
|
|
3441
|
+
const isVideo = this.isVideo = isTag(this.$el, "video");
|
|
3442
|
+
this.interactionDriven = ["hover", "parallax"].includes(this.autoplay);
|
|
3443
|
+
if (this.interactionDriven && !isVideo) {
|
|
3444
|
+
this.interactionDriven = this.autoplay = false;
|
|
3445
|
+
}
|
|
3446
|
+
this.restart = isVideo && this.restart;
|
|
3447
|
+
this.parallax = this.autoplay === "parallax";
|
|
3448
|
+
this.inviewQueued = isVideo && this.autoplay === "inview" && this.inviewQueued;
|
|
3449
|
+
if (this.inviewQueued) {
|
|
3450
|
+
this.$el[loopKey] = this.$el.loop;
|
|
3451
|
+
this.$el.loop = false;
|
|
3452
|
+
}
|
|
3453
|
+
if (["hover", "inview"].includes(this.autoplay) && isVideo && !hasAttr(this.$el, "preload")) {
|
|
2980
3454
|
this.$el.preload = "none";
|
|
2981
3455
|
}
|
|
2982
3456
|
if (!isVideo && !hasAttr(this.$el, "allow")) {
|
|
2983
3457
|
this.$el.allow = "autoplay";
|
|
2984
3458
|
}
|
|
2985
3459
|
if (this.autoplay === "hover") {
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
this.autoplay = true;
|
|
3460
|
+
this.hoverTarget = query(this.hoverTarget, this.$el) || this.$el;
|
|
3461
|
+
if (!isFocusable(this.hoverTarget)) {
|
|
3462
|
+
this.hoverTarget.tabIndex = 0;
|
|
2990
3463
|
}
|
|
2991
3464
|
}
|
|
2992
3465
|
if (this.automute || hasAttr(this.$el, "muted")) {
|
|
2993
3466
|
mute(this.$el);
|
|
2994
3467
|
}
|
|
2995
3468
|
},
|
|
3469
|
+
connected() {
|
|
3470
|
+
if (!this.$el.controls && !this.$el.poster && (this.interactionDriven || this.inviewQueued)) {
|
|
3471
|
+
this.cancelPreview = preview(this.$el);
|
|
3472
|
+
}
|
|
3473
|
+
},
|
|
3474
|
+
disconnected() {
|
|
3475
|
+
var _a, _b;
|
|
3476
|
+
(_a = this._reverseAbort) == null ? void 0 : _a.abort();
|
|
3477
|
+
(_b = this.cancelPreview) == null ? void 0 : _b.call(this);
|
|
3478
|
+
this.cancelPreview = null;
|
|
3479
|
+
if (this.$el[loopKey]) {
|
|
3480
|
+
this.$el.loop = true;
|
|
3481
|
+
}
|
|
3482
|
+
queue.delete(this.$el);
|
|
3483
|
+
},
|
|
2996
3484
|
events: [
|
|
2997
3485
|
{
|
|
2998
3486
|
name: `${pointerEnter} focusin`,
|
|
2999
|
-
el: ({ hoverTarget
|
|
3487
|
+
el: ({ hoverTarget }) => hoverTarget,
|
|
3000
3488
|
filter: ({ autoplay }) => autoplay === "hover",
|
|
3001
3489
|
handler(e) {
|
|
3490
|
+
var _a;
|
|
3491
|
+
(_a = this._reverseAbort) == null ? void 0 : _a.abort();
|
|
3002
3492
|
if (!isTouch(e) || !isPlaying(this.$el)) {
|
|
3003
|
-
play(
|
|
3493
|
+
this.play();
|
|
3004
3494
|
} else {
|
|
3005
|
-
|
|
3495
|
+
this.pause();
|
|
3006
3496
|
}
|
|
3007
3497
|
}
|
|
3008
3498
|
},
|
|
3009
3499
|
{
|
|
3010
3500
|
name: `${pointerLeave} focusout`,
|
|
3011
|
-
el: ({ hoverTarget
|
|
3501
|
+
el: ({ hoverTarget }) => hoverTarget,
|
|
3012
3502
|
filter: ({ autoplay }) => autoplay === "hover",
|
|
3013
3503
|
handler(e) {
|
|
3014
|
-
|
|
3015
|
-
|
|
3504
|
+
var _a;
|
|
3505
|
+
if (!isTouch(e) && !this.matchMedia) {
|
|
3506
|
+
(_a = this._reverseAbort) == null ? void 0 : _a.abort();
|
|
3507
|
+
this.pause();
|
|
3508
|
+
this._reverseAbort = playReverse(this.$el, this.hoverRewind);
|
|
3509
|
+
}
|
|
3510
|
+
}
|
|
3511
|
+
},
|
|
3512
|
+
{
|
|
3513
|
+
name: "loadedmetadata durationchange",
|
|
3514
|
+
filter: ({ parallax }) => parallax,
|
|
3515
|
+
handler() {
|
|
3516
|
+
this.$emit("resize");
|
|
3517
|
+
}
|
|
3518
|
+
},
|
|
3519
|
+
{
|
|
3520
|
+
name: "error pause ended",
|
|
3521
|
+
filter: ({ inviewQueued }) => inviewQueued,
|
|
3522
|
+
handler(e) {
|
|
3523
|
+
if (e.type === "error" || e.type === "ended" && !this.$el[loopKey]) {
|
|
3524
|
+
queue.delete(this.$el);
|
|
3016
3525
|
}
|
|
3526
|
+
playNextQueued();
|
|
3017
3527
|
}
|
|
3018
3528
|
}
|
|
3019
3529
|
],
|
|
@@ -3026,33 +3536,144 @@
|
|
|
3026
3536
|
}
|
|
3027
3537
|
}),
|
|
3028
3538
|
intersection({
|
|
3029
|
-
filter: ({ $el,
|
|
3030
|
-
handler([{ isIntersecting
|
|
3539
|
+
filter: ({ $el, interactionDriven }) => !interactionDriven && $el.preload !== "none",
|
|
3540
|
+
handler([{ isIntersecting }]) {
|
|
3031
3541
|
if (!document.fullscreenElement) {
|
|
3032
3542
|
if (isIntersecting) {
|
|
3033
3543
|
if (this.autoplay) {
|
|
3034
|
-
play(
|
|
3544
|
+
this.play();
|
|
3035
3545
|
}
|
|
3036
3546
|
} else {
|
|
3037
|
-
|
|
3547
|
+
this.pause();
|
|
3038
3548
|
}
|
|
3039
3549
|
}
|
|
3040
3550
|
},
|
|
3041
3551
|
args: { intersecting: false },
|
|
3042
|
-
options: ({ $el, autoplay }) => ({
|
|
3043
|
-
root: autoplay === "inview" ? null : parent($el).closest(":not(a)")
|
|
3552
|
+
options: ({ $el, autoplay, inviewMargin }) => ({
|
|
3553
|
+
root: autoplay === "inview" ? null : parent($el).closest(":not(a)"),
|
|
3554
|
+
rootMargin: autoplay === "inview" ? inviewMargin : "0px"
|
|
3044
3555
|
})
|
|
3045
3556
|
})
|
|
3046
|
-
]
|
|
3557
|
+
],
|
|
3558
|
+
update: {
|
|
3559
|
+
write({ percent }) {
|
|
3560
|
+
if (!this.parallax) {
|
|
3561
|
+
return;
|
|
3562
|
+
}
|
|
3563
|
+
const { duration, seeking } = this.$el;
|
|
3564
|
+
if (!isNaN(duration) && !seeking) {
|
|
3565
|
+
const value = this.matchMedia ? this.reducedMotionTime : percent * duration;
|
|
3566
|
+
setCurrentTime(this.$el, value);
|
|
3567
|
+
}
|
|
3568
|
+
},
|
|
3569
|
+
events: ["scroll", "resize"]
|
|
3570
|
+
},
|
|
3571
|
+
methods: {
|
|
3572
|
+
play() {
|
|
3573
|
+
var _a;
|
|
3574
|
+
if (this.matchMedia) {
|
|
3575
|
+
this.pause();
|
|
3576
|
+
if (this.isVideo) {
|
|
3577
|
+
setCurrentTime(this.$el, this.reducedMotionTime);
|
|
3578
|
+
}
|
|
3579
|
+
} else if (this.inviewQueued) {
|
|
3580
|
+
queue.set(this.$el, this.inviewQueued);
|
|
3581
|
+
playNextQueued();
|
|
3582
|
+
} else {
|
|
3583
|
+
(_a = this.cancelPreview) == null ? void 0 : _a.call(this);
|
|
3584
|
+
play(this.$el);
|
|
3585
|
+
}
|
|
3586
|
+
},
|
|
3587
|
+
pause() {
|
|
3588
|
+
pause(this.$el);
|
|
3589
|
+
queue.delete(this.$el);
|
|
3590
|
+
if (this.restart) {
|
|
3591
|
+
setCurrentTime(this.$el, 0);
|
|
3592
|
+
}
|
|
3593
|
+
}
|
|
3594
|
+
}
|
|
3047
3595
|
};
|
|
3596
|
+
function setCurrentTime(videoEl, time) {
|
|
3597
|
+
if (videoEl.currentTime !== time) {
|
|
3598
|
+
videoEl.currentTime = time;
|
|
3599
|
+
}
|
|
3600
|
+
}
|
|
3048
3601
|
function isPlaying(videoEl) {
|
|
3049
3602
|
return !videoEl.paused && !videoEl.ended;
|
|
3050
3603
|
}
|
|
3051
|
-
function
|
|
3052
|
-
|
|
3053
|
-
|
|
3054
|
-
|
|
3604
|
+
function preview($el) {
|
|
3605
|
+
if (!$el.requestVideoFrameCallback) {
|
|
3606
|
+
return;
|
|
3607
|
+
}
|
|
3608
|
+
let frame2;
|
|
3609
|
+
const pausePreview = () => {
|
|
3610
|
+
disconnect();
|
|
3611
|
+
pause($el);
|
|
3612
|
+
};
|
|
3613
|
+
const observer = observeIntersection($el, () => {
|
|
3614
|
+
observer.disconnect();
|
|
3615
|
+
frame2 = $el.requestVideoFrameCallback(pausePreview);
|
|
3616
|
+
play($el);
|
|
3617
|
+
});
|
|
3618
|
+
const disconnect = () => {
|
|
3619
|
+
observer.disconnect();
|
|
3620
|
+
$el.cancelVideoFrameCallback(frame2);
|
|
3621
|
+
};
|
|
3622
|
+
return disconnect;
|
|
3623
|
+
}
|
|
3624
|
+
const queue = /* @__PURE__ */ new Map();
|
|
3625
|
+
const played = /* @__PURE__ */ new WeakMap();
|
|
3626
|
+
let frame;
|
|
3627
|
+
function playNextQueued() {
|
|
3628
|
+
cancelAnimationFrame(frame);
|
|
3629
|
+
frame = requestAnimationFrame(() => {
|
|
3630
|
+
const getPlayed = (el) => {
|
|
3631
|
+
var _a;
|
|
3632
|
+
return (_a = played.get(el)) != null ? _a : 0;
|
|
3633
|
+
};
|
|
3634
|
+
const videos = shuffle(queue.keys()).sort((a, b) => getPlayed(a) - getPlayed(b));
|
|
3635
|
+
let active = videos.filter(isPlaying).length;
|
|
3636
|
+
for (const el of videos) {
|
|
3637
|
+
const maxQueued = queue.get(el);
|
|
3638
|
+
if (isPlaying(el) || active / queue.size >= maxQueued) {
|
|
3639
|
+
continue;
|
|
3640
|
+
}
|
|
3641
|
+
played.set(el, getPlayed(el) + 1);
|
|
3642
|
+
play(el);
|
|
3643
|
+
active++;
|
|
3644
|
+
}
|
|
3645
|
+
});
|
|
3646
|
+
}
|
|
3647
|
+
function shuffle(array) {
|
|
3648
|
+
array = [...array];
|
|
3649
|
+
for (let i = array.length - 1; i > 0; i--) {
|
|
3650
|
+
let j = Math.floor(Math.random() * (i + 1));
|
|
3651
|
+
[array[i], array[j]] = [array[j], array[i]];
|
|
3055
3652
|
}
|
|
3653
|
+
return array;
|
|
3654
|
+
}
|
|
3655
|
+
function playReverse(el, playbackRate) {
|
|
3656
|
+
const start = el.currentTime;
|
|
3657
|
+
if (isNaN(start) || !playbackRate) {
|
|
3658
|
+
return;
|
|
3659
|
+
}
|
|
3660
|
+
playbackRate *= Math.max(1, start / 10 + 0.5);
|
|
3661
|
+
const controller = new AbortController();
|
|
3662
|
+
const time = Date.now();
|
|
3663
|
+
(function next() {
|
|
3664
|
+
requestAnimationFrame(() => {
|
|
3665
|
+
if (controller.signal.aborted) {
|
|
3666
|
+
return;
|
|
3667
|
+
}
|
|
3668
|
+
if (!el.seeking) {
|
|
3669
|
+
el.currentTime = Math.max(0, start - (Date.now() - time) * playbackRate / 1e3);
|
|
3670
|
+
}
|
|
3671
|
+
if (el.currentTime > 0) {
|
|
3672
|
+
next();
|
|
3673
|
+
}
|
|
3674
|
+
});
|
|
3675
|
+
})();
|
|
3676
|
+
return controller;
|
|
3056
3677
|
}
|
|
3057
3678
|
|
|
3058
3679
|
var cover = {
|
|
@@ -3128,7 +3749,7 @@
|
|
|
3128
3749
|
inset: false
|
|
3129
3750
|
},
|
|
3130
3751
|
connected() {
|
|
3131
|
-
this.pos = this.$props.pos.split("-")
|
|
3752
|
+
this.pos = [...this.$props.pos.split("-"), "center"].slice(0, 2);
|
|
3132
3753
|
[this.dir, this.align] = this.pos;
|
|
3133
3754
|
this.axis = includes(["top", "bottom"], this.dir) ? "y" : "x";
|
|
3134
3755
|
},
|
|
@@ -3148,7 +3769,7 @@
|
|
|
3148
3769
|
placement.reverse();
|
|
3149
3770
|
}
|
|
3150
3771
|
const restoreScrollPosition = storeScrollPosition(element);
|
|
3151
|
-
const elDim = dimensions(element);
|
|
3772
|
+
const elDim = dimensions$1(element);
|
|
3152
3773
|
css(element, { top: -elDim.height, left: -elDim.width });
|
|
3153
3774
|
positionAt(element, target, {
|
|
3154
3775
|
attach,
|
|
@@ -3515,6 +4136,7 @@
|
|
|
3515
4136
|
css(this.$el, this._style);
|
|
3516
4137
|
this.$el.hidden = true;
|
|
3517
4138
|
const viewports = this.target.map((target) => getViewport$1(this.$el, target));
|
|
4139
|
+
const boundaryOffsets = this.boundary.map((el) => offset(el));
|
|
3518
4140
|
const viewportOffset = this.getViewportOffset(this.$el);
|
|
3519
4141
|
const dirs = [
|
|
3520
4142
|
[0, ["x", "width", "left", "right"]],
|
|
@@ -3524,7 +4146,7 @@
|
|
|
3524
4146
|
if (this.axis !== axis && includes([axis, true], this.stretch)) {
|
|
3525
4147
|
css(this.$el, {
|
|
3526
4148
|
[prop]: Math.min(
|
|
3527
|
-
|
|
4149
|
+
boundaryOffsets[i][prop],
|
|
3528
4150
|
viewports[i][prop] - 2 * viewportOffset
|
|
3529
4151
|
),
|
|
3530
4152
|
[`overflow-${axis}`]: "auto"
|
|
@@ -3546,10 +4168,10 @@
|
|
|
3546
4168
|
const elOffset = offset(this.$el);
|
|
3547
4169
|
css(this.$el, {
|
|
3548
4170
|
[prop]: (targetOffset[start] > elOffset[start] ? targetOffset[this.inset ? end : start] - Math.max(
|
|
3549
|
-
|
|
4171
|
+
boundaryOffsets[i][start],
|
|
3550
4172
|
viewports[i][start] + viewportOffset
|
|
3551
4173
|
) : Math.min(
|
|
3552
|
-
|
|
4174
|
+
boundaryOffsets[i][end],
|
|
3553
4175
|
viewports[i][end] - viewportOffset
|
|
3554
4176
|
) - targetOffset[this.inset ? start : end]) - positionOffset,
|
|
3555
4177
|
[`overflow-${axis}`]: "auto"
|
|
@@ -3805,7 +4427,9 @@
|
|
|
3805
4427
|
const drop = this.getDropdown(target);
|
|
3806
4428
|
const adjustHeight = () => {
|
|
3807
4429
|
const maxBottom = Math.max(
|
|
3808
|
-
...parents(target, `.${this.clsDrop}`)
|
|
4430
|
+
...[...parents(target, `.${this.clsDrop}`), target].map(
|
|
4431
|
+
(el) => offset(el).bottom
|
|
4432
|
+
)
|
|
3809
4433
|
);
|
|
3810
4434
|
offset(this.dropbar, {
|
|
3811
4435
|
left: offset(this.dropbar).left,
|
|
@@ -3855,7 +4479,7 @@
|
|
|
3855
4479
|
},
|
|
3856
4480
|
async transitionTo(newHeight, el) {
|
|
3857
4481
|
const { dropbar } = this;
|
|
3858
|
-
const oldHeight = height(dropbar);
|
|
4482
|
+
const oldHeight = height$1(dropbar);
|
|
3859
4483
|
el = oldHeight < newHeight && el;
|
|
3860
4484
|
await Transition.cancel([el, dropbar]);
|
|
3861
4485
|
if (el) {
|
|
@@ -3865,7 +4489,7 @@
|
|
|
3865
4489
|
}
|
|
3866
4490
|
}
|
|
3867
4491
|
css(el, "clipPath", `polygon(0 0,100% 0,100% ${oldHeight}px,0 ${oldHeight}px)`);
|
|
3868
|
-
height(dropbar, oldHeight);
|
|
4492
|
+
height$1(dropbar, oldHeight);
|
|
3869
4493
|
await Promise.all([
|
|
3870
4494
|
Transition.start(dropbar, { height: newHeight }, this.duration),
|
|
3871
4495
|
Transition.start(
|
|
@@ -3976,10 +4600,12 @@
|
|
|
3976
4600
|
var Margin = {
|
|
3977
4601
|
props: {
|
|
3978
4602
|
margin: String,
|
|
4603
|
+
firstRow: Boolean,
|
|
3979
4604
|
firstColumn: Boolean
|
|
3980
4605
|
},
|
|
3981
4606
|
data: {
|
|
3982
4607
|
margin: "uk-margin-small-top",
|
|
4608
|
+
firstRow: false,
|
|
3983
4609
|
firstColumn: "uk-first-column"
|
|
3984
4610
|
},
|
|
3985
4611
|
observe: [
|
|
@@ -4019,6 +4645,7 @@
|
|
|
4019
4645
|
for (const row of rows) {
|
|
4020
4646
|
for (const el of row) {
|
|
4021
4647
|
toggleClass(el, this.margin, rows[0] !== row);
|
|
4648
|
+
toggleClass(el, this.firstRow, rows[0] === row);
|
|
4022
4649
|
toggleClass(el, this.firstColumn, row[isRtl ? row.length - 1 : 0] === el);
|
|
4023
4650
|
}
|
|
4024
4651
|
}
|
|
@@ -4090,7 +4717,8 @@
|
|
|
4090
4717
|
parallaxJustify: Boolean
|
|
4091
4718
|
},
|
|
4092
4719
|
data: {
|
|
4093
|
-
margin: "
|
|
4720
|
+
margin: "",
|
|
4721
|
+
firstRow: "uk-first-row",
|
|
4094
4722
|
clsStack: "uk-grid-stack",
|
|
4095
4723
|
masonry: false,
|
|
4096
4724
|
parallax: 0,
|
|
@@ -4112,14 +4740,14 @@
|
|
|
4112
4740
|
{
|
|
4113
4741
|
read(data) {
|
|
4114
4742
|
const { rows } = data;
|
|
4115
|
-
let { masonry, parallax, parallaxJustify
|
|
4743
|
+
let { masonry, parallax, parallaxJustify } = this;
|
|
4116
4744
|
parallax = Math.max(0, toPx(parallax));
|
|
4117
4745
|
if (!(masonry || parallax || parallaxJustify) || positionedAbsolute(rows) || rows[0].some(
|
|
4118
4746
|
(el, i) => rows.some((row) => row[i] && row[i].offsetWidth !== el.offsetWidth)
|
|
4119
4747
|
)) {
|
|
4120
4748
|
return data.translates = data.scrollColumns = false;
|
|
4121
4749
|
}
|
|
4122
|
-
let gutter =
|
|
4750
|
+
let gutter = toFloat(css(this.$el, "row-gap"));
|
|
4123
4751
|
let columns;
|
|
4124
4752
|
let translates;
|
|
4125
4753
|
if (masonry) {
|
|
@@ -4212,10 +4840,6 @@
|
|
|
4212
4840
|
}
|
|
4213
4841
|
return [columns, translates];
|
|
4214
4842
|
}
|
|
4215
|
-
function getGutter(rows, cls) {
|
|
4216
|
-
const node = rows.flat().find((el) => hasClass(el, cls));
|
|
4217
|
-
return toFloat(node ? css(node, "marginTop") : css(rows[0][0], "paddingLeft"));
|
|
4218
|
-
}
|
|
4219
4843
|
function transpose(rows) {
|
|
4220
4844
|
const columns = [];
|
|
4221
4845
|
for (const row of rows) {
|
|
@@ -4287,7 +4911,7 @@
|
|
|
4287
4911
|
css(element, "display", "block", "important");
|
|
4288
4912
|
}
|
|
4289
4913
|
css(element, "minHeight", "");
|
|
4290
|
-
const height = dimensions(element).height - boxModelAdjust(element, "height", "content-box");
|
|
4914
|
+
const height = dimensions$1(element).height - boxModelAdjust(element, "height", "content-box");
|
|
4291
4915
|
css(element, style);
|
|
4292
4916
|
return height;
|
|
4293
4917
|
}
|
|
@@ -4318,45 +4942,6 @@
|
|
|
4318
4942
|
}
|
|
4319
4943
|
};
|
|
4320
4944
|
|
|
4321
|
-
var Media = {
|
|
4322
|
-
props: {
|
|
4323
|
-
media: Boolean
|
|
4324
|
-
},
|
|
4325
|
-
data: {
|
|
4326
|
-
media: false
|
|
4327
|
-
},
|
|
4328
|
-
connected() {
|
|
4329
|
-
const media = toMedia(this.media, this.$el);
|
|
4330
|
-
this.matchMedia = true;
|
|
4331
|
-
if (media) {
|
|
4332
|
-
this.mediaObj = window.matchMedia(media);
|
|
4333
|
-
const handler = () => {
|
|
4334
|
-
this.matchMedia = this.mediaObj.matches;
|
|
4335
|
-
trigger(this.$el, createEvent("mediachange", false, true, [this.mediaObj]));
|
|
4336
|
-
};
|
|
4337
|
-
this.offMediaObj = on(this.mediaObj, "change", () => {
|
|
4338
|
-
handler();
|
|
4339
|
-
this.$emit("resize");
|
|
4340
|
-
});
|
|
4341
|
-
handler();
|
|
4342
|
-
}
|
|
4343
|
-
},
|
|
4344
|
-
disconnected() {
|
|
4345
|
-
var _a;
|
|
4346
|
-
(_a = this.offMediaObj) == null ? void 0 : _a.call(this);
|
|
4347
|
-
}
|
|
4348
|
-
};
|
|
4349
|
-
function toMedia(value, element) {
|
|
4350
|
-
if (isString(value)) {
|
|
4351
|
-
if (startsWith(value, "@")) {
|
|
4352
|
-
value = toFloat(css(element, `--uk-breakpoint-${value.slice(1)}`));
|
|
4353
|
-
} else if (isNaN(value)) {
|
|
4354
|
-
return value;
|
|
4355
|
-
}
|
|
4356
|
-
}
|
|
4357
|
-
return value && isNumeric(value) ? `(min-width: ${value}px)` : "";
|
|
4358
|
-
}
|
|
4359
|
-
|
|
4360
4945
|
var heightViewport = {
|
|
4361
4946
|
mixins: [Media],
|
|
4362
4947
|
props: {
|
|
@@ -4395,7 +4980,7 @@
|
|
|
4395
4980
|
const isScrollingElement = scrollingElement === scrollElement || body === scrollElement;
|
|
4396
4981
|
let minHeight = `calc(${isScrollingElement ? "100vh" : `${viewportHeight}px`}`;
|
|
4397
4982
|
if (this.expand) {
|
|
4398
|
-
const diff = dimensions(scrollElement).height - dimensions(this.$el).height;
|
|
4983
|
+
const diff = dimensions$1(scrollElement).height - dimensions$1(this.$el).height;
|
|
4399
4984
|
minHeight += ` - ${diff}px`;
|
|
4400
4985
|
} else {
|
|
4401
4986
|
if (this.offsetTop) {
|
|
@@ -4408,13 +4993,13 @@
|
|
|
4408
4993
|
}
|
|
4409
4994
|
}
|
|
4410
4995
|
if (this.offsetBottom === true) {
|
|
4411
|
-
minHeight += ` - ${dimensions(this.$el.nextElementSibling).height}px`;
|
|
4996
|
+
minHeight += ` - ${dimensions$1(this.$el.nextElementSibling).height}px`;
|
|
4412
4997
|
} else if (isNumeric(this.offsetBottom)) {
|
|
4413
4998
|
minHeight += ` - ${this.offsetBottom}vh`;
|
|
4414
4999
|
} else if (this.offsetBottom && endsWith(this.offsetBottom, "px")) {
|
|
4415
5000
|
minHeight += ` - ${toFloat(this.offsetBottom)}px`;
|
|
4416
5001
|
} else if (isString(this.offsetBottom)) {
|
|
4417
|
-
minHeight += ` - ${dimensions(query(this.offsetBottom, this.$el)).height}px`;
|
|
5002
|
+
minHeight += ` - ${dimensions$1(query(this.offsetBottom, this.$el)).height}px`;
|
|
4418
5003
|
}
|
|
4419
5004
|
}
|
|
4420
5005
|
minHeight += `${box ? ` - ${box}px` : ""})`;
|
|
@@ -4962,8 +5547,8 @@
|
|
|
4962
5547
|
}
|
|
4963
5548
|
};
|
|
4964
5549
|
function findTargetColor(target) {
|
|
4965
|
-
const dim = dimensions(target);
|
|
4966
|
-
const viewport = dimensions(window);
|
|
5550
|
+
const dim = dimensions$1(target);
|
|
5551
|
+
const viewport = dimensions$1(window);
|
|
4967
5552
|
if (!intersectRect(dim, viewport)) {
|
|
4968
5553
|
return false;
|
|
4969
5554
|
}
|
|
@@ -5227,7 +5812,7 @@
|
|
|
5227
5812
|
if (last(active) !== modal || modal.$el.contains(e.target)) {
|
|
5228
5813
|
return;
|
|
5229
5814
|
}
|
|
5230
|
-
const { left, top, width, height } = dimensions(e.target);
|
|
5815
|
+
const { left, top, width, height } = dimensions$1(e.target);
|
|
5231
5816
|
const topEl = document.elementFromPoint(left + width / 2, top + height / 2);
|
|
5232
5817
|
if (topEl && (e.target.contains(topEl) || topEl.contains(e.target))) {
|
|
5233
5818
|
return;
|
|
@@ -5281,7 +5866,7 @@
|
|
|
5281
5866
|
} else {
|
|
5282
5867
|
css(this.$el, "display", "block");
|
|
5283
5868
|
}
|
|
5284
|
-
height(this.$el);
|
|
5869
|
+
height$1(this.$el);
|
|
5285
5870
|
}
|
|
5286
5871
|
},
|
|
5287
5872
|
{
|
|
@@ -5518,7 +6103,7 @@
|
|
|
5518
6103
|
this.clsSidebarAnimation,
|
|
5519
6104
|
this.mode === "reveal" ? "" : this.clsMode
|
|
5520
6105
|
);
|
|
5521
|
-
height(body);
|
|
6106
|
+
height$1(body);
|
|
5522
6107
|
addClass(body, this.clsContainerAnimation);
|
|
5523
6108
|
this.clsContainerAnimation && suppressUserScale();
|
|
5524
6109
|
}
|
|
@@ -5594,7 +6179,7 @@
|
|
|
5594
6179
|
return {
|
|
5595
6180
|
max: Math.max(
|
|
5596
6181
|
this.minHeight,
|
|
5597
|
-
height(this.container) - (dimensions(this.content).height - height(this.$el))
|
|
6182
|
+
height(this.container) - (dimensions$1(this.content).height - height(this.$el))
|
|
5598
6183
|
)
|
|
5599
6184
|
};
|
|
5600
6185
|
},
|
|
@@ -5604,6 +6189,9 @@
|
|
|
5604
6189
|
events: ["resize"]
|
|
5605
6190
|
}
|
|
5606
6191
|
};
|
|
6192
|
+
function height(el) {
|
|
6193
|
+
return dimensions$1(el).height - boxModelAdjust(el, "height", css(el, "boxSizing"));
|
|
6194
|
+
}
|
|
5607
6195
|
|
|
5608
6196
|
var overflowFade = {
|
|
5609
6197
|
data: {
|
|
@@ -5917,7 +6505,7 @@
|
|
|
5917
6505
|
if (scrollTop >= max) {
|
|
5918
6506
|
active = length - 1;
|
|
5919
6507
|
} else {
|
|
5920
|
-
const offsetBy = this.offset + dimensions(getCoveringElement()).height + viewport.height * 0.1;
|
|
6508
|
+
const offsetBy = this.offset + dimensions$1(getCoveringElement()).height + viewport.height * 0.1;
|
|
5921
6509
|
for (let i = 0; i < targets.length; i++) {
|
|
5922
6510
|
if (offset(targets[i]).top - viewport.top - offsetBy > 0) {
|
|
5923
6511
|
break;
|
|
@@ -6036,12 +6624,12 @@
|
|
|
6036
6624
|
],
|
|
6037
6625
|
update: [
|
|
6038
6626
|
{
|
|
6039
|
-
read({ height
|
|
6627
|
+
read({ height, width, margin, sticky }, types) {
|
|
6040
6628
|
this.inactive = !this.matchMedia || !isVisible(this.$el) || !this.$el.offsetHeight;
|
|
6041
6629
|
if (this.inactive) {
|
|
6042
6630
|
return;
|
|
6043
6631
|
}
|
|
6044
|
-
const dynamicViewport = height(window);
|
|
6632
|
+
const dynamicViewport = height$1(window);
|
|
6045
6633
|
const maxScrollHeight = Math.max(
|
|
6046
6634
|
0,
|
|
6047
6635
|
document.scrollingElement.scrollHeight - dynamicViewport
|
|
@@ -6056,7 +6644,7 @@
|
|
|
6056
6644
|
this.hide();
|
|
6057
6645
|
}
|
|
6058
6646
|
if (!this.active) {
|
|
6059
|
-
({ height
|
|
6647
|
+
({ height, width } = dimensions$1(this.$el));
|
|
6060
6648
|
margin = css(this.$el, "margin");
|
|
6061
6649
|
}
|
|
6062
6650
|
if (hide) {
|
|
@@ -6064,25 +6652,25 @@
|
|
|
6064
6652
|
}
|
|
6065
6653
|
const viewport2 = toPx("100vh", "height");
|
|
6066
6654
|
let position = this.position;
|
|
6067
|
-
if (this.overflowFlip && height
|
|
6655
|
+
if (this.overflowFlip && height > viewport2) {
|
|
6068
6656
|
position = position === "top" ? "bottom" : "top";
|
|
6069
6657
|
}
|
|
6070
6658
|
const referenceElement = this.isFixed ? this.placeholder : this.$el;
|
|
6071
6659
|
let [offset$1, offsetEnd] = [this.offset, this.offsetEnd].map(
|
|
6072
6660
|
(value) => toPx(value, "height", sticky ? this.$el : referenceElement)
|
|
6073
6661
|
);
|
|
6074
|
-
if (position === "bottom" && (height
|
|
6075
|
-
offset$1 += dynamicViewport - height
|
|
6662
|
+
if (position === "bottom" && (height < dynamicViewport || this.overflowFlip)) {
|
|
6663
|
+
offset$1 += dynamicViewport - height;
|
|
6076
6664
|
}
|
|
6077
|
-
const elementBox = height
|
|
6665
|
+
const elementBox = height + offset$1 + offsetEnd;
|
|
6078
6666
|
const overflow = this.overflowFlip ? 0 : Math.max(0, elementBox - viewport2);
|
|
6079
6667
|
const topOffset = offset(referenceElement).top - // offset possible `transform: translateY` animation 'uk-animation-slide-top' while hiding
|
|
6080
6668
|
new DOMMatrix(css(referenceElement, "transform")).m42;
|
|
6081
|
-
const elHeight = dimensions(this.$el).height;
|
|
6669
|
+
const elHeight = dimensions$1(this.$el).height;
|
|
6082
6670
|
const start = (this.start === false ? topOffset : parseProp(this.start, this.$el, topOffset)) - offset$1;
|
|
6083
6671
|
const end = this.end === false ? maxScrollHeight : Math.min(
|
|
6084
6672
|
maxScrollHeight,
|
|
6085
|
-
parseProp(this.end, this.$el, topOffset + height
|
|
6673
|
+
parseProp(this.end, this.$el, topOffset + height, true) - elHeight - offset$1 + overflow
|
|
6086
6674
|
);
|
|
6087
6675
|
sticky = !this.showOnUp && start + offset$1 === topOffset && end === Math.min(
|
|
6088
6676
|
maxScrollHeight,
|
|
@@ -6093,7 +6681,7 @@
|
|
|
6093
6681
|
end,
|
|
6094
6682
|
offset: offset$1,
|
|
6095
6683
|
overflow,
|
|
6096
|
-
height
|
|
6684
|
+
height,
|
|
6097
6685
|
elHeight,
|
|
6098
6686
|
width,
|
|
6099
6687
|
margin,
|
|
@@ -6270,7 +6858,7 @@
|
|
|
6270
6858
|
if (!value) {
|
|
6271
6859
|
return 0;
|
|
6272
6860
|
}
|
|
6273
|
-
if (isNumeric(value) || isString(value) &&
|
|
6861
|
+
if (isNumeric(value) || isString(value) && /^-?\d/.test(value)) {
|
|
6274
6862
|
return propOffset + toPx(value, "height", el, true);
|
|
6275
6863
|
} else {
|
|
6276
6864
|
const refElement = value === true ? getVisibleParent(el) : query(value, el);
|
|
@@ -6304,15 +6892,6 @@
|
|
|
6304
6892
|
}
|
|
6305
6893
|
}
|
|
6306
6894
|
|
|
6307
|
-
function getMaxPathLength(el) {
|
|
6308
|
-
return isVisible(el) ? Math.ceil(
|
|
6309
|
-
Math.max(0, ...$$("[stroke]", el).map((stroke) => {
|
|
6310
|
-
var _a;
|
|
6311
|
-
return ((_a = stroke.getTotalLength) == null ? void 0 : _a.call(stroke)) || 0;
|
|
6312
|
-
}))
|
|
6313
|
-
) : 0;
|
|
6314
|
-
}
|
|
6315
|
-
|
|
6316
6895
|
var svg = {
|
|
6317
6896
|
mixins: [Svg],
|
|
6318
6897
|
args: "src",
|
|
@@ -6394,10 +6973,9 @@
|
|
|
6394
6973
|
|
|
6395
6974
|
const selDisabled = ".uk-disabled *, .uk-disabled, [disabled]";
|
|
6396
6975
|
var Switcher = {
|
|
6397
|
-
mixins: [
|
|
6976
|
+
mixins: [Connect],
|
|
6398
6977
|
args: "connect",
|
|
6399
6978
|
props: {
|
|
6400
|
-
connect: String,
|
|
6401
6979
|
toggle: String,
|
|
6402
6980
|
itemNav: String,
|
|
6403
6981
|
active: Number,
|
|
@@ -6409,20 +6987,12 @@
|
|
|
6409
6987
|
toggle: "> * > :first-child",
|
|
6410
6988
|
itemNav: false,
|
|
6411
6989
|
active: 0,
|
|
6412
|
-
cls: "uk-active",
|
|
6413
6990
|
attrItem: "uk-switcher-item",
|
|
6414
6991
|
selVertical: ".uk-nav",
|
|
6415
6992
|
followFocus: false,
|
|
6416
6993
|
swiping: true
|
|
6417
6994
|
},
|
|
6418
6995
|
computed: {
|
|
6419
|
-
connects: {
|
|
6420
|
-
get: ({ connect }, $el) => queryAll(connect, $el),
|
|
6421
|
-
observe: ({ connect }) => connect
|
|
6422
|
-
},
|
|
6423
|
-
connectChildren() {
|
|
6424
|
-
return this.connects.flatMap((el) => children(el));
|
|
6425
|
-
},
|
|
6426
6996
|
toggles: ({ toggle }, $el) => $$(toggle, $el),
|
|
6427
6997
|
children(_, $el) {
|
|
6428
6998
|
return children($el).filter(
|
|
@@ -6453,10 +7023,7 @@
|
|
|
6453
7023
|
connected() {
|
|
6454
7024
|
this.$el.role = "tablist";
|
|
6455
7025
|
},
|
|
6456
|
-
observe:
|
|
6457
|
-
lazyload({ targets: ({ connectChildren }) => connectChildren }),
|
|
6458
|
-
swipe({ target: ({ connects }) => connects, filter: ({ swiping }) => swiping })
|
|
6459
|
-
],
|
|
7026
|
+
observe: swipe({ target: ({ connects }) => connects, filter: ({ swiping }) => swiping }),
|
|
6460
7027
|
events: [
|
|
6461
7028
|
{
|
|
6462
7029
|
name: "click keydown",
|
|
@@ -6510,24 +7077,16 @@
|
|
|
6510
7077
|
}
|
|
6511
7078
|
],
|
|
6512
7079
|
update() {
|
|
6513
|
-
var _a;
|
|
6514
|
-
for (const el of this.connects) {
|
|
6515
|
-
if (isTag(el, "ul")) {
|
|
6516
|
-
el.role = "presentation";
|
|
6517
|
-
}
|
|
6518
|
-
}
|
|
6519
7080
|
attr(children(this.$el), "role", "presentation");
|
|
6520
7081
|
for (const index in this.toggles) {
|
|
6521
|
-
const
|
|
6522
|
-
|
|
6523
|
-
|
|
6524
|
-
|
|
6525
|
-
|
|
6526
|
-
|
|
6527
|
-
|
|
6528
|
-
|
|
6529
|
-
attr(toggle, "aria-controls", item.id);
|
|
6530
|
-
attr(item, { role: "tabpanel", "aria-labelledby": toggle.id });
|
|
7082
|
+
const controls = this.connects.map(({ children: children2 }) => {
|
|
7083
|
+
var _a;
|
|
7084
|
+
return (_a = children2[index]) == null ? void 0 : _a.id;
|
|
7085
|
+
}).filter(Boolean);
|
|
7086
|
+
attr(this.toggles[index], {
|
|
7087
|
+
role: "tab",
|
|
7088
|
+
"aria-controls": controls.join(" ")
|
|
7089
|
+
});
|
|
6531
7090
|
}
|
|
6532
7091
|
attr(this.$el, "aria-orientation", matches(this.$el, this.selVertical) ? "vertical" : null);
|
|
6533
7092
|
},
|
|
@@ -6560,15 +7119,7 @@
|
|
|
6560
7119
|
tabindex: next === i ? null : -1
|
|
6561
7120
|
});
|
|
6562
7121
|
});
|
|
6563
|
-
|
|
6564
|
-
this.connects.forEach(async ({ children: children2 }) => {
|
|
6565
|
-
const actives = toArray(children2).filter(
|
|
6566
|
-
(child, i) => i !== next && hasClass(child, this.cls)
|
|
6567
|
-
);
|
|
6568
|
-
if (await this.toggleElement(actives, false, animate)) {
|
|
6569
|
-
await this.toggleElement(children2[next], true, animate);
|
|
6570
|
-
}
|
|
6571
|
-
});
|
|
7122
|
+
return this.showConnects(next, prev >= 0 && prev !== next);
|
|
6572
7123
|
}
|
|
6573
7124
|
}
|
|
6574
7125
|
};
|