@gearbox-protocol/ui-kit 4.0.0-next.4 → 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/history-chart/history-chart.cjs +1 -1
- package/dist/cjs/components/base/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/pool-apy-breakdown-card/pool-apy-breakdown-card.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/title-meta/constants.cjs +1 -1
- package/dist/cjs/components/base/title-meta/title-meta.cjs +1 -1
- package/dist/cjs/components/base/values/index.cjs +1 -1
- 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-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-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 +3 -2
- package/dist/esm/components/base/chart-with-side-card/chart-with-side-card.js +6 -6
- package/dist/esm/components/base/history-chart/history-chart.js +86 -46
- package/dist/esm/components/base/index.js +144 -138
- package/dist/esm/components/base/info-list/info-list.js +7 -8
- package/dist/esm/components/base/leverage-input/leverage-input.js +1 -1
- 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/pool-apy-breakdown-card/pool-apy-breakdown-card.js +23 -30
- 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 -32
- 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/values/index.js +16 -14
- 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-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 +9 -6
- package/dist/esm/components/checkbox/checkbox-labeled.js +7 -4
- package/dist/esm/components/client-adapters/styled-rounded-image/styled-rounded-image.js +7 -4
- 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 +108 -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 +9 -6
- 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 +32 -31
- 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 -701
- 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 +7 -4
- 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 +883 -842
- package/dist/esm/locale/en.json.js +21 -18
- package/dist/esm/utils/format-money.js +59 -41
- package/dist/esm/utils/index.js +87 -83
- 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/history-chart/history-chart.d.ts +13 -3
- package/dist/types/components/base/index.d.ts +1 -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/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/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/values/index.d.ts +1 -0
- 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-money.d.ts +11 -5
- package/dist/types/utils/index.d.ts +2 -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,48 +1,50 @@
|
|
|
1
1
|
import { NotificationCenter as t } from "./notification-center/notification-center.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
2
|
+
import { PoolAssetsTableTest as e } from "./pool-assets-table/constants.js";
|
|
3
|
+
import { PoolAssetsTable as s } from "./pool-assets-table/pool-assets-table.js";
|
|
4
|
+
import { PoolAssetsTableHead as m } from "./pool-assets-table/pool-assets-table-head.js";
|
|
5
|
+
import { PoolAssetsTableRow as c } from "./pool-assets-table/pool-assets-table-row.js";
|
|
6
|
+
import { TransactionConfirmAmountFieldTest as l, TransactionConfirmAmountPairTest as p } from "./tx-preview/confirm/amounts/constants.js";
|
|
7
|
+
import { TransactionConfirmAmountField as C } from "./tx-preview/confirm/amounts/TransactionConfirmAmountField.js";
|
|
8
|
+
import { computeTransactionConfirmDialogLayout as P } from "./tx-preview/confirm/dialog/computeTransactionConfirmDialogLayout.js";
|
|
9
|
+
import { TransactionConfirmDialogTest as g, transactionConfirmDialogShellVariants as w, transactionConfirmModalContainerVariants as A, transactionConfirmPreviewScrollVariants as R, transactionConfirmShellContentVariants as d } from "./tx-preview/confirm/dialog/constants.js";
|
|
10
|
+
import { TransactionConfirmModalView as V } from "./tx-preview/confirm/dialog/TransactionConfirmModalView.js";
|
|
11
|
+
import { TransactionConfirmPageView as F } from "./tx-preview/confirm/dialog/TransactionConfirmPageView.js";
|
|
12
|
+
import { TransactionConfirmExecuteButton as H } from "./tx-preview/confirm/execution/TransactionConfirmExecuteButton.js";
|
|
13
|
+
import { TransactionConfirmExecuteButtonTest as E, TransactionConfirmFailureResultTest as M, TransactionConfirmSuccessResultTest as v, TransactionConfirmTxHashRowTest as y } from "./tx-preview/confirm/result/constants.js";
|
|
14
|
+
import { TransactionConfirmFailureResult as L } from "./tx-preview/confirm/result/TransactionConfirmFailureResult.js";
|
|
15
|
+
import { TransactionConfirmSuccessIcon as j } from "./tx-preview/confirm/result/TransactionConfirmSuccessIcon.js";
|
|
16
|
+
import { TransactionConfirmSuccessResult as q } from "./tx-preview/confirm/result/TransactionConfirmSuccessResult.js";
|
|
17
|
+
import { TransactionConfirmTxHashRow as G } from "./tx-preview/confirm/result/TransactionConfirmTxHashRow.js";
|
|
18
|
+
import { ProgressStepperTest as K } from "./tx-preview/confirm/stepper/constants.js";
|
|
19
|
+
import { ProgressStepper as Q } from "./tx-preview/confirm/stepper/ProgressStepper.js";
|
|
20
|
+
import { shouldShowTransactionProgressStepper as W } from "./tx-preview/confirm/stepper/transactionExecutionStepTypes.js";
|
|
20
21
|
export {
|
|
21
22
|
t as NotificationCenter,
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
H as
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
V as
|
|
37
|
-
|
|
38
|
-
j as
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
R as
|
|
23
|
+
s as PoolAssetsTable,
|
|
24
|
+
m as PoolAssetsTableHead,
|
|
25
|
+
c as PoolAssetsTableRow,
|
|
26
|
+
e as PoolAssetsTableTest,
|
|
27
|
+
Q as ProgressStepper,
|
|
28
|
+
K as ProgressStepperTest,
|
|
29
|
+
C as TransactionConfirmAmountField,
|
|
30
|
+
l as TransactionConfirmAmountFieldTest,
|
|
31
|
+
p as TransactionConfirmAmountPairTest,
|
|
32
|
+
g as TransactionConfirmDialogTest,
|
|
33
|
+
H as TransactionConfirmExecuteButton,
|
|
34
|
+
E as TransactionConfirmExecuteButtonTest,
|
|
35
|
+
L as TransactionConfirmFailureResult,
|
|
36
|
+
M as TransactionConfirmFailureResultTest,
|
|
37
|
+
V as TransactionConfirmModalView,
|
|
38
|
+
F as TransactionConfirmPageView,
|
|
39
|
+
j as TransactionConfirmSuccessIcon,
|
|
40
|
+
q as TransactionConfirmSuccessResult,
|
|
41
|
+
v as TransactionConfirmSuccessResultTest,
|
|
42
|
+
G as TransactionConfirmTxHashRow,
|
|
43
|
+
y as TransactionConfirmTxHashRowTest,
|
|
44
|
+
P as computeTransactionConfirmDialogLayout,
|
|
45
|
+
W as shouldShowTransactionProgressStepper,
|
|
46
|
+
w as transactionConfirmDialogShellVariants,
|
|
47
|
+
A as transactionConfirmModalContainerVariants,
|
|
48
|
+
R as transactionConfirmPreviewScrollVariants,
|
|
49
|
+
d as transactionConfirmShellContentVariants
|
|
48
50
|
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
class t {
|
|
2
|
+
static root = "pool-assets-table-root";
|
|
3
|
+
static exposureCell = "pool-assets-table-exposure-cell";
|
|
4
|
+
static capCell = "pool-assets-table-cap-cell";
|
|
5
|
+
static capUtilizationCell = "pool-assets-table-cap-utilization-cell";
|
|
6
|
+
}
|
|
7
|
+
export {
|
|
8
|
+
t as PoolAssetsTableTest
|
|
9
|
+
};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { PoolAssetsTableTest as s } from "./constants.js";
|
|
2
|
+
import { PoolAssetsTable as l } from "./pool-assets-table.js";
|
|
3
|
+
import { PoolAssetsTableHead as a } from "./pool-assets-table-head.js";
|
|
4
|
+
import { PoolAssetsTableRow as b } from "./pool-assets-table-row.js";
|
|
4
5
|
export {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
l as PoolAssetsTable,
|
|
7
|
+
a as PoolAssetsTableHead,
|
|
8
|
+
b as PoolAssetsTableRow,
|
|
9
|
+
s as PoolAssetsTableTest
|
|
8
10
|
};
|
|
@@ -1,54 +1,76 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as n, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { HeadCell as i } from "../../head-cell/head-cell.js";
|
|
3
|
+
import "react-intl";
|
|
4
|
+
import "../../buttons/button/button.js";
|
|
2
5
|
import "react";
|
|
3
|
-
import
|
|
6
|
+
import "@gearbox-protocol/sdk";
|
|
7
|
+
import "clsx";
|
|
8
|
+
import "tailwind-merge";
|
|
9
|
+
import "sonner";
|
|
4
10
|
import "@gearbox-protocol/sdk/common-utils";
|
|
11
|
+
import "luxon";
|
|
12
|
+
import "../../../utils/z-index.js";
|
|
13
|
+
import { GridTableRow as l, GridTableHead as r } from "../../table/grid-table.js";
|
|
14
|
+
import "../../skeleton/skeleton.js";
|
|
15
|
+
import "../../table/table.js";
|
|
16
|
+
import { useIntlTyped as c, FormattedMessageTyped as a } from "../../typed-intl/index.js";
|
|
17
|
+
import { getSortForField as m } from "../../../hooks/use-filter.js";
|
|
5
18
|
import "../../breakpoint-provider.js";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import { useIntlTyped as f, FormattedMessageTyped as n } from "../../typed-intl/index.js";
|
|
9
|
-
function j({
|
|
10
|
-
sort: l
|
|
19
|
+
function D({
|
|
20
|
+
sort: p
|
|
11
21
|
}) {
|
|
12
|
-
const
|
|
13
|
-
return /* @__PURE__ */
|
|
14
|
-
/* @__PURE__ */ e(
|
|
15
|
-
|
|
22
|
+
const o = c(), { state: s, set: t } = p;
|
|
23
|
+
return /* @__PURE__ */ n(l, { noHover: !0, height: "35px", children: [
|
|
24
|
+
/* @__PURE__ */ e(r, { className: "pl-4", justify: "start", size: "sm", children: /* @__PURE__ */ e(
|
|
25
|
+
i,
|
|
16
26
|
{
|
|
17
27
|
arrowPosition: "right",
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
sortField: s.formatMessage({
|
|
28
|
+
sortDirection: m("name", s),
|
|
29
|
+
sortField: o.formatMessage({
|
|
21
30
|
messageId: "components.poolAssetsTable.asset"
|
|
22
31
|
}),
|
|
23
|
-
|
|
32
|
+
title: /* @__PURE__ */ e(a, { messageId: "components.poolAssetsTable.asset" }),
|
|
33
|
+
onSort: () => t("name", "desc")
|
|
24
34
|
}
|
|
25
35
|
) }),
|
|
26
|
-
/* @__PURE__ */ e(
|
|
27
|
-
|
|
36
|
+
/* @__PURE__ */ e(r, { justify: "end", size: "sm", children: /* @__PURE__ */ e(
|
|
37
|
+
i,
|
|
28
38
|
{
|
|
29
39
|
arrowPosition: "left",
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
messageId: "components.poolAssetsTable.rate"
|
|
40
|
+
sortDirection: m("exposure", s),
|
|
41
|
+
sortField: o.formatMessage({
|
|
42
|
+
messageId: "components.poolAssetsTable.exposure"
|
|
34
43
|
}),
|
|
35
|
-
|
|
44
|
+
title: /* @__PURE__ */ e(a, { messageId: "components.poolAssetsTable.exposure" }),
|
|
45
|
+
onSort: () => t("exposure", "desc")
|
|
36
46
|
}
|
|
37
47
|
) }),
|
|
38
|
-
/* @__PURE__ */ e(
|
|
39
|
-
|
|
48
|
+
/* @__PURE__ */ e(r, { justify: "end", size: "sm", children: /* @__PURE__ */ e(
|
|
49
|
+
i,
|
|
40
50
|
{
|
|
41
51
|
arrowPosition: "left",
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
messageId: "components.poolAssetsTable.limits"
|
|
52
|
+
sortDirection: m("cap", s),
|
|
53
|
+
sortField: o.formatMessage({
|
|
54
|
+
messageId: "components.poolAssetsTable.cap"
|
|
46
55
|
}),
|
|
47
|
-
|
|
56
|
+
title: /* @__PURE__ */ e(a, { messageId: "components.poolAssetsTable.cap" }),
|
|
57
|
+
onSort: () => t("cap", "desc")
|
|
58
|
+
}
|
|
59
|
+
) }),
|
|
60
|
+
/* @__PURE__ */ e(r, { className: "pr-4", justify: "end", size: "sm", children: /* @__PURE__ */ e(
|
|
61
|
+
i,
|
|
62
|
+
{
|
|
63
|
+
arrowPosition: "left",
|
|
64
|
+
sortDirection: m("capUtilization", s),
|
|
65
|
+
sortField: o.formatMessage({
|
|
66
|
+
messageId: "components.poolAssetsTable.capUtilization"
|
|
67
|
+
}),
|
|
68
|
+
title: /* @__PURE__ */ e(a, { messageId: "components.poolAssetsTable.capUtilization" }),
|
|
69
|
+
onSort: () => t("capUtilization", "desc")
|
|
48
70
|
}
|
|
49
71
|
) })
|
|
50
72
|
] });
|
|
51
73
|
}
|
|
52
74
|
export {
|
|
53
|
-
|
|
75
|
+
D as PoolAssetsTableHead
|
|
54
76
|
};
|
|
@@ -1,116 +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
11
|
import "../../points-icon/points-icon.js";
|
|
11
|
-
import {
|
|
12
|
+
import { UtilizationValue as y } from "../../base/values/scalars.js";
|
|
12
13
|
import "../../badge/badge.js";
|
|
13
|
-
import
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
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
|
|
27
49
|
}) {
|
|
28
|
-
const {
|
|
29
|
-
|
|
30
|
-
/* @__PURE__ */ t("span", { className: "ml-1.5 md:ml-2.5 text-left", children: [
|
|
31
|
-
/* @__PURE__ */ e(c, { maxLength: T, children: l?.title }),
|
|
32
|
-
/* @__PURE__ */ e(
|
|
33
|
-
w,
|
|
34
|
-
{
|
|
35
|
-
variant: "caption",
|
|
36
|
-
color: "secondary",
|
|
37
|
-
as: "span",
|
|
38
|
-
className: "block",
|
|
39
|
-
children: /* @__PURE__ */ e(c, { maxLength: 20, children: h })
|
|
40
|
-
}
|
|
41
|
-
)
|
|
42
|
-
] })
|
|
43
|
-
] }), a = () => y(Number(x)), n = () => /* @__PURE__ */ e("span", { children: /* @__PURE__ */ e(
|
|
44
|
-
o,
|
|
50
|
+
const { token: d, limit: r, used: l } = t, N = c ? 40 : 21, u = B(l.value, z), h = () => /* @__PURE__ */ e(
|
|
51
|
+
U,
|
|
45
52
|
{
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
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,
|
|
50
65
|
{
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
showSymbol: !1
|
|
56
|
-
},
|
|
57
|
-
"pool-assets-line-usage-amount"
|
|
66
|
+
share: u,
|
|
67
|
+
colorIndex: A,
|
|
68
|
+
idle: u === 0
|
|
69
|
+
}
|
|
58
70
|
),
|
|
59
|
-
|
|
60
|
-
|
|
71
|
+
/* @__PURE__ */ e(
|
|
72
|
+
P,
|
|
61
73
|
{
|
|
62
|
-
value:
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
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
|
+
}
|
|
69
86
|
)
|
|
70
|
-
|
|
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
|
|
71
97
|
}
|
|
72
|
-
) });
|
|
98
|
+
) }), v = () => /* @__PURE__ */ e("div", { "data-testid": n.capUtilizationCell, children: /* @__PURE__ */ e(y, { data: j(l.value, r.value) }) });
|
|
73
99
|
return /* @__PURE__ */ e(
|
|
74
|
-
|
|
100
|
+
k,
|
|
75
101
|
{
|
|
76
|
-
last:
|
|
102
|
+
last: T,
|
|
77
103
|
height: "auto",
|
|
78
104
|
className: "cursor-default",
|
|
79
|
-
style: {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
children: i ? /* @__PURE__ */ e(s, { span: "full", size: "sm", className: "px-3 py-0!", children: /* @__PURE__ */ t(
|
|
83
|
-
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,
|
|
84
108
|
{
|
|
85
|
-
columns: 2,
|
|
86
|
-
columnsXs: 2,
|
|
87
|
-
title: m(),
|
|
88
109
|
className: "w-full",
|
|
110
|
+
columns: 3,
|
|
111
|
+
columnsXs: 3,
|
|
112
|
+
title: h(),
|
|
89
113
|
children: [
|
|
90
114
|
/* @__PURE__ */ e(
|
|
91
|
-
|
|
115
|
+
a,
|
|
116
|
+
{
|
|
117
|
+
title: /* @__PURE__ */ e(m, { messageId: "components.poolAssetsTable.exposure" }),
|
|
118
|
+
children: f()
|
|
119
|
+
}
|
|
120
|
+
),
|
|
121
|
+
/* @__PURE__ */ e(
|
|
122
|
+
a,
|
|
92
123
|
{
|
|
93
|
-
title: /* @__PURE__ */ e(
|
|
94
|
-
children:
|
|
124
|
+
title: /* @__PURE__ */ e(m, { messageId: "components.poolAssetsTable.cap" }),
|
|
125
|
+
children: g()
|
|
95
126
|
}
|
|
96
127
|
),
|
|
97
128
|
/* @__PURE__ */ e(
|
|
98
|
-
|
|
129
|
+
a,
|
|
99
130
|
{
|
|
100
|
-
title: /* @__PURE__ */ e(
|
|
101
|
-
children:
|
|
131
|
+
title: /* @__PURE__ */ e(m, { messageId: "components.poolAssetsTable.capUtilization" }),
|
|
132
|
+
children: v()
|
|
102
133
|
}
|
|
103
134
|
)
|
|
104
135
|
]
|
|
105
136
|
}
|
|
106
|
-
) }) : /* @__PURE__ */
|
|
107
|
-
/* @__PURE__ */ e(
|
|
108
|
-
/* @__PURE__ */ e(
|
|
109
|
-
/* @__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() })
|
|
110
142
|
] })
|
|
111
143
|
}
|
|
112
144
|
);
|
|
113
145
|
}
|
|
114
146
|
export {
|
|
115
|
-
|
|
147
|
+
he as PoolAssetsTableRow
|
|
116
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";
|
|
@@ -33,8 +36,6 @@ import "../../../../simple-accordion/simple-accordion.js";
|
|
|
33
36
|
import "../../../../tip-card/tip-card.js";
|
|
34
37
|
import "../../../../typography/typography.js";
|
|
35
38
|
import "../../../../points-icon/points-icon.js";
|
|
36
|
-
import "@fortawesome/free-solid-svg-icons";
|
|
37
|
-
import "../../../../icons/fa-icon.js";
|
|
38
39
|
import "../../../../vertical-indicator/vertical-indicator.js";
|
|
39
40
|
import "../../../../base/page-title/page-title.js";
|
|
40
41
|
import "../../../../detailed-page-title/detailed-page-title-copy-button.js";
|
|
@@ -57,8 +58,8 @@ import "../../../../slider/slider.js";
|
|
|
57
58
|
import "../../../../slider/slider-context.js";
|
|
58
59
|
import "../../../../text-button/text-button.js";
|
|
59
60
|
import "../../../../with-title/with-title.js";
|
|
60
|
-
import "../../../../status-elements/status-elements.js";
|
|
61
61
|
import "react-router-dom";
|
|
62
|
+
import "../../../../status-elements/status-elements.js";
|
|
62
63
|
import { StyledDialogContainer as C } from "../../../../client-adapters/styled-dialog-container/styled-dialog-container.js";
|
|
63
64
|
import { Modal as u } from "../../../../modal/modal.js";
|
|
64
65
|
import "@radix-ui/react-dialog";
|
|
@@ -75,11 +76,13 @@ import "../../../../input/input.js";
|
|
|
75
76
|
import "../../../../label/label.js";
|
|
76
77
|
import "../../../../simple-dropdown/simple-dropdown.js";
|
|
77
78
|
import "../../../../simple-dropdown/simple-dropdown-menu-item.js";
|
|
78
|
-
import "../../../../help-tip/help-tip.js";
|
|
79
79
|
import "../../../../base/tabber/tabber.js";
|
|
80
80
|
import "../../../../link/link.js";
|
|
81
81
|
import "../../../../rounded-image/rounded-image.js";
|
|
82
|
+
import "../../../../network-icon/network-indicator.js";
|
|
82
83
|
import "../../../../base-link/base-link.js";
|
|
84
|
+
import "../../../../help-tip/help-tip.js";
|
|
85
|
+
import "../../../../base-table/base-table-line.js";
|
|
83
86
|
import "../../../../navigation-context/navigation-context.js";
|
|
84
87
|
import "../../../../cards/card/card.js";
|
|
85
88
|
import "../../../../checkbox-item/checkbox-item.js";
|
|
@@ -131,7 +134,7 @@ import "../../../../split-list/split-list.js";
|
|
|
131
134
|
import "../../../../status-dot/status-dot.js";
|
|
132
135
|
import "../../../../textarea/textarea.js";
|
|
133
136
|
import "../../../../theme-provider.js";
|
|
134
|
-
function
|
|
137
|
+
function Wo({
|
|
135
138
|
open: i,
|
|
136
139
|
onClose: t,
|
|
137
140
|
title: m,
|
|
@@ -173,5 +176,5 @@ function Qo({
|
|
|
173
176
|
) });
|
|
174
177
|
}
|
|
175
178
|
export {
|
|
176
|
-
|
|
179
|
+
Wo as TransactionConfirmModalView
|
|
177
180
|
};
|