@gearbox-protocol/ui-kit 4.0.0-next.3 → 4.0.0-next.5
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/assets-list-cell/assets-list-cell.cjs +1 -1
- package/dist/cjs/components/badge/badge.cjs +1 -1
- package/dist/cjs/components/badge/chip.cjs +1 -0
- package/dist/cjs/components/badge/index.cjs +1 -1
- package/dist/cjs/components/base/borrow-rate-block/borrow-rate-block.cjs +1 -1
- package/dist/cjs/components/base/chart-with-side-card/chart-with-side-card.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/history-chart/history-chart.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/leverage-preset-chips/constants.cjs +1 -0
- package/dist/cjs/components/base/leverage-preset-chips/index.cjs +1 -0
- package/dist/cjs/components/base/leverage-preset-chips/leverage-preset-chips.cjs +1 -0
- 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/pool-apy-breakdown-card/pool-apy-breakdown-card.cjs +1 -1
- package/dist/cjs/components/base/stat-badge/stat-badge.cjs +1 -1
- package/dist/cjs/components/base/strategy-apy-breakdown-card/constants.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/title-meta/constants.cjs +1 -1
- package/dist/cjs/components/base/title-meta/title-meta.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/position-status-badge.cjs +1 -0
- package/dist/cjs/components/base/values/position-type-badge.cjs +1 -1
- package/dist/cjs/components/base/values/scalars.cjs +1 -1
- package/dist/cjs/components/base-table/base-table-line.cjs +1 -0
- package/dist/cjs/components/base-table/base-table.cjs +1 -0
- package/dist/cjs/components/base-table/constants.cjs +1 -0
- package/dist/cjs/components/base-table/index.cjs +1 -0
- package/dist/cjs/components/base-table/types.cjs +1 -0
- 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/collateral-allocation-tooltip/allocation-wheel.cjs +1 -0
- package/dist/cjs/components/collateral-allocation-tooltip/collateral-allocation-tooltip.cjs +1 -0
- package/dist/cjs/components/collateral-allocation-tooltip/constants.cjs +1 -0
- package/dist/cjs/components/collateral-allocation-tooltip/index.cjs +1 -0
- package/dist/cjs/components/composites/index.cjs +1 -1
- package/dist/cjs/components/composites/pool-assets-table/constants.cjs +1 -0
- package/dist/cjs/components/composites/pool-assets-table/index.cjs +1 -1
- package/dist/cjs/components/composites/pool-assets-table/pool-assets-table-head.cjs +1 -1
- package/dist/cjs/components/composites/pool-assets-table/pool-assets-table-row.cjs +1 -1
- package/dist/cjs/components/composites/pool-assets-table/pool-assets-table.cjs +1 -1
- package/dist/cjs/components/composites/tx-preview/confirm/dialog/TransactionConfirmModalView.cjs +1 -1
- package/dist/cjs/components/compound-apy/compound-apy.cjs +1 -1
- package/dist/cjs/components/filter/filter-chip.cjs +1 -1
- package/dist/cjs/components/graph/default-config.cjs +1 -1
- package/dist/cjs/components/graph/graph-view.cjs +1 -1
- package/dist/cjs/components/graph/graph.cjs +1 -1
- package/dist/cjs/components/hf-indicator/hf-indicator.cjs +1 -0
- package/dist/cjs/components/hf-indicator/index.cjs +1 -0
- package/dist/cjs/components/index.cjs +1 -1
- package/dist/cjs/components/infinite-scroll/index.cjs +1 -0
- package/dist/cjs/components/infinite-scroll/infinite-scroll-wrapper.cjs +1 -0
- package/dist/cjs/components/name-cell/index.cjs +1 -0
- package/dist/cjs/components/name-cell/name-cell.cjs +1 -0
- package/dist/cjs/components/network-icon/index.cjs +1 -1
- package/dist/cjs/components/network-icon/network-indicator.cjs +1 -0
- package/dist/cjs/components/trading-view/trading-view.cjs +1 -1
- package/dist/cjs/components/with-copy/with-copy.cjs +1 -1
- package/dist/cjs/components/yield-breakdown-tooltip/yield-breakdown-tooltip.cjs +1 -1
- package/dist/cjs/configs/tailwind-preset.cjs +1 -1
- package/dist/cjs/hooks/index.cjs +1 -1
- package/dist/cjs/hooks/use-observed-width-key.cjs +1 -0
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/locale/en.json.cjs +1 -1
- package/dist/cjs/utils/format-leverage.cjs +1 -0
- package/dist/cjs/utils/format-money.cjs +1 -1
- package/dist/cjs/utils/index.cjs +1 -1
- package/dist/cjs/utils/leverage-presets.cjs +1 -0
- package/dist/esm/components/assets-list-cell/assets-list-cell.js +161 -159
- package/dist/esm/components/badge/badge.js +14 -8
- package/dist/esm/components/badge/chip.js +47 -0
- package/dist/esm/components/badge/index.js +8 -3
- package/dist/esm/components/base/borrow-rate-block/borrow-rate-block.js +4 -2
- package/dist/esm/components/base/chart-with-side-card/chart-with-side-card.js +6 -6
- 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/history-chart/history-chart.js +86 -46
- package/dist/esm/components/base/index.js +148 -138
- package/dist/esm/components/base/info-list/index.js +5 -4
- package/dist/esm/components/base/info-list/info-list.js +51 -27
- package/dist/esm/components/base/leverage-input/leverage-input.js +18 -20
- package/dist/esm/components/base/leverage-preset-chips/constants.js +7 -0
- package/dist/esm/components/base/leverage-preset-chips/index.js +6 -0
- package/dist/esm/components/base/leverage-preset-chips/leverage-preset-chips.js +39 -0
- 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/pool-apy-breakdown-card/pool-apy-breakdown-card.js +23 -30
- package/dist/esm/components/base/stat-badge/stat-badge.js +18 -9
- package/dist/esm/components/base/strategy-apy-breakdown-card/constants.js +3 -2
- package/dist/esm/components/base/strategy-apy-breakdown-card/strategy-apy-breakdown-card.js +194 -31
- package/dist/esm/components/base/time-to-liquidation-block/time-to-liquidation-block.js +31 -31
- package/dist/esm/components/base/title-meta/constants.js +1 -0
- package/dist/esm/components/base/title-meta/title-meta.js +53 -33
- 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 +20 -16
- package/dist/esm/components/base/values/points-value.js +30 -0
- package/dist/esm/components/base/values/position-status-badge.js +26 -0
- package/dist/esm/components/base/values/position-type-badge.js +7 -6
- package/dist/esm/components/base/values/scalars.js +18 -17
- package/dist/esm/components/base-table/base-table-line.js +117 -0
- package/dist/esm/components/base-table/base-table.js +110 -0
- package/dist/esm/components/base-table/constants.js +12 -0
- package/dist/esm/components/base-table/index.js +9 -0
- package/dist/esm/components/base-table/types.js +1 -0
- package/dist/esm/components/block-sync-pill/block-sync-pill.js +24 -20
- package/dist/esm/components/checkbox/checkbox-labeled.js +22 -18
- package/dist/esm/components/client-adapters/styled-rounded-image/styled-rounded-image.js +22 -18
- package/dist/esm/components/collateral-allocation-tooltip/allocation-wheel.js +71 -0
- package/dist/esm/components/collateral-allocation-tooltip/collateral-allocation-tooltip.js +102 -0
- package/dist/esm/components/collateral-allocation-tooltip/constants.js +12 -0
- package/dist/esm/components/collateral-allocation-tooltip/index.js +9 -0
- package/dist/esm/components/composites/index.js +46 -44
- package/dist/esm/components/composites/pool-assets-table/constants.js +9 -0
- package/dist/esm/components/composites/pool-assets-table/index.js +8 -6
- package/dist/esm/components/composites/pool-assets-table/pool-assets-table-head.js +52 -30
- package/dist/esm/components/composites/pool-assets-table/pool-assets-table-row.js +109 -76
- package/dist/esm/components/composites/pool-assets-table/pool-assets-table.js +44 -26
- package/dist/esm/components/composites/tx-preview/confirm/dialog/TransactionConfirmModalView.js +31 -27
- package/dist/esm/components/compound-apy/compound-apy.js +85 -80
- package/dist/esm/components/filter/filter-chip.js +1 -0
- package/dist/esm/components/graph/default-config.js +20 -18
- package/dist/esm/components/graph/graph-view.js +72 -88
- package/dist/esm/components/graph/graph.js +459 -458
- package/dist/esm/components/hf-indicator/hf-indicator.js +33 -0
- package/dist/esm/components/hf-indicator/index.js +4 -0
- package/dist/esm/components/index.js +734 -697
- package/dist/esm/components/infinite-scroll/index.js +4 -0
- package/dist/esm/components/infinite-scroll/infinite-scroll-wrapper.js +30 -0
- package/dist/esm/components/name-cell/index.js +4 -0
- package/dist/esm/components/name-cell/name-cell.js +35 -0
- package/dist/esm/components/network-icon/index.js +4 -2
- package/dist/esm/components/network-icon/network-indicator.js +82 -0
- package/dist/esm/components/trading-view/trading-view.js +193 -155
- package/dist/esm/components/with-copy/with-copy.js +22 -18
- package/dist/esm/components/yield-breakdown-tooltip/yield-breakdown-tooltip.js +112 -169
- package/dist/esm/configs/tailwind-preset.js +13 -1
- package/dist/esm/hooks/index.js +20 -18
- package/dist/esm/hooks/use-observed-width-key.js +24 -0
- package/dist/esm/index.js +888 -841
- package/dist/esm/locale/en.json.js +21 -18
- package/dist/esm/utils/format-leverage.js +6 -0
- package/dist/esm/utils/format-money.js +59 -41
- package/dist/esm/utils/index.js +91 -85
- package/dist/esm/utils/leverage-presets.js +13 -0
- package/dist/globals.css +1 -1
- package/dist/types/components/assets-list-cell/assets-list-cell.d.ts +3 -0
- package/dist/types/components/badge/badge.d.ts +2 -1
- package/dist/types/components/badge/chip.d.ts +22 -0
- package/dist/types/components/badge/index.d.ts +1 -0
- 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/history-chart/history-chart.d.ts +13 -3
- package/dist/types/components/base/index.d.ts +1 -0
- package/dist/types/components/base/info-list/info-list.d.ts +7 -0
- package/dist/types/components/base/leverage-input/leverage-input.d.ts +1 -1
- package/dist/types/components/base/leverage-preset-chips/constants.d.ts +4 -0
- package/dist/types/components/base/leverage-preset-chips/index.d.ts +2 -0
- package/dist/types/components/base/leverage-preset-chips/leverage-preset-chips.d.ts +13 -0
- package/dist/types/components/base/liquidation-params-table/liquidation-params-table.d.ts +2 -2
- 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/pool-apy-breakdown-card/pool-apy-breakdown-card.d.ts +4 -5
- package/dist/types/components/base/strategy-apy-breakdown-card/constants.d.ts +1 -0
- package/dist/types/components/base/strategy-apy-breakdown-card/strategy-apy-breakdown-card.d.ts +12 -4
- package/dist/types/components/base/time-to-liquidation-block/time-to-liquidation-block.d.ts +5 -6
- package/dist/types/components/base/title-meta/constants.d.ts +1 -0
- package/dist/types/components/base/title-meta/title-meta.d.ts +9 -1
- 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 -0
- 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/position-status-badge.d.ts +7 -0
- package/dist/types/components/base/values/position-type-badge.d.ts +1 -1
- package/dist/types/components/base-table/base-table-line.d.ts +21 -0
- package/dist/types/components/base-table/base-table.d.ts +19 -0
- package/dist/types/components/base-table/constants.d.ts +8 -0
- package/dist/types/components/base-table/index.d.ts +3 -0
- package/dist/types/components/base-table/types.d.ts +37 -0
- package/dist/types/components/collateral-allocation-tooltip/allocation-wheel.d.ts +10 -0
- package/dist/types/components/collateral-allocation-tooltip/collateral-allocation-tooltip.d.ts +23 -0
- package/dist/types/components/collateral-allocation-tooltip/constants.d.ts +8 -0
- package/dist/types/components/collateral-allocation-tooltip/index.d.ts +3 -0
- package/dist/types/components/composites/pool-assets-table/constants.d.ts +6 -0
- package/dist/types/components/composites/pool-assets-table/index.d.ts +1 -0
- package/dist/types/components/composites/pool-assets-table/pool-assets-table-head.d.ts +1 -2
- package/dist/types/components/composites/pool-assets-table/pool-assets-table-row.d.ts +8 -8
- package/dist/types/components/composites/pool-assets-table/pool-assets-table.d.ts +7 -20
- package/dist/types/components/composites/pool-assets-table/types.d.ts +4 -12
- package/dist/types/components/graph/graph-view.d.ts +1 -1
- package/dist/types/components/graph/graph.d.ts +4 -0
- package/dist/types/components/hf-indicator/hf-indicator.d.ts +8 -0
- package/dist/types/components/hf-indicator/index.d.ts +1 -0
- package/dist/types/components/index.d.ts +5 -0
- package/dist/types/components/infinite-scroll/index.d.ts +1 -0
- package/dist/types/components/infinite-scroll/infinite-scroll-wrapper.d.ts +11 -0
- package/dist/types/components/name-cell/index.d.ts +1 -0
- package/dist/types/components/name-cell/name-cell.d.ts +13 -0
- package/dist/types/components/network-icon/index.d.ts +1 -0
- package/dist/types/components/network-icon/network-indicator.d.ts +23 -0
- package/dist/types/components/trading-view/trading-view.d.ts +10 -3
- package/dist/types/components/yield-breakdown-tooltip/yield-breakdown-tooltip.d.ts +6 -8
- package/dist/types/configs/tailwind-preset.d.ts +12 -0
- package/dist/types/hooks/index.d.ts +1 -0
- package/dist/types/hooks/use-observed-width-key.d.ts +8 -0
- package/dist/types/index.d.ts +6 -1
- package/dist/types/locale/en.json.d.ts +23 -18
- package/dist/types/utils/format-leverage.d.ts +5 -0
- package/dist/types/utils/format-money.d.ts +11 -5
- package/dist/types/utils/index.d.ts +3 -1
- package/dist/types/utils/leverage-presets.d.ts +7 -0
- package/package.json +1 -1
- package/src/styles/base.css +30 -0
- package/src/styles/theme.css +16 -0
|
@@ -1,115 +1,148 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
1
|
+
import { jsx as e, jsxs as s, Fragment as C } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
3
|
import "@gearbox-protocol/sdk";
|
|
4
4
|
import "clsx";
|
|
5
5
|
import "tailwind-merge";
|
|
6
6
|
import "sonner";
|
|
7
|
+
import { formatMoney as S } from "../../../utils/format-money.js";
|
|
7
8
|
import "@gearbox-protocol/sdk/common-utils";
|
|
8
9
|
import "luxon";
|
|
9
10
|
import "../../../utils/z-index.js";
|
|
10
|
-
import
|
|
11
|
+
import "../../points-icon/points-icon.js";
|
|
12
|
+
import { UtilizationValue as y } from "../../base/values/scalars.js";
|
|
11
13
|
import "../../badge/badge.js";
|
|
12
|
-
import
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
14
|
+
import "../../badge/chip.js";
|
|
15
|
+
import { FormattedMessageTyped as m } from "../../typed-intl/index.js";
|
|
16
|
+
import { AllocationWheel as L } from "../../collateral-allocation-tooltip/allocation-wheel.js";
|
|
17
|
+
import "@fortawesome/free-solid-svg-icons";
|
|
18
|
+
import "../../icons/fa-icon.js";
|
|
19
|
+
import "../../token-icon/token-icon.js";
|
|
20
|
+
import "../../tooltip/simple-tooltip.js";
|
|
21
|
+
import "../../tooltip/tooltip.js";
|
|
22
|
+
import { NameCell as U } from "../../name-cell/name-cell.js";
|
|
23
|
+
import { ShortString as x } from "../../short-string/short-string.js";
|
|
24
|
+
import "react-intl";
|
|
25
|
+
import "../../buttons/button/button.js";
|
|
26
|
+
import { GridTableRow as k, GridTableCell as o } from "../../table/grid-table.js";
|
|
27
|
+
import "../../skeleton/skeleton.js";
|
|
28
|
+
import "../../table/table.js";
|
|
29
|
+
import { TableLineSm as w, TableCellSm as a } from "../../table/table-sm.js";
|
|
30
|
+
import { TokenSymbol as I } from "../../token-symbol/token-symbol.js";
|
|
31
|
+
import { TokenTemplate as b } from "../../token-template/token-template.js";
|
|
32
|
+
import { VerticalIndicator as P } from "../../vertical-indicator/vertical-indicator.js";
|
|
33
|
+
import { PoolAssetsTableTest as n } from "./constants.js";
|
|
34
|
+
function j(i, t) {
|
|
35
|
+
if (t !== 0n)
|
|
36
|
+
return Number(i * 10000n / t);
|
|
37
|
+
}
|
|
38
|
+
function B(i, t) {
|
|
39
|
+
return t <= 0n || i <= 0n ? 0 : Number(i * 10000n / t) / 1e4;
|
|
40
|
+
}
|
|
41
|
+
function he({
|
|
42
|
+
poolName: i,
|
|
43
|
+
asset: t,
|
|
44
|
+
underlyingToken: p,
|
|
45
|
+
last: T,
|
|
46
|
+
isCompact: c,
|
|
47
|
+
totalUsed: z,
|
|
48
|
+
colorIndex: A
|
|
26
49
|
}) {
|
|
27
|
-
const {
|
|
28
|
-
|
|
29
|
-
/* @__PURE__ */ t("span", { className: "ml-1.5 md:ml-2.5 text-left", children: [
|
|
30
|
-
/* @__PURE__ */ e(c, { maxLength: T, children: l?.title }),
|
|
31
|
-
/* @__PURE__ */ e(
|
|
32
|
-
w,
|
|
33
|
-
{
|
|
34
|
-
variant: "caption",
|
|
35
|
-
color: "secondary",
|
|
36
|
-
as: "span",
|
|
37
|
-
className: "block",
|
|
38
|
-
children: /* @__PURE__ */ e(c, { maxLength: 20, children: h })
|
|
39
|
-
}
|
|
40
|
-
)
|
|
41
|
-
] })
|
|
42
|
-
] }), m = () => y(Number(x)), n = () => /* @__PURE__ */ e("span", { children: /* @__PURE__ */ e(
|
|
43
|
-
o,
|
|
50
|
+
const { token: d, limit: r, used: l } = t, N = c ? 40 : 21, u = B(l.value, z), h = () => /* @__PURE__ */ e(
|
|
51
|
+
U,
|
|
44
52
|
{
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
53
|
+
leading: /* @__PURE__ */ e(I, { size: 32, token: d }),
|
|
54
|
+
title: /* @__PURE__ */ e(x, { maxLength: N, children: d.name }),
|
|
55
|
+
subtitle: /* @__PURE__ */ e(x, { maxLength: 20, children: i })
|
|
56
|
+
}
|
|
57
|
+
), f = () => /* @__PURE__ */ s(
|
|
58
|
+
"div",
|
|
59
|
+
{
|
|
60
|
+
className: "flex items-center justify-end gap-2",
|
|
61
|
+
"data-testid": n.exposureCell,
|
|
62
|
+
children: [
|
|
63
|
+
/* @__PURE__ */ e(
|
|
64
|
+
L,
|
|
49
65
|
{
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
showSymbol: !1
|
|
55
|
-
},
|
|
56
|
-
"pool-assets-line-usage-amount"
|
|
66
|
+
share: u,
|
|
67
|
+
colorIndex: A,
|
|
68
|
+
idle: u === 0
|
|
69
|
+
}
|
|
57
70
|
),
|
|
58
|
-
|
|
59
|
-
|
|
71
|
+
/* @__PURE__ */ e(
|
|
72
|
+
P,
|
|
60
73
|
{
|
|
61
|
-
value:
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
74
|
+
value: /* @__PURE__ */ e(
|
|
75
|
+
b,
|
|
76
|
+
{
|
|
77
|
+
decimalPartLength: 2,
|
|
78
|
+
precision: 2,
|
|
79
|
+
showSymbol: !1,
|
|
80
|
+
token: p,
|
|
81
|
+
value: l.value
|
|
82
|
+
}
|
|
83
|
+
),
|
|
84
|
+
valueDescription: l.valueUsd === null ? "—" : S(l.valueUsd)
|
|
85
|
+
}
|
|
68
86
|
)
|
|
69
|
-
|
|
87
|
+
]
|
|
88
|
+
}
|
|
89
|
+
), g = () => /* @__PURE__ */ e("div", { "data-testid": n.capCell, children: r.value === 0n ? /* @__PURE__ */ e("span", { children: "—" }) : /* @__PURE__ */ e(
|
|
90
|
+
b,
|
|
91
|
+
{
|
|
92
|
+
decimalPartLength: 2,
|
|
93
|
+
precision: 2,
|
|
94
|
+
showSymbol: !1,
|
|
95
|
+
token: p,
|
|
96
|
+
value: r.value
|
|
70
97
|
}
|
|
71
|
-
) });
|
|
98
|
+
) }), v = () => /* @__PURE__ */ e("div", { "data-testid": n.capUtilizationCell, children: /* @__PURE__ */ e(y, { data: j(l.value, r.value) }) });
|
|
72
99
|
return /* @__PURE__ */ e(
|
|
73
|
-
|
|
100
|
+
k,
|
|
74
101
|
{
|
|
75
|
-
last:
|
|
102
|
+
last: T,
|
|
76
103
|
height: "auto",
|
|
77
104
|
className: "cursor-default",
|
|
78
|
-
style: {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
children: i ? /* @__PURE__ */ e(s, { span: "full", size: "sm", className: "px-3 py-0!", children: /* @__PURE__ */ t(
|
|
82
|
-
k,
|
|
105
|
+
style: { minHeight: "75px" },
|
|
106
|
+
children: c ? /* @__PURE__ */ e(o, { className: "px-3 py-0!", size: "sm", span: "full", children: /* @__PURE__ */ s(
|
|
107
|
+
w,
|
|
83
108
|
{
|
|
84
|
-
columns: 2,
|
|
85
|
-
columnsXs: 2,
|
|
86
|
-
title: a(),
|
|
87
109
|
className: "w-full",
|
|
110
|
+
columns: 3,
|
|
111
|
+
columnsXs: 3,
|
|
112
|
+
title: h(),
|
|
88
113
|
children: [
|
|
89
114
|
/* @__PURE__ */ e(
|
|
90
|
-
|
|
115
|
+
a,
|
|
116
|
+
{
|
|
117
|
+
title: /* @__PURE__ */ e(m, { messageId: "components.poolAssetsTable.exposure" }),
|
|
118
|
+
children: f()
|
|
119
|
+
}
|
|
120
|
+
),
|
|
121
|
+
/* @__PURE__ */ e(
|
|
122
|
+
a,
|
|
91
123
|
{
|
|
92
|
-
title: /* @__PURE__ */ e(
|
|
93
|
-
children:
|
|
124
|
+
title: /* @__PURE__ */ e(m, { messageId: "components.poolAssetsTable.cap" }),
|
|
125
|
+
children: g()
|
|
94
126
|
}
|
|
95
127
|
),
|
|
96
128
|
/* @__PURE__ */ e(
|
|
97
|
-
|
|
129
|
+
a,
|
|
98
130
|
{
|
|
99
|
-
title: /* @__PURE__ */ e(
|
|
100
|
-
children:
|
|
131
|
+
title: /* @__PURE__ */ e(m, { messageId: "components.poolAssetsTable.capUtilization" }),
|
|
132
|
+
children: v()
|
|
101
133
|
}
|
|
102
134
|
)
|
|
103
135
|
]
|
|
104
136
|
}
|
|
105
|
-
) }) : /* @__PURE__ */
|
|
106
|
-
/* @__PURE__ */ e(
|
|
107
|
-
/* @__PURE__ */ e(
|
|
108
|
-
/* @__PURE__ */ e(
|
|
137
|
+
) }) : /* @__PURE__ */ s(C, { children: [
|
|
138
|
+
/* @__PURE__ */ e(o, { className: "pl-4", size: "sm", textAlign: "left", children: h() }),
|
|
139
|
+
/* @__PURE__ */ e(o, { size: "sm", textAlign: "right", children: f() }),
|
|
140
|
+
/* @__PURE__ */ e(o, { size: "sm", textAlign: "right", children: g() }),
|
|
141
|
+
/* @__PURE__ */ e(o, { className: "pr-4", size: "sm", textAlign: "right", children: v() })
|
|
109
142
|
] })
|
|
110
143
|
}
|
|
111
144
|
);
|
|
112
145
|
}
|
|
113
146
|
export {
|
|
114
|
-
|
|
147
|
+
he as PoolAssetsTableRow
|
|
115
148
|
};
|
|
@@ -1,42 +1,60 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx as o, jsxs as c } from "react/jsx-runtime";
|
|
2
|
+
import { Card as f } from "../../cards/card/card.js";
|
|
3
|
+
import "clsx";
|
|
4
|
+
import "tailwind-merge";
|
|
2
5
|
import "react";
|
|
6
|
+
import "@fortawesome/free-solid-svg-icons";
|
|
7
|
+
import "../../icons/fa-icon.js";
|
|
8
|
+
import "@gearbox-protocol/sdk";
|
|
9
|
+
import "sonner";
|
|
3
10
|
import "@gearbox-protocol/sdk/common-utils";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
import "luxon";
|
|
12
|
+
import "../../../utils/z-index.js";
|
|
13
|
+
import "react-intl";
|
|
14
|
+
import "../../buttons/button/button.js";
|
|
15
|
+
import { GridTable as b, GridTableHeader as T, GridTableBody as h } from "../../table/grid-table.js";
|
|
16
|
+
import "../../skeleton/skeleton.js";
|
|
17
|
+
import "../../table/table.js";
|
|
18
|
+
import { useIsMobile as u } from "../../../hooks/use-media-query.js";
|
|
19
|
+
import { useObservedWidthKey as x } from "../../../hooks/use-observed-width-key.js";
|
|
20
|
+
import { PoolAssetsTableTest as v } from "./constants.js";
|
|
21
|
+
import { PoolAssetsTableHead as w } from "./pool-assets-table-head.js";
|
|
22
|
+
import { PoolAssetsTableRow as A } from "./pool-assets-table-row.js";
|
|
23
|
+
const C = 680;
|
|
24
|
+
function q({
|
|
25
|
+
list: t,
|
|
26
|
+
poolName: s,
|
|
27
|
+
sort: p,
|
|
28
|
+
underlyingToken: l
|
|
14
29
|
}) {
|
|
15
|
-
const
|
|
16
|
-
return /* @__PURE__ */
|
|
17
|
-
|
|
30
|
+
const a = u(), { ref: d, widthKey: m } = x(), i = m > 0 ? m < C : a, n = t.reduce((r, e) => r + e.used.value, 0n);
|
|
31
|
+
return /* @__PURE__ */ o(f, { ref: d, className: "overflow-hidden rounded-lg p-2", children: /* @__PURE__ */ c(
|
|
32
|
+
b,
|
|
18
33
|
{
|
|
19
|
-
cols:
|
|
34
|
+
cols: i ? "1fr" : "1fr max-content max-content minmax(0,1fr)",
|
|
35
|
+
"data-testid": v.root,
|
|
20
36
|
gap: 0,
|
|
21
37
|
size: "lg",
|
|
22
38
|
wrapperClassName: "overflow-visible",
|
|
23
39
|
children: [
|
|
24
|
-
!
|
|
25
|
-
/* @__PURE__ */ o(
|
|
26
|
-
|
|
40
|
+
!i && /* @__PURE__ */ o(T, { children: /* @__PURE__ */ o(w, { sort: p }) }),
|
|
41
|
+
/* @__PURE__ */ o(h, { children: t.map((r, e) => /* @__PURE__ */ o(
|
|
42
|
+
A,
|
|
27
43
|
{
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
44
|
+
asset: r,
|
|
45
|
+
poolName: s,
|
|
46
|
+
underlyingToken: l,
|
|
47
|
+
last: e === t.length - 1,
|
|
48
|
+
isCompact: i,
|
|
49
|
+
totalUsed: n,
|
|
50
|
+
colorIndex: e
|
|
33
51
|
},
|
|
34
|
-
r.token
|
|
52
|
+
r.token.address
|
|
35
53
|
)) })
|
|
36
54
|
]
|
|
37
55
|
}
|
|
38
|
-
);
|
|
56
|
+
) });
|
|
39
57
|
}
|
|
40
58
|
export {
|
|
41
|
-
|
|
59
|
+
q as PoolAssetsTable
|
|
42
60
|
};
|
package/dist/esm/components/composites/tx-preview/confirm/dialog/TransactionConfirmModalView.js
CHANGED
|
@@ -18,10 +18,13 @@ import "@gearbox-protocol/sdk/common-utils";
|
|
|
18
18
|
import "luxon";
|
|
19
19
|
import "../../../../../utils/z-index.js";
|
|
20
20
|
import "../../../../buttons/tab-button/tab-button.js";
|
|
21
|
+
import "@fortawesome/free-solid-svg-icons";
|
|
22
|
+
import "../../../../icons/fa-icon.js";
|
|
21
23
|
import "../../../../token-icon/token-icon.js";
|
|
22
24
|
import "../../../../tooltip/simple-tooltip.js";
|
|
23
25
|
import "../../../../tooltip/tooltip.js";
|
|
24
26
|
import "../../../../badge/badge.js";
|
|
27
|
+
import "../../../../badge/chip.js";
|
|
25
28
|
import "../../../../base/amount-input/amount-input.js";
|
|
26
29
|
import { ConfirmMenu as s } from "../../../../confirm-menu/confirm-menu.js";
|
|
27
30
|
import "react-intl";
|
|
@@ -32,10 +35,9 @@ import "../../../../token-symbol/token-symbol.js";
|
|
|
32
35
|
import "../../../../simple-accordion/simple-accordion.js";
|
|
33
36
|
import "../../../../tip-card/tip-card.js";
|
|
34
37
|
import "../../../../typography/typography.js";
|
|
35
|
-
import "../../../../vertical-indicator/vertical-indicator.js";
|
|
36
38
|
import "../../../../points-icon/points-icon.js";
|
|
37
|
-
import "
|
|
38
|
-
import "../../../../
|
|
39
|
+
import "../../../../vertical-indicator/vertical-indicator.js";
|
|
40
|
+
import "../../../../base/page-title/page-title.js";
|
|
39
41
|
import "../../../../detailed-page-title/detailed-page-title-copy-button.js";
|
|
40
42
|
import "../../../../detailed-page-title/detailed-page-title-explorer-dropdown.js";
|
|
41
43
|
import "../../../../base/details-view/detail-aside/detail-aside-scope.js";
|
|
@@ -56,39 +58,41 @@ import "../../../../slider/slider.js";
|
|
|
56
58
|
import "../../../../slider/slider-context.js";
|
|
57
59
|
import "../../../../text-button/text-button.js";
|
|
58
60
|
import "../../../../with-title/with-title.js";
|
|
59
|
-
import "../../../../status-elements/status-elements.js";
|
|
60
61
|
import "react-router-dom";
|
|
62
|
+
import "../../../../status-elements/status-elements.js";
|
|
61
63
|
import { StyledDialogContainer as C } from "../../../../client-adapters/styled-dialog-container/styled-dialog-container.js";
|
|
64
|
+
import { Modal as u } from "../../../../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";
|
|
62
77
|
import "../../../../simple-dropdown/simple-dropdown.js";
|
|
63
78
|
import "../../../../simple-dropdown/simple-dropdown-menu-item.js";
|
|
64
|
-
import "../../../../help-tip/help-tip.js";
|
|
65
79
|
import "../../../../base/tabber/tabber.js";
|
|
66
80
|
import "../../../../link/link.js";
|
|
67
81
|
import "../../../../rounded-image/rounded-image.js";
|
|
82
|
+
import "../../../../network-icon/network-indicator.js";
|
|
68
83
|
import "../../../../base-link/base-link.js";
|
|
84
|
+
import "../../../../help-tip/help-tip.js";
|
|
85
|
+
import "../../../../base-table/base-table-line.js";
|
|
69
86
|
import "../../../../navigation-context/navigation-context.js";
|
|
70
87
|
import "../../../../cards/card/card.js";
|
|
71
88
|
import "../../../../checkbox-item/checkbox-item.js";
|
|
72
89
|
import "../../../../client-adapters/styled-button/styled-button.js";
|
|
73
90
|
import "../../../../client-adapters/styled-rounded-image/styled-rounded-image.js";
|
|
74
91
|
import "../amounts/TransactionConfirmAmountField.js";
|
|
75
|
-
import { TransactionConfirmDialogTest as
|
|
76
|
-
import { TransactionConfirmShell as
|
|
92
|
+
import { TransactionConfirmDialogTest as M, transactionConfirmModalContainerVariants as T, transactionConfirmDialogShellVariants as g } from "./constants.js";
|
|
93
|
+
import { TransactionConfirmShell as h } from "./TransactionConfirmShell.js";
|
|
77
94
|
import "../../../../spinner-loader/spinner-loader.js";
|
|
78
95
|
import "../../../../detailed-apy/detailed-apy.js";
|
|
79
|
-
import { Modal as h } from "../../../../modal/modal.js";
|
|
80
|
-
import "@radix-ui/react-dialog";
|
|
81
|
-
import "../../../../dialog/dialog-container.js";
|
|
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
96
|
import "../../../../dropdown-menu/dropdown-menu.js";
|
|
93
97
|
import "../../../../dropdown-menu/dropdown-menu-checkbox-item.js";
|
|
94
98
|
import "../../../../dropdown-menu/dropdown-menu-content.js";
|
|
@@ -130,7 +134,7 @@ import "../../../../split-list/split-list.js";
|
|
|
130
134
|
import "../../../../status-dot/status-dot.js";
|
|
131
135
|
import "../../../../textarea/textarea.js";
|
|
132
136
|
import "../../../../theme-provider.js";
|
|
133
|
-
function
|
|
137
|
+
function Wo({
|
|
134
138
|
open: i,
|
|
135
139
|
onClose: t,
|
|
136
140
|
title: m,
|
|
@@ -144,16 +148,16 @@ function Po({
|
|
|
144
148
|
}) {
|
|
145
149
|
if (!i) return null;
|
|
146
150
|
const f = o !== "confirm" && o !== "awaiting_receipt" && n ? void 0 : p;
|
|
147
|
-
return /* @__PURE__ */ r(
|
|
151
|
+
return /* @__PURE__ */ r(u, { show: i, onClickOutside: t, zIndexLayer: "MODAL", children: /* @__PURE__ */ r(
|
|
148
152
|
C,
|
|
149
153
|
{
|
|
150
154
|
className: c(
|
|
151
|
-
|
|
152
|
-
a ??
|
|
155
|
+
g(),
|
|
156
|
+
a ?? T()
|
|
153
157
|
),
|
|
154
158
|
"data-testid": e,
|
|
155
159
|
children: /* @__PURE__ */ r(
|
|
156
|
-
|
|
160
|
+
h,
|
|
157
161
|
{
|
|
158
162
|
...l,
|
|
159
163
|
header: /* @__PURE__ */ r(
|
|
@@ -164,7 +168,7 @@ function Po({
|
|
|
164
168
|
onClose: t
|
|
165
169
|
}
|
|
166
170
|
),
|
|
167
|
-
"data-testid": d ??
|
|
171
|
+
"data-testid": d ?? M.root,
|
|
168
172
|
phase: o
|
|
169
173
|
}
|
|
170
174
|
)
|
|
@@ -172,5 +176,5 @@ function Po({
|
|
|
172
176
|
) });
|
|
173
177
|
}
|
|
174
178
|
export {
|
|
175
|
-
|
|
179
|
+
Wo as TransactionConfirmModalView
|
|
176
180
|
};
|
|
@@ -1,95 +1,100 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import { TokenIcon as Y } from "../token-icon/token-icon.js";
|
|
1
|
+
import { jsx as e, jsxs as n } from "react/jsx-runtime";
|
|
2
|
+
import { useId as g } from "react";
|
|
4
3
|
import { YieldBreakdownTooltip as w } from "../yield-breakdown-tooltip/yield-breakdown-tooltip.js";
|
|
5
|
-
import "
|
|
6
|
-
import { positiveTokenRewardsOf as z, pointProgramsOf as I, totalApyOf as L } from "../../utils/apy-breakdown.js";
|
|
4
|
+
import { totalApyOf as x, positiveTokenRewardsOf as v, pointProgramsOf as C } from "../../utils/apy-breakdown.js";
|
|
7
5
|
import "@gearbox-protocol/sdk";
|
|
8
|
-
import { bpsToPercent as
|
|
9
|
-
import { cn as
|
|
6
|
+
import { bpsToPercent as I } from "../../utils/bps.js";
|
|
7
|
+
import { cn as k } from "../../utils/cn.js";
|
|
10
8
|
import "sonner";
|
|
11
|
-
import {
|
|
9
|
+
import { formatCompactPercent as P } from "../../utils/format-money.js";
|
|
12
10
|
import "@gearbox-protocol/sdk/common-utils";
|
|
13
11
|
import "luxon";
|
|
14
12
|
import "../../utils/z-index.js";
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
13
|
+
const l = 14;
|
|
14
|
+
function A() {
|
|
15
|
+
const t = `additional-incentives-${g().replace(/:/g, "")}`;
|
|
16
|
+
return /* @__PURE__ */ n(
|
|
17
|
+
"svg",
|
|
18
|
+
{
|
|
19
|
+
width: l,
|
|
20
|
+
height: l,
|
|
21
|
+
viewBox: "0 0 14 14",
|
|
22
|
+
fill: "none",
|
|
23
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
24
|
+
className: "size-3.5 shrink-0 overflow-clip",
|
|
25
|
+
role: "img",
|
|
26
|
+
"aria-label": "Incentives",
|
|
27
|
+
children: [
|
|
28
|
+
/* @__PURE__ */ e("title", { children: "Incentives" }),
|
|
29
|
+
/* @__PURE__ */ e(
|
|
30
|
+
"path",
|
|
31
|
+
{
|
|
32
|
+
d: "M7 14C10.866 14 14 10.866 14 7C14 3.13401 10.866 0 7 0C3.13401 0 0 3.13401 0 7C0 10.866 3.13401 14 7 14Z",
|
|
33
|
+
fill: `url(#${t})`
|
|
34
|
+
}
|
|
35
|
+
),
|
|
36
|
+
/* @__PURE__ */ e(
|
|
37
|
+
"path",
|
|
38
|
+
{
|
|
39
|
+
d: "M7 3.75V10.25M3.75 7H10.25",
|
|
40
|
+
stroke: "white",
|
|
41
|
+
strokeWidth: "1.5",
|
|
42
|
+
strokeLinecap: "round"
|
|
43
|
+
}
|
|
44
|
+
),
|
|
45
|
+
/* @__PURE__ */ e("defs", { children: /* @__PURE__ */ n(
|
|
46
|
+
"linearGradient",
|
|
47
|
+
{
|
|
48
|
+
id: t,
|
|
49
|
+
x1: "0",
|
|
50
|
+
y1: "7",
|
|
51
|
+
x2: "14",
|
|
52
|
+
y2: "7",
|
|
53
|
+
gradientUnits: "userSpaceOnUse",
|
|
54
|
+
children: [
|
|
55
|
+
/* @__PURE__ */ e("stop", { stopColor: "#FF2D8D" }),
|
|
56
|
+
/* @__PURE__ */ e("stop", { offset: "1", stopColor: "#FF6C20" })
|
|
57
|
+
]
|
|
58
|
+
}
|
|
59
|
+
) })
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
function c(t) {
|
|
65
|
+
return t == null ? !1 : v(t).length > 0 || C(t).length > 0;
|
|
66
|
+
}
|
|
67
|
+
function E({
|
|
68
|
+
apy: t,
|
|
69
|
+
maxLeverage: p,
|
|
70
|
+
collateralApy: r,
|
|
71
|
+
borrowApy: d,
|
|
72
|
+
additionalBorrowApy: a,
|
|
73
|
+
decimals: m = 2,
|
|
74
|
+
className: o
|
|
23
75
|
}) {
|
|
24
|
-
if (!
|
|
25
|
-
return /* @__PURE__ */
|
|
26
|
-
const i =
|
|
27
|
-
const
|
|
28
|
-
return /* @__PURE__ */
|
|
29
|
-
/* @__PURE__ */
|
|
30
|
-
|
|
31
|
-
i.map((t, r) => {
|
|
32
|
-
const s = r === o - 1;
|
|
33
|
-
return /* @__PURE__ */ n(
|
|
34
|
-
"span",
|
|
35
|
-
{
|
|
36
|
-
style: {
|
|
37
|
-
zIndex: o - r,
|
|
38
|
-
marginRight: s ? 0 : -7
|
|
39
|
-
},
|
|
40
|
-
children: /* @__PURE__ */ n(
|
|
41
|
-
Y,
|
|
42
|
-
{
|
|
43
|
-
token: t.token,
|
|
44
|
-
size: 14,
|
|
45
|
-
style: {
|
|
46
|
-
margin: t.token.symbol === "GEAR" ? "-3px 0 0 0" : "0"
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
)
|
|
50
|
-
},
|
|
51
|
-
`extra-${t.token.address}-${t.supplyApr ?? 0}`
|
|
52
|
-
);
|
|
53
|
-
}),
|
|
54
|
-
m.map((t, r) => {
|
|
55
|
-
const s = r + c, T = s === o - 1;
|
|
56
|
-
return /* @__PURE__ */ n(
|
|
57
|
-
"span",
|
|
58
|
-
{
|
|
59
|
-
style: {
|
|
60
|
-
zIndex: o - s,
|
|
61
|
-
marginRight: T ? 0 : -7
|
|
62
|
-
},
|
|
63
|
-
children: /* @__PURE__ */ n(
|
|
64
|
-
R,
|
|
65
|
-
{
|
|
66
|
-
reward: {
|
|
67
|
-
name: t.name,
|
|
68
|
-
type: t.id
|
|
69
|
-
},
|
|
70
|
-
size: 14
|
|
71
|
-
}
|
|
72
|
-
)
|
|
73
|
-
},
|
|
74
|
-
`points-${t.id}`
|
|
75
|
-
);
|
|
76
|
-
})
|
|
77
|
-
] })
|
|
76
|
+
if (!t)
|
|
77
|
+
return /* @__PURE__ */ e("span", { className: "text-secondary-foreground", children: "—" });
|
|
78
|
+
const i = x(t), f = c(t) || c(r), h = i >= 1, s = () => {
|
|
79
|
+
const u = P(I(i), m);
|
|
80
|
+
return /* @__PURE__ */ n("div", { className: k("inline-flex items-center gap-1.5", o), children: [
|
|
81
|
+
/* @__PURE__ */ e("span", { className: "inline-flex items-center", children: u }),
|
|
82
|
+
f ? /* @__PURE__ */ e(A, {}) : null
|
|
78
83
|
] });
|
|
79
84
|
};
|
|
80
|
-
return
|
|
85
|
+
return h ? /* @__PURE__ */ e(
|
|
81
86
|
w,
|
|
82
87
|
{
|
|
83
|
-
supplyApy:
|
|
84
|
-
maxLeverage:
|
|
85
|
-
collateralApy:
|
|
86
|
-
borrowApy:
|
|
87
|
-
additionalBorrowApy:
|
|
88
|
-
className:
|
|
89
|
-
children:
|
|
88
|
+
supplyApy: t,
|
|
89
|
+
maxLeverage: p,
|
|
90
|
+
collateralApy: r,
|
|
91
|
+
borrowApy: d,
|
|
92
|
+
additionalBorrowApy: a,
|
|
93
|
+
className: o,
|
|
94
|
+
children: s()
|
|
90
95
|
}
|
|
91
|
-
) :
|
|
96
|
+
) : s();
|
|
92
97
|
}
|
|
93
98
|
export {
|
|
94
|
-
|
|
99
|
+
E as CompoundAPY
|
|
95
100
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as r, jsxs as c } from "react/jsx-runtime";
|
|
2
2
|
import * as m from "react";
|
|
3
3
|
import { Badge as s } from "../badge/badge.js";
|
|
4
|
+
import "../badge/chip.js";
|
|
4
5
|
import { faXmark as f } from "@fortawesome/free-solid-svg-icons";
|
|
5
6
|
import { FaIcon as l } from "../icons/fa-icon.js";
|
|
6
7
|
import "@gearbox-protocol/sdk";
|