@gearbox-protocol/ui-kit 3.14.0-next.65 → 3.14.0-next.67
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/block-sync/block-sync.cjs +1 -1
- package/dist/cjs/components/block-sync-pill/block-sync-pill.cjs +1 -1
- package/dist/cjs/components/breakpoint-provider.cjs +1 -0
- 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/complex-input/complex-input.cjs +1 -1
- package/dist/cjs/components/composites/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-credit-managers-table/pool-credit-managers-table-head.cjs +1 -1
- package/dist/cjs/components/composites/pool-table/columns.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/cells/index.cjs +1 -1
- package/dist/cjs/components/composites/strategies-table/components/index.cjs +1 -1
- package/dist/cjs/components/composites/strategies-table/components/points-feature/points-feature.cjs +1 -1
- package/dist/cjs/components/composites/strategies-table/components/rewards-tooltip/tooltip-content.cjs +1 -1
- package/dist/cjs/components/composites/strategies-table/components/strategies-table.cjs +1 -1
- package/dist/cjs/components/composites/strategies-table/index.cjs +1 -1
- package/dist/cjs/components/composites/strategies-table/types/index.cjs +1 -1
- package/dist/cjs/components/composites/strategies-table/types/rewards-cell.cjs +1 -0
- package/dist/cjs/components/composites/tx-preview/confirm/amounts/TransactionConfirmAmountField.cjs +1 -1
- package/dist/cjs/components/composites/tx-preview/confirm/dialog/TransactionConfirmModalView.cjs +1 -1
- package/dist/cjs/components/composites/tx-preview/confirm/dialog/TransactionConfirmShell.cjs +1 -1
- package/dist/cjs/components/composites/tx-preview/confirm/result/TransactionConfirmFailureResult.cjs +1 -1
- package/dist/cjs/components/composites/tx-preview/confirm/result/TransactionConfirmSuccessResult.cjs +1 -1
- package/dist/cjs/components/compound-apy/compound-apy-legacy.cjs +1 -0
- package/dist/cjs/components/compound-apy/compound-apy.cjs +1 -1
- package/dist/cjs/components/compound-apy/index.cjs +1 -1
- package/dist/cjs/components/detailed-page-title/detailed-page-title.cjs +1 -1
- package/dist/cjs/components/index.cjs +1 -1
- package/dist/cjs/components/markdown-viewer/markdown-viewer.cjs +1 -1
- package/dist/cjs/components/pool-apy-tooltip/apy-tooltip.cjs +1 -0
- package/dist/cjs/components/pool-apy-tooltip/index.cjs +1 -1
- package/dist/cjs/components/pool-apy-tooltip/pool-apy-tooltip.cjs +1 -1
- package/dist/cjs/components/time-to-liquidation/time-to-liquidation.cjs +1 -1
- package/dist/cjs/components/token-icon/token-icon.cjs +1 -1
- package/dist/cjs/components/token-symbol/index.cjs +1 -1
- package/dist/cjs/components/token-symbol/token-symbol.cjs +1 -1
- package/dist/cjs/components/tokens-list-cell/tokens-list-cell.cjs +1 -1
- package/dist/cjs/components/with-copy/with-copy.cjs +1 -1
- package/dist/cjs/components/yield-breakdown-tooltip/index.cjs +1 -0
- package/dist/cjs/components/yield-breakdown-tooltip/yield-breakdown-tooltip.cjs +1 -0
- package/dist/cjs/hooks/use-debounce-call.cjs +1 -1
- package/dist/cjs/hooks/use-media-query.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/locale/en.json.cjs +1 -1
- package/dist/cjs/types/common.cjs +1 -1
- package/dist/cjs/utils/apy-breakdown.cjs +1 -0
- package/dist/cjs/utils/bps.cjs +1 -0
- package/dist/cjs/utils/index.cjs +1 -1
- package/dist/cjs/utils/token-icon-source.cjs +1 -0
- package/dist/esm/components/assets-list-cell/assets-list-cell.js +132 -206
- package/dist/esm/components/block-sync/block-sync.js +5 -4
- package/dist/esm/components/block-sync-pill/block-sync-pill.js +5 -4
- package/dist/esm/components/breakpoint-provider.js +67 -0
- package/dist/esm/components/checkbox/checkbox-labeled.js +3 -2
- package/dist/esm/components/client-adapters/styled-rounded-image/styled-rounded-image.js +3 -2
- package/dist/esm/components/complex-input/complex-input.js +5 -4
- package/dist/esm/components/composites/index.js +86 -81
- package/dist/esm/components/composites/pool-assets-table/pool-assets-table-head.js +3 -2
- package/dist/esm/components/composites/pool-credit-managers-table/pool-credit-managers-table-head.js +3 -2
- package/dist/esm/components/composites/pool-table/columns.js +61 -60
- package/dist/esm/components/composites/strategies-table/columns.js +55 -86
- package/dist/esm/components/composites/strategies-table/components/cells/cells.js +150 -110
- package/dist/esm/components/composites/strategies-table/components/cells/index.js +7 -5
- package/dist/esm/components/composites/strategies-table/components/index.js +32 -30
- package/dist/esm/components/composites/strategies-table/components/points-feature/points-feature.js +35 -32
- package/dist/esm/components/composites/strategies-table/components/rewards-tooltip/tooltip-content.js +91 -224
- package/dist/esm/components/composites/strategies-table/components/strategies-table.js +26 -24
- package/dist/esm/components/composites/strategies-table/index.js +36 -31
- package/dist/esm/components/composites/strategies-table/types/index.js +5 -1
- package/dist/esm/components/composites/strategies-table/types/rewards-cell.js +40 -0
- package/dist/esm/components/composites/tx-preview/confirm/amounts/TransactionConfirmAmountField.js +32 -189
- package/dist/esm/components/composites/tx-preview/confirm/dialog/TransactionConfirmModalView.js +5 -4
- package/dist/esm/components/composites/tx-preview/confirm/dialog/TransactionConfirmShell.js +26 -26
- package/dist/esm/components/composites/tx-preview/confirm/result/TransactionConfirmFailureResult.js +40 -38
- package/dist/esm/components/composites/tx-preview/confirm/result/TransactionConfirmSuccessResult.js +53 -47
- package/dist/esm/components/compound-apy/compound-apy-legacy.js +127 -0
- package/dist/esm/components/compound-apy/compound-apy.js +56 -245
- package/dist/esm/components/compound-apy/index.js +4 -2
- package/dist/esm/components/detailed-page-title/detailed-page-title.js +25 -180
- package/dist/esm/components/index.js +805 -787
- package/dist/esm/components/markdown-viewer/markdown-viewer.js +5 -4
- package/dist/esm/components/pool-apy-tooltip/apy-tooltip.js +155 -0
- package/dist/esm/components/pool-apy-tooltip/index.js +4 -2
- package/dist/esm/components/pool-apy-tooltip/pool-apy-tooltip.js +3 -3
- package/dist/esm/components/time-to-liquidation/time-to-liquidation.js +3 -2
- package/dist/esm/components/token-icon/token-icon.js +72 -58
- package/dist/esm/components/token-symbol/index.js +2 -3
- package/dist/esm/components/token-symbol/token-symbol.js +41 -62
- package/dist/esm/components/tokens-list-cell/tokens-list-cell.js +35 -192
- package/dist/esm/components/with-copy/with-copy.js +5 -4
- package/dist/esm/components/yield-breakdown-tooltip/index.js +4 -0
- package/dist/esm/components/yield-breakdown-tooltip/yield-breakdown-tooltip.js +222 -0
- package/dist/esm/hooks/use-debounce-call.js +3 -2
- package/dist/esm/hooks/use-media-query.js +49 -16
- package/dist/esm/index.js +974 -946
- package/dist/esm/locale/en.json.js +9 -2
- package/dist/esm/types/common.js +1 -6
- package/dist/esm/utils/apy-breakdown.js +18 -0
- package/dist/esm/utils/bps.js +4 -0
- package/dist/esm/utils/index.js +105 -95
- package/dist/esm/utils/token-icon-source.js +48 -0
- package/dist/globals.css +1 -1
- package/dist/types/components/assets-list-cell/assets-list-cell.d.ts +44 -4
- package/dist/types/components/breakpoint-provider.d.ts +56 -0
- package/dist/types/components/composites/pool-table/pool-table-backend-contract.types.d.ts +1 -1
- package/dist/types/components/composites/strategies-table/components/cells/cells.d.ts +34 -3
- package/dist/types/components/composites/strategies-table/components/points-feature/points-feature.d.ts +14 -10
- package/dist/types/components/composites/strategies-table/components/rewards-tooltip/tooltip-content.d.ts +10 -13
- package/dist/types/components/composites/strategies-table/index.d.ts +1 -1
- package/dist/types/components/composites/strategies-table/types/index.d.ts +1 -0
- package/dist/types/components/composites/strategies-table/types/rewards-cell.d.ts +48 -0
- package/dist/types/components/composites/strategies-table/types/rewards-tooltip.d.ts +37 -32
- package/dist/types/components/composites/strategies-table/types/table.d.ts +27 -12
- package/dist/types/components/composites/tx-preview/confirm/amounts/TransactionConfirmAmountField.d.ts +3 -3
- package/dist/types/components/composites/tx-preview/confirm/result/TransactionConfirmFailureResult.d.ts +4 -0
- package/dist/types/components/composites/tx-preview/confirm/result/TransactionConfirmSuccessResult.d.ts +5 -0
- package/dist/types/components/compound-apy/compound-apy-legacy.d.ts +109 -0
- package/dist/types/components/compound-apy/compound-apy.d.ts +18 -94
- package/dist/types/components/compound-apy/index.d.ts +1 -0
- package/dist/types/components/index.d.ts +3 -1
- package/dist/types/components/points-icon/index.d.ts +1 -1
- package/dist/types/components/points-icon/points-icon.d.ts +13 -2
- package/dist/types/components/pool-apy-tooltip/apy-tooltip.d.ts +20 -0
- package/dist/types/components/pool-apy-tooltip/index.d.ts +1 -0
- package/dist/types/components/pool-apy-tooltip/pool-apy-tooltip.d.ts +18 -1
- package/dist/types/components/token-icon/token-icon.d.ts +11 -2
- package/dist/types/components/token-symbol/token-symbol.d.ts +4 -4
- package/dist/types/components/yield-breakdown-tooltip/index.d.ts +1 -0
- package/dist/types/components/yield-breakdown-tooltip/yield-breakdown-tooltip.d.ts +32 -0
- package/dist/types/hooks/use-media-query.d.ts +5 -1
- package/dist/types/index.d.ts +2 -0
- package/dist/types/locale/en.json.d.ts +10 -2
- package/dist/types/types/common.d.ts +5 -11
- package/dist/types/utils/apy-breakdown.d.ts +18 -0
- package/dist/types/utils/bps.d.ts +3 -0
- package/dist/types/utils/index.d.ts +3 -0
- package/dist/types/utils/token-icon-source.d.ts +28 -0
- package/package.json +2 -2
|
@@ -1,40 +1,45 @@
|
|
|
1
|
-
import { customStrategyColumn as
|
|
2
|
-
import { APYFeature as
|
|
3
|
-
import { RWAFeature as
|
|
4
|
-
import { DisabledWrap as
|
|
5
|
-
import { Feature as
|
|
6
|
-
import { FeatureRoot as
|
|
7
|
-
import { StrategiesTableNotFoundLine as
|
|
8
|
-
import { PointsFeature as A, PointsFeatureTooltip as
|
|
9
|
-
import { RewardsTooltip as Y, RewardsTooltipHover as
|
|
10
|
-
import { RewardsTooltipRoot as
|
|
11
|
-
import { RewardsTooltipView as
|
|
1
|
+
import { customStrategyColumn as r, strategyColumn as t, strategyLeverageColumn as a, strategyRewardsColumn as s } from "./columns.js";
|
|
2
|
+
import { APYFeature as i, APYFeatureTooltip as l } from "./components/apy-feature/apy-feature.js";
|
|
3
|
+
import { RWAFeature as g, StrategiesRewardsCell as f, StrategiesRewardsCellLegacy as u, StrategyPoints as n, StrategyPointsLegacy as x, ZeroSlippageFeature as d } from "./components/cells/cells.js";
|
|
4
|
+
import { DisabledWrap as w, Plus as F, TitleGrid as T } from "./components/cells/cells.styles.js";
|
|
5
|
+
import { Feature as C } from "./components/feature/feature.js";
|
|
6
|
+
import { FeatureRoot as S } from "./components/feature/feature.styles.js";
|
|
7
|
+
import { StrategiesTableNotFoundLine as b } from "./components/not-found-line.js";
|
|
8
|
+
import { PointsFeature as A, PointsFeatureTooltip as v, PointsLabel as D } from "./components/points-feature/points-feature.js";
|
|
9
|
+
import { RewardsTooltip as Y, RewardsTooltipHover as h } from "./components/rewards-tooltip/rewards-tooltip.js";
|
|
10
|
+
import { RewardsTooltipRoot as H } from "./components/rewards-tooltip/rewards-tooltip-root.js";
|
|
11
|
+
import { RewardsTooltipView as O } from "./components/rewards-tooltip/rewards-tooltip-view.js";
|
|
12
12
|
import { RewardsTooltipContent as Z } from "./components/rewards-tooltip/tooltip-content.js";
|
|
13
|
-
import { StrategiesTable as
|
|
13
|
+
import { StrategiesTable as k } from "./components/strategies-table.js";
|
|
14
|
+
import { pointsChipsOfPrograms as z, rewardsCellDataFromLegacy as B } from "./types/rewards-cell.js";
|
|
14
15
|
export {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
i as APYFeature,
|
|
17
|
+
l as APYFeatureTooltip,
|
|
18
|
+
w as DisabledWrap,
|
|
19
|
+
C as Feature,
|
|
20
|
+
S as FeatureRoot,
|
|
21
|
+
F as Plus,
|
|
21
22
|
A as PointsFeature,
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
v as PointsFeatureTooltip,
|
|
24
|
+
D as PointsLabel,
|
|
25
|
+
g as RWAFeature,
|
|
25
26
|
Y as RewardsTooltip,
|
|
26
27
|
Z as RewardsTooltipContent,
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
h as RewardsTooltipHover,
|
|
29
|
+
H as RewardsTooltipRoot,
|
|
30
|
+
O as RewardsTooltipView,
|
|
30
31
|
f as StrategiesRewardsCell,
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
u as StrategiesRewardsCellLegacy,
|
|
33
|
+
k as StrategiesTable,
|
|
34
|
+
b as StrategiesTableNotFoundLine,
|
|
35
|
+
n as StrategyPoints,
|
|
36
|
+
x as StrategyPointsLegacy,
|
|
34
37
|
T as TitleGrid,
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
+
d as ZeroSlippageFeature,
|
|
39
|
+
r as customStrategyColumn,
|
|
40
|
+
z as pointsChipsOfPrograms,
|
|
41
|
+
B as rewardsCellDataFromLegacy,
|
|
42
|
+
t as strategyColumn,
|
|
38
43
|
a as strategyLeverageColumn,
|
|
39
|
-
|
|
44
|
+
s as strategyRewardsColumn
|
|
40
45
|
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
function r(a) {
|
|
2
|
+
const e = [];
|
|
3
|
+
return (a.hasRewards ?? !1) && e.push(
|
|
4
|
+
a.rewards.map((t, s) => ({
|
|
5
|
+
reward: {
|
|
6
|
+
name: t.name,
|
|
7
|
+
type: t.type,
|
|
8
|
+
units: t.units
|
|
9
|
+
},
|
|
10
|
+
rate: a.rewardRates?.[s] ?? 0n
|
|
11
|
+
}))
|
|
12
|
+
), (a.hasDebtRewards ?? !1) && e.push(
|
|
13
|
+
a.debtRewards.map((t, s) => ({
|
|
14
|
+
reward: {
|
|
15
|
+
name: t.name,
|
|
16
|
+
type: t.type,
|
|
17
|
+
units: t.units
|
|
18
|
+
},
|
|
19
|
+
rate: a.debtRewardRates?.[s] ?? 0n
|
|
20
|
+
}))
|
|
21
|
+
), {
|
|
22
|
+
maxApy: a.hasAPY ?? !1 ? a.maxAPY : void 0,
|
|
23
|
+
bonusApy: a.bonusAPY?.value,
|
|
24
|
+
pointGroups: e,
|
|
25
|
+
apyLoading: a.apyLoading
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
function p(a) {
|
|
29
|
+
return a.map((e) => ({
|
|
30
|
+
reward: {
|
|
31
|
+
name: e.name,
|
|
32
|
+
type: e.id
|
|
33
|
+
},
|
|
34
|
+
rate: e.multiplier
|
|
35
|
+
}));
|
|
36
|
+
}
|
|
37
|
+
export {
|
|
38
|
+
p as pointsChipsOfPrograms,
|
|
39
|
+
r as rewardsCellDataFromLegacy
|
|
40
|
+
};
|
package/dist/esm/components/composites/tx-preview/confirm/amounts/TransactionConfirmAmountField.js
CHANGED
|
@@ -1,175 +1,18 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as n, Fragment as l, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { cva as g } from "class-variance-authority";
|
|
3
|
-
import "../../../../
|
|
4
|
-
import "
|
|
3
|
+
import { FadeoutLoading as h } from "../../../../fadeout-loading/fadeout-loading.js";
|
|
4
|
+
import { TokenIcon as u } from "../../../../token-icon/token-icon.js";
|
|
5
|
+
import { TokenTemplate as v } from "../../../../token-template/token-template.js";
|
|
5
6
|
import "react";
|
|
6
|
-
import "@fortawesome/free-solid-svg-icons";
|
|
7
|
-
import "../../../../icons/fa-icon.js";
|
|
8
7
|
import "@gearbox-protocol/sdk";
|
|
9
|
-
import { cn as
|
|
8
|
+
import { cn as k } from "../../../../../utils/cn.js";
|
|
10
9
|
import "sonner";
|
|
11
|
-
import { formatMoney as
|
|
10
|
+
import { formatMoney as N } from "../../../../../utils/format-money.js";
|
|
12
11
|
import "@gearbox-protocol/sdk/common-utils";
|
|
13
12
|
import "luxon";
|
|
14
13
|
import "../../../../../utils/z-index.js";
|
|
15
|
-
import "../../../../alert-badge/alert-badge.js";
|
|
16
|
-
import "../../../../alert-dialog/alert-dialog.js";
|
|
17
|
-
import "../../../../alert-modal/alert-modal.js";
|
|
18
|
-
import "../../../../tooltip/simple-tooltip.js";
|
|
19
|
-
import "../../../../tooltip/tooltip.js";
|
|
20
|
-
import "react-intl";
|
|
21
|
-
import "../../../../arc-loader/arc-loader.js";
|
|
22
|
-
import "../../../../asset-line/asset-line.js";
|
|
23
|
-
import "../../../../buttons/back-button/back-button.js";
|
|
24
|
-
import "../../../../buttons/button/button.js";
|
|
25
|
-
import "../../../../buttons/copy-button/copy-button.js";
|
|
26
|
-
import "../../../../buttons/external-button/external-button.js";
|
|
27
|
-
import "../../../../buttons/filter-button/filter-button.js";
|
|
28
|
-
import "../../../../buttons/navigation-button/navigation-button.js";
|
|
29
|
-
import "../../../../buttons/tab-button/tab-button.js";
|
|
30
|
-
import { TokenIcon as v } from "../../../../token-icon/token-icon.js";
|
|
31
|
-
import "wagmi";
|
|
32
|
-
import "../../../../auth/wallet-ui-context.js";
|
|
33
|
-
import "../../../../avatar/avatar.js";
|
|
34
|
-
import "../../../../badge/badge.js";
|
|
35
|
-
import "../../../../base-link/base-link.js";
|
|
36
|
-
import "../../../../navigation-context/navigation-context.js";
|
|
37
|
-
import "../../../../button-checkbox/button-checkbox.js";
|
|
38
|
-
import "../../../../card-grid/card-grid.js";
|
|
39
|
-
import "../../../../cards/card/card.js";
|
|
40
|
-
import "../../../../carousel/carousel.js";
|
|
41
|
-
import "../../../../checkbox/checkbox.js";
|
|
42
|
-
import "../../../../checkbox/checkbox-labeled.js";
|
|
43
|
-
import "../../../../checkbox-item/checkbox-item.js";
|
|
44
|
-
import "../../../../client-adapters/styled-button/styled-button.js";
|
|
45
|
-
import "../../../../client-adapters/styled-dialog-container/styled-dialog-container.js";
|
|
46
|
-
import "../../../../client-adapters/styled-rounded-image/styled-rounded-image.js";
|
|
47
|
-
import "../../../../colored-text/colored-text.js";
|
|
48
|
-
import "../../../../input/input.js";
|
|
49
|
-
import "../../../../with-title/with-title.js";
|
|
50
|
-
import "../../../../smart-number-input/balance-indicator.js";
|
|
51
|
-
import "../../../../smart-number-input/smart-number-input.js";
|
|
52
|
-
import "../../../credit-account-history/credit-account-history.js";
|
|
53
|
-
import "../../../../simple-dropdown/simple-dropdown.js";
|
|
54
|
-
import "../../../../simple-dropdown/simple-dropdown-menu-item.js";
|
|
55
|
-
import "../../../../typography/typography.js";
|
|
56
|
-
import "../../../../table/grid-table.js";
|
|
57
|
-
import { getSymbolOrIcon as b } from "../../../../token-symbol/token-symbol.js";
|
|
58
|
-
import "../../../../help-tip/help-tip.js";
|
|
59
|
-
import "../../../../description/description.js";
|
|
60
|
-
import { TokenTemplate as N } from "../../../../token-template/token-template.js";
|
|
61
|
-
import "../../../../confirm-menu/confirm-menu.js";
|
|
62
|
-
import "../../../../dialog/dialog-modal-container.js";
|
|
63
|
-
import "../../../../text-button/text-button.js";
|
|
64
|
-
import "../../../../vertical-indicator/vertical-indicator.js";
|
|
65
|
-
import "../../../../points-icon/points-icon.js";
|
|
66
|
-
import "../../../../skeleton/skeleton.js";
|
|
67
|
-
import "../../../../vertical-list/vertical-list.js";
|
|
68
|
-
import "../../../../rounded-image/rounded-image.js";
|
|
69
|
-
import "../../../../progress/progress.js";
|
|
70
|
-
import "../../../../pool-indicator-icon/pool-indicator-icon.js";
|
|
71
|
-
import "../../../strategies-table/components/feature/feature.styles.js";
|
|
72
|
-
import "viem";
|
|
73
|
-
import "../../../../icon-button/icon-button.js";
|
|
74
|
-
import "../../../../separate-line/separate-line.js";
|
|
75
|
-
import "../../../../tip-card/tip-card.js";
|
|
76
|
-
import "../../../strategies-table/components/rewards-tooltip/rewards-tooltip-root.js";
|
|
77
14
|
import { TransactionConfirmAmountFieldTest as T } from "./constants.js";
|
|
78
|
-
|
|
79
|
-
import "../../../../modal/modal.js";
|
|
80
|
-
import "../../../../dialog/dialog-container.js";
|
|
81
|
-
import "../../../../spinner-loader/spinner-loader.js";
|
|
82
|
-
import "../../../../currency-button/currency-button.js";
|
|
83
|
-
import "../../../../detailed-apy/detailed-apy.js";
|
|
84
|
-
import "../../../../detailed-page-title/detailed-page-title.js";
|
|
85
|
-
import "../../../../detailed-page-title/detailed-page-title-copy-button.js";
|
|
86
|
-
import "../../../../detailed-page-title/detailed-page-title-explorer-dropdown.js";
|
|
87
|
-
import "@radix-ui/react-dialog";
|
|
88
|
-
import "../../../../dialog/dialog-content.js";
|
|
89
|
-
import "../../../../dialog/dialog-description.js";
|
|
90
|
-
import "../../../../dialog/dialog-footer.js";
|
|
91
|
-
import "../../../../dialog/dialog-header.js";
|
|
92
|
-
import "../../../../dialog/dialog-title.js";
|
|
93
|
-
import "../../../../dialog/dialog-overlay.js";
|
|
94
|
-
import "../../../../label/label.js";
|
|
95
|
-
import "../../../../dropdown-menu/dropdown-menu.js";
|
|
96
|
-
import "../../../../dropdown-menu/dropdown-menu-checkbox-item.js";
|
|
97
|
-
import "../../../../dropdown-menu/dropdown-menu-content.js";
|
|
98
|
-
import "../../../../dropdown-menu/dropdown-menu-item.js";
|
|
99
|
-
import "../../../../dropdown-menu/dropdown-menu-label.js";
|
|
100
|
-
import "../../../../dropdown-menu/dropdown-menu-radio-item.js";
|
|
101
|
-
import "../../../../dropdown-menu/dropdown-menu-separator.js";
|
|
102
|
-
import "../../../../dropdown-menu/dropdown-menu-shortcut.js";
|
|
103
|
-
import "../../../../dropdown-menu/dropdown-menu-sub-content.js";
|
|
104
|
-
import "../../../../dropdown-menu/dropdown-menu-sub-trigger.js";
|
|
105
|
-
import "../../../../edit-input/edit-input.js";
|
|
106
|
-
import { FadeoutLoading as k } from "../../../../fadeout-loading/fadeout-loading.js";
|
|
107
|
-
import "../../../../filter/filter-block.js";
|
|
108
|
-
import "../../../../filter/filter-checkbox-item.js";
|
|
109
|
-
import "../../../../filter/filter-chip.js";
|
|
110
|
-
import "../../../../filter/filter-chips.js";
|
|
111
|
-
import "../../../../filter/filter-dropdown-item.js";
|
|
112
|
-
import "../../../../filter/filter-group.js";
|
|
113
|
-
import "../../../../filter/filter-label.js";
|
|
114
|
-
import "../../../../search-line/search-line.js";
|
|
115
|
-
import "../../../../tabs/tabs.js";
|
|
116
|
-
import "../../../../filter/filter-modal-item.js";
|
|
117
|
-
import "../../../../filter/filter-radio-item.js";
|
|
118
|
-
import "../../../../filter/filter-separator.js";
|
|
119
|
-
import "../../../../filter/variants.js";
|
|
120
|
-
import "../../../../graph/formatters.js";
|
|
121
|
-
import "lightweight-charts";
|
|
122
|
-
import "../../../../graph/graph-view.js";
|
|
123
|
-
import "../../../../health-factor/health-factor.js";
|
|
124
|
-
import "../../../../horizontal-indicator/horizontal-indicator.js";
|
|
125
|
-
import "../../../../layout/app-footer/app-footer.js";
|
|
126
|
-
import "../../../../layout/app-header/app-header.js";
|
|
127
|
-
import "../../../../layout/col/col.js";
|
|
128
|
-
import "../../../../layout/container/container.js";
|
|
129
|
-
import "../../../../layout/footer/footer.js";
|
|
130
|
-
import "../../../../layout/grid/grid.js";
|
|
131
|
-
import "../../../../layout/header/header.js";
|
|
132
|
-
import "../../../../layout/layout/layout.js";
|
|
133
|
-
import "../../../../layout/main-aside-layout/main-aside-layout.js";
|
|
134
|
-
import "../../../../page-title/page-title.js";
|
|
135
|
-
import "../../../../layout/social-icons/social-icons.js";
|
|
136
|
-
import "../../../../legal-agreement/legal-agreement-theme.js";
|
|
137
|
-
import "../../../../link/link.js";
|
|
138
|
-
import "../../../../../utils/reactochart-compat.js";
|
|
139
|
-
import "../../../../status-elements/status-elements.js";
|
|
140
|
-
import "../../../../loader/loader.js";
|
|
141
|
-
import "../../../../loading/loading.js";
|
|
142
|
-
import "../../../../loading-bar/loading-bar.js";
|
|
143
|
-
import "react-markdown";
|
|
144
|
-
import "remark-gfm";
|
|
145
|
-
import "../../../../navbar/navbar.js";
|
|
146
|
-
import "../../../../navbar/navbar-indicator-context.js";
|
|
147
|
-
import "../../../../app-bar/app-bar.js";
|
|
148
|
-
import "../../../../navitem/navitem.js";
|
|
149
|
-
import "../../../../progress-bar/progress-bar.js";
|
|
150
|
-
import "../../../../radio-group/radio-group.js";
|
|
151
|
-
import "../../../../search-bar/search-bar.js";
|
|
152
|
-
import "../../../../segmented-control/segmented-control.js";
|
|
153
|
-
import "../../../../select/select.js";
|
|
154
|
-
import "../../../../separator/separator.js";
|
|
155
|
-
import "../../../../simple-accordion/simple-accordion.js";
|
|
156
|
-
import "../../../../slider/slider.js";
|
|
157
|
-
import "../../../../slider/slider-context.js";
|
|
158
|
-
import "@radix-ui/react-slider";
|
|
159
|
-
import "../../../../spinner/spinner.js";
|
|
160
|
-
import "../../../../split-list/split-list.js";
|
|
161
|
-
import "../../../../stat-badge/stat-badge.js";
|
|
162
|
-
import "../../../../status-dot/status-dot.js";
|
|
163
|
-
import "../../../../stepper/stepper.js";
|
|
164
|
-
import "../../../../switch/switch.js";
|
|
165
|
-
import "../../../../table/table.js";
|
|
166
|
-
import "../../../../table/grid-table-loader.js";
|
|
167
|
-
import "../../../../textarea/textarea.js";
|
|
168
|
-
import "../../../../theme-provider.js";
|
|
169
|
-
import "../../../../time-to-liquidation/time-to-liquidation.js";
|
|
170
|
-
import "../../../../toggle/toggle.js";
|
|
171
|
-
import "../../../../with-filter-button/with-filter-button.js";
|
|
172
|
-
const S = "≈", F = g(
|
|
15
|
+
const b = "≈", F = g(
|
|
173
16
|
"flex w-full items-center justify-between bg-gray-20 px-4 py-3",
|
|
174
17
|
{
|
|
175
18
|
variants: {
|
|
@@ -187,48 +30,48 @@ const S = "≈", F = g(
|
|
|
187
30
|
defaultVariants: { position: "first", size: "md" }
|
|
188
31
|
}
|
|
189
32
|
);
|
|
190
|
-
function
|
|
191
|
-
label:
|
|
192
|
-
primaryAmount:
|
|
193
|
-
secondaryAmount:
|
|
194
|
-
loading:
|
|
195
|
-
position:
|
|
196
|
-
size:
|
|
33
|
+
function E({
|
|
34
|
+
label: a,
|
|
35
|
+
primaryAmount: o,
|
|
36
|
+
secondaryAmount: t,
|
|
37
|
+
loading: d = !1,
|
|
38
|
+
position: m,
|
|
39
|
+
size: p = "md",
|
|
197
40
|
maxLength: c,
|
|
198
41
|
approximate: f
|
|
199
42
|
}) {
|
|
200
|
-
const { isApproximate:
|
|
201
|
-
|
|
202
|
-
/* @__PURE__ */
|
|
203
|
-
|
|
204
|
-
/* @__PURE__ */
|
|
205
|
-
|
|
43
|
+
const { isApproximate: i = !1, approximateSymbol: r = b } = f || {}, x = o && "node" in o ? o.node : /* @__PURE__ */ n(l, { children: [
|
|
44
|
+
o.token && /* @__PURE__ */ e(u, { token: o.token, size: 16 }),
|
|
45
|
+
/* @__PURE__ */ n("span", { children: [
|
|
46
|
+
i && /* @__PURE__ */ e("span", { children: r }),
|
|
47
|
+
/* @__PURE__ */ e(
|
|
48
|
+
v,
|
|
206
49
|
{
|
|
207
|
-
value:
|
|
208
|
-
token:
|
|
50
|
+
value: o?.value,
|
|
51
|
+
token: o.token,
|
|
209
52
|
maxLength: c
|
|
210
53
|
}
|
|
211
54
|
)
|
|
212
55
|
] })
|
|
213
|
-
] }),
|
|
214
|
-
|
|
215
|
-
|
|
56
|
+
] }), s = t && "node" in t ? t.node : t?.valueUSD ? /* @__PURE__ */ n(l, { children: [
|
|
57
|
+
i && /* @__PURE__ */ e("span", { children: r }),
|
|
58
|
+
N(t.valueUSD)
|
|
216
59
|
] }) : null;
|
|
217
|
-
return /* @__PURE__ */
|
|
60
|
+
return /* @__PURE__ */ n(
|
|
218
61
|
"div",
|
|
219
62
|
{
|
|
220
|
-
className:
|
|
63
|
+
className: k(F({ position: m, size: p })),
|
|
221
64
|
"data-testid": T.root,
|
|
222
65
|
children: [
|
|
223
|
-
/* @__PURE__ */
|
|
224
|
-
/* @__PURE__ */
|
|
225
|
-
/* @__PURE__ */
|
|
226
|
-
|
|
66
|
+
/* @__PURE__ */ e("span", { className: "text-sm font-medium text-foreground", children: a }),
|
|
67
|
+
/* @__PURE__ */ n("div", { className: "flex flex-col items-end gap-0.5", children: [
|
|
68
|
+
/* @__PURE__ */ e(h, { loading: d, children: /* @__PURE__ */ e("span", { className: "inline-flex items-center gap-1.5 text-sm font-medium text-foreground", children: x }) }),
|
|
69
|
+
s && /* @__PURE__ */ e("span", { className: "text-xs leading-[130%] text-secondary-foreground", children: s })
|
|
227
70
|
] })
|
|
228
71
|
]
|
|
229
72
|
}
|
|
230
73
|
);
|
|
231
74
|
}
|
|
232
75
|
export {
|
|
233
|
-
|
|
76
|
+
E as TransactionConfirmAmountField
|
|
234
77
|
};
|
package/dist/esm/components/composites/tx-preview/confirm/dialog/TransactionConfirmModalView.js
CHANGED
|
@@ -32,6 +32,7 @@ import "../../../../avatar/avatar.js";
|
|
|
32
32
|
import "../../../../badge/badge.js";
|
|
33
33
|
import "../../../../base-link/base-link.js";
|
|
34
34
|
import "../../../../navigation-context/navigation-context.js";
|
|
35
|
+
import "../../../../breakpoint-provider.js";
|
|
35
36
|
import "../../../../button-checkbox/button-checkbox.js";
|
|
36
37
|
import "../../../../card-grid/card-grid.js";
|
|
37
38
|
import "../../../../cards/card/card.js";
|
|
@@ -60,13 +61,12 @@ import "../../../../dialog/dialog-modal-container.js";
|
|
|
60
61
|
import "../../../../text-button/text-button.js";
|
|
61
62
|
import "../../../../vertical-indicator/vertical-indicator.js";
|
|
62
63
|
import "../../../../points-icon/points-icon.js";
|
|
63
|
-
import "../../../../skeleton/skeleton.js";
|
|
64
64
|
import "../../../../vertical-list/vertical-list.js";
|
|
65
|
+
import "../../../../skeleton/skeleton.js";
|
|
65
66
|
import "../../../../rounded-image/rounded-image.js";
|
|
66
67
|
import "../../../../progress/progress.js";
|
|
67
68
|
import "../../../../pool-indicator-icon/pool-indicator-icon.js";
|
|
68
69
|
import "../../../strategies-table/components/feature/feature.styles.js";
|
|
69
|
-
import "viem";
|
|
70
70
|
import "../../../../icon-button/icon-button.js";
|
|
71
71
|
import "../../../../separate-line/separate-line.js";
|
|
72
72
|
import "../../../../tip-card/tip-card.js";
|
|
@@ -89,6 +89,7 @@ import "../../../../dialog/dialog-footer.js";
|
|
|
89
89
|
import "../../../../dialog/dialog-header.js";
|
|
90
90
|
import "../../../../dialog/dialog-title.js";
|
|
91
91
|
import "../../../../dialog/dialog-overlay.js";
|
|
92
|
+
import "viem";
|
|
92
93
|
import "../../../../label/label.js";
|
|
93
94
|
import "../../../../dropdown-menu/dropdown-menu.js";
|
|
94
95
|
import "../../../../dropdown-menu/dropdown-menu-checkbox-item.js";
|
|
@@ -167,7 +168,7 @@ import "../../../../theme-provider.js";
|
|
|
167
168
|
import "../../../../time-to-liquidation/time-to-liquidation.js";
|
|
168
169
|
import "../../../../toggle/toggle.js";
|
|
169
170
|
import "../../../../with-filter-button/with-filter-button.js";
|
|
170
|
-
function
|
|
171
|
+
function Oi({
|
|
171
172
|
open: i,
|
|
172
173
|
onClose: t,
|
|
173
174
|
title: m,
|
|
@@ -209,5 +210,5 @@ function Li({
|
|
|
209
210
|
) });
|
|
210
211
|
}
|
|
211
212
|
export {
|
|
212
|
-
|
|
213
|
+
Oi as TransactionConfirmModalView
|
|
213
214
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as a, jsx as i, Fragment as N } from "react/jsx-runtime";
|
|
2
2
|
import { ErrorLineMessage as C } from "../../../../error-message/error-line-message.js";
|
|
3
3
|
import "react-intl";
|
|
4
4
|
import "../../../../buttons/button/button.js";
|
|
@@ -12,52 +12,52 @@ import "@gearbox-protocol/sdk/common-utils";
|
|
|
12
12
|
import "luxon";
|
|
13
13
|
import "../../../../../utils/z-index.js";
|
|
14
14
|
import { SkeletonStack as S } from "../../../../skeleton/skeleton-stack.js";
|
|
15
|
-
import { VSpace as
|
|
15
|
+
import { VSpace as s } from "../../../../vspace/vspace.js";
|
|
16
16
|
import { ProgressStepper as k } from "../stepper/ProgressStepper.js";
|
|
17
17
|
import { shouldShowTransactionProgressStepper as P } from "../stepper/transactionExecutionStepTypes.js";
|
|
18
18
|
import { computeTransactionConfirmDialogLayout as T } from "./computeTransactionConfirmDialogLayout.js";
|
|
19
19
|
import { TransactionConfirmDialogTest as r, transactionConfirmShellContentVariants as V, transactionConfirmPreviewScrollVariants as j } from "./constants.js";
|
|
20
20
|
function Q({
|
|
21
21
|
phase: h = "confirm",
|
|
22
|
-
header:
|
|
22
|
+
header: l,
|
|
23
23
|
preview: d,
|
|
24
|
-
previewLoading:
|
|
24
|
+
previewLoading: f = !1,
|
|
25
25
|
previewError: m,
|
|
26
|
-
previewErrorTitle:
|
|
27
|
-
previewClassName:
|
|
26
|
+
previewErrorTitle: u = "Unable to preview transaction",
|
|
27
|
+
previewClassName: p = j(),
|
|
28
28
|
execution: w,
|
|
29
29
|
progressSteps: o,
|
|
30
|
-
renderProgressStepLabel:
|
|
30
|
+
renderProgressStepLabel: n,
|
|
31
31
|
result: c,
|
|
32
|
-
className:
|
|
33
|
-
"data-testid":
|
|
32
|
+
className: x,
|
|
33
|
+
"data-testid": v = r.root
|
|
34
34
|
}) {
|
|
35
|
-
const g = !!(o &&
|
|
36
|
-
return /* @__PURE__ */
|
|
35
|
+
const g = !!(o && n && P(o)), t = T(h, g);
|
|
36
|
+
return /* @__PURE__ */ a(
|
|
37
37
|
"div",
|
|
38
38
|
{
|
|
39
|
-
className: V({ className:
|
|
40
|
-
"data-testid":
|
|
39
|
+
className: V({ className: x }),
|
|
40
|
+
"data-testid": v,
|
|
41
41
|
children: [
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
l ? /* @__PURE__ */ i("div", { className: "shrink-0", children: l }) : null,
|
|
43
|
+
l ? /* @__PURE__ */ i(s, { height: 16 }) : null,
|
|
44
44
|
t.showResult && c ? /* @__PURE__ */ i(
|
|
45
45
|
"div",
|
|
46
46
|
{
|
|
47
|
-
className: "min-h-0",
|
|
47
|
+
className: "flex min-h-0 flex-1 flex-col",
|
|
48
48
|
"data-testid": r.result,
|
|
49
49
|
children: c
|
|
50
50
|
}
|
|
51
51
|
) : null,
|
|
52
|
-
t.showResult ? null : /* @__PURE__ */
|
|
53
|
-
t.showPreview ? /* @__PURE__ */ i("div", { className:
|
|
52
|
+
t.showResult ? null : /* @__PURE__ */ a("div", { className: "flex min-h-0 flex-1 flex-col", children: [
|
|
53
|
+
t.showPreview ? /* @__PURE__ */ i("div", { className: p, children: f ? /* @__PURE__ */ i(S, { lines: 3 }) : m ? /* @__PURE__ */ i(
|
|
54
54
|
C,
|
|
55
55
|
{
|
|
56
56
|
err: m,
|
|
57
|
-
title:
|
|
57
|
+
title: u
|
|
58
58
|
}
|
|
59
59
|
) : d }) : null,
|
|
60
|
-
t.showPreview && t.showExecution ? /* @__PURE__ */ i(
|
|
60
|
+
t.showPreview && t.showExecution ? /* @__PURE__ */ i(s, { height: 24 }) : null,
|
|
61
61
|
t.showExecution ? /* @__PURE__ */ i(
|
|
62
62
|
"div",
|
|
63
63
|
{
|
|
@@ -67,8 +67,8 @@ function Q({
|
|
|
67
67
|
}
|
|
68
68
|
) : null
|
|
69
69
|
] }),
|
|
70
|
-
t.showProgressStepper && o &&
|
|
71
|
-
/* @__PURE__ */ i(
|
|
70
|
+
t.showProgressStepper && o && n ? /* @__PURE__ */ a(N, { children: [
|
|
71
|
+
/* @__PURE__ */ i(s, { height: 24 }),
|
|
72
72
|
/* @__PURE__ */ i(
|
|
73
73
|
"div",
|
|
74
74
|
{
|
|
@@ -78,10 +78,10 @@ function Q({
|
|
|
78
78
|
k,
|
|
79
79
|
{
|
|
80
80
|
tone: "muted",
|
|
81
|
-
steps: o.map((
|
|
82
|
-
id:
|
|
83
|
-
status:
|
|
84
|
-
label:
|
|
81
|
+
steps: o.map((e) => ({
|
|
82
|
+
id: e.id,
|
|
83
|
+
status: e.status,
|
|
84
|
+
label: n(e)
|
|
85
85
|
}))
|
|
86
86
|
}
|
|
87
87
|
)
|
package/dist/esm/components/composites/tx-preview/confirm/result/TransactionConfirmFailureResult.js
CHANGED
|
@@ -1,51 +1,53 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { faXmark as
|
|
3
|
-
import { FaIcon as
|
|
4
|
-
import { VSpace as
|
|
5
|
-
import { TransactionConfirmFailureResultTest as
|
|
1
|
+
import { jsxs as r, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { faXmark as n } from "@fortawesome/free-solid-svg-icons";
|
|
3
|
+
import { FaIcon as m } from "../../../../icons/fa-icon.js";
|
|
4
|
+
import { VSpace as i } from "../../../../vspace/vspace.js";
|
|
5
|
+
import { TransactionConfirmFailureResultTest as d } from "./constants.js";
|
|
6
6
|
function v({
|
|
7
|
-
title:
|
|
8
|
-
description:
|
|
9
|
-
footerAction:
|
|
7
|
+
title: a,
|
|
8
|
+
description: o,
|
|
9
|
+
footerAction: l,
|
|
10
10
|
iconSize: t = 48
|
|
11
11
|
}) {
|
|
12
|
-
const
|
|
13
|
-
return /* @__PURE__ */
|
|
12
|
+
const s = t + 32;
|
|
13
|
+
return /* @__PURE__ */ r(
|
|
14
14
|
"div",
|
|
15
15
|
{
|
|
16
|
-
className: "flex w-full flex-
|
|
17
|
-
"data-testid":
|
|
16
|
+
className: "flex min-h-0 w-full flex-1 flex-col",
|
|
17
|
+
"data-testid": d.root,
|
|
18
18
|
children: [
|
|
19
|
-
/* @__PURE__ */
|
|
20
|
-
"div",
|
|
21
|
-
{
|
|
22
|
-
className: "flex items-center justify-center rounded-full border-2 border-destructive bg-destructive/10",
|
|
23
|
-
style: { width: l, height: l },
|
|
24
|
-
children: /* @__PURE__ */ e(
|
|
25
|
-
c,
|
|
26
|
-
{
|
|
27
|
-
icon: o,
|
|
28
|
-
className: "text-destructive",
|
|
29
|
-
style: { width: t, height: t }
|
|
30
|
-
}
|
|
31
|
-
)
|
|
32
|
-
}
|
|
33
|
-
),
|
|
34
|
-
/* @__PURE__ */ e(r, { height: 24 }),
|
|
35
|
-
/* @__PURE__ */ e("div", { className: "text-xl font-medium leading-tight md:text-2xl", children: d }),
|
|
36
|
-
/* @__PURE__ */ e(r, { height: 12 }),
|
|
37
|
-
/* @__PURE__ */ e("div", { className: "text-sm text-secondary-foreground", children: m }),
|
|
38
|
-
i ? /* @__PURE__ */ s(n, { children: [
|
|
39
|
-
/* @__PURE__ */ e(r, { height: 24 }),
|
|
19
|
+
/* @__PURE__ */ r("div", { className: "flex min-h-0 w-full flex-1 flex-col items-center overflow-x-hidden overflow-y-auto text-center", children: [
|
|
40
20
|
/* @__PURE__ */ e(
|
|
41
21
|
"div",
|
|
42
22
|
{
|
|
43
|
-
className: "
|
|
44
|
-
|
|
45
|
-
children:
|
|
23
|
+
className: "flex items-center justify-center rounded-full border-2 border-destructive bg-destructive/10",
|
|
24
|
+
style: { width: s, height: s },
|
|
25
|
+
children: /* @__PURE__ */ e(
|
|
26
|
+
m,
|
|
27
|
+
{
|
|
28
|
+
icon: n,
|
|
29
|
+
className: "text-destructive",
|
|
30
|
+
style: { width: t, height: t }
|
|
31
|
+
}
|
|
32
|
+
)
|
|
46
33
|
}
|
|
47
|
-
)
|
|
48
|
-
|
|
34
|
+
),
|
|
35
|
+
/* @__PURE__ */ e(i, { height: 24 }),
|
|
36
|
+
/* @__PURE__ */ e("div", { className: "text-xl font-medium leading-tight md:text-2xl", children: a }),
|
|
37
|
+
/* @__PURE__ */ e(i, { height: 12 }),
|
|
38
|
+
/* @__PURE__ */ e("div", { className: "text-sm text-secondary-foreground", children: o })
|
|
39
|
+
] }),
|
|
40
|
+
l ? /* @__PURE__ */ r(
|
|
41
|
+
"div",
|
|
42
|
+
{
|
|
43
|
+
className: "w-full shrink-0",
|
|
44
|
+
"data-testid": d.footer,
|
|
45
|
+
children: [
|
|
46
|
+
/* @__PURE__ */ e(i, { height: 24 }),
|
|
47
|
+
l
|
|
48
|
+
]
|
|
49
|
+
}
|
|
50
|
+
) : null
|
|
49
51
|
]
|
|
50
52
|
}
|
|
51
53
|
);
|