@gearbox-protocol/ui-kit 4.0.0-next.20 → 4.0.0-next.21

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.
Files changed (30) hide show
  1. package/dist/cjs/components/base/position-assets/position-assets.cjs +1 -1
  2. package/dist/cjs/components/base/strategy-apy-breakdown-card/constants.cjs +1 -1
  3. package/dist/cjs/components/base/strategy-apy-breakdown-card/strategy-apy-breakdown-card.cjs +1 -1
  4. package/dist/cjs/components/base/values/scalars.cjs +1 -1
  5. package/dist/cjs/components/compound-apy/compound-apy.cjs +1 -1
  6. package/dist/cjs/components/yield-breakdown-tooltip/yield-breakdown-tooltip.cjs +1 -1
  7. package/dist/cjs/index.cjs +1 -1
  8. package/dist/cjs/locale/en.json.cjs +1 -1
  9. package/dist/cjs/utils/index.cjs +1 -1
  10. package/dist/esm/components/base/position-assets/position-assets.js +62 -39
  11. package/dist/esm/components/base/strategy-apy-breakdown-card/constants.js +7 -3
  12. package/dist/esm/components/base/strategy-apy-breakdown-card/strategy-apy-breakdown-card.js +140 -166
  13. package/dist/esm/components/base/values/scalars.js +40 -35
  14. package/dist/esm/components/compound-apy/compound-apy.js +24 -23
  15. package/dist/esm/components/yield-breakdown-tooltip/yield-breakdown-tooltip.js +15 -15
  16. package/dist/esm/index.js +88 -91
  17. package/dist/esm/locale/en.json.js +3 -7
  18. package/dist/esm/utils/index.js +48 -51
  19. package/dist/globals.css +1 -1
  20. package/dist/types/components/base/position-assets/position-assets.d.ts +19 -13
  21. package/dist/types/components/base/strategy-apy-breakdown-card/constants.d.ts +5 -1
  22. package/dist/types/components/base/strategy-apy-breakdown-card/strategy-apy-breakdown-card.d.ts +39 -14
  23. package/dist/types/components/base/values/scalars.d.ts +17 -2
  24. package/dist/types/components/compound-apy/compound-apy.d.ts +11 -1
  25. package/dist/types/locale/en.json.d.ts +1 -6
  26. package/dist/types/utils/index.d.ts +0 -1
  27. package/package.json +1 -1
  28. package/dist/cjs/utils/strategy-apy.cjs +0 -1
  29. package/dist/esm/utils/strategy-apy.js +0 -51
  30. package/dist/types/utils/strategy-apy.d.ts +0 -40
@@ -1,5 +1,5 @@
1
- import { jsx as i, jsxs as p } from "react/jsx-runtime";
2
- import { Stack as d } from "../stack/stack.js";
1
+ import { jsx as n, jsxs as m, Fragment as p } from "react/jsx-runtime";
2
+ import { Stack as h } from "../stack/stack.js";
3
3
  import "react";
4
4
  import "@gearbox-protocol/sdk";
5
5
  import "clsx";
@@ -9,65 +9,88 @@ import "@gearbox-protocol/sdk/common-utils";
9
9
  import "luxon";
10
10
  import "../../../utils/z-index.js";
11
11
  import "../../points-icon/points-icon.js";
12
- import { TokenBigint as c } from "../values/scalars.js";
12
+ import { TokenBigint as d } from "../values/scalars.js";
13
13
  import "../../badge/badge.js";
14
14
  import "../../badge/chip.js";
15
15
  import "react-intl";
16
- import { TokenSymbol as f } from "../../token-symbol/token-symbol.js";
17
- import { Typography as u } from "../../typography/typography.js";
18
- import { PositionAssetsTest as m } from "./constants.js";
19
- const k = 1;
20
- function _({
21
- assets: r,
22
- against: e,
23
- empty: s,
24
- testId: n
16
+ import { ShortString as f } from "../../short-string/short-string.js";
17
+ import { TokenSymbol as u } from "../../token-symbol/token-symbol.js";
18
+ import { Typography as k } from "../../typography/typography.js";
19
+ import { PositionAssetsTest as c } from "./constants.js";
20
+ const v = 1, g = 20;
21
+ function Y({
22
+ assets: s,
23
+ to: e,
24
+ empty: a,
25
+ testId: i
25
26
  }) {
26
- const t = h(r, e);
27
- return /* @__PURE__ */ i(d, { gap: "sm", align: "end", "data-testid": n ?? m.root, children: t.length === 0 ? s !== void 0 && /* @__PURE__ */ i(
28
- u,
27
+ const t = y(s, e), r = e !== void 0;
28
+ return /* @__PURE__ */ n(h, { gap: "sm", align: "end", "data-testid": i ?? c.root, children: t.length === 0 ? a !== void 0 && /* @__PURE__ */ n(
29
+ k,
29
30
  {
30
31
  variant: "caption",
31
32
  color: "secondary",
32
33
  as: "div",
33
- "data-testid": m.empty,
34
- children: s
34
+ "data-testid": c.empty,
35
+ children: a
35
36
  }
36
- ) : t.map((o) => /* @__PURE__ */ p(
37
+ ) : t.map((o) => /* @__PURE__ */ m(
37
38
  "span",
38
39
  {
39
40
  className: "flex items-center gap-2",
40
- "data-testid": m.row,
41
+ "data-testid": c.row,
41
42
  children: [
42
- /* @__PURE__ */ i(f, { size: 20, token: o.token }),
43
- /* @__PURE__ */ i(c, { data: o.value, token: o.token })
43
+ /* @__PURE__ */ n(u, { size: 20, token: o.token }),
44
+ /* @__PURE__ */ m("span", { className: "flex items-center", children: [
45
+ r && /* @__PURE__ */ m(p, { children: [
46
+ /* @__PURE__ */ n("span", { className: "text-secondary-foreground line-through [&_*]:text-secondary-foreground [&_*]:line-through", children: /* @__PURE__ */ n(
47
+ d,
48
+ {
49
+ data: o.value,
50
+ token: o.token,
51
+ showSymbol: !1
52
+ }
53
+ ) }),
54
+ /* @__PURE__ */ n("span", { className: "px-1.5 text-gray-70", children: "→" })
55
+ ] }),
56
+ /* @__PURE__ */ n(
57
+ d,
58
+ {
59
+ data: r ? o.valueTo : o.value,
60
+ token: o.token,
61
+ showSymbol: !1
62
+ }
63
+ ),
64
+ /* @__PURE__ */ n(f, { className: "ml-1", maxLength: g, children: o.token.symbol })
65
+ ] })
44
66
  ]
45
67
  },
46
68
  o.token.address
47
69
  )) });
48
70
  }
49
- function h(r, e) {
50
- const s = /* @__PURE__ */ new Map(), n = (t, o) => {
51
- const l = t.token.address.toLowerCase(), a = s.get(l);
52
- s.set(l, {
53
- token: a?.token ?? t.token,
54
- // a token the other side alone holds is a zero here, not a gap
55
- value: o ? t.value : a?.value ?? 0n,
56
- worth: v(a?.worth, t.valueUsd)
71
+ function y(s, e) {
72
+ const a = /* @__PURE__ */ new Map(), i = (t, r) => {
73
+ const o = t.token.address.toLowerCase(), l = a.get(o);
74
+ a.set(o, {
75
+ token: l?.token ?? t.token,
76
+ // a token only the other side holds is a zero here, not a gap
77
+ value: r === "from" ? t.value : l?.value ?? 0n,
78
+ valueTo: r === "to" ? t.value : l?.valueTo ?? 0n,
79
+ worth: x(l?.worth, t.valueUsd)
57
80
  });
58
81
  };
59
- for (const t of r ?? []) n(t, !0);
60
- for (const t of e ?? []) n(t, !1);
61
- return [...s.values()].filter((t) => t.worth === null || t.worth >= k).sort(
62
- (t, o) => (o.worth ?? 0) - (t.worth ?? 0) || // a tie has to break the same way on both sides, or the rows drift
63
- t.token.address.localeCompare(o.token.address)
82
+ for (const t of s ?? []) i(t, "from");
83
+ for (const t of e ?? []) i(t, "to");
84
+ return [...a.values()].filter((t) => t.worth === null || t.worth >= v).sort(
85
+ (t, r) => (r.worth ?? 0) - (t.worth ?? 0) || // a tie has to break the same way every render, or the rows drift
86
+ t.token.address.localeCompare(r.token.address)
64
87
  );
65
88
  }
66
- function v(r, e) {
67
- return r === void 0 ? e : r === null || e === null ? null : Math.max(r, e);
89
+ function x(s, e) {
90
+ return s === void 0 ? e : s === null || e === null ? null : Math.max(s, e);
68
91
  }
69
92
  export {
70
- _ as PositionAssets,
71
- m as PositionAssetsTest,
72
- h as visibleAssets
93
+ Y as PositionAssets,
94
+ c as PositionAssetsTest,
95
+ y as visibleAssets
73
96
  };
@@ -1,8 +1,12 @@
1
- class a {
1
+ class t {
2
2
  static root = "strategy-apy-breakdown-card-root";
3
- static row = "strategy-apy-breakdown-card-row";
4
3
  static net = "strategy-apy-breakdown-card-net";
4
+ static collateral = "strategy-apy-breakdown-card-collateral";
5
+ static borrow = "strategy-apy-breakdown-card-borrow";
6
+ static value = "strategy-apy-breakdown-card-value";
7
+ static points = "strategy-apy-breakdown-card-points";
8
+ static caption = "strategy-apy-breakdown-card-caption";
5
9
  }
6
10
  export {
7
- a as StrategyApyBreakdownCardTest
11
+ t as StrategyApyBreakdownCardTest
8
12
  };
@@ -1,239 +1,213 @@
1
- import { jsxs as i, jsx as t, Fragment as B } from "react/jsx-runtime";
2
- import { PointsIcon as I } from "../../points-icon/points-icon.js";
3
- import { TokenIcon as P } from "../../token-icon/token-icon.js";
4
- import { FormattedMessageTyped as p } from "../../typed-intl/index.js";
1
+ import { jsxs as n, jsx as e, Fragment as k } from "react/jsx-runtime";
2
+ import { PointsIcon as w } from "../../points-icon/points-icon.js";
3
+ import { TokenIcon as N } from "../../token-icon/token-icon.js";
4
+ import { FormattedMessageTyped as l } from "../../typed-intl/index.js";
5
5
  import "react";
6
- import { positiveTokenRewardsOf as M, pointProgramsOf as L, totalApyOf as T } from "../../../utils/apy-breakdown.js";
6
+ import { totalApyOf as A, positiveTokenRewardsOf as I, pointProgramsOf as B } from "../../../utils/apy-breakdown.js";
7
7
  import "@gearbox-protocol/sdk";
8
- import { bpsToPercent as $ } from "../../../utils/bps.js";
9
- import { cn as h } from "../../../utils/cn.js";
8
+ import { bpsToPercent as C } from "../../../utils/bps.js";
9
+ import { cn as g } from "../../../utils/cn.js";
10
10
  import "sonner";
11
- import { formatLeverage as a } from "../../../utils/format-leverage.js";
12
- import { formatCompactPercent as F } from "../../../utils/format-money.js";
13
- import { strategyApyPartsAtLeverage as j } from "../../../utils/strategy-apy.js";
11
+ import { formatLeverage as d } from "../../../utils/format-leverage.js";
14
12
  import "@gearbox-protocol/sdk/common-utils";
15
13
  import "luxon";
16
14
  import "../../../utils/z-index.js";
17
- import { StrategyApyBreakdownCardTest as w } from "./constants.js";
18
- const u = "—";
19
- function s(e) {
20
- const n = $(e);
21
- if (Math.abs(n) >= 1e3) {
22
- const d = F(Math.abs(n));
23
- return n < 0 ? `−${d}` : d;
24
- }
25
- const m = Math.abs(n).toFixed(2);
26
- return n < 0 ? `−${m}%` : `${m}%`;
27
- }
28
- function S(e) {
29
- return e == null || e <= 0 ? "bg-muted text-muted-foreground" : "bg-success/20 text-success";
30
- }
31
- function g({
32
- base: e,
33
- leverage: n
15
+ import { StrategyApyBreakdownCardTest as i } from "./constants.js";
16
+ const T = "—";
17
+ function G({
18
+ data: s,
19
+ showFormula: o = !1
34
20
  }) {
35
- return /* @__PURE__ */ t(
36
- p,
37
- {
38
- messageId: "components.strategyApyBreakdownCard.formula",
39
- values: { base: e, leverage: n }
40
- }
41
- );
42
- }
43
- function te({
44
- data: e,
45
- leverage: n
46
- }) {
47
- const o = n ?? (e.maxLeverage != null && e.maxLeverage > 0 ? e.maxLeverage : void 0), m = o != null ? a(o) : u, d = e.collateralApy ? M(e.collateralApy) : [], k = e.collateralApy ? L(e.collateralApy) : [], r = o != null ? j({
48
- leverage: o,
49
- borrowApy: e.borrowApy,
50
- quotaRate: e.quotaRate,
51
- liquidationThreshold: e.liquidationThreshold,
52
- quotaMode: e.quotaMode
53
- }) : void 0, f = e.collateralApy?.organicApy, y = f != null && o != null ? f * o : void 0, v = d.map(
54
- (l) => l.supplyApr != null && o != null ? l.supplyApr * o : void 0
55
- ), N = e.borrowApy != null && r != null ? -r.borrowCost : void 0, x = e.quotaRate != null && e.quotaRate !== 0, q = x && r != null ? r.quotaRate : void 0, R = x && r != null ? -r.quotaCost : void 0, C = y != null && r != null && v.every((l) => l != null) ? y + v.reduce((l, c) => l + (c ?? 0), 0) - r.totalCost : void 0, A = e.netApy != null ? T(e.netApy) : C;
56
- return /* @__PURE__ */ i(
21
+ const { leverage: a, collateralApy: r } = s, c = A(s.netApy), u = c + s.borrowCost, h = r ? I(r) : [], b = r ? B(r) : [], v = h.map((t) => ({
22
+ reward: t,
23
+ value: Math.round(a * (t.supplyApr ?? 0))
24
+ })), x = u - v.reduce((t, f) => t + f.value, 0), y = a > 0 ? x / a : void 0;
25
+ return /* @__PURE__ */ n(
57
26
  "div",
58
27
  {
59
28
  className: "flex w-full min-w-0 flex-col gap-4 rounded-xl border border-border bg-card p-4",
60
- "data-testid": w.root,
29
+ "data-testid": i.root,
61
30
  children: [
62
- /* @__PURE__ */ i("div", { className: "flex h-6 items-center justify-between gap-3", children: [
63
- /* @__PURE__ */ t("span", { className: "text-base font-semibold leading-4 text-foreground", children: /* @__PURE__ */ t(
64
- p,
31
+ /* @__PURE__ */ n("div", { className: "flex h-6 items-center justify-between gap-3", children: [
32
+ /* @__PURE__ */ e("span", { className: "text-base font-semibold leading-4 text-foreground", children: /* @__PURE__ */ e(
33
+ l,
65
34
  {
66
- messageId: "components.strategyApyBreakdownCard.titleAtLeverage",
67
- values: { leverage: m }
35
+ messageId: "components.yieldBreakdown.titleNetAtLeverage",
36
+ values: { leverage: d(a) }
68
37
  }
69
38
  ) }),
70
- /* @__PURE__ */ t(
39
+ /* @__PURE__ */ e(
71
40
  "span",
72
41
  {
73
- className: h(
42
+ className: g(
74
43
  "rounded-md px-2 py-0.5 text-sm font-semibold tabular-nums",
75
- S(A)
44
+ c > 0 ? "bg-success/20 text-success" : "bg-muted text-muted-foreground"
76
45
  ),
77
- "data-testid": w.net,
78
- children: A == null ? u : s(A)
46
+ "data-testid": i.net,
47
+ children: m(c)
79
48
  }
80
49
  )
81
50
  ] }),
82
- /* @__PURE__ */ i("div", { className: "flex flex-col gap-3", children: [
83
- /* @__PURE__ */ t(
84
- b,
51
+ /* @__PURE__ */ n("div", { className: "flex flex-col gap-3", children: [
52
+ /* @__PURE__ */ e(
53
+ p,
85
54
  {
86
- label: /* @__PURE__ */ t(p, { messageId: "components.strategyApyBreakdownCard.collateralApy" }),
87
- value: y == null ? u : s(y),
88
- subtext: f != null && o != null ? /* @__PURE__ */ t(
89
- g,
55
+ testId: i.collateral,
56
+ label: /* @__PURE__ */ e(l, { messageId: "components.yieldBreakdown.collateralApy" }),
57
+ value: m(x),
58
+ subtext: o && y !== void 0 ? /* @__PURE__ */ e(
59
+ l,
90
60
  {
91
- base: s(f),
92
- leverage: a(o)
61
+ messageId: "components.strategyApyBreakdownCard.formula",
62
+ values: {
63
+ leverage: d(a),
64
+ base: m(y)
65
+ }
93
66
  }
94
67
  ) : void 0
95
68
  }
96
69
  ),
97
- d.map((l, c) => /* @__PURE__ */ t(
98
- b,
70
+ v.map(({ reward: t, value: f }) => /* @__PURE__ */ e(
71
+ p,
99
72
  {
100
- label: /* @__PURE__ */ i("span", { className: "inline-flex items-center gap-1.5", children: [
101
- /* @__PURE__ */ t("span", { children: /* @__PURE__ */ t(
102
- p,
73
+ label: /* @__PURE__ */ n("span", { className: "inline-flex items-center gap-1.5", children: [
74
+ /* @__PURE__ */ e("span", { children: /* @__PURE__ */ e(
75
+ l,
103
76
  {
104
77
  messageId: "components.apyParts.extraAPY",
105
- values: { symbol: l.token.symbol }
78
+ values: { symbol: t.token.symbol }
106
79
  }
107
80
  ) }),
108
- /* @__PURE__ */ t(
109
- P,
81
+ /* @__PURE__ */ e(
82
+ N,
110
83
  {
111
- token: l.token,
112
- symbol: l.token.symbol,
84
+ token: t.token,
85
+ symbol: t.token.symbol,
113
86
  size: 16,
114
87
  className: "shrink-0"
115
88
  }
116
89
  )
117
90
  ] }),
118
- value: v[c] == null ? u : s(v[c]),
119
- subtext: l.supplyApr != null && o != null ? /* @__PURE__ */ t(
120
- g,
91
+ value: m(f),
92
+ subtext: o ? /* @__PURE__ */ e(
93
+ l,
121
94
  {
122
- base: s(l.supplyApr),
123
- leverage: a(o)
95
+ messageId: "components.strategyApyBreakdownCard.formula",
96
+ values: {
97
+ leverage: d(a),
98
+ base: m(t.supplyApr ?? 0)
99
+ }
124
100
  }
125
101
  ) : void 0
126
102
  },
127
- `incentive-${l.token.address}-${l.supplyApr ?? 0}`
103
+ `incentive-${t.token.address}-${t.supplyApr ?? 0}`
128
104
  )),
129
- /* @__PURE__ */ t(
130
- b,
105
+ /* @__PURE__ */ e(
106
+ p,
131
107
  {
132
108
  muted: !0,
133
- label: /* @__PURE__ */ t(p, { messageId: "components.strategyApyBreakdownCard.borrowRate" }),
134
- value: N == null ? u : s(N),
135
- subtext: e.borrowApy != null && r != null ? /* @__PURE__ */ t(
136
- g,
137
- {
138
- base: s(-e.borrowApy),
139
- leverage: a(r.debtMultiplier)
140
- }
141
- ) : void 0
109
+ testId: i.borrow,
110
+ label: /* @__PURE__ */ e(l, { messageId: "components.yieldBreakdown.borrowRate" }),
111
+ value: m(-s.borrowCost)
142
112
  }
143
113
  ),
144
- x ? /* @__PURE__ */ t(
145
- b,
146
- {
147
- muted: !0,
148
- label: /* @__PURE__ */ t(p, { messageId: "components.strategyApyBreakdownCard.quotaRate" }),
149
- value: R == null ? u : s(R),
150
- subtext: q != null && r != null ? (
151
- // The quota is charged on the LT-weighted position, so this
152
- // multiplier is not the leverage the row above uses.
153
- /* @__PURE__ */ t(
154
- g,
155
- {
156
- base: s(-q),
157
- leverage: a(r.quotaMultiplier)
158
- }
159
- )
160
- ) : void 0
161
- }
162
- ) : null,
163
- k.length > 0 ? /* @__PURE__ */ i(B, { children: [
164
- /* @__PURE__ */ t("div", { className: "h-px w-full bg-divider" }),
165
- k.map((l) => {
166
- const c = l.multiplier != null && o != null ? l.multiplier * o : void 0;
167
- return /* @__PURE__ */ t(
168
- b,
169
- {
170
- label: /* @__PURE__ */ i("span", { className: "inline-flex items-center gap-1.5", children: [
171
- /* @__PURE__ */ t("span", { children: /* @__PURE__ */ t(
172
- p,
173
- {
174
- messageId: "components.yieldBreakdown.programPoints",
175
- values: { name: l.name }
176
- }
177
- ) }),
178
- /* @__PURE__ */ t(
179
- I,
180
- {
181
- reward: { name: l.name, type: l.id },
182
- size: 16,
183
- className: "shrink-0"
184
- }
185
- )
186
- ] }),
187
- value: c != null ? `${a(c)}×` : u,
188
- subtext: l.multiplier != null && o != null ? /* @__PURE__ */ t(
189
- g,
114
+ b.length > 0 ? /* @__PURE__ */ n(k, { children: [
115
+ /* @__PURE__ */ e("div", { className: "h-px w-full bg-divider" }),
116
+ b.map((t) => /* @__PURE__ */ e(
117
+ p,
118
+ {
119
+ valueTestId: i.points,
120
+ label: /* @__PURE__ */ n("span", { className: "inline-flex items-center gap-1.5", children: [
121
+ /* @__PURE__ */ e("span", { children: /* @__PURE__ */ e(
122
+ l,
123
+ {
124
+ messageId: "components.yieldBreakdown.programPoints",
125
+ values: { name: t.name }
126
+ }
127
+ ) }),
128
+ /* @__PURE__ */ e(
129
+ w,
190
130
  {
191
- base: a(l.multiplier),
192
- leverage: a(o)
131
+ reward: { name: t.name, type: t.id },
132
+ size: 16,
133
+ className: "shrink-0"
134
+ }
135
+ )
136
+ ] }),
137
+ value: t.multiplier != null ? `${d(t.multiplier * a)}×` : T,
138
+ subtext: o && t.multiplier != null ? /* @__PURE__ */ e(
139
+ l,
140
+ {
141
+ messageId: "components.strategyApyBreakdownCard.formula",
142
+ values: {
143
+ leverage: d(a),
144
+ base: d(t.multiplier)
193
145
  }
194
- ) : void 0
195
- },
196
- l.id
197
- );
198
- })
146
+ }
147
+ ) : void 0
148
+ },
149
+ t.id
150
+ ))
199
151
  ] }) : null
200
152
  ] })
201
153
  ]
202
154
  }
203
155
  );
204
156
  }
205
- function b({
206
- label: e,
207
- value: n,
208
- subtext: o,
209
- muted: m = !1
157
+ function m(s) {
158
+ const o = C(s), a = `${Math.abs(o).toFixed(2)}%`;
159
+ return o < 0 ? `−${a}` : a;
160
+ }
161
+ function p({
162
+ label: s,
163
+ value: o,
164
+ subtext: a,
165
+ muted: r = !1,
166
+ testId: c,
167
+ valueTestId: u = i.value
210
168
  }) {
211
- const d = m ? "text-muted-foreground" : "text-foreground";
212
- return /* @__PURE__ */ i(
169
+ return /* @__PURE__ */ n(
213
170
  "div",
214
171
  {
215
172
  className: "flex items-start justify-between gap-3",
216
- "data-testid": w.row,
173
+ "data-testid": c,
217
174
  children: [
218
- /* @__PURE__ */ t("span", { className: h("min-w-0 text-sm font-semibold leading-5", d), children: e }),
219
- /* @__PURE__ */ i("span", { className: "flex shrink-0 flex-col items-end", children: [
220
- /* @__PURE__ */ t(
175
+ /* @__PURE__ */ e(
176
+ "span",
177
+ {
178
+ className: g(
179
+ "min-w-0 text-sm font-semibold leading-5",
180
+ r ? "text-muted-foreground" : "text-foreground"
181
+ ),
182
+ children: s
183
+ }
184
+ ),
185
+ /* @__PURE__ */ n("span", { className: "flex shrink-0 flex-col items-end", children: [
186
+ /* @__PURE__ */ e(
221
187
  "span",
222
188
  {
223
- className: h(
189
+ className: g(
224
190
  "text-sm font-semibold leading-5 tabular-nums",
225
- n === u || m ? "text-muted-foreground" : "text-foreground"
191
+ r ? "text-muted-foreground" : "text-foreground"
226
192
  ),
227
- children: n
193
+ "data-testid": u,
194
+ children: o
228
195
  }
229
196
  ),
230
- o != null ? /* @__PURE__ */ t("span", { className: "text-xs leading-4 text-muted-foreground", children: o }) : null
197
+ a != null ? /* @__PURE__ */ e(
198
+ "span",
199
+ {
200
+ className: "text-xs leading-4 text-muted-foreground",
201
+ "data-testid": i.caption,
202
+ children: a
203
+ }
204
+ ) : null
231
205
  ] })
232
206
  ]
233
207
  }
234
208
  );
235
209
  }
236
210
  export {
237
- te as StrategyApyBreakdownCard,
238
- w as StrategyApyBreakdownCardTest
211
+ G as StrategyApyBreakdownCard,
212
+ i as StrategyApyBreakdownCardTest
239
213
  };