uikit 3.25.5-dev.7295faa9 → 3.25.5-dev.7f39b03

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 (51) hide show
  1. package/.prettierignore +0 -1
  2. package/CHANGELOG.md +5 -0
  3. package/README.md +0 -1
  4. package/build/publishDev.js +2 -3
  5. package/build/release.js +1 -3
  6. package/dist/css/uikit-core-rtl.css +1 -1
  7. package/dist/css/uikit-core-rtl.min.css +1 -1
  8. package/dist/css/uikit-core.css +1 -1
  9. package/dist/css/uikit-core.min.css +1 -1
  10. package/dist/css/uikit-rtl.css +1 -1
  11. package/dist/css/uikit-rtl.min.css +1 -1
  12. package/dist/css/uikit.css +1 -1
  13. package/dist/css/uikit.min.css +1 -1
  14. package/dist/js/components/countdown.js +1 -1
  15. package/dist/js/components/countdown.min.js +1 -1
  16. package/dist/js/components/filter.js +1 -1
  17. package/dist/js/components/filter.min.js +1 -1
  18. package/dist/js/components/lightbox-panel.js +18 -10
  19. package/dist/js/components/lightbox-panel.min.js +1 -1
  20. package/dist/js/components/lightbox.js +18 -10
  21. package/dist/js/components/lightbox.min.js +1 -1
  22. package/dist/js/components/notification.js +1 -1
  23. package/dist/js/components/notification.min.js +1 -1
  24. package/dist/js/components/parallax.js +1 -7
  25. package/dist/js/components/parallax.min.js +1 -1
  26. package/dist/js/components/slider-parallax.js +1 -7
  27. package/dist/js/components/slider-parallax.min.js +1 -1
  28. package/dist/js/components/slider.js +18 -16
  29. package/dist/js/components/slider.min.js +1 -1
  30. package/dist/js/components/slideshow-parallax.js +1 -7
  31. package/dist/js/components/slideshow-parallax.min.js +1 -1
  32. package/dist/js/components/slideshow.js +18 -16
  33. package/dist/js/components/slideshow.min.js +1 -1
  34. package/dist/js/components/sortable.js +5 -6
  35. package/dist/js/components/sortable.min.js +1 -1
  36. package/dist/js/components/tooltip.js +1 -1
  37. package/dist/js/components/tooltip.min.js +1 -1
  38. package/dist/js/components/upload.js +1 -1
  39. package/dist/js/components/upload.min.js +1 -1
  40. package/dist/js/uikit-core.js +7 -6
  41. package/dist/js/uikit-core.min.js +1 -1
  42. package/dist/js/uikit-icons.js +1 -1
  43. package/dist/js/uikit-icons.min.js +1 -1
  44. package/dist/js/uikit.js +28 -20
  45. package/dist/js/uikit.min.js +1 -1
  46. package/package.json +64 -63
  47. package/src/js/components/sortable.js +5 -6
  48. package/src/js/core/drop.js +8 -1
  49. package/src/js/mixin/slider-drag.js +20 -11
  50. package/src/js/util/attr.js +1 -5
  51. package/tests/upload.html +2 -2
package/package.json CHANGED
@@ -1,64 +1,65 @@
1
1
  {
2
- "name": "uikit",
3
- "title": "UIkit",
4
- "description": "UIkit is a lightweight and modular front-end framework for developing fast and powerful web interfaces.",
5
- "version": "3.25.5-dev.7295faa9",
6
- "main": "dist/js/uikit.js",
7
- "style": "dist/css/uikit.css",
8
- "sideEffects": [
9
- "*.css",
10
- "./src/js/*.js",
11
- "./dist/**/*.js"
12
- ],
13
- "repository": {
14
- "type": "git",
15
- "url": "git+https://github.com/uikit/uikit.git"
16
- },
17
- "license": "MIT",
18
- "bugs": {
19
- "url": "https://github.com/uikit/uikit/issues"
20
- },
21
- "homepage": "https://getuikit.com",
22
- "devDependencies": {
23
- "@eslint/js": "^9.39.2",
24
- "@rollup/plugin-alias": "^6.0.0",
25
- "@rollup/plugin-replace": "^6.0.3",
26
- "archiver": "^7.0.1",
27
- "camelcase": "^9.0.0",
28
- "chokidar-cli": "^3.0.0",
29
- "clean-css": "^5.3.3",
30
- "date-fns": "^4.1.0",
31
- "esbuild": "^0.27.2",
32
- "eslint": "^9.39.2",
33
- "eslint-config-prettier": "^10.1.8",
34
- "execa": "^9.6.1",
35
- "fs-extra": "^11.3.2",
36
- "glob": "^13.0.0",
37
- "globals": "^17.0.0",
38
- "inquirer": "^13.1.0",
39
- "less": "^4.5.1",
40
- "minimist": "^1.2.8",
41
- "number-precision": "^1.6.0",
42
- "p-limit": "^7.2.0",
43
- "prettier": "^3.7.4",
44
- "prettier-plugin-organize-imports": "^4.3.0",
45
- "rollup": "^4.53.5",
46
- "rollup-plugin-esbuild": "^6.2.1",
47
- "rtlcss": "^4.3.0",
48
- "semver": "^7.7.3",
49
- "strip-css-comments": "^5.0.0",
50
- "svgo": "^4.0.0"
51
- },
52
- "scripts": {
53
- "build-scss": "node build/scss",
54
- "compile": "pnpm compile-less && pnpm compile-js",
55
- "compile-js": "node build/build",
56
- "compile-less": "pnpm icons && node build/less",
57
- "compile-rtl": "pnpm compile-less rtl",
58
- "icons": "node build/icons",
59
- "prefix": "node build/prefix",
60
- "scope": "node build/scope",
61
- "release": "node build/release",
62
- "watch": "chokidar \"**/*.less\" --initial -i \"node_modules\" -c \"node build/less\""
63
- }
64
- }
2
+ "name": "uikit",
3
+ "title": "UIkit",
4
+ "description": "UIkit is a lightweight and modular front-end framework for developing fast and powerful web interfaces.",
5
+ "version": "3.25.5-dev.7f39b03",
6
+ "main": "dist/js/uikit.js",
7
+ "style": "dist/css/uikit.css",
8
+ "sideEffects": [
9
+ "*.css",
10
+ "./src/js/*.js",
11
+ "./dist/**/*.js"
12
+ ],
13
+ "scripts": {
14
+ "build-scss": "node build/scss",
15
+ "compile": "pnpm compile-less && pnpm compile-js",
16
+ "compile-js": "node build/build",
17
+ "compile-less": "pnpm icons && node build/less",
18
+ "compile-rtl": "pnpm compile-less rtl",
19
+ "icons": "node build/icons",
20
+ "prefix": "node build/prefix",
21
+ "scope": "node build/scope",
22
+ "release": "node build/release",
23
+ "watch": "chokidar \"**/*.less\" --initial -i \"node_modules\" -c \"node build/less\""
24
+ },
25
+ "repository": {
26
+ "type": "git",
27
+ "url": "git+https://github.com/uikit/uikit.git"
28
+ },
29
+ "license": "MIT",
30
+ "bugs": {
31
+ "url": "https://github.com/uikit/uikit/issues"
32
+ },
33
+ "homepage": "https://getuikit.com",
34
+ "packageManager": "pnpm@10.27.0",
35
+ "devDependencies": {
36
+ "@eslint/js": "^9.39.2",
37
+ "@rollup/plugin-alias": "^6.0.0",
38
+ "@rollup/plugin-replace": "^6.0.3",
39
+ "archiver": "^7.0.1",
40
+ "camelcase": "^9.0.0",
41
+ "chokidar-cli": "^3.0.0",
42
+ "clean-css": "^5.3.3",
43
+ "date-fns": "^4.1.0",
44
+ "esbuild": "^0.27.2",
45
+ "eslint": "^9.39.2",
46
+ "eslint-config-prettier": "^10.1.8",
47
+ "execa": "^9.6.1",
48
+ "fs-extra": "^11.3.2",
49
+ "glob": "^13.0.0",
50
+ "globals": "^17.0.0",
51
+ "inquirer": "^13.1.0",
52
+ "less": "^4.5.1",
53
+ "minimist": "^1.2.8",
54
+ "number-precision": "^1.6.0",
55
+ "p-limit": "^7.2.0",
56
+ "prettier": "^3.7.4",
57
+ "prettier-plugin-organize-imports": "^4.3.0",
58
+ "rollup": "^4.53.5",
59
+ "rollup-plugin-esbuild": "^6.2.1",
60
+ "rtlcss": "^4.3.0",
61
+ "semver": "^7.7.3",
62
+ "strip-css-comments": "^5.0.0",
63
+ "svgo": "^4.0.0"
64
+ }
65
+ }
@@ -142,8 +142,7 @@ export default {
142
142
  sortable.target,
143
143
  target,
144
144
  placeholder,
145
- x,
146
- y,
145
+ { x, y },
147
146
  sortable === previous && data.moved !== target,
148
147
  );
149
148
 
@@ -365,7 +364,7 @@ function findTarget(items, point) {
365
364
  return items[findIndex(items, (item) => pointInRect(point, dimensions(item)))];
366
365
  }
367
366
 
368
- function findInsertTarget(list, target, placeholder, x, y, sameList) {
367
+ function findInsertTarget(list, target, placeholder, point, sameList) {
369
368
  if (!children(list).length) {
370
369
  return;
371
370
  }
@@ -373,7 +372,7 @@ function findInsertTarget(list, target, placeholder, x, y, sameList) {
373
372
  const rect = dimensions(target);
374
373
  if (!sameList) {
375
374
  if (!isHorizontal(list, placeholder)) {
376
- return y < rect.top + rect.height / 2 ? target : target.nextElementSibling;
375
+ return point.y < rect.top + rect.height / 2 ? target : target.nextElementSibling;
377
376
  }
378
377
 
379
378
  return target;
@@ -386,8 +385,8 @@ function findInsertTarget(list, target, placeholder, x, y, sameList) {
386
385
  );
387
386
 
388
387
  const [pointerPos, lengthProp, startProp, endProp] = sameRow
389
- ? [x, 'width', 'left', 'right']
390
- : [y, 'height', 'top', 'bottom'];
388
+ ? [point.x, 'width', 'left', 'right']
389
+ : [point.y, 'height', 'top', 'bottom'];
391
390
 
392
391
  const diff =
393
392
  placeholderRect[lengthProp] < rect[lengthProp]
@@ -338,6 +338,9 @@ export default {
338
338
  append(this.container, this.$el);
339
339
  }
340
340
 
341
+ // Mark enter early so isToggled() detects show when using delayShow
342
+ addClass(this.$el, this.clsEnter);
343
+
341
344
  this.showTimer = setTimeout(
342
345
  () => this.toggleElement(this.$el, true),
343
346
  (delay && this.delayShow) || 0,
@@ -345,7 +348,11 @@ export default {
345
348
  },
346
349
 
347
350
  hide(delay = true, animate = true) {
348
- const hide = () => this.toggleElement(this.$el, false, this.animateOut && animate);
351
+ const hide = () => {
352
+ // Ensure enter class is removed if show is canceled early
353
+ removeClass(this.$el, this.clsEnter);
354
+ this.toggleElement(this.$el, false, this.animateOut && animate);
355
+ };
349
356
 
350
357
  this.clearTimers();
351
358
 
@@ -2,6 +2,7 @@ import {
2
2
  css,
3
3
  getEventPos,
4
4
  includes,
5
+ isEqual,
5
6
  isRtl,
6
7
  isTouch,
7
8
  noop,
@@ -25,15 +26,20 @@ export default {
25
26
  data: {
26
27
  draggable: true,
27
28
  threshold: 10,
29
+ angleThreshold: 45,
28
30
  },
29
31
 
30
32
  created() {
31
33
  for (const key of ['start', 'move', 'end']) {
32
34
  const fn = this[key];
33
35
  this[key] = (e) => {
34
- const pos = getEventPos(e).x * (isRtl ? -1 : 1);
36
+ const pos = getEventPos(e);
35
37
 
36
- this.prevPos = pos === this.pos ? this.prevPos : this.pos;
38
+ if (isRtl) {
39
+ pos.x = -pos.x;
40
+ }
41
+
42
+ this.prevPos = isEqual(pos, this.pos) ? this.prevPos : this.pos;
37
43
  this.pos = pos;
38
44
 
39
45
  fn(e);
@@ -88,7 +94,7 @@ export default {
88
94
 
89
95
  if (this._transitioner) {
90
96
  this.percent = this._transitioner.percent();
91
- this.drag += this._transitioner.getDistance() * this.percent * this.dir;
97
+ this.drag.x += this._transitioner.getDistance() * this.percent * this.dir;
92
98
 
93
99
  this._transitioner.cancel();
94
100
  this._transitioner.translate(this.percent);
@@ -109,11 +115,11 @@ export default {
109
115
  },
110
116
 
111
117
  move(e) {
112
- const distance = this.pos - this.drag;
113
-
118
+ const distance = this.pos.x - this.drag.x;
114
119
  if (
115
120
  distance === 0 ||
116
- this.prevPos === this.pos ||
121
+ (!this.dragging && getAngle(this.pos, this.drag) > this.angleThreshold) ||
122
+ this.prevPos.x === this.pos.x ||
117
123
  (!this.dragging && Math.abs(distance) < this.threshold)
118
124
  ) {
119
125
  return;
@@ -130,7 +136,7 @@ export default {
130
136
  let width = getDistance.call(this, prevIndex, nextIndex);
131
137
 
132
138
  while (nextIndex !== prevIndex && dis > width) {
133
- this.drag -= width * this.dir;
139
+ this.drag.x -= width * this.dir;
134
140
 
135
141
  prevIndex = nextIndex;
136
142
  dis -= width;
@@ -192,15 +198,14 @@ export default {
192
198
  this._show(false, this.index, true);
193
199
  this._transitioner = null;
194
200
  } else {
195
- const dirChange =
196
- (isRtl ? this.dir * (isRtl ? 1 : -1) : this.dir) < 0 ===
197
- this.prevPos > this.pos;
198
- this.index = dirChange ? this.index : this.prevIndex;
201
+ const dirChange = this.dir < 0 === this.prevPos.x > this.pos.x;
199
202
 
200
203
  if (dirChange) {
201
204
  trigger(this.slides[this.prevIndex], 'itemhidden', [this]);
202
205
  trigger(this.slides[this.index], 'itemshown', [this]);
203
206
  this.percent = 1 - this.percent;
207
+ } else {
208
+ this.index = this.prevIndex;
204
209
  }
205
210
 
206
211
  this.show(
@@ -232,3 +237,7 @@ function hasSelectableText(el) {
232
237
  toArray(el.childNodes).some((el) => el.nodeType === 3 && el.textContent.trim())
233
238
  );
234
239
  }
240
+
241
+ function getAngle(pos1, pos2) {
242
+ return (Math.atan2(Math.abs(pos2.y - pos1.y), Math.abs(pos2.x - pos1.x)) * 180) / Math.PI;
243
+ }
@@ -1,4 +1,4 @@
1
- import { isFunction, isObject, isUndefined, toNode, toNodes } from './lang';
1
+ import { isObject, isUndefined, toNode, toNodes } from './lang';
2
2
 
3
3
  export function attr(element, name, value) {
4
4
  if (isObject(name)) {
@@ -12,10 +12,6 @@ export function attr(element, name, value) {
12
12
  return toNode(element)?.getAttribute(name);
13
13
  } else {
14
14
  for (const el of toNodes(element)) {
15
- if (isFunction(value)) {
16
- value = value.call(el, attr(el, name));
17
- }
18
-
19
15
  if (value === null) {
20
16
  removeAttr(el, name);
21
17
  } else {
package/tests/upload.html CHANGED
@@ -145,13 +145,13 @@
145
145
  <td><code>allow</code></td>
146
146
  <td>String</td>
147
147
  <td>false</td>
148
- <td>File name filter. (eg. *.png)</td>
148
+ <td>File name filter (eg. *.png). Separate multiple values with a pipe (*.png|*.gif).</td>
149
149
  </tr>
150
150
  <tr>
151
151
  <td><code>mime</code></td>
152
152
  <td>String</td>
153
153
  <td>false</td>
154
- <td>File MIME type filter. (eg. images/*)</td>
154
+ <td>File MIME type filter (eg. image/*). Separate multiple values with a pipe (image/*|video/*).</td>
155
155
  </tr>
156
156
  <tr>
157
157
  <td><code>maxSize</code></td>