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