@ztwoint/z-ui 0.1.23 → 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.
|
@@ -11,7 +11,7 @@ const N = z(
|
|
|
11
11
|
filled: [
|
|
12
12
|
"border-[.5px] disabled:border-none disabled:shadow-[var(--shadow-button-disabled)]"
|
|
13
13
|
],
|
|
14
|
-
stroke: ["disabled:
|
|
14
|
+
stroke: ["disabled:shadow-[var(--shadow-button-disabled)]"],
|
|
15
15
|
ghost: [""]
|
|
16
16
|
},
|
|
17
17
|
shade: {
|
|
@@ -80,18 +80,18 @@ const N = z(
|
|
|
80
80
|
variant: f,
|
|
81
81
|
asChild: o = !1,
|
|
82
82
|
leftIcon: a,
|
|
83
|
-
rightIcon:
|
|
83
|
+
rightIcon: t,
|
|
84
84
|
label: m,
|
|
85
85
|
children: l,
|
|
86
86
|
...p
|
|
87
87
|
}, y) => {
|
|
88
|
-
const v = o ? O : "button",
|
|
89
|
-
N({ shade: c, size: b, variant: f, iconOnly:
|
|
90
|
-
),
|
|
91
|
-
return /* @__PURE__ */ e(v, { className: h, ref: y, ...p, children: o ? l :
|
|
92
|
-
a && /* @__PURE__ */ e("span", { className: n(
|
|
93
|
-
|
|
94
|
-
|
|
88
|
+
const v = o ? O : "button", r = m || l, s = !r && !!(a || t), i = s ? a || t : null, h = n(
|
|
89
|
+
N({ shade: c, size: b, variant: f, iconOnly: s, className: u })
|
|
90
|
+
), d = "w-3.5 h-3.5";
|
|
91
|
+
return /* @__PURE__ */ e(v, { className: h, ref: y, ...p, children: o ? l : s ? i ? /* @__PURE__ */ e("span", { className: d, children: i }) : null : /* @__PURE__ */ x(g, { children: [
|
|
92
|
+
a && /* @__PURE__ */ e("span", { className: n(d), children: a }),
|
|
93
|
+
r && /* @__PURE__ */ e("span", { children: r }),
|
|
94
|
+
t && /* @__PURE__ */ e("span", { className: n(d), children: t })
|
|
95
95
|
] }) });
|
|
96
96
|
}
|
|
97
97
|
);
|
|
@@ -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
|
|
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:
|
|
36
|
-
onDrop:
|
|
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
|
-
|
|
69
|
+
I as FileUploadArea
|
|
70
70
|
};
|
|
@@ -138,6 +138,6 @@
|
|
|
138
138
|
|
|
139
139
|
--shadow-custom:
|
|
140
140
|
0px 2px 4px 0px var(--color-alpha-one-50), 0px 0px 0px 0.5px var(--color-neutral-150);
|
|
141
|
-
--shadow-button-
|
|
141
|
+
--shadow-button-disabled:
|
|
142
142
|
0px 1px 2px 0px var(--color-neutral-950), 0px 0px 0px 0.5px var(--color-alpha-two-50);
|
|
143
143
|
}
|