uikit 3.25.28-dev.fcd5185 → 3.25.29-dev.7b0f736
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 +9 -0
- package/build/ci-release.js +1 -4
- 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 +10 -9
- package/dist/js/components/filter.min.js +1 -1
- package/dist/js/components/lightbox-panel.js +12 -11
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +12 -11
- 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 +10 -9
- 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 +10 -9
- 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 -9
- package/dist/js/components/slideshow.min.js +1 -1
- package/dist/js/components/sortable.js +10 -9
- 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 +35 -48
- package/dist/js/components/upload.min.js +1 -1
- package/dist/js/uikit-core.js +30 -30
- 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 +64 -77
- package/dist/js/uikit.min.js +1 -1
- package/package.json +1 -1
- package/src/js/api/component.js +1 -1
- package/src/js/api/computed.js +1 -1
- package/src/js/api/log.js +1 -1
- package/src/js/api/observables.js +5 -4
- package/src/js/api/observer.js +3 -4
- package/src/js/api/update.js +10 -9
- package/src/js/components/upload.js +38 -49
- package/src/js/core/drop.js +4 -4
- package/src/js/core/form-custom.js +3 -8
- package/src/js/core/svg.js +1 -1
- package/src/js/core/toggle.js +0 -2
- package/src/js/mixin/modal.js +1 -1
package/dist/js/uikit.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.25.
|
|
1
|
+
/*! UIkit 3.25.29-dev.7b0f736 | 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() :
|
|
@@ -1912,22 +1912,23 @@
|
|
|
1912
1912
|
if (!instance._updates.length) {
|
|
1913
1913
|
return;
|
|
1914
1914
|
}
|
|
1915
|
-
if (!instance._updateCount) {
|
|
1916
|
-
instance._updateCount = 0;
|
|
1917
|
-
requestAnimationFrame(() => instance._updateCount = 0);
|
|
1918
|
-
}
|
|
1919
1915
|
if (!instance._queued) {
|
|
1920
1916
|
instance._queued = /* @__PURE__ */ new Set();
|
|
1921
1917
|
fastdom.read(() => {
|
|
1922
1918
|
if (instance._connected) {
|
|
1923
|
-
|
|
1919
|
+
if (!instance._updateCount) {
|
|
1920
|
+
instance._updateCount = 0;
|
|
1921
|
+
requestAnimationFrame(() => instance._updateCount = 0);
|
|
1922
|
+
}
|
|
1923
|
+
if (instance._updateCount < 10) {
|
|
1924
|
+
instance._updateCount++;
|
|
1925
|
+
runUpdates(instance, instance._queued);
|
|
1926
|
+
}
|
|
1924
1927
|
}
|
|
1925
1928
|
instance._queued = null;
|
|
1926
1929
|
});
|
|
1927
1930
|
}
|
|
1928
|
-
|
|
1929
|
-
instance._queued.add(e.type || e);
|
|
1930
|
-
}
|
|
1931
|
+
instance._queued.add(e.type || e);
|
|
1931
1932
|
}
|
|
1932
1933
|
function runUpdates(instance, types) {
|
|
1933
1934
|
for (const { read, write, events = [] } of instance._updates) {
|
|
@@ -2002,8 +2003,11 @@
|
|
|
2002
2003
|
const pos = getEventPos(e);
|
|
2003
2004
|
const target = "tagName" in e.target ? e.target : parent(e.target);
|
|
2004
2005
|
once(document, `${pointerUp$1} ${pointerCancel} scroll`, (e2) => {
|
|
2006
|
+
if (e2.type !== pointerUp$1 || !target) {
|
|
2007
|
+
return;
|
|
2008
|
+
}
|
|
2005
2009
|
const { x, y } = getEventPos(e2);
|
|
2006
|
-
if (
|
|
2010
|
+
if (x && Math.abs(pos.x - x) > 100 || y && Math.abs(pos.y - y) > 100) {
|
|
2007
2011
|
setTimeout(() => {
|
|
2008
2012
|
trigger(target, "swipe");
|
|
2009
2013
|
trigger(target, `swipe${swipeDirection(pos.x, pos.y, x, y)}`);
|
|
@@ -3065,13 +3069,13 @@
|
|
|
3065
3069
|
let rejectAnimation;
|
|
3066
3070
|
return new Promise(
|
|
3067
3071
|
(resolve, reject) => once(el, "show hide", () => {
|
|
3068
|
-
var _a, _b
|
|
3072
|
+
var _a, _b;
|
|
3069
3073
|
(_a = pendingReject.get(el)) == null ? void 0 : _a();
|
|
3070
3074
|
rejectAnimation = reject;
|
|
3071
3075
|
pendingReject.set(el, reject);
|
|
3072
3076
|
_toggle(el, show);
|
|
3073
3077
|
Promise.all(
|
|
3074
|
-
((
|
|
3078
|
+
(((_b = transitionElement == null ? void 0 : transitionElement.getAnimations) == null ? void 0 : _b.call(transitionElement)) || []).map(({ finished }) => finished)
|
|
3075
3079
|
).then(resolve, reject);
|
|
3076
3080
|
})
|
|
3077
3081
|
).then(() => {
|
|
@@ -3419,7 +3423,7 @@
|
|
|
3419
3423
|
return Math.atan2(Math.abs(pos2.y - pos1.y), Math.abs(pos2.x - pos1.x)) * 180 / Math.PI;
|
|
3420
3424
|
}
|
|
3421
3425
|
|
|
3422
|
-
var VERSION = '3.25.
|
|
3426
|
+
var VERSION = '3.25.29-dev.7b0f736';
|
|
3423
3427
|
|
|
3424
3428
|
function initWatches(instance) {
|
|
3425
3429
|
instance._watches = [];
|
|
@@ -3502,7 +3506,7 @@
|
|
|
3502
3506
|
});
|
|
3503
3507
|
}
|
|
3504
3508
|
function resetComputed(instance) {
|
|
3505
|
-
const values =
|
|
3509
|
+
const values = instance._computed;
|
|
3506
3510
|
instance._computed = {};
|
|
3507
3511
|
return values;
|
|
3508
3512
|
}
|
|
@@ -3538,16 +3542,15 @@
|
|
|
3538
3542
|
}
|
|
3539
3543
|
|
|
3540
3544
|
function initObservers(instance) {
|
|
3541
|
-
for (const observer of instance.$options.observe || []) {
|
|
3542
|
-
registerObservable(instance, observer);
|
|
3545
|
+
for (const [index, observer] of (instance.$options.observe || []).entries()) {
|
|
3546
|
+
registerObservable(instance, observer, `_observe${index}`);
|
|
3543
3547
|
}
|
|
3544
3548
|
}
|
|
3545
|
-
function registerObservable(instance, observable) {
|
|
3549
|
+
function registerObservable(instance, observable, key) {
|
|
3546
3550
|
let { observe, target = instance.$el, handler, options, filter, args } = observable;
|
|
3547
3551
|
if (filter && !filter.call(instance, instance)) {
|
|
3548
3552
|
return;
|
|
3549
3553
|
}
|
|
3550
|
-
const key = `_observe${instance._disconnect.length}`;
|
|
3551
3554
|
if (isFunction(target) && !hasOwn(instance, key)) {
|
|
3552
3555
|
registerComputed(instance, key, () => {
|
|
3553
3556
|
const targets2 = target.call(instance, instance);
|
|
@@ -3748,7 +3751,7 @@
|
|
|
3748
3751
|
const elementComponents = /* @__PURE__ */ new WeakMap();
|
|
3749
3752
|
const components$2 = {};
|
|
3750
3753
|
function component(name, options) {
|
|
3751
|
-
var _a
|
|
3754
|
+
var _a;
|
|
3752
3755
|
const id = PREFIX + hyphenate(name);
|
|
3753
3756
|
if (!options) {
|
|
3754
3757
|
if (!components$2[id].options) {
|
|
@@ -3758,10 +3761,10 @@
|
|
|
3758
3761
|
}
|
|
3759
3762
|
name = camelize(name);
|
|
3760
3763
|
App[name] = (element, data) => createComponent(name, element, data);
|
|
3761
|
-
const opt =
|
|
3764
|
+
const opt = options.options || { ...options };
|
|
3762
3765
|
opt.id = id;
|
|
3763
3766
|
opt.name = name;
|
|
3764
|
-
(
|
|
3767
|
+
(_a = opt.install) == null ? void 0 : _a.call(opt, App, opt, name);
|
|
3765
3768
|
if (App._initialized && !opt.functional) {
|
|
3766
3769
|
requestAnimationFrame(() => createComponent(name, `[${id}],[data-${id}]`));
|
|
3767
3770
|
}
|
|
@@ -6518,37 +6521,37 @@
|
|
|
6518
6521
|
},
|
|
6519
6522
|
methods: {
|
|
6520
6523
|
async upload(files) {
|
|
6521
|
-
|
|
6522
|
-
|
|
6523
|
-
|
|
6524
|
-
}
|
|
6525
|
-
if (!this.multiple) {
|
|
6526
|
-
files = files.slice(0, 1);
|
|
6527
|
-
}
|
|
6528
|
-
trigger(this.$el, "upload", [files]);
|
|
6529
|
-
for (const file of files) {
|
|
6530
|
-
if (this.maxSize && this.maxSize * 1e3 < file.size) {
|
|
6531
|
-
this.fail(this.t("invalidSize", this.maxSize));
|
|
6524
|
+
try {
|
|
6525
|
+
files = toArray(files);
|
|
6526
|
+
if (!files.length) {
|
|
6532
6527
|
return;
|
|
6533
6528
|
}
|
|
6534
|
-
if (
|
|
6535
|
-
|
|
6536
|
-
return;
|
|
6529
|
+
if (!this.multiple) {
|
|
6530
|
+
files = files.slice(0, 1);
|
|
6537
6531
|
}
|
|
6538
|
-
|
|
6539
|
-
|
|
6540
|
-
|
|
6541
|
-
|
|
6542
|
-
|
|
6543
|
-
|
|
6544
|
-
|
|
6545
|
-
|
|
6546
|
-
|
|
6547
|
-
|
|
6548
|
-
|
|
6549
|
-
|
|
6532
|
+
trigger(this.$el, "upload", [files]);
|
|
6533
|
+
for (const file of files) {
|
|
6534
|
+
if (this.maxSize && this.maxSize * 1e3 < file.size) {
|
|
6535
|
+
this.fail(this.t("invalidSize", this.maxSize));
|
|
6536
|
+
return;
|
|
6537
|
+
}
|
|
6538
|
+
if (this.allow && !match$1(this.allow, file.name)) {
|
|
6539
|
+
this.fail(this.t("invalidName", this.allow));
|
|
6540
|
+
return;
|
|
6541
|
+
}
|
|
6542
|
+
if (this.mime && !match$1(this.mime, file.type)) {
|
|
6543
|
+
this.fail(this.t("invalidMime", this.mime));
|
|
6544
|
+
return;
|
|
6545
|
+
}
|
|
6550
6546
|
}
|
|
6551
|
-
|
|
6547
|
+
await this.beforeAll(this, files);
|
|
6548
|
+
const size = this.concurrent;
|
|
6549
|
+
for (let i = 0; i < files.length; i += size) {
|
|
6550
|
+
const data = new FormData();
|
|
6551
|
+
files.slice(i, i + size).forEach((file) => data.append(this.name, file));
|
|
6552
|
+
for (const key in this.params) {
|
|
6553
|
+
data.append(key, this.params[key]);
|
|
6554
|
+
}
|
|
6552
6555
|
const xhr = await ajax(this.url, {
|
|
6553
6556
|
data,
|
|
6554
6557
|
method: this.method,
|
|
@@ -6563,38 +6566,25 @@
|
|
|
6563
6566
|
}
|
|
6564
6567
|
});
|
|
6565
6568
|
this.complete(xhr);
|
|
6566
|
-
if (
|
|
6567
|
-
await upload(chunks.shift());
|
|
6568
|
-
} else {
|
|
6569
|
+
if (i + size >= files.length) {
|
|
6569
6570
|
this.completeAll(xhr);
|
|
6570
6571
|
}
|
|
6571
|
-
} catch (e) {
|
|
6572
|
-
if (e.name !== "AbortError") {
|
|
6573
|
-
this.error(e);
|
|
6574
|
-
}
|
|
6575
6572
|
}
|
|
6576
|
-
}
|
|
6577
|
-
|
|
6573
|
+
} catch (e) {
|
|
6574
|
+
if ((e == null ? void 0 : e.name) !== "AbortError") {
|
|
6575
|
+
this.error(e);
|
|
6576
|
+
}
|
|
6577
|
+
}
|
|
6578
6578
|
}
|
|
6579
6579
|
}
|
|
6580
6580
|
};
|
|
6581
6581
|
function match$1(pattern, path) {
|
|
6582
6582
|
const expression = pattern.replace(
|
|
6583
6583
|
/\*\*|[.*+?^${}()|[\]\\]/g,
|
|
6584
|
-
(s) => {
|
|
6585
|
-
var _a;
|
|
6586
|
-
return (_a = { "**": ".*", "*": "[^/]+", "?": "[^/]", "|": "|" }[s]) != null ? _a : `\\${s}`;
|
|
6587
|
-
}
|
|
6584
|
+
(s) => ({ "**": ".*", "*": "[^/]+", "?": "[^/]", "|": "|" })[s] || `\\${s}`
|
|
6588
6585
|
);
|
|
6589
6586
|
return new RegExp(`^(?:${expression})$`, "i").test(path);
|
|
6590
6587
|
}
|
|
6591
|
-
function chunk(files, size) {
|
|
6592
|
-
const chunks = [];
|
|
6593
|
-
for (let i = 0; i < files.length; i += size) {
|
|
6594
|
-
chunks.push(files.slice(i, i + size));
|
|
6595
|
-
}
|
|
6596
|
-
return chunks;
|
|
6597
|
-
}
|
|
6598
6588
|
function stop(e) {
|
|
6599
6589
|
e.preventDefault();
|
|
6600
6590
|
e.stopPropagation();
|
|
@@ -7173,11 +7163,10 @@
|
|
|
7173
7163
|
attr(this.targetEl, "aria-expanded", false);
|
|
7174
7164
|
this._style = pick(this.$el.style, ["width", "height"]);
|
|
7175
7165
|
},
|
|
7166
|
+
beforeDisconnect() {
|
|
7167
|
+
this.hide(false, false);
|
|
7168
|
+
},
|
|
7176
7169
|
disconnected() {
|
|
7177
|
-
if (this.isActive()) {
|
|
7178
|
-
this.hide(false);
|
|
7179
|
-
active = null;
|
|
7180
|
-
}
|
|
7181
7170
|
css(this.$el, this._style);
|
|
7182
7171
|
},
|
|
7183
7172
|
events: [
|
|
@@ -7803,15 +7792,14 @@
|
|
|
7803
7792
|
}
|
|
7804
7793
|
},
|
|
7805
7794
|
update() {
|
|
7806
|
-
var _a;
|
|
7795
|
+
var _a, _b, _c, _d, _e, _f;
|
|
7807
7796
|
const { target, input } = this;
|
|
7808
7797
|
if (!target) {
|
|
7809
7798
|
return;
|
|
7810
7799
|
}
|
|
7811
|
-
let option;
|
|
7812
7800
|
const prop = isInput(target) ? "value" : "textContent";
|
|
7813
7801
|
const prev = target[prop];
|
|
7814
|
-
const value = ((_a = input.files) == null ? void 0 : _a[0]) ?
|
|
7802
|
+
const value = (_f = (_e = (_b = (_a = input.files) == null ? void 0 : _a[0]) == null ? void 0 : _b.name) != null ? _e : (_d = (_c = input.selectedOptions) == null ? void 0 : _c[0]) == null ? void 0 : _d.label) != null ? _f : input.value;
|
|
7815
7803
|
if (prev !== value) {
|
|
7816
7804
|
target[prop] = value;
|
|
7817
7805
|
}
|
|
@@ -9750,7 +9738,7 @@
|
|
|
9750
9738
|
const loadSVG = memoize(async (src) => {
|
|
9751
9739
|
if (src) {
|
|
9752
9740
|
const response = await fetch(src);
|
|
9753
|
-
if (response.headers.get("Content-Type")
|
|
9741
|
+
if (/^image\/svg\+xml\s*(;|$)/i.test(response.headers.get("Content-Type"))) {
|
|
9754
9742
|
return response.text();
|
|
9755
9743
|
}
|
|
9756
9744
|
}
|
|
@@ -10072,7 +10060,6 @@
|
|
|
10072
10060
|
{
|
|
10073
10061
|
name: "mediachange",
|
|
10074
10062
|
filter: ({ mode }) => includes(mode, "media"),
|
|
10075
|
-
el: ({ target }) => target,
|
|
10076
10063
|
handler(e, mediaObj) {
|
|
10077
10064
|
if (mediaObj.matches ^ this.isToggled(this.target)) {
|
|
10078
10065
|
this.toggle();
|