uikit 3.20.9-dev.50e5c71c4 → 3.20.9-dev.76ecfef9e
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/dist/css/uikit-core-rtl.css +1 -1
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +1 -1
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +1 -1
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +1 -1
- package/dist/css/uikit.min.css +1 -1
- package/dist/js/components/countdown.js +1 -1
- package/dist/js/components/countdown.min.js +1 -1
- package/dist/js/components/filter.js +1 -1
- package/dist/js/components/filter.min.js +1 -1
- package/dist/js/components/lightbox-panel.js +4 -1
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +4 -1
- package/dist/js/components/lightbox.min.js +1 -1
- package/dist/js/components/notification.js +1 -1
- package/dist/js/components/notification.min.js +1 -1
- package/dist/js/components/parallax.js +1 -1
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +1 -1
- package/dist/js/components/slider-parallax.min.js +1 -1
- package/dist/js/components/slider.js +11 -5
- package/dist/js/components/slider.min.js +1 -1
- package/dist/js/components/slideshow-parallax.js +1 -1
- package/dist/js/components/slideshow-parallax.min.js +1 -1
- package/dist/js/components/slideshow.js +10 -4
- package/dist/js/components/slideshow.min.js +1 -1
- package/dist/js/components/sortable.js +1 -1
- package/dist/js/components/sortable.min.js +1 -1
- package/dist/js/components/tooltip.js +1 -1
- package/dist/js/components/tooltip.min.js +1 -1
- package/dist/js/components/upload.js +1 -1
- package/dist/js/components/upload.min.js +1 -1
- package/dist/js/uikit-core.js +63 -62
- 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 +81 -71
- package/dist/js/uikit.min.js +1 -1
- package/package.json +1 -1
- package/src/js/api/component.js +1 -1
- package/src/js/components/internal/slider-transitioner.js +4 -0
- package/src/js/components/slider.js +1 -1
- package/src/js/core/grid.js +4 -7
- package/src/js/core/inverse.js +30 -3
- package/src/js/core/modal.js +1 -1
- package/src/js/core/scrollspy-nav.js +2 -2
- package/src/js/core/scrollspy.js +1 -1
- package/src/js/core/sticky.js +16 -22
- package/src/js/mixin/internal/slideshow-transitioner.js +4 -0
- package/src/js/mixin/slider-parallax.js +7 -3
- package/src/js/util/viewport.js +8 -8
- package/tests/modal.html +1 -1
package/dist/js/uikit-core.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.20.9-dev.
|
|
1
|
+
/*! UIkit 3.20.9-dev.76ecfef9e | https://www.getuikit.com | (c) 2014 - 2024 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
@@ -310,7 +310,7 @@
|
|
|
310
310
|
const isVisibleFn = inBrowser && Element.prototype.checkVisibility || function() {
|
|
311
311
|
return this.offsetWidth || this.offsetHeight || this.getClientRects().length;
|
|
312
312
|
};
|
|
313
|
-
function isVisible(element) {
|
|
313
|
+
function isVisible$1(element) {
|
|
314
314
|
return toNodes(element).some((element2) => isVisibleFn.call(element2));
|
|
315
315
|
}
|
|
316
316
|
const selInput = "input,select,textarea,button";
|
|
@@ -1199,7 +1199,7 @@
|
|
|
1199
1199
|
}
|
|
1200
1200
|
|
|
1201
1201
|
function isInView(element, offsetTop = 0, offsetLeft = 0) {
|
|
1202
|
-
if (!isVisible(element)) {
|
|
1202
|
+
if (!isVisible$1(element)) {
|
|
1203
1203
|
return false;
|
|
1204
1204
|
}
|
|
1205
1205
|
return intersectRect(
|
|
@@ -1215,7 +1215,7 @@
|
|
|
1215
1215
|
);
|
|
1216
1216
|
}
|
|
1217
1217
|
function scrollIntoView(element, { offset: offsetBy = 0 } = {}) {
|
|
1218
|
-
const parents2 = isVisible(element) ? scrollParents(element, false, ["hidden"]) : [];
|
|
1218
|
+
const parents2 = isVisible$1(element) ? scrollParents(element, false, ["hidden"]) : [];
|
|
1219
1219
|
return parents2.reduce(
|
|
1220
1220
|
(fn, scrollElement, i) => {
|
|
1221
1221
|
const { scrollTop, scrollHeight, offsetHeight } = scrollElement;
|
|
@@ -1274,7 +1274,7 @@
|
|
|
1274
1274
|
}
|
|
1275
1275
|
}
|
|
1276
1276
|
function scrolledOver(element, startOffset = 0, endOffset = 0) {
|
|
1277
|
-
if (!isVisible(element)) {
|
|
1277
|
+
if (!isVisible$1(element)) {
|
|
1278
1278
|
return 0;
|
|
1279
1279
|
}
|
|
1280
1280
|
const scrollElement = scrollParent(element, true);
|
|
@@ -1324,7 +1324,7 @@
|
|
|
1324
1324
|
["height", "y", "top", "bottom"]
|
|
1325
1325
|
]) {
|
|
1326
1326
|
if (isWindow(viewportElement)) {
|
|
1327
|
-
viewportElement =
|
|
1327
|
+
viewportElement = viewportElement.document;
|
|
1328
1328
|
} else {
|
|
1329
1329
|
rect[start] += toFloat(css(viewportElement, `border-${start}-width`));
|
|
1330
1330
|
}
|
|
@@ -1336,17 +1336,16 @@
|
|
|
1336
1336
|
}
|
|
1337
1337
|
function getCoveringElement(target) {
|
|
1338
1338
|
const { left, width, top } = dimensions(target);
|
|
1339
|
-
for (const
|
|
1340
|
-
const
|
|
1341
|
-
(
|
|
1339
|
+
for (const position of top ? [0, top] : [0]) {
|
|
1340
|
+
for (const el of toWindow(target).document.elementsFromPoint(left + width / 2, position)) {
|
|
1341
|
+
if (!el.contains(target) && // If e.g. Offcanvas is not yet closed
|
|
1342
1342
|
!hasClass(el, "uk-togglable-leave") && (hasPosition(el, "fixed") && zIndex(
|
|
1343
1343
|
parents(target).reverse().find(
|
|
1344
1344
|
(parent2) => !parent2.contains(el) && !hasPosition(parent2, "static")
|
|
1345
1345
|
)
|
|
1346
|
-
) < zIndex(el) || hasPosition(el, "sticky") && parent(el).contains(target))
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
return coverEl;
|
|
1346
|
+
) < zIndex(el) || hasPosition(el, "sticky") && parent(el).contains(target))) {
|
|
1347
|
+
return el;
|
|
1348
|
+
}
|
|
1350
1349
|
}
|
|
1351
1350
|
}
|
|
1352
1351
|
}
|
|
@@ -1611,7 +1610,7 @@
|
|
|
1611
1610
|
isTouch: isTouch,
|
|
1612
1611
|
isUndefined: isUndefined,
|
|
1613
1612
|
isVideo: isVideo,
|
|
1614
|
-
isVisible: isVisible,
|
|
1613
|
+
isVisible: isVisible$1,
|
|
1615
1614
|
isVoidElement: isVoidElement,
|
|
1616
1615
|
isWindow: isWindow,
|
|
1617
1616
|
last: last,
|
|
@@ -2172,7 +2171,7 @@
|
|
|
2172
2171
|
};
|
|
2173
2172
|
App.util = util;
|
|
2174
2173
|
App.options = {};
|
|
2175
|
-
App.version = "3.20.9-dev.
|
|
2174
|
+
App.version = "3.20.9-dev.76ecfef9e";
|
|
2176
2175
|
|
|
2177
2176
|
const PREFIX = "uk-";
|
|
2178
2177
|
const DATA = "__uikit__";
|
|
@@ -2227,7 +2226,7 @@
|
|
|
2227
2226
|
function detachFromElement(element, instance) {
|
|
2228
2227
|
var _a;
|
|
2229
2228
|
(_a = element[DATA]) == null ? true : delete _a[instance.$options.name];
|
|
2230
|
-
if (
|
|
2229
|
+
if (isEmpty(element[DATA])) {
|
|
2231
2230
|
delete element[DATA];
|
|
2232
2231
|
}
|
|
2233
2232
|
}
|
|
@@ -2550,7 +2549,7 @@
|
|
|
2550
2549
|
},
|
|
2551
2550
|
isToggled(el = this.$el) {
|
|
2552
2551
|
el = toNode(el);
|
|
2553
|
-
return hasClass(el, this.clsEnter) ? true : hasClass(el, this.clsLeave) ? false : this.cls ? hasClass(el, this.cls.split(" ")[0]) : isVisible(el);
|
|
2552
|
+
return hasClass(el, this.clsEnter) ? true : hasClass(el, this.clsLeave) ? false : this.cls ? hasClass(el, this.cls.split(" ")[0]) : isVisible$1(el);
|
|
2554
2553
|
},
|
|
2555
2554
|
_toggle(el, toggled) {
|
|
2556
2555
|
if (!el) {
|
|
@@ -2565,7 +2564,7 @@
|
|
|
2565
2564
|
changed = toggled === el.hidden;
|
|
2566
2565
|
changed && (el.hidden = !toggled);
|
|
2567
2566
|
}
|
|
2568
|
-
$$("[autofocus]", el).some((el2) => isVisible(el2) ? el2.focus() || true : el2.blur());
|
|
2567
|
+
$$("[autofocus]", el).some((el2) => isVisible$1(el2) ? el2.focus() || true : el2.blur());
|
|
2569
2568
|
if (changed) {
|
|
2570
2569
|
trigger(el, "toggled", [toggled, this]);
|
|
2571
2570
|
}
|
|
@@ -3998,7 +3997,7 @@
|
|
|
3998
3997
|
(el, i) => i && elements[i - 1].offsetParent !== el.offsetParent
|
|
3999
3998
|
);
|
|
4000
3999
|
for (const el of elements) {
|
|
4001
|
-
if (!isVisible(el)) {
|
|
4000
|
+
if (!isVisible$1(el)) {
|
|
4002
4001
|
continue;
|
|
4003
4002
|
}
|
|
4004
4003
|
const offset = getOffset(el, withOffset);
|
|
@@ -4131,11 +4130,8 @@
|
|
|
4131
4130
|
},
|
|
4132
4131
|
{
|
|
4133
4132
|
read({ rows, scrollColumns, parallaxStart, parallaxEnd }) {
|
|
4134
|
-
if (scrollColumns && positionedAbsolute(rows)) {
|
|
4135
|
-
return false;
|
|
4136
|
-
}
|
|
4137
4133
|
return {
|
|
4138
|
-
scrolled: scrollColumns ? scrolledOver(this.$el, parallaxStart, parallaxEnd) : false
|
|
4134
|
+
scrolled: scrollColumns && !positionedAbsolute(rows) ? scrolledOver(this.$el, parallaxStart, parallaxEnd) : false
|
|
4139
4135
|
};
|
|
4140
4136
|
},
|
|
4141
4137
|
write({ columns, scrolled, scrollColumns, translates }) {
|
|
@@ -4257,7 +4253,7 @@
|
|
|
4257
4253
|
}
|
|
4258
4254
|
function getHeight(element) {
|
|
4259
4255
|
const style = pick(element.style, ["display", "minHeight"]);
|
|
4260
|
-
if (!isVisible(element)) {
|
|
4256
|
+
if (!isVisible$1(element)) {
|
|
4261
4257
|
css(element, "display", "block", "important");
|
|
4262
4258
|
}
|
|
4263
4259
|
css(element, "minHeight", "");
|
|
@@ -4312,7 +4308,7 @@
|
|
|
4312
4308
|
],
|
|
4313
4309
|
update: {
|
|
4314
4310
|
read() {
|
|
4315
|
-
if (!isVisible(this.$el)) {
|
|
4311
|
+
if (!isVisible$1(this.$el)) {
|
|
4316
4312
|
return false;
|
|
4317
4313
|
}
|
|
4318
4314
|
let minHeight = "";
|
|
@@ -4857,11 +4853,11 @@
|
|
|
4857
4853
|
let last;
|
|
4858
4854
|
for (const percent of [0.25, 0.5, 0.75]) {
|
|
4859
4855
|
const elements = target.ownerDocument.elementsFromPoint(
|
|
4860
|
-
Math.max(0, left
|
|
4861
|
-
Math.max(0, top
|
|
4856
|
+
Math.max(0, left + width * percent),
|
|
4857
|
+
Math.max(0, top + height / 2)
|
|
4862
4858
|
);
|
|
4863
4859
|
for (const element of elements) {
|
|
4864
|
-
if (target.contains(element) || element.closest('[class*="-leave"]') && elements.some((el) => element !== el && matches(el, '[class*="-enter"]'))) {
|
|
4860
|
+
if (target.contains(element) || !isVisible(element) || element.closest('[class*="-leave"]') && elements.some((el) => element !== el && matches(el, '[class*="-enter"]'))) {
|
|
4865
4861
|
continue;
|
|
4866
4862
|
}
|
|
4867
4863
|
const color = css(element, "--uk-inverse");
|
|
@@ -4876,6 +4872,18 @@
|
|
|
4876
4872
|
}
|
|
4877
4873
|
return last ? `uk-${last}` : "";
|
|
4878
4874
|
}
|
|
4875
|
+
function isVisible(element) {
|
|
4876
|
+
if (css(element, "visibility") !== "visible") {
|
|
4877
|
+
return false;
|
|
4878
|
+
}
|
|
4879
|
+
while (element) {
|
|
4880
|
+
if (css(element, "opacity") === "0") {
|
|
4881
|
+
return false;
|
|
4882
|
+
}
|
|
4883
|
+
element = parent(element);
|
|
4884
|
+
}
|
|
4885
|
+
return true;
|
|
4886
|
+
}
|
|
4879
4887
|
|
|
4880
4888
|
var Media = {
|
|
4881
4889
|
props: {
|
|
@@ -5241,7 +5249,7 @@
|
|
|
5241
5249
|
};
|
|
5242
5250
|
modal.prompt = function(message, value, options) {
|
|
5243
5251
|
const promise = openDialog(
|
|
5244
|
-
({ i18n }) => `<form class="uk-form-stacked"> <div class="uk-modal-body"> <label>${isString(message) ? message : html(message)}</label> <input class="uk-input"
|
|
5252
|
+
({ i18n }) => `<form class="uk-form-stacked"> <div class="uk-modal-body"> <label>${isString(message) ? message : html(message)}</label> <input class="uk-input" autofocus> </div> <div class="uk-modal-footer uk-text-right"> <button class="uk-button uk-button-default uk-modal-close" type="button">${i18n.cancel}</button> <button class="uk-button uk-button-primary">${i18n.ok}</button> </div> </form>`,
|
|
5245
5253
|
options,
|
|
5246
5254
|
() => null,
|
|
5247
5255
|
() => input.value
|
|
@@ -5401,7 +5409,7 @@
|
|
|
5401
5409
|
observe: swipe({ filter: ({ swiping }) => swiping }),
|
|
5402
5410
|
update: {
|
|
5403
5411
|
read() {
|
|
5404
|
-
if (this.isToggled() && !isVisible(this.$el)) {
|
|
5412
|
+
if (this.isToggled() && !isVisible$1(this.$el)) {
|
|
5405
5413
|
this.hide();
|
|
5406
5414
|
}
|
|
5407
5415
|
},
|
|
@@ -5508,7 +5516,7 @@
|
|
|
5508
5516
|
}),
|
|
5509
5517
|
update: {
|
|
5510
5518
|
read() {
|
|
5511
|
-
if (!this.content || !this.container || !isVisible(this.$el)) {
|
|
5519
|
+
if (!this.content || !this.container || !isVisible$1(this.$el)) {
|
|
5512
5520
|
return false;
|
|
5513
5521
|
}
|
|
5514
5522
|
return {
|
|
@@ -5665,12 +5673,12 @@
|
|
|
5665
5673
|
],
|
|
5666
5674
|
methods: {
|
|
5667
5675
|
toggle(el, inview) {
|
|
5668
|
-
var _a;
|
|
5669
|
-
const state = this.elementData.get(el);
|
|
5676
|
+
var _a, _b;
|
|
5677
|
+
const state = (_a = this.elementData) == null ? void 0 : _a.get(el);
|
|
5670
5678
|
if (!state) {
|
|
5671
5679
|
return;
|
|
5672
5680
|
}
|
|
5673
|
-
(
|
|
5681
|
+
(_b = state.off) == null ? void 0 : _b.call(state);
|
|
5674
5682
|
css(el, "opacity", !inview && this.hidden ? 0 : "");
|
|
5675
5683
|
toggleClass(el, this.inViewClass, inview);
|
|
5676
5684
|
toggleClass(el, state.cls);
|
|
@@ -5724,7 +5732,7 @@
|
|
|
5724
5732
|
read() {
|
|
5725
5733
|
const targets = this.links.map(getTargetedElement).filter(Boolean);
|
|
5726
5734
|
const { length } = targets;
|
|
5727
|
-
if (!length || !isVisible(this.$el)) {
|
|
5735
|
+
if (!length || !isVisible$1(this.$el)) {
|
|
5728
5736
|
return false;
|
|
5729
5737
|
}
|
|
5730
5738
|
const scrollElement = scrollParent(targets, true);
|
|
@@ -5735,9 +5743,8 @@
|
|
|
5735
5743
|
if (scrollTop === max) {
|
|
5736
5744
|
active = length - 1;
|
|
5737
5745
|
} else {
|
|
5746
|
+
const offsetBy = this.offset + offset(getCoveringElement()).height;
|
|
5738
5747
|
for (let i = 0; i < targets.length; i++) {
|
|
5739
|
-
const fixedEl = getCoveringElement(targets[i]);
|
|
5740
|
-
const offsetBy = this.offset + (fixedEl ? offset(fixedEl).height : 0);
|
|
5741
5748
|
if (offset(targets[i]).top - viewport.top - offsetBy > 0) {
|
|
5742
5749
|
break;
|
|
5743
5750
|
}
|
|
@@ -5820,15 +5827,17 @@
|
|
|
5820
5827
|
this.placeholder = null;
|
|
5821
5828
|
},
|
|
5822
5829
|
observe: [
|
|
5823
|
-
viewport(
|
|
5824
|
-
handler() {
|
|
5825
|
-
if (toPx("100vh", "height") !== this._data.viewport) {
|
|
5826
|
-
this.$emit("resize");
|
|
5827
|
-
}
|
|
5828
|
-
}
|
|
5829
|
-
}),
|
|
5830
|
+
viewport(),
|
|
5830
5831
|
scroll$1({ target: () => document.scrollingElement }),
|
|
5831
|
-
resize({
|
|
5832
|
+
resize({
|
|
5833
|
+
target: ({ $el }) => [$el, parent($el), document.scrollingElement],
|
|
5834
|
+
handler(entries) {
|
|
5835
|
+
this.$emit(
|
|
5836
|
+
this._data.resized && entries.some(({ target }) => target === parent(this.$el)) ? "update" : "resize"
|
|
5837
|
+
);
|
|
5838
|
+
this._data.resized = true;
|
|
5839
|
+
}
|
|
5840
|
+
})
|
|
5832
5841
|
],
|
|
5833
5842
|
events: [
|
|
5834
5843
|
{
|
|
@@ -5854,26 +5863,16 @@
|
|
|
5854
5863
|
}
|
|
5855
5864
|
});
|
|
5856
5865
|
}
|
|
5857
|
-
},
|
|
5858
|
-
{
|
|
5859
|
-
name: "transitionstart",
|
|
5860
|
-
handler() {
|
|
5861
|
-
this.transitionInProgress = once(
|
|
5862
|
-
this.$el,
|
|
5863
|
-
"transitionend transitioncancel",
|
|
5864
|
-
() => this.transitionInProgress = null
|
|
5865
|
-
);
|
|
5866
|
-
}
|
|
5867
5866
|
}
|
|
5868
5867
|
],
|
|
5869
5868
|
update: [
|
|
5870
5869
|
{
|
|
5871
|
-
read({ height: height$1, width, margin, sticky }) {
|
|
5872
|
-
this.inactive = !this.matchMedia || !isVisible(this.$el);
|
|
5870
|
+
read({ height: height$1, width, margin, sticky }, types) {
|
|
5871
|
+
this.inactive = !this.matchMedia || !isVisible$1(this.$el);
|
|
5873
5872
|
if (this.inactive) {
|
|
5874
5873
|
return;
|
|
5875
5874
|
}
|
|
5876
|
-
const hide = this.isFixed &&
|
|
5875
|
+
const hide = this.isFixed && types.has("update");
|
|
5877
5876
|
if (hide) {
|
|
5878
5877
|
preventTransition(this.target);
|
|
5879
5878
|
this.hide();
|
|
@@ -5923,7 +5922,8 @@
|
|
|
5923
5922
|
margin,
|
|
5924
5923
|
top: offsetPosition(referenceElement)[0],
|
|
5925
5924
|
sticky,
|
|
5926
|
-
viewport: viewport2
|
|
5925
|
+
viewport: viewport2,
|
|
5926
|
+
maxScrollHeight
|
|
5927
5927
|
};
|
|
5928
5928
|
},
|
|
5929
5929
|
write({ height, width, margin, offset, sticky }) {
|
|
@@ -5956,9 +5956,10 @@
|
|
|
5956
5956
|
end,
|
|
5957
5957
|
elHeight,
|
|
5958
5958
|
height,
|
|
5959
|
-
sticky
|
|
5959
|
+
sticky,
|
|
5960
|
+
maxScrollHeight
|
|
5960
5961
|
}) {
|
|
5961
|
-
const scroll2 = document.scrollingElement.scrollTop;
|
|
5962
|
+
const scroll2 = Math.min(document.scrollingElement.scrollTop, maxScrollHeight);
|
|
5962
5963
|
const dir = prevScroll <= scroll2 ? "down" : "up";
|
|
5963
5964
|
const referenceElement = this.isFixed ? this.placeholder : this.$el;
|
|
5964
5965
|
return {
|
|
@@ -6124,7 +6125,7 @@
|
|
|
6124
6125
|
}
|
|
6125
6126
|
|
|
6126
6127
|
function getMaxPathLength(el) {
|
|
6127
|
-
return isVisible(el) ? Math.ceil(Math.max(0, ...$$("[stroke]", el).map((stroke) => stroke.getTotalLength()))) : 0;
|
|
6128
|
+
return isVisible$1(el) ? Math.ceil(Math.max(0, ...$$("[stroke]", el).map((stroke) => stroke.getTotalLength()))) : 0;
|
|
6128
6129
|
}
|
|
6129
6130
|
|
|
6130
6131
|
var svg = {
|