@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
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { jsxs as k, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import "@gearbox-protocol/sdk";
|
|
4
|
+
import { cn as d } from "../../utils/cn.js";
|
|
5
|
+
import "sonner";
|
|
6
|
+
import "@gearbox-protocol/sdk/common-utils";
|
|
7
|
+
import "luxon";
|
|
8
|
+
import "../../utils/z-index.js";
|
|
9
|
+
import { AllocationWheelTest as p } from "./constants.js";
|
|
10
|
+
const c = [
|
|
11
|
+
"stroke-chart-1",
|
|
12
|
+
"stroke-chart-2",
|
|
13
|
+
"stroke-chart-3",
|
|
14
|
+
"stroke-chart-4",
|
|
15
|
+
"stroke-chart-5",
|
|
16
|
+
"stroke-chart-6",
|
|
17
|
+
"stroke-chart-7",
|
|
18
|
+
"stroke-chart-8",
|
|
19
|
+
"stroke-chart-9",
|
|
20
|
+
"stroke-chart-10",
|
|
21
|
+
"stroke-chart-11",
|
|
22
|
+
"stroke-chart-12"
|
|
23
|
+
], t = 20, o = 3.5, e = (t - o) / 2, i = 2 * Math.PI * e;
|
|
24
|
+
function M({
|
|
25
|
+
share: h,
|
|
26
|
+
colorIndex: l,
|
|
27
|
+
idle: n = !1
|
|
28
|
+
}) {
|
|
29
|
+
const s = Math.min(1, Math.max(0, h)), a = i * s, m = n ? "stroke-muted-foreground" : c[l % c.length];
|
|
30
|
+
return /* @__PURE__ */ k(
|
|
31
|
+
"svg",
|
|
32
|
+
{
|
|
33
|
+
width: t,
|
|
34
|
+
height: t,
|
|
35
|
+
viewBox: `0 0 ${t} ${t}`,
|
|
36
|
+
className: "-rotate-90",
|
|
37
|
+
"data-testid": p.root,
|
|
38
|
+
role: "img",
|
|
39
|
+
"aria-label": "Allocation share",
|
|
40
|
+
children: [
|
|
41
|
+
/* @__PURE__ */ r("title", { children: "Allocation share" }),
|
|
42
|
+
/* @__PURE__ */ r(
|
|
43
|
+
"circle",
|
|
44
|
+
{
|
|
45
|
+
cx: t / 2,
|
|
46
|
+
cy: t / 2,
|
|
47
|
+
r: e,
|
|
48
|
+
fill: "none",
|
|
49
|
+
className: "stroke-muted",
|
|
50
|
+
strokeWidth: o
|
|
51
|
+
}
|
|
52
|
+
),
|
|
53
|
+
s > 0 && /* @__PURE__ */ r(
|
|
54
|
+
"circle",
|
|
55
|
+
{
|
|
56
|
+
cx: t / 2,
|
|
57
|
+
cy: t / 2,
|
|
58
|
+
r: e,
|
|
59
|
+
fill: "none",
|
|
60
|
+
className: d(m),
|
|
61
|
+
strokeWidth: o,
|
|
62
|
+
strokeDasharray: `${a} ${i - a}`
|
|
63
|
+
}
|
|
64
|
+
)
|
|
65
|
+
]
|
|
66
|
+
}
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
export {
|
|
70
|
+
M as AllocationWheel
|
|
71
|
+
};
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { jsx as t, jsxs as i } from "react/jsx-runtime";
|
|
2
|
+
import { faPause as k } from "@fortawesome/free-solid-svg-icons";
|
|
3
|
+
import { FaIcon as v } from "../icons/fa-icon.js";
|
|
4
|
+
import { TokenIcon as w } from "../token-icon/token-icon.js";
|
|
5
|
+
import { SimpleTooltip as y } from "../tooltip/simple-tooltip.js";
|
|
6
|
+
import "../tooltip/tooltip.js";
|
|
7
|
+
import "react";
|
|
8
|
+
import "@gearbox-protocol/sdk";
|
|
9
|
+
import { cn as N } from "../../utils/cn.js";
|
|
10
|
+
import "sonner";
|
|
11
|
+
import "@gearbox-protocol/sdk/common-utils";
|
|
12
|
+
import "luxon";
|
|
13
|
+
import "../../utils/z-index.js";
|
|
14
|
+
import { AllocationWheel as U } from "./allocation-wheel.js";
|
|
15
|
+
import { CollateralAllocationTooltipTest as l } from "./constants.js";
|
|
16
|
+
function I(o) {
|
|
17
|
+
return new Intl.NumberFormat("en-US", {
|
|
18
|
+
style: "currency",
|
|
19
|
+
currency: "USD",
|
|
20
|
+
notation: "compact",
|
|
21
|
+
maximumFractionDigits: 2
|
|
22
|
+
}).format(o);
|
|
23
|
+
}
|
|
24
|
+
function p(o) {
|
|
25
|
+
return o.valueUsd ?? 0;
|
|
26
|
+
}
|
|
27
|
+
function C(o) {
|
|
28
|
+
return o.valueUsd != null;
|
|
29
|
+
}
|
|
30
|
+
function E({
|
|
31
|
+
data: o,
|
|
32
|
+
children: u,
|
|
33
|
+
className: a
|
|
34
|
+
}) {
|
|
35
|
+
const s = o.slices.reduce(
|
|
36
|
+
(e, r) => e + p(r.amount),
|
|
37
|
+
0
|
|
38
|
+
), m = o.slices.some((e) => C(e.amount));
|
|
39
|
+
let f = 0;
|
|
40
|
+
const x = /* @__PURE__ */ t(
|
|
41
|
+
"div",
|
|
42
|
+
{
|
|
43
|
+
className: N(
|
|
44
|
+
"flex w-[400px] max-w-[calc(100vw-32px)] flex-col overflow-hidden p-3",
|
|
45
|
+
"rounded-xl bg-card text-card-foreground",
|
|
46
|
+
"border border-border",
|
|
47
|
+
"shadow-[0_4px_28px_4px_rgba(0,0,0,0.15)]"
|
|
48
|
+
),
|
|
49
|
+
"data-testid": l.root,
|
|
50
|
+
children: o.slices.map((e, r) => {
|
|
51
|
+
const d = p(e.amount), h = s > 0 ? d / s : 0, n = e.kind === "idle", g = n ? 0 : f++, b = e.kind === "idle" ? "idle" : `${e.token.address}-${r}`, c = m && e.amount.valueUsd != null ? I(d) : void 0;
|
|
52
|
+
return /* @__PURE__ */ i(
|
|
53
|
+
"div",
|
|
54
|
+
{
|
|
55
|
+
className: "flex h-[34px] items-center justify-between gap-3 px-2 py-[7px]",
|
|
56
|
+
"data-testid": l.row,
|
|
57
|
+
children: [
|
|
58
|
+
/* @__PURE__ */ i("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
59
|
+
n ? /* @__PURE__ */ t("span", { className: "flex size-5 shrink-0 items-center justify-center rounded-[10px] bg-muted", children: /* @__PURE__ */ t(
|
|
60
|
+
v,
|
|
61
|
+
{
|
|
62
|
+
icon: k,
|
|
63
|
+
className: "size-2.5 text-muted-foreground"
|
|
64
|
+
}
|
|
65
|
+
) }) : /* @__PURE__ */ t(w, { token: e.token, size: 20 }),
|
|
66
|
+
/* @__PURE__ */ t("span", { className: "truncate text-sm leading-5 text-foreground", children: n ? "Idle" : e.token.symbol })
|
|
67
|
+
] }),
|
|
68
|
+
m && /* @__PURE__ */ i("div", { className: "flex shrink-0 items-center gap-2", children: [
|
|
69
|
+
c != null && /* @__PURE__ */ t("span", { className: "text-sm font-semibold leading-5 tabular-nums text-foreground", children: c }),
|
|
70
|
+
/* @__PURE__ */ t("span", { "data-testid": l.wheel, children: /* @__PURE__ */ t(
|
|
71
|
+
U,
|
|
72
|
+
{
|
|
73
|
+
share: h,
|
|
74
|
+
colorIndex: g,
|
|
75
|
+
idle: n
|
|
76
|
+
}
|
|
77
|
+
) })
|
|
78
|
+
] })
|
|
79
|
+
]
|
|
80
|
+
},
|
|
81
|
+
b
|
|
82
|
+
);
|
|
83
|
+
})
|
|
84
|
+
}
|
|
85
|
+
);
|
|
86
|
+
return /* @__PURE__ */ t(
|
|
87
|
+
y,
|
|
88
|
+
{
|
|
89
|
+
placement: "bottom",
|
|
90
|
+
triangle: !1,
|
|
91
|
+
type: "modal-tooltip",
|
|
92
|
+
minWidth: "100%",
|
|
93
|
+
maxWidth: "100%",
|
|
94
|
+
title: /* @__PURE__ */ t("span", { className: a, children: u }),
|
|
95
|
+
triggerClassName: a,
|
|
96
|
+
children: x
|
|
97
|
+
}
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
export {
|
|
101
|
+
E as CollateralAllocationTooltip
|
|
102
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
class l {
|
|
2
|
+
static root = "collateral-allocation-tooltip-root";
|
|
3
|
+
static row = "collateral-allocation-tooltip-row";
|
|
4
|
+
static wheel = "collateral-allocation-tooltip-wheel";
|
|
5
|
+
}
|
|
6
|
+
class t {
|
|
7
|
+
static root = "allocation-wheel-root";
|
|
8
|
+
}
|
|
9
|
+
export {
|
|
10
|
+
t as AllocationWheelTest,
|
|
11
|
+
l as CollateralAllocationTooltipTest
|
|
12
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { AllocationWheel as t } from "./allocation-wheel.js";
|
|
2
|
+
import { CollateralAllocationTooltip as a } from "./collateral-allocation-tooltip.js";
|
|
3
|
+
import { AllocationWheelTest as i, CollateralAllocationTooltipTest as p } from "./constants.js";
|
|
4
|
+
export {
|
|
5
|
+
t as AllocationWheel,
|
|
6
|
+
i as AllocationWheelTest,
|
|
7
|
+
a as CollateralAllocationTooltip,
|
|
8
|
+
p as CollateralAllocationTooltipTest
|
|
9
|
+
};
|
|
@@ -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
|
};
|