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.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) {
|
|
@@ -838,7 +838,7 @@
|
|
|
838
838
|
height: ["top", "bottom"]
|
|
839
839
|
};
|
|
840
840
|
function dimensions$1(element) {
|
|
841
|
-
const rect = isElement(element) ? toNode(element).getBoundingClientRect() : { height: height(element), width: width(element), top: 0, left: 0 };
|
|
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,
|
|
@@ -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);
|
|
@@ -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"]) : [];
|
|
@@ -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];
|
|
@@ -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,
|
|
@@ -1882,11 +1884,14 @@
|
|
|
1882
1884
|
function coerce$1(type, value) {
|
|
1883
1885
|
if (type === Boolean) {
|
|
1884
1886
|
return toBoolean(value);
|
|
1885
|
-
}
|
|
1887
|
+
}
|
|
1888
|
+
if (type === Number) {
|
|
1886
1889
|
return toNumber(value);
|
|
1887
|
-
}
|
|
1890
|
+
}
|
|
1891
|
+
if (type === "list") {
|
|
1888
1892
|
return toList(value);
|
|
1889
|
-
}
|
|
1893
|
+
}
|
|
1894
|
+
if (type === Object && isString(value)) {
|
|
1890
1895
|
return parseOptions(value);
|
|
1891
1896
|
}
|
|
1892
1897
|
return type ? type(value) : value;
|
|
@@ -1962,9 +1967,9 @@
|
|
|
1962
1967
|
function lazyload(options = {}) {
|
|
1963
1968
|
return intersection({
|
|
1964
1969
|
handler: function(entries, observer) {
|
|
1965
|
-
const { targets = this.$el, preload = 5 } = options;
|
|
1970
|
+
const { targets = this.$el, preload = 5, media = false } = options;
|
|
1966
1971
|
for (const el of toNodes(isFunction(targets) ? targets(this) : targets)) {
|
|
1967
|
-
|
|
1972
|
+
(media ? preloadMedia : loadLazyElements)(el, preload);
|
|
1968
1973
|
}
|
|
1969
1974
|
for (const { isIntersecting, target } of entries) {
|
|
1970
1975
|
isIntersecting && observer.unobserve(target);
|
|
@@ -1973,6 +1978,15 @@
|
|
|
1973
1978
|
...options
|
|
1974
1979
|
});
|
|
1975
1980
|
}
|
|
1981
|
+
function preloadMedia(el, preload = 5) {
|
|
1982
|
+
loadLazyElements(el, preload);
|
|
1983
|
+
for (const video of $$('video[preload="none"]', el)) {
|
|
1984
|
+
video.preload = "";
|
|
1985
|
+
}
|
|
1986
|
+
}
|
|
1987
|
+
function loadLazyElements(el, preload) {
|
|
1988
|
+
$$('[loading="lazy"]', el).slice(0, preload - 1).forEach((el2) => removeAttr(el2, "loading"));
|
|
1989
|
+
}
|
|
1976
1990
|
function viewport(options) {
|
|
1977
1991
|
return observe((target, handler) => observeViewportResize(handler), options, "resize");
|
|
1978
1992
|
}
|
|
@@ -2036,10 +2050,12 @@
|
|
|
2036
2050
|
var Margin = {
|
|
2037
2051
|
props: {
|
|
2038
2052
|
margin: String,
|
|
2053
|
+
firstRow: Boolean,
|
|
2039
2054
|
firstColumn: Boolean
|
|
2040
2055
|
},
|
|
2041
2056
|
data: {
|
|
2042
2057
|
margin: "uk-margin-small-top",
|
|
2058
|
+
firstRow: false,
|
|
2043
2059
|
firstColumn: "uk-first-column"
|
|
2044
2060
|
},
|
|
2045
2061
|
observe: [
|
|
@@ -2079,6 +2095,7 @@
|
|
|
2079
2095
|
for (const row of rows) {
|
|
2080
2096
|
for (const el of row) {
|
|
2081
2097
|
toggleClass(el, this.margin, rows[0] !== row);
|
|
2098
|
+
toggleClass(el, this.firstRow, rows[0] === row);
|
|
2082
2099
|
toggleClass(el, this.firstColumn, row[isRtl ? row.length - 1 : 0] === el);
|
|
2083
2100
|
}
|
|
2084
2101
|
}
|
|
@@ -2170,16 +2187,16 @@
|
|
|
2170
2187
|
removeClass(target, clsLeave);
|
|
2171
2188
|
});
|
|
2172
2189
|
const enterFn = wrapIndexFn(async () => {
|
|
2173
|
-
const oldHeight = height(target);
|
|
2190
|
+
const oldHeight = height$1(target);
|
|
2174
2191
|
addClass(target, clsEnter);
|
|
2175
2192
|
action();
|
|
2176
2193
|
css(stagger ? children(target) : target, propsOut);
|
|
2177
|
-
height(target, oldHeight);
|
|
2194
|
+
height$1(target, oldHeight);
|
|
2178
2195
|
await awaitTimeout();
|
|
2179
|
-
height(target, "");
|
|
2180
|
-
const newHeight = height(target);
|
|
2196
|
+
height$1(target, "");
|
|
2197
|
+
const newHeight = height$1(target);
|
|
2181
2198
|
css(target, "alignContent", "flex-start");
|
|
2182
|
-
height(target, oldHeight);
|
|
2199
|
+
height$1(target, oldHeight);
|
|
2183
2200
|
const transitions = [];
|
|
2184
2201
|
let targetDuration = duration / 2;
|
|
2185
2202
|
if (stagger) {
|
|
@@ -2826,20 +2843,18 @@
|
|
|
2826
2843
|
if (show) {
|
|
2827
2844
|
_toggle(el, true);
|
|
2828
2845
|
}
|
|
2829
|
-
const prevProps =
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
].map((key) => [key, el.style[key]])
|
|
2842
|
-
);
|
|
2846
|
+
const prevProps = pick(el.style, [
|
|
2847
|
+
"padding",
|
|
2848
|
+
"border",
|
|
2849
|
+
"width",
|
|
2850
|
+
"height",
|
|
2851
|
+
"minWidth",
|
|
2852
|
+
"minHeight",
|
|
2853
|
+
"overflowY",
|
|
2854
|
+
"overflowX",
|
|
2855
|
+
marginProp,
|
|
2856
|
+
marginStartProp
|
|
2857
|
+
]);
|
|
2843
2858
|
const dim = dimensions$1(el);
|
|
2844
2859
|
const currentMargin = toFloat(css(el, marginProp));
|
|
2845
2860
|
const marginStart = toFloat(css(el, marginStartProp));
|
|
@@ -3113,18 +3128,11 @@
|
|
|
3113
3128
|
|
|
3114
3129
|
var Animations$2 = {
|
|
3115
3130
|
slide: {
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
},
|
|
3122
|
-
translate(percent, dir) {
|
|
3123
|
-
return [
|
|
3124
|
-
{ transform: translate(dir * -100 * percent) },
|
|
3125
|
-
{ transform: translate(dir * 100 * (1 - percent)) }
|
|
3126
|
-
];
|
|
3127
|
-
}
|
|
3131
|
+
percent: translated,
|
|
3132
|
+
translate: (percent, dir) => [
|
|
3133
|
+
{ transform: translate(dir * -100 * percent) },
|
|
3134
|
+
{ transform: translate(dir * 100 * (1 - percent)) }
|
|
3135
|
+
]
|
|
3128
3136
|
}
|
|
3129
3137
|
};
|
|
3130
3138
|
function translated(el) {
|
|
@@ -3135,8 +3143,8 @@
|
|
|
3135
3143
|
}
|
|
3136
3144
|
|
|
3137
3145
|
function Transitioner$1(prev, next, dir, { animation, easing }) {
|
|
3138
|
-
const { percent, translate
|
|
3139
|
-
const props =
|
|
3146
|
+
const { percent, translate } = animation;
|
|
3147
|
+
const props = translate(1, dir);
|
|
3140
3148
|
const { promise, resolve } = withResolvers();
|
|
3141
3149
|
return {
|
|
3142
3150
|
dir,
|
|
@@ -3418,7 +3426,7 @@
|
|
|
3418
3426
|
return Math.atan2(Math.abs(pos2.y - pos1.y), Math.abs(pos2.x - pos1.x)) * 180 / Math.PI;
|
|
3419
3427
|
}
|
|
3420
3428
|
|
|
3421
|
-
var VERSION = '3.25.27-dev.
|
|
3429
|
+
var VERSION = '3.25.27-dev.9e97c1f';
|
|
3422
3430
|
|
|
3423
3431
|
function initWatches(instance) {
|
|
3424
3432
|
instance._watches = [];
|
|
@@ -3627,7 +3635,7 @@
|
|
|
3627
3635
|
}
|
|
3628
3636
|
const getAttributes = memoize((id, props) => {
|
|
3629
3637
|
const attributes = Object.keys(props);
|
|
3630
|
-
const filter = attributes
|
|
3638
|
+
const filter = [...attributes, id].flatMap((key) => [hyphenate(key), `data-${hyphenate(key)}`]);
|
|
3631
3639
|
return { attributes, filter };
|
|
3632
3640
|
});
|
|
3633
3641
|
function initPropsObserver(instance) {
|
|
@@ -3717,14 +3725,10 @@
|
|
|
3717
3725
|
}
|
|
3718
3726
|
function normalizeData({ data = {} }, { args = [], props = {} }) {
|
|
3719
3727
|
if (isArray(data)) {
|
|
3720
|
-
data = data.slice(0, args.length).reduce(
|
|
3721
|
-
|
|
3722
|
-
|
|
3723
|
-
|
|
3724
|
-
data2[args[index]] = value;
|
|
3725
|
-
}
|
|
3726
|
-
return data2;
|
|
3727
|
-
}, {});
|
|
3728
|
+
data = data.slice(0, args.length).reduce(
|
|
3729
|
+
(data2, value, index) => assign(data2, isPlainObject(value) ? value : { [args[index]]: value }),
|
|
3730
|
+
{}
|
|
3731
|
+
);
|
|
3728
3732
|
}
|
|
3729
3733
|
for (const key in data) {
|
|
3730
3734
|
if (isUndefined(data[key])) {
|
|
@@ -3772,11 +3776,10 @@
|
|
|
3772
3776
|
function init(element2) {
|
|
3773
3777
|
const instance = getComponent(element2, name);
|
|
3774
3778
|
if (instance) {
|
|
3775
|
-
if (data) {
|
|
3776
|
-
instance.$destroy();
|
|
3777
|
-
} else {
|
|
3779
|
+
if (!data) {
|
|
3778
3780
|
return instance;
|
|
3779
3781
|
}
|
|
3782
|
+
instance.$destroy();
|
|
3780
3783
|
}
|
|
3781
3784
|
return new Component({ el: element2, data });
|
|
3782
3785
|
}
|
|
@@ -4277,75 +4280,35 @@
|
|
|
4277
4280
|
var Animations$1 = {
|
|
4278
4281
|
...Animations$2,
|
|
4279
4282
|
fade: {
|
|
4280
|
-
|
|
4281
|
-
|
|
4282
|
-
},
|
|
4283
|
-
percent(current) {
|
|
4284
|
-
return 1 - css(current, "opacity");
|
|
4285
|
-
},
|
|
4286
|
-
translate(percent) {
|
|
4287
|
-
return [{ opacity: 1 - percent, zIndex: 0 }, { zIndex: -1 }];
|
|
4288
|
-
}
|
|
4283
|
+
percent: (current) => 1 - css(current, "opacity"),
|
|
4284
|
+
translate: (percent) => [{ opacity: 1 - percent, zIndex: 0 }, { zIndex: -1 }]
|
|
4289
4285
|
},
|
|
4290
4286
|
scale: {
|
|
4291
|
-
|
|
4292
|
-
|
|
4293
|
-
|
|
4294
|
-
|
|
4295
|
-
|
|
4296
|
-
},
|
|
4297
|
-
translate(percent) {
|
|
4298
|
-
return [
|
|
4299
|
-
{ opacity: 1 - percent, transform: scale3d(1 + 0.5 * percent), zIndex: 0 },
|
|
4300
|
-
{ zIndex: -1 }
|
|
4301
|
-
];
|
|
4302
|
-
}
|
|
4287
|
+
percent: (current) => 1 - css(current, "opacity"),
|
|
4288
|
+
translate: (percent) => [
|
|
4289
|
+
{ opacity: 1 - percent, transform: scale3d(1 + 0.5 * percent), zIndex: 0 },
|
|
4290
|
+
{ zIndex: -1 }
|
|
4291
|
+
]
|
|
4303
4292
|
},
|
|
4304
4293
|
pull: {
|
|
4305
|
-
|
|
4306
|
-
|
|
4307
|
-
|
|
4308
|
-
|
|
4309
|
-
|
|
4310
|
-
|
|
4311
|
-
|
|
4312
|
-
|
|
4313
|
-
},
|
|
4314
|
-
percent(current, next, dir) {
|
|
4315
|
-
return dir < 0 ? 1 - translated(next) : translated(current);
|
|
4316
|
-
},
|
|
4317
|
-
translate(percent, dir) {
|
|
4318
|
-
return dir < 0 ? [
|
|
4319
|
-
{ transform: translate(30 * percent), zIndex: -1 },
|
|
4320
|
-
{ transform: translate(-100 * (1 - percent)), zIndex: 0 }
|
|
4321
|
-
] : [
|
|
4322
|
-
{ transform: translate(-percent * 100), zIndex: 0 },
|
|
4323
|
-
{ transform: translate(30 * (1 - percent)), zIndex: -1 }
|
|
4324
|
-
];
|
|
4325
|
-
}
|
|
4294
|
+
percent: (current, next, dir) => dir < 0 ? 1 - translated(next) : translated(current),
|
|
4295
|
+
translate: (percent, dir) => dir < 0 ? [
|
|
4296
|
+
{ transform: translate(30 * percent), zIndex: -1 },
|
|
4297
|
+
{ transform: translate(-100 * (1 - percent)), zIndex: 0 }
|
|
4298
|
+
] : [
|
|
4299
|
+
{ transform: translate(-percent * 100), zIndex: 0 },
|
|
4300
|
+
{ transform: translate(30 * (1 - percent)), zIndex: -1 }
|
|
4301
|
+
]
|
|
4326
4302
|
},
|
|
4327
4303
|
push: {
|
|
4328
|
-
|
|
4329
|
-
|
|
4330
|
-
|
|
4331
|
-
|
|
4332
|
-
|
|
4333
|
-
|
|
4334
|
-
|
|
4335
|
-
|
|
4336
|
-
},
|
|
4337
|
-
percent(current, next, dir) {
|
|
4338
|
-
return dir > 0 ? 1 - translated(next) : translated(current);
|
|
4339
|
-
},
|
|
4340
|
-
translate(percent, dir) {
|
|
4341
|
-
return dir < 0 ? [
|
|
4342
|
-
{ transform: translate(percent * 100), zIndex: 0 },
|
|
4343
|
-
{ transform: translate(-30 * (1 - percent)), zIndex: -1 }
|
|
4344
|
-
] : [
|
|
4345
|
-
{ transform: translate(-30 * percent), zIndex: -1 },
|
|
4346
|
-
{ transform: translate(100 * (1 - percent)), zIndex: 0 }
|
|
4347
|
-
];
|
|
4348
|
-
}
|
|
4304
|
+
percent: (current, next, dir) => dir > 0 ? 1 - translated(next) : translated(current),
|
|
4305
|
+
translate: (percent, dir) => dir < 0 ? [
|
|
4306
|
+
{ transform: translate(percent * 100), zIndex: 0 },
|
|
4307
|
+
{ transform: translate(-30 * (1 - percent)), zIndex: -1 }
|
|
4308
|
+
] : [
|
|
4309
|
+
{ transform: translate(-30 * percent), zIndex: -1 },
|
|
4310
|
+
{ transform: translate(100 * (1 - percent)), zIndex: 0 }
|
|
4311
|
+
]
|
|
4349
4312
|
}
|
|
4350
4313
|
};
|
|
4351
4314
|
function scale3d(value) {
|
|
@@ -4355,32 +4318,15 @@
|
|
|
4355
4318
|
var Animations = {
|
|
4356
4319
|
...Animations$2,
|
|
4357
4320
|
fade: {
|
|
4358
|
-
|
|
4359
|
-
|
|
4360
|
-
},
|
|
4361
|
-
percent(current) {
|
|
4362
|
-
return 1 - css(current, "opacity");
|
|
4363
|
-
},
|
|
4364
|
-
translate(percent) {
|
|
4365
|
-
return [{ opacity: 1 - percent }, { opacity: percent }];
|
|
4366
|
-
}
|
|
4321
|
+
percent: (current) => 1 - css(current, "opacity"),
|
|
4322
|
+
translate: (percent) => [{ opacity: 1 - percent }, { opacity: percent }]
|
|
4367
4323
|
},
|
|
4368
4324
|
scale: {
|
|
4369
|
-
|
|
4370
|
-
|
|
4371
|
-
|
|
4372
|
-
|
|
4373
|
-
|
|
4374
|
-
},
|
|
4375
|
-
percent(current) {
|
|
4376
|
-
return 1 - css(current, "opacity");
|
|
4377
|
-
},
|
|
4378
|
-
translate(percent) {
|
|
4379
|
-
return [
|
|
4380
|
-
{ opacity: 1 - percent, transform: scale3d(1 - 0.2 * percent) },
|
|
4381
|
-
{ opacity: percent, transform: scale3d(1 - 0.2 + 0.2 * percent) }
|
|
4382
|
-
];
|
|
4383
|
-
}
|
|
4325
|
+
percent: (current) => 1 - css(current, "opacity"),
|
|
4326
|
+
translate: (percent) => [
|
|
4327
|
+
{ opacity: 1 - percent, transform: scale3d(1 - 0.2 * percent) },
|
|
4328
|
+
{ opacity: percent, transform: scale3d(1 - 0.2 + 0.2 * percent) }
|
|
4329
|
+
]
|
|
4384
4330
|
}
|
|
4385
4331
|
};
|
|
4386
4332
|
|
|
@@ -4554,81 +4500,22 @@
|
|
|
4554
4500
|
if (!src) {
|
|
4555
4501
|
return;
|
|
4556
4502
|
}
|
|
4557
|
-
|
|
4558
|
-
|
|
4559
|
-
|
|
4560
|
-
|
|
4561
|
-
|
|
4562
|
-
|
|
4563
|
-
|
|
4564
|
-
|
|
4565
|
-
|
|
4566
|
-
|
|
4567
|
-
|
|
4568
|
-
|
|
4569
|
-
|
|
4570
|
-
...attrs
|
|
4571
|
-
});
|
|
4572
|
-
on(img, "load", () => this.setItem(item, parent(img) || img));
|
|
4573
|
-
on(img, "error", () => this.setError(item));
|
|
4574
|
-
} else if (type === "video" || isVideo(src)) {
|
|
4575
|
-
const inline = this.videoAutoplay === "inline";
|
|
4576
|
-
const video = createEl("video", {
|
|
4577
|
-
src,
|
|
4578
|
-
playsinline: "",
|
|
4579
|
-
controls: inline ? null : "",
|
|
4580
|
-
loop: inline ? "" : null,
|
|
4581
|
-
muted: inline ? "" : null,
|
|
4582
|
-
poster: this.videoAutoplay ? null : item.poster,
|
|
4583
|
-
"uk-video": Boolean(this.videoAutoplay),
|
|
4584
|
-
...attrs
|
|
4585
|
-
});
|
|
4586
|
-
on(video, "loadedmetadata", () => this.setItem(item, video));
|
|
4587
|
-
on(video, "error", () => this.setError(item));
|
|
4588
|
-
} else if (type === "iframe" || src.match(/\.(html|php)($|\?)/i)) {
|
|
4589
|
-
this.setItem(
|
|
4590
|
-
item,
|
|
4591
|
-
createEl("iframe", {
|
|
4592
|
-
src,
|
|
4593
|
-
allowfullscreen: "",
|
|
4594
|
-
class: "uk-lightbox-iframe",
|
|
4595
|
-
...attrs
|
|
4596
|
-
})
|
|
4597
|
-
);
|
|
4598
|
-
} else if (matches2 = src.match(
|
|
4599
|
-
/\/\/(?:.*?youtube(-nocookie)?\..*?(?:[?&]v=|\/shorts\/)|youtu\.be\/)([\w-]{11})[&?]?(.*)?/
|
|
4600
|
-
)) {
|
|
4601
|
-
this.setItem(
|
|
4602
|
-
item,
|
|
4603
|
-
createEl("iframe", {
|
|
4604
|
-
src: `https://www.youtube${matches2[1] || ""}.com/embed/${matches2[2]}${matches2[3] ? `?${matches2[3]}` : ""}`,
|
|
4605
|
-
width: 1920,
|
|
4606
|
-
height: 1080,
|
|
4607
|
-
...iframeAttrs,
|
|
4608
|
-
...attrs
|
|
4609
|
-
})
|
|
4610
|
-
);
|
|
4611
|
-
} else if (matches2 = src.match(/\/\/.*?vimeo\.[a-z]+\/(\d+)[&?]?(.*)?/)) {
|
|
4612
|
-
try {
|
|
4613
|
-
const { height, width } = await (await fetch(
|
|
4614
|
-
`https://vimeo.com/api/oembed.json?maxwidth=1920&url=${encodeURI(
|
|
4615
|
-
src
|
|
4616
|
-
)}`,
|
|
4617
|
-
{ credentials: "omit" }
|
|
4618
|
-
)).json();
|
|
4619
|
-
this.setItem(
|
|
4620
|
-
item,
|
|
4621
|
-
createEl("iframe", {
|
|
4622
|
-
src: `https://player.vimeo.com/video/${matches2[1]}${matches2[2] ? `?${matches2[2]}` : ""}`,
|
|
4623
|
-
width,
|
|
4624
|
-
height,
|
|
4625
|
-
...iframeAttrs,
|
|
4626
|
-
...attrs
|
|
4627
|
-
})
|
|
4628
|
-
);
|
|
4629
|
-
} catch {
|
|
4630
|
-
this.setError(item);
|
|
4503
|
+
try {
|
|
4504
|
+
for (const loader of [
|
|
4505
|
+
loadImage,
|
|
4506
|
+
loadVideo,
|
|
4507
|
+
loadIframe,
|
|
4508
|
+
loadYouTube,
|
|
4509
|
+
loadVimeo
|
|
4510
|
+
]) {
|
|
4511
|
+
const content = await loader({ src, type, attrs, item, cmp: this });
|
|
4512
|
+
if (content) {
|
|
4513
|
+
this.setItem(item, content);
|
|
4514
|
+
return;
|
|
4515
|
+
}
|
|
4631
4516
|
}
|
|
4517
|
+
} catch {
|
|
4518
|
+
this.setError(item);
|
|
4632
4519
|
}
|
|
4633
4520
|
}
|
|
4634
4521
|
},
|
|
@@ -4688,6 +4575,91 @@
|
|
|
4688
4575
|
attr(el, attrs);
|
|
4689
4576
|
return el;
|
|
4690
4577
|
}
|
|
4578
|
+
async function loadImage({ src, type, attrs, item }) {
|
|
4579
|
+
if (type !== "image" && !isImage(src)) {
|
|
4580
|
+
return;
|
|
4581
|
+
}
|
|
4582
|
+
const img = createEl("img");
|
|
4583
|
+
wrapInPicture(img, item.sources);
|
|
4584
|
+
attr(img, {
|
|
4585
|
+
src,
|
|
4586
|
+
...pick(item, ["alt", "srcset", "sizes"]),
|
|
4587
|
+
...attrs
|
|
4588
|
+
});
|
|
4589
|
+
await img.decode();
|
|
4590
|
+
return parent(img) || img;
|
|
4591
|
+
}
|
|
4592
|
+
function loadVideo({ src, type, attrs, item, cmp }) {
|
|
4593
|
+
if (type !== "video" && !isVideo(src)) {
|
|
4594
|
+
return;
|
|
4595
|
+
}
|
|
4596
|
+
const inline = cmp.videoAutoplay === "inline";
|
|
4597
|
+
const video = createEl("video", {
|
|
4598
|
+
src,
|
|
4599
|
+
playsinline: "",
|
|
4600
|
+
controls: inline ? null : "",
|
|
4601
|
+
loop: inline ? "" : null,
|
|
4602
|
+
muted: inline ? "" : null,
|
|
4603
|
+
poster: cmp.videoAutoplay ? null : item.poster,
|
|
4604
|
+
"uk-video": Boolean(cmp.videoAutoplay),
|
|
4605
|
+
...attrs
|
|
4606
|
+
});
|
|
4607
|
+
return new Promise((resolve, reject) => {
|
|
4608
|
+
on(video, "loadedmetadata", () => resolve(video));
|
|
4609
|
+
on(video, "error", reject);
|
|
4610
|
+
});
|
|
4611
|
+
}
|
|
4612
|
+
function loadIframe({ src, type, attrs }) {
|
|
4613
|
+
if (type !== "iframe" && !/\.(html|php)($|\?)/i.test(src)) {
|
|
4614
|
+
return;
|
|
4615
|
+
}
|
|
4616
|
+
return createEl("iframe", {
|
|
4617
|
+
src,
|
|
4618
|
+
allowfullscreen: "",
|
|
4619
|
+
class: "uk-lightbox-iframe",
|
|
4620
|
+
...attrs
|
|
4621
|
+
});
|
|
4622
|
+
}
|
|
4623
|
+
function loadYouTube({ src, attrs, cmp }) {
|
|
4624
|
+
const matches2 = src.match(
|
|
4625
|
+
/\/\/(?:.*?youtube(-nocookie)?\..*?(?:[?&]v=|\/shorts\/)|youtu\.be\/)([\w-]{11})[&?]?(.*)?/
|
|
4626
|
+
);
|
|
4627
|
+
if (!matches2) {
|
|
4628
|
+
return;
|
|
4629
|
+
}
|
|
4630
|
+
return createEl("iframe", {
|
|
4631
|
+
src: `https://www.youtube${matches2[1] || ""}.com/embed/${matches2[2]}${matches2[3] ? `?${matches2[3]}` : ""}`,
|
|
4632
|
+
width: 1920,
|
|
4633
|
+
height: 1080,
|
|
4634
|
+
...getIframeAttrs(cmp),
|
|
4635
|
+
...attrs
|
|
4636
|
+
});
|
|
4637
|
+
}
|
|
4638
|
+
async function loadVimeo({ src, attrs, cmp }) {
|
|
4639
|
+
const matches2 = src.match(/\/\/.*?vimeo\.[a-z]+\/(\d+)[&?]?(.*)?/);
|
|
4640
|
+
if (!matches2) {
|
|
4641
|
+
return;
|
|
4642
|
+
}
|
|
4643
|
+
const { height, width } = await (await fetch(
|
|
4644
|
+
`https://vimeo.com/api/oembed.json?maxwidth=1920&url=${encodeURIComponent(src)}`,
|
|
4645
|
+
{ credentials: "omit" }
|
|
4646
|
+
)).json();
|
|
4647
|
+
return createEl("iframe", {
|
|
4648
|
+
src: `https://player.vimeo.com/video/${matches2[1]}${matches2[2] ? `?${matches2[2]}` : ""}`,
|
|
4649
|
+
width,
|
|
4650
|
+
height,
|
|
4651
|
+
...getIframeAttrs(cmp),
|
|
4652
|
+
...attrs
|
|
4653
|
+
});
|
|
4654
|
+
}
|
|
4655
|
+
function getIframeAttrs(cmp) {
|
|
4656
|
+
return {
|
|
4657
|
+
allowfullscreen: "",
|
|
4658
|
+
style: "max-width: 100%; box-sizing: border-box;",
|
|
4659
|
+
"uk-responsive": "",
|
|
4660
|
+
"uk-video": Boolean(cmp.videoAutoplay)
|
|
4661
|
+
};
|
|
4662
|
+
}
|
|
4691
4663
|
function toThumbnavItem(item, videoAutoplay) {
|
|
4692
4664
|
const el = item.poster || item.thumb && (item.type === "image" || isImage(item.thumb)) ? createEl("img", { src: item.poster || item.thumb, alt: "" }) : item.thumb && (item.type === "video" || isVideo(item.thumb)) ? createEl("video", {
|
|
4693
4665
|
src: item.thumb,
|
|
@@ -4773,7 +4745,7 @@
|
|
|
4773
4745
|
if (items[i].thumb) {
|
|
4774
4746
|
continue;
|
|
4775
4747
|
}
|
|
4776
|
-
const parent = parents(toggle).reverse()
|
|
4748
|
+
const parent = [...parents(toggle).reverse(), toggle].find(
|
|
4777
4749
|
(parent2) => this.$el.contains(parent2) && (parent2 === toggle || $$(this.toggle, parent2).length === 1)
|
|
4778
4750
|
);
|
|
4779
4751
|
if (!parent) {
|
|
@@ -4796,6 +4768,121 @@
|
|
|
4796
4768
|
return item;
|
|
4797
4769
|
}
|
|
4798
4770
|
|
|
4771
|
+
const hasAnimationApi = inBrowser && window.Animation;
|
|
4772
|
+
var marquee = {
|
|
4773
|
+
mixins: [Class],
|
|
4774
|
+
props: {
|
|
4775
|
+
velocity: Number,
|
|
4776
|
+
start: Number,
|
|
4777
|
+
reverse: Boolean,
|
|
4778
|
+
pause: Boolean,
|
|
4779
|
+
pauseVelocity: Number,
|
|
4780
|
+
fadeSize: null
|
|
4781
|
+
},
|
|
4782
|
+
data: {
|
|
4783
|
+
velocity: 25,
|
|
4784
|
+
start: 0,
|
|
4785
|
+
reverse: false,
|
|
4786
|
+
pause: false,
|
|
4787
|
+
pauseVelocity: 10,
|
|
4788
|
+
selList: ".uk-marquee-items",
|
|
4789
|
+
fadeSize: 0
|
|
4790
|
+
},
|
|
4791
|
+
computed: {
|
|
4792
|
+
list: ({ selList }, $el) => $(selList, $el),
|
|
4793
|
+
items() {
|
|
4794
|
+
return children(this.list);
|
|
4795
|
+
}
|
|
4796
|
+
},
|
|
4797
|
+
watch: {
|
|
4798
|
+
items() {
|
|
4799
|
+
this.$emit();
|
|
4800
|
+
}
|
|
4801
|
+
},
|
|
4802
|
+
observe: [
|
|
4803
|
+
resize({
|
|
4804
|
+
target: ({ $el, items }) => [$el, ...items]
|
|
4805
|
+
}),
|
|
4806
|
+
intersection({
|
|
4807
|
+
handler(entries) {
|
|
4808
|
+
let active;
|
|
4809
|
+
for (const entry of entries) {
|
|
4810
|
+
entry.target.inert = !entry.isIntersecting;
|
|
4811
|
+
active || (active = entry.isIntersecting && entry.target);
|
|
4812
|
+
}
|
|
4813
|
+
if (!active) {
|
|
4814
|
+
return;
|
|
4815
|
+
}
|
|
4816
|
+
const { items } = this;
|
|
4817
|
+
const index = items.indexOf(active);
|
|
4818
|
+
if (!~index) {
|
|
4819
|
+
return;
|
|
4820
|
+
}
|
|
4821
|
+
const direction = this.reverse ? 1 : -1;
|
|
4822
|
+
for (let offset = 1; offset < items.length; offset++) {
|
|
4823
|
+
const item = items[getIndex(index + direction * offset, items)];
|
|
4824
|
+
if (item.inert) {
|
|
4825
|
+
preloadMedia(item);
|
|
4826
|
+
break;
|
|
4827
|
+
}
|
|
4828
|
+
}
|
|
4829
|
+
},
|
|
4830
|
+
target: ({ items }) => items,
|
|
4831
|
+
args: { intersecting: false },
|
|
4832
|
+
options: ({ $el }) => ({ root: $el })
|
|
4833
|
+
})
|
|
4834
|
+
],
|
|
4835
|
+
methods: {
|
|
4836
|
+
vertical() {
|
|
4837
|
+
return hasClass(this.$el, `${this.$options.id}-vertical`);
|
|
4838
|
+
}
|
|
4839
|
+
},
|
|
4840
|
+
events: {
|
|
4841
|
+
name: [pointerEnter, pointerLeave],
|
|
4842
|
+
el: ({ $el }) => $el,
|
|
4843
|
+
self: true,
|
|
4844
|
+
filter: ({ pause }) => hasAnimationApi && pause,
|
|
4845
|
+
handler(e) {
|
|
4846
|
+
for (const el of this.items) {
|
|
4847
|
+
for (const animation of el.getAnimations()) {
|
|
4848
|
+
animation.playbackRate = e.type === pointerEnter ? this.pauseVelocity / this.velocity : 1;
|
|
4849
|
+
}
|
|
4850
|
+
}
|
|
4851
|
+
}
|
|
4852
|
+
},
|
|
4853
|
+
update: {
|
|
4854
|
+
write() {
|
|
4855
|
+
const prefix = this.$options.id;
|
|
4856
|
+
const items = this.items;
|
|
4857
|
+
const vertical = this.vertical();
|
|
4858
|
+
css(items, "offset", "none");
|
|
4859
|
+
const dir = vertical ? ["top", "bottom"] : ["left", "right"];
|
|
4860
|
+
if (!vertical && isRtl) {
|
|
4861
|
+
dir.reverse();
|
|
4862
|
+
}
|
|
4863
|
+
const listStart = dimensions$1(this.list)[dir[0]];
|
|
4864
|
+
const itemEnds = items.map((el) => dimensions$1(el)[dir[1]]);
|
|
4865
|
+
const listEnd = Math[!vertical && isRtl ? "min" : "max"](...itemEnds);
|
|
4866
|
+
for (const [index, el] of items.entries()) {
|
|
4867
|
+
const elEnd = itemEnds[index];
|
|
4868
|
+
const line1 = listEnd - elEnd;
|
|
4869
|
+
const line2 = elEnd - listStart;
|
|
4870
|
+
const path = vertical ? `"M0 0 v${line1}M0 ${-line2} v${line2}"` : `"M0 0 h${line1}M${-line2} 0 h${line2}"`;
|
|
4871
|
+
css(el, `--${prefix}-path`, path);
|
|
4872
|
+
}
|
|
4873
|
+
css(this.$el, {
|
|
4874
|
+
[`--${prefix}-duration`]: `${Math.abs(listStart - listEnd) / this.velocity}s`,
|
|
4875
|
+
[`--${prefix}-start`]: this.start,
|
|
4876
|
+
[`--${prefix}-direction`]: this.reverse ? "reverse" : "normal",
|
|
4877
|
+
"--uk-overflow-fade-size": this.fadeSize ? `${toPx(this.fadeSize, vertical ? "height" : "width", this.$el, true)}px` : ""
|
|
4878
|
+
});
|
|
4879
|
+
toggleClass(this.$el, `${prefix}-fade`, this.fadeSize);
|
|
4880
|
+
css(items, "offset", "");
|
|
4881
|
+
},
|
|
4882
|
+
events: ["resize"]
|
|
4883
|
+
}
|
|
4884
|
+
};
|
|
4885
|
+
|
|
4799
4886
|
var notification = {
|
|
4800
4887
|
mixins: [Container],
|
|
4801
4888
|
functional: true,
|
|
@@ -4804,6 +4891,7 @@
|
|
|
4804
4891
|
message: "",
|
|
4805
4892
|
status: "",
|
|
4806
4893
|
timeout: 5e3,
|
|
4894
|
+
duration: 400,
|
|
4807
4895
|
group: "",
|
|
4808
4896
|
pos: "top-center",
|
|
4809
4897
|
clsContainer: "uk-notification",
|
|
@@ -4833,10 +4921,11 @@
|
|
|
4833
4921
|
},
|
|
4834
4922
|
async connected() {
|
|
4835
4923
|
const margin = toFloat(css(this.$el, this.marginProp));
|
|
4836
|
-
await Transition.start(
|
|
4837
|
-
|
|
4838
|
-
[this.marginProp]: margin
|
|
4839
|
-
|
|
4924
|
+
await Transition.start(
|
|
4925
|
+
css(this.$el, this.startProps),
|
|
4926
|
+
{ opacity: 1, [this.marginProp]: margin },
|
|
4927
|
+
this.duration
|
|
4928
|
+
);
|
|
4840
4929
|
if (this.timeout) {
|
|
4841
4930
|
this.timer = setTimeout(this.close, this.timeout);
|
|
4842
4931
|
}
|
|
@@ -4871,7 +4960,7 @@
|
|
|
4871
4960
|
clearTimeout(this.timer);
|
|
4872
4961
|
}
|
|
4873
4962
|
if (!immediate) {
|
|
4874
|
-
await Transition.start(this.$el, this.startProps);
|
|
4963
|
+
await Transition.start(this.$el, this.startProps, this.duration);
|
|
4875
4964
|
}
|
|
4876
4965
|
removeFn(this.$el);
|
|
4877
4966
|
}
|
|
@@ -5228,10 +5317,7 @@
|
|
|
5228
5317
|
return val;
|
|
5229
5318
|
}
|
|
5230
5319
|
function fillObject(keys2, value) {
|
|
5231
|
-
return keys2.
|
|
5232
|
-
data[prop] = value;
|
|
5233
|
-
return data;
|
|
5234
|
-
}, {});
|
|
5320
|
+
return Object.fromEntries(keys2.map((prop) => [prop, value]));
|
|
5235
5321
|
}
|
|
5236
5322
|
function ease(percent, easing) {
|
|
5237
5323
|
return easing >= 0 ? Math.pow(percent, easing + 1) : 1 - Math.pow(1 - percent, 1 - easing);
|
|
@@ -5305,16 +5391,14 @@
|
|
|
5305
5391
|
return el ? "offsetTop" in el ? el : getOffsetElement(parent(el)) : document.documentElement;
|
|
5306
5392
|
}
|
|
5307
5393
|
|
|
5308
|
-
var
|
|
5394
|
+
var ScrollDriven = {
|
|
5309
5395
|
props: {
|
|
5310
|
-
parallax: Boolean,
|
|
5311
5396
|
parallaxTarget: Boolean,
|
|
5312
5397
|
parallaxStart: String,
|
|
5313
5398
|
parallaxEnd: String,
|
|
5314
5399
|
parallaxEasing: Number
|
|
5315
5400
|
},
|
|
5316
5401
|
data: {
|
|
5317
|
-
parallax: false,
|
|
5318
5402
|
parallaxTarget: false,
|
|
5319
5403
|
parallaxStart: 0,
|
|
5320
5404
|
parallaxEnd: 0,
|
|
@@ -5328,26 +5412,48 @@
|
|
|
5328
5412
|
scroll$1({ filter: ({ parallax }) => parallax })
|
|
5329
5413
|
],
|
|
5330
5414
|
computed: {
|
|
5415
|
+
parallaxTargetFallback: ($props, $el) => $el,
|
|
5331
5416
|
parallaxTarget({ parallaxTarget }, $el) {
|
|
5332
|
-
return parallaxTarget && query(parallaxTarget, $el) || this.
|
|
5417
|
+
return parallaxTarget && query(parallaxTarget, $el) || this.parallaxTargetFallback;
|
|
5333
5418
|
}
|
|
5334
5419
|
},
|
|
5335
5420
|
update: {
|
|
5336
5421
|
read() {
|
|
5337
5422
|
if (!this.parallax) {
|
|
5338
|
-
return
|
|
5423
|
+
return;
|
|
5339
5424
|
}
|
|
5340
5425
|
const target = this.parallaxTarget;
|
|
5341
5426
|
if (!target) {
|
|
5342
|
-
return
|
|
5427
|
+
return;
|
|
5343
5428
|
}
|
|
5344
5429
|
const start = toPx(this.parallaxStart, "height", target, true);
|
|
5345
5430
|
const end = toPx(this.parallaxEnd, "height", target, true);
|
|
5346
5431
|
const percent = ease(scrolledOver(target, start, end), this.parallaxEasing);
|
|
5347
|
-
return {
|
|
5432
|
+
return { percent };
|
|
5348
5433
|
},
|
|
5349
|
-
|
|
5350
|
-
|
|
5434
|
+
events: ["scroll", "resize"]
|
|
5435
|
+
}
|
|
5436
|
+
};
|
|
5437
|
+
|
|
5438
|
+
var SliderParallax = {
|
|
5439
|
+
mixins: [ScrollDriven],
|
|
5440
|
+
props: {
|
|
5441
|
+
parallax: Boolean
|
|
5442
|
+
},
|
|
5443
|
+
data: {
|
|
5444
|
+
parallax: false
|
|
5445
|
+
},
|
|
5446
|
+
computed: {
|
|
5447
|
+
parallaxTargetFallback() {
|
|
5448
|
+
return this.list;
|
|
5449
|
+
}
|
|
5450
|
+
},
|
|
5451
|
+
update: {
|
|
5452
|
+
write({ percent }) {
|
|
5453
|
+
if (!this.parallax) {
|
|
5454
|
+
return;
|
|
5455
|
+
}
|
|
5456
|
+
const [prevIndex, slidePercent] = this.getIndexAt(percent);
|
|
5351
5457
|
const nextIndex = this.getValidIndex(prevIndex + Math.ceil(slidePercent));
|
|
5352
5458
|
const prev = this.slides[prevIndex];
|
|
5353
5459
|
const next = this.slides[nextIndex];
|
|
@@ -5439,7 +5545,8 @@
|
|
|
5439
5545
|
var SliderPreload = {
|
|
5440
5546
|
observe: lazyload({
|
|
5441
5547
|
target: ({ slides }) => slides,
|
|
5442
|
-
targets: (instance) => instance.getAdjacentSlides()
|
|
5548
|
+
targets: (instance) => instance.getAdjacentSlides(),
|
|
5549
|
+
media: true
|
|
5443
5550
|
}),
|
|
5444
5551
|
methods: {
|
|
5445
5552
|
getAdjacentSlides() {
|
|
@@ -6169,7 +6276,7 @@
|
|
|
6169
6276
|
height: element.offsetHeight,
|
|
6170
6277
|
padding: css(element, "padding")
|
|
6171
6278
|
});
|
|
6172
|
-
height(clone.firstElementChild, height(element.firstElementChild));
|
|
6279
|
+
height$1(clone.firstElementChild, height$1(element.firstElementChild));
|
|
6173
6280
|
return clone;
|
|
6174
6281
|
}
|
|
6175
6282
|
function findTarget(items, point) {
|
|
@@ -6252,7 +6359,7 @@
|
|
|
6252
6359
|
inset: false
|
|
6253
6360
|
},
|
|
6254
6361
|
connected() {
|
|
6255
|
-
this.pos = this.$props.pos.split("-")
|
|
6362
|
+
this.pos = [...this.$props.pos.split("-"), "center"].slice(0, 2);
|
|
6256
6363
|
[this.dir, this.align] = this.pos;
|
|
6257
6364
|
this.axis = includes(["top", "bottom"], this.dir) ? "y" : "x";
|
|
6258
6365
|
},
|
|
@@ -6655,6 +6762,7 @@
|
|
|
6655
6762
|
Filter: filter,
|
|
6656
6763
|
Lightbox: lightbox,
|
|
6657
6764
|
LightboxPanel: LightboxPanel,
|
|
6765
|
+
Marquee: marquee,
|
|
6658
6766
|
Notification: notification,
|
|
6659
6767
|
Parallax: parallax,
|
|
6660
6768
|
Slider: slider,
|
|
@@ -6738,29 +6846,100 @@
|
|
|
6738
6846
|
globalApi(App);
|
|
6739
6847
|
instanceApi(App);
|
|
6740
6848
|
|
|
6849
|
+
const TogglableComponent = App.extend(Togglable);
|
|
6850
|
+
var Connect = {
|
|
6851
|
+
mixins: [Togglable],
|
|
6852
|
+
props: {
|
|
6853
|
+
connect: String
|
|
6854
|
+
},
|
|
6855
|
+
data: {
|
|
6856
|
+
connect: "",
|
|
6857
|
+
cls: "uk-active"
|
|
6858
|
+
},
|
|
6859
|
+
computed: {
|
|
6860
|
+
connects: {
|
|
6861
|
+
get: ({ connect }, $el) => connect ? queryAll(connect, $el) : [],
|
|
6862
|
+
observe: ({ connect }) => connect
|
|
6863
|
+
},
|
|
6864
|
+
connectChildren() {
|
|
6865
|
+
return this.connects.flatMap((el) => children(el));
|
|
6866
|
+
}
|
|
6867
|
+
},
|
|
6868
|
+
watch: {
|
|
6869
|
+
connects(connects) {
|
|
6870
|
+
for (const el of connects) {
|
|
6871
|
+
if (isTag(el, "ul")) {
|
|
6872
|
+
el.role = "presentation";
|
|
6873
|
+
}
|
|
6874
|
+
}
|
|
6875
|
+
}
|
|
6876
|
+
},
|
|
6877
|
+
observe: lazyload({ targets: ({ connectChildren }) => connectChildren }),
|
|
6878
|
+
update() {
|
|
6879
|
+
for (const index in this.toggles) {
|
|
6880
|
+
const toggle = this.toggles[index];
|
|
6881
|
+
if (!toggle) {
|
|
6882
|
+
continue;
|
|
6883
|
+
}
|
|
6884
|
+
toggle.id = generateId(this, toggle);
|
|
6885
|
+
for (const { children: children2 } of this.connects) {
|
|
6886
|
+
const item = children2[index];
|
|
6887
|
+
if (item) {
|
|
6888
|
+
attr(item, {
|
|
6889
|
+
id: generateId(this, item),
|
|
6890
|
+
role: "tabpanel",
|
|
6891
|
+
"aria-labelledby": toggle.id
|
|
6892
|
+
});
|
|
6893
|
+
}
|
|
6894
|
+
}
|
|
6895
|
+
}
|
|
6896
|
+
},
|
|
6897
|
+
methods: {
|
|
6898
|
+
showConnects(index, animate) {
|
|
6899
|
+
const toggle = async (el) => {
|
|
6900
|
+
const { children: children2 } = el;
|
|
6901
|
+
const animation = data(el, "uk-switcher-animation");
|
|
6902
|
+
let togglable = animation ? new TogglableComponent({ data: { ...this.$props, animation } }) : this;
|
|
6903
|
+
const actives = toArray(children2).filter(
|
|
6904
|
+
(child, i) => i !== index && hasClass(child, this.cls)
|
|
6905
|
+
);
|
|
6906
|
+
if (await togglable.toggleElement(actives, false, animate)) {
|
|
6907
|
+
await togglable.toggleElement(children2[index], true, animate);
|
|
6908
|
+
}
|
|
6909
|
+
};
|
|
6910
|
+
return Promise.all(this.connects.map(toggle));
|
|
6911
|
+
}
|
|
6912
|
+
}
|
|
6913
|
+
};
|
|
6914
|
+
|
|
6741
6915
|
const wrappers = /* @__PURE__ */ new WeakMap();
|
|
6742
6916
|
var Accordion = {
|
|
6743
|
-
mixins: [Class,
|
|
6917
|
+
mixins: [Class, Connect],
|
|
6744
6918
|
props: {
|
|
6745
|
-
animation: Boolean,
|
|
6746
6919
|
targets: String,
|
|
6747
6920
|
active: null,
|
|
6748
6921
|
collapsible: Boolean,
|
|
6749
6922
|
multiple: Boolean,
|
|
6750
6923
|
toggle: String,
|
|
6751
6924
|
content: String,
|
|
6752
|
-
offset: Number
|
|
6925
|
+
offset: Number,
|
|
6926
|
+
switcherConnect: String
|
|
6753
6927
|
},
|
|
6754
6928
|
data: {
|
|
6755
6929
|
targets: "> *",
|
|
6756
6930
|
active: false,
|
|
6757
|
-
animation: true,
|
|
6931
|
+
animation: [true],
|
|
6758
6932
|
collapsible: true,
|
|
6759
6933
|
multiple: false,
|
|
6760
6934
|
clsOpen: "uk-open",
|
|
6935
|
+
cls: "uk-active",
|
|
6761
6936
|
toggle: ".uk-accordion-title",
|
|
6762
6937
|
content: ".uk-accordion-content",
|
|
6763
|
-
offset: 0
|
|
6938
|
+
offset: 0,
|
|
6939
|
+
switcherConnect: ""
|
|
6940
|
+
},
|
|
6941
|
+
beforeConnect() {
|
|
6942
|
+
this.connect = this.$props.connect = this.switcherConnect;
|
|
6764
6943
|
},
|
|
6765
6944
|
computed: {
|
|
6766
6945
|
items: ({ targets }, $el) => $$(targets, $el),
|
|
@@ -6786,6 +6965,12 @@
|
|
|
6786
6965
|
this.toggle(active, false);
|
|
6787
6966
|
}
|
|
6788
6967
|
},
|
|
6968
|
+
connectChildren() {
|
|
6969
|
+
this.showConnects(
|
|
6970
|
+
findIndex(this.items, (el) => hasClass(el, this.clsOpen)),
|
|
6971
|
+
false
|
|
6972
|
+
);
|
|
6973
|
+
},
|
|
6789
6974
|
toggles() {
|
|
6790
6975
|
this.$emit();
|
|
6791
6976
|
},
|
|
@@ -6835,44 +7020,57 @@
|
|
|
6835
7020
|
if (!toggle || !content) {
|
|
6836
7021
|
continue;
|
|
6837
7022
|
}
|
|
6838
|
-
toggle.id = generateId(this, toggle);
|
|
6839
|
-
content.id = generateId(this, content);
|
|
6840
7023
|
const active = includes(activeItems, this.items[index2]);
|
|
7024
|
+
attr(content, {
|
|
7025
|
+
id: generateId(this, content),
|
|
7026
|
+
role: "region",
|
|
7027
|
+
"aria-labelledby": toggle.id
|
|
7028
|
+
});
|
|
7029
|
+
if (isTag(content, "ul")) {
|
|
7030
|
+
attr(children(content), "role", "presentation");
|
|
7031
|
+
}
|
|
7032
|
+
const controls = [
|
|
7033
|
+
content.id,
|
|
7034
|
+
...this.connects.map(({ children: children2 }) => {
|
|
7035
|
+
var _a;
|
|
7036
|
+
return (_a = children2[index2]) == null ? void 0 : _a.id;
|
|
7037
|
+
}).filter(Boolean)
|
|
7038
|
+
];
|
|
6841
7039
|
attr(toggle, {
|
|
6842
7040
|
role: isTag(toggle, "a") ? "button" : null,
|
|
6843
|
-
"aria-controls":
|
|
7041
|
+
"aria-controls": controls.join(" "),
|
|
6844
7042
|
"aria-expanded": active,
|
|
6845
7043
|
"aria-disabled": !this.collapsible && activeItems.length < 2 && active
|
|
6846
7044
|
});
|
|
6847
|
-
attr(content, { role: "region", "aria-labelledby": toggle.id });
|
|
6848
|
-
if (isTag(content, "ul")) {
|
|
6849
|
-
attr(children(content), "role", "presentation");
|
|
6850
|
-
}
|
|
6851
7045
|
}
|
|
6852
7046
|
},
|
|
6853
7047
|
methods: {
|
|
6854
|
-
toggle(item, animate) {
|
|
6855
|
-
|
|
7048
|
+
async toggle(item, animate) {
|
|
7049
|
+
animate = animate !== false;
|
|
7050
|
+
const next = getIndex(item, this.items);
|
|
7051
|
+
item = this.items[next];
|
|
6856
7052
|
let items = [item];
|
|
6857
7053
|
const activeItems = filter$1(this.items, `.${this.clsOpen}`);
|
|
6858
|
-
|
|
6859
|
-
|
|
6860
|
-
|
|
6861
|
-
|
|
6862
|
-
|
|
6863
|
-
|
|
6864
|
-
|
|
6865
|
-
|
|
6866
|
-
|
|
6867
|
-
|
|
6868
|
-
|
|
6869
|
-
|
|
6870
|
-
|
|
6871
|
-
|
|
6872
|
-
|
|
6873
|
-
|
|
6874
|
-
|
|
6875
|
-
|
|
7054
|
+
const isActive = includes(activeItems, item);
|
|
7055
|
+
if (isActive && !this.collapsible && activeItems.length < 2) {
|
|
7056
|
+
return;
|
|
7057
|
+
}
|
|
7058
|
+
if (!isActive && !this.multiple) {
|
|
7059
|
+
items.push(...activeItems);
|
|
7060
|
+
}
|
|
7061
|
+
const toggle = (el) => this.toggleElement(el, !includes(activeItems, el), (el2, show) => {
|
|
7062
|
+
toggleClass(el2, this.clsOpen, show);
|
|
7063
|
+
if (!animate || !this.hasAnimation) {
|
|
7064
|
+
hide($(this.content, el2), !show);
|
|
7065
|
+
return;
|
|
7066
|
+
}
|
|
7067
|
+
return transition(el2, show, this);
|
|
7068
|
+
});
|
|
7069
|
+
const hideIndex = () => findIndex(this.items, (i) => i !== item && includes(activeItems, i));
|
|
7070
|
+
return Promise.all([
|
|
7071
|
+
...items.map(toggle),
|
|
7072
|
+
this.showConnects(isActive ? hideIndex() : next, animate)
|
|
7073
|
+
]);
|
|
6876
7074
|
}
|
|
6877
7075
|
}
|
|
6878
7076
|
};
|
|
@@ -6938,7 +7136,7 @@
|
|
|
6938
7136
|
},
|
|
6939
7137
|
methods: {
|
|
6940
7138
|
async close() {
|
|
6941
|
-
await this.toggleElement(this.$el, false, animate);
|
|
7139
|
+
await this.toggleElement(this.$el, false, this.animation ? animate : false);
|
|
6942
7140
|
this.$destroy(true);
|
|
6943
7141
|
}
|
|
6944
7142
|
}
|
|
@@ -6963,60 +7161,118 @@
|
|
|
6963
7161
|
);
|
|
6964
7162
|
}
|
|
6965
7163
|
|
|
7164
|
+
const loopKey = /* @__PURE__ */ Symbol();
|
|
6966
7165
|
var Video = {
|
|
7166
|
+
mixins: [Media, ScrollDriven],
|
|
6967
7167
|
args: "autoplay",
|
|
6968
7168
|
props: {
|
|
6969
7169
|
automute: Boolean,
|
|
6970
7170
|
autoplay: Boolean,
|
|
6971
7171
|
restart: Boolean,
|
|
6972
|
-
|
|
7172
|
+
inviewMargin: String,
|
|
7173
|
+
inviewQueued: Number,
|
|
7174
|
+
hoverTarget: Boolean,
|
|
7175
|
+
hoverRewind: Number,
|
|
7176
|
+
reducedMotionTime: Number
|
|
6973
7177
|
},
|
|
6974
7178
|
data: {
|
|
6975
7179
|
automute: false,
|
|
6976
7180
|
autoplay: true,
|
|
6977
7181
|
restart: false,
|
|
6978
|
-
|
|
7182
|
+
inviewMargin: "0px",
|
|
7183
|
+
inviewQueued: 0,
|
|
7184
|
+
hoverTarget: false,
|
|
7185
|
+
hoverRewind: 0,
|
|
7186
|
+
reducedMotionTime: 0,
|
|
7187
|
+
media: "(prefers-reduced-motion: reduce)"
|
|
6979
7188
|
},
|
|
6980
7189
|
beforeConnect() {
|
|
6981
|
-
const isVideo = isTag(this.$el, "video");
|
|
6982
|
-
|
|
7190
|
+
const isVideo = this.isVideo = isTag(this.$el, "video");
|
|
7191
|
+
this.interactionDriven = ["hover", "parallax"].includes(this.autoplay);
|
|
7192
|
+
if (this.interactionDriven && !isVideo) {
|
|
7193
|
+
this.interactionDriven = this.autoplay = false;
|
|
7194
|
+
}
|
|
7195
|
+
this.restart = isVideo && this.restart;
|
|
7196
|
+
this.parallax = this.autoplay === "parallax";
|
|
7197
|
+
this.inviewQueued = isVideo && this.autoplay === "inview" && this.inviewQueued;
|
|
7198
|
+
if (this.inviewQueued) {
|
|
7199
|
+
this.$el[loopKey] = this.$el.loop;
|
|
7200
|
+
this.$el.loop = false;
|
|
7201
|
+
}
|
|
7202
|
+
if (["hover", "inview"].includes(this.autoplay) && isVideo && !hasAttr(this.$el, "preload")) {
|
|
6983
7203
|
this.$el.preload = "none";
|
|
6984
7204
|
}
|
|
6985
7205
|
if (!isVideo && !hasAttr(this.$el, "allow")) {
|
|
6986
7206
|
this.$el.allow = "autoplay";
|
|
6987
7207
|
}
|
|
6988
7208
|
if (this.autoplay === "hover") {
|
|
6989
|
-
|
|
6990
|
-
|
|
6991
|
-
|
|
6992
|
-
this.autoplay = true;
|
|
7209
|
+
this.hoverTarget = query(this.hoverTarget, this.$el) || this.$el;
|
|
7210
|
+
if (!isFocusable(this.hoverTarget)) {
|
|
7211
|
+
this.hoverTarget.tabIndex = 0;
|
|
6993
7212
|
}
|
|
6994
7213
|
}
|
|
6995
7214
|
if (this.automute || hasAttr(this.$el, "muted")) {
|
|
6996
7215
|
mute(this.$el);
|
|
6997
7216
|
}
|
|
6998
7217
|
},
|
|
7218
|
+
connected() {
|
|
7219
|
+
if (!this.$el.controls && !this.$el.poster && (this.interactionDriven || this.inviewQueued)) {
|
|
7220
|
+
this.cancelPreview = preview(this.$el);
|
|
7221
|
+
}
|
|
7222
|
+
},
|
|
7223
|
+
disconnected() {
|
|
7224
|
+
var _a, _b;
|
|
7225
|
+
(_a = this._reverseAbort) == null ? void 0 : _a.abort();
|
|
7226
|
+
(_b = this.cancelPreview) == null ? void 0 : _b.call(this);
|
|
7227
|
+
this.cancelPreview = null;
|
|
7228
|
+
if (this.$el[loopKey]) {
|
|
7229
|
+
this.$el.loop = true;
|
|
7230
|
+
}
|
|
7231
|
+
queue.delete(this.$el);
|
|
7232
|
+
},
|
|
6999
7233
|
events: [
|
|
7000
7234
|
{
|
|
7001
7235
|
name: `${pointerEnter} focusin`,
|
|
7002
|
-
el: ({ hoverTarget
|
|
7236
|
+
el: ({ hoverTarget }) => hoverTarget,
|
|
7003
7237
|
filter: ({ autoplay }) => autoplay === "hover",
|
|
7004
7238
|
handler(e) {
|
|
7239
|
+
var _a;
|
|
7240
|
+
(_a = this._reverseAbort) == null ? void 0 : _a.abort();
|
|
7005
7241
|
if (!isTouch(e) || !isPlaying(this.$el)) {
|
|
7006
|
-
play(
|
|
7242
|
+
this.play();
|
|
7007
7243
|
} else {
|
|
7008
|
-
|
|
7244
|
+
this.pause();
|
|
7009
7245
|
}
|
|
7010
7246
|
}
|
|
7011
7247
|
},
|
|
7012
7248
|
{
|
|
7013
7249
|
name: `${pointerLeave} focusout`,
|
|
7014
|
-
el: ({ hoverTarget
|
|
7250
|
+
el: ({ hoverTarget }) => hoverTarget,
|
|
7015
7251
|
filter: ({ autoplay }) => autoplay === "hover",
|
|
7016
7252
|
handler(e) {
|
|
7017
|
-
|
|
7018
|
-
|
|
7253
|
+
var _a;
|
|
7254
|
+
if (!isTouch(e) && !this.matchMedia) {
|
|
7255
|
+
(_a = this._reverseAbort) == null ? void 0 : _a.abort();
|
|
7256
|
+
this.pause();
|
|
7257
|
+
this._reverseAbort = playReverse(this.$el, this.hoverRewind);
|
|
7258
|
+
}
|
|
7259
|
+
}
|
|
7260
|
+
},
|
|
7261
|
+
{
|
|
7262
|
+
name: "loadedmetadata durationchange",
|
|
7263
|
+
filter: ({ parallax }) => parallax,
|
|
7264
|
+
handler() {
|
|
7265
|
+
this.$emit("resize");
|
|
7266
|
+
}
|
|
7267
|
+
},
|
|
7268
|
+
{
|
|
7269
|
+
name: "error pause ended",
|
|
7270
|
+
filter: ({ inviewQueued }) => inviewQueued,
|
|
7271
|
+
handler(e) {
|
|
7272
|
+
if (e.type === "error" || e.type === "ended" && !this.$el[loopKey]) {
|
|
7273
|
+
queue.delete(this.$el);
|
|
7019
7274
|
}
|
|
7275
|
+
playNextQueued();
|
|
7020
7276
|
}
|
|
7021
7277
|
}
|
|
7022
7278
|
],
|
|
@@ -7029,33 +7285,144 @@
|
|
|
7029
7285
|
}
|
|
7030
7286
|
}),
|
|
7031
7287
|
intersection({
|
|
7032
|
-
filter: ({ $el,
|
|
7033
|
-
handler([{ isIntersecting
|
|
7288
|
+
filter: ({ $el, interactionDriven }) => !interactionDriven && $el.preload !== "none",
|
|
7289
|
+
handler([{ isIntersecting }]) {
|
|
7034
7290
|
if (!document.fullscreenElement) {
|
|
7035
7291
|
if (isIntersecting) {
|
|
7036
7292
|
if (this.autoplay) {
|
|
7037
|
-
play(
|
|
7293
|
+
this.play();
|
|
7038
7294
|
}
|
|
7039
7295
|
} else {
|
|
7040
|
-
|
|
7296
|
+
this.pause();
|
|
7041
7297
|
}
|
|
7042
7298
|
}
|
|
7043
7299
|
},
|
|
7044
7300
|
args: { intersecting: false },
|
|
7045
|
-
options: ({ $el, autoplay }) => ({
|
|
7046
|
-
root: autoplay === "inview" ? null : parent($el).closest(":not(a)")
|
|
7301
|
+
options: ({ $el, autoplay, inviewMargin }) => ({
|
|
7302
|
+
root: autoplay === "inview" ? null : parent($el).closest(":not(a)"),
|
|
7303
|
+
rootMargin: autoplay === "inview" ? inviewMargin : "0px"
|
|
7047
7304
|
})
|
|
7048
7305
|
})
|
|
7049
|
-
]
|
|
7306
|
+
],
|
|
7307
|
+
update: {
|
|
7308
|
+
write({ percent }) {
|
|
7309
|
+
if (!this.parallax) {
|
|
7310
|
+
return;
|
|
7311
|
+
}
|
|
7312
|
+
const { duration, seeking } = this.$el;
|
|
7313
|
+
if (!isNaN(duration) && !seeking) {
|
|
7314
|
+
const value = this.matchMedia ? this.reducedMotionTime : percent * duration;
|
|
7315
|
+
setCurrentTime(this.$el, value);
|
|
7316
|
+
}
|
|
7317
|
+
},
|
|
7318
|
+
events: ["scroll", "resize"]
|
|
7319
|
+
},
|
|
7320
|
+
methods: {
|
|
7321
|
+
play() {
|
|
7322
|
+
var _a;
|
|
7323
|
+
if (this.matchMedia) {
|
|
7324
|
+
this.pause();
|
|
7325
|
+
if (this.isVideo) {
|
|
7326
|
+
setCurrentTime(this.$el, this.reducedMotionTime);
|
|
7327
|
+
}
|
|
7328
|
+
} else if (this.inviewQueued) {
|
|
7329
|
+
queue.set(this.$el, this.inviewQueued);
|
|
7330
|
+
playNextQueued();
|
|
7331
|
+
} else {
|
|
7332
|
+
(_a = this.cancelPreview) == null ? void 0 : _a.call(this);
|
|
7333
|
+
play(this.$el);
|
|
7334
|
+
}
|
|
7335
|
+
},
|
|
7336
|
+
pause() {
|
|
7337
|
+
pause(this.$el);
|
|
7338
|
+
queue.delete(this.$el);
|
|
7339
|
+
if (this.restart) {
|
|
7340
|
+
setCurrentTime(this.$el, 0);
|
|
7341
|
+
}
|
|
7342
|
+
}
|
|
7343
|
+
}
|
|
7050
7344
|
};
|
|
7345
|
+
function setCurrentTime(videoEl, time) {
|
|
7346
|
+
if (videoEl.currentTime !== time) {
|
|
7347
|
+
videoEl.currentTime = time;
|
|
7348
|
+
}
|
|
7349
|
+
}
|
|
7051
7350
|
function isPlaying(videoEl) {
|
|
7052
7351
|
return !videoEl.paused && !videoEl.ended;
|
|
7053
7352
|
}
|
|
7054
|
-
function
|
|
7055
|
-
|
|
7056
|
-
|
|
7057
|
-
|
|
7353
|
+
function preview($el) {
|
|
7354
|
+
if (!$el.requestVideoFrameCallback) {
|
|
7355
|
+
return;
|
|
7356
|
+
}
|
|
7357
|
+
let frame2;
|
|
7358
|
+
const pausePreview = () => {
|
|
7359
|
+
disconnect();
|
|
7360
|
+
pause($el);
|
|
7361
|
+
};
|
|
7362
|
+
const observer = observeIntersection($el, () => {
|
|
7363
|
+
observer.disconnect();
|
|
7364
|
+
frame2 = $el.requestVideoFrameCallback(pausePreview);
|
|
7365
|
+
play($el);
|
|
7366
|
+
});
|
|
7367
|
+
const disconnect = () => {
|
|
7368
|
+
observer.disconnect();
|
|
7369
|
+
$el.cancelVideoFrameCallback(frame2);
|
|
7370
|
+
};
|
|
7371
|
+
return disconnect;
|
|
7372
|
+
}
|
|
7373
|
+
const queue = /* @__PURE__ */ new Map();
|
|
7374
|
+
const played = /* @__PURE__ */ new WeakMap();
|
|
7375
|
+
let frame;
|
|
7376
|
+
function playNextQueued() {
|
|
7377
|
+
cancelAnimationFrame(frame);
|
|
7378
|
+
frame = requestAnimationFrame(() => {
|
|
7379
|
+
const getPlayed = (el) => {
|
|
7380
|
+
var _a;
|
|
7381
|
+
return (_a = played.get(el)) != null ? _a : 0;
|
|
7382
|
+
};
|
|
7383
|
+
const videos = shuffle(queue.keys()).sort((a, b) => getPlayed(a) - getPlayed(b));
|
|
7384
|
+
let active = videos.filter(isPlaying).length;
|
|
7385
|
+
for (const el of videos) {
|
|
7386
|
+
const maxQueued = queue.get(el);
|
|
7387
|
+
if (isPlaying(el) || active / queue.size >= maxQueued) {
|
|
7388
|
+
continue;
|
|
7389
|
+
}
|
|
7390
|
+
played.set(el, getPlayed(el) + 1);
|
|
7391
|
+
play(el);
|
|
7392
|
+
active++;
|
|
7393
|
+
}
|
|
7394
|
+
});
|
|
7395
|
+
}
|
|
7396
|
+
function shuffle(array) {
|
|
7397
|
+
array = [...array];
|
|
7398
|
+
for (let i = array.length - 1; i > 0; i--) {
|
|
7399
|
+
let j = Math.floor(Math.random() * (i + 1));
|
|
7400
|
+
[array[i], array[j]] = [array[j], array[i]];
|
|
7401
|
+
}
|
|
7402
|
+
return array;
|
|
7403
|
+
}
|
|
7404
|
+
function playReverse(el, playbackRate) {
|
|
7405
|
+
const start = el.currentTime;
|
|
7406
|
+
if (isNaN(start) || !playbackRate) {
|
|
7407
|
+
return;
|
|
7058
7408
|
}
|
|
7409
|
+
playbackRate *= Math.max(1, start / 10 + 0.5);
|
|
7410
|
+
const controller = new AbortController();
|
|
7411
|
+
const time = Date.now();
|
|
7412
|
+
(function next() {
|
|
7413
|
+
requestAnimationFrame(() => {
|
|
7414
|
+
if (controller.signal.aborted) {
|
|
7415
|
+
return;
|
|
7416
|
+
}
|
|
7417
|
+
if (!el.seeking) {
|
|
7418
|
+
el.currentTime = Math.max(0, start - (Date.now() - time) * playbackRate / 1e3);
|
|
7419
|
+
}
|
|
7420
|
+
if (el.currentTime > 0) {
|
|
7421
|
+
next();
|
|
7422
|
+
}
|
|
7423
|
+
});
|
|
7424
|
+
})();
|
|
7425
|
+
return controller;
|
|
7059
7426
|
}
|
|
7060
7427
|
|
|
7061
7428
|
var cover = {
|
|
@@ -7375,6 +7742,7 @@
|
|
|
7375
7742
|
css(this.$el, this._style);
|
|
7376
7743
|
this.$el.hidden = true;
|
|
7377
7744
|
const viewports = this.target.map((target) => getViewport$1(this.$el, target));
|
|
7745
|
+
const boundaryOffsets = this.boundary.map((el) => offset(el));
|
|
7378
7746
|
const viewportOffset = this.getViewportOffset(this.$el);
|
|
7379
7747
|
const dirs = [
|
|
7380
7748
|
[0, ["x", "width", "left", "right"]],
|
|
@@ -7384,7 +7752,7 @@
|
|
|
7384
7752
|
if (this.axis !== axis && includes([axis, true], this.stretch)) {
|
|
7385
7753
|
css(this.$el, {
|
|
7386
7754
|
[prop]: Math.min(
|
|
7387
|
-
|
|
7755
|
+
boundaryOffsets[i][prop],
|
|
7388
7756
|
viewports[i][prop] - 2 * viewportOffset
|
|
7389
7757
|
),
|
|
7390
7758
|
[`overflow-${axis}`]: "auto"
|
|
@@ -7406,10 +7774,10 @@
|
|
|
7406
7774
|
const elOffset = offset(this.$el);
|
|
7407
7775
|
css(this.$el, {
|
|
7408
7776
|
[prop]: (targetOffset[start] > elOffset[start] ? targetOffset[this.inset ? end : start] - Math.max(
|
|
7409
|
-
|
|
7777
|
+
boundaryOffsets[i][start],
|
|
7410
7778
|
viewports[i][start] + viewportOffset
|
|
7411
7779
|
) : Math.min(
|
|
7412
|
-
|
|
7780
|
+
boundaryOffsets[i][end],
|
|
7413
7781
|
viewports[i][end] - viewportOffset
|
|
7414
7782
|
) - targetOffset[this.inset ? start : end]) - positionOffset,
|
|
7415
7783
|
[`overflow-${axis}`]: "auto"
|
|
@@ -7665,7 +8033,9 @@
|
|
|
7665
8033
|
const drop = this.getDropdown(target);
|
|
7666
8034
|
const adjustHeight = () => {
|
|
7667
8035
|
const maxBottom = Math.max(
|
|
7668
|
-
...parents(target, `.${this.clsDrop}`)
|
|
8036
|
+
...[...parents(target, `.${this.clsDrop}`), target].map(
|
|
8037
|
+
(el) => offset(el).bottom
|
|
8038
|
+
)
|
|
7669
8039
|
);
|
|
7670
8040
|
offset(this.dropbar, {
|
|
7671
8041
|
left: offset(this.dropbar).left,
|
|
@@ -7715,7 +8085,7 @@
|
|
|
7715
8085
|
},
|
|
7716
8086
|
async transitionTo(newHeight, el) {
|
|
7717
8087
|
const { dropbar } = this;
|
|
7718
|
-
const oldHeight = height(dropbar);
|
|
8088
|
+
const oldHeight = height$1(dropbar);
|
|
7719
8089
|
el = oldHeight < newHeight && el;
|
|
7720
8090
|
await Transition.cancel([el, dropbar]);
|
|
7721
8091
|
if (el) {
|
|
@@ -7725,7 +8095,7 @@
|
|
|
7725
8095
|
}
|
|
7726
8096
|
}
|
|
7727
8097
|
css(el, "clipPath", `polygon(0 0,100% 0,100% ${oldHeight}px,0 ${oldHeight}px)`);
|
|
7728
|
-
height(dropbar, oldHeight);
|
|
8098
|
+
height$1(dropbar, oldHeight);
|
|
7729
8099
|
await Promise.all([
|
|
7730
8100
|
Transition.start(dropbar, { height: newHeight }, this.duration),
|
|
7731
8101
|
Transition.start(
|
|
@@ -7845,7 +8215,8 @@
|
|
|
7845
8215
|
parallaxJustify: Boolean
|
|
7846
8216
|
},
|
|
7847
8217
|
data: {
|
|
7848
|
-
margin: "
|
|
8218
|
+
margin: "",
|
|
8219
|
+
firstRow: "uk-first-row",
|
|
7849
8220
|
clsStack: "uk-grid-stack",
|
|
7850
8221
|
masonry: false,
|
|
7851
8222
|
parallax: 0,
|
|
@@ -7867,14 +8238,14 @@
|
|
|
7867
8238
|
{
|
|
7868
8239
|
read(data) {
|
|
7869
8240
|
const { rows } = data;
|
|
7870
|
-
let { masonry, parallax, parallaxJustify
|
|
8241
|
+
let { masonry, parallax, parallaxJustify } = this;
|
|
7871
8242
|
parallax = Math.max(0, toPx(parallax));
|
|
7872
8243
|
if (!(masonry || parallax || parallaxJustify) || positionedAbsolute(rows) || rows[0].some(
|
|
7873
8244
|
(el, i) => rows.some((row) => row[i] && row[i].offsetWidth !== el.offsetWidth)
|
|
7874
8245
|
)) {
|
|
7875
8246
|
return data.translates = data.scrollColumns = false;
|
|
7876
8247
|
}
|
|
7877
|
-
let gutter =
|
|
8248
|
+
let gutter = toFloat(css(this.$el, "row-gap"));
|
|
7878
8249
|
let columns;
|
|
7879
8250
|
let translates;
|
|
7880
8251
|
if (masonry) {
|
|
@@ -7967,10 +8338,6 @@
|
|
|
7967
8338
|
}
|
|
7968
8339
|
return [columns, translates];
|
|
7969
8340
|
}
|
|
7970
|
-
function getGutter(rows, cls) {
|
|
7971
|
-
const node = rows.flat().find((el) => hasClass(el, cls));
|
|
7972
|
-
return toFloat(node ? css(node, "marginTop") : css(rows[0][0], "paddingLeft"));
|
|
7973
|
-
}
|
|
7974
8341
|
function transpose(rows) {
|
|
7975
8342
|
const columns = [];
|
|
7976
8343
|
for (const row of rows) {
|
|
@@ -8654,7 +9021,7 @@
|
|
|
8654
9021
|
} else {
|
|
8655
9022
|
css(this.$el, "display", "block");
|
|
8656
9023
|
}
|
|
8657
|
-
height(this.$el);
|
|
9024
|
+
height$1(this.$el);
|
|
8658
9025
|
}
|
|
8659
9026
|
},
|
|
8660
9027
|
{
|
|
@@ -8891,7 +9258,7 @@
|
|
|
8891
9258
|
this.clsSidebarAnimation,
|
|
8892
9259
|
this.mode === "reveal" ? "" : this.clsMode
|
|
8893
9260
|
);
|
|
8894
|
-
height(body);
|
|
9261
|
+
height$1(body);
|
|
8895
9262
|
addClass(body, this.clsContainerAnimation);
|
|
8896
9263
|
this.clsContainerAnimation && suppressUserScale();
|
|
8897
9264
|
}
|
|
@@ -8977,6 +9344,9 @@
|
|
|
8977
9344
|
events: ["resize"]
|
|
8978
9345
|
}
|
|
8979
9346
|
};
|
|
9347
|
+
function height(el) {
|
|
9348
|
+
return dimensions$1(el).height - boxModelAdjust(el, "height", css(el, "boxSizing"));
|
|
9349
|
+
}
|
|
8980
9350
|
|
|
8981
9351
|
var overflowFade = {
|
|
8982
9352
|
data: {
|
|
@@ -9409,12 +9779,12 @@
|
|
|
9409
9779
|
],
|
|
9410
9780
|
update: [
|
|
9411
9781
|
{
|
|
9412
|
-
read({ height
|
|
9782
|
+
read({ height, width, margin, sticky }, types) {
|
|
9413
9783
|
this.inactive = !this.matchMedia || !isVisible(this.$el) || !this.$el.offsetHeight;
|
|
9414
9784
|
if (this.inactive) {
|
|
9415
9785
|
return;
|
|
9416
9786
|
}
|
|
9417
|
-
const dynamicViewport = height(window);
|
|
9787
|
+
const dynamicViewport = height$1(window);
|
|
9418
9788
|
const maxScrollHeight = Math.max(
|
|
9419
9789
|
0,
|
|
9420
9790
|
document.scrollingElement.scrollHeight - dynamicViewport
|
|
@@ -9429,7 +9799,7 @@
|
|
|
9429
9799
|
this.hide();
|
|
9430
9800
|
}
|
|
9431
9801
|
if (!this.active) {
|
|
9432
|
-
({ height
|
|
9802
|
+
({ height, width } = dimensions$1(this.$el));
|
|
9433
9803
|
margin = css(this.$el, "margin");
|
|
9434
9804
|
}
|
|
9435
9805
|
if (hide) {
|
|
@@ -9437,17 +9807,17 @@
|
|
|
9437
9807
|
}
|
|
9438
9808
|
const viewport2 = toPx("100vh", "height");
|
|
9439
9809
|
let position = this.position;
|
|
9440
|
-
if (this.overflowFlip && height
|
|
9810
|
+
if (this.overflowFlip && height > viewport2) {
|
|
9441
9811
|
position = position === "top" ? "bottom" : "top";
|
|
9442
9812
|
}
|
|
9443
9813
|
const referenceElement = this.isFixed ? this.placeholder : this.$el;
|
|
9444
9814
|
let [offset$1, offsetEnd] = [this.offset, this.offsetEnd].map(
|
|
9445
9815
|
(value) => toPx(value, "height", sticky ? this.$el : referenceElement)
|
|
9446
9816
|
);
|
|
9447
|
-
if (position === "bottom" && (height
|
|
9448
|
-
offset$1 += dynamicViewport - height
|
|
9817
|
+
if (position === "bottom" && (height < dynamicViewport || this.overflowFlip)) {
|
|
9818
|
+
offset$1 += dynamicViewport - height;
|
|
9449
9819
|
}
|
|
9450
|
-
const elementBox = height
|
|
9820
|
+
const elementBox = height + offset$1 + offsetEnd;
|
|
9451
9821
|
const overflow = this.overflowFlip ? 0 : Math.max(0, elementBox - viewport2);
|
|
9452
9822
|
const topOffset = offset(referenceElement).top - // offset possible `transform: translateY` animation 'uk-animation-slide-top' while hiding
|
|
9453
9823
|
new DOMMatrix(css(referenceElement, "transform")).m42;
|
|
@@ -9455,7 +9825,7 @@
|
|
|
9455
9825
|
const start = (this.start === false ? topOffset : parseProp(this.start, this.$el, topOffset)) - offset$1;
|
|
9456
9826
|
const end = this.end === false ? maxScrollHeight : Math.min(
|
|
9457
9827
|
maxScrollHeight,
|
|
9458
|
-
parseProp(this.end, this.$el, topOffset + height
|
|
9828
|
+
parseProp(this.end, this.$el, topOffset + height, true) - elHeight - offset$1 + overflow
|
|
9459
9829
|
);
|
|
9460
9830
|
sticky = !this.showOnUp && start + offset$1 === topOffset && end === Math.min(
|
|
9461
9831
|
maxScrollHeight,
|
|
@@ -9466,7 +9836,7 @@
|
|
|
9466
9836
|
end,
|
|
9467
9837
|
offset: offset$1,
|
|
9468
9838
|
overflow,
|
|
9469
|
-
height
|
|
9839
|
+
height,
|
|
9470
9840
|
elHeight,
|
|
9471
9841
|
width,
|
|
9472
9842
|
margin,
|
|
@@ -9643,7 +10013,7 @@
|
|
|
9643
10013
|
if (!value) {
|
|
9644
10014
|
return 0;
|
|
9645
10015
|
}
|
|
9646
|
-
if (isNumeric(value) || isString(value) &&
|
|
10016
|
+
if (isNumeric(value) || isString(value) && /^-?\d/.test(value)) {
|
|
9647
10017
|
return propOffset + toPx(value, "height", el, true);
|
|
9648
10018
|
} else {
|
|
9649
10019
|
const refElement = value === true ? getVisibleParent(el) : query(value, el);
|
|
@@ -9758,10 +10128,9 @@
|
|
|
9758
10128
|
|
|
9759
10129
|
const selDisabled = ".uk-disabled *, .uk-disabled, [disabled]";
|
|
9760
10130
|
var Switcher = {
|
|
9761
|
-
mixins: [
|
|
10131
|
+
mixins: [Connect],
|
|
9762
10132
|
args: "connect",
|
|
9763
10133
|
props: {
|
|
9764
|
-
connect: String,
|
|
9765
10134
|
toggle: String,
|
|
9766
10135
|
itemNav: String,
|
|
9767
10136
|
active: Number,
|
|
@@ -9773,20 +10142,12 @@
|
|
|
9773
10142
|
toggle: "> * > :first-child",
|
|
9774
10143
|
itemNav: false,
|
|
9775
10144
|
active: 0,
|
|
9776
|
-
cls: "uk-active",
|
|
9777
10145
|
attrItem: "uk-switcher-item",
|
|
9778
10146
|
selVertical: ".uk-nav",
|
|
9779
10147
|
followFocus: false,
|
|
9780
10148
|
swiping: true
|
|
9781
10149
|
},
|
|
9782
10150
|
computed: {
|
|
9783
|
-
connects: {
|
|
9784
|
-
get: ({ connect }, $el) => queryAll(connect, $el),
|
|
9785
|
-
observe: ({ connect }) => connect
|
|
9786
|
-
},
|
|
9787
|
-
connectChildren() {
|
|
9788
|
-
return this.connects.flatMap((el) => children(el));
|
|
9789
|
-
},
|
|
9790
10151
|
toggles: ({ toggle }, $el) => $$(toggle, $el),
|
|
9791
10152
|
children(_, $el) {
|
|
9792
10153
|
return children($el).filter(
|
|
@@ -9817,10 +10178,7 @@
|
|
|
9817
10178
|
connected() {
|
|
9818
10179
|
this.$el.role = "tablist";
|
|
9819
10180
|
},
|
|
9820
|
-
observe:
|
|
9821
|
-
lazyload({ targets: ({ connectChildren }) => connectChildren }),
|
|
9822
|
-
swipe({ target: ({ connects }) => connects, filter: ({ swiping }) => swiping })
|
|
9823
|
-
],
|
|
10181
|
+
observe: swipe({ target: ({ connects }) => connects, filter: ({ swiping }) => swiping }),
|
|
9824
10182
|
events: [
|
|
9825
10183
|
{
|
|
9826
10184
|
name: "click keydown",
|
|
@@ -9874,24 +10232,16 @@
|
|
|
9874
10232
|
}
|
|
9875
10233
|
],
|
|
9876
10234
|
update() {
|
|
9877
|
-
var _a;
|
|
9878
|
-
for (const el of this.connects) {
|
|
9879
|
-
if (isTag(el, "ul")) {
|
|
9880
|
-
el.role = "presentation";
|
|
9881
|
-
}
|
|
9882
|
-
}
|
|
9883
10235
|
attr(children(this.$el), "role", "presentation");
|
|
9884
10236
|
for (const index in this.toggles) {
|
|
9885
|
-
const
|
|
9886
|
-
|
|
9887
|
-
|
|
9888
|
-
|
|
9889
|
-
|
|
9890
|
-
|
|
9891
|
-
|
|
9892
|
-
|
|
9893
|
-
attr(toggle, "aria-controls", item.id);
|
|
9894
|
-
attr(item, { role: "tabpanel", "aria-labelledby": toggle.id });
|
|
10237
|
+
const controls = this.connects.map(({ children: children2 }) => {
|
|
10238
|
+
var _a;
|
|
10239
|
+
return (_a = children2[index]) == null ? void 0 : _a.id;
|
|
10240
|
+
}).filter(Boolean);
|
|
10241
|
+
attr(this.toggles[index], {
|
|
10242
|
+
role: "tab",
|
|
10243
|
+
"aria-controls": controls.join(" ")
|
|
10244
|
+
});
|
|
9895
10245
|
}
|
|
9896
10246
|
attr(this.$el, "aria-orientation", matches(this.$el, this.selVertical) ? "vertical" : null);
|
|
9897
10247
|
},
|
|
@@ -9924,15 +10274,7 @@
|
|
|
9924
10274
|
tabindex: next === i ? null : -1
|
|
9925
10275
|
});
|
|
9926
10276
|
});
|
|
9927
|
-
|
|
9928
|
-
this.connects.forEach(async ({ children: children2 }) => {
|
|
9929
|
-
const actives = toArray(children2).filter(
|
|
9930
|
-
(child, i) => i !== next && hasClass(child, this.cls)
|
|
9931
|
-
);
|
|
9932
|
-
if (await this.toggleElement(actives, false, animate)) {
|
|
9933
|
-
await this.toggleElement(children2[next], true, animate);
|
|
9934
|
-
}
|
|
9935
|
-
});
|
|
10277
|
+
return this.showConnects(next, prev >= 0 && prev !== next);
|
|
9936
10278
|
}
|
|
9937
10279
|
}
|
|
9938
10280
|
};
|