@gearbox-protocol/ui-kit 3.14.0-next.13 → 3.14.0-next.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/assets-list-cell/assets-list-cell.cjs +1 -1
- package/dist/cjs/components/block-sync/block-sync.cjs +1 -1
- package/dist/cjs/components/checkbox/checkbox-labeled.cjs +1 -1
- package/dist/cjs/components/client-adapters/styled-rounded-image/styled-rounded-image.cjs +1 -1
- package/dist/cjs/components/complex-input/complex-input.cjs +1 -1
- package/dist/cjs/components/composites/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/TransactionConfirmAmountPair.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/formatUsdAmount.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/TransactionConfirmDialogView.cjs +1 -1
- 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/TransactionConfirmShell.constants.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 -1
- package/dist/cjs/components/composites/tx-preview/confirm/dialog/index.cjs +1 -1
- package/dist/cjs/components/composites/tx-preview/confirm/dialog/transactionConfirmPhase.cjs +1 -0
- package/dist/cjs/components/composites/tx-preview/confirm/dialog/useTransactionConfirmFlow.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 -1
- package/dist/cjs/components/composites/tx-preview/confirm/preview/OperationPreviewContent.cjs +1 -1
- 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/TransactionProgressStepper.cjs +1 -0
- package/dist/cjs/components/composites/tx-preview/confirm/stepper/computeTransactionExecutionSteps.cjs +1 -1
- package/dist/cjs/components/composites/tx-preview/confirm/stepper/constants.cjs +1 -1
- package/dist/cjs/components/composites/tx-preview/confirm/stepper/index.cjs +1 -1
- package/dist/cjs/components/composites/tx-preview/confirm/stepper/useCompletedStepsInSession.cjs +1 -0
- package/dist/cjs/components/composites/tx-preview/confirm/summary/PoolOperationConfirmDetails.cjs +1 -0
- package/dist/cjs/components/composites/tx-preview/confirm/summary/constants.cjs +1 -0
- package/dist/cjs/components/composites/tx-preview/confirm/summary/index.cjs +1 -0
- package/dist/cjs/components/composites/tx-preview/index.cjs +1 -1
- package/dist/cjs/components/composites/tx-preview/operations/OperationsCard.cjs +1 -1
- package/dist/cjs/components/composites/tx-preview/operations/PoolDepositView.cjs +1 -1
- package/dist/cjs/components/composites/tx-preview/operations/PoolWithdrawView.cjs +1 -1
- package/dist/cjs/components/composites/tx-preview/prerequisites/PrerequisitesCard.cjs +1 -1
- package/dist/cjs/components/composites/tx-preview/state-change/BalanceChangeGroup.cjs +1 -1
- package/dist/cjs/components/composites/tx-preview/state-change/StateChangeCard.cjs +1 -1
- 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/index.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/markdown-viewer/markdown-viewer.cjs +1 -1
- package/dist/cjs/components/time-to-liquidation/time-to-liquidation.cjs +1 -1
- package/dist/cjs/components/tokens-list-cell/tokens-list-cell.cjs +1 -1
- package/dist/cjs/components/with-copy/with-copy.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/esm/components/assets-list-cell/assets-list-cell.js +3 -2
- package/dist/esm/components/block-sync/block-sync.js +3 -2
- package/dist/esm/components/checkbox/checkbox-labeled.js +1 -0
- package/dist/esm/components/client-adapters/styled-rounded-image/styled-rounded-image.js +1 -0
- package/dist/esm/components/complex-input/complex-input.js +3 -2
- package/dist/esm/components/composites/pool-table/columns.js +34 -33
- package/dist/esm/components/composites/tx-preview/confirm/amounts/TransactionConfirmAmountField.js +63 -0
- package/dist/esm/components/composites/tx-preview/confirm/amounts/TransactionConfirmAmountPair.js +52 -0
- package/dist/esm/components/composites/tx-preview/confirm/amounts/constants.js +10 -0
- package/dist/esm/components/composites/tx-preview/confirm/amounts/formatUsdAmount.js +21 -0
- package/dist/esm/components/composites/tx-preview/confirm/amounts/index.js +9 -0
- package/dist/esm/components/composites/tx-preview/confirm/dialog/TransactionConfirmDialogView.js +33 -50
- package/dist/esm/components/composites/tx-preview/confirm/dialog/TransactionConfirmPageView.js +70 -0
- package/dist/esm/components/composites/tx-preview/confirm/dialog/TransactionConfirmShell.constants.js +6 -0
- package/dist/esm/components/composites/tx-preview/confirm/dialog/TransactionConfirmShell.js +79 -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 +12 -2
- package/dist/esm/components/composites/tx-preview/confirm/dialog/index.js +17 -5
- package/dist/esm/components/composites/tx-preview/confirm/dialog/transactionConfirmPhase.js +1 -0
- package/dist/esm/components/composites/tx-preview/confirm/dialog/useTransactionConfirmFlow.js +36 -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 +60 -16
- package/dist/esm/components/composites/tx-preview/confirm/preview/OperationPreviewContent.js +3 -2
- 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/TransactionProgressStepper.js +67 -0
- package/dist/esm/components/composites/tx-preview/confirm/stepper/computeTransactionExecutionSteps.js +49 -22
- package/dist/esm/components/composites/tx-preview/confirm/stepper/constants.js +3 -3
- package/dist/esm/components/composites/tx-preview/confirm/stepper/index.js +12 -6
- package/dist/esm/components/composites/tx-preview/confirm/stepper/useCompletedStepsInSession.js +45 -0
- package/dist/esm/components/composites/tx-preview/confirm/summary/PoolOperationConfirmDetails.js +65 -0
- package/dist/esm/components/composites/tx-preview/confirm/summary/constants.js +6 -0
- package/dist/esm/components/composites/tx-preview/confirm/summary/index.js +6 -0
- package/dist/esm/components/composites/tx-preview/index.js +106 -62
- package/dist/esm/components/composites/tx-preview/operations/OperationsCard.js +3 -2
- package/dist/esm/components/composites/tx-preview/operations/PoolDepositView.js +3 -2
- package/dist/esm/components/composites/tx-preview/operations/PoolWithdrawView.js +3 -2
- package/dist/esm/components/composites/tx-preview/prerequisites/PrerequisitesCard.js +3 -2
- package/dist/esm/components/composites/tx-preview/state-change/BalanceChangeGroup.js +3 -2
- package/dist/esm/components/composites/tx-preview/state-change/StateChangeCard.js +3 -2
- package/dist/esm/components/compound-apy/compound-apy.js +3 -2
- package/dist/esm/components/confirm-menu/confirm-menu.js +28 -25
- package/dist/esm/components/detailed-page-title/detailed-page-title.js +1 -0
- package/dist/esm/components/index.js +504 -488
- 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/markdown-viewer/markdown-viewer.js +3 -2
- package/dist/esm/components/time-to-liquidation/time-to-liquidation.js +1 -0
- package/dist/esm/components/tokens-list-cell/tokens-list-cell.js +3 -2
- package/dist/esm/components/with-copy/with-copy.js +3 -2
- package/dist/esm/index.js +836 -820
- package/dist/globals.css +1 -1
- package/dist/types/components/composites/tx-preview/confirm/amounts/TransactionConfirmAmountField.d.ts +12 -0
- package/dist/types/components/composites/tx-preview/confirm/amounts/TransactionConfirmAmountPair.d.ts +15 -0
- package/dist/types/components/composites/tx-preview/confirm/amounts/constants.d.ts +6 -0
- package/dist/types/components/composites/tx-preview/confirm/amounts/formatUsdAmount.d.ts +1 -0
- package/dist/types/components/composites/tx-preview/confirm/amounts/index.d.ts +3 -0
- package/dist/types/components/composites/tx-preview/confirm/dialog/TransactionConfirmDialogView.d.ts +9 -4
- package/dist/types/components/composites/tx-preview/confirm/dialog/TransactionConfirmPageView.d.ts +23 -0
- package/dist/types/components/composites/tx-preview/confirm/dialog/TransactionConfirmShell.constants.d.ts +3 -0
- package/dist/types/components/composites/tx-preview/confirm/dialog/TransactionConfirmShell.d.ts +19 -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 +7 -0
- package/dist/types/components/composites/tx-preview/confirm/dialog/index.d.ts +6 -0
- package/dist/types/components/composites/tx-preview/confirm/dialog/transactionConfirmPhase.d.ts +4 -0
- package/dist/types/components/composites/tx-preview/confirm/dialog/useTransactionConfirmFlow.d.ts +14 -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 +4 -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/TransactionProgressStepper.d.ts +7 -0
- package/dist/types/components/composites/tx-preview/confirm/stepper/computeTransactionExecutionSteps.d.ts +12 -3
- package/dist/types/components/composites/tx-preview/confirm/stepper/constants.d.ts +1 -1
- package/dist/types/components/composites/tx-preview/confirm/stepper/index.d.ts +2 -1
- package/dist/types/components/composites/tx-preview/confirm/stepper/useCompletedStepsInSession.d.ts +16 -0
- package/dist/types/components/composites/tx-preview/confirm/summary/PoolOperationConfirmDetails.d.ts +15 -0
- package/dist/types/components/composites/tx-preview/confirm/summary/constants.d.ts +3 -0
- package/dist/types/components/composites/tx-preview/confirm/summary/index.d.ts +2 -0
- package/dist/types/components/confirm-menu/confirm-menu.d.ts +4 -2
- 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/package.json +1 -1
- package/dist/cjs/components/composites/tx-preview/confirm/stepper/HorizontalTransactionStepper.cjs +0 -1
- package/dist/esm/components/composites/tx-preview/confirm/stepper/HorizontalTransactionStepper.js +0 -120
- package/dist/types/components/composites/tx-preview/confirm/stepper/HorizontalTransactionStepper.d.ts +0 -7
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { TokenFullData } from '../../../../../types/common';
|
|
3
|
+
export interface TransactionConfirmAmountFieldProps {
|
|
4
|
+
readonly label: React.ReactNode;
|
|
5
|
+
readonly amount: string;
|
|
6
|
+
readonly token?: Omit<TokenFullData, "address">;
|
|
7
|
+
readonly usdPrice?: number;
|
|
8
|
+
readonly loading?: boolean;
|
|
9
|
+
readonly position: "primary" | "receive";
|
|
10
|
+
readonly size?: "sm" | "md";
|
|
11
|
+
}
|
|
12
|
+
export declare function TransactionConfirmAmountField({ label, amount, token, usdPrice, loading, position, size, }: TransactionConfirmAmountFieldProps): React.ReactElement;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { TokenFullData } from '../../../../../types/common';
|
|
3
|
+
export interface TransactionConfirmAmountPairProps {
|
|
4
|
+
readonly primaryLabel: React.ReactNode;
|
|
5
|
+
readonly primaryAmount: string;
|
|
6
|
+
readonly primaryToken?: Omit<TokenFullData, "address">;
|
|
7
|
+
readonly primaryUsdPrice?: number;
|
|
8
|
+
readonly receiveLabel: React.ReactNode;
|
|
9
|
+
readonly receiveAmount: string;
|
|
10
|
+
readonly receiveToken?: Omit<TokenFullData, "address">;
|
|
11
|
+
readonly receiveUsdPrice?: number;
|
|
12
|
+
readonly loading?: boolean;
|
|
13
|
+
readonly size?: "sm" | "md";
|
|
14
|
+
}
|
|
15
|
+
export declare function TransactionConfirmAmountPair({ primaryLabel, primaryAmount, primaryToken, primaryUsdPrice, receiveLabel, receiveAmount, receiveToken, receiveUsdPrice, loading, size, }: TransactionConfirmAmountPairProps): React.ReactElement;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function formatUsdAmount(amount: string, usdPrice: number): string | null;
|
package/dist/types/components/composites/tx-preview/confirm/dialog/TransactionConfirmDialogView.d.ts
CHANGED
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { TransactionExecutionStepView } from '../stepper/computeTransactionExecutionSteps';
|
|
3
|
+
import { TransactionConfirmPhase } from './transactionConfirmPhase';
|
|
3
4
|
export interface TransactionConfirmDialogViewProps {
|
|
4
5
|
readonly open: boolean;
|
|
5
6
|
readonly onClose: () => void;
|
|
7
|
+
readonly phase?: TransactionConfirmPhase;
|
|
6
8
|
readonly title: React.ReactNode;
|
|
9
|
+
readonly titleAddon?: React.ReactNode;
|
|
7
10
|
readonly preview: React.ReactNode;
|
|
8
11
|
readonly previewLoading?: boolean;
|
|
9
12
|
readonly previewError?: Error | null;
|
|
10
13
|
readonly previewErrorTitle?: string;
|
|
11
14
|
readonly execution: React.ReactNode;
|
|
12
|
-
readonly
|
|
13
|
-
readonly
|
|
15
|
+
readonly progressSteps?: ReadonlyArray<TransactionExecutionStepView>;
|
|
16
|
+
readonly renderProgressStepLabel?: (step: TransactionExecutionStepView) => React.ReactNode;
|
|
17
|
+
readonly result?: React.ReactNode;
|
|
18
|
+
readonly hideTitleAddonOnResult?: boolean;
|
|
14
19
|
}
|
|
15
|
-
export declare function TransactionConfirmDialogView({ open, onClose, title, preview, previewLoading, previewError, previewErrorTitle, execution,
|
|
20
|
+
export declare function TransactionConfirmDialogView({ open, onClose, phase, title, titleAddon, preview, previewLoading, previewError, previewErrorTitle, execution, progressSteps, renderProgressStepLabel, result, hideTitleAddonOnResult, }: TransactionConfirmDialogViewProps): React.ReactElement | null;
|
package/dist/types/components/composites/tx-preview/confirm/dialog/TransactionConfirmPageView.d.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { TransactionExecutionStepView } from '../stepper/computeTransactionExecutionSteps';
|
|
3
|
+
import { TransactionConfirmPhase } from './transactionConfirmPhase';
|
|
4
|
+
export interface TransactionConfirmPageViewProps {
|
|
5
|
+
readonly phase?: TransactionConfirmPhase;
|
|
6
|
+
readonly onClose?: () => void;
|
|
7
|
+
readonly title: React.ReactNode;
|
|
8
|
+
readonly titleAddon?: React.ReactNode;
|
|
9
|
+
readonly preview: React.ReactNode;
|
|
10
|
+
readonly previewLoading?: boolean;
|
|
11
|
+
readonly previewError?: Error | null;
|
|
12
|
+
readonly previewErrorTitle?: string;
|
|
13
|
+
readonly previewClassName?: string;
|
|
14
|
+
readonly execution: React.ReactNode;
|
|
15
|
+
readonly progressSteps?: ReadonlyArray<TransactionExecutionStepView>;
|
|
16
|
+
readonly renderProgressStepLabel?: (step: TransactionExecutionStepView) => React.ReactNode;
|
|
17
|
+
readonly result?: React.ReactNode;
|
|
18
|
+
readonly hideTitleAddonOnResult?: boolean;
|
|
19
|
+
readonly containerClassName?: string;
|
|
20
|
+
readonly containerTestId?: string;
|
|
21
|
+
readonly shellTestId?: string;
|
|
22
|
+
}
|
|
23
|
+
export declare function TransactionConfirmPageView({ onClose, phase, title, titleAddon, preview, previewLoading, previewError, previewErrorTitle, previewClassName, execution, progressSteps, renderProgressStepLabel, result, hideTitleAddonOnResult, containerClassName, containerTestId, shellTestId, }: TransactionConfirmPageViewProps): React.ReactElement;
|
package/dist/types/components/composites/tx-preview/confirm/dialog/TransactionConfirmShell.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { TransactionExecutionStepView } from '../stepper/computeTransactionExecutionSteps';
|
|
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
|
+
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;
|
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
export declare class TransactionConfirmDialogTest {
|
|
2
2
|
static root: string;
|
|
3
3
|
static execution: string;
|
|
4
|
+
static progress: string;
|
|
5
|
+
static result: string;
|
|
4
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
|
+
/** Inner shell content: fill the padded dialog container without re-applying width. */
|
|
10
|
+
export declare const transactionConfirmShellContentVariants: (props?: import('class-variance-authority/types').ClassProp | undefined) => string;
|
|
11
|
+
export type TransactionConfirmAuthPhase = "agreement" | "awaiting_signature" | "blocked" | "ready";
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
export * from './computeTransactionConfirmDialogLayout';
|
|
1
2
|
export * from './constants';
|
|
2
3
|
export * from './TransactionConfirmDialogView';
|
|
4
|
+
export * from './TransactionConfirmPageView';
|
|
5
|
+
export * from './TransactionConfirmShell';
|
|
6
|
+
export * from './TransactionConfirmShell.constants';
|
|
7
|
+
export * from './transactionConfirmPhase';
|
|
3
8
|
export * from './useTransactionConfirmDialog';
|
|
9
|
+
export * from './useTransactionConfirmFlow';
|
package/dist/types/components/composites/tx-preview/confirm/dialog/useTransactionConfirmFlow.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { TransactionConfirmPhase, TransactionConfirmSubmittedTx } from './transactionConfirmPhase';
|
|
2
|
+
export interface UseTransactionConfirmFlowReturn {
|
|
3
|
+
readonly open: boolean;
|
|
4
|
+
readonly phase: TransactionConfirmPhase;
|
|
5
|
+
readonly submittedTx: TransactionConfirmSubmittedTx | undefined;
|
|
6
|
+
readonly refreshNonce: number;
|
|
7
|
+
readonly openDialog: () => void;
|
|
8
|
+
readonly closeDialog: () => void;
|
|
9
|
+
readonly bumpRefreshNonce: () => void;
|
|
10
|
+
readonly beginAwaitingReceipt: (tx: TransactionConfirmSubmittedTx) => void;
|
|
11
|
+
readonly markSuccess: () => void;
|
|
12
|
+
readonly markFailure: () => void;
|
|
13
|
+
}
|
|
14
|
+
export declare function useTransactionConfirmFlow(): UseTransactionConfirmFlowReturn;
|
|
@@ -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
|
+
}
|
package/dist/types/components/composites/tx-preview/confirm/stepper/TransactionProgressStepper.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { TransactionExecutionStepView } from './computeTransactionExecutionSteps';
|
|
3
|
+
export interface TransactionProgressStepperProps {
|
|
4
|
+
readonly steps: ReadonlyArray<TransactionExecutionStepView>;
|
|
5
|
+
readonly renderLabel: (step: TransactionExecutionStepView) => React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export declare function TransactionProgressStepper({ steps, renderLabel, }: TransactionProgressStepperProps): React.ReactElement;
|
|
@@ -1,21 +1,30 @@
|
|
|
1
|
-
export type TransactionExecutionStepId = "
|
|
1
|
+
export type TransactionExecutionStepId = "approve" | "auth" | "execute";
|
|
2
|
+
export type TransactionExecutionPrerequisiteStepId = Exclude<TransactionExecutionStepId, "execute">;
|
|
2
3
|
export type StepStatus = "completed" | "active" | "upcoming";
|
|
3
|
-
export type TransactionExecutionStepLabelKey = "
|
|
4
|
+
export type TransactionExecutionStepLabelKey = "approve" | "approveBatch" | "auth" | "execute";
|
|
5
|
+
export interface TransactionExecutionStepRequirements {
|
|
6
|
+
readonly approve: boolean;
|
|
7
|
+
readonly auth: boolean;
|
|
8
|
+
}
|
|
4
9
|
export interface TransactionExecutionStepInput {
|
|
5
|
-
isConnected: boolean;
|
|
6
10
|
isCorrectChain: boolean;
|
|
7
11
|
isAuthReady: boolean;
|
|
8
12
|
needsApproval: boolean;
|
|
9
13
|
isApprovalPending: boolean;
|
|
10
14
|
allowWalletBatching: boolean;
|
|
11
15
|
isExecuting?: boolean;
|
|
16
|
+
/** Prerequisite steps completed in this confirm session; kept visible until reset. */
|
|
17
|
+
completedStepsInSession?: ReadonlyArray<TransactionExecutionPrerequisiteStepId>;
|
|
12
18
|
}
|
|
13
19
|
export interface TransactionExecutionStepView {
|
|
14
20
|
id: TransactionExecutionStepId;
|
|
15
21
|
labelKey: TransactionExecutionStepLabelKey;
|
|
16
22
|
status: StepStatus;
|
|
17
23
|
}
|
|
24
|
+
export declare function getTransactionExecutionStepRequirements(input: Pick<TransactionExecutionStepInput, "needsApproval" | "allowWalletBatching" | "isAuthReady" | "isApprovalPending">): TransactionExecutionStepRequirements;
|
|
25
|
+
export declare function shouldShowTransactionProgressStepper(steps: ReadonlyArray<Pick<TransactionExecutionStepView, "id">>): boolean;
|
|
18
26
|
export declare function computeTransactionExecutionSteps(input: TransactionExecutionStepInput): {
|
|
19
27
|
steps: TransactionExecutionStepView[];
|
|
20
28
|
activeStepId: TransactionExecutionStepId;
|
|
29
|
+
showProgressStepper: boolean;
|
|
21
30
|
};
|
package/dist/types/components/composites/tx-preview/confirm/stepper/useCompletedStepsInSession.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { TransactionExecutionPrerequisiteStepId, TransactionExecutionStepRequirements } from './computeTransactionExecutionSteps';
|
|
2
|
+
export declare function mergeStepsSeenInSession(prev: ReadonlyArray<TransactionExecutionPrerequisiteStepId>, requirements: TransactionExecutionStepRequirements): TransactionExecutionPrerequisiteStepId[];
|
|
3
|
+
export declare function mergeCompletedStepsInSession(prev: ReadonlyArray<TransactionExecutionPrerequisiteStepId>, stepsSeenInSession: ReadonlyArray<TransactionExecutionPrerequisiteStepId>, requirements: TransactionExecutionStepRequirements): TransactionExecutionPrerequisiteStepId[];
|
|
4
|
+
export interface UseCompletedStepsInSessionInput {
|
|
5
|
+
/** When false, session memory is cleared (e.g. confirm modal closed). */
|
|
6
|
+
readonly sessionActive: boolean;
|
|
7
|
+
readonly needsApproval: boolean;
|
|
8
|
+
readonly isApprovalPending?: boolean;
|
|
9
|
+
readonly allowWalletBatching: boolean;
|
|
10
|
+
readonly isAuthReady: boolean;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Tracks prerequisite steps that were required and later completed during a confirm
|
|
14
|
+
* session. Completed steps stay in the stepper until {@link sessionActive} resets.
|
|
15
|
+
*/
|
|
16
|
+
export declare function useCompletedStepsInSession({ sessionActive, needsApproval, isApprovalPending, allowWalletBatching, isAuthReady, }: UseCompletedStepsInSessionInput): ReadonlyArray<TransactionExecutionPrerequisiteStepId>;
|
package/dist/types/components/composites/tx-preview/confirm/summary/PoolOperationConfirmDetails.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface PoolOperationConfirmDetailsProps {
|
|
3
|
+
readonly apyLabel?: React.ReactNode;
|
|
4
|
+
readonly apy?: React.ReactNode;
|
|
5
|
+
readonly apyLoading?: boolean;
|
|
6
|
+
readonly poolTvlLabel: React.ReactNode;
|
|
7
|
+
readonly poolTvl: React.ReactNode;
|
|
8
|
+
readonly poolUtilizationLabel: React.ReactNode;
|
|
9
|
+
readonly poolUtilization: React.ReactNode;
|
|
10
|
+
readonly curatorLabel: React.ReactNode;
|
|
11
|
+
readonly curatorValue: React.ReactNode;
|
|
12
|
+
readonly poolLabel: React.ReactNode;
|
|
13
|
+
readonly poolContractValue: React.ReactNode;
|
|
14
|
+
}
|
|
15
|
+
export declare function PoolOperationConfirmDetails({ apyLabel, apy, apyLoading, poolTvlLabel, poolTvl, poolUtilizationLabel, poolUtilization, curatorLabel, curatorValue, poolLabel, poolContractValue, }: PoolOperationConfirmDetailsProps): React.ReactElement;
|
|
@@ -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
|
}
|
|
@@ -1 +1,5 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { LegalAgreementAwaitingPanel, type LegalAgreementAwaitingPanelProps, LegalAgreementAwaitingPanelTest, } from './legal-agreement-awaiting-panel';
|
|
2
|
+
export { BlockedRegionDialog, type BlockedRegionDialogProps, type LegalAgreementCheckboxItem, LegalAgreementDialog, type LegalAgreementDialogConfig, type LegalAgreementDialogProps, } from './legal-agreement-dialog';
|
|
3
|
+
export { LegalAgreementLink, type LegalAgreementLinkProps, } from './legal-agreement-link';
|
|
4
|
+
export { LegalAgreementPanel, type LegalAgreementPanelProps, LegalAgreementPanelTest, } from './legal-agreement-panel';
|
|
5
|
+
export { type LegalAgreementThemeVariantProps, type LegalAgreementVisualTheme, legalAgreementAwaitingDescriptionVariants, legalAgreementAwaitingRootVariants, legalAgreementAwaitingTitleVariants, legalAgreementLinkVariants, legalAgreementPanelCheckboxLabelVariants, legalAgreementPanelCheckboxListTitleVariants, legalAgreementPanelCheckboxListVariants, legalAgreementPanelCheckboxRowVariants, legalAgreementPanelNotificationVariants, legalAgreementPanelRootVariants, legalAgreementPanelV2BannerVariants, } from './legal-agreement-theme';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { LegalAgreementVisualTheme } from './legal-agreement-theme';
|
|
3
|
+
export declare class LegalAgreementAwaitingPanelTest {
|
|
4
|
+
static root: string;
|
|
5
|
+
}
|
|
6
|
+
export interface LegalAgreementAwaitingPanelProps {
|
|
7
|
+
readonly waitingForSignatureText?: string;
|
|
8
|
+
readonly theme?: LegalAgreementVisualTheme;
|
|
9
|
+
}
|
|
10
|
+
export declare function LegalAgreementAwaitingPanel({ waitingForSignatureText, theme, }: LegalAgreementAwaitingPanelProps): React.ReactElement;
|
|
@@ -1,13 +1,9 @@
|
|
|
1
|
+
import { LegalAgreementVisualTheme } from './legal-agreement-theme';
|
|
1
2
|
import * as React from "react";
|
|
2
3
|
export interface LegalAgreementCheckboxItem {
|
|
3
4
|
id: string;
|
|
4
5
|
content: React.ReactNode;
|
|
5
6
|
}
|
|
6
|
-
export interface LegalAgreementDialogLinks {
|
|
7
|
-
termsOfService: string;
|
|
8
|
-
privacyNotice: string;
|
|
9
|
-
riskDisclosure: string;
|
|
10
|
-
}
|
|
11
7
|
export interface LegalAgreementDialogConfig {
|
|
12
8
|
/**
|
|
13
9
|
* Product/service name (e.g., "Permissionless Interface", "Permissionless Safe", "Gearbox App")
|
|
@@ -41,6 +37,15 @@ export interface LegalAgreementDialogConfig {
|
|
|
41
37
|
* Defaults to "Please sign the message in your wallet to agree to the Terms of Service."
|
|
42
38
|
*/
|
|
43
39
|
waitingForSignatureText?: string;
|
|
40
|
+
/**
|
|
41
|
+
* Notice shown when terms are updated (hasV2Signature is true).
|
|
42
|
+
* Host app supplies legal copy; ui-kit only renders layout.
|
|
43
|
+
*/
|
|
44
|
+
updatedTermsNoticeText?: React.ReactNode;
|
|
45
|
+
/**
|
|
46
|
+
* Optional heading above checkbox list (e.g. warranty section title).
|
|
47
|
+
*/
|
|
48
|
+
checkboxListTitle?: React.ReactNode;
|
|
44
49
|
}
|
|
45
50
|
export interface LegalAgreementDialogProps {
|
|
46
51
|
open: boolean;
|
|
@@ -50,6 +55,7 @@ export interface LegalAgreementDialogProps {
|
|
|
50
55
|
hasV2Signature?: boolean;
|
|
51
56
|
isAwaitingSignature?: boolean;
|
|
52
57
|
config: LegalAgreementDialogConfig;
|
|
58
|
+
theme?: LegalAgreementVisualTheme;
|
|
53
59
|
}
|
|
54
60
|
/**
|
|
55
61
|
* LegalAgreementDialog — dialog component for legal agreement signing.
|
|
@@ -77,59 +83,20 @@ export interface LegalAgreementDialogProps {
|
|
|
77
83
|
* Note: Displays checkboxes for user agreement and handles signing flow.
|
|
78
84
|
* Shows waiting state during signature process.
|
|
79
85
|
*
|
|
80
|
-
* Example usage
|
|
86
|
+
* Example usage — host app supplies config (legal copy is app-owned):
|
|
81
87
|
* ```tsx
|
|
82
|
-
* import { LegalAgreementDialog,
|
|
88
|
+
* import { LegalAgreementDialog, LegalAgreementLink } from '@gearbox-protocol/ui-kit';
|
|
83
89
|
*
|
|
84
|
-
* const
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
*
|
|
90
|
+
* const config = {
|
|
91
|
+
* productName: 'My App',
|
|
92
|
+
* notificationText: <>…your legal copy with <LegalAgreementLink href="…">ToS</LegalAgreementLink>…</>,
|
|
93
|
+
* checkboxItems: [{ id: 'consent', content: <>…</> }],
|
|
88
94
|
* };
|
|
89
95
|
*
|
|
90
|
-
*
|
|
91
|
-
* // it uses simplified consent flow. For other names (e.g., "Gearbox App") it uses
|
|
92
|
-
* // extended consent flow with additional checkboxes.
|
|
93
|
-
* const config = createLegalAgreementConfig("Permissionless Interface", links);
|
|
94
|
-
*
|
|
95
|
-
* <LegalAgreementDialog
|
|
96
|
-
* open={isOpen}
|
|
97
|
-
* onClose={handleClose}
|
|
98
|
-
* onSign={handleSign}
|
|
99
|
-
* isSigning={isSigning}
|
|
100
|
-
* config={config}
|
|
101
|
-
* />
|
|
96
|
+
* <LegalAgreementDialog open={isOpen} onClose={handleClose} onSign={handleSign} isSigning={isSigning} config={config} />
|
|
102
97
|
* ```
|
|
103
98
|
*/
|
|
104
|
-
export declare function LegalAgreementDialog({ open, onClose, onSign, isSigning, hasV2Signature, isAwaitingSignature, config, }: LegalAgreementDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
105
|
-
export type AppName = string;
|
|
106
|
-
/**
|
|
107
|
-
* Creates configuration for legal agreement dialog based on app name.
|
|
108
|
-
* @param appName - Name of the application (any string, e.g., "Permissionless Interface", "Permissionless Safe", "Gearbox App", etc.)
|
|
109
|
-
* @param links - URLs for legal documents
|
|
110
|
-
* @param options - Optional configuration overrides
|
|
111
|
-
*/
|
|
112
|
-
export declare function createLegalAgreementConfig(appName: AppName, links: LegalAgreementDialogLinks, options?: {
|
|
113
|
-
agreeButtonText?: string;
|
|
114
|
-
}): LegalAgreementDialogConfig;
|
|
115
|
-
/**
|
|
116
|
-
* @deprecated Use createLegalAgreementConfig("Permissionless Interface", links, options) instead
|
|
117
|
-
*/
|
|
118
|
-
export declare function createPermissionlessInterfaceConfig(links: LegalAgreementDialogLinks, options?: {
|
|
119
|
-
agreeButtonText?: string;
|
|
120
|
-
}): LegalAgreementDialogConfig;
|
|
121
|
-
/**
|
|
122
|
-
* @deprecated Use createLegalAgreementConfig("Permissionless Safe", links, options) instead
|
|
123
|
-
*/
|
|
124
|
-
export declare function createPermissionlessSafeConfig(links: LegalAgreementDialogLinks, options?: {
|
|
125
|
-
agreeButtonText?: string;
|
|
126
|
-
}): LegalAgreementDialogConfig;
|
|
127
|
-
/**
|
|
128
|
-
* @deprecated Use createLegalAgreementConfig("Gearbox App", links, options) instead
|
|
129
|
-
*/
|
|
130
|
-
export declare function createGearboxAppConfig(links: LegalAgreementDialogLinks, options?: {
|
|
131
|
-
agreeButtonText?: string;
|
|
132
|
-
}): LegalAgreementDialogConfig;
|
|
99
|
+
export declare function LegalAgreementDialog({ open, onClose, onSign, isSigning, hasV2Signature, isAwaitingSignature, config, theme, }: LegalAgreementDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
133
100
|
export interface BlockedRegionDialogProps {
|
|
134
101
|
open: boolean;
|
|
135
102
|
onClose: () => void;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { LegalAgreementVisualTheme } from './legal-agreement-theme';
|
|
3
|
+
export interface LegalAgreementLinkProps {
|
|
4
|
+
readonly href: string;
|
|
5
|
+
readonly children: React.ReactNode;
|
|
6
|
+
readonly theme?: LegalAgreementVisualTheme;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Styled external link for legal agreement copy supplied by the host app.
|
|
10
|
+
*/
|
|
11
|
+
export declare function LegalAgreementLink({ href, children, theme, }: LegalAgreementLinkProps): React.ReactElement;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { LegalAgreementDialogConfig } from './legal-agreement-dialog';
|
|
3
|
+
import { LegalAgreementVisualTheme } from './legal-agreement-theme';
|
|
4
|
+
export declare class LegalAgreementPanelTest {
|
|
5
|
+
static root: string;
|
|
6
|
+
}
|
|
7
|
+
export interface LegalAgreementPanelProps {
|
|
8
|
+
readonly config: LegalAgreementDialogConfig;
|
|
9
|
+
readonly checkedItems: Readonly<Record<string, boolean>>;
|
|
10
|
+
readonly onCheckedChange: (id: string) => void;
|
|
11
|
+
readonly hasV2Signature?: boolean;
|
|
12
|
+
readonly showTitle?: boolean;
|
|
13
|
+
readonly checkboxIdPrefix?: string;
|
|
14
|
+
readonly theme?: LegalAgreementVisualTheme;
|
|
15
|
+
}
|
|
16
|
+
export declare function LegalAgreementPanel({ config, checkedItems, onCheckedChange, hasV2Signature, showTitle, checkboxIdPrefix, theme, }: LegalAgreementPanelProps): React.ReactElement;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
export type LegalAgreementVisualTheme = "default" | "gearboxV3";
|
|
3
|
+
export declare const legalAgreementPanelRootVariants: (props?: ({
|
|
4
|
+
theme?: "default" | "gearboxV3" | null | undefined;
|
|
5
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
6
|
+
export declare const legalAgreementPanelNotificationVariants: (props?: ({
|
|
7
|
+
theme?: "default" | "gearboxV3" | null | undefined;
|
|
8
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
9
|
+
export declare const legalAgreementPanelCheckboxListVariants: (props?: ({
|
|
10
|
+
readonly theme?: "default" | "gearboxV3" | null | undefined;
|
|
11
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
12
|
+
export declare const legalAgreementPanelCheckboxListTitleVariants: (props?: ({
|
|
13
|
+
theme?: "default" | "gearboxV3" | null | undefined;
|
|
14
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
15
|
+
export declare const legalAgreementPanelCheckboxRowVariants: (props?: ({
|
|
16
|
+
theme?: "default" | "gearboxV3" | null | undefined;
|
|
17
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
18
|
+
export declare const legalAgreementPanelCheckboxLabelVariants: (props?: ({
|
|
19
|
+
theme?: "default" | "gearboxV3" | null | undefined;
|
|
20
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
21
|
+
export declare const legalAgreementPanelV2BannerVariants: (props?: ({
|
|
22
|
+
theme?: "default" | "gearboxV3" | null | undefined;
|
|
23
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
24
|
+
export declare const legalAgreementAwaitingRootVariants: (props?: ({
|
|
25
|
+
theme?: "default" | "gearboxV3" | null | undefined;
|
|
26
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
27
|
+
export declare const legalAgreementAwaitingTitleVariants: (props?: ({
|
|
28
|
+
theme?: "default" | "gearboxV3" | null | undefined;
|
|
29
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
30
|
+
export declare const legalAgreementAwaitingDescriptionVariants: (props?: ({
|
|
31
|
+
theme?: "default" | "gearboxV3" | null | undefined;
|
|
32
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
33
|
+
export declare const legalAgreementLinkVariants: (props?: ({
|
|
34
|
+
theme?: "default" | "gearboxV3" | null | undefined;
|
|
35
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
36
|
+
export type LegalAgreementThemeVariantProps = VariantProps<typeof legalAgreementPanelRootVariants>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { LegalAgreementDialogConfig } from './legal-agreement-dialog';
|
|
2
|
+
import { LegalAgreementVisualTheme } from './legal-agreement-theme';
|
|
3
|
+
export declare function createStoryPermissionlessLegalConfig(theme?: LegalAgreementVisualTheme): LegalAgreementDialogConfig;
|
|
4
|
+
export declare function createStoryExtendedLegalConfig(theme?: LegalAgreementVisualTheme): LegalAgreementDialogConfig;
|
|
5
|
+
export declare function createStoryRwaLegalConfig(theme?: LegalAgreementVisualTheme): LegalAgreementDialogConfig;
|
|
6
|
+
/** Storybook-only sample config (single-checkbox flow). Not exported from ui-kit. */
|
|
7
|
+
export declare const storyPermissionlessLegalConfig: LegalAgreementDialogConfig;
|
|
8
|
+
/** Storybook-only sample config (three-checkbox flow). Not exported from ui-kit. */
|
|
9
|
+
export declare const storyExtendedLegalConfig: LegalAgreementDialogConfig;
|
|
10
|
+
/** Storybook-only RWA sample config. Not exported from ui-kit. */
|
|
11
|
+
export declare const storyRwaLegalConfig: LegalAgreementDialogConfig;
|
package/package.json
CHANGED
package/dist/cjs/components/composites/tx-preview/confirm/stepper/HorizontalTransactionStepper.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime");require("react");require("@gearbox-protocol/sdk");const s=require("../../../../../utils/cn.cjs");require("sonner");require("@gearbox-protocol/sdk/common-utils");require("luxon");require("../../../../../utils/z-index.cjs");const c=require("./constants.cjs"),i=20;function l({label:r,status:t,isLast:n}){return e.jsxs("li",{className:"flex min-w-0 flex-1 flex-col items-center",children:[e.jsxs("div",{className:"flex w-full items-center",children:[e.jsx("div",{className:s.cn("h-0.5 flex-1",t==="upcoming"?"bg-gray-40":"bg-success"),"aria-hidden":!0}),e.jsx(a,{status:t}),e.jsx("div",{className:s.cn("h-0.5 flex-1",n||t==="upcoming"?"bg-gray-40":"bg-success"),"aria-hidden":!0})]}),e.jsx("span",{className:s.cn("mt-2 truncate px-1 text-center text-xs",t==="active"?"font-bold text-foreground":t==="completed"?"text-foreground":"text-secondary-foreground"),children:r})]})}function a({status:r}){return r==="completed"?e.jsx("div",{className:"flex shrink-0 items-center justify-center rounded-full bg-success",style:{width:i,height:i},"aria-hidden":!0,children:e.jsxs("svg",{width:"12",height:"10",viewBox:"0 0 12 10",fill:"none",className:"text-success-foreground",role:"img","aria-hidden":!0,children:[e.jsx("title",{children:"Completed step"}),e.jsx("path",{d:"M1 5L4.5 8.5L11 1.5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}):e.jsx("div",{className:s.cn("flex shrink-0 items-center justify-center rounded-full border text-xs font-bold",r==="active"?"border-gray-50 bg-gray-50 text-foreground":"border-gray-40 bg-transparent text-gray-90"),style:{width:i,height:i},"aria-hidden":!0})}function d({steps:r,renderLabel:t}){return e.jsx("ol",{className:"flex w-full list-none p-0 m-0","data-testid":c.TransactionStepperTest.root,children:r.map((n,o)=>e.jsx(l,{label:t(n.labelKey),status:n.status,isLast:o===r.length-1},n.id))})}exports.HorizontalTransactionStepper=d;
|