anysystem-design 0.0.42 → 0.0.43
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.
|
@@ -3,9 +3,11 @@ import { default as React } from 'react';
|
|
|
3
3
|
export type ButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
4
4
|
variant?: "default" | "primary";
|
|
5
5
|
size?: "xs" | "sm" | "md" | "lg";
|
|
6
|
+
rounded?: boolean;
|
|
6
7
|
};
|
|
7
8
|
declare const _default: React.ForwardRefExoticComponent<React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
8
9
|
variant?: "default" | "primary";
|
|
9
10
|
size?: "xs" | "sm" | "md" | "lg";
|
|
11
|
+
rounded?: boolean;
|
|
10
12
|
} & React.RefAttributes<HTMLButtonElement>>;
|
|
11
13
|
export default _default;
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import { t as
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
import e from "react";
|
|
3
|
+
import { t as d } from "../../bundle-mjs-SHnj3fHy.js";
|
|
4
|
+
const c = ({
|
|
5
|
+
children: o,
|
|
6
|
+
className: s,
|
|
7
|
+
variant: t = "default",
|
|
8
|
+
size: r = "md",
|
|
9
|
+
rounded: n = !1,
|
|
10
|
+
...u
|
|
11
|
+
}, f) => {
|
|
12
|
+
const i = e.useMemo(() => {
|
|
13
|
+
switch (t) {
|
|
7
14
|
case "default":
|
|
8
15
|
return "bg-gray-400 text-white after:bg-white";
|
|
9
16
|
case "primary":
|
|
@@ -11,7 +18,7 @@ const d = ({ children: o, className: f, variant: e = "default", size: r = "md",
|
|
|
11
18
|
default:
|
|
12
19
|
return "bg-gray-400 text-white after:bg-white";
|
|
13
20
|
}
|
|
14
|
-
}, [
|
|
21
|
+
}, [t]), l = e.useMemo(() => {
|
|
15
22
|
switch (r) {
|
|
16
23
|
case "xs":
|
|
17
24
|
return "px-4 py-2 text-xs";
|
|
@@ -28,24 +35,24 @@ const d = ({ children: o, className: f, variant: e = "default", size: r = "md",
|
|
|
28
35
|
return /* @__PURE__ */ a(
|
|
29
36
|
"button",
|
|
30
37
|
{
|
|
31
|
-
ref:
|
|
32
|
-
className:
|
|
38
|
+
ref: f,
|
|
39
|
+
className: d(
|
|
33
40
|
"relative overflow-hidden rounded",
|
|
34
|
-
|
|
35
|
-
//
|
|
41
|
+
n && "rounded-full",
|
|
42
|
+
//rounded
|
|
36
43
|
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
37
44
|
//disabled
|
|
38
45
|
"hover:after:w-full hover:after:transform hover:after:opacity-20 hover:after:transition-all hover:after:duration-300",
|
|
39
46
|
//hover:
|
|
40
47
|
i,
|
|
41
|
-
|
|
42
|
-
|
|
48
|
+
l,
|
|
49
|
+
s
|
|
43
50
|
),
|
|
44
|
-
...
|
|
51
|
+
...u,
|
|
45
52
|
children: /* @__PURE__ */ a("span", { className: "relative", children: o })
|
|
46
53
|
}
|
|
47
54
|
);
|
|
48
|
-
},
|
|
55
|
+
}, x = e.forwardRef(c);
|
|
49
56
|
export {
|
|
50
|
-
|
|
57
|
+
x as default
|
|
51
58
|
};
|