uikit 3.25.28-dev.25f0658 → 3.25.28-dev.6d5160a
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 +3 -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 +2 -2
- 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 +2 -2
- 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 +41 -49
- package/dist/js/components/upload.min.js +1 -1
- package/dist/js/uikit-core.js +4 -4
- 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 +46 -54
- package/dist/js/uikit.min.js +1 -1
- package/package.json +1 -1
- package/src/js/components/parallax.js +1 -1
- package/src/js/components/slideshow.js +1 -1
- package/src/js/components/upload.js +41 -56
- package/src/js/core/scrollspy-nav.js +0 -1
- package/src/js/core/svg.js +1 -1
- package/src/js/util/style.js +1 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.25.28-dev.
|
|
1
|
+
/*! UIkit 3.25.28-dev.6d5160a | 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(require('uikit-util')) :
|
|
@@ -103,37 +103,37 @@
|
|
|
103
103
|
},
|
|
104
104
|
methods: {
|
|
105
105
|
async upload(files) {
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
}
|
|
110
|
-
if (!this.multiple) {
|
|
111
|
-
files = files.slice(0, 1);
|
|
112
|
-
}
|
|
113
|
-
uikitUtil.trigger(this.$el, "upload", [files]);
|
|
114
|
-
for (const file of files) {
|
|
115
|
-
if (this.maxSize && this.maxSize * 1e3 < file.size) {
|
|
116
|
-
this.fail(this.t("invalidSize", this.maxSize));
|
|
106
|
+
try {
|
|
107
|
+
files = uikitUtil.toArray(files);
|
|
108
|
+
if (!files.length) {
|
|
117
109
|
return;
|
|
118
110
|
}
|
|
119
|
-
if (
|
|
120
|
-
|
|
121
|
-
return;
|
|
111
|
+
if (!this.multiple) {
|
|
112
|
+
files = files.slice(0, 1);
|
|
122
113
|
}
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
114
|
+
uikitUtil.trigger(this.$el, "upload", [files]);
|
|
115
|
+
for (const file of files) {
|
|
116
|
+
if (this.maxSize && this.maxSize * 1e3 < file.size) {
|
|
117
|
+
this.fail(this.t("invalidSize", this.maxSize));
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
if (this.allow && !match(this.allow, file.name)) {
|
|
121
|
+
this.fail(this.t("invalidName", this.allow));
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
if (this.mime && !match(this.mime, file.type)) {
|
|
125
|
+
this.fail(this.t("invalidMime", this.mime));
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
135
128
|
}
|
|
136
|
-
|
|
129
|
+
await this.beforeAll(this, files);
|
|
130
|
+
const size = this.concurrent;
|
|
131
|
+
for (let i = 0; i < files.length; i += size) {
|
|
132
|
+
const data = new FormData();
|
|
133
|
+
files.slice(i, i + size).forEach((file) => data.append(this.name, file));
|
|
134
|
+
for (const key in this.params) {
|
|
135
|
+
data.append(key, this.params[key]);
|
|
136
|
+
}
|
|
137
137
|
const xhr = await ajax(this.url, {
|
|
138
138
|
data,
|
|
139
139
|
method: this.method,
|
|
@@ -148,35 +148,27 @@
|
|
|
148
148
|
}
|
|
149
149
|
});
|
|
150
150
|
this.complete(xhr);
|
|
151
|
-
if (
|
|
152
|
-
await upload(chunks.shift());
|
|
153
|
-
} else {
|
|
151
|
+
if (i + size >= files.length) {
|
|
154
152
|
this.completeAll(xhr);
|
|
155
153
|
}
|
|
156
|
-
} catch (e) {
|
|
157
|
-
if (e.name !== "AbortError") {
|
|
158
|
-
this.error(e);
|
|
159
|
-
}
|
|
160
154
|
}
|
|
161
|
-
}
|
|
162
|
-
|
|
155
|
+
} catch (e) {
|
|
156
|
+
if ((e == null ? void 0 : e.name) !== "AbortError") {
|
|
157
|
+
this.error(e);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
163
160
|
}
|
|
164
161
|
}
|
|
165
162
|
};
|
|
166
163
|
function match(pattern, path) {
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
164
|
+
const expression = pattern.replace(
|
|
165
|
+
/\*\*|[.*+?^${}()|[\]\\]/g,
|
|
166
|
+
(s) => {
|
|
167
|
+
var _a;
|
|
168
|
+
return (_a = { "**": ".*", "*": "[^/]+", "?": "[^/]", "|": "|" }[s]) != null ? _a : `\\${s}`;
|
|
169
|
+
}
|
|
172
170
|
);
|
|
173
|
-
|
|
174
|
-
function chunk(files, size) {
|
|
175
|
-
const chunks = [];
|
|
176
|
-
for (let i = 0; i < files.length; i += size) {
|
|
177
|
-
chunks.push(files.slice(i, i + size));
|
|
178
|
-
}
|
|
179
|
-
return chunks;
|
|
171
|
+
return new RegExp(`^(?:${expression})$`, "i").test(path);
|
|
180
172
|
}
|
|
181
173
|
function stop(e) {
|
|
182
174
|
e.preventDefault();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.25.28-dev.
|
|
1
|
+
/*! UIkit 3.25.28-dev.6d5160a | https://www.getuikit.com | (c) 2014 - 2026 YOOtheme | MIT License */(function(r,i){typeof exports=="object"&&typeof module<"u"?module.exports=i(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitupload",["uikit-util"],i):(r=typeof globalThis<"u"?globalThis:r||self,r.UIkitUpload=i(r.UIkit.util))})(this,(function(r){"use strict";var i={props:{i18n:Object},data:{i18n:null},methods:{t(e,...t){var n,s,o;let a=0;return((o=((n=this.i18n)==null?void 0:n[e])||((s=this.$options.i18n)==null?void 0:s[e]))==null?void 0:o.replace(/%s/g,()=>t[a++]||""))||""}}},d={mixins:[i],i18n:{invalidMime:"Invalid File Type: %s",invalidName:"Invalid File Name: %s",invalidSize:"Invalid File Size: %s Kilobytes Max"},props:{allow:String,clsDragover:String,concurrent:Number,maxSize:Number,method:String,mime:String,multiple:Boolean,name:String,params:Object,type:String,url:String},data:{allow:!1,clsDragover:"uk-dragover",concurrent:1,maxSize:0,method:"POST",mime:!1,multiple:!1,name:"files[]",params:{},type:"",url:"",abort:r.noop,beforeAll:r.noop,beforeSend:r.noop,complete:r.noop,completeAll:r.noop,error:r.noop,fail:r.noop,load:r.noop,loadEnd:r.noop,loadStart:r.noop,progress:r.noop},events:{change(e){r.matches(e.target,'input[type="file"]')&&(e.preventDefault(),e.target.files&&this.upload(e.target.files),e.target.value="")},drop(e){l(e);const t=e.dataTransfer;t!=null&&t.files&&(r.removeClass(this.$el,this.clsDragover),this.upload(t.files))},dragenter(e){l(e)},dragover(e){l(e),r.addClass(this.$el,this.clsDragover)},dragleave(e){l(e),r.removeClass(this.$el,this.clsDragover)}},methods:{async upload(e){try{if(e=r.toArray(e),!e.length)return;this.multiple||(e=e.slice(0,1)),r.trigger(this.$el,"upload",[e]);for(const n of e){if(this.maxSize&&this.maxSize*1e3<n.size){this.fail(this.t("invalidSize",this.maxSize));return}if(this.allow&&!p(this.allow,n.name)){this.fail(this.t("invalidName",this.allow));return}if(this.mime&&!p(this.mime,n.type)){this.fail(this.t("invalidMime",this.mime));return}}await this.beforeAll(this,e);const t=this.concurrent;for(let n=0;n<e.length;n+=t){const s=new FormData;e.slice(n,n+t).forEach(a=>s.append(this.name,a));for(const a in this.params)s.append(a,this.params[a]);const o=await c(this.url,{data:s,method:this.method,responseType:this.type,beforeSend:a=>{const{xhr:m}=a;r.on(m.upload,"progress",this.progress);for(const f of["loadStart","load","loadEnd","abort"])r.on(m,f.toLowerCase(),this[f]);return this.beforeSend(a)}});this.complete(o),n+t>=e.length&&this.completeAll(o)}}catch(t){(t==null?void 0:t.name)!=="AbortError"&&this.error(t)}}}};function p(e,t){const n=e.replace(/\*\*|[.*+?^${}()|[\]\\]/g,s=>{var o;return(o={"**":".*","*":"[^/]+","?":"[^/]","|":"|"}[s])!=null?o:`\\${s}`});return new RegExp(`^(?:${n})$`,"i").test(t)}function l(e){e.preventDefault(),e.stopPropagation()}async function c(e,t){const n={url:e,data:null,method:"GET",headers:{},xhr:new XMLHttpRequest,beforeSend:r.noop,responseType:"",...t};if(await n.beforeSend(n)===!1)throw h(n.xhr);return u(n.url,n)}function u(e,t){return new Promise((n,s)=>{const{xhr:o}=t;for(const a in t)if(a in o)try{o[a]=t[a]}catch{}o.open(t.method.toUpperCase(),e);for(const a in t.headers)o.setRequestHeader(a,t.headers[a]);r.on(o,"load",()=>{o.status===0||o.status>=200&&o.status<300||o.status===304?n(o):s(r.assign(Error(o.statusText),{xhr:o,status:o.status}))}),r.on(o,"error",()=>s(r.assign(Error("Network Error"),{xhr:o}))),r.on(o,"timeout",()=>s(r.assign(Error("Network Timeout"),{xhr:o}))),r.on(o,"abort",()=>s(h(o))),o.send(t.data)})}function h(e){return r.assign(Error("Network Abort"),{xhr:e,name:"AbortError"})}var g="upload";return typeof window<"u"&&window.UIkit&&window.UIkit.component(g,d),d}));
|
package/dist/js/uikit-core.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.25.28-dev.
|
|
1
|
+
/*! UIkit 3.25.28-dev.6d5160a | 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() :
|
|
@@ -568,6 +568,7 @@
|
|
|
568
568
|
|
|
569
569
|
const cssNumber = {
|
|
570
570
|
"animation-iteration-count": true,
|
|
571
|
+
"aspect-ratio": true,
|
|
571
572
|
"column-count": true,
|
|
572
573
|
"fill-opacity": true,
|
|
573
574
|
"flex-grow": true,
|
|
@@ -1689,7 +1690,7 @@
|
|
|
1689
1690
|
wrapInner: wrapInner
|
|
1690
1691
|
});
|
|
1691
1692
|
|
|
1692
|
-
var VERSION = '3.25.28-dev.
|
|
1693
|
+
var VERSION = '3.25.28-dev.6d5160a';
|
|
1693
1694
|
|
|
1694
1695
|
function initUpdates(instance) {
|
|
1695
1696
|
instance._data = {};
|
|
@@ -5935,7 +5936,6 @@
|
|
|
5935
5936
|
write({ active }) {
|
|
5936
5937
|
const { elements } = this;
|
|
5937
5938
|
const changed = active !== false && !hasClass(elements[active], this.cls);
|
|
5938
|
-
this.links.forEach((el) => el.blur());
|
|
5939
5939
|
for (let i = 0; i < elements.length; i++) {
|
|
5940
5940
|
toggleClass(elements[i], this.cls, +i === active);
|
|
5941
5941
|
}
|
|
@@ -6384,7 +6384,7 @@
|
|
|
6384
6384
|
const loadSVG = memoize(async (src) => {
|
|
6385
6385
|
if (src) {
|
|
6386
6386
|
const response = await fetch(src);
|
|
6387
|
-
if (response.headers.get("Content-Type")
|
|
6387
|
+
if (/^image\/svg\+xml\s*(;|$)/i.test(response.headers.get("Content-Type"))) {
|
|
6388
6388
|
return response.text();
|
|
6389
6389
|
}
|
|
6390
6390
|
}
|