uikit 3.20.9-dev.50e5c71c4 → 3.20.9-dev.a82d76e5b
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 +1 -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 +1 -1
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +1 -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 +1 -1
- 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 +1 -1
- 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 +34 -22
- 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 +39 -27
- package/dist/js/uikit.min.js +1 -1
- package/package.json +1 -1
- package/src/js/api/component.js +1 -1
- package/src/js/core/inverse.js +30 -3
- package/src/js/core/modal.js +1 -1
- package/tests/modal.html +1 -1
package/dist/js/uikit.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.20.9-dev.
|
|
1
|
+
/*! UIkit 3.20.9-dev.a82d76e5b | 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);
|
|
@@ -1611,7 +1611,7 @@
|
|
|
1611
1611
|
isTouch: isTouch,
|
|
1612
1612
|
isUndefined: isUndefined,
|
|
1613
1613
|
isVideo: isVideo,
|
|
1614
|
-
isVisible: isVisible,
|
|
1614
|
+
isVisible: isVisible$1,
|
|
1615
1615
|
isVoidElement: isVoidElement,
|
|
1616
1616
|
isWindow: isWindow,
|
|
1617
1617
|
last: last,
|
|
@@ -2065,7 +2065,7 @@
|
|
|
2065
2065
|
(el, i) => i && elements[i - 1].offsetParent !== el.offsetParent
|
|
2066
2066
|
);
|
|
2067
2067
|
for (const el of elements) {
|
|
2068
|
-
if (!isVisible(el)) {
|
|
2068
|
+
if (!isVisible$1(el)) {
|
|
2069
2069
|
continue;
|
|
2070
2070
|
}
|
|
2071
2071
|
const offset = getOffset(el, withOffset);
|
|
@@ -2149,7 +2149,7 @@
|
|
|
2149
2149
|
}
|
|
2150
2150
|
function getProps$1(el, opacity) {
|
|
2151
2151
|
const zIndex = css(el, "zIndex");
|
|
2152
|
-
return isVisible(el) ? {
|
|
2152
|
+
return isVisible$1(el) ? {
|
|
2153
2153
|
display: "",
|
|
2154
2154
|
opacity: opacity ? css(el, "opacity") : "0",
|
|
2155
2155
|
pointerEvents: "none",
|
|
@@ -2160,7 +2160,7 @@
|
|
|
2160
2160
|
}
|
|
2161
2161
|
function getTransitionProps(target, nodes, currentProps) {
|
|
2162
2162
|
const propsTo = nodes.map(
|
|
2163
|
-
(el, i) => parent(el) && i in currentProps ? currentProps[i] ? isVisible(el) ? getPositionWithMargin(el) : { opacity: 0 } : { opacity: isVisible(el) ? 1 : 0 } : false
|
|
2163
|
+
(el, i) => parent(el) && i in currentProps ? currentProps[i] ? isVisible$1(el) ? getPositionWithMargin(el) : { opacity: 0 } : { opacity: isVisible$1(el) ? 1 : 0 } : false
|
|
2164
2164
|
);
|
|
2165
2165
|
const propsFrom = propsTo.map((props, i) => {
|
|
2166
2166
|
const from = parent(nodes[i]) === target && (currentProps[i] || getProps$1(nodes[i]));
|
|
@@ -2274,7 +2274,7 @@
|
|
|
2274
2274
|
);
|
|
2275
2275
|
}
|
|
2276
2276
|
function getTransitionNodes(target) {
|
|
2277
|
-
return getRows(children(target)).flat().filter(isVisible);
|
|
2277
|
+
return getRows(children(target)).flat().filter(isVisible$1);
|
|
2278
2278
|
}
|
|
2279
2279
|
function awaitTimeout(timeout) {
|
|
2280
2280
|
return new Promise((resolve) => setTimeout(resolve, timeout));
|
|
@@ -2572,7 +2572,7 @@
|
|
|
2572
2572
|
},
|
|
2573
2573
|
isToggled(el = this.$el) {
|
|
2574
2574
|
el = toNode(el);
|
|
2575
|
-
return hasClass(el, this.clsEnter) ? true : hasClass(el, this.clsLeave) ? false : this.cls ? hasClass(el, this.cls.split(" ")[0]) : isVisible(el);
|
|
2575
|
+
return hasClass(el, this.clsEnter) ? true : hasClass(el, this.clsLeave) ? false : this.cls ? hasClass(el, this.cls.split(" ")[0]) : isVisible$1(el);
|
|
2576
2576
|
},
|
|
2577
2577
|
_toggle(el, toggled) {
|
|
2578
2578
|
if (!el) {
|
|
@@ -2587,7 +2587,7 @@
|
|
|
2587
2587
|
changed = toggled === el.hidden;
|
|
2588
2588
|
changed && (el.hidden = !toggled);
|
|
2589
2589
|
}
|
|
2590
|
-
$$("[autofocus]", el).some((el2) => isVisible(el2) ? el2.focus() || true : el2.blur());
|
|
2590
|
+
$$("[autofocus]", el).some((el2) => isVisible$1(el2) ? el2.focus() || true : el2.blur());
|
|
2591
2591
|
if (changed) {
|
|
2592
2592
|
trigger(el, "toggled", [toggled, this]);
|
|
2593
2593
|
}
|
|
@@ -3555,7 +3555,7 @@
|
|
|
3555
3555
|
};
|
|
3556
3556
|
App.util = util;
|
|
3557
3557
|
App.options = {};
|
|
3558
|
-
App.version = "3.20.9-dev.
|
|
3558
|
+
App.version = "3.20.9-dev.a82d76e5b";
|
|
3559
3559
|
|
|
3560
3560
|
const PREFIX = "uk-";
|
|
3561
3561
|
const DATA = "__uikit__";
|
|
@@ -3610,7 +3610,7 @@
|
|
|
3610
3610
|
function detachFromElement(element, instance) {
|
|
3611
3611
|
var _a;
|
|
3612
3612
|
(_a = element[DATA]) == null ? true : delete _a[instance.$options.name];
|
|
3613
|
-
if (
|
|
3613
|
+
if (isEmpty(element[DATA])) {
|
|
3614
3614
|
delete element[DATA];
|
|
3615
3615
|
}
|
|
3616
3616
|
}
|
|
@@ -4557,7 +4557,7 @@
|
|
|
4557
4557
|
}
|
|
4558
4558
|
|
|
4559
4559
|
function getMaxPathLength(el) {
|
|
4560
|
-
return isVisible(el) ? Math.ceil(Math.max(0, ...$$("[stroke]", el).map((stroke) => stroke.getTotalLength()))) : 0;
|
|
4560
|
+
return isVisible$1(el) ? Math.ceil(Math.max(0, ...$$("[stroke]", el).map((stroke) => stroke.getTotalLength()))) : 0;
|
|
4561
4561
|
}
|
|
4562
4562
|
|
|
4563
4563
|
const props = {
|
|
@@ -4904,7 +4904,7 @@
|
|
|
4904
4904
|
if (!types.has("scroll")) {
|
|
4905
4905
|
percent = false;
|
|
4906
4906
|
}
|
|
4907
|
-
if (!isVisible(this.$el)) {
|
|
4907
|
+
if (!isVisible$1(this.$el)) {
|
|
4908
4908
|
return false;
|
|
4909
4909
|
}
|
|
4910
4910
|
if (!this.matchMedia) {
|
|
@@ -5259,7 +5259,7 @@
|
|
|
5259
5259
|
};
|
|
5260
5260
|
},
|
|
5261
5261
|
slides() {
|
|
5262
|
-
return children(this.list).filter(isVisible);
|
|
5262
|
+
return children(this.list).filter(isVisible$1);
|
|
5263
5263
|
}
|
|
5264
5264
|
},
|
|
5265
5265
|
connected() {
|
|
@@ -7766,7 +7766,7 @@
|
|
|
7766
7766
|
}
|
|
7767
7767
|
function getHeight(element) {
|
|
7768
7768
|
const style = pick(element.style, ["display", "minHeight"]);
|
|
7769
|
-
if (!isVisible(element)) {
|
|
7769
|
+
if (!isVisible$1(element)) {
|
|
7770
7770
|
css(element, "display", "block", "important");
|
|
7771
7771
|
}
|
|
7772
7772
|
css(element, "minHeight", "");
|
|
@@ -7821,7 +7821,7 @@
|
|
|
7821
7821
|
],
|
|
7822
7822
|
update: {
|
|
7823
7823
|
read() {
|
|
7824
|
-
if (!isVisible(this.$el)) {
|
|
7824
|
+
if (!isVisible$1(this.$el)) {
|
|
7825
7825
|
return false;
|
|
7826
7826
|
}
|
|
7827
7827
|
let minHeight = "";
|
|
@@ -8347,11 +8347,11 @@
|
|
|
8347
8347
|
let last;
|
|
8348
8348
|
for (const percent of [0.25, 0.5, 0.75]) {
|
|
8349
8349
|
const elements = target.ownerDocument.elementsFromPoint(
|
|
8350
|
-
Math.max(0, left
|
|
8351
|
-
Math.max(0, top
|
|
8350
|
+
Math.max(0, left + width * percent),
|
|
8351
|
+
Math.max(0, top + height / 2)
|
|
8352
8352
|
);
|
|
8353
8353
|
for (const element of elements) {
|
|
8354
|
-
if (target.contains(element) || element.closest('[class*="-leave"]') && elements.some((el) => element !== el && matches(el, '[class*="-enter"]'))) {
|
|
8354
|
+
if (target.contains(element) || !isVisible(element) || element.closest('[class*="-leave"]') && elements.some((el) => element !== el && matches(el, '[class*="-enter"]'))) {
|
|
8355
8355
|
continue;
|
|
8356
8356
|
}
|
|
8357
8357
|
const color = css(element, "--uk-inverse");
|
|
@@ -8366,6 +8366,18 @@
|
|
|
8366
8366
|
}
|
|
8367
8367
|
return last ? `uk-${last}` : "";
|
|
8368
8368
|
}
|
|
8369
|
+
function isVisible(element) {
|
|
8370
|
+
if (css(element, "visibility") !== "visible") {
|
|
8371
|
+
return false;
|
|
8372
|
+
}
|
|
8373
|
+
while (element) {
|
|
8374
|
+
if (css(element, "opacity") === "0") {
|
|
8375
|
+
return false;
|
|
8376
|
+
}
|
|
8377
|
+
element = parent(element);
|
|
8378
|
+
}
|
|
8379
|
+
return true;
|
|
8380
|
+
}
|
|
8369
8381
|
|
|
8370
8382
|
var leader = {
|
|
8371
8383
|
mixins: [Class, Media],
|
|
@@ -8479,7 +8491,7 @@
|
|
|
8479
8491
|
};
|
|
8480
8492
|
modal.prompt = function(message, value, options) {
|
|
8481
8493
|
const promise = openDialog(
|
|
8482
|
-
({ i18n }) => `<form class="uk-form-stacked"> <div class="uk-modal-body"> <label>${isString(message) ? message : html(message)}</label> <input class="uk-input"
|
|
8494
|
+
({ i18n }) => `<form class="uk-form-stacked"> <div class="uk-modal-body"> <label>${isString(message) ? message : html(message)}</label> <input class="uk-input" autofocus> </div> <div class="uk-modal-footer uk-text-right"> <button class="uk-button uk-button-default uk-modal-close" type="button">${i18n.cancel}</button> <button class="uk-button uk-button-primary">${i18n.ok}</button> </div> </form>`,
|
|
8483
8495
|
options,
|
|
8484
8496
|
() => null,
|
|
8485
8497
|
() => input.value
|
|
@@ -8639,7 +8651,7 @@
|
|
|
8639
8651
|
observe: swipe({ filter: ({ swiping }) => swiping }),
|
|
8640
8652
|
update: {
|
|
8641
8653
|
read() {
|
|
8642
|
-
if (this.isToggled() && !isVisible(this.$el)) {
|
|
8654
|
+
if (this.isToggled() && !isVisible$1(this.$el)) {
|
|
8643
8655
|
this.hide();
|
|
8644
8656
|
}
|
|
8645
8657
|
},
|
|
@@ -8746,7 +8758,7 @@
|
|
|
8746
8758
|
}),
|
|
8747
8759
|
update: {
|
|
8748
8760
|
read() {
|
|
8749
|
-
if (!this.content || !this.container || !isVisible(this.$el)) {
|
|
8761
|
+
if (!this.content || !this.container || !isVisible$1(this.$el)) {
|
|
8750
8762
|
return false;
|
|
8751
8763
|
}
|
|
8752
8764
|
return {
|
|
@@ -8962,7 +8974,7 @@
|
|
|
8962
8974
|
read() {
|
|
8963
8975
|
const targets = this.links.map(getTargetedElement).filter(Boolean);
|
|
8964
8976
|
const { length } = targets;
|
|
8965
|
-
if (!length || !isVisible(this.$el)) {
|
|
8977
|
+
if (!length || !isVisible$1(this.$el)) {
|
|
8966
8978
|
return false;
|
|
8967
8979
|
}
|
|
8968
8980
|
const scrollElement = scrollParent(targets, true);
|
|
@@ -9107,7 +9119,7 @@
|
|
|
9107
9119
|
update: [
|
|
9108
9120
|
{
|
|
9109
9121
|
read({ height: height$1, width, margin, sticky }) {
|
|
9110
|
-
this.inactive = !this.matchMedia || !isVisible(this.$el);
|
|
9122
|
+
this.inactive = !this.matchMedia || !isVisible$1(this.$el);
|
|
9111
9123
|
if (this.inactive) {
|
|
9112
9124
|
return;
|
|
9113
9125
|
}
|