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.
Files changed (48) hide show
  1. package/CHANGELOG.md +3 -0
  2. package/dist/css/uikit-core-rtl.css +1 -1
  3. package/dist/css/uikit-core-rtl.min.css +1 -1
  4. package/dist/css/uikit-core.css +1 -1
  5. package/dist/css/uikit-core.min.css +1 -1
  6. package/dist/css/uikit-rtl.css +1 -1
  7. package/dist/css/uikit-rtl.min.css +1 -1
  8. package/dist/css/uikit.css +1 -1
  9. package/dist/css/uikit.min.css +1 -1
  10. package/dist/js/components/countdown.js +1 -1
  11. package/dist/js/components/countdown.min.js +1 -1
  12. package/dist/js/components/filter.js +1 -1
  13. package/dist/js/components/filter.min.js +1 -1
  14. package/dist/js/components/lightbox-panel.js +1 -1
  15. package/dist/js/components/lightbox-panel.min.js +1 -1
  16. package/dist/js/components/lightbox.js +1 -1
  17. package/dist/js/components/lightbox.min.js +1 -1
  18. package/dist/js/components/notification.js +1 -1
  19. package/dist/js/components/notification.min.js +1 -1
  20. package/dist/js/components/parallax.js +2 -2
  21. package/dist/js/components/parallax.min.js +1 -1
  22. package/dist/js/components/slider-parallax.js +1 -1
  23. package/dist/js/components/slider-parallax.min.js +1 -1
  24. package/dist/js/components/slider.js +1 -1
  25. package/dist/js/components/slider.min.js +1 -1
  26. package/dist/js/components/slideshow-parallax.js +1 -1
  27. package/dist/js/components/slideshow-parallax.min.js +1 -1
  28. package/dist/js/components/slideshow.js +2 -2
  29. package/dist/js/components/slideshow.min.js +1 -1
  30. package/dist/js/components/sortable.js +1 -1
  31. package/dist/js/components/sortable.min.js +1 -1
  32. package/dist/js/components/tooltip.js +1 -1
  33. package/dist/js/components/tooltip.min.js +1 -1
  34. package/dist/js/components/upload.js +41 -49
  35. package/dist/js/components/upload.min.js +1 -1
  36. package/dist/js/uikit-core.js +4 -4
  37. package/dist/js/uikit-core.min.js +1 -1
  38. package/dist/js/uikit-icons.js +1 -1
  39. package/dist/js/uikit-icons.min.js +1 -1
  40. package/dist/js/uikit.js +46 -54
  41. package/dist/js/uikit.min.js +1 -1
  42. package/package.json +1 -1
  43. package/src/js/components/parallax.js +1 -1
  44. package/src/js/components/slideshow.js +1 -1
  45. package/src/js/components/upload.js +41 -56
  46. package/src/js/core/scrollspy-nav.js +0 -1
  47. package/src/js/core/svg.js +1 -1
  48. package/src/js/util/style.js +1 -0
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.25.28-dev.25f0658 | https://www.getuikit.com | (c) 2014 - 2026 YOOtheme | MIT License */
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
- files = uikitUtil.toArray(files);
107
- if (!files.length) {
108
- return;
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 (this.allow && !match(this.allow, file.name)) {
120
- this.fail(this.t("invalidName", this.allow));
121
- return;
111
+ if (!this.multiple) {
112
+ files = files.slice(0, 1);
122
113
  }
123
- if (this.mime && !match(this.mime, file.type)) {
124
- this.fail(this.t("invalidMime", this.mime));
125
- return;
126
- }
127
- }
128
- this.beforeAll(this, files);
129
- const chunks = chunk(files, this.concurrent);
130
- const upload = async (files2) => {
131
- const data = new FormData();
132
- files2.forEach((file) => data.append(this.name, file));
133
- for (const key in this.params) {
134
- data.append(key, this.params[key]);
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
- try {
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 (chunks.length) {
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
- await upload(chunks.shift());
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
- return path.match(
168
- new RegExp(
169
- `^${pattern.replace(/\//g, "\\/").replace(/\*\*/g, "(\\/[^\\/]+)*").replace(/\*/g, "[^\\/]+").replace(/((?!\\))\?/g, "$1.")}$`,
170
- "i"
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.25f0658 | 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 s,a,o;let n=0;return((o=((s=this.i18n)==null?void 0:s[e])||((a=this.$options.i18n)==null?void 0:a[e]))==null?void 0:o.replace(/%s/g,()=>t[n++]||""))||""}}},p={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){if(e=r.toArray(e),!e.length)return;this.multiple||(e=e.slice(0,1)),r.trigger(this.$el,"upload",[e]);for(const a of e){if(this.maxSize&&this.maxSize*1e3<a.size){this.fail(this.t("invalidSize",this.maxSize));return}if(this.allow&&!d(this.allow,a.name)){this.fail(this.t("invalidName",this.allow));return}if(this.mime&&!d(this.mime,a.type)){this.fail(this.t("invalidMime",this.mime));return}}this.beforeAll(this,e);const t=u(e,this.concurrent),s=async a=>{const o=new FormData;a.forEach(n=>o.append(this.name,n));for(const n in this.params)o.append(n,this.params[n]);try{const n=await g(this.url,{data:o,method:this.method,responseType:this.type,beforeSend:m=>{const{xhr:c}=m;r.on(c.upload,"progress",this.progress);for(const f of["loadStart","load","loadEnd","abort"])r.on(c,f.toLowerCase(),this[f]);return this.beforeSend(m)}});this.complete(n),t.length?await s(t.shift()):this.completeAll(n)}catch(n){n.name!=="AbortError"&&this.error(n)}};await s(t.shift())}}};function d(e,t){return t.match(new RegExp(`^${e.replace(/\//g,"\\/").replace(/\*\*/g,"(\\/[^\\/]+)*").replace(/\*/g,"[^\\/]+").replace(/((?!\\))\?/g,"$1.")}$`,"i"))}function u(e,t){const s=[];for(let a=0;a<e.length;a+=t)s.push(e.slice(a,a+t));return s}function l(e){e.preventDefault(),e.stopPropagation()}async function g(e,t){const s={url:e,data:null,method:"GET",headers:{},xhr:new XMLHttpRequest,beforeSend:r.noop,responseType:"",...t};if(await s.beforeSend(s)===!1)throw h(s.xhr);return v(s.url,s)}function v(e,t){return new Promise((s,a)=>{const{xhr:o}=t;for(const n in t)if(n in o)try{o[n]=t[n]}catch{}o.open(t.method.toUpperCase(),e);for(const n in t.headers)o.setRequestHeader(n,t.headers[n]);r.on(o,"load",()=>{o.status===0||o.status>=200&&o.status<300||o.status===304?s(o):a(r.assign(Error(o.statusText),{xhr:o,status:o.status}))}),r.on(o,"error",()=>a(r.assign(Error("Network Error"),{xhr:o}))),r.on(o,"timeout",()=>a(r.assign(Error("Network Timeout"),{xhr:o}))),r.on(o,"abort",()=>a(h(o))),o.send(t.data)})}function h(e){return r.assign(Error("Network Abort"),{xhr:e,name:"AbortError"})}var w="upload";return typeof window<"u"&&window.UIkit&&window.UIkit.component(w,p),p}));
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}));
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.25.28-dev.25f0658 | https://www.getuikit.com | (c) 2014 - 2026 YOOtheme | MIT License */
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.25f0658';
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") === "image/svg+xml") {
6387
+ if (/^image\/svg\+xml\s*(;|$)/i.test(response.headers.get("Content-Type"))) {
6388
6388
  return response.text();
6389
6389
  }
6390
6390
  }