@gearbox-protocol/ui-kit 4.0.0-next.2 → 4.0.0-next.3
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/index.cjs +1 -1
- package/dist/cjs/components/base/values/index.cjs +1 -1
- package/dist/cjs/components/base/values/scalars.cjs +1 -1
- package/dist/cjs/components/composites/pool-assets-table/pool-assets-table-row.cjs +1 -1
- package/dist/cjs/components/index.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/esm/components/base/borrow-rate-block/borrow-rate-block.js +30 -25
- package/dist/esm/components/base/index.js +40 -39
- package/dist/esm/components/base/values/index.js +8 -7
- package/dist/esm/components/base/values/scalars.js +27 -26
- package/dist/esm/components/composites/pool-assets-table/pool-assets-table-row.js +14 -13
- package/dist/esm/components/index.js +561 -560
- package/dist/esm/index.js +733 -732
- package/dist/types/components/base/borrow-rate-block/borrow-rate-block.d.ts +10 -5
- package/dist/types/components/base/values/index.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/package.json +2 -2
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsx as o, jsxs as
|
|
2
|
-
import { SimpleAccordion as
|
|
1
|
+
import { jsx as o, jsxs as m } from "react/jsx-runtime";
|
|
2
|
+
import { SimpleAccordion as l, SimpleAccordionItem as s } from "../../simple-accordion/simple-accordion.js";
|
|
3
3
|
import { TipCard as c } from "../../tip-card/tip-card.js";
|
|
4
|
-
import { FormattedMessageTyped as
|
|
4
|
+
import { FormattedMessageTyped as e } from "../../typed-intl/index.js";
|
|
5
5
|
import { Typography as d } from "../../typography/typography.js";
|
|
6
6
|
import { VSpace as f } from "../../vspace/vspace.js";
|
|
7
|
-
import { InfoList as
|
|
7
|
+
import { InfoList as b, InfoLine as i } from "../info-list/info-list.js";
|
|
8
8
|
import "react";
|
|
9
9
|
import "@gearbox-protocol/sdk";
|
|
10
10
|
import "clsx";
|
|
@@ -13,15 +13,20 @@ import "sonner";
|
|
|
13
13
|
import "@gearbox-protocol/sdk/common-utils";
|
|
14
14
|
import "luxon";
|
|
15
15
|
import "../../../utils/z-index.js";
|
|
16
|
-
import { ApyValue as
|
|
16
|
+
import { ApyValue as a } from "../values/scalars.js";
|
|
17
17
|
import "../../badge/badge.js";
|
|
18
|
-
import { BorrowRateBlockTest as
|
|
19
|
-
function
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
import { BorrowRateBlockTest as n } from "./constants.js";
|
|
19
|
+
function p(t) {
|
|
20
|
+
return typeof t == "number" ? t : t?.total;
|
|
21
|
+
}
|
|
22
|
+
function u(t) {
|
|
23
|
+
return typeof t == "number" ? t : t?.base;
|
|
24
|
+
}
|
|
25
|
+
function V({
|
|
26
|
+
data: t,
|
|
27
|
+
dataTo: r
|
|
23
28
|
}) {
|
|
24
|
-
return /* @__PURE__ */ o("div", { "data-testid":
|
|
29
|
+
return /* @__PURE__ */ o("div", { "data-testid": n.root, children: /* @__PURE__ */ o(l, { children: /* @__PURE__ */ o(
|
|
25
30
|
s,
|
|
26
31
|
{
|
|
27
32
|
value: "borrow-rate",
|
|
@@ -32,35 +37,35 @@ function L({
|
|
|
32
37
|
"div",
|
|
33
38
|
{
|
|
34
39
|
className: "min-w-0 flex-1 pr-1.5",
|
|
35
|
-
"data-testid":
|
|
40
|
+
"data-testid": n.trigger,
|
|
36
41
|
children: /* @__PURE__ */ o(
|
|
37
|
-
|
|
42
|
+
i,
|
|
38
43
|
{
|
|
39
44
|
title: "components.borrowRateBlock.label",
|
|
40
|
-
tip: /* @__PURE__ */ o(
|
|
41
|
-
value: /* @__PURE__ */ o(
|
|
42
|
-
valueTo:
|
|
45
|
+
tip: /* @__PURE__ */ o(e, { messageId: "components.borrowRateBlock.tip" }),
|
|
46
|
+
value: /* @__PURE__ */ o(a, { data: p(t) }),
|
|
47
|
+
valueTo: r !== void 0 ? /* @__PURE__ */ o(a, { data: p(r) }) : void 0
|
|
43
48
|
}
|
|
44
49
|
)
|
|
45
50
|
}
|
|
46
51
|
),
|
|
47
|
-
description: /* @__PURE__ */
|
|
52
|
+
description: /* @__PURE__ */ m("div", { "data-testid": n.details, children: [
|
|
48
53
|
/* @__PURE__ */ o(f, { size: 16 }),
|
|
49
|
-
/* @__PURE__ */ o(c, { backgroundColor: "transparent", textColor: "unset", children: /* @__PURE__ */
|
|
50
|
-
/* @__PURE__ */ o(d, { as: "span", variant: "caption", color: "secondary", children: /* @__PURE__ */ o(
|
|
54
|
+
/* @__PURE__ */ o(c, { backgroundColor: "transparent", textColor: "unset", children: /* @__PURE__ */ m(b, { children: [
|
|
55
|
+
/* @__PURE__ */ o(d, { as: "span", variant: "caption", color: "secondary", children: /* @__PURE__ */ o(e, { messageId: "components.borrowRateBlock.description" }) }),
|
|
51
56
|
/* @__PURE__ */ o(
|
|
52
|
-
|
|
57
|
+
i,
|
|
53
58
|
{
|
|
54
59
|
title: "components.borrowRateBlock.baseRate",
|
|
55
|
-
value: /* @__PURE__ */ o(
|
|
60
|
+
value: /* @__PURE__ */ o(a, { data: u(r ?? t) })
|
|
56
61
|
}
|
|
57
62
|
),
|
|
58
63
|
/* @__PURE__ */ o(
|
|
59
|
-
|
|
64
|
+
i,
|
|
60
65
|
{
|
|
61
66
|
title: "components.borrowRateBlock.normalization",
|
|
62
67
|
tip: /* @__PURE__ */ o(
|
|
63
|
-
|
|
68
|
+
e,
|
|
64
69
|
{
|
|
65
70
|
messageId: "components.borrowRateBlock.normalization.tip",
|
|
66
71
|
values: {
|
|
@@ -78,6 +83,6 @@ function L({
|
|
|
78
83
|
) }) });
|
|
79
84
|
}
|
|
80
85
|
export {
|
|
81
|
-
|
|
82
|
-
|
|
86
|
+
V as BorrowRateBlock,
|
|
87
|
+
n as BorrowRateBlockTest
|
|
83
88
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AmountInput as r } from "./amount-input/amount-input.js";
|
|
2
2
|
import { TokenSelectPanel as a } from "./amount-input/token-select-panel.js";
|
|
3
|
-
import { BorrowRateBlock as
|
|
3
|
+
import { BorrowRateBlock as p } from "./borrow-rate-block/borrow-rate-block.js";
|
|
4
4
|
import { BorrowRateBlockTest as f } from "./borrow-rate-block/constants.js";
|
|
5
5
|
import { ChartWithSideCard as x } from "./chart-with-side-card/chart-with-side-card.js";
|
|
6
6
|
import { ChartWithSideCardTest as s } from "./chart-with-side-card/constants.js";
|
|
@@ -23,7 +23,7 @@ import { MoreAccordionTest as $ } from "./more-accordion/constants.js";
|
|
|
23
23
|
import { MoreAccordion as oe } from "./more-accordion/more-accordion.js";
|
|
24
24
|
import { NestedInfoStackTest as te } from "./nested-info-stack/constants.js";
|
|
25
25
|
import { NestedInfoStack as ie } from "./nested-info-stack/nested-info-stack.js";
|
|
26
|
-
import { PageTitle as
|
|
26
|
+
import { PageTitle as me } from "./page-title/page-title.js";
|
|
27
27
|
import { PoolApyBreakdownCardTest as ne } from "./pool-apy-breakdown-card/constants.js";
|
|
28
28
|
import { PoolApyBreakdownCard as Te } from "./pool-apy-breakdown-card/pool-apy-breakdown-card.js";
|
|
29
29
|
import { ReviewButton as le } from "./review-button/review-button.js";
|
|
@@ -47,58 +47,58 @@ import { TitleMeta as Ze } from "./title-meta/title-meta.js";
|
|
|
47
47
|
import { TokenAmount as eo } from "./token-amount/token-amount.js";
|
|
48
48
|
import { TokenPairSymbolTest as ro } from "./token-pair-symbol/constants.js";
|
|
49
49
|
import { TokenPairSymbol as ao } from "./token-pair-symbol/token-pair-symbol.js";
|
|
50
|
-
import { TokenPairTitleTest as
|
|
50
|
+
import { TokenPairTitleTest as po } from "./token-pair-title/constants.js";
|
|
51
51
|
import { TokenPairTitle as fo } from "./token-pair-title/token-pair-title.js";
|
|
52
52
|
import { PositionShortLabelTest as xo, ValueTest as To } from "./values/constants.js";
|
|
53
53
|
import { PnlValue as lo } from "./values/pnl-value.js";
|
|
54
54
|
import { PositionShortLabel as Po } from "./values/position-short-label.js";
|
|
55
55
|
import { PositionTypeBadge as go } from "./values/position-type-badge.js";
|
|
56
|
-
import { ApyValue as ko, HealthFactorValue as Bo, LeverageValue as Ao, TokenBigint as bo, UsdValue as Lo, UtilizationValue as yo } from "./values/scalars.js";
|
|
57
|
-
import { AmountInputTest as
|
|
58
|
-
import { DetailedPageTitleTest as
|
|
59
|
-
import { DetailsViewTest as
|
|
60
|
-
import { HistoryChartTest as
|
|
61
|
-
import { InfoListTest as
|
|
62
|
-
import { LeverageInputTest as
|
|
63
|
-
import { ManagePaneTest as
|
|
64
|
-
import { PageTitleTest as
|
|
65
|
-
import { ReviewButtonTest as
|
|
66
|
-
import { SectionHeadingTest as
|
|
67
|
-
import { SegmentedTabsTest as
|
|
68
|
-
import { StackTest as
|
|
69
|
-
import { StatBadgeTest as
|
|
70
|
-
import { StickyBarTest as
|
|
71
|
-
import { TabberTest as
|
|
72
|
-
import { TokenAmountTest as
|
|
56
|
+
import { ApyValue as ko, HealthFactorValue as Bo, LeverageValue as Ao, TokenBigint as bo, UsdValue as Lo, UtilizationValue as yo, bps as Co } from "./values/scalars.js";
|
|
57
|
+
import { AmountInputTest as wo } from "./amount-input/constants.js";
|
|
58
|
+
import { DetailedPageTitleTest as ho } from "./detailed-page-title/constants.js";
|
|
59
|
+
import { DetailsViewTest as Do } from "./details-view/constants.js";
|
|
60
|
+
import { HistoryChartTest as Eo } from "./history-chart/constants.js";
|
|
61
|
+
import { InfoListTest as vo } from "./info-list/constants.js";
|
|
62
|
+
import { LeverageInputTest as No } from "./leverage-input/constants.js";
|
|
63
|
+
import { ManagePaneTest as Fo } from "./manage-pane/constants.js";
|
|
64
|
+
import { PageTitleTest as Uo } from "./page-title/constants.js";
|
|
65
|
+
import { ReviewButtonTest as Wo } from "./review-button/constants.js";
|
|
66
|
+
import { SectionHeadingTest as Xo } from "./section-heading/constants.js";
|
|
67
|
+
import { SegmentedTabsTest as Jo } from "./segmented-tabs/constants.js";
|
|
68
|
+
import { StackTest as Qo } from "./stack/constants.js";
|
|
69
|
+
import { StatBadgeTest as Zo } from "./stat-badge/constants.js";
|
|
70
|
+
import { StickyBarTest as er } from "./sticky-bar/constants.js";
|
|
71
|
+
import { TabberTest as rr } from "./tabber/constants.js";
|
|
72
|
+
import { TokenAmountTest as ar } from "./token-amount/constants.js";
|
|
73
73
|
export {
|
|
74
74
|
r as AmountInput,
|
|
75
|
-
|
|
75
|
+
wo as AmountInputTest,
|
|
76
76
|
ko as ApyValue,
|
|
77
77
|
P as AsideAlignAnchor,
|
|
78
|
-
|
|
78
|
+
p as BorrowRateBlock,
|
|
79
79
|
f as BorrowRateBlockTest,
|
|
80
80
|
x as ChartWithSideCard,
|
|
81
81
|
s as ChartWithSideCardTest,
|
|
82
82
|
g as DetailAsideScreenLayout,
|
|
83
83
|
d as DetailedPageTitle,
|
|
84
|
-
|
|
84
|
+
ho as DetailedPageTitleTest,
|
|
85
85
|
k as DetailsView,
|
|
86
86
|
B as DetailsViewLeftPane,
|
|
87
87
|
A as DetailsViewManagePane,
|
|
88
|
-
|
|
88
|
+
Do as DetailsViewTest,
|
|
89
89
|
C as HealthFactorBlock,
|
|
90
90
|
L as HealthFactorBlockTest,
|
|
91
91
|
Bo as HealthFactorValue,
|
|
92
92
|
w as HistoryChart,
|
|
93
|
-
|
|
93
|
+
Eo as HistoryChartTest,
|
|
94
94
|
h as InfoLine,
|
|
95
95
|
V as InfoList,
|
|
96
|
-
|
|
96
|
+
vo as InfoListTest,
|
|
97
97
|
E as InfoPortalOut,
|
|
98
98
|
q as InfoPortalProvider,
|
|
99
99
|
D as InfoSectionTitle,
|
|
100
100
|
_ as LeverageInput,
|
|
101
|
-
|
|
101
|
+
No as LeverageInputTest,
|
|
102
102
|
Ao as LeverageValue,
|
|
103
103
|
G as LiquidationParamsTable,
|
|
104
104
|
R as LiquidationParamsTableTest,
|
|
@@ -109,13 +109,13 @@ export {
|
|
|
109
109
|
K as ManagePaneMessage,
|
|
110
110
|
Q as ManagePaneTab,
|
|
111
111
|
Y as ManagePaneTabDropdown,
|
|
112
|
-
|
|
112
|
+
Fo as ManagePaneTest,
|
|
113
113
|
oe as MoreAccordion,
|
|
114
114
|
$ as MoreAccordionTest,
|
|
115
115
|
ie as NestedInfoStack,
|
|
116
116
|
te as NestedInfoStackTest,
|
|
117
|
-
|
|
118
|
-
|
|
117
|
+
me as PageTitle,
|
|
118
|
+
Uo as PageTitleTest,
|
|
119
119
|
lo as PnlValue,
|
|
120
120
|
Te as PoolApyBreakdownCard,
|
|
121
121
|
ne as PoolApyBreakdownCardTest,
|
|
@@ -123,43 +123,44 @@ export {
|
|
|
123
123
|
xo as PositionShortLabelTest,
|
|
124
124
|
go as PositionTypeBadge,
|
|
125
125
|
le as ReviewButton,
|
|
126
|
-
|
|
126
|
+
Wo as ReviewButtonTest,
|
|
127
127
|
ce as SEGMENTED_TABS_INACTIVE_BUTTON_CLASS,
|
|
128
128
|
Le as SPACE_HEIGHT,
|
|
129
129
|
ye as SPACE_PX,
|
|
130
130
|
Se as SectionHeading,
|
|
131
|
-
|
|
131
|
+
Xo as SectionHeadingTest,
|
|
132
132
|
ge as SegmentedTabs,
|
|
133
|
-
|
|
133
|
+
Jo as SegmentedTabsTest,
|
|
134
134
|
Ae as SideCard,
|
|
135
135
|
ke as SideCardTest,
|
|
136
136
|
Ie as Stack,
|
|
137
|
-
|
|
137
|
+
Qo as StackTest,
|
|
138
138
|
Me as StatBadge,
|
|
139
139
|
he as StatBadgeGrid,
|
|
140
|
-
|
|
140
|
+
Zo as StatBadgeTest,
|
|
141
141
|
De as StickyBar,
|
|
142
|
-
|
|
142
|
+
er as StickyBarTest,
|
|
143
143
|
ve as StrategyApyBreakdownCard,
|
|
144
144
|
Ee as StrategyApyBreakdownCardTest,
|
|
145
145
|
Ne as Tabber,
|
|
146
146
|
Re as TabberSection,
|
|
147
|
-
|
|
147
|
+
rr as TabberTest,
|
|
148
148
|
Je as TimeToLiquidationBlock,
|
|
149
149
|
Xe as TimeToLiquidationBlockTest,
|
|
150
150
|
Ze as TitleMeta,
|
|
151
151
|
Qe as TitleMetaTest,
|
|
152
152
|
eo as TokenAmount,
|
|
153
|
-
|
|
153
|
+
ar as TokenAmountTest,
|
|
154
154
|
bo as TokenBigint,
|
|
155
155
|
ao as TokenPairSymbol,
|
|
156
156
|
ro as TokenPairSymbolTest,
|
|
157
157
|
fo as TokenPairTitle,
|
|
158
|
-
|
|
158
|
+
po as TokenPairTitleTest,
|
|
159
159
|
a as TokenSelectPanel,
|
|
160
160
|
Lo as UsdValue,
|
|
161
161
|
yo as UtilizationValue,
|
|
162
162
|
To as ValueTest,
|
|
163
|
+
Co as bps,
|
|
163
164
|
Fe as isTabber,
|
|
164
165
|
Ue as useDetailScrollSpy,
|
|
165
166
|
We as useTitleText
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import { PositionShortLabelTest as t, ValueTest as a } from "./constants.js";
|
|
2
2
|
import { PnlValue as l } from "./pnl-value.js";
|
|
3
|
-
import { PositionShortLabel as
|
|
4
|
-
import { PositionTypeBadge as
|
|
5
|
-
import { ApyValue as
|
|
3
|
+
import { PositionShortLabel as p } from "./position-short-label.js";
|
|
4
|
+
import { PositionTypeBadge as s } from "./position-type-badge.js";
|
|
5
|
+
import { ApyValue as V, HealthFactorValue as f, LeverageValue as m, TokenBigint as x, UsdValue as P, UtilizationValue as T, bps as b } from "./scalars.js";
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
V as ApyValue,
|
|
8
8
|
f as HealthFactorValue,
|
|
9
9
|
m as LeverageValue,
|
|
10
10
|
l as PnlValue,
|
|
11
|
-
|
|
11
|
+
p as PositionShortLabel,
|
|
12
12
|
t as PositionShortLabelTest,
|
|
13
|
-
|
|
13
|
+
s as PositionTypeBadge,
|
|
14
14
|
x as TokenBigint,
|
|
15
15
|
P as UsdValue,
|
|
16
16
|
T as UtilizationValue,
|
|
17
|
-
a as ValueTest
|
|
17
|
+
a as ValueTest,
|
|
18
|
+
b as bps
|
|
18
19
|
};
|
|
@@ -4,58 +4,59 @@ import "react";
|
|
|
4
4
|
import "@gearbox-protocol/sdk";
|
|
5
5
|
import { cn as c } from "../../../utils/cn.js";
|
|
6
6
|
import "sonner";
|
|
7
|
-
import {
|
|
7
|
+
import { formatPercentAmount as a, formatMoney as l } from "../../../utils/format-money.js";
|
|
8
8
|
import "@gearbox-protocol/sdk/common-utils";
|
|
9
9
|
import "luxon";
|
|
10
10
|
import "../../../utils/z-index.js";
|
|
11
|
-
import { ValueTest as
|
|
12
|
-
const
|
|
13
|
-
function
|
|
14
|
-
return /* @__PURE__ */ e("span", { "data-testid":
|
|
11
|
+
import { ValueTest as r } from "./constants.js";
|
|
12
|
+
const d = "—";
|
|
13
|
+
function i() {
|
|
14
|
+
return /* @__PURE__ */ e("span", { "data-testid": r.placeholder, children: d });
|
|
15
15
|
}
|
|
16
16
|
function o(t) {
|
|
17
|
-
return
|
|
17
|
+
return `${a(t / 100, 2)}%`;
|
|
18
18
|
}
|
|
19
|
-
function
|
|
20
|
-
return t === void 0 ? /* @__PURE__ */ e(
|
|
19
|
+
function F({ data: t }) {
|
|
20
|
+
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
21
|
}
|
|
22
|
-
function
|
|
22
|
+
function L({
|
|
23
23
|
data: t
|
|
24
24
|
}) {
|
|
25
|
-
return t == null ? /* @__PURE__ */ e(
|
|
25
|
+
return t == null ? /* @__PURE__ */ e(i, {}) : /* @__PURE__ */ e("span", { "data-testid": r.usd, children: l(t) });
|
|
26
26
|
}
|
|
27
|
-
function
|
|
27
|
+
function P({
|
|
28
28
|
data: t
|
|
29
29
|
}) {
|
|
30
|
-
return t === void 0 ? /* @__PURE__ */ e(
|
|
30
|
+
return t === void 0 ? /* @__PURE__ */ e(i, {}) : /* @__PURE__ */ e("span", { "data-testid": r.leverage, children: `${t}x` });
|
|
31
31
|
}
|
|
32
|
-
function
|
|
32
|
+
function $({
|
|
33
33
|
data: t
|
|
34
34
|
}) {
|
|
35
|
-
return t === void 0 ? /* @__PURE__ */ e(
|
|
35
|
+
return t === void 0 ? /* @__PURE__ */ e(i, {}) : /* @__PURE__ */ e("span", { "data-testid": r.utilization, children: o(t) });
|
|
36
36
|
}
|
|
37
|
-
function
|
|
37
|
+
function z({
|
|
38
38
|
data: t
|
|
39
39
|
}) {
|
|
40
40
|
if (t === void 0)
|
|
41
|
-
return /* @__PURE__ */ e(
|
|
41
|
+
return /* @__PURE__ */ e(i, {});
|
|
42
42
|
const n = t < 1e4 ? "text-destructive" : t < 11e3 ? "text-warning" : "text-success";
|
|
43
|
-
return /* @__PURE__ */ e("span", { "data-testid":
|
|
43
|
+
return /* @__PURE__ */ e("span", { "data-testid": r.healthFactor, className: c(n), children: (t / 1e4).toFixed(2) });
|
|
44
44
|
}
|
|
45
|
-
function
|
|
45
|
+
function w({
|
|
46
46
|
data: t,
|
|
47
47
|
token: n
|
|
48
48
|
}) {
|
|
49
49
|
if (t === void 0 || n === void 0)
|
|
50
|
-
return /* @__PURE__ */ e(
|
|
50
|
+
return /* @__PURE__ */ e(i, {});
|
|
51
51
|
const u = Number(t) / 10 ** n.decimals;
|
|
52
|
-
return /* @__PURE__ */ e("span", { "data-testid":
|
|
52
|
+
return /* @__PURE__ */ e("span", { "data-testid": r.tokenBigint, children: `${u.toLocaleString(void 0, { maximumFractionDigits: 6 })} ${n.symbol}` });
|
|
53
53
|
}
|
|
54
54
|
export {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
55
|
+
F as ApyValue,
|
|
56
|
+
z as HealthFactorValue,
|
|
57
|
+
P as LeverageValue,
|
|
58
|
+
w as TokenBigint,
|
|
59
|
+
L as UsdValue,
|
|
60
|
+
$ as UtilizationValue,
|
|
61
|
+
o as bps
|
|
61
62
|
};
|
|
@@ -1,32 +1,33 @@
|
|
|
1
1
|
import { jsx as e, jsxs as t, Fragment as N } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import "@gearbox-protocol/sdk/common-utils";
|
|
4
|
-
import { useIsMobile as y, useIsDesktop as L } from "../../../hooks/use-media-query.js";
|
|
5
3
|
import "@gearbox-protocol/sdk";
|
|
6
4
|
import "clsx";
|
|
7
5
|
import "tailwind-merge";
|
|
8
6
|
import "sonner";
|
|
9
|
-
import
|
|
7
|
+
import "@gearbox-protocol/sdk/common-utils";
|
|
10
8
|
import "luxon";
|
|
11
9
|
import "../../../utils/z-index.js";
|
|
10
|
+
import { bps as y } from "../../base/values/scalars.js";
|
|
11
|
+
import "../../badge/badge.js";
|
|
12
|
+
import { FormattedMessageTyped as o } from "../../typed-intl/index.js";
|
|
13
|
+
import { useIsMobile as L, useIsDesktop as S } from "../../../hooks/use-media-query.js";
|
|
12
14
|
import { ShortString as c } from "../../short-string/short-string.js";
|
|
13
15
|
import { GridTableRow as A, GridTableCell as s } from "../../table/grid-table.js";
|
|
14
16
|
import { TableLineSm as k, TableCellSm as p } from "../../table/table-sm.js";
|
|
15
17
|
import { TokenSymbol as v } from "../../token-symbol/token-symbol.js";
|
|
16
18
|
import { TokenTemplate as d } from "../../token-template/token-template.js";
|
|
17
|
-
import { FormattedMessageTyped as o } from "../../typed-intl/index.js";
|
|
18
19
|
import { Typography as w } from "../../typography/typography.js";
|
|
19
|
-
function
|
|
20
|
+
function V({
|
|
20
21
|
poolName: h,
|
|
21
22
|
token: l,
|
|
22
23
|
currentQuota: g,
|
|
23
24
|
underlyingToken: r,
|
|
24
25
|
last: u
|
|
25
26
|
}) {
|
|
26
|
-
const { limit: f, totalQuoted:
|
|
27
|
+
const { limit: f, totalQuoted: b, rate: x } = g, i = L(), T = S() ? 21 : i ? 40 : 16, a = () => /* @__PURE__ */ t("div", { className: "flex items-center flex-col-auto", children: [
|
|
27
28
|
/* @__PURE__ */ e(v, { token: l, size: 32 }),
|
|
28
29
|
/* @__PURE__ */ t("span", { className: "ml-1.5 md:ml-2.5 text-left", children: [
|
|
29
|
-
/* @__PURE__ */ e(c, { maxLength:
|
|
30
|
+
/* @__PURE__ */ e(c, { maxLength: T, children: l?.title }),
|
|
30
31
|
/* @__PURE__ */ e(
|
|
31
32
|
w,
|
|
32
33
|
{
|
|
@@ -38,7 +39,7 @@ function O({
|
|
|
38
39
|
}
|
|
39
40
|
)
|
|
40
41
|
] })
|
|
41
|
-
] }), m = () =>
|
|
42
|
+
] }), m = () => y(Number(x)), n = () => /* @__PURE__ */ e("span", { children: /* @__PURE__ */ e(
|
|
42
43
|
o,
|
|
43
44
|
{
|
|
44
45
|
messageId: "components.poolAssetsTable.usage",
|
|
@@ -46,7 +47,7 @@ function O({
|
|
|
46
47
|
amount: /* @__PURE__ */ e(
|
|
47
48
|
d,
|
|
48
49
|
{
|
|
49
|
-
value:
|
|
50
|
+
value: b,
|
|
50
51
|
token: r,
|
|
51
52
|
decimalPartLength: 2,
|
|
52
53
|
precision: 2,
|
|
@@ -77,12 +78,12 @@ function O({
|
|
|
77
78
|
style: {
|
|
78
79
|
minHeight: "75px"
|
|
79
80
|
},
|
|
80
|
-
children:
|
|
81
|
+
children: i ? /* @__PURE__ */ e(s, { span: "full", size: "sm", className: "px-3 py-0!", children: /* @__PURE__ */ t(
|
|
81
82
|
k,
|
|
82
83
|
{
|
|
83
84
|
columns: 2,
|
|
84
85
|
columnsXs: 2,
|
|
85
|
-
title:
|
|
86
|
+
title: a(),
|
|
86
87
|
className: "w-full",
|
|
87
88
|
children: [
|
|
88
89
|
/* @__PURE__ */ e(
|
|
@@ -102,7 +103,7 @@ function O({
|
|
|
102
103
|
]
|
|
103
104
|
}
|
|
104
105
|
) }) : /* @__PURE__ */ t(N, { children: [
|
|
105
|
-
/* @__PURE__ */ e(s, { textAlign: "left", className: "pl-4", size: "sm", children:
|
|
106
|
+
/* @__PURE__ */ e(s, { textAlign: "left", className: "pl-4", size: "sm", children: a() }),
|
|
106
107
|
/* @__PURE__ */ e(s, { textAlign: "right", size: "sm", children: m() }),
|
|
107
108
|
/* @__PURE__ */ e(s, { textAlign: "right", className: "pr-4", size: "sm", children: n() })
|
|
108
109
|
] })
|
|
@@ -110,5 +111,5 @@ function O({
|
|
|
110
111
|
);
|
|
111
112
|
}
|
|
112
113
|
export {
|
|
113
|
-
|
|
114
|
+
V as PoolAssetsTableRow
|
|
114
115
|
};
|