@gearbox-protocol/ui-kit 3.5.2 → 3.6.0-next.2
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/PoolCreditManagersTable/PoolCreditManagersLine.cjs +1 -0
- package/dist/cjs/components/PoolCreditManagersTable/TableHead.cjs +1 -0
- package/dist/cjs/components/PoolCreditManagersTable/constants.cjs +1 -0
- package/dist/cjs/components/PoolCreditManagersTable/index.cjs +1 -0
- package/dist/cjs/components/PoolCreditManagersTable/types.cjs +1 -0
- package/dist/cjs/components/PoolsAssetsTable/PoolAssetsLine.cjs +1 -0
- package/dist/cjs/components/PoolsAssetsTable/TableHead.cjs +1 -0
- package/dist/cjs/components/PoolsAssetsTable/index.cjs +1 -0
- package/dist/cjs/components/PoolsAssetsTable/types.cjs +1 -0
- package/dist/cjs/components/compound-apy/compound-apy.cjs +1 -1
- package/dist/cjs/components/index.cjs +1 -1
- package/dist/cjs/components/pool-apy-tooltip/pool-apy-tooltip.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/locale/en.json.cjs +1 -1
- package/dist/esm/components/PoolCreditManagersTable/PoolCreditManagersLine.js +71 -0
- package/dist/esm/components/PoolCreditManagersTable/TableHead.js +52 -0
- package/dist/esm/components/PoolCreditManagersTable/constants.js +7 -0
- package/dist/esm/components/PoolCreditManagersTable/index.js +45 -0
- package/dist/esm/components/PoolCreditManagersTable/types.js +1 -0
- package/dist/esm/components/PoolsAssetsTable/PoolAssetsLine.js +107 -0
- package/dist/esm/components/PoolsAssetsTable/TableHead.js +52 -0
- package/dist/esm/components/PoolsAssetsTable/index.js +43 -0
- package/dist/esm/components/PoolsAssetsTable/types.js +1 -0
- package/dist/esm/components/compound-apy/compound-apy.js +1 -1
- package/dist/esm/components/index.js +386 -378
- package/dist/esm/components/pool-apy-tooltip/pool-apy-tooltip.js +69 -75
- package/dist/esm/index.js +489 -481
- package/dist/esm/locale/en.json.js +9 -1
- package/dist/globals.css +1 -1
- package/dist/types/components/PoolCreditManagersTable/PoolCreditManagersLine.d.ts +11 -0
- package/dist/types/components/PoolCreditManagersTable/TableHead.d.ts +7 -0
- package/dist/types/components/PoolCreditManagersTable/constants.d.ts +4 -0
- package/dist/types/components/PoolCreditManagersTable/index.d.ts +14 -0
- package/dist/types/components/PoolCreditManagersTable/types.d.ts +22 -0
- package/dist/types/components/PoolsAssetsTable/PoolAssetsLine.d.ts +12 -0
- package/dist/types/components/PoolsAssetsTable/TableHead.d.ts +7 -0
- package/dist/types/components/PoolsAssetsTable/index.d.ts +13 -0
- package/dist/types/components/PoolsAssetsTable/types.d.ts +17 -0
- package/dist/types/components/composites/pool-table/pool-table-backend-contract.types.d.ts +17 -168
- package/dist/types/components/index.d.ts +2 -0
- package/dist/types/components/pool-apy-tooltip/pool-apy-tooltip.d.ts +1 -2
- package/dist/types/index.d.ts +2 -0
- package/dist/types/locale/en.json.d.ts +11 -1
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
2
|
-
import { faPlus as
|
|
1
|
+
import { jsx as e, jsxs as o, Fragment as b } from "react/jsx-runtime";
|
|
2
|
+
import { faPlus as N } from "@fortawesome/free-solid-svg-icons";
|
|
3
3
|
import { IconLighting as T } from "@gearbox-protocol/static";
|
|
4
4
|
import { getRewardTokenSymbol as k } from "../compound-apy/compound-apy.js";
|
|
5
5
|
import { FaIcon as S } from "../icons/fa-icon.js";
|
|
@@ -7,22 +7,22 @@ import { PointsIcon as _ } from "../points-icon/points-icon.js";
|
|
|
7
7
|
import { Skeleton as z } from "../skeleton/skeleton.js";
|
|
8
8
|
import "react";
|
|
9
9
|
import "@gearbox-protocol/sdk";
|
|
10
|
-
import { cn as
|
|
10
|
+
import { cn as y } from "../../utils/cn.js";
|
|
11
11
|
import "sonner";
|
|
12
12
|
import { percentTemplate as r } from "../../utils/format-money.js";
|
|
13
13
|
import "@gearbox-protocol/sdk/common-utils";
|
|
14
14
|
import "luxon";
|
|
15
15
|
import "../../utils/z-index.js";
|
|
16
16
|
import { TokenIcon as C } from "../token-icon/token-icon.js";
|
|
17
|
-
import { SimpleTooltip as
|
|
17
|
+
import { SimpleTooltip as Y } from "../tooltip/simple-tooltip.js";
|
|
18
18
|
import "../tooltip/tooltip.js";
|
|
19
|
-
import { FormattedMessageTyped as
|
|
20
|
-
import { VerticalIndicator as
|
|
21
|
-
import { VerticalList as
|
|
22
|
-
const
|
|
19
|
+
import { FormattedMessageTyped as n } from "../typed-intl/index.js";
|
|
20
|
+
import { VerticalIndicator as l } from "../vertical-indicator/vertical-indicator.js";
|
|
21
|
+
import { VerticalList as u } from "../vertical-list/vertical-list.js";
|
|
22
|
+
const A = {
|
|
23
23
|
supplyAPY: "components.apyParts.supplyAPY",
|
|
24
24
|
tokenYield: "components.apyParts.tokenYield"
|
|
25
|
-
},
|
|
25
|
+
}, L = {
|
|
26
26
|
supplyAPY: "components.apyParts.supplyAPY.tip",
|
|
27
27
|
tokenYield: "components.apyParts.tokenYield.tip"
|
|
28
28
|
}, v = {
|
|
@@ -30,29 +30,29 @@ const $ = {
|
|
|
30
30
|
"cross-chain-deposit": "components.apyParts.points.condition.crossDeposit",
|
|
31
31
|
holding: void 0
|
|
32
32
|
};
|
|
33
|
-
function
|
|
34
|
-
return /* @__PURE__ */ e("div", { className: "w-[110px] grid grid-cols-2 items-end text-end", children:
|
|
33
|
+
function $({ children: d }) {
|
|
34
|
+
return /* @__PURE__ */ e("div", { className: "w-[110px] grid grid-cols-2 items-end text-end", children: d });
|
|
35
35
|
}
|
|
36
|
-
function
|
|
37
|
-
children:
|
|
36
|
+
function ne({
|
|
37
|
+
children: d,
|
|
38
38
|
totalAPY: f,
|
|
39
39
|
baseAPY: c,
|
|
40
40
|
extraAPY: h,
|
|
41
|
-
points:
|
|
41
|
+
points: s,
|
|
42
42
|
apy7DAgo: a,
|
|
43
|
-
externalAPY:
|
|
43
|
+
externalAPY: m,
|
|
44
44
|
tokensList: w,
|
|
45
45
|
className: g
|
|
46
46
|
}) {
|
|
47
|
-
if (!(f !== void 0 || c && c.length > 0 || h && h.length > 0 ||
|
|
48
|
-
return /* @__PURE__ */ e("span", { className: g, children:
|
|
49
|
-
const I = !a || !!a.totalAPYLoading || !!a.loading7DAgo, x = !!a, p = (t,
|
|
47
|
+
if (!(f !== void 0 || c && c.length > 0 || h && h.length > 0 || s && s.length > 0))
|
|
48
|
+
return /* @__PURE__ */ e("span", { className: g, children: d });
|
|
49
|
+
const I = !a || !!a.totalAPYLoading || !!a.loading7DAgo, x = !!a, p = (t, i) => x ? /* @__PURE__ */ o($, { children: [
|
|
50
50
|
/* @__PURE__ */ e("span", { children: t }),
|
|
51
|
-
/* @__PURE__ */ e("span", { children: /* @__PURE__ */ e(z, { width: 30, height: 14, loading: I, children:
|
|
52
|
-
] }) : t,
|
|
51
|
+
/* @__PURE__ */ e("span", { children: /* @__PURE__ */ e(z, { width: 30, height: 14, loading: I, children: i }) })
|
|
52
|
+
] }) : t, P = /* @__PURE__ */ o(
|
|
53
53
|
"div",
|
|
54
54
|
{
|
|
55
|
-
className:
|
|
55
|
+
className: y(
|
|
56
56
|
"w-[370px] max-w-[calc(100vw-32px)] p-6",
|
|
57
57
|
"bg-popover",
|
|
58
58
|
"border border-border",
|
|
@@ -61,13 +61,13 @@ function oe({
|
|
|
61
61
|
"text-left font-normal"
|
|
62
62
|
),
|
|
63
63
|
children: [
|
|
64
|
-
/* @__PURE__ */
|
|
64
|
+
/* @__PURE__ */ o(u, { children: [
|
|
65
65
|
x && /* @__PURE__ */ e(
|
|
66
|
-
|
|
66
|
+
l,
|
|
67
67
|
{
|
|
68
68
|
size: "sm",
|
|
69
69
|
label: /* @__PURE__ */ e("span", { className: "uppercase text-muted-foreground text-xs", children: /* @__PURE__ */ e(
|
|
70
|
-
|
|
70
|
+
n,
|
|
71
71
|
{
|
|
72
72
|
messageId: "components.apyParts.title"
|
|
73
73
|
}
|
|
@@ -75,33 +75,33 @@ function oe({
|
|
|
75
75
|
value: /* @__PURE__ */ e("span", { className: "text-muted-foreground text-xs", children: p("1D", "7D") })
|
|
76
76
|
}
|
|
77
77
|
),
|
|
78
|
-
c?.map((t,
|
|
79
|
-
|
|
78
|
+
c?.map((t, i) => /* @__PURE__ */ e(
|
|
79
|
+
l,
|
|
80
80
|
{
|
|
81
81
|
size: "sm",
|
|
82
|
-
label: /* @__PURE__ */ e(
|
|
82
|
+
label: /* @__PURE__ */ e(n, { messageId: A[t.type] }),
|
|
83
83
|
description: /* @__PURE__ */ e(
|
|
84
|
-
|
|
84
|
+
n,
|
|
85
85
|
{
|
|
86
|
-
messageId:
|
|
86
|
+
messageId: L[t.type]
|
|
87
87
|
}
|
|
88
88
|
),
|
|
89
89
|
value: p(
|
|
90
90
|
r(t.apy),
|
|
91
|
-
r(a?.baseAPY?.[
|
|
91
|
+
r(a?.baseAPY?.[i]?.apy || 0)
|
|
92
92
|
)
|
|
93
93
|
},
|
|
94
94
|
`base-${t.type}-${t.apy}`
|
|
95
95
|
)),
|
|
96
96
|
h?.map((t) => {
|
|
97
|
-
const
|
|
97
|
+
const i = w?.[t.rewardToken];
|
|
98
98
|
return /* @__PURE__ */ e(
|
|
99
|
-
|
|
99
|
+
l,
|
|
100
100
|
{
|
|
101
101
|
size: "sm",
|
|
102
|
-
label: /* @__PURE__ */
|
|
102
|
+
label: /* @__PURE__ */ o("span", { className: "inline-flex items-center", children: [
|
|
103
103
|
/* @__PURE__ */ e(
|
|
104
|
-
|
|
104
|
+
n,
|
|
105
105
|
{
|
|
106
106
|
messageId: "components.apyParts.extraAPY",
|
|
107
107
|
values: { symbol: t.rewardTokenSymbol }
|
|
@@ -110,13 +110,13 @@ function oe({
|
|
|
110
110
|
/* @__PURE__ */ e("span", { className: "ml-1 inline-flex", children: /* @__PURE__ */ e(
|
|
111
111
|
C,
|
|
112
112
|
{
|
|
113
|
-
symbol: k(
|
|
113
|
+
symbol: k(i, t.rewardTokenSymbol),
|
|
114
114
|
size: 14
|
|
115
115
|
}
|
|
116
116
|
) })
|
|
117
117
|
] }),
|
|
118
118
|
description: /* @__PURE__ */ e(
|
|
119
|
-
|
|
119
|
+
n,
|
|
120
120
|
{
|
|
121
121
|
messageId: "components.apyParts.extraAPY.tip"
|
|
122
122
|
}
|
|
@@ -131,12 +131,12 @@ function oe({
|
|
|
131
131
|
})
|
|
132
132
|
] }),
|
|
133
133
|
/* @__PURE__ */ e("div", { className: "my-5 border-t border-border" }),
|
|
134
|
-
/* @__PURE__ */ e(
|
|
135
|
-
|
|
134
|
+
/* @__PURE__ */ e(u, { children: /* @__PURE__ */ e(
|
|
135
|
+
l,
|
|
136
136
|
{
|
|
137
137
|
size: "sm",
|
|
138
138
|
label: /* @__PURE__ */ e("span", { className: "font-bold", children: /* @__PURE__ */ e(
|
|
139
|
-
|
|
139
|
+
n,
|
|
140
140
|
{
|
|
141
141
|
messageId: "components.apyParts.totalAPY"
|
|
142
142
|
}
|
|
@@ -147,61 +147,55 @@ function oe({
|
|
|
147
147
|
)
|
|
148
148
|
}
|
|
149
149
|
) }),
|
|
150
|
-
|
|
150
|
+
m && /* @__PURE__ */ e(
|
|
151
151
|
"div",
|
|
152
152
|
{
|
|
153
|
-
className:
|
|
153
|
+
className: y(
|
|
154
154
|
"mt-5 px-8 pt-[18px] pb-4",
|
|
155
155
|
"rounded-[10px]",
|
|
156
156
|
"text-[13px] leading-[120%] text-center",
|
|
157
157
|
"border border-dashed border-gray-40"
|
|
158
158
|
),
|
|
159
|
-
children:
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
name: s.name,
|
|
173
|
-
value: t
|
|
174
|
-
}
|
|
159
|
+
children: /* @__PURE__ */ e(
|
|
160
|
+
n,
|
|
161
|
+
{
|
|
162
|
+
messageId: m.tooltip,
|
|
163
|
+
values: {
|
|
164
|
+
name: m.name,
|
|
165
|
+
value: /* @__PURE__ */ o(b, { children: [
|
|
166
|
+
/* @__PURE__ */ e("span", { className: "text-gray-90 mr-1.5", children: /* @__PURE__ */ e(T, { size: 14, style: { verticalAlign: "top" } }) }),
|
|
167
|
+
/* @__PURE__ */ o("span", { className: "font-bold", children: [
|
|
168
|
+
"+",
|
|
169
|
+
r(m.apy)
|
|
170
|
+
] })
|
|
171
|
+
] })
|
|
175
172
|
}
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
t
|
|
179
|
-
] });
|
|
180
|
-
})()
|
|
173
|
+
}
|
|
174
|
+
)
|
|
181
175
|
}
|
|
182
176
|
),
|
|
183
|
-
|
|
177
|
+
s && s.length > 0 && /* @__PURE__ */ o(b, { children: [
|
|
184
178
|
/* @__PURE__ */ e("div", { className: "relative my-2.5 mx-6 border-t-2 border-border", children: /* @__PURE__ */ e(
|
|
185
179
|
"div",
|
|
186
180
|
{
|
|
187
|
-
className:
|
|
181
|
+
className: y(
|
|
188
182
|
"absolute -top-[10px] left-0",
|
|
189
183
|
"w-5 h-5",
|
|
190
184
|
"flex items-center justify-center",
|
|
191
185
|
"rounded-full",
|
|
192
186
|
"bg-gray-20"
|
|
193
187
|
),
|
|
194
|
-
children: /* @__PURE__ */ e(S, { icon:
|
|
188
|
+
children: /* @__PURE__ */ e(S, { icon: N, className: "size-2.5 text-white" })
|
|
195
189
|
}
|
|
196
190
|
) }),
|
|
197
191
|
/* @__PURE__ */ e("div", { className: "h-6" }),
|
|
198
|
-
/* @__PURE__ */ e(
|
|
199
|
-
|
|
192
|
+
/* @__PURE__ */ e(u, { children: s.map((t) => /* @__PURE__ */ e(
|
|
193
|
+
l,
|
|
200
194
|
{
|
|
201
195
|
size: "sm",
|
|
202
|
-
label: /* @__PURE__ */
|
|
196
|
+
label: /* @__PURE__ */ o("span", { className: "inline-flex items-center", children: [
|
|
203
197
|
/* @__PURE__ */ e(
|
|
204
|
-
|
|
198
|
+
n,
|
|
205
199
|
{
|
|
206
200
|
messageId: "components.apyParts.points",
|
|
207
201
|
values: { symbol: t.name }
|
|
@@ -218,13 +212,13 @@ function oe({
|
|
|
218
212
|
}
|
|
219
213
|
) })
|
|
220
214
|
] }),
|
|
221
|
-
description: /* @__PURE__ */
|
|
215
|
+
description: /* @__PURE__ */ o("div", { children: [
|
|
222
216
|
/* @__PURE__ */ e("div", { children: `Per ${[
|
|
223
217
|
...t.reward?.duration ? [t.reward.duration] : [],
|
|
224
218
|
...t.tokenTitle ? [`1 ${t.tokenTitle}`] : []
|
|
225
219
|
].join(" per ")}` }),
|
|
226
220
|
t.reward?.condition && v[t.reward.condition] && /* @__PURE__ */ e("span", { className: "text-warning", children: /* @__PURE__ */ e(
|
|
227
|
-
|
|
221
|
+
n,
|
|
228
222
|
{
|
|
229
223
|
messageId: v[t.reward.condition]
|
|
230
224
|
}
|
|
@@ -239,19 +233,19 @@ function oe({
|
|
|
239
233
|
}
|
|
240
234
|
);
|
|
241
235
|
return /* @__PURE__ */ e(
|
|
242
|
-
|
|
236
|
+
Y,
|
|
243
237
|
{
|
|
244
238
|
placement: "bottom",
|
|
245
239
|
triangle: !1,
|
|
246
240
|
type: "modal-tooltip",
|
|
247
241
|
minWidth: "100%",
|
|
248
242
|
maxWidth: "100%",
|
|
249
|
-
title: /* @__PURE__ */ e("span", { className: g, children:
|
|
243
|
+
title: /* @__PURE__ */ e("span", { className: g, children: d }),
|
|
250
244
|
triggerClassName: g,
|
|
251
|
-
children:
|
|
245
|
+
children: P
|
|
252
246
|
}
|
|
253
247
|
);
|
|
254
248
|
}
|
|
255
249
|
export {
|
|
256
|
-
|
|
250
|
+
ne as PoolAPYTooltip
|
|
257
251
|
};
|