@gearbox-protocol/ui-kit 4.0.0-next.2 → 4.0.0-next.4
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/borrow-rate-block/borrow-rate-block.cjs +1 -1
- package/dist/cjs/components/base/detailed-page-title/detailed-page-title.cjs +1 -1
- package/dist/cjs/components/base/health-factor-block/health-factor-block.cjs +1 -1
- package/dist/cjs/components/base/index.cjs +1 -1
- package/dist/cjs/components/base/info-list/index.cjs +1 -1
- package/dist/cjs/components/base/info-list/info-list.cjs +1 -1
- package/dist/cjs/components/base/leverage-input/leverage-input.cjs +1 -1
- package/dist/cjs/components/base/liquidation-price-block/liquidation-price-block.cjs +1 -1
- package/dist/cjs/components/base/manage-pane/constants.cjs +1 -1
- package/dist/cjs/components/base/manage-pane/manage-pane.cjs +1 -1
- package/dist/cjs/components/base/page-title/index.cjs +1 -1
- package/dist/cjs/components/base/page-title/page-title.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/time-to-liquidation-block/time-to-liquidation-block.cjs +1 -1
- package/dist/cjs/components/base/token-amount/token-amount.cjs +1 -1
- package/dist/cjs/components/base/values/constants.cjs +1 -1
- package/dist/cjs/components/base/values/index.cjs +1 -1
- package/dist/cjs/components/base/values/points-value.cjs +1 -0
- package/dist/cjs/components/base/values/scalars.cjs +1 -1
- package/dist/cjs/components/block-sync-pill/block-sync-pill.cjs +1 -1
- package/dist/cjs/components/checkbox/checkbox-labeled.cjs +1 -1
- package/dist/cjs/components/client-adapters/styled-rounded-image/styled-rounded-image.cjs +1 -1
- package/dist/cjs/components/composites/pool-assets-table/pool-assets-table-row.cjs +1 -1
- package/dist/cjs/components/composites/tx-preview/confirm/dialog/TransactionConfirmModalView.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/with-copy/with-copy.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/utils/format-leverage.cjs +1 -0
- package/dist/cjs/utils/index.cjs +1 -1
- package/dist/esm/components/base/borrow-rate-block/borrow-rate-block.js +31 -25
- package/dist/esm/components/base/detailed-page-title/detailed-page-title.js +26 -27
- package/dist/esm/components/base/health-factor-block/health-factor-block.js +25 -25
- package/dist/esm/components/base/index.js +141 -136
- package/dist/esm/components/base/info-list/index.js +5 -4
- package/dist/esm/components/base/info-list/info-list.js +52 -27
- package/dist/esm/components/base/leverage-input/leverage-input.js +17 -19
- package/dist/esm/components/base/liquidation-price-block/liquidation-price-block.js +33 -28
- package/dist/esm/components/base/manage-pane/constants.js +3 -2
- package/dist/esm/components/base/manage-pane/manage-pane.js +154 -113
- package/dist/esm/components/base/page-title/index.js +5 -4
- package/dist/esm/components/base/page-title/page-title.js +31 -23
- package/dist/esm/components/base/stat-badge/stat-badge.js +18 -9
- package/dist/esm/components/base/strategy-apy-breakdown-card/strategy-apy-breakdown-card.js +3 -2
- package/dist/esm/components/base/time-to-liquidation-block/time-to-liquidation-block.js +31 -31
- package/dist/esm/components/base/token-amount/token-amount.js +17 -16
- package/dist/esm/components/base/values/constants.js +1 -0
- package/dist/esm/components/base/values/index.js +16 -13
- package/dist/esm/components/base/values/points-value.js +30 -0
- package/dist/esm/components/base/values/scalars.js +29 -27
- package/dist/esm/components/block-sync-pill/block-sync-pill.js +17 -16
- package/dist/esm/components/checkbox/checkbox-labeled.js +15 -14
- package/dist/esm/components/client-adapters/styled-rounded-image/styled-rounded-image.js +15 -14
- package/dist/esm/components/composites/pool-assets-table/pool-assets-table-row.js +17 -15
- package/dist/esm/components/composites/tx-preview/confirm/dialog/TransactionConfirmModalView.js +24 -23
- package/dist/esm/components/graph/graph-view.js +78 -95
- package/dist/esm/components/index.js +665 -660
- package/dist/esm/components/with-copy/with-copy.js +17 -16
- package/dist/esm/index.js +843 -836
- package/dist/esm/utils/format-leverage.js +6 -0
- package/dist/esm/utils/index.js +80 -78
- package/dist/globals.css +1 -1
- package/dist/types/components/base/borrow-rate-block/borrow-rate-block.d.ts +10 -5
- package/dist/types/components/base/detailed-page-title/detailed-page-title.d.ts +1 -3
- package/dist/types/components/base/health-factor-block/health-factor-block.d.ts +6 -6
- package/dist/types/components/base/info-list/info-list.d.ts +7 -0
- package/dist/types/components/base/liquidation-price-block/liquidation-price-block.d.ts +6 -4
- package/dist/types/components/base/manage-pane/constants.d.ts +1 -0
- package/dist/types/components/base/manage-pane/manage-pane.d.ts +3 -1
- package/dist/types/components/base/page-title/page-title.d.ts +12 -6
- package/dist/types/components/base/time-to-liquidation-block/time-to-liquidation-block.d.ts +5 -6
- package/dist/types/components/base/token-amount/token-amount.d.ts +8 -2
- package/dist/types/components/base/values/constants.d.ts +1 -0
- package/dist/types/components/base/values/index.d.ts +2 -1
- package/dist/types/components/base/values/points-value.d.ts +11 -0
- package/dist/types/components/base/values/position-short-label.d.ts +1 -1
- package/dist/types/components/base/values/scalars.d.ts +9 -0
- package/dist/types/components/composites/pool-assets-table/pool-assets-table-row.d.ts +1 -1
- package/dist/types/utils/format-leverage.d.ts +5 -0
- package/dist/types/utils/index.d.ts +1 -0
- package/package.json +2 -2
|
@@ -1,38 +1,46 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
1
|
+
import { jsx as s, jsxs as g, Fragment as p } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as x, useContext as T } from "react";
|
|
3
|
+
import { useIntlTyped as l } from "../../typed-intl/index.js";
|
|
4
|
+
import { Typography as u } from "../../typography/typography.js";
|
|
5
|
+
import { PageTitleTest as y } from "./constants.js";
|
|
6
|
+
const m = x(null);
|
|
7
|
+
function b({
|
|
8
|
+
children: t,
|
|
9
|
+
render: e
|
|
10
|
+
}) {
|
|
11
|
+
return /* @__PURE__ */ s(m.Provider, { value: e, children: t });
|
|
12
|
+
}
|
|
13
|
+
function n(t) {
|
|
6
14
|
return typeof t == "string" || !!t && typeof t == "object" && "messageId" in t;
|
|
7
15
|
}
|
|
8
|
-
function i(t,
|
|
9
|
-
return
|
|
16
|
+
function i(t, e) {
|
|
17
|
+
return e === void 0 ? "" : typeof e == "string" ? e : t.formatMessage(e);
|
|
10
18
|
}
|
|
11
|
-
function
|
|
19
|
+
function I({
|
|
12
20
|
title: t,
|
|
13
|
-
browserTitle:
|
|
14
|
-
|
|
15
|
-
as: m = "h1",
|
|
21
|
+
browserTitle: e,
|
|
22
|
+
as: d = "h1",
|
|
16
23
|
className: f
|
|
17
24
|
}) {
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
25
|
+
const o = l(), c = T(m), a = n(t) ? i(o, t) : t, r = i(
|
|
26
|
+
o,
|
|
27
|
+
e ?? (n(t) ? t : void 0)
|
|
21
28
|
);
|
|
22
|
-
return /* @__PURE__ */
|
|
23
|
-
|
|
24
|
-
/* @__PURE__ */
|
|
25
|
-
|
|
29
|
+
return /* @__PURE__ */ g(p, { children: [
|
|
30
|
+
r ? c?.(r) : null,
|
|
31
|
+
/* @__PURE__ */ s(
|
|
32
|
+
u,
|
|
26
33
|
{
|
|
27
|
-
as:
|
|
34
|
+
as: d,
|
|
28
35
|
className: f ?? "m-0 text-3xl leading-none font-medium",
|
|
29
|
-
"data-testid":
|
|
30
|
-
children:
|
|
36
|
+
"data-testid": y.root,
|
|
37
|
+
children: a
|
|
31
38
|
}
|
|
32
39
|
)
|
|
33
40
|
] });
|
|
34
41
|
}
|
|
35
42
|
export {
|
|
36
|
-
|
|
37
|
-
|
|
43
|
+
b as PageHeadProvider,
|
|
44
|
+
I as PageTitle,
|
|
45
|
+
y as PageTitleTest
|
|
38
46
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as s, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { Stack as g } from "../stack/stack.js";
|
|
3
3
|
import { useTitleText as f } from "../text/use-title-text.js";
|
|
4
4
|
import { Skeleton as u } from "../../skeleton/skeleton.js";
|
|
@@ -30,24 +30,24 @@ const p = {
|
|
|
30
30
|
function A({
|
|
31
31
|
title: i,
|
|
32
32
|
value: r,
|
|
33
|
-
isLoading:
|
|
33
|
+
isLoading: a = !1,
|
|
34
34
|
size: t = "default",
|
|
35
35
|
action: l,
|
|
36
|
-
className:
|
|
36
|
+
className: o,
|
|
37
37
|
testId: n
|
|
38
38
|
}) {
|
|
39
39
|
const c = f();
|
|
40
|
-
return /* @__PURE__ */
|
|
40
|
+
return /* @__PURE__ */ s(
|
|
41
41
|
"div",
|
|
42
42
|
{
|
|
43
43
|
className: d(
|
|
44
44
|
"h-full w-full rounded-lg border border-border bg-card",
|
|
45
45
|
p[t],
|
|
46
|
-
|
|
46
|
+
o
|
|
47
47
|
),
|
|
48
48
|
"data-testid": n ?? m.root,
|
|
49
49
|
children: [
|
|
50
|
-
/* @__PURE__ */
|
|
50
|
+
/* @__PURE__ */ s(
|
|
51
51
|
"div",
|
|
52
52
|
{
|
|
53
53
|
className: d(
|
|
@@ -66,7 +66,16 @@ function A({
|
|
|
66
66
|
]
|
|
67
67
|
}
|
|
68
68
|
),
|
|
69
|
-
/* @__PURE__ */ e(
|
|
69
|
+
/* @__PURE__ */ e(
|
|
70
|
+
"div",
|
|
71
|
+
{
|
|
72
|
+
className: d(
|
|
73
|
+
"text-left font-medium text-foreground",
|
|
74
|
+
h[t]
|
|
75
|
+
),
|
|
76
|
+
children: /* @__PURE__ */ e(u, { width: 80, loading: a, children: /* @__PURE__ */ e(g, { gap: "xs", align: "start", className: "w-full items-start", children: r }) })
|
|
77
|
+
}
|
|
78
|
+
)
|
|
70
79
|
]
|
|
71
80
|
}
|
|
72
81
|
);
|
|
@@ -89,7 +98,7 @@ const b = {
|
|
|
89
98
|
function B({
|
|
90
99
|
cols: i = 1,
|
|
91
100
|
colsLg: r,
|
|
92
|
-
gap:
|
|
101
|
+
gap: a = "default",
|
|
93
102
|
children: t,
|
|
94
103
|
className: l
|
|
95
104
|
}) {
|
|
@@ -100,7 +109,7 @@ function B({
|
|
|
100
109
|
"grid w-full",
|
|
101
110
|
b[i],
|
|
102
111
|
r ? I[r] : void 0,
|
|
103
|
-
_[
|
|
112
|
+
_[a],
|
|
104
113
|
l
|
|
105
114
|
),
|
|
106
115
|
"data-testid": m.grid,
|
|
@@ -11,6 +11,7 @@ import "sonner";
|
|
|
11
11
|
import "@gearbox-protocol/sdk/common-utils";
|
|
12
12
|
import "luxon";
|
|
13
13
|
import "../../../utils/z-index.js";
|
|
14
|
+
import "../../points-icon/points-icon.js";
|
|
14
15
|
import { ApyValue as o } from "../values/scalars.js";
|
|
15
16
|
import "../../badge/badge.js";
|
|
16
17
|
import { StrategyApyBreakdownCardTest as i } from "./constants.js";
|
|
@@ -28,7 +29,7 @@ function e({
|
|
|
28
29
|
}
|
|
29
30
|
);
|
|
30
31
|
}
|
|
31
|
-
function
|
|
32
|
+
function T({
|
|
32
33
|
data: t
|
|
33
34
|
}) {
|
|
34
35
|
return /* @__PURE__ */ d(
|
|
@@ -46,6 +47,6 @@ function R({
|
|
|
46
47
|
);
|
|
47
48
|
}
|
|
48
49
|
export {
|
|
49
|
-
|
|
50
|
+
T as StrategyApyBreakdownCard,
|
|
50
51
|
i as StrategyApyBreakdownCardTest
|
|
51
52
|
};
|
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
1
|
+
import { jsx as t, jsxs as c } from "react/jsx-runtime";
|
|
2
2
|
import { useTitleText as T } from "../text/use-title-text.js";
|
|
3
|
-
import { FadeoutLoading as
|
|
3
|
+
import { FadeoutLoading as l } from "../../fadeout-loading/fadeout-loading.js";
|
|
4
4
|
import { HealthDot as f } from "../../status-elements/status-elements.js";
|
|
5
|
-
import { FormattedMessageTyped as
|
|
5
|
+
import { FormattedMessageTyped as m } from "../../typed-intl/index.js";
|
|
6
6
|
import { VerticalIndicator as h } from "../../vertical-indicator/vertical-indicator.js";
|
|
7
7
|
import { ttlLeft as g, getTTLZones as x } from "../../../utils/ttl.js";
|
|
8
|
-
import { TimeToLiquidationBlockTest as
|
|
8
|
+
import { TimeToLiquidationBlockTest as r } from "./constants.js";
|
|
9
9
|
function j({
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
zone:
|
|
13
|
-
isLoading:
|
|
14
|
-
title:
|
|
15
|
-
tip:
|
|
16
|
-
testId:
|
|
10
|
+
data: o,
|
|
11
|
+
dataTo: n,
|
|
12
|
+
zone: a,
|
|
13
|
+
isLoading: e,
|
|
14
|
+
title: i,
|
|
15
|
+
tip: s,
|
|
16
|
+
testId: v
|
|
17
17
|
}) {
|
|
18
|
-
const p = T(),
|
|
18
|
+
const p = T(), d = n !== void 0;
|
|
19
19
|
return /* @__PURE__ */ t(
|
|
20
20
|
h,
|
|
21
21
|
{
|
|
22
22
|
align: "center",
|
|
23
23
|
dimPreviousValue: !1,
|
|
24
|
-
"data-testid":
|
|
25
|
-
label:
|
|
26
|
-
tip:
|
|
27
|
-
value: /* @__PURE__ */ t(
|
|
24
|
+
"data-testid": v ?? r.root,
|
|
25
|
+
label: i !== void 0 ? p(i) : /* @__PURE__ */ t(m, { messageId: "components.timeToLiquidationBlock.label" }),
|
|
26
|
+
tip: s ?? /* @__PURE__ */ t(m, { messageId: "components.timeToLiquidationBlock.tip" }),
|
|
27
|
+
value: /* @__PURE__ */ t(l, { loading: e, children: /* @__PURE__ */ t(
|
|
28
28
|
u,
|
|
29
29
|
{
|
|
30
|
-
|
|
31
|
-
zone:
|
|
32
|
-
testId:
|
|
30
|
+
milliseconds: o,
|
|
31
|
+
zone: d ? void 0 : a,
|
|
32
|
+
testId: r.value
|
|
33
33
|
}
|
|
34
34
|
) }),
|
|
35
|
-
valueTo:
|
|
35
|
+
valueTo: d ? /* @__PURE__ */ t(l, { loading: e, children: /* @__PURE__ */ t(
|
|
36
36
|
u,
|
|
37
37
|
{
|
|
38
|
-
|
|
39
|
-
zone:
|
|
40
|
-
testId:
|
|
38
|
+
milliseconds: n ?? null,
|
|
39
|
+
zone: a,
|
|
40
|
+
testId: r.valueTo
|
|
41
41
|
}
|
|
42
42
|
) }) : void 0
|
|
43
43
|
}
|
|
44
44
|
);
|
|
45
45
|
}
|
|
46
46
|
function u({
|
|
47
|
-
|
|
48
|
-
zone:
|
|
49
|
-
testId:
|
|
47
|
+
milliseconds: o,
|
|
48
|
+
zone: n,
|
|
49
|
+
testId: a
|
|
50
50
|
}) {
|
|
51
|
-
const
|
|
52
|
-
return /* @__PURE__ */
|
|
53
|
-
|
|
54
|
-
o
|
|
51
|
+
const e = o == null ? void 0 : g(o), i = n ?? (o == null ? void 0 : x(o));
|
|
52
|
+
return /* @__PURE__ */ c("span", { className: "inline-flex items-center", "data-testid": a, children: [
|
|
53
|
+
o === void 0 ? "—" : o === null ? "N/A" : e?.months !== void 0 ? `${e.months}mo` : e?.day !== void 0 ? `${e.day}d` : "<1d",
|
|
54
|
+
o != null && i ? /* @__PURE__ */ t("span", { className: "ml-1.5", children: /* @__PURE__ */ t(f, { zone: i }) }) : null
|
|
55
55
|
] });
|
|
56
56
|
}
|
|
57
57
|
export {
|
|
58
58
|
j as TimeToLiquidationBlock,
|
|
59
|
-
|
|
59
|
+
r as TimeToLiquidationBlockTest
|
|
60
60
|
};
|
|
@@ -1,29 +1,30 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { Stack as
|
|
3
|
-
import { TokenTemplate as
|
|
4
|
-
import { Typography as
|
|
5
|
-
import { formatMoney as
|
|
6
|
-
import { TokenAmountTest as
|
|
7
|
-
function
|
|
1
|
+
import { jsx as r, jsxs as s } from "react/jsx-runtime";
|
|
2
|
+
import { Stack as a } from "../stack/stack.js";
|
|
3
|
+
import { TokenTemplate as i } from "../../token-template/token-template.js";
|
|
4
|
+
import { Typography as l } from "../../typography/typography.js";
|
|
5
|
+
import { formatMoney as p } from "../../../utils/format-money.js";
|
|
6
|
+
import { TokenAmountTest as t } from "./constants.js";
|
|
7
|
+
function v({
|
|
8
8
|
data: o,
|
|
9
|
-
token:
|
|
9
|
+
token: n,
|
|
10
|
+
align: e = "start"
|
|
10
11
|
}) {
|
|
11
12
|
if (o === null)
|
|
12
|
-
return /* @__PURE__ */
|
|
13
|
+
return /* @__PURE__ */ r(
|
|
13
14
|
"span",
|
|
14
15
|
{
|
|
15
16
|
className: "text-secondary-foreground",
|
|
16
|
-
"data-testid":
|
|
17
|
+
"data-testid": t.root,
|
|
17
18
|
children: "—"
|
|
18
19
|
}
|
|
19
20
|
);
|
|
20
|
-
const
|
|
21
|
-
return /* @__PURE__ */
|
|
22
|
-
/* @__PURE__ */
|
|
23
|
-
/* @__PURE__ */
|
|
21
|
+
const m = n ?? o.token;
|
|
22
|
+
return /* @__PURE__ */ s(a, { gap: "xs", align: e, "data-testid": t.root, children: [
|
|
23
|
+
/* @__PURE__ */ r(i, { value: o.value, token: m }),
|
|
24
|
+
/* @__PURE__ */ r(l, { as: "span", variant: "caption", color: "secondary", children: o.valueUsd === null ? "—" : p(o.valueUsd) })
|
|
24
25
|
] });
|
|
25
26
|
}
|
|
26
27
|
export {
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
v as TokenAmount,
|
|
29
|
+
t as TokenAmountTest
|
|
29
30
|
};
|
|
@@ -1,18 +1,21 @@
|
|
|
1
|
-
import { PositionShortLabelTest as t, ValueTest as
|
|
1
|
+
import { PositionShortLabelTest as t, ValueTest as r } from "./constants.js";
|
|
2
2
|
import { PnlValue as l } from "./pnl-value.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { PointsValue as p } from "./points-value.js";
|
|
4
|
+
import { PositionShortLabel as s } from "./position-short-label.js";
|
|
5
|
+
import { PositionTypeBadge as V } from "./position-type-badge.js";
|
|
6
|
+
import { ApyValue as m, HealthFactorValue as x, LeverageValue as P, TokenBigint as T, UsdValue as b, UtilizationValue as g, bps as h } from "./scalars.js";
|
|
6
7
|
export {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
m as ApyValue,
|
|
9
|
+
x as HealthFactorValue,
|
|
10
|
+
P as LeverageValue,
|
|
10
11
|
l as PnlValue,
|
|
11
|
-
|
|
12
|
+
p as PointsValue,
|
|
13
|
+
s as PositionShortLabel,
|
|
12
14
|
t as PositionShortLabelTest,
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
V as PositionTypeBadge,
|
|
16
|
+
T as TokenBigint,
|
|
17
|
+
b as UsdValue,
|
|
18
|
+
g as UtilizationValue,
|
|
19
|
+
r as ValueTest,
|
|
20
|
+
h as bps
|
|
18
21
|
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsx as n, jsxs as s } from "react/jsx-runtime";
|
|
2
|
+
import { PointsIcon as r } from "../../points-icon/points-icon.js";
|
|
3
|
+
import { pointProgramsOf as l } from "../../../utils/apy-breakdown.js";
|
|
4
|
+
import { ValueTest as a } from "./constants.js";
|
|
5
|
+
function c({
|
|
6
|
+
data: i
|
|
7
|
+
}) {
|
|
8
|
+
if (!i) return null;
|
|
9
|
+
const t = l(i);
|
|
10
|
+
return t.length === 0 ? null : /* @__PURE__ */ n(
|
|
11
|
+
"span",
|
|
12
|
+
{
|
|
13
|
+
className: "inline-flex flex-wrap items-center gap-1.5",
|
|
14
|
+
"data-testid": a.points,
|
|
15
|
+
children: t.map((e) => /* @__PURE__ */ s("span", { className: "inline-flex items-center gap-1", children: [
|
|
16
|
+
/* @__PURE__ */ n(
|
|
17
|
+
r,
|
|
18
|
+
{
|
|
19
|
+
reward: { name: e.name, type: e.id },
|
|
20
|
+
size: 16
|
|
21
|
+
}
|
|
22
|
+
),
|
|
23
|
+
/* @__PURE__ */ n("span", { children: e.name })
|
|
24
|
+
] }, e.id))
|
|
25
|
+
}
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
export {
|
|
29
|
+
c as PointsValue
|
|
30
|
+
};
|
|
@@ -2,60 +2,62 @@ import { jsx as e } from "react/jsx-runtime";
|
|
|
2
2
|
import { CompoundAPY as s } from "../../compound-apy/compound-apy.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "@gearbox-protocol/sdk";
|
|
5
|
-
import { cn as
|
|
5
|
+
import { cn as a } from "../../../utils/cn.js";
|
|
6
6
|
import "sonner";
|
|
7
|
-
import {
|
|
7
|
+
import { formatLeverage as c } from "../../../utils/format-leverage.js";
|
|
8
|
+
import { formatPercentAmount as m, formatMoney as l } from "../../../utils/format-money.js";
|
|
8
9
|
import "@gearbox-protocol/sdk/common-utils";
|
|
9
10
|
import "luxon";
|
|
10
11
|
import "../../../utils/z-index.js";
|
|
11
|
-
import { ValueTest as
|
|
12
|
-
const
|
|
13
|
-
function
|
|
14
|
-
return /* @__PURE__ */ e("span", { "data-testid":
|
|
12
|
+
import { ValueTest as r } from "./constants.js";
|
|
13
|
+
const d = "—";
|
|
14
|
+
function i() {
|
|
15
|
+
return /* @__PURE__ */ e("span", { "data-testid": r.placeholder, children: d });
|
|
15
16
|
}
|
|
16
17
|
function o(t) {
|
|
17
|
-
return
|
|
18
|
+
return `${m(t / 100, 2)}%`;
|
|
18
19
|
}
|
|
19
|
-
function
|
|
20
|
-
return t === void 0 ? /* @__PURE__ */ e(
|
|
20
|
+
function P({ data: t }) {
|
|
21
|
+
return t === void 0 ? /* @__PURE__ */ e(i, {}) : typeof t == "number" ? /* @__PURE__ */ e("span", { "data-testid": r.apy, children: o(t) }) : /* @__PURE__ */ e("span", { "data-testid": r.apy, children: /* @__PURE__ */ e(s, { apy: t }) });
|
|
21
22
|
}
|
|
22
|
-
function
|
|
23
|
+
function $({
|
|
23
24
|
data: t
|
|
24
25
|
}) {
|
|
25
|
-
return t == null ? /* @__PURE__ */ e(
|
|
26
|
+
return t == null ? /* @__PURE__ */ e(i, {}) : /* @__PURE__ */ e("span", { "data-testid": r.usd, children: l(t) });
|
|
26
27
|
}
|
|
27
|
-
function
|
|
28
|
+
function z({
|
|
28
29
|
data: t
|
|
29
30
|
}) {
|
|
30
|
-
return t === void 0 ? /* @__PURE__ */ e(
|
|
31
|
+
return t === void 0 ? /* @__PURE__ */ e(i, {}) : /* @__PURE__ */ e("span", { "data-testid": r.leverage, children: `${c(t)}x` });
|
|
31
32
|
}
|
|
32
|
-
function
|
|
33
|
+
function w({
|
|
33
34
|
data: t
|
|
34
35
|
}) {
|
|
35
|
-
return t === void 0 ? /* @__PURE__ */ e(
|
|
36
|
+
return t === void 0 ? /* @__PURE__ */ e(i, {}) : /* @__PURE__ */ e("span", { "data-testid": r.utilization, children: o(t) });
|
|
36
37
|
}
|
|
37
|
-
function
|
|
38
|
+
function B({
|
|
38
39
|
data: t
|
|
39
40
|
}) {
|
|
40
41
|
if (t === void 0)
|
|
41
|
-
return /* @__PURE__ */ e(
|
|
42
|
+
return /* @__PURE__ */ e(i, {});
|
|
42
43
|
const n = t < 1e4 ? "text-destructive" : t < 11e3 ? "text-warning" : "text-success";
|
|
43
|
-
return /* @__PURE__ */ e("span", { "data-testid":
|
|
44
|
+
return /* @__PURE__ */ e("span", { "data-testid": r.healthFactor, className: a(n), children: (t / 1e4).toFixed(2) });
|
|
44
45
|
}
|
|
45
|
-
function
|
|
46
|
+
function C({
|
|
46
47
|
data: t,
|
|
47
48
|
token: n
|
|
48
49
|
}) {
|
|
49
50
|
if (t === void 0 || n === void 0)
|
|
50
|
-
return /* @__PURE__ */ e(
|
|
51
|
+
return /* @__PURE__ */ e(i, {});
|
|
51
52
|
const u = Number(t) / 10 ** n.decimals;
|
|
52
|
-
return /* @__PURE__ */ e("span", { "data-testid":
|
|
53
|
+
return /* @__PURE__ */ e("span", { "data-testid": r.tokenBigint, children: `${u.toLocaleString(void 0, { maximumFractionDigits: 6 })} ${n.symbol}` });
|
|
53
54
|
}
|
|
54
55
|
export {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
56
|
+
P as ApyValue,
|
|
57
|
+
B as HealthFactorValue,
|
|
58
|
+
z as LeverageValue,
|
|
59
|
+
C as TokenBigint,
|
|
60
|
+
$ as UsdValue,
|
|
61
|
+
w as UtilizationValue,
|
|
62
|
+
o as bps
|
|
61
63
|
};
|
|
@@ -33,10 +33,11 @@ import "../token-symbol/token-symbol.js";
|
|
|
33
33
|
import "../simple-accordion/simple-accordion.js";
|
|
34
34
|
import "../tip-card/tip-card.js";
|
|
35
35
|
import "../typography/typography.js";
|
|
36
|
-
import "../vertical-indicator/vertical-indicator.js";
|
|
37
36
|
import "../points-icon/points-icon.js";
|
|
38
37
|
import "@fortawesome/free-solid-svg-icons";
|
|
39
38
|
import "../icons/fa-icon.js";
|
|
39
|
+
import "../vertical-indicator/vertical-indicator.js";
|
|
40
|
+
import "../base/page-title/page-title.js";
|
|
40
41
|
import "../detailed-page-title/detailed-page-title-copy-button.js";
|
|
41
42
|
import "../detailed-page-title/detailed-page-title-explorer-dropdown.js";
|
|
42
43
|
import "../base/details-view/detail-aside/detail-aside-scope.js";
|
|
@@ -60,6 +61,19 @@ import "../with-title/with-title.js";
|
|
|
60
61
|
import "../status-elements/status-elements.js";
|
|
61
62
|
import "react-router-dom";
|
|
62
63
|
import "../client-adapters/styled-dialog-container/styled-dialog-container.js";
|
|
64
|
+
import "../modal/modal.js";
|
|
65
|
+
import "@radix-ui/react-dialog";
|
|
66
|
+
import "../dialog/dialog-container.js";
|
|
67
|
+
import "../dialog/dialog-content.js";
|
|
68
|
+
import "../dialog/dialog-description.js";
|
|
69
|
+
import "../dialog/dialog-footer.js";
|
|
70
|
+
import "../dialog/dialog-header.js";
|
|
71
|
+
import "../dialog/dialog-title.js";
|
|
72
|
+
import "../dialog/dialog-modal-container.js";
|
|
73
|
+
import "../dialog/dialog-overlay.js";
|
|
74
|
+
import "viem";
|
|
75
|
+
import "../input/input.js";
|
|
76
|
+
import "../label/label.js";
|
|
63
77
|
import "../simple-dropdown/simple-dropdown.js";
|
|
64
78
|
import "../simple-dropdown/simple-dropdown-menu-item.js";
|
|
65
79
|
import "../help-tip/help-tip.js";
|
|
@@ -74,21 +88,8 @@ import "../client-adapters/styled-button/styled-button.js";
|
|
|
74
88
|
import "../client-adapters/styled-rounded-image/styled-rounded-image.js";
|
|
75
89
|
import "../composites/tx-preview/confirm/amounts/TransactionConfirmAmountField.js";
|
|
76
90
|
import "../composites/tx-preview/confirm/dialog/constants.js";
|
|
77
|
-
import "../modal/modal.js";
|
|
78
|
-
import "../dialog/dialog-container.js";
|
|
79
91
|
import "../spinner-loader/spinner-loader.js";
|
|
80
92
|
import "../detailed-apy/detailed-apy.js";
|
|
81
|
-
import "@radix-ui/react-dialog";
|
|
82
|
-
import "../dialog/dialog-content.js";
|
|
83
|
-
import "../dialog/dialog-description.js";
|
|
84
|
-
import "../dialog/dialog-footer.js";
|
|
85
|
-
import "../dialog/dialog-header.js";
|
|
86
|
-
import "../dialog/dialog-title.js";
|
|
87
|
-
import "../dialog/dialog-modal-container.js";
|
|
88
|
-
import "../dialog/dialog-overlay.js";
|
|
89
|
-
import "viem";
|
|
90
|
-
import "../input/input.js";
|
|
91
|
-
import "../label/label.js";
|
|
92
93
|
import "../dropdown-menu/dropdown-menu.js";
|
|
93
94
|
import "../dropdown-menu/dropdown-menu-checkbox-item.js";
|
|
94
95
|
import "../dropdown-menu/dropdown-menu-content.js";
|
|
@@ -132,7 +133,7 @@ import "../textarea/textarea.js";
|
|
|
132
133
|
import "../theme-provider.js";
|
|
133
134
|
import { getBlockSyncStatus as z } from "./block-sync-status.js";
|
|
134
135
|
const C = 300 * 1e3, O = 2.5;
|
|
135
|
-
function
|
|
136
|
+
function So({
|
|
136
137
|
blockByChain: p,
|
|
137
138
|
explorerAddresses: y,
|
|
138
139
|
networkById: T,
|
|
@@ -202,5 +203,5 @@ function xo({
|
|
|
202
203
|
return d ? /* @__PURE__ */ t($, { title: a(), children: d }) : /* @__PURE__ */ t("div", { className: "select-none", children: a() });
|
|
203
204
|
}
|
|
204
205
|
export {
|
|
205
|
-
|
|
206
|
+
So as BlockSyncPill
|
|
206
207
|
};
|
|
@@ -33,10 +33,11 @@ import "../token-symbol/token-symbol.js";
|
|
|
33
33
|
import "../simple-accordion/simple-accordion.js";
|
|
34
34
|
import "../tip-card/tip-card.js";
|
|
35
35
|
import "../typography/typography.js";
|
|
36
|
-
import "../vertical-indicator/vertical-indicator.js";
|
|
37
36
|
import "../points-icon/points-icon.js";
|
|
38
37
|
import "@fortawesome/free-solid-svg-icons";
|
|
39
38
|
import "../icons/fa-icon.js";
|
|
39
|
+
import "../vertical-indicator/vertical-indicator.js";
|
|
40
|
+
import "../base/page-title/page-title.js";
|
|
40
41
|
import "../detailed-page-title/detailed-page-title-copy-button.js";
|
|
41
42
|
import "../detailed-page-title/detailed-page-title-explorer-dropdown.js";
|
|
42
43
|
import "../base/details-view/detail-aside/detail-aside-scope.js";
|
|
@@ -59,6 +60,19 @@ import "../with-title/with-title.js";
|
|
|
59
60
|
import "../status-elements/status-elements.js";
|
|
60
61
|
import "react-router-dom";
|
|
61
62
|
import "../client-adapters/styled-dialog-container/styled-dialog-container.js";
|
|
63
|
+
import "../modal/modal.js";
|
|
64
|
+
import "@radix-ui/react-dialog";
|
|
65
|
+
import "../dialog/dialog-container.js";
|
|
66
|
+
import "../dialog/dialog-content.js";
|
|
67
|
+
import "../dialog/dialog-description.js";
|
|
68
|
+
import "../dialog/dialog-footer.js";
|
|
69
|
+
import "../dialog/dialog-header.js";
|
|
70
|
+
import "../dialog/dialog-title.js";
|
|
71
|
+
import "../dialog/dialog-modal-container.js";
|
|
72
|
+
import "../dialog/dialog-overlay.js";
|
|
73
|
+
import "viem";
|
|
74
|
+
import "../input/input.js";
|
|
75
|
+
import { Label as k } from "../label/label.js";
|
|
62
76
|
import "../simple-dropdown/simple-dropdown.js";
|
|
63
77
|
import "../simple-dropdown/simple-dropdown-menu-item.js";
|
|
64
78
|
import "../help-tip/help-tip.js";
|
|
@@ -73,21 +87,8 @@ import "../client-adapters/styled-button/styled-button.js";
|
|
|
73
87
|
import "../client-adapters/styled-rounded-image/styled-rounded-image.js";
|
|
74
88
|
import "../composites/tx-preview/confirm/amounts/TransactionConfirmAmountField.js";
|
|
75
89
|
import "../composites/tx-preview/confirm/dialog/constants.js";
|
|
76
|
-
import "../modal/modal.js";
|
|
77
|
-
import "../dialog/dialog-container.js";
|
|
78
90
|
import "../spinner-loader/spinner-loader.js";
|
|
79
91
|
import "../detailed-apy/detailed-apy.js";
|
|
80
|
-
import "@radix-ui/react-dialog";
|
|
81
|
-
import "../dialog/dialog-content.js";
|
|
82
|
-
import "../dialog/dialog-description.js";
|
|
83
|
-
import "../dialog/dialog-footer.js";
|
|
84
|
-
import "../dialog/dialog-header.js";
|
|
85
|
-
import "../dialog/dialog-title.js";
|
|
86
|
-
import "../dialog/dialog-modal-container.js";
|
|
87
|
-
import "../dialog/dialog-overlay.js";
|
|
88
|
-
import "viem";
|
|
89
|
-
import "../input/input.js";
|
|
90
|
-
import { Label as k } from "../label/label.js";
|
|
91
92
|
import "../dropdown-menu/dropdown-menu.js";
|
|
92
93
|
import "../dropdown-menu/dropdown-menu-checkbox-item.js";
|
|
93
94
|
import "../dropdown-menu/dropdown-menu-content.js";
|