@gearbox-protocol/ui-kit 4.0.0-next.15 → 4.0.0-next.16
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/base/stat-badge/constants.cjs +1 -1
- package/dist/cjs/components/base/stat-badge/stat-badge.cjs +1 -1
- package/dist/cjs/components/base/strategy-apy-breakdown-card/strategy-apy-breakdown-card.cjs +1 -1
- package/dist/cjs/components/base/tabber/tabber.cjs +1 -1
- package/dist/cjs/components/yield-breakdown-tooltip/yield-breakdown-tooltip.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/locale/en.json.cjs +1 -1
- package/dist/cjs/utils/index.cjs +1 -1
- package/dist/cjs/utils/strategy-apy.cjs +1 -0
- package/dist/esm/components/base/stat-badge/constants.js +1 -0
- package/dist/esm/components/base/stat-badge/stat-badge.js +87 -52
- package/dist/esm/components/base/strategy-apy-breakdown-card/strategy-apy-breakdown-card.js +130 -110
- package/dist/esm/components/base/tabber/tabber.js +67 -64
- package/dist/esm/components/yield-breakdown-tooltip/yield-breakdown-tooltip.js +20 -19
- package/dist/esm/index.js +234 -230
- package/dist/esm/locale/en.json.js +2 -1
- package/dist/esm/utils/index.js +64 -60
- package/dist/esm/utils/strategy-apy.js +41 -0
- package/dist/types/components/base/stat-badge/constants.d.ts +1 -0
- package/dist/types/components/base/stat-badge/stat-badge.d.ts +11 -1
- package/dist/types/components/base/strategy-apy-breakdown-card/strategy-apy-breakdown-card.d.ts +12 -0
- package/dist/types/components/base/tabber/tabber.d.ts +2 -2
- package/dist/types/locale/en.json.d.ts +2 -1
- package/dist/types/utils/index.d.ts +1 -0
- package/dist/types/utils/strategy-apy.d.ts +37 -0
- package/package.json +1 -1
|
@@ -1,124 +1,159 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { Stack as
|
|
3
|
-
import { useTitleText as
|
|
4
|
-
import {
|
|
1
|
+
import { jsxs as a, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { Stack as p } from "../stack/stack.js";
|
|
3
|
+
import { useTitleText as x } from "../text/use-title-text.js";
|
|
4
|
+
import { faCaretDown as h, faCaretUp as S } from "@fortawesome/free-solid-svg-icons";
|
|
5
|
+
import { FaIcon as v } from "../../icons/fa-icon.js";
|
|
6
|
+
import { Skeleton as N } from "../../skeleton/skeleton.js";
|
|
5
7
|
import "react";
|
|
6
8
|
import "@gearbox-protocol/sdk";
|
|
7
|
-
import { cn as
|
|
9
|
+
import { cn as o } from "../../../utils/cn.js";
|
|
8
10
|
import "sonner";
|
|
9
11
|
import "@gearbox-protocol/sdk/common-utils";
|
|
10
12
|
import "luxon";
|
|
11
13
|
import "../../../utils/z-index.js";
|
|
14
|
+
import { SimpleTooltip as b } from "../../tooltip/simple-tooltip.js";
|
|
15
|
+
import "../../tooltip/tooltip.js";
|
|
12
16
|
import { StatBadgeTest as m } from "./constants.js";
|
|
13
|
-
const
|
|
17
|
+
const I = {
|
|
14
18
|
sm: "p-4",
|
|
15
19
|
md: "p-5",
|
|
16
20
|
default: "p-6"
|
|
17
|
-
},
|
|
21
|
+
}, T = {
|
|
18
22
|
sm: "mb-2.5",
|
|
19
23
|
md: "mb-2",
|
|
20
24
|
default: "mb-3"
|
|
21
|
-
},
|
|
25
|
+
}, d = {
|
|
22
26
|
sm: "text-xs leading-[0.8125rem]",
|
|
23
27
|
md: "text-xs leading-[0.9rem]",
|
|
24
28
|
default: "text-sm leading-[1.0625rem]"
|
|
25
|
-
},
|
|
29
|
+
}, _ = {
|
|
26
30
|
sm: "text-sm leading-[1.0625rem]",
|
|
27
31
|
md: "text-base leading-[1.25rem]",
|
|
28
32
|
default: "text-xl leading-[1.5625rem]"
|
|
29
33
|
};
|
|
30
|
-
function
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
isLoading: a = !1,
|
|
34
|
-
size: t = "default",
|
|
35
|
-
action: l,
|
|
36
|
-
className: o,
|
|
37
|
-
testId: n
|
|
34
|
+
function w({
|
|
35
|
+
delta: t,
|
|
36
|
+
size: i
|
|
38
37
|
}) {
|
|
39
|
-
const
|
|
40
|
-
|
|
38
|
+
const l = t.value > 0 ? "text-success" : t.value < 0 ? "text-destructive" : "text-muted-foreground", e = /* @__PURE__ */ a(
|
|
39
|
+
"span",
|
|
40
|
+
{
|
|
41
|
+
className: o(
|
|
42
|
+
"inline-flex items-center gap-0.5 font-medium",
|
|
43
|
+
d[i],
|
|
44
|
+
l
|
|
45
|
+
),
|
|
46
|
+
"data-testid": m.delta,
|
|
47
|
+
children: [
|
|
48
|
+
/* @__PURE__ */ r(
|
|
49
|
+
v,
|
|
50
|
+
{
|
|
51
|
+
icon: t.value < 0 ? h : S,
|
|
52
|
+
className: "size-3"
|
|
53
|
+
}
|
|
54
|
+
),
|
|
55
|
+
t.label
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
);
|
|
59
|
+
return t.tooltip == null ? e : /* @__PURE__ */ r(b, { title: e, triggerClassName: "shrink-0", children: t.tooltip });
|
|
60
|
+
}
|
|
61
|
+
function J({
|
|
62
|
+
title: t,
|
|
63
|
+
value: i,
|
|
64
|
+
isLoading: l = !1,
|
|
65
|
+
size: e = "default",
|
|
66
|
+
delta: s,
|
|
67
|
+
action: n,
|
|
68
|
+
className: c,
|
|
69
|
+
testId: u
|
|
70
|
+
}) {
|
|
71
|
+
const f = x(), g = s != null && !l;
|
|
72
|
+
return /* @__PURE__ */ a(
|
|
41
73
|
"div",
|
|
42
74
|
{
|
|
43
|
-
className:
|
|
75
|
+
className: o(
|
|
44
76
|
"h-full w-full rounded-lg border border-border bg-card",
|
|
45
|
-
|
|
46
|
-
|
|
77
|
+
I[e],
|
|
78
|
+
c
|
|
47
79
|
),
|
|
48
|
-
"data-testid":
|
|
80
|
+
"data-testid": u ?? m.root,
|
|
49
81
|
children: [
|
|
50
|
-
/* @__PURE__ */
|
|
82
|
+
/* @__PURE__ */ a(
|
|
51
83
|
"div",
|
|
52
84
|
{
|
|
53
|
-
className:
|
|
85
|
+
className: o(
|
|
54
86
|
"flex items-center justify-between gap-2",
|
|
55
|
-
|
|
87
|
+
T[e]
|
|
56
88
|
),
|
|
57
89
|
children: [
|
|
58
|
-
/* @__PURE__ */
|
|
90
|
+
/* @__PURE__ */ r(
|
|
59
91
|
"div",
|
|
60
92
|
{
|
|
61
|
-
className:
|
|
62
|
-
children:
|
|
93
|
+
className: o("font-medium text-muted-foreground", d[e]),
|
|
94
|
+
children: f(t)
|
|
63
95
|
}
|
|
64
96
|
),
|
|
65
|
-
|
|
97
|
+
g || n != null ? /* @__PURE__ */ a("div", { className: "flex shrink-0 items-center gap-2", children: [
|
|
98
|
+
s != null && !l ? /* @__PURE__ */ r(w, { delta: s, size: e }) : null,
|
|
99
|
+
n != null ? /* @__PURE__ */ r("div", { className: "shrink-0", "data-testid": m.action, children: n }) : null
|
|
100
|
+
] }) : null
|
|
66
101
|
]
|
|
67
102
|
}
|
|
68
103
|
),
|
|
69
|
-
/* @__PURE__ */
|
|
104
|
+
/* @__PURE__ */ r(
|
|
70
105
|
"div",
|
|
71
106
|
{
|
|
72
|
-
className:
|
|
107
|
+
className: o(
|
|
73
108
|
"text-left font-medium text-foreground",
|
|
74
|
-
|
|
109
|
+
_[e]
|
|
75
110
|
),
|
|
76
|
-
children: /* @__PURE__ */
|
|
111
|
+
children: /* @__PURE__ */ r(N, { width: 80, loading: l, children: /* @__PURE__ */ r(p, { gap: "xs", align: "start", className: "w-full items-start", children: i }) })
|
|
77
112
|
}
|
|
78
113
|
)
|
|
79
114
|
]
|
|
80
115
|
}
|
|
81
116
|
);
|
|
82
117
|
}
|
|
83
|
-
const
|
|
118
|
+
const E = {
|
|
84
119
|
1: "grid-cols-1",
|
|
85
120
|
2: "grid-cols-2",
|
|
86
121
|
3: "grid-cols-3",
|
|
87
122
|
4: "grid-cols-4"
|
|
88
|
-
},
|
|
123
|
+
}, G = {
|
|
89
124
|
1: "lg:grid-cols-1",
|
|
90
125
|
2: "lg:grid-cols-2",
|
|
91
126
|
3: "lg:grid-cols-3",
|
|
92
127
|
4: "lg:grid-cols-4"
|
|
93
|
-
},
|
|
128
|
+
}, D = {
|
|
94
129
|
sm: "gap-2",
|
|
95
130
|
default: "gap-4",
|
|
96
131
|
lg: "gap-6"
|
|
97
132
|
};
|
|
98
|
-
function
|
|
99
|
-
cols:
|
|
100
|
-
colsLg:
|
|
101
|
-
gap:
|
|
102
|
-
children:
|
|
103
|
-
className:
|
|
133
|
+
function K({
|
|
134
|
+
cols: t = 1,
|
|
135
|
+
colsLg: i,
|
|
136
|
+
gap: l = "default",
|
|
137
|
+
children: e,
|
|
138
|
+
className: s
|
|
104
139
|
}) {
|
|
105
|
-
return /* @__PURE__ */
|
|
140
|
+
return /* @__PURE__ */ r(
|
|
106
141
|
"div",
|
|
107
142
|
{
|
|
108
|
-
className:
|
|
143
|
+
className: o(
|
|
109
144
|
"grid w-full",
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
145
|
+
E[t],
|
|
146
|
+
i ? G[i] : void 0,
|
|
147
|
+
D[l],
|
|
148
|
+
s
|
|
114
149
|
),
|
|
115
150
|
"data-testid": m.grid,
|
|
116
|
-
children:
|
|
151
|
+
children: e
|
|
117
152
|
}
|
|
118
153
|
);
|
|
119
154
|
}
|
|
120
155
|
export {
|
|
121
|
-
|
|
122
|
-
|
|
156
|
+
J as StatBadge,
|
|
157
|
+
K as StatBadgeGrid,
|
|
123
158
|
m as StatBadgeTest
|
|
124
159
|
};
|
|
@@ -1,174 +1,194 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { PointsIcon as
|
|
3
|
-
import { TokenIcon as
|
|
4
|
-
import { FormattedMessageTyped as
|
|
1
|
+
import { jsxs as u, jsx as l, Fragment as M } from "react/jsx-runtime";
|
|
2
|
+
import { PointsIcon as $ } from "../../points-icon/points-icon.js";
|
|
3
|
+
import { TokenIcon as q } from "../../token-icon/token-icon.js";
|
|
4
|
+
import { FormattedMessageTyped as d } from "../../typed-intl/index.js";
|
|
5
5
|
import "react";
|
|
6
|
-
import { positiveTokenRewardsOf as
|
|
6
|
+
import { positiveTokenRewardsOf as F, pointProgramsOf as T, totalApyOf as R } from "../../../utils/apy-breakdown.js";
|
|
7
7
|
import "@gearbox-protocol/sdk";
|
|
8
|
-
import { bpsToPercent as
|
|
8
|
+
import { bpsToPercent as j } from "../../../utils/bps.js";
|
|
9
9
|
import { cn as w } from "../../../utils/cn.js";
|
|
10
10
|
import "sonner";
|
|
11
|
-
import { formatLeverage as
|
|
12
|
-
import { formatCompactPercent as
|
|
13
|
-
import {
|
|
11
|
+
import { formatLeverage as s } from "../../../utils/format-leverage.js";
|
|
12
|
+
import { formatCompactPercent as S } from "../../../utils/format-money.js";
|
|
13
|
+
import { strategyApyPartsAtLeverage as O } from "../../../utils/strategy-apy.js";
|
|
14
14
|
import "@gearbox-protocol/sdk/common-utils";
|
|
15
15
|
import "luxon";
|
|
16
16
|
import "../../../utils/z-index.js";
|
|
17
|
-
import { StrategyApyBreakdownCardTest as
|
|
18
|
-
const
|
|
19
|
-
function
|
|
20
|
-
const
|
|
21
|
-
if (Math.abs(
|
|
22
|
-
const
|
|
23
|
-
return
|
|
17
|
+
import { StrategyApyBreakdownCardTest as h } from "./constants.js";
|
|
18
|
+
const i = "—";
|
|
19
|
+
function a(e) {
|
|
20
|
+
const r = j(e);
|
|
21
|
+
if (Math.abs(r) >= 1e3) {
|
|
22
|
+
const p = S(Math.abs(r));
|
|
23
|
+
return r < 0 ? `−${p}` : p;
|
|
24
24
|
}
|
|
25
|
-
const
|
|
26
|
-
return
|
|
25
|
+
const m = Math.abs(r).toFixed(2);
|
|
26
|
+
return r < 0 ? `−${m}%` : `${m}%`;
|
|
27
27
|
}
|
|
28
|
-
function
|
|
29
|
-
return
|
|
28
|
+
function z(e) {
|
|
29
|
+
return e == null || e <= 0 ? "bg-muted text-muted-foreground" : "bg-success/20 text-success";
|
|
30
30
|
}
|
|
31
|
-
function
|
|
32
|
-
base:
|
|
33
|
-
leverage:
|
|
31
|
+
function g({
|
|
32
|
+
base: e,
|
|
33
|
+
leverage: r
|
|
34
34
|
}) {
|
|
35
|
-
return /* @__PURE__ */
|
|
36
|
-
|
|
35
|
+
return /* @__PURE__ */ l(
|
|
36
|
+
d,
|
|
37
37
|
{
|
|
38
38
|
messageId: "components.strategyApyBreakdownCard.formula",
|
|
39
|
-
values: { base:
|
|
39
|
+
values: { base: e, leverage: r }
|
|
40
40
|
}
|
|
41
41
|
);
|
|
42
42
|
}
|
|
43
|
-
function
|
|
44
|
-
data:
|
|
45
|
-
leverage:
|
|
43
|
+
function oe({
|
|
44
|
+
data: e,
|
|
45
|
+
leverage: r
|
|
46
46
|
}) {
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
47
|
+
const t = r ?? (e.maxLeverage != null && e.maxLeverage > 0 ? e.maxLeverage : void 0), m = t != null ? s(t) : i, p = e.collateralApy ? F(e.collateralApy) : [], k = e.collateralApy ? T(e.collateralApy) : [], n = t != null ? O({
|
|
48
|
+
leverage: t,
|
|
49
|
+
maxLeverage: e.maxLeverage,
|
|
50
|
+
borrowApy: e.borrowApy,
|
|
51
|
+
additionalBorrowApy: e.additionalBorrowApy
|
|
52
|
+
}) : void 0, y = e.collateralApy?.organicApy, b = y != null && t != null ? y * t : void 0, f = p.map(
|
|
53
|
+
(o) => o.supplyApr != null && t != null ? o.supplyApr * t : void 0
|
|
54
|
+
), N = e.borrowApy != null && n != null ? -n.borrowCost : void 0, L = e.additionalBorrowApy, x = L != null && L !== 0, B = x && n != null ? n.quotaRate : void 0, C = x && n != null ? -n.quotaCost : void 0, I = b != null && n != null && f.every((o) => o != null) ? b + f.reduce((o, c) => o + (c ?? 0), 0) - n.totalCost : void 0, P = t != null && e.maxLeverage != null && e.maxLeverage > 0 && Math.abs(t - e.maxLeverage) < 1e-9, A = e.netApy != null ? R(e.netApy) : P && e.maxLeverageApy != null ? R(e.maxLeverageApy) : I;
|
|
55
|
+
return /* @__PURE__ */ u(
|
|
51
56
|
"div",
|
|
52
57
|
{
|
|
53
58
|
className: "flex w-full min-w-0 flex-col gap-4 rounded-xl border border-border bg-card p-4",
|
|
54
|
-
"data-testid":
|
|
59
|
+
"data-testid": h.root,
|
|
55
60
|
children: [
|
|
56
|
-
/* @__PURE__ */
|
|
57
|
-
/* @__PURE__ */
|
|
58
|
-
|
|
61
|
+
/* @__PURE__ */ u("div", { className: "flex h-6 items-center justify-between gap-3", children: [
|
|
62
|
+
/* @__PURE__ */ l("span", { className: "text-base font-semibold leading-4 text-foreground", children: /* @__PURE__ */ l(
|
|
63
|
+
d,
|
|
59
64
|
{
|
|
60
65
|
messageId: "components.strategyApyBreakdownCard.titleAtLeverage",
|
|
61
|
-
values: { leverage:
|
|
66
|
+
values: { leverage: m }
|
|
62
67
|
}
|
|
63
68
|
) }),
|
|
64
|
-
/* @__PURE__ */
|
|
69
|
+
/* @__PURE__ */ l(
|
|
65
70
|
"span",
|
|
66
71
|
{
|
|
67
72
|
className: w(
|
|
68
73
|
"rounded-md px-2 py-0.5 text-sm font-semibold tabular-nums",
|
|
69
|
-
|
|
74
|
+
z(A)
|
|
70
75
|
),
|
|
71
|
-
"data-testid":
|
|
72
|
-
children:
|
|
76
|
+
"data-testid": h.net,
|
|
77
|
+
children: A == null ? i : a(A)
|
|
73
78
|
}
|
|
74
79
|
)
|
|
75
80
|
] }),
|
|
76
|
-
/* @__PURE__ */
|
|
77
|
-
/* @__PURE__ */
|
|
78
|
-
|
|
81
|
+
/* @__PURE__ */ u("div", { className: "flex flex-col gap-3", children: [
|
|
82
|
+
/* @__PURE__ */ l(
|
|
83
|
+
v,
|
|
79
84
|
{
|
|
80
|
-
label: /* @__PURE__ */
|
|
81
|
-
value:
|
|
82
|
-
subtext:
|
|
83
|
-
|
|
85
|
+
label: /* @__PURE__ */ l(d, { messageId: "components.strategyApyBreakdownCard.collateralApy" }),
|
|
86
|
+
value: b == null ? i : a(b),
|
|
87
|
+
subtext: y != null && t != null ? /* @__PURE__ */ l(
|
|
88
|
+
g,
|
|
84
89
|
{
|
|
85
|
-
base:
|
|
86
|
-
leverage:
|
|
90
|
+
base: a(y),
|
|
91
|
+
leverage: s(t)
|
|
87
92
|
}
|
|
88
93
|
) : void 0
|
|
89
94
|
}
|
|
90
95
|
),
|
|
91
|
-
|
|
92
|
-
|
|
96
|
+
p.map((o, c) => /* @__PURE__ */ l(
|
|
97
|
+
v,
|
|
93
98
|
{
|
|
94
|
-
label: /* @__PURE__ */
|
|
95
|
-
/* @__PURE__ */
|
|
96
|
-
|
|
99
|
+
label: /* @__PURE__ */ u("span", { className: "inline-flex items-center gap-1.5", children: [
|
|
100
|
+
/* @__PURE__ */ l("span", { children: /* @__PURE__ */ l(
|
|
101
|
+
d,
|
|
97
102
|
{
|
|
98
103
|
messageId: "components.apyParts.extraAPY",
|
|
99
|
-
values: { symbol:
|
|
104
|
+
values: { symbol: o.token.symbol }
|
|
100
105
|
}
|
|
101
106
|
) }),
|
|
102
|
-
/* @__PURE__ */
|
|
103
|
-
|
|
107
|
+
/* @__PURE__ */ l(
|
|
108
|
+
q,
|
|
104
109
|
{
|
|
105
|
-
token:
|
|
106
|
-
symbol:
|
|
110
|
+
token: o.token,
|
|
111
|
+
symbol: o.token.symbol,
|
|
107
112
|
size: 16,
|
|
108
113
|
className: "shrink-0"
|
|
109
114
|
}
|
|
110
115
|
)
|
|
111
116
|
] }),
|
|
112
|
-
value: c
|
|
113
|
-
subtext:
|
|
114
|
-
|
|
117
|
+
value: f[c] == null ? i : a(f[c]),
|
|
118
|
+
subtext: o.supplyApr != null && t != null ? /* @__PURE__ */ l(
|
|
119
|
+
g,
|
|
115
120
|
{
|
|
116
|
-
base:
|
|
117
|
-
leverage:
|
|
121
|
+
base: a(o.supplyApr),
|
|
122
|
+
leverage: s(t)
|
|
118
123
|
}
|
|
119
124
|
) : void 0
|
|
120
125
|
},
|
|
121
|
-
`incentive-${
|
|
126
|
+
`incentive-${o.token.address}-${o.supplyApr ?? 0}`
|
|
122
127
|
)),
|
|
123
|
-
/* @__PURE__ */
|
|
124
|
-
|
|
128
|
+
/* @__PURE__ */ l(
|
|
129
|
+
v,
|
|
125
130
|
{
|
|
126
131
|
muted: !0,
|
|
127
|
-
label: /* @__PURE__ */
|
|
128
|
-
value:
|
|
129
|
-
subtext:
|
|
130
|
-
|
|
132
|
+
label: /* @__PURE__ */ l(d, { messageId: "components.strategyApyBreakdownCard.borrowRate" }),
|
|
133
|
+
value: N == null ? i : a(N),
|
|
134
|
+
subtext: e.borrowApy != null && n != null ? /* @__PURE__ */ l(
|
|
135
|
+
g,
|
|
131
136
|
{
|
|
132
|
-
base:
|
|
133
|
-
leverage:
|
|
137
|
+
base: a(-e.borrowApy),
|
|
138
|
+
leverage: s(n.debtMultiplier)
|
|
134
139
|
}
|
|
135
140
|
) : void 0
|
|
136
141
|
}
|
|
137
142
|
),
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
143
|
+
x ? /* @__PURE__ */ l(
|
|
144
|
+
v,
|
|
145
|
+
{
|
|
146
|
+
muted: !0,
|
|
147
|
+
label: /* @__PURE__ */ l(d, { messageId: "components.strategyApyBreakdownCard.quotaRate" }),
|
|
148
|
+
value: C == null ? i : a(C),
|
|
149
|
+
subtext: B != null && t != null ? /* @__PURE__ */ l(
|
|
150
|
+
g,
|
|
151
|
+
{
|
|
152
|
+
base: a(-B),
|
|
153
|
+
leverage: s(t)
|
|
154
|
+
}
|
|
155
|
+
) : void 0
|
|
156
|
+
}
|
|
157
|
+
) : null,
|
|
158
|
+
k.length > 0 ? /* @__PURE__ */ u(M, { children: [
|
|
159
|
+
/* @__PURE__ */ l("div", { className: "h-px w-full bg-divider" }),
|
|
160
|
+
k.map((o) => {
|
|
161
|
+
const c = o.multiplier != null && t != null ? o.multiplier * t : void 0;
|
|
162
|
+
return /* @__PURE__ */ l(
|
|
163
|
+
v,
|
|
144
164
|
{
|
|
145
|
-
label: /* @__PURE__ */
|
|
146
|
-
/* @__PURE__ */
|
|
147
|
-
|
|
165
|
+
label: /* @__PURE__ */ u("span", { className: "inline-flex items-center gap-1.5", children: [
|
|
166
|
+
/* @__PURE__ */ l("span", { children: /* @__PURE__ */ l(
|
|
167
|
+
d,
|
|
148
168
|
{
|
|
149
169
|
messageId: "components.yieldBreakdown.programPoints",
|
|
150
|
-
values: { name:
|
|
170
|
+
values: { name: o.name }
|
|
151
171
|
}
|
|
152
172
|
) }),
|
|
153
|
-
/* @__PURE__ */
|
|
154
|
-
|
|
173
|
+
/* @__PURE__ */ l(
|
|
174
|
+
$,
|
|
155
175
|
{
|
|
156
|
-
reward: { name:
|
|
176
|
+
reward: { name: o.name, type: o.id },
|
|
157
177
|
size: 16,
|
|
158
178
|
className: "shrink-0"
|
|
159
179
|
}
|
|
160
180
|
)
|
|
161
181
|
] }),
|
|
162
|
-
value:
|
|
163
|
-
subtext:
|
|
164
|
-
|
|
182
|
+
value: c != null ? `${s(c)}×` : i,
|
|
183
|
+
subtext: o.multiplier != null && t != null ? /* @__PURE__ */ l(
|
|
184
|
+
g,
|
|
165
185
|
{
|
|
166
|
-
base:
|
|
167
|
-
leverage:
|
|
186
|
+
base: s(o.multiplier),
|
|
187
|
+
leverage: s(t)
|
|
168
188
|
}
|
|
169
189
|
) : void 0
|
|
170
190
|
},
|
|
171
|
-
|
|
191
|
+
o.id
|
|
172
192
|
);
|
|
173
193
|
})
|
|
174
194
|
] }) : null
|
|
@@ -177,38 +197,38 @@ function Z({
|
|
|
177
197
|
}
|
|
178
198
|
);
|
|
179
199
|
}
|
|
180
|
-
function
|
|
181
|
-
label:
|
|
182
|
-
value:
|
|
183
|
-
subtext:
|
|
184
|
-
muted:
|
|
200
|
+
function v({
|
|
201
|
+
label: e,
|
|
202
|
+
value: r,
|
|
203
|
+
subtext: t,
|
|
204
|
+
muted: m = !1
|
|
185
205
|
}) {
|
|
186
|
-
const
|
|
187
|
-
return /* @__PURE__ */
|
|
206
|
+
const p = m ? "text-muted-foreground" : "text-foreground";
|
|
207
|
+
return /* @__PURE__ */ u(
|
|
188
208
|
"div",
|
|
189
209
|
{
|
|
190
210
|
className: "flex items-start justify-between gap-3",
|
|
191
|
-
"data-testid":
|
|
211
|
+
"data-testid": h.row,
|
|
192
212
|
children: [
|
|
193
|
-
/* @__PURE__ */
|
|
194
|
-
/* @__PURE__ */
|
|
195
|
-
/* @__PURE__ */
|
|
213
|
+
/* @__PURE__ */ l("span", { className: w("min-w-0 text-sm font-semibold leading-5", p), children: e }),
|
|
214
|
+
/* @__PURE__ */ u("span", { className: "flex shrink-0 flex-col items-end", children: [
|
|
215
|
+
/* @__PURE__ */ l(
|
|
196
216
|
"span",
|
|
197
217
|
{
|
|
198
218
|
className: w(
|
|
199
219
|
"text-sm font-semibold leading-5 tabular-nums",
|
|
200
|
-
|
|
220
|
+
r === i || m ? "text-muted-foreground" : "text-foreground"
|
|
201
221
|
),
|
|
202
|
-
children:
|
|
222
|
+
children: r
|
|
203
223
|
}
|
|
204
224
|
),
|
|
205
|
-
|
|
225
|
+
t != null ? /* @__PURE__ */ l("span", { className: "text-xs leading-4 text-muted-foreground", children: t }) : null
|
|
206
226
|
] })
|
|
207
227
|
]
|
|
208
228
|
}
|
|
209
229
|
);
|
|
210
230
|
}
|
|
211
231
|
export {
|
|
212
|
-
|
|
213
|
-
|
|
232
|
+
oe as StrategyApyBreakdownCard,
|
|
233
|
+
h as StrategyApyBreakdownCardTest
|
|
214
234
|
};
|