@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,46 +1,46 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useTitleText as
|
|
3
|
-
import { FadeoutLoading as
|
|
4
|
-
import { HealthFactor as
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { useTitleText as h } from "../text/use-title-text.js";
|
|
3
|
+
import { FadeoutLoading as s } from "../../fadeout-loading/fadeout-loading.js";
|
|
4
|
+
import { HealthFactor as c } from "../../health-factor/health-factor.js";
|
|
5
5
|
import { FormattedMessageTyped as n } from "../../typed-intl/index.js";
|
|
6
|
-
import { VerticalIndicator as
|
|
7
|
-
import { HealthFactorBlockTest as
|
|
6
|
+
import { VerticalIndicator as g } from "../../vertical-indicator/vertical-indicator.js";
|
|
7
|
+
import { HealthFactorBlockTest as t } from "./constants.js";
|
|
8
8
|
function b({
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
healthFactor: e,
|
|
10
|
+
healthFactorTo: a,
|
|
11
11
|
debt: r,
|
|
12
12
|
debtTo: p,
|
|
13
|
-
zone:
|
|
14
|
-
isLoading:
|
|
13
|
+
zone: i,
|
|
14
|
+
isLoading: l,
|
|
15
15
|
title: d,
|
|
16
16
|
tip: u,
|
|
17
17
|
testId: v
|
|
18
18
|
}) {
|
|
19
|
-
const
|
|
20
|
-
return /* @__PURE__ */
|
|
21
|
-
|
|
19
|
+
const f = h(), m = a !== void 0;
|
|
20
|
+
return /* @__PURE__ */ o(
|
|
21
|
+
g,
|
|
22
22
|
{
|
|
23
23
|
align: "center",
|
|
24
24
|
dimPreviousValue: !1,
|
|
25
|
-
"data-testid": v ??
|
|
26
|
-
label: d !== void 0 ?
|
|
27
|
-
tip: u ?? /* @__PURE__ */
|
|
28
|
-
value: /* @__PURE__ */
|
|
29
|
-
|
|
25
|
+
"data-testid": v ?? t.root,
|
|
26
|
+
label: d !== void 0 ? f(d) : /* @__PURE__ */ o(n, { messageId: "components.healthFactorBlock.label" }),
|
|
27
|
+
tip: u ?? /* @__PURE__ */ o(n, { messageId: "components.healthFactorBlock.tip" }),
|
|
28
|
+
value: /* @__PURE__ */ o(s, { loading: l, children: e === void 0 ? /* @__PURE__ */ o("span", { "data-testid": t.value, children: "—" }) : /* @__PURE__ */ o(
|
|
29
|
+
c,
|
|
30
30
|
{
|
|
31
31
|
value: e,
|
|
32
32
|
debt: r,
|
|
33
|
-
zone:
|
|
34
|
-
"data-testid":
|
|
33
|
+
zone: m ? void 0 : i,
|
|
34
|
+
"data-testid": t.value
|
|
35
35
|
}
|
|
36
36
|
) }),
|
|
37
|
-
valueTo:
|
|
38
|
-
|
|
37
|
+
valueTo: m ? /* @__PURE__ */ o(s, { loading: l, children: /* @__PURE__ */ o(
|
|
38
|
+
c,
|
|
39
39
|
{
|
|
40
40
|
value: a,
|
|
41
41
|
debt: p ?? r,
|
|
42
|
-
zone:
|
|
43
|
-
"data-testid":
|
|
42
|
+
zone: i,
|
|
43
|
+
"data-testid": t.valueTo
|
|
44
44
|
}
|
|
45
45
|
) }) : void 0
|
|
46
46
|
}
|
|
@@ -48,5 +48,5 @@ function b({
|
|
|
48
48
|
}
|
|
49
49
|
export {
|
|
50
50
|
b as HealthFactorBlock,
|
|
51
|
-
|
|
51
|
+
t as HealthFactorBlockTest
|
|
52
52
|
};
|
|
@@ -1,70 +1,110 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as h } from "react/jsx-runtime";
|
|
2
2
|
import { useMemo as g } from "react";
|
|
3
|
+
import { useTitleText as E } from "../text/use-title-text.js";
|
|
3
4
|
import "@gearbox-protocol/static";
|
|
4
5
|
import "../../checkbox/checkbox.js";
|
|
5
6
|
import "../../checkbox/checkbox-labeled.js";
|
|
6
7
|
import "../../select/select.js";
|
|
7
|
-
import { TradingView as
|
|
8
|
-
import { useIntlTyped as
|
|
9
|
-
import { HistoryChartTest as
|
|
10
|
-
const
|
|
8
|
+
import { TradingView as G } from "../../trading-view/trading-view.js";
|
|
9
|
+
import { useIntlTyped as O } from "../../typed-intl/index.js";
|
|
10
|
+
import { HistoryChartTest as R } from "./constants.js";
|
|
11
|
+
const Y = ["1d", "1w", "1m", "1y", "max"], j = {
|
|
11
12
|
"1d": "1D",
|
|
12
|
-
"1w": "
|
|
13
|
+
"1w": "7D",
|
|
13
14
|
"1m": "1M",
|
|
14
15
|
"1y": "1Y",
|
|
15
16
|
max: "MAX"
|
|
16
17
|
};
|
|
17
|
-
function
|
|
18
|
+
function q({
|
|
18
19
|
data: t,
|
|
19
|
-
range:
|
|
20
|
-
onRange:
|
|
21
|
-
isLoading:
|
|
22
|
-
error:
|
|
23
|
-
yMeasureUnit:
|
|
24
|
-
height:
|
|
25
|
-
seriesTitles:
|
|
26
|
-
priceLines:
|
|
27
|
-
zones:
|
|
28
|
-
showCurrentValue:
|
|
29
|
-
yScaleMin:
|
|
20
|
+
range: o,
|
|
21
|
+
onRange: a,
|
|
22
|
+
isLoading: v = !1,
|
|
23
|
+
error: x,
|
|
24
|
+
yMeasureUnit: i = "none",
|
|
25
|
+
height: S,
|
|
26
|
+
seriesTitles: c,
|
|
27
|
+
priceLines: f,
|
|
28
|
+
zones: u,
|
|
29
|
+
showCurrentValue: I = !1,
|
|
30
|
+
yScaleMin: w,
|
|
31
|
+
title: A,
|
|
32
|
+
trailing: C,
|
|
33
|
+
dualYAxis: L
|
|
30
34
|
}) {
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
|
|
35
|
+
const y = O(), b = E(), e = g(
|
|
36
|
+
() => Array.isArray(i) ? [...i] : void 0,
|
|
37
|
+
[i]
|
|
38
|
+
), p = e != null && new Set(e).size > 1, d = L ?? p, l = e?.[0], D = g(() => {
|
|
39
|
+
const r = (n, m) => {
|
|
40
|
+
if (!d) return n;
|
|
41
|
+
if (p && e != null && l != null) {
|
|
42
|
+
const s = e[m] ?? l;
|
|
43
|
+
return {
|
|
44
|
+
...n,
|
|
45
|
+
priceScaleId: s === l ? "left" : "right"
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
...n,
|
|
50
|
+
priceScaleId: m === 0 ? "left" : "right"
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
if (t)
|
|
54
|
+
return (Array.isArray(t) ? t : [t]).map(
|
|
55
|
+
(m, s) => r(H(c)(m), s)
|
|
56
|
+
);
|
|
57
|
+
if (c)
|
|
58
|
+
return Object.entries(c).map(
|
|
59
|
+
([n, m], s) => r(
|
|
60
|
+
{
|
|
61
|
+
id: n,
|
|
62
|
+
title: m,
|
|
63
|
+
data: []
|
|
64
|
+
},
|
|
65
|
+
s
|
|
66
|
+
)
|
|
67
|
+
);
|
|
68
|
+
}, [t, c, p, d, l, e]);
|
|
69
|
+
return /* @__PURE__ */ h("div", { "data-testid": R.root, children: /* @__PURE__ */ h(
|
|
70
|
+
G,
|
|
34
71
|
{
|
|
35
|
-
data:
|
|
36
|
-
isLoading:
|
|
37
|
-
error:
|
|
38
|
-
emptyMessage:
|
|
72
|
+
data: D,
|
|
73
|
+
isLoading: v,
|
|
74
|
+
error: x ? y.formatMessage({ messageId: "components.historyChart.error" }) : void 0,
|
|
75
|
+
emptyMessage: y.formatMessage({
|
|
39
76
|
messageId: "components.historyChart.empty"
|
|
40
77
|
}),
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
78
|
+
dualYAxis: d,
|
|
79
|
+
yMeasureUnit: Array.isArray(i) ? [...i] : i,
|
|
80
|
+
height: S,
|
|
81
|
+
rangeList: Y.map((r) => ({
|
|
82
|
+
value: r,
|
|
83
|
+
label: j[r]
|
|
46
84
|
})),
|
|
47
|
-
range:
|
|
48
|
-
setRange: (
|
|
49
|
-
priceLineOptions:
|
|
50
|
-
zoneOptions:
|
|
51
|
-
showCurrentValue:
|
|
52
|
-
yScaleMin:
|
|
53
|
-
disableZoom: !0
|
|
85
|
+
range: o,
|
|
86
|
+
setRange: (r) => a(r),
|
|
87
|
+
priceLineOptions: f ? [...f] : void 0,
|
|
88
|
+
zoneOptions: u ? [...u] : void 0,
|
|
89
|
+
showCurrentValue: I,
|
|
90
|
+
yScaleMin: w,
|
|
91
|
+
disableZoom: !0,
|
|
92
|
+
title: A != null ? b(A) : void 0,
|
|
93
|
+
trailing: C
|
|
54
94
|
}
|
|
55
95
|
) });
|
|
56
96
|
}
|
|
57
|
-
function
|
|
58
|
-
return (
|
|
59
|
-
id:
|
|
60
|
-
title: t?.[
|
|
61
|
-
data:
|
|
62
|
-
time:
|
|
63
|
-
value:
|
|
97
|
+
function H(t) {
|
|
98
|
+
return (o) => ({
|
|
99
|
+
id: o.metric,
|
|
100
|
+
title: t?.[o.metric] ?? o.metric,
|
|
101
|
+
data: o.points.map((a) => ({
|
|
102
|
+
time: a.timestamp,
|
|
103
|
+
value: a.value
|
|
64
104
|
}))
|
|
65
105
|
});
|
|
66
106
|
}
|
|
67
107
|
export {
|
|
68
|
-
|
|
69
|
-
|
|
108
|
+
q as HistoryChart,
|
|
109
|
+
R as HistoryChartTest
|
|
70
110
|
};
|
|
@@ -5,163 +5,173 @@ import { BorrowRateBlockTest as f } from "./borrow-rate-block/constants.js";
|
|
|
5
5
|
import { ChartWithSideCard as x } from "./chart-with-side-card/chart-with-side-card.js";
|
|
6
6
|
import { ChartWithSideCardTest as s } from "./chart-with-side-card/constants.js";
|
|
7
7
|
import { DetailedPageTitle as d } from "./detailed-page-title/detailed-page-title.js";
|
|
8
|
-
import { AsideAlignAnchor as
|
|
8
|
+
import { AsideAlignAnchor as S } from "./details-view/detail-aside/detail-aside-scope.js";
|
|
9
9
|
import { DetailAsideScreenLayout as g } from "./details-view/detail-aside/detail-aside-screen-layout.js";
|
|
10
10
|
import { DetailsView as k, DetailsViewLeftPane as B, DetailsViewManagePane as A } from "./details-view/details-view.js";
|
|
11
11
|
import { HealthFactorBlockTest as L } from "./health-factor-block/constants.js";
|
|
12
|
-
import { HealthFactorBlock as
|
|
13
|
-
import { HistoryChart as
|
|
14
|
-
import { InfoLine as
|
|
12
|
+
import { HealthFactorBlock as y } from "./health-factor-block/health-factor-block.js";
|
|
13
|
+
import { HistoryChart as h } from "./history-chart/history-chart.js";
|
|
14
|
+
import { InfoLine as M, InfoList as V, InfoSectionTitle as D, PointsInfoLine as H } from "./info-list/info-list.js";
|
|
15
15
|
import { InfoPortalOut as E, InfoPortalProvider as q } from "./info-portal/info-portal.js";
|
|
16
|
-
import { LeverageInput as
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import {
|
|
60
|
-
import {
|
|
61
|
-
import {
|
|
62
|
-
import {
|
|
63
|
-
import {
|
|
64
|
-
import {
|
|
65
|
-
import {
|
|
66
|
-
import {
|
|
67
|
-
import {
|
|
68
|
-
import {
|
|
69
|
-
import {
|
|
70
|
-
import {
|
|
71
|
-
import {
|
|
72
|
-
import {
|
|
16
|
+
import { LeverageInput as N } from "./leverage-input/leverage-input.js";
|
|
17
|
+
import { LeveragePresetChipsTest as F } from "./leverage-preset-chips/constants.js";
|
|
18
|
+
import { LeveragePresetChips as U } from "./leverage-preset-chips/leverage-preset-chips.js";
|
|
19
|
+
import { LiquidationParamsTableTest as W } from "./liquidation-params-table/constants.js";
|
|
20
|
+
import { LiquidationParamsTable as X } from "./liquidation-params-table/liquidation-params-table.js";
|
|
21
|
+
import { LiquidationPriceBlockTest as J } from "./liquidation-price-block/constants.js";
|
|
22
|
+
import { LiquidationPriceBlock as Q } from "./liquidation-price-block/liquidation-price-block.js";
|
|
23
|
+
import { ManagePane as Z, ManagePaneActionTab as $, ManagePaneMessage as ee, ManagePaneTab as oe, ManagePaneTabDropdown as re } from "./manage-pane/manage-pane.js";
|
|
24
|
+
import { MoreAccordionTest as ae } from "./more-accordion/constants.js";
|
|
25
|
+
import { MoreAccordion as pe } from "./more-accordion/more-accordion.js";
|
|
26
|
+
import { NestedInfoStackTest as fe } from "./nested-info-stack/constants.js";
|
|
27
|
+
import { NestedInfoStack as xe } from "./nested-info-stack/nested-info-stack.js";
|
|
28
|
+
import { PageHeadProvider as se, PageTitle as le } from "./page-title/page-title.js";
|
|
29
|
+
import { PoolApyBreakdownCardTest as Pe } from "./pool-apy-breakdown-card/constants.js";
|
|
30
|
+
import { PoolApyBreakdownCard as ce } from "./pool-apy-breakdown-card/pool-apy-breakdown-card.js";
|
|
31
|
+
import { ReviewButton as ue } from "./review-button/review-button.js";
|
|
32
|
+
import { SectionHeading as Be } from "./section-heading/section-heading.js";
|
|
33
|
+
import { SEGMENTED_TABS_INACTIVE_BUTTON_CLASS as be, SegmentedTabs as Le } from "./segmented-tabs/segmented-tabs.js";
|
|
34
|
+
import { SideCardTest as ye } from "./side-card/constants.js";
|
|
35
|
+
import { SideCard as he } from "./side-card/side-card.js";
|
|
36
|
+
import { SPACE_HEIGHT as Me, SPACE_PX as Ve } from "./spacing.js";
|
|
37
|
+
import { Stack as He } from "./stack/stack.js";
|
|
38
|
+
import { StatBadge as Ee, StatBadgeGrid as qe } from "./stat-badge/stat-badge.js";
|
|
39
|
+
import { StickyBar as Ne } from "./sticky-bar/sticky-bar.js";
|
|
40
|
+
import { StrategyApyBreakdownCardTest as Fe } from "./strategy-apy-breakdown-card/constants.js";
|
|
41
|
+
import { StrategyApyBreakdownCard as Ue } from "./strategy-apy-breakdown-card/strategy-apy-breakdown-card.js";
|
|
42
|
+
import { Tabber as We, TabberSection as ze, isTabber as Xe } from "./tabber/tabber.js";
|
|
43
|
+
import { useDetailScrollSpy as Je } from "./tabber/use-detail-scroll-spy.js";
|
|
44
|
+
import { useTitleText as Qe } from "./text/use-title-text.js";
|
|
45
|
+
import { TimeToLiquidationBlockTest as Ze } from "./time-to-liquidation-block/constants.js";
|
|
46
|
+
import { TimeToLiquidationBlock as eo } from "./time-to-liquidation-block/time-to-liquidation-block.js";
|
|
47
|
+
import { TitleMetaTest as ro } from "./title-meta/constants.js";
|
|
48
|
+
import { TitleMeta as ao } from "./title-meta/title-meta.js";
|
|
49
|
+
import { TokenAmount as po } from "./token-amount/token-amount.js";
|
|
50
|
+
import { TokenPairSymbolTest as fo } from "./token-pair-symbol/constants.js";
|
|
51
|
+
import { TokenPairSymbol as xo } from "./token-pair-symbol/token-pair-symbol.js";
|
|
52
|
+
import { TokenPairTitleTest as so } from "./token-pair-title/constants.js";
|
|
53
|
+
import { TokenPairTitle as Po } from "./token-pair-title/token-pair-title.js";
|
|
54
|
+
import { PositionShortLabelTest as co, ValueTest as go } from "./values/constants.js";
|
|
55
|
+
import { PnlValue as ko } from "./values/pnl-value.js";
|
|
56
|
+
import { PointsValue as Ao } from "./values/points-value.js";
|
|
57
|
+
import { PositionShortLabel as Lo } from "./values/position-short-label.js";
|
|
58
|
+
import { PositionStatusBadge as yo } from "./values/position-status-badge.js";
|
|
59
|
+
import { PositionTypeBadge as ho } from "./values/position-type-badge.js";
|
|
60
|
+
import { ApyValue as Mo, HealthFactorValue as Vo, LeverageValue as Do, TokenBigint as Ho, UsdValue as vo, UtilizationValue as Eo, bps as qo } from "./values/scalars.js";
|
|
61
|
+
import { AmountInputTest as No } from "./amount-input/constants.js";
|
|
62
|
+
import { DetailedPageTitleTest as Fo } from "./detailed-page-title/constants.js";
|
|
63
|
+
import { DetailsViewTest as Uo } from "./details-view/constants.js";
|
|
64
|
+
import { HistoryChartTest as Wo } from "./history-chart/constants.js";
|
|
65
|
+
import { InfoListTest as Xo } from "./info-list/constants.js";
|
|
66
|
+
import { LeverageInputTest as Jo } from "./leverage-input/constants.js";
|
|
67
|
+
import { ManagePaneTest as Qo } from "./manage-pane/constants.js";
|
|
68
|
+
import { PageTitleTest as Zo } from "./page-title/constants.js";
|
|
69
|
+
import { ReviewButtonTest as er } from "./review-button/constants.js";
|
|
70
|
+
import { SectionHeadingTest as rr } from "./section-heading/constants.js";
|
|
71
|
+
import { SegmentedTabsTest as ar } from "./segmented-tabs/constants.js";
|
|
72
|
+
import { StackTest as pr } from "./stack/constants.js";
|
|
73
|
+
import { StatBadgeTest as fr } from "./stat-badge/constants.js";
|
|
74
|
+
import { StickyBarTest as xr } from "./sticky-bar/constants.js";
|
|
75
|
+
import { TabberTest as sr } from "./tabber/constants.js";
|
|
76
|
+
import { TokenAmountTest as dr } from "./token-amount/constants.js";
|
|
73
77
|
export {
|
|
74
78
|
r as AmountInput,
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
79
|
+
No as AmountInputTest,
|
|
80
|
+
Mo as ApyValue,
|
|
81
|
+
S as AsideAlignAnchor,
|
|
78
82
|
p as BorrowRateBlock,
|
|
79
83
|
f as BorrowRateBlockTest,
|
|
80
84
|
x as ChartWithSideCard,
|
|
81
85
|
s as ChartWithSideCardTest,
|
|
82
86
|
g as DetailAsideScreenLayout,
|
|
83
87
|
d as DetailedPageTitle,
|
|
84
|
-
|
|
88
|
+
Fo as DetailedPageTitleTest,
|
|
85
89
|
k as DetailsView,
|
|
86
90
|
B as DetailsViewLeftPane,
|
|
87
91
|
A as DetailsViewManagePane,
|
|
88
|
-
|
|
89
|
-
|
|
92
|
+
Uo as DetailsViewTest,
|
|
93
|
+
y as HealthFactorBlock,
|
|
90
94
|
L as HealthFactorBlockTest,
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
+
Vo as HealthFactorValue,
|
|
96
|
+
h as HistoryChart,
|
|
97
|
+
Wo as HistoryChartTest,
|
|
98
|
+
M as InfoLine,
|
|
95
99
|
V as InfoList,
|
|
96
|
-
|
|
100
|
+
Xo as InfoListTest,
|
|
97
101
|
E as InfoPortalOut,
|
|
98
102
|
q as InfoPortalProvider,
|
|
99
103
|
D as InfoSectionTitle,
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
J as
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
Ee as
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
po as
|
|
104
|
+
N as LeverageInput,
|
|
105
|
+
Jo as LeverageInputTest,
|
|
106
|
+
U as LeveragePresetChips,
|
|
107
|
+
F as LeveragePresetChipsTest,
|
|
108
|
+
Do as LeverageValue,
|
|
109
|
+
X as LiquidationParamsTable,
|
|
110
|
+
W as LiquidationParamsTableTest,
|
|
111
|
+
Q as LiquidationPriceBlock,
|
|
112
|
+
J as LiquidationPriceBlockTest,
|
|
113
|
+
Z as ManagePane,
|
|
114
|
+
$ as ManagePaneActionTab,
|
|
115
|
+
ee as ManagePaneMessage,
|
|
116
|
+
oe as ManagePaneTab,
|
|
117
|
+
re as ManagePaneTabDropdown,
|
|
118
|
+
Qo as ManagePaneTest,
|
|
119
|
+
pe as MoreAccordion,
|
|
120
|
+
ae as MoreAccordionTest,
|
|
121
|
+
xe as NestedInfoStack,
|
|
122
|
+
fe as NestedInfoStackTest,
|
|
123
|
+
se as PageHeadProvider,
|
|
124
|
+
le as PageTitle,
|
|
125
|
+
Zo as PageTitleTest,
|
|
126
|
+
ko as PnlValue,
|
|
127
|
+
H as PointsInfoLine,
|
|
128
|
+
Ao as PointsValue,
|
|
129
|
+
ce as PoolApyBreakdownCard,
|
|
130
|
+
Pe as PoolApyBreakdownCardTest,
|
|
131
|
+
Lo as PositionShortLabel,
|
|
132
|
+
co as PositionShortLabelTest,
|
|
133
|
+
yo as PositionStatusBadge,
|
|
134
|
+
ho as PositionTypeBadge,
|
|
135
|
+
ue as ReviewButton,
|
|
136
|
+
er as ReviewButtonTest,
|
|
137
|
+
be as SEGMENTED_TABS_INACTIVE_BUTTON_CLASS,
|
|
138
|
+
Me as SPACE_HEIGHT,
|
|
139
|
+
Ve as SPACE_PX,
|
|
140
|
+
Be as SectionHeading,
|
|
141
|
+
rr as SectionHeadingTest,
|
|
142
|
+
Le as SegmentedTabs,
|
|
143
|
+
ar as SegmentedTabsTest,
|
|
144
|
+
he as SideCard,
|
|
145
|
+
ye as SideCardTest,
|
|
146
|
+
He as Stack,
|
|
147
|
+
pr as StackTest,
|
|
148
|
+
Ee as StatBadge,
|
|
149
|
+
qe as StatBadgeGrid,
|
|
150
|
+
fr as StatBadgeTest,
|
|
151
|
+
Ne as StickyBar,
|
|
152
|
+
xr as StickyBarTest,
|
|
153
|
+
Ue as StrategyApyBreakdownCard,
|
|
154
|
+
Fe as StrategyApyBreakdownCardTest,
|
|
155
|
+
We as Tabber,
|
|
156
|
+
ze as TabberSection,
|
|
157
|
+
sr as TabberTest,
|
|
158
|
+
eo as TimeToLiquidationBlock,
|
|
159
|
+
Ze as TimeToLiquidationBlockTest,
|
|
160
|
+
ao as TitleMeta,
|
|
161
|
+
ro as TitleMetaTest,
|
|
162
|
+
po as TokenAmount,
|
|
163
|
+
dr as TokenAmountTest,
|
|
164
|
+
Ho as TokenBigint,
|
|
165
|
+
xo as TokenPairSymbol,
|
|
166
|
+
fo as TokenPairSymbolTest,
|
|
167
|
+
Po as TokenPairTitle,
|
|
168
|
+
so as TokenPairTitleTest,
|
|
159
169
|
a as TokenSelectPanel,
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
170
|
+
vo as UsdValue,
|
|
171
|
+
Eo as UtilizationValue,
|
|
172
|
+
go as ValueTest,
|
|
173
|
+
qo as bps,
|
|
174
|
+
Xe as isTabber,
|
|
175
|
+
Je as useDetailScrollSpy,
|
|
176
|
+
Qe as useTitleText
|
|
167
177
|
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { InfoLine as
|
|
1
|
+
import { InfoLine as t, InfoList as e, InfoSectionTitle as f, PointsInfoLine as i } from "./info-list.js";
|
|
2
2
|
import { InfoListTest as r } from "./constants.js";
|
|
3
3
|
export {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
t as InfoLine,
|
|
5
|
+
e as InfoList,
|
|
6
6
|
r as InfoListTest,
|
|
7
|
-
|
|
7
|
+
f as InfoSectionTitle,
|
|
8
|
+
i as PointsInfoLine
|
|
8
9
|
};
|