@gearbox-protocol/permissionless-ui 1.16.0 → 1.17.1
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/asset-line/asset-line.cjs +1 -1
- package/dist/cjs/components/graph/graph-view.cjs +1 -1
- package/dist/cjs/components/options-list/options-list.cjs +1 -1
- package/dist/cjs/components/table/grid-table.cjs +1 -1
- package/dist/cjs/components/table/table.cjs +1 -1
- package/dist/esm/components/asset-line/asset-line.js +31 -30
- package/dist/esm/components/graph/graph-view.js +57 -47
- package/dist/esm/components/options-list/options-list.js +24 -25
- package/dist/esm/components/table/grid-table.js +83 -64
- package/dist/esm/components/table/table.js +22 -20
- package/dist/globals.css +1 -1
- package/dist/types/components/table/grid-table.d.ts +8 -0
- package/package.json +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as d } from "react/jsx-runtime";
|
|
2
2
|
import { cva as n } from "class-variance-authority";
|
|
3
|
-
import * as
|
|
4
|
-
import { Col as
|
|
5
|
-
import { Grid as
|
|
6
|
-
import { cn as
|
|
7
|
-
const
|
|
3
|
+
import * as s from "react";
|
|
4
|
+
import { Col as m } from "../layout/col/col.js";
|
|
5
|
+
import { Grid as b } from "../layout/grid/grid.js";
|
|
6
|
+
import { cn as o } from "../../utils/cn.js";
|
|
7
|
+
const G = n("w-full", {
|
|
8
8
|
variants: {
|
|
9
9
|
size: {
|
|
10
10
|
sm: "text-xs",
|
|
@@ -15,72 +15,91 @@ const T = n("w-full", {
|
|
|
15
15
|
defaultVariants: {
|
|
16
16
|
size: "default"
|
|
17
17
|
}
|
|
18
|
-
}),
|
|
19
|
-
({ className: e, size: t, cols: a = 12, gap:
|
|
20
|
-
|
|
18
|
+
}), N = s.forwardRef(
|
|
19
|
+
({ className: e, size: t, cols: a = 12, gap: i = 0, ...r }, l) => /* @__PURE__ */ d("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ d(
|
|
20
|
+
b,
|
|
21
21
|
{
|
|
22
|
-
ref:
|
|
22
|
+
ref: l,
|
|
23
23
|
cols: a,
|
|
24
|
-
gap:
|
|
25
|
-
className:
|
|
24
|
+
gap: i,
|
|
25
|
+
className: o(G({ size: t, className: e })),
|
|
26
26
|
...r
|
|
27
27
|
}
|
|
28
28
|
) })
|
|
29
29
|
);
|
|
30
|
-
|
|
31
|
-
const
|
|
30
|
+
N.displayName = "GridTable";
|
|
31
|
+
const v = s.forwardRef(({ className: e, ...t }, a) => /* @__PURE__ */ d(
|
|
32
32
|
"div",
|
|
33
33
|
{
|
|
34
34
|
ref: a,
|
|
35
|
-
className:
|
|
35
|
+
className: o("contents [&>*]:border-b [&>*]:border-border", e),
|
|
36
36
|
...t
|
|
37
37
|
}
|
|
38
38
|
));
|
|
39
|
-
|
|
40
|
-
const
|
|
39
|
+
v.displayName = "GridTableHeader";
|
|
40
|
+
const w = s.forwardRef(({ className: e, ...t }, a) => /* @__PURE__ */ d(
|
|
41
41
|
"div",
|
|
42
42
|
{
|
|
43
43
|
ref: a,
|
|
44
|
-
className:
|
|
44
|
+
className: o("contents [&>*:last-child>*]:border-0", e),
|
|
45
45
|
...t
|
|
46
46
|
}
|
|
47
47
|
));
|
|
48
|
-
|
|
49
|
-
const
|
|
48
|
+
w.displayName = "GridTableBody";
|
|
49
|
+
const h = s.forwardRef(({ className: e, ...t }, a) => /* @__PURE__ */ d(
|
|
50
50
|
"div",
|
|
51
51
|
{
|
|
52
52
|
ref: a,
|
|
53
|
-
className:
|
|
53
|
+
className: o(
|
|
54
54
|
"contents [&>*]:border-t [&>*]:bg-muted/50 [&>*]:font-medium",
|
|
55
55
|
e
|
|
56
56
|
),
|
|
57
57
|
...t
|
|
58
58
|
}
|
|
59
59
|
));
|
|
60
|
-
|
|
61
|
-
const
|
|
62
|
-
({
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
60
|
+
h.displayName = "GridTableFooter";
|
|
61
|
+
const R = s.forwardRef(
|
|
62
|
+
({
|
|
63
|
+
className: e,
|
|
64
|
+
cols: t,
|
|
65
|
+
gap: a = 0,
|
|
66
|
+
last: i,
|
|
67
|
+
height: r,
|
|
68
|
+
hideValue: l,
|
|
69
|
+
noHover: u,
|
|
70
|
+
noRound: y,
|
|
71
|
+
style: x,
|
|
72
|
+
...T
|
|
73
|
+
}, g) => {
|
|
74
|
+
const f = typeof r == "number" ? `${r}px` : r;
|
|
75
|
+
return /* @__PURE__ */ d(
|
|
76
|
+
b,
|
|
66
77
|
{
|
|
67
|
-
ref:
|
|
78
|
+
ref: g,
|
|
68
79
|
cols: t,
|
|
69
80
|
gap: a,
|
|
70
|
-
className:
|
|
71
|
-
"contents md:[&>*]:border-b [&>*]:border-border [&>*]:transition-colors
|
|
72
|
-
|
|
73
|
-
|
|
81
|
+
className: o(
|
|
82
|
+
"contents md:[&>*]:border-b [&>*]:border-border [&>*]:transition-colors data-[state=selected]:[&>*]:bg-muted",
|
|
83
|
+
// Hover background with optional rounded corners on first and last cells (unless noHover)
|
|
84
|
+
!u && [
|
|
85
|
+
"[&>*]:relative [&>*]:z-0",
|
|
86
|
+
"[&>*]:before:absolute [&>*]:before:inset-0 [&>*]:before:-z-10 [&>*]:before:bg-muted/50 [&>*]:before:opacity-0 [&>*]:before:transition-opacity",
|
|
87
|
+
"hover:[&>*]:before:opacity-100",
|
|
88
|
+
// Only add rounded corners if noRound is not set
|
|
89
|
+
!y && "[&>*:first-child]:before:rounded-l-lg [&>*:last-child]:before:rounded-r-lg"
|
|
90
|
+
],
|
|
91
|
+
i && "[&>*]:border-b-0",
|
|
92
|
+
l && "[&>*]:opacity-0",
|
|
74
93
|
e
|
|
75
94
|
),
|
|
76
|
-
style: { ...
|
|
77
|
-
...
|
|
95
|
+
style: { ...x, ...f ? { height: f } : {} },
|
|
96
|
+
...T
|
|
78
97
|
}
|
|
79
98
|
);
|
|
80
99
|
}
|
|
81
100
|
);
|
|
82
|
-
|
|
83
|
-
const
|
|
101
|
+
R.displayName = "GridTableRow";
|
|
102
|
+
const z = n(
|
|
84
103
|
"flex items-center justify-startborder-b text-left align-middle font-medium text-muted-foreground !bg-transparent",
|
|
85
104
|
{
|
|
86
105
|
variants: {
|
|
@@ -100,19 +119,19 @@ const R = n(
|
|
|
100
119
|
justify: "start"
|
|
101
120
|
}
|
|
102
121
|
}
|
|
103
|
-
),
|
|
104
|
-
({ className: e, size: t, span: a = 1, justify:
|
|
105
|
-
|
|
122
|
+
), c = s.forwardRef(
|
|
123
|
+
({ className: e, size: t, span: a = 1, justify: i = "start", ...r }, l) => /* @__PURE__ */ d(
|
|
124
|
+
m,
|
|
106
125
|
{
|
|
107
|
-
ref:
|
|
126
|
+
ref: l,
|
|
108
127
|
span: a,
|
|
109
|
-
className:
|
|
128
|
+
className: o(z({ size: t, justify: i, className: e })),
|
|
110
129
|
...r
|
|
111
130
|
}
|
|
112
131
|
)
|
|
113
132
|
);
|
|
114
|
-
|
|
115
|
-
const
|
|
133
|
+
c.displayName = "GridTableHead";
|
|
134
|
+
const j = n("align-middle", {
|
|
116
135
|
variants: {
|
|
117
136
|
size: {
|
|
118
137
|
sm: "p-2",
|
|
@@ -128,43 +147,43 @@ const h = n("align-middle", {
|
|
|
128
147
|
defaultVariants: {
|
|
129
148
|
size: "default"
|
|
130
149
|
}
|
|
131
|
-
}), p =
|
|
132
|
-
({ className: e, size: t, span: a = 1, textAlign:
|
|
133
|
-
|
|
150
|
+
}), p = s.forwardRef(
|
|
151
|
+
({ className: e, size: t, span: a = 1, textAlign: i, ...r }, l) => /* @__PURE__ */ d(
|
|
152
|
+
m,
|
|
134
153
|
{
|
|
135
|
-
ref:
|
|
154
|
+
ref: l,
|
|
136
155
|
span: a,
|
|
137
|
-
className:
|
|
156
|
+
className: o(j({ size: t, textAlign: i, className: e })),
|
|
138
157
|
...r
|
|
139
158
|
}
|
|
140
159
|
)
|
|
141
160
|
);
|
|
142
161
|
p.displayName = "GridTableCell";
|
|
143
|
-
const
|
|
162
|
+
const C = s.forwardRef(({ className: e, ...t }, a) => /* @__PURE__ */ d(
|
|
144
163
|
"div",
|
|
145
164
|
{
|
|
146
165
|
ref: a,
|
|
147
|
-
className:
|
|
166
|
+
className: o(
|
|
148
167
|
"col-span-full mt-4 text-sm text-muted-foreground",
|
|
149
168
|
e
|
|
150
169
|
),
|
|
151
170
|
...t
|
|
152
171
|
}
|
|
153
172
|
));
|
|
154
|
-
|
|
155
|
-
const
|
|
173
|
+
C.displayName = "GridTableCaption";
|
|
174
|
+
const S = p, $ = c;
|
|
156
175
|
export {
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
176
|
+
N as GridTable,
|
|
177
|
+
w as GridTableBody,
|
|
178
|
+
C as GridTableCaption,
|
|
160
179
|
p as GridTableCell,
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
180
|
+
h as GridTableFooter,
|
|
181
|
+
c as GridTableHead,
|
|
182
|
+
v as GridTableHeader,
|
|
183
|
+
R as GridTableRow,
|
|
184
|
+
S as Td,
|
|
185
|
+
$ as Th,
|
|
186
|
+
j as gridTableCellVariants,
|
|
187
|
+
z as gridTableHeadVariants,
|
|
188
|
+
G as gridTableVariants
|
|
170
189
|
};
|
|
@@ -18,7 +18,7 @@ const w = i("w-full caption-bottom", {
|
|
|
18
18
|
defaultVariants: {
|
|
19
19
|
size: "default"
|
|
20
20
|
}
|
|
21
|
-
}),
|
|
21
|
+
}), y = l.forwardRef(
|
|
22
22
|
({ className: a, size: t, ...e }, s) => /* @__PURE__ */ r("div", { className: "relative w-full overflow-auto rounded-lg border border-input bg-card", children: /* @__PURE__ */ r(
|
|
23
23
|
"table",
|
|
24
24
|
{
|
|
@@ -28,8 +28,8 @@ const w = i("w-full caption-bottom", {
|
|
|
28
28
|
}
|
|
29
29
|
) })
|
|
30
30
|
);
|
|
31
|
-
|
|
32
|
-
const
|
|
31
|
+
y.displayName = "Table";
|
|
32
|
+
const v = l.forwardRef(({ className: a, ...t }, e) => /* @__PURE__ */ r(
|
|
33
33
|
"thead",
|
|
34
34
|
{
|
|
35
35
|
ref: e,
|
|
@@ -40,7 +40,7 @@ const y = l.forwardRef(({ className: a, ...t }, e) => /* @__PURE__ */ r(
|
|
|
40
40
|
...t
|
|
41
41
|
}
|
|
42
42
|
));
|
|
43
|
-
|
|
43
|
+
v.displayName = "TableHeader";
|
|
44
44
|
const R = l.forwardRef(({ className: a, ...t }, e) => /* @__PURE__ */ r(
|
|
45
45
|
"tbody",
|
|
46
46
|
{
|
|
@@ -50,7 +50,7 @@ const R = l.forwardRef(({ className: a, ...t }, e) => /* @__PURE__ */ r(
|
|
|
50
50
|
}
|
|
51
51
|
));
|
|
52
52
|
R.displayName = "TableBody";
|
|
53
|
-
const
|
|
53
|
+
const z = l.forwardRef(({ className: a, ...t }, e) => /* @__PURE__ */ r(
|
|
54
54
|
"tfoot",
|
|
55
55
|
{
|
|
56
56
|
ref: e,
|
|
@@ -61,19 +61,21 @@ const C = l.forwardRef(({ className: a, ...t }, e) => /* @__PURE__ */ r(
|
|
|
61
61
|
...t
|
|
62
62
|
}
|
|
63
63
|
));
|
|
64
|
-
|
|
65
|
-
const
|
|
64
|
+
z.displayName = "TableFooter";
|
|
65
|
+
const C = l.forwardRef(({ className: a, ...t }, e) => /* @__PURE__ */ r(
|
|
66
66
|
"tr",
|
|
67
67
|
{
|
|
68
68
|
ref: e,
|
|
69
69
|
className: o(
|
|
70
|
-
"border-b transition-colors
|
|
70
|
+
"relative border-b transition-colors data-[state=selected]:bg-muted border-border",
|
|
71
|
+
"before:absolute before:inset-0 before:-z-10 before:rounded-lg before:bg-muted/50 before:opacity-0 before:transition-opacity",
|
|
72
|
+
"hover:before:opacity-100",
|
|
71
73
|
a
|
|
72
74
|
),
|
|
73
75
|
...t
|
|
74
76
|
}
|
|
75
77
|
));
|
|
76
|
-
|
|
78
|
+
C.displayName = "TableRow";
|
|
77
79
|
const H = i(
|
|
78
80
|
"border-b bg-muted/50 text-left align-middle font-medium text-muted-foreground border-input",
|
|
79
81
|
{
|
|
@@ -136,21 +138,21 @@ const _ = l.forwardRef(
|
|
|
136
138
|
isSorted: t,
|
|
137
139
|
direction: e,
|
|
138
140
|
setSort: s,
|
|
139
|
-
placement:
|
|
140
|
-
children:
|
|
141
|
-
className:
|
|
142
|
-
...
|
|
143
|
-
}, p) => /* @__PURE__ */ r(n, { ref: p, className:
|
|
141
|
+
placement: f = "right",
|
|
142
|
+
children: m,
|
|
143
|
+
className: b,
|
|
144
|
+
...c
|
|
145
|
+
}, p) => /* @__PURE__ */ r(n, { ref: p, className: b, ...c, children: /* @__PURE__ */ r(T, { children: /* @__PURE__ */ d(h, { delayDuration: 200, children: [
|
|
144
146
|
/* @__PURE__ */ r(x, { asChild: !0, children: /* @__PURE__ */ d(
|
|
145
147
|
"div",
|
|
146
148
|
{
|
|
147
149
|
className: o(
|
|
148
150
|
"group flex items-center gap-1 w-fit cursor-pointer hover:text-foreground",
|
|
149
|
-
|
|
151
|
+
f === "left" ? "flex-row-reverse" : "flex-row"
|
|
150
152
|
),
|
|
151
153
|
onClick: () => s(e === "asc" ? "desc" : "asc"),
|
|
152
154
|
children: [
|
|
153
|
-
|
|
155
|
+
m,
|
|
154
156
|
/* @__PURE__ */ r(
|
|
155
157
|
g,
|
|
156
158
|
{
|
|
@@ -181,14 +183,14 @@ const _ = l.forwardRef(
|
|
|
181
183
|
_.displayName = "SortingTableHead";
|
|
182
184
|
export {
|
|
183
185
|
_ as SortingTableHead,
|
|
184
|
-
|
|
186
|
+
y as Table,
|
|
185
187
|
R as TableBody,
|
|
186
188
|
S as TableCaption,
|
|
187
189
|
B as TableCell,
|
|
188
|
-
|
|
190
|
+
z as TableFooter,
|
|
189
191
|
n as TableHead,
|
|
190
|
-
|
|
191
|
-
|
|
192
|
+
v as TableHeader,
|
|
193
|
+
C as TableRow,
|
|
192
194
|
V as tableCellVariants,
|
|
193
195
|
H as tableHeadVariants,
|
|
194
196
|
w as tableVariants
|