uikit 3.25.26 → 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 +149 -146
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +150 -147
- 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 +65 -26
- 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 +95 -103
- 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 +888 -337
- 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 +766 -433
- 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 +123 -109
- 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 +13 -32
- 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 +18 -62
- 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-nav.js +2 -12
- 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/keys.js +14 -0
- 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.
|
|
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.
|
|
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,49 +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
|
-
|
|
2518
|
-
function maybeDefaultPreventClick(e) {
|
|
2519
|
-
if (e.target.closest('a[href="#"],a[href=""]')) {
|
|
2520
|
-
e.preventDefault();
|
|
2521
|
-
}
|
|
2522
|
-
}
|
|
2523
|
-
function onEscape(handler, isEligible = () => true) {
|
|
2524
|
-
return on(document, "keydown", (e) => {
|
|
2525
|
-
if (e.keyCode === keyMap.ESC && isEligible()) {
|
|
2526
|
-
handler(e);
|
|
2527
|
-
}
|
|
2528
|
-
});
|
|
2529
|
-
}
|
|
2530
|
-
function onOutsidePointer(handler, isOutside, isEligible) {
|
|
2531
|
-
return on(document, pointerDown, ({ target }) => {
|
|
2532
|
-
if (!isOutside(target) || isEligible && !isEligible()) {
|
|
2533
|
-
return;
|
|
2534
|
-
}
|
|
2535
|
-
once(
|
|
2536
|
-
document,
|
|
2537
|
-
`${pointerUp} ${pointerCancel} scroll`,
|
|
2538
|
-
({ defaultPrevented, type, target: newTarget }) => {
|
|
2539
|
-
if (!defaultPrevented && type === pointerUp && target === newTarget) {
|
|
2540
|
-
handler(target);
|
|
2541
|
-
}
|
|
2542
|
-
},
|
|
2543
|
-
true
|
|
2544
|
-
);
|
|
2545
|
-
});
|
|
2546
|
-
}
|
|
2547
|
-
|
|
2548
2514
|
var Togglable = {
|
|
2549
2515
|
props: {
|
|
2550
2516
|
cls: Boolean,
|
|
@@ -2637,27 +2603,25 @@
|
|
|
2637
2603
|
const dimProp = props[dirs.indexOf(dir)];
|
|
2638
2604
|
const marginProp = `margin-${dir[0]}`;
|
|
2639
2605
|
const marginStartProp = `margin-${startProp}`;
|
|
2640
|
-
let currentDim = dimensions(el)[dimProp];
|
|
2606
|
+
let currentDim = dimensions$1(el)[dimProp];
|
|
2641
2607
|
const inProgress = Transition.inProgress(el);
|
|
2642
2608
|
await Transition.cancel(el);
|
|
2643
2609
|
if (show) {
|
|
2644
2610
|
_toggle(el, true);
|
|
2645
2611
|
}
|
|
2646
|
-
const prevProps =
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
);
|
|
2660
|
-
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);
|
|
2661
2625
|
const currentMargin = toFloat(css(el, marginProp));
|
|
2662
2626
|
const marginStart = toFloat(css(el, marginStartProp));
|
|
2663
2627
|
const endDim = dim[dimProp] + marginStart;
|
|
@@ -2722,29 +2686,156 @@
|
|
|
2722
2686
|
_toggle(el, false);
|
|
2723
2687
|
}
|
|
2724
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
|
+
|
|
2725
2811
|
const wrappers = /* @__PURE__ */ new WeakMap();
|
|
2726
2812
|
var Accordion = {
|
|
2727
|
-
mixins: [Class,
|
|
2813
|
+
mixins: [Class, Connect],
|
|
2728
2814
|
props: {
|
|
2729
|
-
animation: Boolean,
|
|
2730
2815
|
targets: String,
|
|
2731
2816
|
active: null,
|
|
2732
2817
|
collapsible: Boolean,
|
|
2733
2818
|
multiple: Boolean,
|
|
2734
2819
|
toggle: String,
|
|
2735
2820
|
content: String,
|
|
2736
|
-
offset: Number
|
|
2821
|
+
offset: Number,
|
|
2822
|
+
switcherConnect: String
|
|
2737
2823
|
},
|
|
2738
2824
|
data: {
|
|
2739
2825
|
targets: "> *",
|
|
2740
2826
|
active: false,
|
|
2741
|
-
animation: true,
|
|
2827
|
+
animation: [true],
|
|
2742
2828
|
collapsible: true,
|
|
2743
2829
|
multiple: false,
|
|
2744
2830
|
clsOpen: "uk-open",
|
|
2831
|
+
cls: "uk-active",
|
|
2745
2832
|
toggle: ".uk-accordion-title",
|
|
2746
2833
|
content: ".uk-accordion-content",
|
|
2747
|
-
offset: 0
|
|
2834
|
+
offset: 0,
|
|
2835
|
+
switcherConnect: ""
|
|
2836
|
+
},
|
|
2837
|
+
beforeConnect() {
|
|
2838
|
+
this.connect = this.$props.connect = this.switcherConnect;
|
|
2748
2839
|
},
|
|
2749
2840
|
computed: {
|
|
2750
2841
|
items: ({ targets }, $el) => $$(targets, $el),
|
|
@@ -2770,6 +2861,12 @@
|
|
|
2770
2861
|
this.toggle(active, false);
|
|
2771
2862
|
}
|
|
2772
2863
|
},
|
|
2864
|
+
connectChildren() {
|
|
2865
|
+
this.showConnects(
|
|
2866
|
+
findIndex(this.items, (el) => hasClass(el, this.clsOpen)),
|
|
2867
|
+
false
|
|
2868
|
+
);
|
|
2869
|
+
},
|
|
2773
2870
|
toggles() {
|
|
2774
2871
|
this.$emit();
|
|
2775
2872
|
},
|
|
@@ -2819,44 +2916,57 @@
|
|
|
2819
2916
|
if (!toggle || !content) {
|
|
2820
2917
|
continue;
|
|
2821
2918
|
}
|
|
2822
|
-
toggle.id = generateId(this, toggle);
|
|
2823
|
-
content.id = generateId(this, content);
|
|
2824
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
|
+
];
|
|
2825
2935
|
attr(toggle, {
|
|
2826
2936
|
role: isTag(toggle, "a") ? "button" : null,
|
|
2827
|
-
"aria-controls":
|
|
2937
|
+
"aria-controls": controls.join(" "),
|
|
2828
2938
|
"aria-expanded": active,
|
|
2829
2939
|
"aria-disabled": !this.collapsible && activeItems.length < 2 && active
|
|
2830
2940
|
});
|
|
2831
|
-
attr(content, { role: "region", "aria-labelledby": toggle.id });
|
|
2832
|
-
if (isTag(content, "ul")) {
|
|
2833
|
-
attr(children(content), "role", "presentation");
|
|
2834
|
-
}
|
|
2835
2941
|
}
|
|
2836
2942
|
},
|
|
2837
2943
|
methods: {
|
|
2838
|
-
toggle(item, animate) {
|
|
2839
|
-
|
|
2944
|
+
async toggle(item, animate) {
|
|
2945
|
+
animate = animate !== false;
|
|
2946
|
+
const next = getIndex(item, this.items);
|
|
2947
|
+
item = this.items[next];
|
|
2840
2948
|
let items = [item];
|
|
2841
2949
|
const activeItems = filter(this.items, `.${this.clsOpen}`);
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
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
|
+
]);
|
|
2860
2970
|
}
|
|
2861
2971
|
}
|
|
2862
2972
|
};
|
|
@@ -2874,7 +2984,7 @@
|
|
|
2874
2984
|
const currentHeight = toFloat(css(wrapper, "height"));
|
|
2875
2985
|
await Transition.cancel(wrapper);
|
|
2876
2986
|
hide(content, false);
|
|
2877
|
-
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;
|
|
2878
2988
|
const percent = currentHeight / endHeight;
|
|
2879
2989
|
duration = endHeight ? (velocity * endHeight + duration) * (show ? 1 - percent : percent) : 0;
|
|
2880
2990
|
css(wrapper, "height", currentHeight);
|
|
@@ -2890,7 +3000,7 @@
|
|
|
2890
3000
|
let frame;
|
|
2891
3001
|
(function scroll() {
|
|
2892
3002
|
frame = requestAnimationFrame(() => {
|
|
2893
|
-
const { top } = dimensions(el);
|
|
3003
|
+
const { top } = dimensions$1(el);
|
|
2894
3004
|
if (top < 0) {
|
|
2895
3005
|
scrollElement.scrollTop += top;
|
|
2896
3006
|
}
|
|
@@ -2922,7 +3032,7 @@
|
|
|
2922
3032
|
},
|
|
2923
3033
|
methods: {
|
|
2924
3034
|
async close() {
|
|
2925
|
-
await this.toggleElement(this.$el, false, animate$1);
|
|
3035
|
+
await this.toggleElement(this.$el, false, this.animation ? animate$1 : false);
|
|
2926
3036
|
this.$destroy(true);
|
|
2927
3037
|
}
|
|
2928
3038
|
}
|
|
@@ -2947,61 +3057,474 @@
|
|
|
2947
3057
|
);
|
|
2948
3058
|
}
|
|
2949
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();
|
|
2950
3416
|
var Video = {
|
|
3417
|
+
mixins: [Media, ScrollDriven],
|
|
2951
3418
|
args: "autoplay",
|
|
2952
3419
|
props: {
|
|
2953
3420
|
automute: Boolean,
|
|
2954
3421
|
autoplay: Boolean,
|
|
2955
3422
|
restart: Boolean,
|
|
2956
|
-
|
|
3423
|
+
inviewMargin: String,
|
|
3424
|
+
inviewQueued: Number,
|
|
3425
|
+
hoverTarget: Boolean,
|
|
3426
|
+
hoverRewind: Number,
|
|
3427
|
+
reducedMotionTime: Number
|
|
2957
3428
|
},
|
|
2958
3429
|
data: {
|
|
2959
3430
|
automute: false,
|
|
2960
3431
|
autoplay: true,
|
|
2961
3432
|
restart: false,
|
|
2962
|
-
|
|
3433
|
+
inviewMargin: "0px",
|
|
3434
|
+
inviewQueued: 0,
|
|
3435
|
+
hoverTarget: false,
|
|
3436
|
+
hoverRewind: 0,
|
|
3437
|
+
reducedMotionTime: 0,
|
|
3438
|
+
media: "(prefers-reduced-motion: reduce)"
|
|
2963
3439
|
},
|
|
2964
3440
|
beforeConnect() {
|
|
2965
|
-
const isVideo = isTag(this.$el, "video");
|
|
2966
|
-
|
|
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")) {
|
|
2967
3454
|
this.$el.preload = "none";
|
|
2968
3455
|
}
|
|
2969
3456
|
if (!isVideo && !hasAttr(this.$el, "allow")) {
|
|
2970
3457
|
this.$el.allow = "autoplay";
|
|
2971
3458
|
}
|
|
2972
3459
|
if (this.autoplay === "hover") {
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
this.autoplay = true;
|
|
3460
|
+
this.hoverTarget = query(this.hoverTarget, this.$el) || this.$el;
|
|
3461
|
+
if (!isFocusable(this.hoverTarget)) {
|
|
3462
|
+
this.hoverTarget.tabIndex = 0;
|
|
2977
3463
|
}
|
|
2978
3464
|
}
|
|
2979
3465
|
if (this.automute || hasAttr(this.$el, "muted")) {
|
|
2980
3466
|
mute(this.$el);
|
|
2981
3467
|
}
|
|
2982
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
|
+
},
|
|
2983
3484
|
events: [
|
|
2984
3485
|
{
|
|
2985
3486
|
name: `${pointerEnter} focusin`,
|
|
2986
|
-
el: ({ hoverTarget
|
|
3487
|
+
el: ({ hoverTarget }) => hoverTarget,
|
|
2987
3488
|
filter: ({ autoplay }) => autoplay === "hover",
|
|
2988
3489
|
handler(e) {
|
|
3490
|
+
var _a;
|
|
3491
|
+
(_a = this._reverseAbort) == null ? void 0 : _a.abort();
|
|
2989
3492
|
if (!isTouch(e) || !isPlaying(this.$el)) {
|
|
2990
|
-
play(
|
|
3493
|
+
this.play();
|
|
2991
3494
|
} else {
|
|
2992
|
-
|
|
3495
|
+
this.pause();
|
|
2993
3496
|
}
|
|
2994
3497
|
}
|
|
2995
3498
|
},
|
|
2996
3499
|
{
|
|
2997
3500
|
name: `${pointerLeave} focusout`,
|
|
2998
|
-
el: ({ hoverTarget
|
|
3501
|
+
el: ({ hoverTarget }) => hoverTarget,
|
|
2999
3502
|
filter: ({ autoplay }) => autoplay === "hover",
|
|
3000
3503
|
handler(e) {
|
|
3001
|
-
|
|
3002
|
-
|
|
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);
|
|
3003
3509
|
}
|
|
3004
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);
|
|
3525
|
+
}
|
|
3526
|
+
playNextQueued();
|
|
3527
|
+
}
|
|
3005
3528
|
}
|
|
3006
3529
|
],
|
|
3007
3530
|
observe: [
|
|
@@ -3013,33 +3536,144 @@
|
|
|
3013
3536
|
}
|
|
3014
3537
|
}),
|
|
3015
3538
|
intersection({
|
|
3016
|
-
filter: ({ $el,
|
|
3017
|
-
handler([{ isIntersecting
|
|
3539
|
+
filter: ({ $el, interactionDriven }) => !interactionDriven && $el.preload !== "none",
|
|
3540
|
+
handler([{ isIntersecting }]) {
|
|
3018
3541
|
if (!document.fullscreenElement) {
|
|
3019
3542
|
if (isIntersecting) {
|
|
3020
3543
|
if (this.autoplay) {
|
|
3021
|
-
play(
|
|
3544
|
+
this.play();
|
|
3022
3545
|
}
|
|
3023
3546
|
} else {
|
|
3024
|
-
|
|
3547
|
+
this.pause();
|
|
3025
3548
|
}
|
|
3026
3549
|
}
|
|
3027
3550
|
},
|
|
3028
3551
|
args: { intersecting: false },
|
|
3029
|
-
options: ({ $el, autoplay }) => ({
|
|
3030
|
-
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"
|
|
3031
3555
|
})
|
|
3032
3556
|
})
|
|
3033
|
-
]
|
|
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
|
+
}
|
|
3034
3595
|
};
|
|
3596
|
+
function setCurrentTime(videoEl, time) {
|
|
3597
|
+
if (videoEl.currentTime !== time) {
|
|
3598
|
+
videoEl.currentTime = time;
|
|
3599
|
+
}
|
|
3600
|
+
}
|
|
3035
3601
|
function isPlaying(videoEl) {
|
|
3036
3602
|
return !videoEl.paused && !videoEl.ended;
|
|
3037
3603
|
}
|
|
3038
|
-
function
|
|
3039
|
-
|
|
3040
|
-
|
|
3041
|
-
el.currentTime = 0;
|
|
3604
|
+
function preview($el) {
|
|
3605
|
+
if (!$el.requestVideoFrameCallback) {
|
|
3606
|
+
return;
|
|
3042
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]];
|
|
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;
|
|
3043
3677
|
}
|
|
3044
3678
|
|
|
3045
3679
|
var cover = {
|
|
@@ -3115,7 +3749,7 @@
|
|
|
3115
3749
|
inset: false
|
|
3116
3750
|
},
|
|
3117
3751
|
connected() {
|
|
3118
|
-
this.pos = this.$props.pos.split("-")
|
|
3752
|
+
this.pos = [...this.$props.pos.split("-"), "center"].slice(0, 2);
|
|
3119
3753
|
[this.dir, this.align] = this.pos;
|
|
3120
3754
|
this.axis = includes(["top", "bottom"], this.dir) ? "y" : "x";
|
|
3121
3755
|
},
|
|
@@ -3135,7 +3769,7 @@
|
|
|
3135
3769
|
placement.reverse();
|
|
3136
3770
|
}
|
|
3137
3771
|
const restoreScrollPosition = storeScrollPosition(element);
|
|
3138
|
-
const elDim = dimensions(element);
|
|
3772
|
+
const elDim = dimensions$1(element);
|
|
3139
3773
|
css(element, { top: -elDim.height, left: -elDim.width });
|
|
3140
3774
|
positionAt(element, target, {
|
|
3141
3775
|
attach,
|
|
@@ -3502,6 +4136,7 @@
|
|
|
3502
4136
|
css(this.$el, this._style);
|
|
3503
4137
|
this.$el.hidden = true;
|
|
3504
4138
|
const viewports = this.target.map((target) => getViewport$1(this.$el, target));
|
|
4139
|
+
const boundaryOffsets = this.boundary.map((el) => offset(el));
|
|
3505
4140
|
const viewportOffset = this.getViewportOffset(this.$el);
|
|
3506
4141
|
const dirs = [
|
|
3507
4142
|
[0, ["x", "width", "left", "right"]],
|
|
@@ -3511,7 +4146,7 @@
|
|
|
3511
4146
|
if (this.axis !== axis && includes([axis, true], this.stretch)) {
|
|
3512
4147
|
css(this.$el, {
|
|
3513
4148
|
[prop]: Math.min(
|
|
3514
|
-
|
|
4149
|
+
boundaryOffsets[i][prop],
|
|
3515
4150
|
viewports[i][prop] - 2 * viewportOffset
|
|
3516
4151
|
),
|
|
3517
4152
|
[`overflow-${axis}`]: "auto"
|
|
@@ -3533,10 +4168,10 @@
|
|
|
3533
4168
|
const elOffset = offset(this.$el);
|
|
3534
4169
|
css(this.$el, {
|
|
3535
4170
|
[prop]: (targetOffset[start] > elOffset[start] ? targetOffset[this.inset ? end : start] - Math.max(
|
|
3536
|
-
|
|
4171
|
+
boundaryOffsets[i][start],
|
|
3537
4172
|
viewports[i][start] + viewportOffset
|
|
3538
4173
|
) : Math.min(
|
|
3539
|
-
|
|
4174
|
+
boundaryOffsets[i][end],
|
|
3540
4175
|
viewports[i][end] - viewportOffset
|
|
3541
4176
|
) - targetOffset[this.inset ? start : end]) - positionOffset,
|
|
3542
4177
|
[`overflow-${axis}`]: "auto"
|
|
@@ -3739,18 +4374,7 @@
|
|
|
3739
4374
|
return;
|
|
3740
4375
|
}
|
|
3741
4376
|
const active2 = this.getActive();
|
|
3742
|
-
|
|
3743
|
-
if (keyCode === keyMap.HOME) {
|
|
3744
|
-
next = 0;
|
|
3745
|
-
} else if (keyCode === keyMap.END) {
|
|
3746
|
-
next = "last";
|
|
3747
|
-
} else if (keyCode === keyMap.UP) {
|
|
3748
|
-
next = "previous";
|
|
3749
|
-
} else if (keyCode === keyMap.DOWN) {
|
|
3750
|
-
next = "next";
|
|
3751
|
-
} else if (keyCode === keyMap.ESC) {
|
|
3752
|
-
(_a = active2.targetEl) == null ? void 0 : _a.focus();
|
|
3753
|
-
}
|
|
4377
|
+
const next = getNavigationIndex(keyCode, keyMap.UP, keyMap.DOWN);
|
|
3754
4378
|
if (~next) {
|
|
3755
4379
|
e.preventDefault();
|
|
3756
4380
|
const elements = $$(selFocusable, current);
|
|
@@ -3761,6 +4385,9 @@
|
|
|
3761
4385
|
)].focus();
|
|
3762
4386
|
return;
|
|
3763
4387
|
}
|
|
4388
|
+
if (keyCode === keyMap.ESC) {
|
|
4389
|
+
(_a = active2.targetEl) == null ? void 0 : _a.focus();
|
|
4390
|
+
}
|
|
3764
4391
|
handleNavItemNavigation(e, this.items, active2);
|
|
3765
4392
|
}
|
|
3766
4393
|
},
|
|
@@ -3800,7 +4427,9 @@
|
|
|
3800
4427
|
const drop = this.getDropdown(target);
|
|
3801
4428
|
const adjustHeight = () => {
|
|
3802
4429
|
const maxBottom = Math.max(
|
|
3803
|
-
...parents(target, `.${this.clsDrop}`)
|
|
4430
|
+
...[...parents(target, `.${this.clsDrop}`), target].map(
|
|
4431
|
+
(el) => offset(el).bottom
|
|
4432
|
+
)
|
|
3804
4433
|
);
|
|
3805
4434
|
offset(this.dropbar, {
|
|
3806
4435
|
left: offset(this.dropbar).left,
|
|
@@ -3850,7 +4479,7 @@
|
|
|
3850
4479
|
},
|
|
3851
4480
|
async transitionTo(newHeight, el) {
|
|
3852
4481
|
const { dropbar } = this;
|
|
3853
|
-
const oldHeight = height(dropbar);
|
|
4482
|
+
const oldHeight = height$1(dropbar);
|
|
3854
4483
|
el = oldHeight < newHeight && el;
|
|
3855
4484
|
await Transition.cancel([el, dropbar]);
|
|
3856
4485
|
if (el) {
|
|
@@ -3860,7 +4489,7 @@
|
|
|
3860
4489
|
}
|
|
3861
4490
|
}
|
|
3862
4491
|
css(el, "clipPath", `polygon(0 0,100% 0,100% ${oldHeight}px,0 ${oldHeight}px)`);
|
|
3863
|
-
height(dropbar, oldHeight);
|
|
4492
|
+
height$1(dropbar, oldHeight);
|
|
3864
4493
|
await Promise.all([
|
|
3865
4494
|
Transition.start(dropbar, { height: newHeight }, this.duration),
|
|
3866
4495
|
Transition.start(
|
|
@@ -3900,23 +4529,14 @@
|
|
|
3900
4529
|
function handleNavItemNavigation(e, toggles, active2) {
|
|
3901
4530
|
var _a, _b, _c;
|
|
3902
4531
|
const { current, keyCode } = e;
|
|
3903
|
-
|
|
3904
|
-
if (keyCode === keyMap.HOME) {
|
|
3905
|
-
next = 0;
|
|
3906
|
-
} else if (keyCode === keyMap.END) {
|
|
3907
|
-
next = "last";
|
|
3908
|
-
} else if (keyCode === keyMap.LEFT) {
|
|
3909
|
-
next = "previous";
|
|
3910
|
-
} else if (keyCode === keyMap.RIGHT) {
|
|
3911
|
-
next = "next";
|
|
3912
|
-
} else if (keyCode === keyMap.TAB) {
|
|
3913
|
-
(_a = active2.targetEl) == null ? void 0 : _a.focus();
|
|
3914
|
-
(_b = active2.hide) == null ? void 0 : _b.call(active2, false);
|
|
3915
|
-
}
|
|
4532
|
+
const next = getNavigationIndex(keyCode);
|
|
3916
4533
|
if (~next) {
|
|
3917
4534
|
e.preventDefault();
|
|
3918
|
-
(
|
|
4535
|
+
(_a = active2.hide) == null ? void 0 : _a.call(active2, false);
|
|
3919
4536
|
toggles[getIndex(next, toggles, toggles.indexOf(active2.targetEl || current))].focus();
|
|
4537
|
+
} else if (keyCode === keyMap.TAB) {
|
|
4538
|
+
(_b = active2.targetEl) == null ? void 0 : _b.focus();
|
|
4539
|
+
(_c = active2.hide) == null ? void 0 : _c.call(active2, false);
|
|
3920
4540
|
}
|
|
3921
4541
|
}
|
|
3922
4542
|
function preventInitialPointerEnter(el) {
|
|
@@ -3980,10 +4600,12 @@
|
|
|
3980
4600
|
var Margin = {
|
|
3981
4601
|
props: {
|
|
3982
4602
|
margin: String,
|
|
4603
|
+
firstRow: Boolean,
|
|
3983
4604
|
firstColumn: Boolean
|
|
3984
4605
|
},
|
|
3985
4606
|
data: {
|
|
3986
4607
|
margin: "uk-margin-small-top",
|
|
4608
|
+
firstRow: false,
|
|
3987
4609
|
firstColumn: "uk-first-column"
|
|
3988
4610
|
},
|
|
3989
4611
|
observe: [
|
|
@@ -4023,6 +4645,7 @@
|
|
|
4023
4645
|
for (const row of rows) {
|
|
4024
4646
|
for (const el of row) {
|
|
4025
4647
|
toggleClass(el, this.margin, rows[0] !== row);
|
|
4648
|
+
toggleClass(el, this.firstRow, rows[0] === row);
|
|
4026
4649
|
toggleClass(el, this.firstColumn, row[isRtl ? row.length - 1 : 0] === el);
|
|
4027
4650
|
}
|
|
4028
4651
|
}
|
|
@@ -4094,7 +4717,8 @@
|
|
|
4094
4717
|
parallaxJustify: Boolean
|
|
4095
4718
|
},
|
|
4096
4719
|
data: {
|
|
4097
|
-
margin: "
|
|
4720
|
+
margin: "",
|
|
4721
|
+
firstRow: "uk-first-row",
|
|
4098
4722
|
clsStack: "uk-grid-stack",
|
|
4099
4723
|
masonry: false,
|
|
4100
4724
|
parallax: 0,
|
|
@@ -4116,14 +4740,14 @@
|
|
|
4116
4740
|
{
|
|
4117
4741
|
read(data) {
|
|
4118
4742
|
const { rows } = data;
|
|
4119
|
-
let { masonry, parallax, parallaxJustify
|
|
4743
|
+
let { masonry, parallax, parallaxJustify } = this;
|
|
4120
4744
|
parallax = Math.max(0, toPx(parallax));
|
|
4121
4745
|
if (!(masonry || parallax || parallaxJustify) || positionedAbsolute(rows) || rows[0].some(
|
|
4122
4746
|
(el, i) => rows.some((row) => row[i] && row[i].offsetWidth !== el.offsetWidth)
|
|
4123
4747
|
)) {
|
|
4124
4748
|
return data.translates = data.scrollColumns = false;
|
|
4125
4749
|
}
|
|
4126
|
-
let gutter =
|
|
4750
|
+
let gutter = toFloat(css(this.$el, "row-gap"));
|
|
4127
4751
|
let columns;
|
|
4128
4752
|
let translates;
|
|
4129
4753
|
if (masonry) {
|
|
@@ -4216,10 +4840,6 @@
|
|
|
4216
4840
|
}
|
|
4217
4841
|
return [columns, translates];
|
|
4218
4842
|
}
|
|
4219
|
-
function getGutter(rows, cls) {
|
|
4220
|
-
const node = rows.flat().find((el) => hasClass(el, cls));
|
|
4221
|
-
return toFloat(node ? css(node, "marginTop") : css(rows[0][0], "paddingLeft"));
|
|
4222
|
-
}
|
|
4223
4843
|
function transpose(rows) {
|
|
4224
4844
|
const columns = [];
|
|
4225
4845
|
for (const row of rows) {
|
|
@@ -4291,7 +4911,7 @@
|
|
|
4291
4911
|
css(element, "display", "block", "important");
|
|
4292
4912
|
}
|
|
4293
4913
|
css(element, "minHeight", "");
|
|
4294
|
-
const height = dimensions(element).height - boxModelAdjust(element, "height", "content-box");
|
|
4914
|
+
const height = dimensions$1(element).height - boxModelAdjust(element, "height", "content-box");
|
|
4295
4915
|
css(element, style);
|
|
4296
4916
|
return height;
|
|
4297
4917
|
}
|
|
@@ -4322,45 +4942,6 @@
|
|
|
4322
4942
|
}
|
|
4323
4943
|
};
|
|
4324
4944
|
|
|
4325
|
-
var Media = {
|
|
4326
|
-
props: {
|
|
4327
|
-
media: Boolean
|
|
4328
|
-
},
|
|
4329
|
-
data: {
|
|
4330
|
-
media: false
|
|
4331
|
-
},
|
|
4332
|
-
connected() {
|
|
4333
|
-
const media = toMedia(this.media, this.$el);
|
|
4334
|
-
this.matchMedia = true;
|
|
4335
|
-
if (media) {
|
|
4336
|
-
this.mediaObj = window.matchMedia(media);
|
|
4337
|
-
const handler = () => {
|
|
4338
|
-
this.matchMedia = this.mediaObj.matches;
|
|
4339
|
-
trigger(this.$el, createEvent("mediachange", false, true, [this.mediaObj]));
|
|
4340
|
-
};
|
|
4341
|
-
this.offMediaObj = on(this.mediaObj, "change", () => {
|
|
4342
|
-
handler();
|
|
4343
|
-
this.$emit("resize");
|
|
4344
|
-
});
|
|
4345
|
-
handler();
|
|
4346
|
-
}
|
|
4347
|
-
},
|
|
4348
|
-
disconnected() {
|
|
4349
|
-
var _a;
|
|
4350
|
-
(_a = this.offMediaObj) == null ? void 0 : _a.call(this);
|
|
4351
|
-
}
|
|
4352
|
-
};
|
|
4353
|
-
function toMedia(value, element) {
|
|
4354
|
-
if (isString(value)) {
|
|
4355
|
-
if (startsWith(value, "@")) {
|
|
4356
|
-
value = toFloat(css(element, `--uk-breakpoint-${value.slice(1)}`));
|
|
4357
|
-
} else if (isNaN(value)) {
|
|
4358
|
-
return value;
|
|
4359
|
-
}
|
|
4360
|
-
}
|
|
4361
|
-
return value && isNumeric(value) ? `(min-width: ${value}px)` : "";
|
|
4362
|
-
}
|
|
4363
|
-
|
|
4364
4945
|
var heightViewport = {
|
|
4365
4946
|
mixins: [Media],
|
|
4366
4947
|
props: {
|
|
@@ -4399,7 +4980,7 @@
|
|
|
4399
4980
|
const isScrollingElement = scrollingElement === scrollElement || body === scrollElement;
|
|
4400
4981
|
let minHeight = `calc(${isScrollingElement ? "100vh" : `${viewportHeight}px`}`;
|
|
4401
4982
|
if (this.expand) {
|
|
4402
|
-
const diff = dimensions(scrollElement).height - dimensions(this.$el).height;
|
|
4983
|
+
const diff = dimensions$1(scrollElement).height - dimensions$1(this.$el).height;
|
|
4403
4984
|
minHeight += ` - ${diff}px`;
|
|
4404
4985
|
} else {
|
|
4405
4986
|
if (this.offsetTop) {
|
|
@@ -4412,13 +4993,13 @@
|
|
|
4412
4993
|
}
|
|
4413
4994
|
}
|
|
4414
4995
|
if (this.offsetBottom === true) {
|
|
4415
|
-
minHeight += ` - ${dimensions(this.$el.nextElementSibling).height}px`;
|
|
4996
|
+
minHeight += ` - ${dimensions$1(this.$el.nextElementSibling).height}px`;
|
|
4416
4997
|
} else if (isNumeric(this.offsetBottom)) {
|
|
4417
4998
|
minHeight += ` - ${this.offsetBottom}vh`;
|
|
4418
4999
|
} else if (this.offsetBottom && endsWith(this.offsetBottom, "px")) {
|
|
4419
5000
|
minHeight += ` - ${toFloat(this.offsetBottom)}px`;
|
|
4420
5001
|
} else if (isString(this.offsetBottom)) {
|
|
4421
|
-
minHeight += ` - ${dimensions(query(this.offsetBottom, this.$el)).height}px`;
|
|
5002
|
+
minHeight += ` - ${dimensions$1(query(this.offsetBottom, this.$el)).height}px`;
|
|
4422
5003
|
}
|
|
4423
5004
|
}
|
|
4424
5005
|
minHeight += `${box ? ` - ${box}px` : ""})`;
|
|
@@ -4966,8 +5547,8 @@
|
|
|
4966
5547
|
}
|
|
4967
5548
|
};
|
|
4968
5549
|
function findTargetColor(target) {
|
|
4969
|
-
const dim = dimensions(target);
|
|
4970
|
-
const viewport = dimensions(window);
|
|
5550
|
+
const dim = dimensions$1(target);
|
|
5551
|
+
const viewport = dimensions$1(window);
|
|
4971
5552
|
if (!intersectRect(dim, viewport)) {
|
|
4972
5553
|
return false;
|
|
4973
5554
|
}
|
|
@@ -5231,7 +5812,7 @@
|
|
|
5231
5812
|
if (last(active) !== modal || modal.$el.contains(e.target)) {
|
|
5232
5813
|
return;
|
|
5233
5814
|
}
|
|
5234
|
-
const { left, top, width, height } = dimensions(e.target);
|
|
5815
|
+
const { left, top, width, height } = dimensions$1(e.target);
|
|
5235
5816
|
const topEl = document.elementFromPoint(left + width / 2, top + height / 2);
|
|
5236
5817
|
if (topEl && (e.target.contains(topEl) || topEl.contains(e.target))) {
|
|
5237
5818
|
return;
|
|
@@ -5285,7 +5866,7 @@
|
|
|
5285
5866
|
} else {
|
|
5286
5867
|
css(this.$el, "display", "block");
|
|
5287
5868
|
}
|
|
5288
|
-
height(this.$el);
|
|
5869
|
+
height$1(this.$el);
|
|
5289
5870
|
}
|
|
5290
5871
|
},
|
|
5291
5872
|
{
|
|
@@ -5522,7 +6103,7 @@
|
|
|
5522
6103
|
this.clsSidebarAnimation,
|
|
5523
6104
|
this.mode === "reveal" ? "" : this.clsMode
|
|
5524
6105
|
);
|
|
5525
|
-
height(body);
|
|
6106
|
+
height$1(body);
|
|
5526
6107
|
addClass(body, this.clsContainerAnimation);
|
|
5527
6108
|
this.clsContainerAnimation && suppressUserScale();
|
|
5528
6109
|
}
|
|
@@ -5598,7 +6179,7 @@
|
|
|
5598
6179
|
return {
|
|
5599
6180
|
max: Math.max(
|
|
5600
6181
|
this.minHeight,
|
|
5601
|
-
height(this.container) - (dimensions(this.content).height - height(this.$el))
|
|
6182
|
+
height(this.container) - (dimensions$1(this.content).height - height(this.$el))
|
|
5602
6183
|
)
|
|
5603
6184
|
};
|
|
5604
6185
|
},
|
|
@@ -5608,6 +6189,9 @@
|
|
|
5608
6189
|
events: ["resize"]
|
|
5609
6190
|
}
|
|
5610
6191
|
};
|
|
6192
|
+
function height(el) {
|
|
6193
|
+
return dimensions$1(el).height - boxModelAdjust(el, "height", css(el, "boxSizing"));
|
|
6194
|
+
}
|
|
5611
6195
|
|
|
5612
6196
|
var overflowFade = {
|
|
5613
6197
|
data: {
|
|
@@ -5921,7 +6505,7 @@
|
|
|
5921
6505
|
if (scrollTop >= max) {
|
|
5922
6506
|
active = length - 1;
|
|
5923
6507
|
} else {
|
|
5924
|
-
const offsetBy = this.offset + dimensions(getCoveringElement()).height + viewport.height * 0.1;
|
|
6508
|
+
const offsetBy = this.offset + dimensions$1(getCoveringElement()).height + viewport.height * 0.1;
|
|
5925
6509
|
for (let i = 0; i < targets.length; i++) {
|
|
5926
6510
|
if (offset(targets[i]).top - viewport.top - offsetBy > 0) {
|
|
5927
6511
|
break;
|
|
@@ -6040,12 +6624,12 @@
|
|
|
6040
6624
|
],
|
|
6041
6625
|
update: [
|
|
6042
6626
|
{
|
|
6043
|
-
read({ height
|
|
6627
|
+
read({ height, width, margin, sticky }, types) {
|
|
6044
6628
|
this.inactive = !this.matchMedia || !isVisible(this.$el) || !this.$el.offsetHeight;
|
|
6045
6629
|
if (this.inactive) {
|
|
6046
6630
|
return;
|
|
6047
6631
|
}
|
|
6048
|
-
const dynamicViewport = height(window);
|
|
6632
|
+
const dynamicViewport = height$1(window);
|
|
6049
6633
|
const maxScrollHeight = Math.max(
|
|
6050
6634
|
0,
|
|
6051
6635
|
document.scrollingElement.scrollHeight - dynamicViewport
|
|
@@ -6060,7 +6644,7 @@
|
|
|
6060
6644
|
this.hide();
|
|
6061
6645
|
}
|
|
6062
6646
|
if (!this.active) {
|
|
6063
|
-
({ height
|
|
6647
|
+
({ height, width } = dimensions$1(this.$el));
|
|
6064
6648
|
margin = css(this.$el, "margin");
|
|
6065
6649
|
}
|
|
6066
6650
|
if (hide) {
|
|
@@ -6068,25 +6652,25 @@
|
|
|
6068
6652
|
}
|
|
6069
6653
|
const viewport2 = toPx("100vh", "height");
|
|
6070
6654
|
let position = this.position;
|
|
6071
|
-
if (this.overflowFlip && height
|
|
6655
|
+
if (this.overflowFlip && height > viewport2) {
|
|
6072
6656
|
position = position === "top" ? "bottom" : "top";
|
|
6073
6657
|
}
|
|
6074
6658
|
const referenceElement = this.isFixed ? this.placeholder : this.$el;
|
|
6075
6659
|
let [offset$1, offsetEnd] = [this.offset, this.offsetEnd].map(
|
|
6076
6660
|
(value) => toPx(value, "height", sticky ? this.$el : referenceElement)
|
|
6077
6661
|
);
|
|
6078
|
-
if (position === "bottom" && (height
|
|
6079
|
-
offset$1 += dynamicViewport - height
|
|
6662
|
+
if (position === "bottom" && (height < dynamicViewport || this.overflowFlip)) {
|
|
6663
|
+
offset$1 += dynamicViewport - height;
|
|
6080
6664
|
}
|
|
6081
|
-
const elementBox = height
|
|
6665
|
+
const elementBox = height + offset$1 + offsetEnd;
|
|
6082
6666
|
const overflow = this.overflowFlip ? 0 : Math.max(0, elementBox - viewport2);
|
|
6083
6667
|
const topOffset = offset(referenceElement).top - // offset possible `transform: translateY` animation 'uk-animation-slide-top' while hiding
|
|
6084
6668
|
new DOMMatrix(css(referenceElement, "transform")).m42;
|
|
6085
|
-
const elHeight = dimensions(this.$el).height;
|
|
6669
|
+
const elHeight = dimensions$1(this.$el).height;
|
|
6086
6670
|
const start = (this.start === false ? topOffset : parseProp(this.start, this.$el, topOffset)) - offset$1;
|
|
6087
6671
|
const end = this.end === false ? maxScrollHeight : Math.min(
|
|
6088
6672
|
maxScrollHeight,
|
|
6089
|
-
parseProp(this.end, this.$el, topOffset + height
|
|
6673
|
+
parseProp(this.end, this.$el, topOffset + height, true) - elHeight - offset$1 + overflow
|
|
6090
6674
|
);
|
|
6091
6675
|
sticky = !this.showOnUp && start + offset$1 === topOffset && end === Math.min(
|
|
6092
6676
|
maxScrollHeight,
|
|
@@ -6097,7 +6681,7 @@
|
|
|
6097
6681
|
end,
|
|
6098
6682
|
offset: offset$1,
|
|
6099
6683
|
overflow,
|
|
6100
|
-
height
|
|
6684
|
+
height,
|
|
6101
6685
|
elHeight,
|
|
6102
6686
|
width,
|
|
6103
6687
|
margin,
|
|
@@ -6274,7 +6858,7 @@
|
|
|
6274
6858
|
if (!value) {
|
|
6275
6859
|
return 0;
|
|
6276
6860
|
}
|
|
6277
|
-
if (isNumeric(value) || isString(value) &&
|
|
6861
|
+
if (isNumeric(value) || isString(value) && /^-?\d/.test(value)) {
|
|
6278
6862
|
return propOffset + toPx(value, "height", el, true);
|
|
6279
6863
|
} else {
|
|
6280
6864
|
const refElement = value === true ? getVisibleParent(el) : query(value, el);
|
|
@@ -6308,15 +6892,6 @@
|
|
|
6308
6892
|
}
|
|
6309
6893
|
}
|
|
6310
6894
|
|
|
6311
|
-
function getMaxPathLength(el) {
|
|
6312
|
-
return isVisible(el) ? Math.ceil(
|
|
6313
|
-
Math.max(0, ...$$("[stroke]", el).map((stroke) => {
|
|
6314
|
-
var _a;
|
|
6315
|
-
return ((_a = stroke.getTotalLength) == null ? void 0 : _a.call(stroke)) || 0;
|
|
6316
|
-
}))
|
|
6317
|
-
) : 0;
|
|
6318
|
-
}
|
|
6319
|
-
|
|
6320
6895
|
var svg = {
|
|
6321
6896
|
mixins: [Svg],
|
|
6322
6897
|
args: "src",
|
|
@@ -6398,10 +6973,9 @@
|
|
|
6398
6973
|
|
|
6399
6974
|
const selDisabled = ".uk-disabled *, .uk-disabled, [disabled]";
|
|
6400
6975
|
var Switcher = {
|
|
6401
|
-
mixins: [
|
|
6976
|
+
mixins: [Connect],
|
|
6402
6977
|
args: "connect",
|
|
6403
6978
|
props: {
|
|
6404
|
-
connect: String,
|
|
6405
6979
|
toggle: String,
|
|
6406
6980
|
itemNav: String,
|
|
6407
6981
|
active: Number,
|
|
@@ -6413,20 +6987,12 @@
|
|
|
6413
6987
|
toggle: "> * > :first-child",
|
|
6414
6988
|
itemNav: false,
|
|
6415
6989
|
active: 0,
|
|
6416
|
-
cls: "uk-active",
|
|
6417
6990
|
attrItem: "uk-switcher-item",
|
|
6418
6991
|
selVertical: ".uk-nav",
|
|
6419
6992
|
followFocus: false,
|
|
6420
6993
|
swiping: true
|
|
6421
6994
|
},
|
|
6422
6995
|
computed: {
|
|
6423
|
-
connects: {
|
|
6424
|
-
get: ({ connect }, $el) => queryAll(connect, $el),
|
|
6425
|
-
observe: ({ connect }) => connect
|
|
6426
|
-
},
|
|
6427
|
-
connectChildren() {
|
|
6428
|
-
return this.connects.flatMap((el) => children(el));
|
|
6429
|
-
},
|
|
6430
6996
|
toggles: ({ toggle }, $el) => $$(toggle, $el),
|
|
6431
6997
|
children(_, $el) {
|
|
6432
6998
|
return children($el).filter(
|
|
@@ -6457,10 +7023,7 @@
|
|
|
6457
7023
|
connected() {
|
|
6458
7024
|
this.$el.role = "tablist";
|
|
6459
7025
|
},
|
|
6460
|
-
observe:
|
|
6461
|
-
lazyload({ targets: ({ connectChildren }) => connectChildren }),
|
|
6462
|
-
swipe({ target: ({ connects }) => connects, filter: ({ swiping }) => swiping })
|
|
6463
|
-
],
|
|
7026
|
+
observe: swipe({ target: ({ connects }) => connects, filter: ({ swiping }) => swiping }),
|
|
6464
7027
|
events: [
|
|
6465
7028
|
{
|
|
6466
7029
|
name: "click keydown",
|
|
@@ -6478,7 +7041,11 @@
|
|
|
6478
7041
|
handler(e) {
|
|
6479
7042
|
const { current, keyCode } = e;
|
|
6480
7043
|
const isVertical = matches(this.$el, this.selVertical);
|
|
6481
|
-
|
|
7044
|
+
const i = getNavigationIndex(
|
|
7045
|
+
keyCode,
|
|
7046
|
+
isVertical ? keyMap.UP : keyMap.LEFT,
|
|
7047
|
+
isVertical ? keyMap.DOWN : keyMap.RIGHT
|
|
7048
|
+
);
|
|
6482
7049
|
if (~i) {
|
|
6483
7050
|
e.preventDefault();
|
|
6484
7051
|
const next = this.toggles[this.next(i, this.toggles.indexOf(current))];
|
|
@@ -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
|
};
|