@gearbox-protocol/ui-kit 3.14.0-next.6 → 3.14.0-next.61
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/README.md +1 -0
- package/dist/cjs/components/alert-badge/alert-badge.cjs +1 -1
- package/dist/cjs/components/app-bar/app-bar.cjs +1 -1
- package/dist/cjs/components/apy/apy.cjs +1 -1
- package/dist/cjs/components/assets-list-cell/assets-list-cell.cjs +1 -1
- package/dist/cjs/components/block-sync/block-sync.cjs +1 -1
- package/dist/cjs/components/block-sync-pill/block-sync-pill.cjs +1 -0
- package/dist/cjs/components/block-sync-pill/block-sync-status.cjs +1 -0
- package/dist/cjs/components/block-sync-pill/index.cjs +1 -0
- package/dist/cjs/components/buttons/button/button.cjs +1 -1
- package/dist/cjs/components/checkbox/checkbox-labeled.cjs +1 -1
- package/dist/cjs/components/client-adapters/styled-button/styled-button.cjs +1 -1
- package/dist/cjs/components/client-adapters/styled-rounded-image/styled-rounded-image.cjs +1 -1
- package/dist/cjs/components/complex-input/complex-input.cjs +1 -1
- package/dist/cjs/components/composites/credit-account-history/body.cjs +1 -0
- package/dist/cjs/components/composites/credit-account-history/cells/details.cjs +1 -0
- package/dist/cjs/components/composites/credit-account-history/cells/hash.cjs +1 -0
- package/dist/cjs/components/composites/credit-account-history/cells/index.cjs +1 -0
- package/dist/cjs/components/composites/credit-account-history/cells/protocol.cjs +1 -0
- package/dist/cjs/components/composites/credit-account-history/cells/token-list.cjs +1 -0
- package/dist/cjs/components/composites/credit-account-history/credit-account-history.cjs +1 -0
- package/dist/cjs/components/composites/credit-account-history/index.cjs +1 -0
- package/dist/cjs/components/composites/credit-account-history/line.cjs +1 -0
- package/dist/cjs/components/composites/credit-account-history/types.cjs +1 -0
- package/dist/cjs/components/composites/index.cjs +1 -1
- package/dist/cjs/components/composites/notification-center/index.cjs +1 -0
- package/dist/cjs/components/composites/notification-center/notification-center.cjs +1 -0
- package/dist/cjs/components/composites/notification-center/types.cjs +1 -0
- package/dist/cjs/components/composites/pool-table/columns.cjs +1 -1
- package/dist/cjs/components/composites/tx-preview/confirm/amounts/TransactionConfirmAmountField.cjs +1 -0
- package/dist/cjs/components/composites/tx-preview/confirm/amounts/constants.cjs +1 -0
- package/dist/cjs/components/composites/tx-preview/confirm/amounts/index.cjs +1 -0
- package/dist/cjs/components/composites/tx-preview/confirm/dialog/TransactionConfirmModalView.cjs +1 -0
- package/dist/cjs/components/composites/tx-preview/confirm/dialog/TransactionConfirmPageView.cjs +1 -0
- package/dist/cjs/components/composites/tx-preview/confirm/dialog/TransactionConfirmShell.cjs +1 -0
- package/dist/cjs/components/composites/tx-preview/confirm/dialog/computeTransactionConfirmDialogLayout.cjs +1 -0
- package/dist/cjs/components/composites/tx-preview/confirm/dialog/constants.cjs +1 -0
- package/dist/cjs/components/composites/tx-preview/confirm/dialog/index.cjs +1 -0
- package/dist/cjs/components/composites/tx-preview/confirm/dialog/transactionConfirmPhase.cjs +1 -0
- package/dist/cjs/components/composites/tx-preview/confirm/execution/TransactionConfirmExecuteButton.cjs +1 -0
- package/dist/cjs/components/composites/tx-preview/confirm/execution/index.cjs +1 -0
- package/dist/cjs/components/composites/tx-preview/confirm/index.cjs +1 -0
- package/dist/cjs/components/composites/tx-preview/confirm/result/TransactionConfirmFailureResult.cjs +1 -0
- package/dist/cjs/components/composites/tx-preview/confirm/result/TransactionConfirmSuccessIcon.cjs +1 -0
- package/dist/cjs/components/composites/tx-preview/confirm/result/TransactionConfirmSuccessResult.cjs +1 -0
- package/dist/cjs/components/composites/tx-preview/confirm/result/TransactionConfirmTxHashRow.cjs +1 -0
- package/dist/cjs/components/composites/tx-preview/confirm/result/constants.cjs +1 -0
- package/dist/cjs/components/composites/tx-preview/confirm/result/index.cjs +1 -0
- package/dist/cjs/components/composites/tx-preview/confirm/stepper/ProgressStepper.cjs +1 -0
- package/dist/cjs/components/composites/tx-preview/confirm/stepper/constants.cjs +1 -0
- package/dist/cjs/components/composites/tx-preview/confirm/stepper/index.cjs +1 -0
- package/dist/cjs/components/composites/tx-preview/confirm/stepper/transactionExecutionStepTypes.cjs +1 -0
- package/dist/cjs/components/composites/tx-preview/index.cjs +1 -0
- package/dist/cjs/components/compound-apy/compound-apy.cjs +1 -1
- package/dist/cjs/components/confirm-menu/confirm-menu.cjs +1 -1
- package/dist/cjs/components/detailed-page-title/detailed-page-title.cjs +1 -1
- package/dist/cjs/components/graph/formatters.cjs +1 -1
- package/dist/cjs/components/graph/graph.cjs +1 -1
- package/dist/cjs/components/graph/index.cjs +1 -1
- package/dist/cjs/components/health-factor/health-factor.cjs +1 -1
- package/dist/cjs/components/index.cjs +1 -1
- package/dist/cjs/components/layout/app-footer/app-footer.cjs +1 -0
- package/dist/cjs/components/layout/app-footer/index.cjs +1 -0
- package/dist/cjs/components/layout/app-header/app-header.cjs +1 -0
- package/dist/cjs/components/layout/app-header/index.cjs +1 -0
- package/dist/cjs/components/layout/index.cjs +1 -1
- package/dist/cjs/components/layout/main-aside-layout/main-aside-layout.cjs +1 -1
- package/dist/cjs/components/legal-agreement/index.cjs +1 -1
- package/dist/cjs/components/legal-agreement/legal-agreement-awaiting-panel.cjs +1 -0
- package/dist/cjs/components/legal-agreement/legal-agreement-dialog.cjs +1 -1
- package/dist/cjs/components/legal-agreement/legal-agreement-link.cjs +1 -0
- package/dist/cjs/components/legal-agreement/legal-agreement-panel.cjs +1 -0
- package/dist/cjs/components/legal-agreement/legal-agreement-theme.cjs +1 -0
- package/dist/cjs/components/legal-agreement/legal-agreement.stories-config.cjs +1 -0
- package/dist/cjs/components/link/link.cjs +1 -1
- package/dist/cjs/components/loader-guard/loader-guard.cjs +1 -1
- package/dist/cjs/components/markdown-viewer/markdown-viewer.cjs +1 -1
- package/dist/cjs/components/segmented-control/segmented-control.cjs +1 -1
- package/dist/cjs/components/smart-number-input/smart-number-input.cjs +1 -1
- package/dist/cjs/components/tab-control/tab-control.cjs +1 -1
- package/dist/cjs/components/time-to-liquidation/time-to-liquidation.cjs +1 -1
- package/dist/cjs/components/token-template/token-template.cjs +1 -1
- package/dist/cjs/components/tokens-list-cell/tokens-list-cell.cjs +1 -1
- package/dist/cjs/components/trading-view/trading-view.cjs +1 -1
- package/dist/cjs/components/vertical-indicator/vertical-indicator.cjs +1 -1
- package/dist/cjs/components/with-copy/with-copy.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-filter.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/locale/en.json.cjs +1 -1
- package/dist/cjs/test-ids/index.cjs +1 -1
- package/dist/cjs/test-ids/notification-center.cjs +1 -0
- package/dist/esm/components/alert-badge/alert-badge.js +12 -10
- package/dist/esm/components/app-bar/app-bar.js +1 -1
- package/dist/esm/components/apy/apy.js +9 -9
- package/dist/esm/components/assets-list-cell/assets-list-cell.js +14 -8
- package/dist/esm/components/block-sync/block-sync.js +14 -8
- package/dist/esm/components/block-sync-pill/block-sync-pill.js +243 -0
- package/dist/esm/components/block-sync-pill/block-sync-status.js +12 -0
- package/dist/esm/components/block-sync-pill/index.js +4 -0
- package/dist/esm/components/buttons/button/button.js +1 -0
- package/dist/esm/components/checkbox/checkbox-labeled.js +12 -6
- package/dist/esm/components/client-adapters/styled-button/styled-button.js +11 -11
- package/dist/esm/components/client-adapters/styled-rounded-image/styled-rounded-image.js +12 -6
- package/dist/esm/components/complex-input/complex-input.js +14 -8
- package/dist/esm/components/composites/credit-account-history/body.js +73 -0
- package/dist/esm/components/composites/credit-account-history/cells/details.js +22 -0
- package/dist/esm/components/composites/credit-account-history/cells/hash.js +24 -0
- package/dist/esm/components/composites/credit-account-history/cells/index.js +10 -0
- package/dist/esm/components/composites/credit-account-history/cells/protocol.js +25 -0
- package/dist/esm/components/composites/credit-account-history/cells/token-list.js +43 -0
- package/dist/esm/components/composites/credit-account-history/credit-account-history.js +46 -0
- package/dist/esm/components/composites/credit-account-history/index.js +8 -0
- package/dist/esm/components/composites/credit-account-history/line.js +125 -0
- package/dist/esm/components/composites/credit-account-history/types.js +9 -0
- package/dist/esm/components/composites/index.js +125 -79
- package/dist/esm/components/composites/notification-center/index.js +4 -0
- package/dist/esm/components/composites/notification-center/notification-center.js +208 -0
- package/dist/esm/components/composites/notification-center/types.js +1 -0
- package/dist/esm/components/composites/pool-table/columns.js +51 -45
- package/dist/esm/components/composites/tx-preview/confirm/amounts/TransactionConfirmAmountField.js +234 -0
- package/dist/esm/components/composites/tx-preview/confirm/amounts/constants.js +10 -0
- package/dist/esm/components/composites/tx-preview/confirm/amounts/index.js +7 -0
- package/dist/esm/components/composites/tx-preview/confirm/dialog/TransactionConfirmModalView.js +213 -0
- package/dist/esm/components/composites/tx-preview/confirm/dialog/TransactionConfirmPageView.js +53 -0
- package/dist/esm/components/composites/tx-preview/confirm/dialog/TransactionConfirmShell.js +97 -0
- package/dist/esm/components/composites/tx-preview/confirm/dialog/computeTransactionConfirmDialogLayout.js +35 -0
- package/dist/esm/components/composites/tx-preview/confirm/dialog/constants.js +23 -0
- package/dist/esm/components/composites/tx-preview/confirm/dialog/index.js +14 -0
- package/dist/esm/components/composites/tx-preview/confirm/dialog/transactionConfirmPhase.js +1 -0
- package/dist/esm/components/composites/tx-preview/confirm/execution/TransactionConfirmExecuteButton.js +30 -0
- package/dist/esm/components/composites/tx-preview/confirm/execution/index.js +4 -0
- package/dist/esm/components/composites/tx-preview/confirm/index.js +40 -0
- package/dist/esm/components/composites/tx-preview/confirm/result/TransactionConfirmFailureResult.js +55 -0
- package/dist/esm/components/composites/tx-preview/confirm/result/TransactionConfirmSuccessIcon.js +25 -0
- package/dist/esm/components/composites/tx-preview/confirm/result/TransactionConfirmSuccessResult.js +60 -0
- package/dist/esm/components/composites/tx-preview/confirm/result/TransactionConfirmTxHashRow.js +21 -0
- package/dist/esm/components/composites/tx-preview/confirm/result/constants.js +24 -0
- package/dist/esm/components/composites/tx-preview/confirm/result/index.js +15 -0
- package/dist/esm/components/composites/tx-preview/confirm/stepper/ProgressStepper.js +105 -0
- package/dist/esm/components/composites/tx-preview/confirm/stepper/constants.js +6 -0
- package/dist/esm/components/composites/tx-preview/confirm/stepper/index.js +8 -0
- package/dist/esm/components/composites/tx-preview/confirm/stepper/transactionExecutionStepTypes.js +6 -0
- package/dist/esm/components/composites/tx-preview/index.js +40 -0
- package/dist/esm/components/compound-apy/compound-apy.js +14 -8
- package/dist/esm/components/confirm-menu/confirm-menu.js +28 -25
- package/dist/esm/components/detailed-page-title/detailed-page-title.js +12 -6
- package/dist/esm/components/graph/formatters.js +128 -132
- package/dist/esm/components/graph/graph.js +744 -389
- package/dist/esm/components/graph/index.js +26 -24
- package/dist/esm/components/health-factor/health-factor.js +27 -26
- package/dist/esm/components/index.js +793 -722
- package/dist/esm/components/layout/app-footer/app-footer.js +54 -0
- package/dist/esm/components/layout/app-footer/index.js +5 -0
- package/dist/esm/components/layout/app-header/app-header.js +100 -0
- package/dist/esm/components/layout/app-header/index.js +4 -0
- package/dist/esm/components/layout/index.js +32 -27
- package/dist/esm/components/layout/main-aside-layout/main-aside-layout.js +107 -58
- package/dist/esm/components/legal-agreement/index.js +23 -7
- package/dist/esm/components/legal-agreement/legal-agreement-awaiting-panel.js +29 -0
- package/dist/esm/components/legal-agreement/legal-agreement-dialog.js +72 -212
- package/dist/esm/components/legal-agreement/legal-agreement-link.js +22 -0
- package/dist/esm/components/legal-agreement/legal-agreement-panel.js +130 -0
- package/dist/esm/components/legal-agreement/legal-agreement-theme.js +137 -0
- package/dist/esm/components/legal-agreement/legal-agreement.stories-config.js +170 -0
- package/dist/esm/components/link/link.js +42 -35
- package/dist/esm/components/loader-guard/loader-guard.js +7 -5
- package/dist/esm/components/markdown-viewer/markdown-viewer.js +14 -8
- package/dist/esm/components/segmented-control/segmented-control.js +21 -21
- package/dist/esm/components/smart-number-input/smart-number-input.js +33 -29
- package/dist/esm/components/tab-control/tab-control.js +1 -1
- package/dist/esm/components/time-to-liquidation/time-to-liquidation.js +12 -6
- package/dist/esm/components/token-template/token-template.js +17 -17
- package/dist/esm/components/tokens-list-cell/tokens-list-cell.js +14 -8
- package/dist/esm/components/trading-view/trading-view.js +164 -147
- package/dist/esm/components/vertical-indicator/vertical-indicator.js +39 -33
- package/dist/esm/components/with-copy/with-copy.js +14 -8
- package/dist/esm/configs/tailwind-preset.js +1 -0
- package/dist/esm/hooks/index.js +50 -47
- package/dist/esm/hooks/use-filter.js +63 -29
- package/dist/esm/index.js +972 -896
- package/dist/esm/locale/en.json.js +10 -0
- package/dist/esm/test-ids/index.js +14 -12
- package/dist/esm/test-ids/notification-center.js +16 -0
- package/dist/globals.css +1 -1
- package/dist/types/components/alert-badge/alert-badge.d.ts +1 -1
- package/dist/types/components/block-sync-pill/block-sync-pill.d.ts +35 -0
- package/dist/types/components/block-sync-pill/block-sync-status.d.ts +29 -0
- package/dist/types/components/block-sync-pill/index.d.ts +1 -0
- package/dist/types/components/buttons/button/button.d.ts +4 -3
- package/dist/types/components/composites/credit-account-history/body.d.ts +14 -0
- package/dist/types/components/composites/credit-account-history/cells/details.d.ts +9 -0
- package/dist/types/components/composites/credit-account-history/cells/hash.d.ts +6 -0
- package/dist/types/components/composites/credit-account-history/cells/index.d.ts +4 -0
- package/dist/types/components/composites/credit-account-history/cells/protocol.d.ts +7 -0
- package/dist/types/components/composites/credit-account-history/cells/token-list.d.ts +9 -0
- package/dist/types/components/composites/credit-account-history/credit-account-history.d.ts +15 -0
- package/dist/types/components/composites/credit-account-history/index.d.ts +2 -0
- package/dist/types/components/composites/credit-account-history/line.d.ts +18 -0
- package/dist/types/components/composites/credit-account-history/types.d.ts +36 -0
- package/dist/types/components/composites/index.d.ts +3 -0
- package/dist/types/components/composites/notification-center/index.d.ts +2 -0
- package/dist/types/components/composites/notification-center/notification-center.d.ts +9 -0
- package/dist/types/components/composites/notification-center/types.d.ts +31 -0
- package/dist/types/components/composites/tx-preview/confirm/amounts/TransactionConfirmAmountField.d.ts +29 -0
- package/dist/types/components/composites/tx-preview/confirm/amounts/constants.d.ts +6 -0
- package/dist/types/components/composites/tx-preview/confirm/amounts/index.d.ts +2 -0
- package/dist/types/components/composites/tx-preview/confirm/dialog/TransactionConfirmModalView.d.ts +17 -0
- package/dist/types/components/composites/tx-preview/confirm/dialog/TransactionConfirmPageView.d.ts +15 -0
- package/dist/types/components/composites/tx-preview/confirm/dialog/TransactionConfirmShell.d.ts +23 -0
- package/dist/types/components/composites/tx-preview/confirm/dialog/computeTransactionConfirmDialogLayout.d.ts +8 -0
- package/dist/types/components/composites/tx-preview/confirm/dialog/constants.d.ts +17 -0
- package/dist/types/components/composites/tx-preview/confirm/dialog/index.d.ts +5 -0
- package/dist/types/components/composites/tx-preview/confirm/dialog/transactionConfirmPhase.d.ts +4 -0
- package/dist/types/components/composites/tx-preview/confirm/execution/TransactionConfirmExecuteButton.d.ts +6 -0
- package/dist/types/components/composites/tx-preview/confirm/execution/index.d.ts +1 -0
- package/dist/types/components/composites/tx-preview/confirm/index.d.ts +5 -0
- package/dist/types/components/composites/tx-preview/confirm/result/TransactionConfirmFailureResult.d.ts +8 -0
- package/dist/types/components/composites/tx-preview/confirm/result/TransactionConfirmSuccessIcon.d.ts +2 -0
- package/dist/types/components/composites/tx-preview/confirm/result/TransactionConfirmSuccessResult.d.ts +8 -0
- package/dist/types/components/composites/tx-preview/confirm/result/TransactionConfirmTxHashRow.d.ts +6 -0
- package/dist/types/components/composites/tx-preview/confirm/result/constants.d.ts +18 -0
- package/dist/types/components/composites/tx-preview/confirm/result/index.d.ts +5 -0
- package/dist/types/components/composites/tx-preview/confirm/stepper/ProgressStepper.d.ts +36 -0
- package/dist/types/components/composites/tx-preview/confirm/stepper/constants.d.ts +3 -0
- package/dist/types/components/composites/tx-preview/confirm/stepper/index.d.ts +3 -0
- package/dist/types/components/composites/tx-preview/confirm/stepper/transactionExecutionStepTypes.d.ts +10 -0
- package/dist/types/components/composites/tx-preview/index.d.ts +1 -0
- package/dist/types/components/confirm-menu/confirm-menu.d.ts +4 -2
- package/dist/types/components/graph/graph.d.ts +112 -2
- package/dist/types/components/graph/index.d.ts +1 -1
- package/dist/types/components/health-factor/health-factor.d.ts +6 -3
- package/dist/types/components/index.d.ts +1 -0
- package/dist/types/components/layout/app-footer/app-footer.d.ts +62 -0
- package/dist/types/components/layout/app-footer/index.d.ts +1 -0
- package/dist/types/components/layout/app-header/app-header.d.ts +67 -0
- package/dist/types/components/layout/app-header/index.d.ts +1 -0
- package/dist/types/components/layout/index.d.ts +2 -0
- package/dist/types/components/layout/main-aside-layout/main-aside-layout.d.ts +42 -0
- package/dist/types/components/legal-agreement/index.d.ts +5 -1
- package/dist/types/components/legal-agreement/legal-agreement-awaiting-panel.d.ts +10 -0
- package/dist/types/components/legal-agreement/legal-agreement-dialog.d.ts +19 -52
- package/dist/types/components/legal-agreement/legal-agreement-link.d.ts +11 -0
- package/dist/types/components/legal-agreement/legal-agreement-panel.d.ts +16 -0
- package/dist/types/components/legal-agreement/legal-agreement-theme.d.ts +36 -0
- package/dist/types/components/legal-agreement/legal-agreement.stories-config.d.ts +11 -0
- package/dist/types/components/trading-view/trading-view.d.ts +15 -1
- package/dist/types/components/vertical-indicator/vertical-indicator.d.ts +6 -0
- package/dist/types/configs/tailwind-preset.d.ts +1 -0
- package/dist/types/hooks/use-filter.d.ts +46 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/locale/en.json.d.ts +13 -0
- package/dist/types/test-ids/index.d.ts +1 -0
- package/dist/types/test-ids/notification-center.d.ts +13 -0
- package/dist/types/types/footer.d.ts +24 -3
- package/package.json +7 -4
- package/src/styles/base.css +2 -0
- package/src/styles/theme.css +1 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
declare const alertBadgeVariants: (props?: ({
|
|
4
|
-
variant?: "default" | "success" | "warning" | "primary" | "alert" | "info" | null | undefined;
|
|
4
|
+
variant?: "none" | "default" | "success" | "warning" | "primary" | "alert" | "info" | null | undefined;
|
|
5
5
|
size?: "default" | "sm" | "lg" | null | undefined;
|
|
6
6
|
fullWidth?: boolean | null | undefined;
|
|
7
7
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { BlockSyncProps } from '../../types/footer';
|
|
2
|
+
import type * as React from "react";
|
|
3
|
+
export interface BlockSyncPillProps extends BlockSyncProps {
|
|
4
|
+
/**
|
|
5
|
+
* Label rendered inside the status pill. Defaults to `Status`.
|
|
6
|
+
*/
|
|
7
|
+
statusLabel?: React.ReactNode;
|
|
8
|
+
/**
|
|
9
|
+
* Additional class names applied to the pill wrapper.
|
|
10
|
+
*/
|
|
11
|
+
className?: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* BlockSyncPill — backend-sync status rendered as an {@link AppFooter}-style
|
|
15
|
+
* pill: a thin bordered, rounded badge with a status dot and a label.
|
|
16
|
+
*
|
|
17
|
+
* Reflects the **liveness** of the data-refresh loop rather than raw block age:
|
|
18
|
+
* - **loading** (no successful sync yet): the dot is a pulsing neutral gray;
|
|
19
|
+
* - **synced** (within `syncIntervalMs * staleMultiplier`, no errors): green,
|
|
20
|
+
* pulsing while a refresh is in flight;
|
|
21
|
+
* - **error / stalled**: red.
|
|
22
|
+
*
|
|
23
|
+
* Hovering reveals per-chain block numbers and the local time of the last sync.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```tsx
|
|
27
|
+
* <BlockSyncPill
|
|
28
|
+
* blockByChain={blockByChain}
|
|
29
|
+
* explorerAddresses={explorerAddresses}
|
|
30
|
+
* networkById={networkById}
|
|
31
|
+
* syncIntervalMs={300000}
|
|
32
|
+
* />
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
export declare function BlockSyncPill({ blockByChain, explorerAddresses, networkById, syncIntervalMs, staleMultiplier, statusLabel, className, }: BlockSyncPillProps): React.ReactElement;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { BlockByChain } from '../../types/footer';
|
|
2
|
+
/**
|
|
3
|
+
* Liveness state of the data-refresh loop, derived from per-chain sync info:
|
|
4
|
+
* - `loading` — nothing has successfully synced yet (initial state);
|
|
5
|
+
* - `synced` — at least one chain synced and none are stale/failing;
|
|
6
|
+
* - `error` — a chain reported an error, or the oldest sync is stale.
|
|
7
|
+
*/
|
|
8
|
+
export type BlockSyncState = "loading" | "synced" | "error";
|
|
9
|
+
export interface BlockSyncStatus {
|
|
10
|
+
state: BlockSyncState;
|
|
11
|
+
/** True while any chain has a refresh in flight. */
|
|
12
|
+
isSyncing: boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface GetBlockSyncStatusProps {
|
|
15
|
+
blockByChain: BlockByChain | undefined;
|
|
16
|
+
/** Reference "now" timestamp (ms) used to evaluate staleness. */
|
|
17
|
+
now: number;
|
|
18
|
+
/** Age (ms) after which the oldest sync is considered stale. */
|
|
19
|
+
staleAfterMs: number;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Pure derivation of the {@link BlockSyncState} from chain sync info.
|
|
23
|
+
*
|
|
24
|
+
* A chain counts as "synced" only when it has both a real block (`> 0`) and a
|
|
25
|
+
* local sync timestamp. Staleness is measured against the **oldest** synced
|
|
26
|
+
* chain, so a single lagging chain is enough to flag the whole indicator.
|
|
27
|
+
* Errors take priority over everything else.
|
|
28
|
+
*/
|
|
29
|
+
export declare function getBlockSyncStatus({ blockByChain, now, staleAfterMs, }: GetBlockSyncStatusProps): BlockSyncStatus;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './block-sync-pill';
|
|
@@ -2,7 +2,7 @@ import { VariantProps } from 'class-variance-authority';
|
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
declare const buttonVariants: (props?: ({
|
|
4
4
|
variant?: "link" | "text" | "default" | "success" | "destructive" | "ghost" | "outline" | "secondary" | "white" | "neutral" | "pink" | "pink-outline" | "blue" | "blue-outline" | null | undefined;
|
|
5
|
-
size?: "default" | "icon" | "auto" | "xs" | "sm" | "lg" | null | undefined;
|
|
5
|
+
size?: "default" | "icon" | "auto" | "xs" | "sm" | "lg" | "md" | null | undefined;
|
|
6
6
|
width?: "compact" | "wide" | null | undefined;
|
|
7
7
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
8
8
|
/**
|
|
@@ -43,8 +43,9 @@ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElemen
|
|
|
43
43
|
* Sizes (size):
|
|
44
44
|
* - `auto` — automatic height without padding.
|
|
45
45
|
* - `xs` — extra small (rounded-full, px-3, text-xs).
|
|
46
|
-
* - `sm` — small (h-
|
|
47
|
-
* - `
|
|
46
|
+
* - `sm` — small (h-7, px-3, text-xs).
|
|
47
|
+
* - `md` — medium (h-8, px-3.5, text-sm).
|
|
48
|
+
* - `default` — standard (h-10, px-4).
|
|
48
49
|
* - `lg` — large (h-10, px-8).
|
|
49
50
|
* - `icon` — square button for icons (h-9 w-9).
|
|
50
51
|
*
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { TokenData } from '@gearbox-protocol/sdk/common-utils';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
import { Address } from 'viem';
|
|
4
|
+
import { CreditAccountOperationLike, ProtocolsList } from './types';
|
|
5
|
+
export interface HistoryBodyProps {
|
|
6
|
+
readonly creditManager: {
|
|
7
|
+
underlyingToken: Address;
|
|
8
|
+
};
|
|
9
|
+
readonly tokens: Record<Address, TokenData>;
|
|
10
|
+
readonly protocols: ProtocolsList | undefined;
|
|
11
|
+
readonly dataList: Array<CreditAccountOperationLike>;
|
|
12
|
+
readonly explorerUrl?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare function HistoryBody({ dataList, creditManager, tokens, protocols, explorerUrl, }: HistoryBodyProps): React.ReactElement;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { TokenData } from '@gearbox-protocol/sdk/common-utils';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
import { Address } from 'viem';
|
|
4
|
+
import { OperationDetails } from '../types';
|
|
5
|
+
export interface DetailsProps {
|
|
6
|
+
readonly data: OperationDetails;
|
|
7
|
+
readonly tokensList: Record<Address, TokenData>;
|
|
8
|
+
}
|
|
9
|
+
export declare function Details({ data: { from, leverage, to }, tokensList, }: DetailsProps): React.ReactElement;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ProtocolData } from '../types';
|
|
3
|
+
export interface ProtocolProps {
|
|
4
|
+
readonly protocol: ProtocolData;
|
|
5
|
+
readonly isUnderlying?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare function Protocol({ isUnderlying, protocol: { icon, name }, }: ProtocolProps): React.ReactElement;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { TokenData } from '@gearbox-protocol/sdk/common-utils';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
import { Address } from 'viem';
|
|
4
|
+
import { DetailsEntry } from '../types';
|
|
5
|
+
export interface TokenListProps {
|
|
6
|
+
readonly data: Array<DetailsEntry>;
|
|
7
|
+
readonly tokensList: Record<Address, TokenData>;
|
|
8
|
+
}
|
|
9
|
+
export declare function TokenList({ data, tokensList, }: TokenListProps): React.ReactElement;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { TokenData } from '@gearbox-protocol/sdk/common-utils';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
import { Address } from 'viem';
|
|
4
|
+
import { CreditAccountOperationLike, ProtocolsList } from './types';
|
|
5
|
+
export interface CreditAccountHistoryProps {
|
|
6
|
+
readonly creditManager: {
|
|
7
|
+
underlyingToken: Address;
|
|
8
|
+
};
|
|
9
|
+
readonly tokens: Record<Address, TokenData>;
|
|
10
|
+
readonly protocols: ProtocolsList | undefined;
|
|
11
|
+
readonly dataList: Array<CreditAccountOperationLike>;
|
|
12
|
+
readonly isLoading?: boolean;
|
|
13
|
+
readonly explorerUrl?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare const CreditAccountHistory: React.NamedExoticComponent<CreditAccountHistoryProps>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { TokenData } from '@gearbox-protocol/sdk/common-utils';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
import { Address } from 'viem';
|
|
4
|
+
import { CreditAccountOperationLike, OperationDetails, ProtocolsList } from './types';
|
|
5
|
+
export interface HistoryLineProps {
|
|
6
|
+
readonly data: CreditAccountOperationLike;
|
|
7
|
+
readonly details: OperationDetails;
|
|
8
|
+
readonly tokens: Record<Address, TokenData>;
|
|
9
|
+
readonly protocols: ProtocolsList | undefined;
|
|
10
|
+
readonly hideBorder: boolean;
|
|
11
|
+
readonly index: {
|
|
12
|
+
index: number;
|
|
13
|
+
outOf: number;
|
|
14
|
+
};
|
|
15
|
+
readonly underlyingToken: Address;
|
|
16
|
+
readonly explorerUrl?: string;
|
|
17
|
+
}
|
|
18
|
+
export declare function HistoryLine({ data, details, tokens, protocols, hideBorder, index, underlyingToken, explorerUrl, }: HistoryLineProps): React.ReactElement;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { TokenData } from '@gearbox-protocol/sdk/common-utils';
|
|
2
|
+
import { Address } from 'viem';
|
|
3
|
+
export declare const ZERO_ADDRESS: Address;
|
|
4
|
+
export interface DetailsEntry {
|
|
5
|
+
readonly token?: Address;
|
|
6
|
+
readonly account?: Address;
|
|
7
|
+
readonly description?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface OperationDetails {
|
|
10
|
+
readonly from: Array<DetailsEntry>;
|
|
11
|
+
readonly leverage?: string;
|
|
12
|
+
readonly to?: Array<DetailsEntry>;
|
|
13
|
+
}
|
|
14
|
+
export interface ProtocolData {
|
|
15
|
+
readonly name: string;
|
|
16
|
+
readonly icon: string;
|
|
17
|
+
}
|
|
18
|
+
export type ProtocolsList = Record<Address, ProtocolData>;
|
|
19
|
+
export declare const GEARBOX_PROTOCOL_INFO: ProtocolData;
|
|
20
|
+
export interface CreditAccountOperationLike {
|
|
21
|
+
readonly txHash: string;
|
|
22
|
+
readonly date: string;
|
|
23
|
+
readonly time: string;
|
|
24
|
+
readonly timestamp: number;
|
|
25
|
+
readonly protocol: string;
|
|
26
|
+
readonly sessionId: string;
|
|
27
|
+
readonly blockNum: number;
|
|
28
|
+
readonly operation: string;
|
|
29
|
+
readonly operationType: string;
|
|
30
|
+
getDetails(token: Address, tokensList: Record<Address, TokenData>): [OperationDetails, Array<CreditAccountOperationLike>?];
|
|
31
|
+
}
|
|
32
|
+
export interface OpenCreditAccountLike extends CreditAccountOperationLike {
|
|
33
|
+
readonly from: bigint;
|
|
34
|
+
readonly leverage: number;
|
|
35
|
+
}
|
|
36
|
+
export declare const isMulticallOperation: (op: unknown) => boolean;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
export * from './credit-account-history';
|
|
2
|
+
export * from './notification-center';
|
|
1
3
|
export * from './oracles-and-lt-table';
|
|
2
4
|
export * from './pool-assets-table';
|
|
3
5
|
export * from './pool-credit-manager-info';
|
|
4
6
|
export * from './pool-credit-managers-table';
|
|
5
7
|
export * from './pool-table';
|
|
6
8
|
export * from './strategies-table';
|
|
9
|
+
export * from './tx-preview';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { NotificationCenterProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Presentational notification center: a bell trigger with a request-count badge
|
|
5
|
+
* and a dropdown listing deferred ("Requests") and settled ("Recent")
|
|
6
|
+
* operations. Fully controlled and data-agnostic — the host builds the row view
|
|
7
|
+
* models (titles, status labels, timestamps) and wires the callbacks.
|
|
8
|
+
*/
|
|
9
|
+
export declare function NotificationCenter({ open, onOpenChange, deferredRows, successRows, deferredCount, hasReady, hasAny, onClear, }: NotificationCenterProps): React.ReactElement;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
/** A deferred (two-phase) request row shown in the "Requests" section. */
|
|
3
|
+
export interface DeferredRowView {
|
|
4
|
+
readonly id: string;
|
|
5
|
+
readonly title: React.ReactNode;
|
|
6
|
+
readonly positionName: React.ReactNode;
|
|
7
|
+
readonly isReady: boolean;
|
|
8
|
+
readonly isClickable: boolean;
|
|
9
|
+
readonly statusLabel: React.ReactNode;
|
|
10
|
+
/** Present only for reopenable (matured) rows; makes the row clickable. */
|
|
11
|
+
readonly onExecute?: () => void;
|
|
12
|
+
}
|
|
13
|
+
/** A settled operation row shown in the "Recent" section. */
|
|
14
|
+
export interface SuccessRowView {
|
|
15
|
+
readonly id: string;
|
|
16
|
+
readonly label: React.ReactNode;
|
|
17
|
+
readonly timestampLabel: React.ReactNode;
|
|
18
|
+
readonly onView?: () => void;
|
|
19
|
+
}
|
|
20
|
+
export interface NotificationCenterProps {
|
|
21
|
+
readonly open: boolean;
|
|
22
|
+
readonly onOpenChange: (open: boolean) => void;
|
|
23
|
+
readonly deferredRows: DeferredRowView[];
|
|
24
|
+
readonly successRows: SuccessRowView[];
|
|
25
|
+
readonly deferredCount: number;
|
|
26
|
+
/** At least one deferred request has matured (drives the badge/status color). */
|
|
27
|
+
readonly hasReady: boolean;
|
|
28
|
+
readonly hasAny: boolean;
|
|
29
|
+
/** Optional action: wipe settled ("Recent") notifications. Rendered in the Recent section header; hidden when omitted. */
|
|
30
|
+
readonly onClear?: () => void;
|
|
31
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
import { TokenFullData } from '../../../../../types/common';
|
|
4
|
+
declare const rootVariants: (props?: ({
|
|
5
|
+
position?: "first" | "last" | "inBetween" | "solo" | null | undefined;
|
|
6
|
+
size?: "sm" | "md" | null | undefined;
|
|
7
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
8
|
+
export interface TransactionConfirmAmountFieldProps extends VariantProps<typeof rootVariants> {
|
|
9
|
+
readonly label: React.ReactNode;
|
|
10
|
+
readonly primaryAmount: {
|
|
11
|
+
readonly value: bigint;
|
|
12
|
+
readonly token?: Omit<TokenFullData, "address">;
|
|
13
|
+
} | {
|
|
14
|
+
node: React.ReactNode;
|
|
15
|
+
};
|
|
16
|
+
readonly secondaryAmount?: {
|
|
17
|
+
readonly valueUSD?: bigint | number;
|
|
18
|
+
} | {
|
|
19
|
+
node: React.ReactNode;
|
|
20
|
+
};
|
|
21
|
+
readonly loading?: boolean;
|
|
22
|
+
readonly maxLength?: number;
|
|
23
|
+
readonly approximate?: {
|
|
24
|
+
isApproximate?: boolean;
|
|
25
|
+
approximateSymbol?: string;
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
export declare function TransactionConfirmAmountField({ label, primaryAmount, secondaryAmount, loading, position, size, maxLength, approximate, }: TransactionConfirmAmountFieldProps): React.ReactElement;
|
|
29
|
+
export {};
|
package/dist/types/components/composites/tx-preview/confirm/dialog/TransactionConfirmModalView.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { TransactionConfirmShellProps } from './TransactionConfirmShell';
|
|
3
|
+
export interface TransactionConfirmModalViewProps extends Omit<TransactionConfirmShellProps, "header" | "data-testid"> {
|
|
4
|
+
readonly open: boolean;
|
|
5
|
+
readonly onClose: () => void;
|
|
6
|
+
readonly title: React.ReactNode;
|
|
7
|
+
readonly titleAddon: React.ReactNode | undefined;
|
|
8
|
+
readonly hideTitleAddonOnResult: boolean | undefined;
|
|
9
|
+
readonly containerClassName: string | undefined;
|
|
10
|
+
readonly containerTestId: string | undefined;
|
|
11
|
+
readonly shellTestId: string | undefined;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* Base shell on page as a dialog
|
|
16
|
+
*/
|
|
17
|
+
export declare function TransactionConfirmModalView({ open, onClose, title, titleAddon, hideTitleAddonOnResult, containerClassName, containerTestId, shellTestId, phase, ...rest }: TransactionConfirmModalViewProps): React.ReactElement | null;
|
package/dist/types/components/composites/tx-preview/confirm/dialog/TransactionConfirmPageView.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { TransactionConfirmShellProps } from './TransactionConfirmShell';
|
|
3
|
+
export interface TransactionConfirmPageViewProps extends Omit<TransactionConfirmShellProps, "header" | "data-testid"> {
|
|
4
|
+
readonly title: React.ReactNode;
|
|
5
|
+
readonly titleAddon: React.ReactNode | undefined;
|
|
6
|
+
readonly hideTitleAddonOnResult: boolean | undefined;
|
|
7
|
+
readonly containerClassName: string | undefined;
|
|
8
|
+
readonly containerTestId: string | undefined;
|
|
9
|
+
readonly shellTestId: string | undefined;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
*
|
|
13
|
+
* Base shell in modal
|
|
14
|
+
*/
|
|
15
|
+
export declare function TransactionConfirmPageView({ title, titleAddon, hideTitleAddonOnResult, containerClassName, containerTestId, shellTestId, phase, ...rest }: TransactionConfirmPageViewProps): React.ReactElement;
|
package/dist/types/components/composites/tx-preview/confirm/dialog/TransactionConfirmShell.d.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { TransactionExecutionStepView } from '../stepper/transactionExecutionStepTypes';
|
|
3
|
+
import { TransactionConfirmPhase } from './transactionConfirmPhase';
|
|
4
|
+
export interface TransactionConfirmShellProps {
|
|
5
|
+
readonly phase?: TransactionConfirmPhase;
|
|
6
|
+
readonly header?: React.ReactNode;
|
|
7
|
+
readonly preview: React.ReactNode;
|
|
8
|
+
readonly previewLoading?: boolean;
|
|
9
|
+
readonly previewError?: Error | null;
|
|
10
|
+
readonly previewErrorTitle?: string;
|
|
11
|
+
readonly previewClassName?: string;
|
|
12
|
+
readonly execution: React.ReactNode;
|
|
13
|
+
readonly progressSteps?: ReadonlyArray<TransactionExecutionStepView>;
|
|
14
|
+
readonly renderProgressStepLabel?: (step: TransactionExecutionStepView) => React.ReactNode;
|
|
15
|
+
readonly result?: React.ReactNode;
|
|
16
|
+
readonly className?: string;
|
|
17
|
+
readonly "data-testid"?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* Base shell component
|
|
22
|
+
*/
|
|
23
|
+
export declare function TransactionConfirmShell({ phase, header, preview, previewLoading, previewError, previewErrorTitle, previewClassName, execution, progressSteps, renderProgressStepLabel, result, className, "data-testid": dataTestId, }: TransactionConfirmShellProps): React.ReactElement;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { TransactionConfirmPhase } from './transactionConfirmPhase';
|
|
2
|
+
export interface TransactionConfirmDialogLayout {
|
|
3
|
+
readonly showPreview: boolean;
|
|
4
|
+
readonly showExecution: boolean;
|
|
5
|
+
readonly showProgressStepper: boolean;
|
|
6
|
+
readonly showResult: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare function computeTransactionConfirmDialogLayout(phase: TransactionConfirmPhase, hasProgressSteps: boolean): TransactionConfirmDialogLayout;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare class TransactionConfirmDialogTest {
|
|
2
|
+
static root: string;
|
|
3
|
+
static execution: string;
|
|
4
|
+
static progress: string;
|
|
5
|
+
static result: string;
|
|
6
|
+
}
|
|
7
|
+
/** Outer dialog card: mobile-first full width, fixed 560px from md up. */
|
|
8
|
+
export declare const transactionConfirmDialogShellVariants: (props?: import('class-variance-authority/types').ClassProp | undefined) => string;
|
|
9
|
+
/**
|
|
10
|
+
* Modal confirm: use available viewport height; inner preview scrolls only when
|
|
11
|
+
* content overflows (see `transactionConfirmPreviewScrollVariants`).
|
|
12
|
+
*/
|
|
13
|
+
export declare const transactionConfirmModalContainerVariants: (props?: import('class-variance-authority/types').ClassProp | undefined) => string;
|
|
14
|
+
/** Scrollable preview column inside confirm / execute body. */
|
|
15
|
+
export declare const transactionConfirmPreviewScrollVariants: (props?: import('class-variance-authority/types').ClassProp | undefined) => string;
|
|
16
|
+
/** Inner shell content: fill the padded dialog container without re-applying width. */
|
|
17
|
+
export declare const transactionConfirmShellContentVariants: (props?: import('class-variance-authority/types').ClassProp | undefined) => string;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ButtonProps } from '../../../../buttons/button/button';
|
|
3
|
+
export interface TransactionConfirmExecuteButtonProps extends ButtonProps {
|
|
4
|
+
readonly isLoading?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare function TransactionConfirmExecuteButton({ isLoading, disabled, children, width, size, ...rest }: TransactionConfirmExecuteButtonProps): React.ReactElement;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './TransactionConfirmExecuteButton';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface TransactionConfirmFailureResultProps {
|
|
3
|
+
readonly title: React.ReactNode;
|
|
4
|
+
readonly description: React.ReactNode;
|
|
5
|
+
readonly footerAction?: React.ReactNode;
|
|
6
|
+
readonly iconSize?: number;
|
|
7
|
+
}
|
|
8
|
+
export declare function TransactionConfirmFailureResult({ title, description, footerAction, iconSize, }: TransactionConfirmFailureResultProps): React.ReactElement;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface TransactionConfirmSuccessResultProps {
|
|
3
|
+
readonly headline: React.ReactNode;
|
|
4
|
+
readonly subtitle: React.ReactNode;
|
|
5
|
+
readonly txHashRow?: React.ReactNode;
|
|
6
|
+
readonly footerAction?: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
export declare function TransactionConfirmSuccessResult({ headline, subtitle, txHashRow, footerAction, }: TransactionConfirmSuccessResultProps): React.ReactElement;
|
package/dist/types/components/composites/tx-preview/confirm/result/TransactionConfirmTxHashRow.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface TransactionConfirmTxHashRowProps {
|
|
3
|
+
readonly txHashLink: React.ReactNode;
|
|
4
|
+
readonly addToWalletLink?: React.ReactNode;
|
|
5
|
+
}
|
|
6
|
+
export declare function TransactionConfirmTxHashRow({ txHashLink, addToWalletLink, }: TransactionConfirmTxHashRowProps): React.ReactElement;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare class TransactionConfirmSuccessResultTest {
|
|
2
|
+
static root: string;
|
|
3
|
+
static headline: string;
|
|
4
|
+
static subtitle: string;
|
|
5
|
+
static footer: string;
|
|
6
|
+
}
|
|
7
|
+
export declare class TransactionConfirmFailureResultTest {
|
|
8
|
+
static root: string;
|
|
9
|
+
static footer: string;
|
|
10
|
+
}
|
|
11
|
+
export declare class TransactionConfirmTxHashRowTest {
|
|
12
|
+
static root: string;
|
|
13
|
+
static txHashLink: string;
|
|
14
|
+
static addToWallet: string;
|
|
15
|
+
}
|
|
16
|
+
export declare class TransactionConfirmExecuteButtonTest {
|
|
17
|
+
static root: string;
|
|
18
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { StepStatus } from './transactionExecutionStepTypes';
|
|
3
|
+
export interface ProgressStepperStep {
|
|
4
|
+
/** Stable identity used as the React key. */
|
|
5
|
+
readonly id: string;
|
|
6
|
+
readonly label: React.ReactNode;
|
|
7
|
+
readonly status: StepStatus;
|
|
8
|
+
/**
|
|
9
|
+
* Marker centered on the connector that precedes this step — e.g. a delay
|
|
10
|
+
* clock shown between "Request" and "Withdraw". Ignored on the first step.
|
|
11
|
+
*/
|
|
12
|
+
readonly connectorMarker?: React.ReactNode;
|
|
13
|
+
/** Render the connector that precedes this step as dashed. */
|
|
14
|
+
readonly connectorDashed?: boolean;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Visual tone of the reached (completed + active) track.
|
|
18
|
+
* - `foreground`: solid white dots and connectors (default).
|
|
19
|
+
* - `muted`: grey `gray-50` track; the active dot stays white, completed dots
|
|
20
|
+
* and reached connectors render in `gray-50`.
|
|
21
|
+
*/
|
|
22
|
+
export type ProgressStepperTone = "foreground" | "muted";
|
|
23
|
+
export interface ProgressStepperProps {
|
|
24
|
+
readonly steps: ReadonlyArray<ProgressStepperStep>;
|
|
25
|
+
readonly tone?: ProgressStepperTone;
|
|
26
|
+
readonly className?: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Generic progress stepper: a row of dots + labels joined by connectors.
|
|
30
|
+
*
|
|
31
|
+
* Each connector is two half-lines living in the same row as the dot, so the
|
|
32
|
+
* lines butt directly against the 9px dots. Supports an optional per-connector
|
|
33
|
+
* `marker` (centered on the connector midpoint, e.g. a waiting clock) and a
|
|
34
|
+
* `dashed` connector style. The reached track color follows `tone`.
|
|
35
|
+
*/
|
|
36
|
+
export declare function ProgressStepper({ steps, tone, className, }: ProgressStepperProps): React.ReactElement;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type TransactionExecutionStepId = "approve" | "auth" | "execute";
|
|
2
|
+
export type TransactionExecutionPrerequisiteStepId = Exclude<TransactionExecutionStepId, "execute">;
|
|
3
|
+
export type StepStatus = "completed" | "active" | "upcoming";
|
|
4
|
+
export type TransactionExecutionStepLabelKey = "approve" | "approveBatch" | "auth" | "execute";
|
|
5
|
+
export interface TransactionExecutionStepView {
|
|
6
|
+
id: TransactionExecutionStepId;
|
|
7
|
+
labelKey: TransactionExecutionStepLabelKey;
|
|
8
|
+
status: StepStatus;
|
|
9
|
+
}
|
|
10
|
+
export declare function shouldShowTransactionProgressStepper(steps: ReadonlyArray<Pick<TransactionExecutionStepView, "id">>): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './confirm';
|
|
@@ -2,8 +2,10 @@ import * as React from "react";
|
|
|
2
2
|
export interface ConfirmMenuProps {
|
|
3
3
|
/** Title text or element shown in the header */
|
|
4
4
|
title: React.ReactNode;
|
|
5
|
-
/**
|
|
6
|
-
|
|
5
|
+
/** Optional badge or addon rendered after the title (e.g. LP pill). */
|
|
6
|
+
titleAddon?: React.ReactNode;
|
|
7
|
+
/** Callback when the close button is clicked. Omit to hide the close control. */
|
|
8
|
+
onClose?: () => void;
|
|
7
9
|
/** Additional CSS class applied to the root element */
|
|
8
10
|
className?: string;
|
|
9
11
|
}
|