@gearbox-protocol/permissionless-ui 1.22.0-next.30 → 1.22.0-next.32
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.
- package/dist/cjs/components/block-sync/block-sync.cjs +1 -1
- package/dist/cjs/components/checkbox/checkbox-labeled.cjs +1 -1
- package/dist/cjs/components/client-adapters/styled-rounded-image/styled-rounded-image.cjs +1 -1
- package/dist/cjs/components/edit-input/edit-input.cjs +1 -1
- package/dist/cjs/components/input/input.cjs +1 -1
- package/dist/cjs/components/text-button/text-button.cjs +1 -1
- package/dist/esm/components/block-sync/block-sync.js +3 -2
- package/dist/esm/components/checkbox/checkbox-labeled.js +1 -0
- package/dist/esm/components/client-adapters/styled-rounded-image/styled-rounded-image.js +1 -0
- package/dist/esm/components/edit-input/edit-input.js +100 -83
- package/dist/esm/components/input/input.js +26 -26
- package/dist/esm/components/text-button/text-button.js +98 -46
- package/dist/globals.css +1 -1
- package/dist/types/components/edit-input/edit-input.d.ts +25 -40
- package/dist/types/components/input/input.d.ts +1 -2
- package/dist/types/components/text-button/text-button.d.ts +13 -24
- package/package.json +1 -1
|
@@ -1,55 +1,107 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
1
|
+
import { jsxs as v, Fragment as D, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { cva as n } from "class-variance-authority";
|
|
3
|
+
import * as g from "react";
|
|
3
4
|
import "@gearbox-protocol/sdk";
|
|
4
|
-
import { cn as
|
|
5
|
+
import { cn as o } from "../../utils/cn.js";
|
|
5
6
|
import "sonner";
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
},
|
|
7
|
+
const f = n("", {
|
|
8
|
+
variants: {
|
|
9
|
+
buttonColor: {
|
|
10
|
+
primaryDashed: "text-foreground",
|
|
11
|
+
secondaryDashed: "text-secondary-foreground group-hover:text-foreground",
|
|
12
|
+
empty: "text-foreground"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
defaultVariants: {
|
|
16
|
+
buttonColor: "primaryDashed"
|
|
17
|
+
}
|
|
18
|
+
}), w = n("", {
|
|
19
|
+
variants: {
|
|
20
|
+
size: {
|
|
21
|
+
sm: "text-[13px] leading-[15px]",
|
|
22
|
+
default: "",
|
|
23
|
+
md: "",
|
|
24
|
+
lg: "text-base"
|
|
25
|
+
},
|
|
26
|
+
width: {
|
|
27
|
+
compact: "w-auto",
|
|
28
|
+
wide: "w-full"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
defaultVariants: {
|
|
32
|
+
size: "default",
|
|
33
|
+
width: "compact"
|
|
34
|
+
}
|
|
35
|
+
}), N = n("", {
|
|
36
|
+
variants: {
|
|
37
|
+
borderColor: {
|
|
38
|
+
primaryDashed: "border-b border-dashed border-secondary-foreground group-hover:border-foreground",
|
|
39
|
+
secondaryDashed: "border-b border-dashed border-secondary-foreground group-hover:border-foreground",
|
|
40
|
+
empty: ""
|
|
41
|
+
},
|
|
42
|
+
defaultVariants: {
|
|
43
|
+
primaryDashed: "primaryDashed"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}), V = g.forwardRef(
|
|
18
47
|
({
|
|
19
|
-
children:
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
48
|
+
children: y,
|
|
49
|
+
icon: s,
|
|
50
|
+
size: h = "default",
|
|
51
|
+
buttonColor: e = "primaryDashed",
|
|
52
|
+
width: x = "compact",
|
|
53
|
+
as: a = "button",
|
|
54
|
+
className: b,
|
|
55
|
+
disabled: r,
|
|
56
|
+
...d
|
|
57
|
+
}, c) => {
|
|
58
|
+
const i = a === "a", l = o(
|
|
59
|
+
"group inline-block p-0 leading-[100%] font-normal bg-transparent border-none cursor-pointer transition-colors",
|
|
60
|
+
w({ size: h, width: x }),
|
|
61
|
+
!i && f({ buttonColor: e }),
|
|
62
|
+
r && "text-gray-110 cursor-default [&_svg]:text-gray-110",
|
|
63
|
+
b
|
|
64
|
+
), p = i ? o(f({ buttonColor: e }), r && "text-gray-110") : null, u = /* @__PURE__ */ v(D, { children: [
|
|
65
|
+
/* @__PURE__ */ t(
|
|
66
|
+
"span",
|
|
67
|
+
{
|
|
68
|
+
className: o(
|
|
69
|
+
"inline-block",
|
|
70
|
+
N({ borderColor: e }),
|
|
71
|
+
r && e !== "empty" && "border-gray-110"
|
|
72
|
+
),
|
|
73
|
+
children: y
|
|
74
|
+
}
|
|
75
|
+
),
|
|
76
|
+
s && /* @__PURE__ */ t(
|
|
77
|
+
"span",
|
|
78
|
+
{
|
|
79
|
+
className: o(
|
|
80
|
+
"ml-1.5 [&_svg]:fill-current",
|
|
81
|
+
r ? "text-gray-110" : "text-gray-90 group-hover:text-foreground"
|
|
82
|
+
),
|
|
83
|
+
children: s
|
|
84
|
+
}
|
|
85
|
+
)
|
|
86
|
+
] }), m = p ? /* @__PURE__ */ t("span", { className: p, children: u }) : u;
|
|
87
|
+
return a === "button" ? /* @__PURE__ */ t(
|
|
88
|
+
"button",
|
|
42
89
|
{
|
|
43
|
-
ref:
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
90
|
+
ref: c,
|
|
91
|
+
type: "button",
|
|
92
|
+
className: l,
|
|
93
|
+
disabled: r,
|
|
94
|
+
...d,
|
|
95
|
+
children: m
|
|
96
|
+
}
|
|
97
|
+
) : g.createElement(
|
|
98
|
+
a,
|
|
99
|
+
{ ref: c, className: l, ...d },
|
|
100
|
+
m
|
|
49
101
|
);
|
|
50
102
|
}
|
|
51
103
|
);
|
|
52
|
-
|
|
104
|
+
V.displayName = "TextButton";
|
|
53
105
|
export {
|
|
54
|
-
|
|
106
|
+
V as TextButton
|
|
55
107
|
};
|