@ztwoint/z-ui 0.1.24 → 0.1.25

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.
@@ -4,7 +4,7 @@ import { DEFAULT_ACCEPT as D } from "./file-upload-area.const.js";
4
4
  import { UploadIconComponent as v } from "./upload-icon-component.js";
5
5
  import x from "./text-preset.js";
6
6
  import { cn as y } from "../../lib/utils.js";
7
- const w = ({
7
+ const I = ({
8
8
  onFilesSelected: o,
9
9
  accept: n = D,
10
10
  multiple: f = !0,
@@ -13,9 +13,9 @@ const w = ({
13
13
  }) => {
14
14
  const i = d(null), [C, t] = h(!1), p = (r) => {
15
15
  e || (r.preventDefault(), r.stopPropagation(), t(!0));
16
- }, c = (r) => {
17
- e || (r.preventDefault(), r.stopPropagation(), t(!1));
18
16
  }, u = (r) => {
17
+ e || (r.preventDefault(), r.stopPropagation(), t(!1));
18
+ }, c = (r) => {
19
19
  e || (r.preventDefault(), r.stopPropagation(), t(!1), r.dataTransfer.files && r.dataTransfer.files.length > 0 && o(Array.from(r.dataTransfer.files)));
20
20
  }, l = () => {
21
21
  var r;
@@ -27,13 +27,13 @@ const w = ({
27
27
  "div",
28
28
  {
29
29
  className: y(
30
- "flex flex-col items-center justify-center gap-8 p-12 max-w-112 rounded-2xl border-[.5px] border-dashed stroke-solid-high bg-neutral-light",
30
+ "flex flex-col items-center justify-center gap-8 p-12 max-w-112 w-full rounded-2xl border-[.5px] border-dashed stroke-solid-high bg-neutral-light",
31
31
  e && "opacity-60 bg-gray-100 cursor-not-allowed",
32
32
  s
33
33
  ),
34
34
  onDragOver: p,
35
- onDragLeave: c,
36
- onDrop: u,
35
+ onDragLeave: u,
36
+ onDrop: c,
37
37
  onClick: l,
38
38
  tabIndex: e ? -1 : 0,
39
39
  role: "button",
@@ -66,5 +66,5 @@ const w = ({
66
66
  );
67
67
  };
68
68
  export {
69
- w as FileUploadArea
69
+ I as FileUploadArea
70
70
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ztwoint/z-ui",
3
- "version": "0.1.24",
3
+ "version": "0.1.25",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",