@gearbox-protocol/ui-kit 3.13.0 → 3.14.0-next.1
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/composites/pool-table/pool-table.cjs +1 -1
- package/dist/cjs/components/composites/strategies-table/columns.cjs +1 -1
- package/dist/cjs/components/composites/strategies-table/components/cells/cells.cjs +1 -1
- package/dist/cjs/components/composites/strategies-table/components/rewards-tooltip/tooltip-content.cjs +1 -1
- package/dist/cjs/components/graph/graph.cjs +1 -1
- package/dist/cjs/components/layout/main-aside-layout/main-aside-layout.cjs +1 -1
- package/dist/cjs/locale/en.json.cjs +1 -1
- package/dist/esm/components/composites/pool-table/columns.js +344 -207
- package/dist/esm/components/composites/pool-table/pool-table.js +94 -102
- package/dist/esm/components/composites/strategies-table/columns.js +1 -1
- package/dist/esm/components/composites/strategies-table/components/cells/cells.js +31 -28
- package/dist/esm/components/composites/strategies-table/components/rewards-tooltip/tooltip-content.js +131 -122
- package/dist/esm/components/graph/graph.js +339 -293
- package/dist/esm/components/layout/main-aside-layout/main-aside-layout.js +70 -22
- package/dist/esm/locale/en.json.js +1 -0
- package/dist/globals.css +1 -1
- package/dist/types/components/composites/pool-table/columns.d.ts +0 -2
- package/dist/types/components/composites/strategies-table/components/cells/cells.d.ts +2 -1
- package/dist/types/components/graph/graph.d.ts +8 -1
- package/dist/types/components/layout/main-aside-layout/main-aside-layout.d.ts +46 -5
- package/dist/types/components/trading-view/trading-view.d.ts +7 -0
- package/dist/types/locale/en.json.d.ts +1 -0
- package/package.json +3 -3
- package/src/styles/base.css +4 -2
|
@@ -1,329 +1,466 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { AssetsListCell as
|
|
1
|
+
import { jsx as r, jsxs as d } from "react/jsx-runtime";
|
|
2
|
+
import { AssetsListCell as A } from "../../assets-list-cell/assets-list-cell.js";
|
|
3
3
|
import { CompoundAPY as C } from "../../compound-apy/compound-apy.js";
|
|
4
|
-
import { Description as
|
|
5
|
-
import { NetworkIcon as
|
|
6
|
-
import { PercentIndicator as
|
|
4
|
+
import { Description as c } from "../../description/description.js";
|
|
5
|
+
import { NetworkIcon as x } from "../../network-icon/network-icon.js";
|
|
6
|
+
import { PercentIndicator as N } from "../../percent-indicator/percent-indicator.js";
|
|
7
7
|
import { PoolAPYTooltip as P } from "../../pool-apy-tooltip/pool-apy-tooltip.js";
|
|
8
|
-
import { PoolIndicatorIcon as
|
|
8
|
+
import { PoolIndicatorIcon as v } from "../../pool-indicator-icon/pool-indicator-icon.js";
|
|
9
9
|
import { PoolPointsIndicator as D } from "../../pool-points-indicator/pool-points-indicator.js";
|
|
10
|
-
import {
|
|
11
|
-
import { Skeleton as f } from "../../skeleton/skeleton.js";
|
|
10
|
+
import { Skeleton as u } from "../../skeleton/skeleton.js";
|
|
12
11
|
import "react";
|
|
13
12
|
import "@gearbox-protocol/sdk";
|
|
14
|
-
import
|
|
13
|
+
import "clsx";
|
|
14
|
+
import "tailwind-merge";
|
|
15
15
|
import "sonner";
|
|
16
|
-
import { percentageTemplate as
|
|
17
|
-
import { tokenTemplate as
|
|
16
|
+
import { percentageTemplate as I, formatMoney as h } from "../../../utils/format-money.js";
|
|
17
|
+
import { tokenTemplate as g } from "../../../utils/templates.js";
|
|
18
18
|
import "luxon";
|
|
19
19
|
import "../../../utils/z-index.js";
|
|
20
|
-
import { TokenSymbol as
|
|
21
|
-
import {
|
|
20
|
+
import { TokenSymbol as Y } from "../../token-symbol/token-symbol.js";
|
|
21
|
+
import { FormattedMessageTyped as f } from "../../typed-intl/index.js";
|
|
22
|
+
import { poolTableTestIds as z } from "../../../test-ids/pool-table.js";
|
|
23
|
+
import "@gearbox-protocol/static";
|
|
24
|
+
import "../../base-link/base-link.js";
|
|
25
|
+
import "../../client-adapters/styled-rounded-image/styled-rounded-image.js";
|
|
26
|
+
import "../../tooltip/simple-tooltip.js";
|
|
27
|
+
import "@gearbox-protocol/sdk/common-utils";
|
|
28
|
+
import "../../table/grid-table.js";
|
|
29
|
+
import "../../typography/typography.js";
|
|
30
|
+
import "@fortawesome/free-solid-svg-icons";
|
|
31
|
+
import "../../icons/fa-icon.js";
|
|
32
|
+
import "../../help-tip/help-tip.js";
|
|
22
33
|
import "../../tooltip/tooltip.js";
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
34
|
+
import "../../card-grid/card-grid.js";
|
|
35
|
+
import "../../checkbox/checkbox-labeled.js";
|
|
36
|
+
import "../../confirm-menu/confirm-menu.js";
|
|
37
|
+
import "../../dialog/dialog-modal-container.js";
|
|
38
|
+
import "../../text-button/text-button.js";
|
|
39
|
+
import "../../accordion/accordion.js";
|
|
40
|
+
import "../../alert-badge/alert-badge.js";
|
|
41
|
+
import "../../alert-dialog/alert-dialog.js";
|
|
42
|
+
import "../../alert-modal/alert-modal.js";
|
|
43
|
+
import "../../arc-loader/arc-loader.js";
|
|
44
|
+
import "../../asset-line/asset-line.js";
|
|
45
|
+
import "wagmi";
|
|
46
|
+
import "../../auth/wallet-ui-context.js";
|
|
47
|
+
import "../../buttons/back-button/back-button.js";
|
|
48
|
+
import "../../buttons/button/button.js";
|
|
49
|
+
import "../../buttons/copy-button/copy-button.js";
|
|
50
|
+
import "../../buttons/external-button/external-button.js";
|
|
51
|
+
import "../../buttons/filter-button/filter-button.js";
|
|
52
|
+
import "../../buttons/navigation-button/navigation-button.js";
|
|
53
|
+
import "../../buttons/tab-button/tab-button.js";
|
|
54
|
+
import "../../avatar/avatar.js";
|
|
55
|
+
import "../../badge/badge.js";
|
|
56
|
+
import "../../navigation-context/navigation-context.js";
|
|
57
|
+
import "../../button-checkbox/button-checkbox.js";
|
|
58
|
+
import "../../cards/card/card.js";
|
|
59
|
+
import "../../carousel/carousel.js";
|
|
60
|
+
import "../../checkbox/checkbox.js";
|
|
61
|
+
import "../../checkbox-item/checkbox-item.js";
|
|
62
|
+
import "../../client-adapters/styled-button/styled-button.js";
|
|
63
|
+
import "../../client-adapters/styled-dialog-container/styled-dialog-container.js";
|
|
64
|
+
import "../../colored-text/colored-text.js";
|
|
65
|
+
import "../../input/input.js";
|
|
66
|
+
import "../../with-title/with-title.js";
|
|
67
|
+
import "../../smart-number-input/balance-indicator.js";
|
|
68
|
+
import "../../smart-number-input/smart-number-input.js";
|
|
69
|
+
import "../../currency-button/currency-button.js";
|
|
70
|
+
import "../../detailed-apy/detailed-apy.js";
|
|
71
|
+
import "../../detailed-page-title/detailed-page-title.js";
|
|
72
|
+
import "../../detailed-page-title/detailed-page-title-copy-button.js";
|
|
73
|
+
import "../../detailed-page-title/detailed-page-title-explorer-dropdown.js";
|
|
74
|
+
import "../../modal/modal.js";
|
|
75
|
+
import "@radix-ui/react-dialog";
|
|
76
|
+
import "../../dialog/dialog-container.js";
|
|
77
|
+
import "../../dialog/dialog-content.js";
|
|
78
|
+
import "../../dialog/dialog-description.js";
|
|
79
|
+
import "../../dialog/dialog-footer.js";
|
|
80
|
+
import "../../dialog/dialog-header.js";
|
|
81
|
+
import "../../dialog/dialog-title.js";
|
|
82
|
+
import "../../dialog/dialog-overlay.js";
|
|
83
|
+
import "viem";
|
|
84
|
+
import "../../label/label.js";
|
|
85
|
+
import "../../dropdown-menu/dropdown-menu.js";
|
|
86
|
+
import "../../dropdown-menu/dropdown-menu-checkbox-item.js";
|
|
87
|
+
import "../../dropdown-menu/dropdown-menu-content.js";
|
|
88
|
+
import "../../dropdown-menu/dropdown-menu-item.js";
|
|
89
|
+
import "../../dropdown-menu/dropdown-menu-label.js";
|
|
90
|
+
import "../../dropdown-menu/dropdown-menu-radio-item.js";
|
|
91
|
+
import "../../dropdown-menu/dropdown-menu-separator.js";
|
|
92
|
+
import "../../dropdown-menu/dropdown-menu-shortcut.js";
|
|
93
|
+
import "../../dropdown-menu/dropdown-menu-sub-content.js";
|
|
94
|
+
import "../../dropdown-menu/dropdown-menu-sub-trigger.js";
|
|
95
|
+
import "../../edit-input/edit-input.js";
|
|
96
|
+
import "react-intl";
|
|
97
|
+
import "../../fadeout-loading/fadeout-loading.js";
|
|
98
|
+
import "../../filter/filter-block.js";
|
|
99
|
+
import "../../filter/filter-checkbox-item.js";
|
|
100
|
+
import "../../filter/filter-chip.js";
|
|
101
|
+
import "../../filter/filter-chips.js";
|
|
102
|
+
import "../../filter/filter-dropdown-item.js";
|
|
103
|
+
import "../../filter/filter-group.js";
|
|
104
|
+
import "../../filter/filter-label.js";
|
|
105
|
+
import "../../search-line/search-line.js";
|
|
106
|
+
import "../../tabs/tabs.js";
|
|
107
|
+
import "../../filter/filter-modal-item.js";
|
|
108
|
+
import "../../filter/filter-radio-item.js";
|
|
109
|
+
import "../../filter/filter-separator.js";
|
|
110
|
+
import "../../filter/variants.js";
|
|
111
|
+
import "../../graph/formatters.js";
|
|
112
|
+
import "lightweight-charts";
|
|
113
|
+
import "../../graph/graph-view.js";
|
|
114
|
+
import "../../health-factor/health-factor.js";
|
|
115
|
+
import "../../horizontal-indicator/horizontal-indicator.js";
|
|
116
|
+
import "../../icon-button/icon-button.js";
|
|
117
|
+
import "../../layout/col/col.js";
|
|
118
|
+
import "../../layout/container/container.js";
|
|
119
|
+
import "../../layout/footer/footer.js";
|
|
120
|
+
import "../../layout/grid/grid.js";
|
|
121
|
+
import "../../layout/header/header.js";
|
|
122
|
+
import "../../layout/layout/layout.js";
|
|
123
|
+
import "../../layout/main-aside-layout/main-aside-layout.js";
|
|
124
|
+
import "../../page-title/page-title.js";
|
|
125
|
+
import "../../layout/social-icons/social-icons.js";
|
|
126
|
+
import "../../link/link.js";
|
|
127
|
+
import "../../../utils/reactochart-compat.js";
|
|
128
|
+
import "../../status-elements/status-elements.js";
|
|
129
|
+
import "../../loader/loader.js";
|
|
130
|
+
import "../../loading/loading.js";
|
|
131
|
+
import "../../loading-bar/loading-bar.js";
|
|
132
|
+
import "react-markdown";
|
|
133
|
+
import "remark-gfm";
|
|
134
|
+
import "../../navbar/navbar.js";
|
|
135
|
+
import "../../navbar/navbar-indicator-context.js";
|
|
136
|
+
import "../../app-bar/app-bar.js";
|
|
137
|
+
import "../../navitem/navitem.js";
|
|
138
|
+
import "../../simple-dropdown/simple-dropdown.js";
|
|
139
|
+
import "../../points-icon/points-icon.js";
|
|
140
|
+
import "../../progress/progress.js";
|
|
141
|
+
import "../../progress-bar/progress-bar.js";
|
|
142
|
+
import "../../radio-group/radio-group.js";
|
|
143
|
+
import "../../rounded-image/rounded-image.js";
|
|
144
|
+
import "../../search-bar/search-bar.js";
|
|
145
|
+
import "../../segmented-control/segmented-control.js";
|
|
146
|
+
import "../../select/select.js";
|
|
147
|
+
import "../../separate-line/separate-line.js";
|
|
148
|
+
import "../../separator/separator.js";
|
|
149
|
+
import "../../simple-accordion/simple-accordion.js";
|
|
150
|
+
import "../../simple-dropdown/simple-dropdown-menu-item.js";
|
|
151
|
+
import "../../slider/slider.js";
|
|
152
|
+
import "../../slider/slider-context.js";
|
|
153
|
+
import "@radix-ui/react-slider";
|
|
154
|
+
import "../../spinner/spinner.js";
|
|
155
|
+
import "../../spinner-loader/spinner-loader.js";
|
|
156
|
+
import "../../split-list/split-list.js";
|
|
157
|
+
import "../../stat-badge/stat-badge.js";
|
|
158
|
+
import "../../status-dot/status-dot.js";
|
|
159
|
+
import "../../stepper/stepper.js";
|
|
160
|
+
import "../../switch/switch.js";
|
|
161
|
+
import "../../token-icon/token-icon.js";
|
|
162
|
+
import "../../table/table.js";
|
|
163
|
+
import "../../table/grid-table-loader.js";
|
|
164
|
+
import "../../textarea/textarea.js";
|
|
165
|
+
import "../../theme-provider.js";
|
|
166
|
+
import "../../time-to-liquidation/time-to-liquidation.js";
|
|
167
|
+
import "../../tip-card/tip-card.js";
|
|
168
|
+
import "../../toggle/toggle.js";
|
|
169
|
+
import "../../vertical-indicator/vertical-indicator.js";
|
|
170
|
+
import "../../vertical-list/vertical-list.js";
|
|
171
|
+
import "../../with-filter-button/with-filter-button.js";
|
|
172
|
+
import { RWAFeature as B } from "../strategies-table/components/cells/cells.js";
|
|
173
|
+
import "../strategies-table/components/feature/feature.styles.js";
|
|
174
|
+
import "../strategies-table/components/rewards-tooltip/rewards-tooltip-root.js";
|
|
175
|
+
function p(o, t, i) {
|
|
176
|
+
const e = o?.header ?? /* @__PURE__ */ r(
|
|
177
|
+
f,
|
|
28
178
|
{
|
|
29
|
-
messageId:
|
|
179
|
+
messageId: o?.headerMessageId ?? t
|
|
30
180
|
}
|
|
31
181
|
);
|
|
32
|
-
let
|
|
33
|
-
if (
|
|
34
|
-
const
|
|
35
|
-
|
|
182
|
+
let l;
|
|
183
|
+
if (o?.headerTip !== null) {
|
|
184
|
+
const m = o?.headerTipMessageId ?? i;
|
|
185
|
+
l = o?.headerTip ?? (m && /* @__PURE__ */ r(f, { messageId: m }));
|
|
36
186
|
}
|
|
37
|
-
return { header:
|
|
187
|
+
return { header: e, headerTip: l, mobileTitle: o?.mobileTitle ?? e };
|
|
38
188
|
}
|
|
39
|
-
function
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}) {
|
|
43
|
-
const { pool: o, underlyingToken: t, points: r, apy: n, isMobile: a } = e, s = a ? 20 : 24, c = /* @__PURE__ */ i(S, { token: t, size: s }), h = o.poolType === "rwa", u = r && r.length > 0 && n ? /* @__PURE__ */ i(
|
|
189
|
+
function S({ ctx: o }) {
|
|
190
|
+
const { pool: t, underlyingToken: i, points: e, apy: l, isMobile: m } = o, n = m ? 20 : 24, a = /* @__PURE__ */ r(Y, { token: i, size: n });
|
|
191
|
+
return e && e.length > 0 && l ? /* @__PURE__ */ r(
|
|
44
192
|
P,
|
|
45
193
|
{
|
|
46
|
-
totalAPY:
|
|
47
|
-
baseAPY:
|
|
48
|
-
extraAPY:
|
|
49
|
-
points:
|
|
50
|
-
tokensList:
|
|
51
|
-
children: /* @__PURE__ */
|
|
194
|
+
totalAPY: l.totalAPY,
|
|
195
|
+
baseAPY: l.baseAPY,
|
|
196
|
+
extraAPY: l.extraAPY,
|
|
197
|
+
points: e,
|
|
198
|
+
tokensList: o.tokensList,
|
|
199
|
+
children: /* @__PURE__ */ r("div", { children: /* @__PURE__ */ r(v, { size: n, children: a }) })
|
|
52
200
|
}
|
|
53
|
-
) :
|
|
54
|
-
return h ? /* @__PURE__ */ i(
|
|
55
|
-
B,
|
|
56
|
-
{
|
|
57
|
-
placement: "top",
|
|
58
|
-
useTitleAsTrigger: !0,
|
|
59
|
-
title: /* @__PURE__ */ i(
|
|
60
|
-
"div",
|
|
61
|
-
{
|
|
62
|
-
className: Y(
|
|
63
|
-
"relative inline-flex rounded-full p-1",
|
|
64
|
-
I
|
|
65
|
-
),
|
|
66
|
-
children: /* @__PURE__ */ i("div", { className: "relative z-10", children: u })
|
|
67
|
-
}
|
|
68
|
-
),
|
|
69
|
-
children: l ?? "RWA market"
|
|
70
|
-
}
|
|
71
|
-
) : u;
|
|
201
|
+
) : t.hasPoints ? /* @__PURE__ */ r(D, { size: n, children: a }) : a;
|
|
72
202
|
}
|
|
73
|
-
function F(
|
|
74
|
-
const
|
|
75
|
-
return
|
|
203
|
+
function F(o) {
|
|
204
|
+
const t = o.underlyingToken?.title ?? o.underlyingToken?.symbol ?? "", i = o.pool.version;
|
|
205
|
+
return i && i >= 300 && i < 310 ? `${t} v${Math.floor(i / 100)}` : t;
|
|
76
206
|
}
|
|
77
|
-
function
|
|
78
|
-
ctx:
|
|
79
|
-
renderDescription:
|
|
80
|
-
getPoolName:
|
|
81
|
-
rwaTooltip: t
|
|
207
|
+
function M({
|
|
208
|
+
ctx: o,
|
|
209
|
+
renderDescription: t,
|
|
210
|
+
getPoolName: i
|
|
82
211
|
}) {
|
|
83
|
-
const { pool:
|
|
84
|
-
return /* @__PURE__ */
|
|
85
|
-
|
|
86
|
-
/* @__PURE__ */
|
|
87
|
-
|
|
88
|
-
|
|
212
|
+
const { pool: e } = o, l = i ? i(o) : F(o), m = e.poolType === "rwa";
|
|
213
|
+
return /* @__PURE__ */ d("div", { className: "grid grid-cols-[auto_1fr] gap-x-3", children: [
|
|
214
|
+
m && /* @__PURE__ */ r("span", { className: "hidden", "data-rwa-pool-marker": "true" }),
|
|
215
|
+
/* @__PURE__ */ d("div", { className: "flex items-center gap-3 shrink-0 leading-0", children: [
|
|
216
|
+
e.network && /* @__PURE__ */ r(
|
|
217
|
+
x,
|
|
89
218
|
{
|
|
90
|
-
network:
|
|
219
|
+
network: e.network,
|
|
91
220
|
isTest: !1,
|
|
92
221
|
size: 14,
|
|
93
222
|
showTooltip: !0
|
|
94
223
|
}
|
|
95
224
|
),
|
|
96
|
-
/* @__PURE__ */
|
|
225
|
+
/* @__PURE__ */ r(S, { ctx: o })
|
|
97
226
|
] }),
|
|
98
|
-
/* @__PURE__ */
|
|
99
|
-
/* @__PURE__ */
|
|
100
|
-
|
|
227
|
+
/* @__PURE__ */ d("div", { className: "flex items-center gap-x-2", children: [
|
|
228
|
+
/* @__PURE__ */ d("div", { className: "flex md:flex-col min-w-0 overflow-hidden items-center md:items-start gap-2 md:gap-0", children: [
|
|
229
|
+
/* @__PURE__ */ r("span", { className: "truncate max-w-full", children: l }),
|
|
230
|
+
t && /* @__PURE__ */ r(c, { className: "min-w-0 text-xs", children: t(o) })
|
|
231
|
+
] }),
|
|
232
|
+
m && /* @__PURE__ */ r(
|
|
233
|
+
B,
|
|
234
|
+
{
|
|
235
|
+
disabledStyle: !1,
|
|
236
|
+
tooltip: /* @__PURE__ */ r(f, { messageId: "components.poolTable.line.rwa.tip" })
|
|
237
|
+
}
|
|
238
|
+
)
|
|
101
239
|
] })
|
|
102
240
|
] });
|
|
103
241
|
}
|
|
104
|
-
function
|
|
105
|
-
const { pool:
|
|
106
|
-
return /* @__PURE__ */
|
|
107
|
-
/* @__PURE__ */
|
|
108
|
-
/* @__PURE__ */
|
|
109
|
-
|
|
110
|
-
|
|
242
|
+
function L({ ctx: o }) {
|
|
243
|
+
const { pool: t, underlyingToken: i, loading: e } = o;
|
|
244
|
+
return /* @__PURE__ */ d("div", { className: "flex flex-col items-start md:items-end", children: [
|
|
245
|
+
/* @__PURE__ */ r(u, { loading: !!e, width: 60, children: h(t.expectedLiquidityInUSD ?? 0) }),
|
|
246
|
+
/* @__PURE__ */ r(c, { children: g(
|
|
247
|
+
t.expectedLiquidity,
|
|
248
|
+
i
|
|
111
249
|
) })
|
|
112
250
|
] });
|
|
113
251
|
}
|
|
114
|
-
function
|
|
115
|
-
const { pool:
|
|
116
|
-
return /* @__PURE__ */
|
|
117
|
-
/* @__PURE__ */
|
|
118
|
-
/* @__PURE__ */
|
|
119
|
-
|
|
120
|
-
|
|
252
|
+
function j({ ctx: o }) {
|
|
253
|
+
const { pool: t, underlyingToken: i, loading: e } = o;
|
|
254
|
+
return /* @__PURE__ */ d("div", { className: "flex flex-col items-start md:items-end", children: [
|
|
255
|
+
/* @__PURE__ */ r(u, { loading: !!e, width: 60, children: h(t.totalBorrowedInUSD ?? 0) }),
|
|
256
|
+
/* @__PURE__ */ r(c, { children: g(
|
|
257
|
+
t.totalBorrowed,
|
|
258
|
+
i
|
|
121
259
|
) })
|
|
122
260
|
] });
|
|
123
261
|
}
|
|
124
|
-
function
|
|
125
|
-
const { pool:
|
|
126
|
-
title:
|
|
127
|
-
decimals:
|
|
128
|
-
} :
|
|
129
|
-
return /* @__PURE__ */
|
|
262
|
+
function O({ ctx: o }) {
|
|
263
|
+
const { pool: t, loading: i, underlyingToken: e } = o, l = e?.decimals ?? 18, m = t.poolTokenSymbol != null ? {
|
|
264
|
+
title: t.poolTokenSymbol,
|
|
265
|
+
decimals: l
|
|
266
|
+
} : e;
|
|
267
|
+
return /* @__PURE__ */ d(
|
|
130
268
|
"div",
|
|
131
269
|
{
|
|
132
270
|
className: "flex flex-col items-start md:items-end",
|
|
133
|
-
"data-testid":
|
|
271
|
+
"data-testid": z.poolLineCellBalance,
|
|
134
272
|
children: [
|
|
135
|
-
/* @__PURE__ */
|
|
136
|
-
|
|
273
|
+
/* @__PURE__ */ r(u, { loading: !!i, width: 60, children: h(t.userBalanceInUSD ?? 0) }),
|
|
274
|
+
t.userBalance !== void 0 && m && /* @__PURE__ */ r(c, { children: g(t.userBalance, m) })
|
|
137
275
|
]
|
|
138
276
|
}
|
|
139
277
|
);
|
|
140
278
|
}
|
|
141
|
-
function
|
|
142
|
-
const
|
|
143
|
-
return !
|
|
144
|
-
|
|
279
|
+
function R(o, t, i) {
|
|
280
|
+
const e = o.pool.collateralTokens, { tokensList: l, isMobile: m } = o, { mode: n = "cascade", ...a } = i ?? {};
|
|
281
|
+
return !e?.length || !l ? null : /* @__PURE__ */ r(
|
|
282
|
+
A,
|
|
145
283
|
{
|
|
146
|
-
maxAssets:
|
|
147
|
-
tokensList:
|
|
148
|
-
balances:
|
|
149
|
-
iconSize:
|
|
150
|
-
options: { mode:
|
|
284
|
+
maxAssets: t,
|
|
285
|
+
tokensList: l,
|
|
286
|
+
balances: e.map((s) => ({ token: s })),
|
|
287
|
+
iconSize: m ? 20 : 24,
|
|
288
|
+
options: { mode: n, ...a }
|
|
151
289
|
}
|
|
152
290
|
);
|
|
153
291
|
}
|
|
154
|
-
function
|
|
155
|
-
const { header:
|
|
156
|
-
|
|
292
|
+
function Zi(o) {
|
|
293
|
+
const { header: t, mobileTitle: i } = p(
|
|
294
|
+
o,
|
|
157
295
|
"components.poolTable.pool"
|
|
158
296
|
);
|
|
159
297
|
return {
|
|
160
298
|
id: "pool",
|
|
161
|
-
header:
|
|
162
|
-
width:
|
|
299
|
+
header: t,
|
|
300
|
+
width: o?.width ?? "234px",
|
|
163
301
|
align: "left",
|
|
164
302
|
className: "pl-4",
|
|
165
|
-
cell: (
|
|
166
|
-
|
|
303
|
+
cell: (e) => /* @__PURE__ */ r(
|
|
304
|
+
M,
|
|
167
305
|
{
|
|
168
|
-
ctx:
|
|
169
|
-
renderDescription:
|
|
170
|
-
getPoolName:
|
|
171
|
-
rwaTooltip: e?.rwaTooltip
|
|
306
|
+
ctx: e,
|
|
307
|
+
renderDescription: o?.renderDescription,
|
|
308
|
+
getPoolName: o?.getPoolName
|
|
172
309
|
}
|
|
173
310
|
),
|
|
174
|
-
mobileTitle:
|
|
311
|
+
mobileTitle: i
|
|
175
312
|
};
|
|
176
313
|
}
|
|
177
|
-
function
|
|
178
|
-
const { header:
|
|
179
|
-
|
|
314
|
+
function oe(o) {
|
|
315
|
+
const { header: t, mobileTitle: i } = p(
|
|
316
|
+
o,
|
|
180
317
|
"components.poolTable.supply"
|
|
181
318
|
);
|
|
182
319
|
return {
|
|
183
320
|
id: "supply",
|
|
184
|
-
header:
|
|
185
|
-
width:
|
|
321
|
+
header: t,
|
|
322
|
+
width: o?.width ?? "1fr",
|
|
186
323
|
align: "right",
|
|
187
|
-
hideOnMedium:
|
|
188
|
-
sort:
|
|
189
|
-
cell: (
|
|
190
|
-
mobileTitle:
|
|
324
|
+
hideOnMedium: o?.hideOnMedium,
|
|
325
|
+
sort: o?.sortField !== void 0 ? { field: o.sortField, defaultDirection: "desc" } : { field: "supply", defaultDirection: "desc" },
|
|
326
|
+
cell: (e) => /* @__PURE__ */ r(L, { ctx: e }),
|
|
327
|
+
mobileTitle: i
|
|
191
328
|
};
|
|
192
329
|
}
|
|
193
|
-
function
|
|
194
|
-
const { header:
|
|
195
|
-
|
|
330
|
+
function te(o) {
|
|
331
|
+
const { header: t, headerTip: i, mobileTitle: e } = p(
|
|
332
|
+
o,
|
|
196
333
|
"components.poolTable.supplyApy",
|
|
197
334
|
"components.poolTable.supplyApy.tip"
|
|
198
335
|
);
|
|
199
336
|
return {
|
|
200
337
|
id: "supplyApy",
|
|
201
|
-
header:
|
|
202
|
-
headerTip:
|
|
203
|
-
width:
|
|
338
|
+
header: t,
|
|
339
|
+
headerTip: i,
|
|
340
|
+
width: o?.width ?? "1.25fr",
|
|
204
341
|
align: "right",
|
|
205
|
-
sort:
|
|
206
|
-
cell: (
|
|
207
|
-
const { apy:
|
|
208
|
-
totalAPY:
|
|
209
|
-
baseAPY:
|
|
210
|
-
extraAPY:
|
|
342
|
+
sort: o?.sortField !== void 0 ? { field: o.sortField, defaultDirection: "desc" } : { field: "apy", defaultDirection: "desc" },
|
|
343
|
+
cell: (l) => {
|
|
344
|
+
const { apy: m, loading: n, points: a, tokensList: s } = l, {
|
|
345
|
+
totalAPY: T = 0,
|
|
346
|
+
baseAPY: b = [],
|
|
347
|
+
extraAPY: w = [],
|
|
211
348
|
externalAPY: y,
|
|
212
|
-
apy7DAgo:
|
|
213
|
-
} =
|
|
214
|
-
return /* @__PURE__ */
|
|
349
|
+
apy7DAgo: k
|
|
350
|
+
} = m ?? {};
|
|
351
|
+
return /* @__PURE__ */ r(u, { width: 60, loading: !!n, children: /* @__PURE__ */ r(
|
|
215
352
|
C,
|
|
216
353
|
{
|
|
217
|
-
totalAPY:
|
|
218
|
-
totalAPYLoading: !!
|
|
219
|
-
baseAPY:
|
|
220
|
-
extraAPY:
|
|
221
|
-
points:
|
|
222
|
-
apy7DAgo:
|
|
223
|
-
tokensList:
|
|
354
|
+
totalAPY: T,
|
|
355
|
+
totalAPYLoading: !!n,
|
|
356
|
+
baseAPY: b,
|
|
357
|
+
extraAPY: w,
|
|
358
|
+
points: a,
|
|
359
|
+
apy7DAgo: k,
|
|
360
|
+
tokensList: s,
|
|
224
361
|
externalAPY: y
|
|
225
362
|
}
|
|
226
363
|
) });
|
|
227
364
|
},
|
|
228
|
-
mobileTitle:
|
|
365
|
+
mobileTitle: e
|
|
229
366
|
};
|
|
230
367
|
}
|
|
231
|
-
function
|
|
232
|
-
const { header:
|
|
233
|
-
|
|
368
|
+
function ie(o) {
|
|
369
|
+
const { header: t, mobileTitle: i } = p(
|
|
370
|
+
o,
|
|
234
371
|
"components.poolTable.borrowed"
|
|
235
372
|
);
|
|
236
373
|
return {
|
|
237
374
|
id: "borrowed",
|
|
238
|
-
header:
|
|
239
|
-
width:
|
|
375
|
+
header: t,
|
|
376
|
+
width: o?.width ?? "1.15fr",
|
|
240
377
|
align: "right",
|
|
241
|
-
cell: (
|
|
242
|
-
mobileTitle:
|
|
378
|
+
cell: (e) => /* @__PURE__ */ r(j, { ctx: e }),
|
|
379
|
+
mobileTitle: i
|
|
243
380
|
};
|
|
244
381
|
}
|
|
245
|
-
function
|
|
246
|
-
const { header:
|
|
247
|
-
|
|
382
|
+
function ee(o) {
|
|
383
|
+
const { header: t, headerTip: i, mobileTitle: e } = p(
|
|
384
|
+
o,
|
|
248
385
|
"components.poolTable.borrowApy"
|
|
249
386
|
);
|
|
250
387
|
return {
|
|
251
388
|
id: "borrowApy",
|
|
252
|
-
header:
|
|
253
|
-
headerTip:
|
|
254
|
-
width:
|
|
389
|
+
header: t,
|
|
390
|
+
headerTip: i,
|
|
391
|
+
width: o?.width ?? "150px",
|
|
255
392
|
align: "right",
|
|
256
|
-
cell: (
|
|
257
|
-
const
|
|
258
|
-
return /* @__PURE__ */
|
|
393
|
+
cell: (l) => {
|
|
394
|
+
const m = l.pool.borrowAPY ?? o?.getBorrowRate?.(l.pool) ?? 0;
|
|
395
|
+
return /* @__PURE__ */ r("div", { className: "flex justify-start md:justify-end", children: I(m) });
|
|
259
396
|
},
|
|
260
|
-
mobileTitle:
|
|
397
|
+
mobileTitle: e
|
|
261
398
|
};
|
|
262
399
|
}
|
|
263
|
-
function
|
|
264
|
-
const { header:
|
|
265
|
-
|
|
400
|
+
function re(o) {
|
|
401
|
+
const { header: t, mobileTitle: i } = p(
|
|
402
|
+
o,
|
|
266
403
|
"components.poolTable.utilization"
|
|
267
404
|
);
|
|
268
405
|
return {
|
|
269
406
|
id: "utilization",
|
|
270
|
-
header:
|
|
271
|
-
width:
|
|
407
|
+
header: t,
|
|
408
|
+
width: o?.width ?? "150px",
|
|
272
409
|
align: "right",
|
|
273
410
|
className: "pr-4",
|
|
274
|
-
sort:
|
|
275
|
-
cell: (
|
|
276
|
-
const
|
|
277
|
-
return /* @__PURE__ */
|
|
411
|
+
sort: o?.sortField !== void 0 ? { field: o.sortField, defaultDirection: "desc" } : { field: "utilization", defaultDirection: "desc" },
|
|
412
|
+
cell: (e) => {
|
|
413
|
+
const l = e.pool.utilization ?? 0;
|
|
414
|
+
return /* @__PURE__ */ r("div", { className: "flex justify-start md:justify-end", children: /* @__PURE__ */ r(N, { percent: l }) });
|
|
278
415
|
},
|
|
279
|
-
mobileTitle:
|
|
416
|
+
mobileTitle: i
|
|
280
417
|
};
|
|
281
418
|
}
|
|
282
|
-
function
|
|
283
|
-
const
|
|
284
|
-
|
|
419
|
+
function le(o) {
|
|
420
|
+
const t = o?.maxAssets ?? 5, i = (m) => R(m, t, o?.options), { header: e, mobileTitle: l } = p(
|
|
421
|
+
o,
|
|
285
422
|
"components.poolTable.collateral"
|
|
286
423
|
);
|
|
287
424
|
return {
|
|
288
425
|
id: "collateral",
|
|
289
|
-
header:
|
|
290
|
-
width:
|
|
291
|
-
align:
|
|
292
|
-
gapBefore:
|
|
293
|
-
cell:
|
|
294
|
-
mobileCell:
|
|
295
|
-
mobileTitle:
|
|
426
|
+
header: e,
|
|
427
|
+
width: o?.width ?? "148px",
|
|
428
|
+
align: o?.align ?? "left",
|
|
429
|
+
gapBefore: o?.gapBefore ?? "md",
|
|
430
|
+
cell: o?.cell ?? i,
|
|
431
|
+
mobileCell: o?.mobileCell ?? o?.cell ?? i,
|
|
432
|
+
mobileTitle: l
|
|
296
433
|
};
|
|
297
434
|
}
|
|
298
|
-
function
|
|
299
|
-
const { header:
|
|
300
|
-
|
|
435
|
+
function me(o) {
|
|
436
|
+
const { header: t, mobileTitle: i } = p(
|
|
437
|
+
o,
|
|
301
438
|
"components.poolTable.balance"
|
|
302
439
|
);
|
|
303
440
|
return {
|
|
304
441
|
id: "balance",
|
|
305
|
-
header:
|
|
306
|
-
width:
|
|
442
|
+
header: t,
|
|
443
|
+
width: o?.width ?? "1.15fr",
|
|
307
444
|
align: "right",
|
|
308
|
-
className:
|
|
309
|
-
headerClassName:
|
|
310
|
-
sort:
|
|
311
|
-
cell:
|
|
312
|
-
mobileTitle:
|
|
445
|
+
className: o?.className ?? "pr-4",
|
|
446
|
+
headerClassName: o?.headerClassName ?? "pr-4",
|
|
447
|
+
sort: o?.sortField !== void 0 ? { field: o.sortField, defaultDirection: "desc" } : { field: "balance", defaultDirection: "desc" },
|
|
448
|
+
cell: o?.cell ?? ((e) => /* @__PURE__ */ r(O, { ctx: e })),
|
|
449
|
+
mobileTitle: i
|
|
313
450
|
};
|
|
314
451
|
}
|
|
315
|
-
function
|
|
316
|
-
return
|
|
452
|
+
function ne(o) {
|
|
453
|
+
return o;
|
|
317
454
|
}
|
|
318
455
|
export {
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
456
|
+
me as balanceColumn,
|
|
457
|
+
ee as borrowApyColumn,
|
|
458
|
+
ie as borrowedColumn,
|
|
459
|
+
le as collateralColumn,
|
|
460
|
+
ne as customColumn,
|
|
324
461
|
F as defaultPoolName,
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
462
|
+
Zi as poolColumn,
|
|
463
|
+
te as supplyApyColumn,
|
|
464
|
+
oe as supplyColumn,
|
|
465
|
+
re as utilizationColumn
|
|
329
466
|
};
|