@gearbox-protocol/ui-kit 4.0.0-next.4 → 4.0.0-next.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/assets-list-cell/assets-list-cell.cjs +1 -1
- package/dist/cjs/components/badge/badge.cjs +1 -1
- package/dist/cjs/components/badge/chip.cjs +1 -0
- package/dist/cjs/components/badge/index.cjs +1 -1
- package/dist/cjs/components/base/borrow-rate-block/borrow-rate-block.cjs +1 -1
- package/dist/cjs/components/base/chart-with-side-card/chart-with-side-card.cjs +1 -1
- package/dist/cjs/components/base/history-chart/history-chart.cjs +1 -1
- package/dist/cjs/components/base/index.cjs +1 -1
- package/dist/cjs/components/base/info-list/info-list.cjs +1 -1
- package/dist/cjs/components/base/leverage-input/leverage-input.cjs +1 -1
- package/dist/cjs/components/base/leverage-preset-chips/constants.cjs +1 -0
- package/dist/cjs/components/base/leverage-preset-chips/index.cjs +1 -0
- package/dist/cjs/components/base/leverage-preset-chips/leverage-preset-chips.cjs +1 -0
- package/dist/cjs/components/base/pool-apy-breakdown-card/pool-apy-breakdown-card.cjs +1 -1
- package/dist/cjs/components/base/strategy-apy-breakdown-card/constants.cjs +1 -1
- package/dist/cjs/components/base/strategy-apy-breakdown-card/strategy-apy-breakdown-card.cjs +1 -1
- package/dist/cjs/components/base/title-meta/constants.cjs +1 -1
- package/dist/cjs/components/base/title-meta/title-meta.cjs +1 -1
- package/dist/cjs/components/base/values/index.cjs +1 -1
- package/dist/cjs/components/base/values/position-status-badge.cjs +1 -0
- package/dist/cjs/components/base/values/position-type-badge.cjs +1 -1
- package/dist/cjs/components/base-table/base-table-line.cjs +1 -0
- package/dist/cjs/components/base-table/base-table.cjs +1 -0
- package/dist/cjs/components/base-table/constants.cjs +1 -0
- package/dist/cjs/components/base-table/index.cjs +1 -0
- package/dist/cjs/components/base-table/types.cjs +1 -0
- package/dist/cjs/components/block-sync-pill/block-sync-pill.cjs +1 -1
- package/dist/cjs/components/checkbox/checkbox-labeled.cjs +1 -1
- package/dist/cjs/components/client-adapters/styled-rounded-image/styled-rounded-image.cjs +1 -1
- package/dist/cjs/components/collateral-allocation-tooltip/allocation-wheel.cjs +1 -0
- package/dist/cjs/components/collateral-allocation-tooltip/collateral-allocation-tooltip.cjs +1 -0
- package/dist/cjs/components/collateral-allocation-tooltip/constants.cjs +1 -0
- package/dist/cjs/components/collateral-allocation-tooltip/index.cjs +1 -0
- package/dist/cjs/components/composites/index.cjs +1 -1
- package/dist/cjs/components/composites/pool-assets-table/constants.cjs +1 -0
- package/dist/cjs/components/composites/pool-assets-table/index.cjs +1 -1
- package/dist/cjs/components/composites/pool-assets-table/pool-assets-table-head.cjs +1 -1
- package/dist/cjs/components/composites/pool-assets-table/pool-assets-table-row.cjs +1 -1
- package/dist/cjs/components/composites/pool-assets-table/pool-assets-table.cjs +1 -1
- package/dist/cjs/components/composites/tx-preview/confirm/dialog/TransactionConfirmShell.cjs +1 -1
- package/dist/cjs/components/composites/tx-preview/confirm/dialog/index.cjs +1 -1
- package/dist/cjs/components/composites/tx-preview/confirm/dialog/transactionConfirmShellTypes.cjs +1 -0
- package/dist/cjs/components/composites/tx-preview/confirm/index.cjs +1 -1
- package/dist/cjs/components/composites/tx-preview/index.cjs +1 -1
- package/dist/cjs/components/compound-apy/compound-apy.cjs +1 -1
- package/dist/cjs/components/filter/filter-chip.cjs +1 -1
- package/dist/cjs/components/graph/default-config.cjs +1 -1
- package/dist/cjs/components/graph/graph-view.cjs +1 -1
- package/dist/cjs/components/graph/graph.cjs +1 -1
- package/dist/cjs/components/hf-indicator/hf-indicator.cjs +1 -0
- package/dist/cjs/components/hf-indicator/index.cjs +1 -0
- package/dist/cjs/components/index.cjs +1 -1
- package/dist/cjs/components/infinite-scroll/index.cjs +1 -0
- package/dist/cjs/components/infinite-scroll/infinite-scroll-wrapper.cjs +1 -0
- package/dist/cjs/components/name-cell/index.cjs +1 -0
- package/dist/cjs/components/name-cell/name-cell.cjs +1 -0
- package/dist/cjs/components/network-icon/index.cjs +1 -1
- package/dist/cjs/components/network-icon/network-indicator.cjs +1 -0
- package/dist/cjs/components/trading-view/trading-view.cjs +1 -1
- package/dist/cjs/components/with-copy/with-copy.cjs +1 -1
- package/dist/cjs/components/yield-breakdown-tooltip/yield-breakdown-tooltip.cjs +1 -1
- package/dist/cjs/configs/tailwind-preset.cjs +1 -1
- package/dist/cjs/hooks/index.cjs +1 -1
- package/dist/cjs/hooks/use-observed-width-key.cjs +1 -0
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/locale/en.json.cjs +1 -1
- package/dist/cjs/utils/format-money.cjs +1 -1
- package/dist/cjs/utils/index.cjs +1 -1
- package/dist/cjs/utils/leverage-presets.cjs +1 -0
- package/dist/esm/components/assets-list-cell/assets-list-cell.js +161 -159
- package/dist/esm/components/badge/badge.js +14 -8
- package/dist/esm/components/badge/chip.js +47 -0
- package/dist/esm/components/badge/index.js +8 -3
- package/dist/esm/components/base/borrow-rate-block/borrow-rate-block.js +3 -2
- package/dist/esm/components/base/chart-with-side-card/chart-with-side-card.js +6 -6
- package/dist/esm/components/base/history-chart/history-chart.js +86 -46
- package/dist/esm/components/base/index.js +144 -138
- package/dist/esm/components/base/info-list/info-list.js +7 -8
- package/dist/esm/components/base/leverage-input/leverage-input.js +1 -1
- package/dist/esm/components/base/leverage-preset-chips/constants.js +7 -0
- package/dist/esm/components/base/leverage-preset-chips/index.js +6 -0
- package/dist/esm/components/base/leverage-preset-chips/leverage-preset-chips.js +39 -0
- package/dist/esm/components/base/pool-apy-breakdown-card/pool-apy-breakdown-card.js +23 -30
- package/dist/esm/components/base/strategy-apy-breakdown-card/constants.js +3 -2
- package/dist/esm/components/base/strategy-apy-breakdown-card/strategy-apy-breakdown-card.js +194 -32
- package/dist/esm/components/base/title-meta/constants.js +1 -0
- package/dist/esm/components/base/title-meta/title-meta.js +53 -33
- package/dist/esm/components/base/values/index.js +16 -14
- package/dist/esm/components/base/values/position-status-badge.js +26 -0
- package/dist/esm/components/base/values/position-type-badge.js +7 -6
- package/dist/esm/components/base-table/base-table-line.js +117 -0
- package/dist/esm/components/base-table/base-table.js +110 -0
- package/dist/esm/components/base-table/constants.js +12 -0
- package/dist/esm/components/base-table/index.js +9 -0
- package/dist/esm/components/base-table/types.js +1 -0
- package/dist/esm/components/block-sync-pill/block-sync-pill.js +9 -6
- package/dist/esm/components/checkbox/checkbox-labeled.js +7 -4
- package/dist/esm/components/client-adapters/styled-rounded-image/styled-rounded-image.js +7 -4
- package/dist/esm/components/collateral-allocation-tooltip/allocation-wheel.js +71 -0
- package/dist/esm/components/collateral-allocation-tooltip/collateral-allocation-tooltip.js +102 -0
- package/dist/esm/components/collateral-allocation-tooltip/constants.js +12 -0
- package/dist/esm/components/collateral-allocation-tooltip/index.js +9 -0
- package/dist/esm/components/composites/index.js +31 -31
- package/dist/esm/components/composites/pool-assets-table/constants.js +9 -0
- package/dist/esm/components/composites/pool-assets-table/index.js +8 -6
- package/dist/esm/components/composites/pool-assets-table/pool-assets-table-head.js +52 -30
- package/dist/esm/components/composites/pool-assets-table/pool-assets-table-row.js +108 -76
- package/dist/esm/components/composites/pool-assets-table/pool-assets-table.js +44 -26
- package/dist/esm/components/composites/tx-preview/confirm/dialog/TransactionConfirmShell.js +109 -52
- package/dist/esm/components/composites/tx-preview/confirm/dialog/index.js +8 -10
- package/dist/esm/components/composites/tx-preview/confirm/dialog/transactionConfirmShellTypes.js +1 -0
- package/dist/esm/components/composites/tx-preview/confirm/index.js +24 -26
- package/dist/esm/components/composites/tx-preview/index.js +24 -26
- package/dist/esm/components/compound-apy/compound-apy.js +85 -80
- package/dist/esm/components/filter/filter-chip.js +1 -0
- package/dist/esm/components/graph/default-config.js +20 -18
- package/dist/esm/components/graph/graph-view.js +32 -31
- package/dist/esm/components/graph/graph.js +459 -458
- package/dist/esm/components/hf-indicator/hf-indicator.js +33 -0
- package/dist/esm/components/hf-indicator/index.js +4 -0
- package/dist/esm/components/index.js +732 -701
- package/dist/esm/components/infinite-scroll/index.js +4 -0
- package/dist/esm/components/infinite-scroll/infinite-scroll-wrapper.js +30 -0
- package/dist/esm/components/name-cell/index.js +4 -0
- package/dist/esm/components/name-cell/name-cell.js +35 -0
- package/dist/esm/components/network-icon/index.js +4 -2
- package/dist/esm/components/network-icon/network-indicator.js +82 -0
- package/dist/esm/components/trading-view/trading-view.js +193 -155
- package/dist/esm/components/with-copy/with-copy.js +7 -4
- package/dist/esm/components/yield-breakdown-tooltip/yield-breakdown-tooltip.js +112 -169
- package/dist/esm/configs/tailwind-preset.js +13 -1
- package/dist/esm/hooks/index.js +20 -18
- package/dist/esm/hooks/use-observed-width-key.js +24 -0
- package/dist/esm/index.js +881 -842
- package/dist/esm/locale/en.json.js +21 -18
- package/dist/esm/utils/format-money.js +59 -41
- package/dist/esm/utils/index.js +87 -83
- package/dist/esm/utils/leverage-presets.js +13 -0
- package/dist/globals.css +1 -1
- package/dist/types/components/assets-list-cell/assets-list-cell.d.ts +3 -0
- package/dist/types/components/badge/badge.d.ts +2 -1
- package/dist/types/components/badge/chip.d.ts +22 -0
- package/dist/types/components/badge/index.d.ts +1 -0
- package/dist/types/components/base/history-chart/history-chart.d.ts +13 -3
- package/dist/types/components/base/index.d.ts +1 -0
- package/dist/types/components/base/leverage-input/leverage-input.d.ts +1 -1
- package/dist/types/components/base/leverage-preset-chips/constants.d.ts +4 -0
- package/dist/types/components/base/leverage-preset-chips/index.d.ts +2 -0
- package/dist/types/components/base/leverage-preset-chips/leverage-preset-chips.d.ts +13 -0
- package/dist/types/components/base/liquidation-params-table/liquidation-params-table.d.ts +2 -2
- package/dist/types/components/base/pool-apy-breakdown-card/pool-apy-breakdown-card.d.ts +4 -5
- package/dist/types/components/base/strategy-apy-breakdown-card/constants.d.ts +1 -0
- package/dist/types/components/base/strategy-apy-breakdown-card/strategy-apy-breakdown-card.d.ts +12 -4
- package/dist/types/components/base/title-meta/constants.d.ts +1 -0
- package/dist/types/components/base/title-meta/title-meta.d.ts +9 -1
- package/dist/types/components/base/values/index.d.ts +1 -0
- package/dist/types/components/base/values/position-status-badge.d.ts +7 -0
- package/dist/types/components/base/values/position-type-badge.d.ts +1 -1
- package/dist/types/components/base-table/base-table-line.d.ts +21 -0
- package/dist/types/components/base-table/base-table.d.ts +19 -0
- package/dist/types/components/base-table/constants.d.ts +8 -0
- package/dist/types/components/base-table/index.d.ts +3 -0
- package/dist/types/components/base-table/types.d.ts +37 -0
- package/dist/types/components/collateral-allocation-tooltip/allocation-wheel.d.ts +10 -0
- package/dist/types/components/collateral-allocation-tooltip/collateral-allocation-tooltip.d.ts +23 -0
- package/dist/types/components/collateral-allocation-tooltip/constants.d.ts +8 -0
- package/dist/types/components/collateral-allocation-tooltip/index.d.ts +3 -0
- package/dist/types/components/composites/pool-assets-table/constants.d.ts +6 -0
- package/dist/types/components/composites/pool-assets-table/index.d.ts +1 -0
- package/dist/types/components/composites/pool-assets-table/pool-assets-table-head.d.ts +1 -2
- package/dist/types/components/composites/pool-assets-table/pool-assets-table-row.d.ts +8 -8
- package/dist/types/components/composites/pool-assets-table/pool-assets-table.d.ts +7 -20
- package/dist/types/components/composites/pool-assets-table/types.d.ts +4 -12
- package/dist/types/components/composites/tx-preview/confirm/dialog/TransactionConfirmShell.d.ts +23 -19
- package/dist/types/components/composites/tx-preview/confirm/dialog/index.d.ts +2 -2
- package/dist/types/components/composites/tx-preview/confirm/dialog/transactionConfirmPhase.d.ts +0 -3
- package/dist/types/components/composites/tx-preview/confirm/dialog/transactionConfirmShellTypes.d.ts +97 -0
- package/dist/types/components/graph/graph-view.d.ts +1 -1
- package/dist/types/components/graph/graph.d.ts +4 -0
- package/dist/types/components/hf-indicator/hf-indicator.d.ts +8 -0
- package/dist/types/components/hf-indicator/index.d.ts +1 -0
- package/dist/types/components/index.d.ts +5 -0
- package/dist/types/components/infinite-scroll/index.d.ts +1 -0
- package/dist/types/components/infinite-scroll/infinite-scroll-wrapper.d.ts +11 -0
- package/dist/types/components/name-cell/index.d.ts +1 -0
- package/dist/types/components/name-cell/name-cell.d.ts +13 -0
- package/dist/types/components/network-icon/index.d.ts +1 -0
- package/dist/types/components/network-icon/network-indicator.d.ts +23 -0
- package/dist/types/components/trading-view/trading-view.d.ts +10 -3
- package/dist/types/components/yield-breakdown-tooltip/yield-breakdown-tooltip.d.ts +6 -8
- package/dist/types/configs/tailwind-preset.d.ts +12 -0
- package/dist/types/hooks/index.d.ts +1 -0
- package/dist/types/hooks/use-observed-width-key.d.ts +8 -0
- package/dist/types/index.d.ts +6 -1
- package/dist/types/locale/en.json.d.ts +23 -18
- package/dist/types/utils/format-money.d.ts +11 -5
- package/dist/types/utils/index.d.ts +2 -1
- package/dist/types/utils/leverage-presets.d.ts +7 -0
- package/package.json +1 -1
- package/src/styles/base.css +30 -0
- package/src/styles/theme.css +16 -0
- package/dist/cjs/components/composites/tx-preview/confirm/dialog/TransactionConfirmModalView.cjs +0 -1
- package/dist/cjs/components/composites/tx-preview/confirm/dialog/TransactionConfirmPageView.cjs +0 -1
- package/dist/esm/components/composites/tx-preview/confirm/dialog/TransactionConfirmModalView.js +0 -177
- package/dist/esm/components/composites/tx-preview/confirm/dialog/TransactionConfirmPageView.js +0 -54
- package/dist/types/components/composites/tx-preview/confirm/dialog/TransactionConfirmModalView.d.ts +0 -17
- package/dist/types/components/composites/tx-preview/confirm/dialog/TransactionConfirmPageView.d.ts +0 -16
package/dist/types/components/composites/tx-preview/confirm/dialog/transactionConfirmShellTypes.d.ts
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { TransactionExecutionStepView } from '../stepper/transactionExecutionStepTypes';
|
|
3
|
+
import { TransactionConfirmPhase } from './transactionConfirmPhase';
|
|
4
|
+
/**
|
|
5
|
+
* How the card is framed. The body is identical in both: `page` drops the card
|
|
6
|
+
* into page flow, `dialog` puts the same card inside a modal.
|
|
7
|
+
*/
|
|
8
|
+
export type TransactionConfirmShellMode = "page" | "dialog";
|
|
9
|
+
export interface TransactionConfirmShellStepper {
|
|
10
|
+
readonly steps: ReadonlyArray<TransactionExecutionStepView>;
|
|
11
|
+
readonly renderLabel: (step: TransactionExecutionStepView) => React.ReactNode;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Shown instead of preview and execution once the phase is terminal.
|
|
15
|
+
*
|
|
16
|
+
* Both halves are required on purpose: supplying `result` at all is the
|
|
17
|
+
* caller's promise that either terminal phase can be rendered. A flow that
|
|
18
|
+
* cannot fail says so with an explicit `failure: null` rather than by omission,
|
|
19
|
+
* which would leave `phase: "failure"` with nothing to draw.
|
|
20
|
+
*/
|
|
21
|
+
export interface TransactionConfirmShellResult {
|
|
22
|
+
readonly success: React.ReactNode;
|
|
23
|
+
readonly failure: React.ReactNode;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* What the card is showing.
|
|
27
|
+
*
|
|
28
|
+
* A discriminated union rather than a handful of loose flags: a caller cannot
|
|
29
|
+
* ask for a preview and an error at once, and does not have to spell out the
|
|
30
|
+
* props that mean "nothing here". `placeholder` and `error` also pin the card
|
|
31
|
+
* to the `confirm` phase, so neither can ask for a result view it did not
|
|
32
|
+
* supply — the failure mode that produced an empty card before.
|
|
33
|
+
*/
|
|
34
|
+
export type TransactionConfirmShellBody =
|
|
35
|
+
/**
|
|
36
|
+
* The caller's own node in the preview slot — a branded spinner, an empty
|
|
37
|
+
* state. Distinct from `ready`'s `previewLoading`, which is this library's
|
|
38
|
+
* skeleton over a preview that already exists.
|
|
39
|
+
*/
|
|
40
|
+
{
|
|
41
|
+
readonly kind: "placeholder";
|
|
42
|
+
readonly node: React.ReactNode;
|
|
43
|
+
} | {
|
|
44
|
+
readonly kind: "error";
|
|
45
|
+
/**
|
|
46
|
+
* Required: the discriminant already says the card failed, so the object
|
|
47
|
+
* has to be there. A caller holding `Error | null` picks this body only
|
|
48
|
+
* once it has one, and `placeholder` or `ready` while it does not.
|
|
49
|
+
*/
|
|
50
|
+
readonly error: Error;
|
|
51
|
+
/** Heading above the error line. Defaults to a generic preview failure. */
|
|
52
|
+
readonly title?: string;
|
|
53
|
+
} | {
|
|
54
|
+
readonly kind: "ready";
|
|
55
|
+
readonly preview: React.ReactNode;
|
|
56
|
+
readonly execution?: React.ReactNode;
|
|
57
|
+
readonly stepper?: TransactionConfirmShellStepper;
|
|
58
|
+
readonly result?: TransactionConfirmShellResult;
|
|
59
|
+
/** This library's skeleton over the preview slot, for a live refetch. */
|
|
60
|
+
readonly previewLoading?: boolean;
|
|
61
|
+
};
|
|
62
|
+
interface TransactionConfirmShellBase {
|
|
63
|
+
readonly phase?: TransactionConfirmPhase;
|
|
64
|
+
readonly title: React.ReactNode;
|
|
65
|
+
readonly titleAddon?: React.ReactNode;
|
|
66
|
+
/** Drop the addon once the phase is terminal. */
|
|
67
|
+
readonly hideTitleAddonOnResult?: boolean;
|
|
68
|
+
readonly body: TransactionConfirmShellBody;
|
|
69
|
+
/** Merged onto the outer card; it never replaces the frame's own classes. */
|
|
70
|
+
readonly className?: string;
|
|
71
|
+
/**
|
|
72
|
+
* The scrollable preview column. Defaults to
|
|
73
|
+
* {@link transactionConfirmPreviewScrollVariants}; compose with it rather
|
|
74
|
+
* than replacing it, so later changes to the base still carry over.
|
|
75
|
+
*/
|
|
76
|
+
readonly previewClassName?: string;
|
|
77
|
+
/** Outer card. The inner content keeps {@link TransactionConfirmDialogTest.root}. */
|
|
78
|
+
readonly "data-testid"?: string;
|
|
79
|
+
readonly shellTestId?: string;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* `mode` is a discriminant, not a flag: the frame decides which of `open` and
|
|
83
|
+
* `onClose` make sense. A dialog must be closable — the backdrop click and the
|
|
84
|
+
* close control are the same handler — while a page has neither an open state
|
|
85
|
+
* nor, necessarily, a close control at all.
|
|
86
|
+
*/
|
|
87
|
+
export type TransactionConfirmShellProps = TransactionConfirmShellBase & ({
|
|
88
|
+
readonly mode: "page";
|
|
89
|
+
/** Omit to hide the close control, as a verification page does. */
|
|
90
|
+
readonly onClose?: () => void;
|
|
91
|
+
} | {
|
|
92
|
+
readonly mode: "dialog";
|
|
93
|
+
/** The modal renders nothing while closed. */
|
|
94
|
+
readonly open?: boolean;
|
|
95
|
+
readonly onClose: () => void;
|
|
96
|
+
});
|
|
97
|
+
export {};
|
|
@@ -2,7 +2,7 @@ import { VariantProps } from 'class-variance-authority';
|
|
|
2
2
|
import { GraphProps } from './graph';
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
declare const graphViewVariants: (props?: ({
|
|
5
|
-
variant?: "default" | "outlined" | "ghost" | "elevated" | null | undefined;
|
|
5
|
+
variant?: "default" | "outlined" | "ghost" | "elevated" | "plain" | null | undefined;
|
|
6
6
|
size?: "full" | "default" | "sm" | "lg" | "xl" | null | undefined;
|
|
7
7
|
padding?: "none" | "default" | "sm" | "lg" | null | undefined;
|
|
8
8
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
@@ -30,6 +30,10 @@ export type VerticalLineOptions = Partial<{
|
|
|
30
30
|
width: number;
|
|
31
31
|
labelBackgroundColor: string;
|
|
32
32
|
labelTextColor: string;
|
|
33
|
+
/**
|
|
34
|
+
* Time-axis (bottom) badge. Independent of the top overlay, which renders
|
|
35
|
+
* whenever `labelText`, `value`, or `tooltipText` is set.
|
|
36
|
+
*/
|
|
33
37
|
showLabel: boolean;
|
|
34
38
|
/**
|
|
35
39
|
* Text shown only on hover of the line's badge (not rendered inline). Use it
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface HFIndicatorProps {
|
|
3
|
+
readonly value?: string;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Concentric rings around a health-factor value. Presentation only.
|
|
7
|
+
*/
|
|
8
|
+
export declare function HFIndicator({ value, }: HFIndicatorProps): React.ReactElement;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './hf-indicator';
|
|
@@ -6,6 +6,7 @@ export * from './assets-list-cell';
|
|
|
6
6
|
export * from './badge';
|
|
7
7
|
export * from './base';
|
|
8
8
|
export * from './base-link';
|
|
9
|
+
export * from './base-table';
|
|
9
10
|
export * from './block-sync-pill';
|
|
10
11
|
export * from './breadcrumbs';
|
|
11
12
|
export * from './breakpoint-provider';
|
|
@@ -14,6 +15,7 @@ export * from './cards';
|
|
|
14
15
|
export * from './checkbox';
|
|
15
16
|
export * from './checkbox-item';
|
|
16
17
|
export * from './client-adapters';
|
|
18
|
+
export * from './collateral-allocation-tooltip';
|
|
17
19
|
export * from './composites';
|
|
18
20
|
export * from './compound-apy';
|
|
19
21
|
export * from './confirm-menu';
|
|
@@ -33,8 +35,10 @@ export * from './guard';
|
|
|
33
35
|
export * from './head-cell';
|
|
34
36
|
export * from './health-factor';
|
|
35
37
|
export * from './help-tip';
|
|
38
|
+
export * from './hf-indicator';
|
|
36
39
|
export * from './icon-button';
|
|
37
40
|
export * from './icons';
|
|
41
|
+
export * from './infinite-scroll';
|
|
38
42
|
export * from './input';
|
|
39
43
|
export * from './label';
|
|
40
44
|
export * from './layout';
|
|
@@ -44,6 +48,7 @@ export * from './loader';
|
|
|
44
48
|
export * from './loading';
|
|
45
49
|
export * from './loading-bar';
|
|
46
50
|
export * from './modal';
|
|
51
|
+
export * from './name-cell';
|
|
47
52
|
export * from './navbar-logo';
|
|
48
53
|
export * from './navigation-context';
|
|
49
54
|
export * from './points-icon';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './infinite-scroll-wrapper';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React, PropsWithChildren } from 'react';
|
|
2
|
+
export interface InfiniteScrollWrapperProps {
|
|
3
|
+
readonly dataLength: number;
|
|
4
|
+
readonly hasMore: boolean;
|
|
5
|
+
readonly onNextLoad: () => void;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* List footer that asks for the next page. Presentation only: the caller
|
|
9
|
+
* owns paging state and `onNextLoad`.
|
|
10
|
+
*/
|
|
11
|
+
export declare function InfiniteScrollWrapper({ hasMore, dataLength, children, onNextLoad, }: PropsWithChildren<InfiniteScrollWrapperProps>): React.ReactElement;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './name-cell';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { default as React, ReactNode } from 'react';
|
|
2
|
+
export interface NameCellProps {
|
|
3
|
+
readonly title: ReactNode;
|
|
4
|
+
readonly subtitle?: ReactNode;
|
|
5
|
+
readonly chips?: ReactNode;
|
|
6
|
+
readonly caption?: ReactNode;
|
|
7
|
+
readonly leading?: ReactNode;
|
|
8
|
+
readonly disabledStyle?: boolean;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Table-name layout: optional leading slot, title + chips, subtitle, caption.
|
|
12
|
+
*/
|
|
13
|
+
export declare function NameCell({ title, subtitle, chips, caption, leading, disabledStyle, }: NameCellProps): React.ReactElement;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ButtonProps } from '../buttons';
|
|
2
|
+
import { NetworkIcons } from '../../utils/network-icons';
|
|
3
|
+
type IndicatorSize = "sm" | "md" | "default" | "lg";
|
|
4
|
+
export interface NetworkIndicatorProps extends Omit<ButtonProps, "size" | "children"> {
|
|
5
|
+
network: NetworkIcons | undefined;
|
|
6
|
+
chainId: number | undefined;
|
|
7
|
+
size?: IndicatorSize;
|
|
8
|
+
iconSize?: number;
|
|
9
|
+
chevronSize?: number;
|
|
10
|
+
showTitle?: boolean;
|
|
11
|
+
opened: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* When true, button appears enabled and shows chevron even without onClick.
|
|
14
|
+
* Useful when the component is used as a dropdown trigger that handles clicks externally.
|
|
15
|
+
* Defaults to true when onClick is provided.
|
|
16
|
+
*/
|
|
17
|
+
interactive?: boolean;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Network picker trigger: optional "Network:" label, icon, and chevron.
|
|
21
|
+
*/
|
|
22
|
+
export declare const NetworkIndicator: import('react').ForwardRefExoticComponent<NetworkIndicatorProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
23
|
+
export {};
|
|
@@ -37,7 +37,7 @@ export interface GraphData {
|
|
|
37
37
|
/**
|
|
38
38
|
* TradingView component props
|
|
39
39
|
*/
|
|
40
|
-
export interface TradingViewProps<T extends string = string> extends Omit<GraphViewWithDataProps, "series" | "loading" | "toolbar" | "size" | "showLegend" | "onUnselectSeries" | "yMeasureUnit" | "currentValueDecimals" | "data"> {
|
|
40
|
+
export interface TradingViewProps<T extends string = string> extends Omit<GraphViewWithDataProps, "series" | "loading" | "toolbar" | "size" | "showLegend" | "onUnselectSeries" | "yMeasureUnit" | "currentValueDecimals" | "data" | "title"> {
|
|
41
41
|
/** Graph data - single or array of series */
|
|
42
42
|
data: GraphData | Array<GraphData> | undefined;
|
|
43
43
|
/** Y-axis unit for single or multiple series */
|
|
@@ -110,11 +110,18 @@ export interface TradingViewProps<T extends string = string> extends Omit<GraphV
|
|
|
110
110
|
seriesColorPersistenceKey?: string;
|
|
111
111
|
/**
|
|
112
112
|
* When true, all user-initiated zoom and pan interactions are disabled.
|
|
113
|
-
* The time range can only be changed via the range
|
|
113
|
+
* The time range can only be changed via the range dropdown.
|
|
114
114
|
* Disables: mouse-wheel zoom, pinch zoom, axis drag, axis double-click reset,
|
|
115
115
|
* and scroll/drag panning.
|
|
116
116
|
*/
|
|
117
117
|
disableZoom?: boolean;
|
|
118
|
+
/**
|
|
119
|
+
* Controls rendered to the left of the range dropdown (e.g. leverage chips).
|
|
120
|
+
* A divider is shown between this slot and the dropdown when both are present.
|
|
121
|
+
*/
|
|
122
|
+
trailing?: React.ReactNode;
|
|
123
|
+
/** Heading to the left of the chart controls, outside the chart frame. */
|
|
124
|
+
title?: React.ReactNode;
|
|
118
125
|
}
|
|
119
126
|
/**
|
|
120
127
|
* TradingView — comprehensive charting component with graph selection and time range controls.
|
|
@@ -171,4 +178,4 @@ export interface TradingViewProps<T extends string = string> extends Omit<GraphV
|
|
|
171
178
|
* />
|
|
172
179
|
* ```
|
|
173
180
|
*/
|
|
174
|
-
export declare function TradingView<T extends string = string>({ data, yMeasureUnit, height, defaultGraph, onGraphSelected, graphs, isMultipleSelect, range, rangeList, setRange, onGraphExpanded, isGraphExpanded, onUnselectSeries, graphsWithNoData, loadingGraphs, isLoading: isLoadingProp, noDataMessage, currentValueDecimals, containerClassName, useSharedPriceScale, showCurrentValue, yScaleMin, yScaleMinMultiple, seriesColorPersistenceKey, ...restProps }: TradingViewProps<T>): React.ReactElement;
|
|
181
|
+
export declare function TradingView<T extends string = string>({ data, yMeasureUnit, height, defaultGraph, onGraphSelected, graphs, isMultipleSelect, range, rangeList, setRange, onGraphExpanded, isGraphExpanded, onUnselectSeries, graphsWithNoData, loadingGraphs, isLoading: isLoadingProp, noDataMessage, currentValueDecimals, containerClassName, useSharedPriceScale, showCurrentValue, yScaleMin, yScaleMinMultiple, seriesColorPersistenceKey, title, trailing, ...restProps }: TradingViewProps<T>): React.ReactElement;
|
|
@@ -8,25 +8,23 @@ export interface YieldBreakdownTooltipProps {
|
|
|
8
8
|
supplyApy: ApyBreakdown;
|
|
9
9
|
/**
|
|
10
10
|
* Strategy-only plain leverage multiplier (e.g. `13.6` for 13.6x). When set,
|
|
11
|
-
* the header
|
|
11
|
+
* the header is "Net APY at Nx Leverage" and a Borrow Rate row is shown.
|
|
12
12
|
*/
|
|
13
13
|
maxLeverage?: Leverage;
|
|
14
14
|
/**
|
|
15
|
-
* Strategy collateral yield used for
|
|
16
|
-
* {@link supplyApy} when omitted.
|
|
15
|
+
* Strategy collateral yield used for Collateral / Incentive rows. Falls back
|
|
16
|
+
* to {@link supplyApy} when omitted.
|
|
17
17
|
*/
|
|
18
18
|
collateralApy?: ApyBreakdown;
|
|
19
19
|
/** Strategy base borrow cost in bps (shown as a negative rate). */
|
|
20
20
|
borrowApy?: Bps;
|
|
21
|
-
/** Strategy additional (quota) borrow cost in bps (
|
|
21
|
+
/** Strategy additional (quota) borrow cost in bps (folded into Borrow Rate). */
|
|
22
22
|
additionalBorrowApy?: Bps;
|
|
23
23
|
children?: React.ReactNode;
|
|
24
24
|
className?: string;
|
|
25
25
|
}
|
|
26
26
|
/**
|
|
27
|
-
*
|
|
28
|
-
* `
|
|
29
|
-
*
|
|
30
|
-
* Visuals follow Figma «Yield Details Surface» (400px card, always expanded).
|
|
27
|
+
* Earn APY tooltip — strategy (`Net APY at Nx Leverage`) and pool
|
|
28
|
+
* (`Overall APY`) layouts from SDK `ApyBreakdown`.
|
|
31
29
|
*/
|
|
32
30
|
export declare function YieldBreakdownTooltip({ supplyApy, maxLeverage, collateralApy, borrowApy, additionalBorrowApy, children, className, }: YieldBreakdownTooltipProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -63,9 +63,14 @@ export declare const preset: {
|
|
|
63
63
|
"success-foreground": string;
|
|
64
64
|
"success-hover": string;
|
|
65
65
|
warning: string;
|
|
66
|
+
info: {
|
|
67
|
+
DEFAULT: string;
|
|
68
|
+
foreground: string;
|
|
69
|
+
};
|
|
66
70
|
liquidation: string;
|
|
67
71
|
"liquidation-line": string;
|
|
68
72
|
border: string;
|
|
73
|
+
divider: string;
|
|
69
74
|
input: string;
|
|
70
75
|
ring: string;
|
|
71
76
|
"text-secondary": string;
|
|
@@ -91,6 +96,13 @@ export declare const preset: {
|
|
|
91
96
|
"3": string;
|
|
92
97
|
"4": string;
|
|
93
98
|
"5": string;
|
|
99
|
+
"6": string;
|
|
100
|
+
"7": string;
|
|
101
|
+
"8": string;
|
|
102
|
+
"9": string;
|
|
103
|
+
"10": string;
|
|
104
|
+
"11": string;
|
|
105
|
+
"12": string;
|
|
94
106
|
};
|
|
95
107
|
};
|
|
96
108
|
fontFamily: {
|
|
@@ -5,6 +5,7 @@ export * from './use-debounce-call';
|
|
|
5
5
|
export * from './use-filter';
|
|
6
6
|
export * from './use-hf';
|
|
7
7
|
export * from './use-media-query';
|
|
8
|
+
export * from './use-observed-width-key';
|
|
8
9
|
export * from './use-opened-state';
|
|
9
10
|
export * from './use-previous';
|
|
10
11
|
export * from './use-smart-number-input';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tracks the rounded CSS-pixel width of an element via ResizeObserver.
|
|
3
|
+
* Useful when a layout should collapse by container width, not viewport.
|
|
4
|
+
*/
|
|
5
|
+
export declare function useObservedWidthKey<T extends HTMLElement>(): {
|
|
6
|
+
ref: import('react').RefObject<T | null>;
|
|
7
|
+
widthKey: number;
|
|
8
|
+
};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export * from './components/app-bar';
|
|
|
8
8
|
export * from './components/assets-list-cell';
|
|
9
9
|
export * from './components/badge';
|
|
10
10
|
export * from './components/base-link';
|
|
11
|
+
export * from './components/base-table';
|
|
11
12
|
export * from './components/block-sync-pill';
|
|
12
13
|
export * from './components/breadcrumbs';
|
|
13
14
|
export * from './components/breakpoint-provider';
|
|
@@ -15,6 +16,7 @@ export * from './components/buttons';
|
|
|
15
16
|
export * from './components/cards';
|
|
16
17
|
export * from './components/checkbox';
|
|
17
18
|
export * from './components/client-adapters';
|
|
19
|
+
export * from './components/collateral-allocation-tooltip';
|
|
18
20
|
export * from './components/composites';
|
|
19
21
|
export * from './components/compound-apy';
|
|
20
22
|
export * from './components/confirm-menu';
|
|
@@ -34,8 +36,10 @@ export * from './components/guard';
|
|
|
34
36
|
export * from './components/head-cell';
|
|
35
37
|
export * from './components/health-factor';
|
|
36
38
|
export * from './components/help-tip';
|
|
39
|
+
export * from './components/hf-indicator';
|
|
37
40
|
export * from './components/icon-button';
|
|
38
41
|
export * from './components/icons';
|
|
42
|
+
export * from './components/infinite-scroll';
|
|
39
43
|
export * from './components/input';
|
|
40
44
|
export * from './components/label';
|
|
41
45
|
export * from './components/layout';
|
|
@@ -45,6 +49,7 @@ export * from './components/loader';
|
|
|
45
49
|
export * from './components/loading';
|
|
46
50
|
export * from './components/loading-bar';
|
|
47
51
|
export * from './components/modal';
|
|
52
|
+
export * from './components/name-cell';
|
|
48
53
|
export * from './components/navbar-logo';
|
|
49
54
|
export * from './components/navigation-context';
|
|
50
55
|
export * from './components/network-icon';
|
|
@@ -98,5 +103,5 @@ export * from './utils/a11y';
|
|
|
98
103
|
export { cn } from './utils/cn';
|
|
99
104
|
export * from './utils/copy';
|
|
100
105
|
export * from './utils/format';
|
|
101
|
-
export { formatMoney, formatPercentAmount, percentageTemplate, percentTemplate, } from './utils/format-money';
|
|
106
|
+
export { formatCompactPercent, formatMoney, formatPercentAmount, percentageTemplate, percentTemplate, } from './utils/format-money';
|
|
102
107
|
export * from './utils/templates';
|
|
@@ -6,6 +6,8 @@ declare const _default: {
|
|
|
6
6
|
"errors.tooManyRequests": "Too many requests",
|
|
7
7
|
"errors.incorrectAddress": "Incorrect address",
|
|
8
8
|
"components.errorMessage.oops": "Oops...",
|
|
9
|
+
"components.networkIndicator.title": "Network",
|
|
10
|
+
"components.infiniteScrollWrapper.showMore": "Show more",
|
|
9
11
|
|
|
10
12
|
"components.alertModal.ok": "Ok",
|
|
11
13
|
|
|
@@ -84,21 +86,20 @@ declare const _default: {
|
|
|
84
86
|
"components.apyParts.points": "{symbol} Incentive",
|
|
85
87
|
"components.apyParts.points.condition.crossDeposit": "For cross-chain deposits made via Omni",
|
|
86
88
|
|
|
87
|
-
"components.yieldBreakdown.
|
|
88
|
-
"components.yieldBreakdown.
|
|
89
|
-
"components.yieldBreakdown.
|
|
90
|
-
"components.yieldBreakdown.incentiveYield": "Incentive Yield",
|
|
89
|
+
"components.yieldBreakdown.titleNetAtLeverage": "Net APY at {leverage}× Leverage",
|
|
90
|
+
"components.yieldBreakdown.collateralApy": "Collateral APY",
|
|
91
|
+
"components.yieldBreakdown.incentive": "Incentive",
|
|
91
92
|
"components.yieldBreakdown.borrowRate": "Borrow Rate",
|
|
92
|
-
"components.yieldBreakdown.
|
|
93
|
-
"components.yieldBreakdown.additionalRate": "Additional Rate",
|
|
94
|
-
"components.yieldBreakdown.netYield": "Net Yield",
|
|
93
|
+
"components.yieldBreakdown.programPoints": "{name} Points",
|
|
95
94
|
"components.yieldBreakdown.points": "Points",
|
|
96
95
|
|
|
97
96
|
"components.openCopyButtons.copy": "Copy to clipboard",
|
|
98
97
|
|
|
99
|
-
"components.poolAssetsTable.asset": "
|
|
98
|
+
"components.poolAssetsTable.asset": "Name",
|
|
100
99
|
"components.poolAssetsTable.rate": "Effective rate",
|
|
101
|
-
"components.poolAssetsTable.
|
|
100
|
+
"components.poolAssetsTable.exposure": "Exposure",
|
|
101
|
+
"components.poolAssetsTable.cap": "Cap",
|
|
102
|
+
"components.poolAssetsTable.capUtilization": "Cap utilization",
|
|
102
103
|
"components.poolAssetsTable.usage": "{amount} of {total}",
|
|
103
104
|
"components.poolAssetsTable.head.name": "Credit Manager",
|
|
104
105
|
"components.poolAssetsTable.head.currentDebt": "Current Debt",
|
|
@@ -198,28 +199,32 @@ declare const _default: {
|
|
|
198
199
|
"components.historyChart.error": "Couldn't load chart data",
|
|
199
200
|
"components.historyChart.empty": "No data",
|
|
200
201
|
|
|
201
|
-
"components.positionTypeBadge.pool": "
|
|
202
|
+
"components.positionTypeBadge.pool": "LP",
|
|
202
203
|
"components.positionTypeBadge.strategy": "Strategy",
|
|
203
204
|
"components.positionTypeBadge.liquidation": "Liquidation",
|
|
204
205
|
|
|
206
|
+
"components.positionStatusBadge.active": "Active",
|
|
207
|
+
"components.positionStatusBadge.repaid": "Repaid",
|
|
208
|
+
|
|
205
209
|
"components.titleMeta.unknownCurator": "Curator",
|
|
206
210
|
|
|
207
211
|
"components.moreAccordion.more": "More details",
|
|
208
212
|
"components.moreAccordion.less": "Less details",
|
|
209
213
|
|
|
210
214
|
"components.poolApyBreakdownCard.title": "APY Breakdown",
|
|
211
|
-
"components.poolApyBreakdownCard.
|
|
212
|
-
"components.poolApyBreakdownCard.
|
|
213
|
-
"components.poolApyBreakdownCard.apy30d": "APY 30d",
|
|
215
|
+
"components.poolApyBreakdownCard.organicApy": "Pool organic APY",
|
|
216
|
+
"components.poolApyBreakdownCard.incentiveApy": "Incentive APY",
|
|
214
217
|
|
|
215
|
-
"components.strategyApyBreakdownCard.
|
|
216
|
-
"components.strategyApyBreakdownCard.formula": "How strategy APY is calculated: Collateral APY x Leverage - Base borrow rate x (Leverage - 1) - Additional borrow rate x Leverage x 1.05",
|
|
218
|
+
"components.strategyApyBreakdownCard.titleAtLeverage": "APY at {leverage}× Leverage",
|
|
217
219
|
"components.strategyApyBreakdownCard.collateralApy": "Collateral APY",
|
|
218
|
-
"components.strategyApyBreakdownCard.
|
|
219
|
-
"components.strategyApyBreakdownCard.
|
|
220
|
+
"components.strategyApyBreakdownCard.incentiveApy": "Incentive APY",
|
|
221
|
+
"components.strategyApyBreakdownCard.borrowRate": "Borrow Rate",
|
|
222
|
+
"components.strategyApyBreakdownCard.formula": "{base} × {leverage} Lev.",
|
|
223
|
+
|
|
224
|
+
"components.leveragePresetChips.label": "Leverage:",
|
|
220
225
|
|
|
221
226
|
"components.liquidationParamsTable.lt": "Liquidation threshold",
|
|
222
|
-
"components.liquidationParamsTable.penalty": "Liquidation
|
|
227
|
+
"components.liquidationParamsTable.penalty": "Liquidation discount",
|
|
223
228
|
"components.liquidationParamsTable.premium": "Liquidation premium",
|
|
224
229
|
"components.liquidationParamsTable.fee": "Liquidation fee",
|
|
225
230
|
|
|
@@ -14,21 +14,27 @@
|
|
|
14
14
|
*/
|
|
15
15
|
export declare function formatMoney(money: number | bigint, precision?: number): string;
|
|
16
16
|
/**
|
|
17
|
-
* Formats a percentage
|
|
17
|
+
* Formats a percentage with compact suffixes (`K` / `M` / `B` / `T`) instead
|
|
18
|
+
* of scientific notation. Input is already in percent form (`14000` → `14K%`).
|
|
19
|
+
*/
|
|
20
|
+
export declare function formatCompactPercent(value: number, decimals?: number): string;
|
|
21
|
+
/**
|
|
22
|
+
* Formats a percentage amount. Values of 1,000% and above use compact
|
|
23
|
+
* suffixes (`14K`) instead of exponential notation.
|
|
18
24
|
*
|
|
19
25
|
* @param value - The percentage value (already in percent form, e.g., 2.81 for 2.81%)
|
|
20
26
|
* @param decimals - Number of decimal places (default: 2)
|
|
21
|
-
* @param
|
|
27
|
+
* @param compact - Whether to compact large values (default: true)
|
|
22
28
|
* @returns Formatted number (without % sign)
|
|
23
29
|
*
|
|
24
30
|
* @example
|
|
25
31
|
* ```ts
|
|
26
32
|
* formatPercentAmount(2.81, 2) // "2.81"
|
|
27
|
-
* formatPercentAmount(
|
|
28
|
-
* formatPercentAmount(
|
|
33
|
+
* formatPercentAmount(14000, 2) // "14K"
|
|
34
|
+
* formatPercentAmount(14000, 2, false) // "14000.00"
|
|
29
35
|
* ```
|
|
30
36
|
*/
|
|
31
|
-
export declare function formatPercentAmount(value: number, decimals: number,
|
|
37
|
+
export declare function formatPercentAmount(value: number, decimals: number, compact?: boolean): string | number;
|
|
32
38
|
/**
|
|
33
39
|
* Formats a percentage value that is already in percent form
|
|
34
40
|
* Use this when your value is already 2.81 (meaning 2.81%), not 0.0281
|
|
@@ -10,10 +10,11 @@ export * from './copy';
|
|
|
10
10
|
export * from './format';
|
|
11
11
|
export * from './format-asset-amount';
|
|
12
12
|
export * from './format-leverage';
|
|
13
|
-
export { formatMoney, formatMoneyAmount, formatPercentAmount, percentageTemplate, percentTemplate, } from './format-money';
|
|
13
|
+
export { formatCompactPercent, formatMoney, formatMoneyAmount, formatPercentAmount, percentageTemplate, percentTemplate, } from './format-money';
|
|
14
14
|
export { FORMAT_CONSTANTS, type FormatNumberOptions, formatNumberWithSuffix, formatPrice, getAdaptiveDecimals, isBelowDisplayThreshold, isEffectivelyZero, toSignificantDigits, } from './format-number';
|
|
15
15
|
export * from './format-slippage';
|
|
16
16
|
export * from './interface';
|
|
17
|
+
export * from './leverage-presets';
|
|
17
18
|
export * from './loading';
|
|
18
19
|
export * from './math';
|
|
19
20
|
export * from './network-icons';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Leverage chips beside the strategy yield chart: 30% and 70% of the
|
|
3
|
+
* (1 → max) span, rounded to 0.5, plus max itself.
|
|
4
|
+
*/
|
|
5
|
+
export declare function leveragePresets(max: number): number[];
|
|
6
|
+
/** Chip / subtitle leverage without trailing zeros: `5`, `5.5`, `9.54`. */
|
|
7
|
+
export declare function formatChipLeverage(leverage: number): string;
|
package/package.json
CHANGED
package/src/styles/base.css
CHANGED
|
@@ -71,6 +71,8 @@ html.dark {
|
|
|
71
71
|
--success-foreground: 0 0% 0%;
|
|
72
72
|
--success-hover: 136.58 100% 85.1%;
|
|
73
73
|
--warning: 38 95% 45%;
|
|
74
|
+
--info: 214 80% 46%;
|
|
75
|
+
--info-foreground: 0 0% 100%;
|
|
74
76
|
--liquidation: 274 67% 48%;
|
|
75
77
|
--liquidation-line: 38 92% 50%;
|
|
76
78
|
--input: 225 10% 88%;
|
|
@@ -93,6 +95,19 @@ html.dark {
|
|
|
93
95
|
--white-foreground: 240 2.56% 7.65%;
|
|
94
96
|
--black: 0 0% 0%;
|
|
95
97
|
--border: 225 10% 88%;
|
|
98
|
+
--divider: 225 10% 88%;
|
|
99
|
+
--chart-1: 18 83.05% 65.29%;
|
|
100
|
+
--chart-2: 188 62.26% 58.43%;
|
|
101
|
+
--chart-3: 326 73.71% 65.69%;
|
|
102
|
+
--chart-4: 130 44.33% 61.96%;
|
|
103
|
+
--chart-5: 257 88.96% 68.04%;
|
|
104
|
+
--chart-6: 40 72.04% 63.53%;
|
|
105
|
+
--chart-7: 212 92.43% 63.73%;
|
|
106
|
+
--chart-8: 347 78.53% 65.29%;
|
|
107
|
+
--chart-9: 167 44.1% 55.1%;
|
|
108
|
+
--chart-10: 288 64.32% 63.73%;
|
|
109
|
+
--chart-11: 76 57.14% 61.57%;
|
|
110
|
+
--chart-12: 235 89.54% 70%;
|
|
96
111
|
}
|
|
97
112
|
|
|
98
113
|
.dark {
|
|
@@ -119,6 +134,8 @@ html.dark {
|
|
|
119
134
|
--success-hover: 136.58 100% 85.1%;
|
|
120
135
|
--destructive-foreground: 0 0% 100%;
|
|
121
136
|
--warning: 43.12 100% 68.63%;
|
|
137
|
+
--info: 215 88% 67%;
|
|
138
|
+
--info-foreground: 0 0% 100%;
|
|
122
139
|
--liquidation: 277.22 74.53% 58.43%;
|
|
123
140
|
--liquidation-line: 38 92% 50%;
|
|
124
141
|
--input: 225 6% 19%;
|
|
@@ -140,6 +157,19 @@ html.dark {
|
|
|
140
157
|
--white-foreground: 240 2.56% 7.65%;
|
|
141
158
|
--black: 0 0% 0%;
|
|
142
159
|
--border: 0 0% 100% / 0.07;
|
|
160
|
+
--divider: 218 8% 19%;
|
|
161
|
+
--chart-1: 18 83.05% 65.29%;
|
|
162
|
+
--chart-2: 188 62.26% 58.43%;
|
|
163
|
+
--chart-3: 326 73.71% 65.69%;
|
|
164
|
+
--chart-4: 130 44.33% 61.96%;
|
|
165
|
+
--chart-5: 257 88.96% 68.04%;
|
|
166
|
+
--chart-6: 40 72.04% 63.53%;
|
|
167
|
+
--chart-7: 212 92.43% 63.73%;
|
|
168
|
+
--chart-8: 347 78.53% 65.29%;
|
|
169
|
+
--chart-9: 167 44.1% 55.1%;
|
|
170
|
+
--chart-10: 288 64.32% 63.73%;
|
|
171
|
+
--chart-11: 76 57.14% 61.57%;
|
|
172
|
+
--chart-12: 235 89.54% 70%;
|
|
143
173
|
}
|
|
144
174
|
}
|
|
145
175
|
|
package/src/styles/theme.css
CHANGED
|
@@ -48,9 +48,12 @@
|
|
|
48
48
|
--color-success-foreground: hsl(var(--success-foreground));
|
|
49
49
|
--color-success-hover: hsl(var(--success-hover));
|
|
50
50
|
--color-warning: hsl(var(--warning));
|
|
51
|
+
--color-info: hsl(var(--info));
|
|
52
|
+
--color-info-foreground: hsl(var(--info-foreground));
|
|
51
53
|
--color-liquidation: hsl(var(--liquidation));
|
|
52
54
|
--color-liquidation-line: hsl(var(--liquidation-line));
|
|
53
55
|
--color-border: hsl(var(--border));
|
|
56
|
+
--color-divider: hsl(var(--divider));
|
|
54
57
|
--color-input: hsl(var(--input));
|
|
55
58
|
--color-ring: hsl(var(--ring));
|
|
56
59
|
--color-text-secondary: hsl(var(--text-secondary));
|
|
@@ -74,6 +77,19 @@
|
|
|
74
77
|
--color-additional-success: hsl(var(--success));
|
|
75
78
|
--color-additional-warning: hsl(var(--warning));
|
|
76
79
|
--color-additional-alert: hsl(var(--destructive));
|
|
80
|
+
--color-additional-info: hsl(var(--info));
|
|
81
|
+
--color-chart-1: hsl(var(--chart-1));
|
|
82
|
+
--color-chart-2: hsl(var(--chart-2));
|
|
83
|
+
--color-chart-3: hsl(var(--chart-3));
|
|
84
|
+
--color-chart-4: hsl(var(--chart-4));
|
|
85
|
+
--color-chart-5: hsl(var(--chart-5));
|
|
86
|
+
--color-chart-6: hsl(var(--chart-6));
|
|
87
|
+
--color-chart-7: hsl(var(--chart-7));
|
|
88
|
+
--color-chart-8: hsl(var(--chart-8));
|
|
89
|
+
--color-chart-9: hsl(var(--chart-9));
|
|
90
|
+
--color-chart-10: hsl(var(--chart-10));
|
|
91
|
+
--color-chart-11: hsl(var(--chart-11));
|
|
92
|
+
--color-chart-12: hsl(var(--chart-12));
|
|
77
93
|
|
|
78
94
|
--radius-lg: var(--radius);
|
|
79
95
|
--radius-md: calc(var(--radius) - 2px);
|