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
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "uikit",
3
3
  "title": "UIkit",
4
4
  "description": "UIkit is a lightweight and modular front-end framework for developing fast and powerful web interfaces.",
5
- "version": "3.25.28-dev.25f0658",
5
+ "version": "3.25.28-dev.6d5160a",
6
6
  "main": "dist/js/uikit.js",
7
7
  "style": "dist/css/uikit.css",
8
8
  "sideEffects": [
@@ -46,7 +46,7 @@ export default {
46
46
 
47
47
  update: {
48
48
  read({ percent }, types) {
49
- if (!types.has('scroll')) {
49
+ if (!types.has('scroll') || types.has('resize')) {
50
50
  percent = false;
51
51
  }
52
52
 
@@ -28,7 +28,7 @@ export default {
28
28
  watch: {
29
29
  list(list) {
30
30
  css(list, {
31
- aspectRatio: this.ratio ? this.ratio.replace(':', '/') : undefined,
31
+ aspectRatio: this.ratio && this.ratio !== 'false' ? this.ratio.replace(':', '/') : '',
32
32
  minHeight: this.minHeight,
33
33
  maxHeight: this.maxHeight,
34
34
  width: '100%',
@@ -95,48 +95,49 @@ export default {
95
95
 
96
96
  methods: {
97
97
  async upload(files) {
98
- files = toArray(files);
98
+ try {
99
+ files = toArray(files);
99
100
 
100
- if (!files.length) {
101
- return;
102
- }
103
-
104
- if (!this.multiple) {
105
- files = files.slice(0, 1);
106
- }
107
-
108
- trigger(this.$el, 'upload', [files]);
109
-
110
- for (const file of files) {
111
- if (this.maxSize && this.maxSize * 1000 < file.size) {
112
- this.fail(this.t('invalidSize', this.maxSize));
101
+ if (!files.length) {
113
102
  return;
114
103
  }
115
104
 
116
- if (this.allow && !match(this.allow, file.name)) {
117
- this.fail(this.t('invalidName', this.allow));
118
- return;
105
+ if (!this.multiple) {
106
+ files = files.slice(0, 1);
119
107
  }
120
108
 
121
- if (this.mime && !match(this.mime, file.type)) {
122
- this.fail(this.t('invalidMime', this.mime));
123
- return;
109
+ trigger(this.$el, 'upload', [files]);
110
+
111
+ for (const file of files) {
112
+ if (this.maxSize && this.maxSize * 1000 < file.size) {
113
+ this.fail(this.t('invalidSize', this.maxSize));
114
+ return;
115
+ }
116
+
117
+ if (this.allow && !match(this.allow, file.name)) {
118
+ this.fail(this.t('invalidName', this.allow));
119
+ return;
120
+ }
121
+
122
+ if (this.mime && !match(this.mime, file.type)) {
123
+ this.fail(this.t('invalidMime', this.mime));
124
+ return;
125
+ }
124
126
  }
125
- }
126
127
 
127
- this.beforeAll(this, files);
128
+ await this.beforeAll(this, files);
128
129
 
129
- const chunks = chunk(files, this.concurrent);
130
- const upload = async (files) => {
131
- const data = new FormData();
130
+ const size = this.concurrent;
132
131
 
133
- files.forEach((file) => data.append(this.name, file));
132
+ for (let i = 0; i < files.length; i += size) {
133
+ const data = new FormData();
134
134
 
135
- for (const key in this.params) {
136
- data.append(key, this.params[key]);
137
- }
135
+ files.slice(i, i + size).forEach((file) => data.append(this.name, file));
136
+
137
+ for (const key in this.params) {
138
+ data.append(key, this.params[key]);
139
+ }
138
140
 
139
- try {
140
141
  const xhr = await ajax(this.url, {
141
142
  data,
142
143
  method: this.method,
@@ -154,42 +155,26 @@ export default {
154
155
 
155
156
  this.complete(xhr);
156
157
 
157
- if (chunks.length) {
158
- await upload(chunks.shift());
159
- } else {
158
+ if (i + size >= files.length) {
160
159
  this.completeAll(xhr);
161
160
  }
162
- } catch (e) {
163
- if (e.name !== 'AbortError') {
164
- this.error(e);
165
- }
166
161
  }
167
- };
168
-
169
- await upload(chunks.shift());
162
+ } catch (e) {
163
+ if (e?.name !== 'AbortError') {
164
+ this.error(e);
165
+ }
166
+ }
170
167
  },
171
168
  },
172
169
  };
173
170
 
174
171
  function match(pattern, path) {
175
- return path.match(
176
- new RegExp(
177
- `^${pattern
178
- .replace(/\//g, '\\/')
179
- .replace(/\*\*/g, '(\\/[^\\/]+)*')
180
- .replace(/\*/g, '[^\\/]+')
181
- .replace(/((?!\\))\?/g, '$1.')}$`,
182
- 'i',
183
- ),
172
+ const expression = pattern.replace(
173
+ /\*\*|[.*+?^${}()|[\]\\]/g,
174
+ (s) => ({ '**': '.*', '*': '[^/]+', '?': '[^/]', '|': '|' })[s] ?? `\\${s}`,
184
175
  );
185
- }
186
176
 
187
- function chunk(files, size) {
188
- const chunks = [];
189
- for (let i = 0; i < files.length; i += size) {
190
- chunks.push(files.slice(i, i + size));
191
- }
192
- return chunks;
177
+ return new RegExp(`^(?:${expression})$`, 'i').test(path);
193
178
  }
194
179
 
195
180
  function stop(e) {
@@ -96,7 +96,6 @@ export default {
96
96
  const { elements } = this;
97
97
  const changed = active !== false && !hasClass(elements[active], this.cls);
98
98
 
99
- this.links.forEach((el) => el.blur());
100
99
  for (let i = 0; i < elements.length; i++) {
101
100
  toggleClass(elements[i], this.cls, +i === active);
102
101
  }
@@ -84,7 +84,7 @@ function applyAttributes(el) {
84
84
  const loadSVG = memoize(async (src) => {
85
85
  if (src) {
86
86
  const response = await fetch(src);
87
- if (response.headers.get('Content-Type') === 'image/svg+xml') {
87
+ if (/^image\/svg\+xml\s*(;|$)/i.test(response.headers.get('Content-Type'))) {
88
88
  return response.text();
89
89
  }
90
90
  }
@@ -13,6 +13,7 @@ import {
13
13
 
14
14
  const cssNumber = {
15
15
  'animation-iteration-count': true,
16
+ 'aspect-ratio': true,
16
17
  'column-count': true,
17
18
  'fill-opacity': true,
18
19
  'flex-grow': true,