@gearbox-protocol/ui-kit 3.14.0-next.2 → 3.14.0-next.23
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/assets-list-cell/assets-list-cell.cjs +1 -1
- package/dist/cjs/components/block-sync/block-sync.cjs +1 -1
- 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/pool-table/columns.cjs +1 -1
- package/dist/cjs/components/composites/tx-preview/components/AddressAvatar.cjs +1 -0
- package/dist/cjs/components/composites/tx-preview/components/AddressParty.cjs +1 -0
- package/dist/cjs/components/composites/tx-preview/components/AddressRow.cjs +1 -0
- package/dist/cjs/components/composites/tx-preview/components/AmountRow.cjs +1 -0
- package/dist/cjs/components/composites/tx-preview/components/CollapsibleCard.cjs +1 -0
- package/dist/cjs/components/composites/tx-preview/components/SectionDivider.cjs +1 -0
- package/dist/cjs/components/composites/tx-preview/components/TransferList.cjs +1 -0
- package/dist/cjs/components/composites/tx-preview/components/TransferRow.cjs +1 -0
- package/dist/cjs/components/composites/tx-preview/components/addressLabel.cjs +1 -0
- package/dist/cjs/components/composites/tx-preview/components/index.cjs +1 -0
- 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 -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/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 -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/dialog/useTransactionConfirmDialog.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/preview/OperationPreviewContent.cjs +1 -0
- package/dist/cjs/components/composites/tx-preview/confirm/preview/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/TransactionProgressStepper.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/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 -0
- package/dist/cjs/components/composites/tx-preview/operations/OperationBody.cjs +1 -0
- package/dist/cjs/components/composites/tx-preview/operations/OperationsCard.cjs +1 -0
- package/dist/cjs/components/composites/tx-preview/operations/PoolDepositView.cjs +1 -0
- package/dist/cjs/components/composites/tx-preview/operations/PoolRow.cjs +1 -0
- package/dist/cjs/components/composites/tx-preview/operations/PoolWithdrawView.cjs +1 -0
- package/dist/cjs/components/composites/tx-preview/operations/index.cjs +1 -0
- package/dist/cjs/components/composites/tx-preview/state-change/BalanceChangeGroup.cjs +1 -0
- package/dist/cjs/components/composites/tx-preview/state-change/BalanceChangeRow.cjs +1 -0
- package/dist/cjs/components/composites/tx-preview/state-change/PoolStateChangeCard.cjs +1 -0
- package/dist/cjs/components/composites/tx-preview/state-change/StateChangeCard.cjs +1 -0
- package/dist/cjs/components/composites/tx-preview/state-change/index.cjs +1 -0
- package/dist/cjs/components/composites/tx-preview/types.cjs +1 -0
- package/dist/cjs/components/composites/tx-preview/utils/addressLabels.cjs +1 -0
- package/dist/cjs/components/composites/tx-preview/utils/index.cjs +1 -0
- package/dist/cjs/components/composites/tx-preview/utils/poolTokenInfo.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/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/markdown-viewer/markdown-viewer.cjs +1 -1
- package/dist/cjs/components/smart-number-input/smart-number-input.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/cjs/locale/en.json.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/buttons/button/button.js +1 -0
- package/dist/esm/components/checkbox/checkbox-labeled.js +1 -0
- 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 +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/components/AddressAvatar.js +47 -0
- package/dist/esm/components/composites/tx-preview/components/AddressParty.js +17 -0
- package/dist/esm/components/composites/tx-preview/components/AddressRow.js +16 -0
- package/dist/esm/components/composites/tx-preview/components/AmountRow.js +30 -0
- package/dist/esm/components/composites/tx-preview/components/CollapsibleCard.js +45 -0
- package/dist/esm/components/composites/tx-preview/components/SectionDivider.js +12 -0
- package/dist/esm/components/composites/tx-preview/components/TransferList.js +25 -0
- package/dist/esm/components/composites/tx-preview/components/TransferRow.js +52 -0
- package/dist/esm/components/composites/tx-preview/components/addressLabel.js +7 -0
- package/dist/esm/components/composites/tx-preview/components/index.js +20 -0
- package/dist/esm/components/composites/tx-preview/confirm/amounts/TransactionConfirmAmountField.js +222 -0
- package/dist/esm/components/composites/tx-preview/confirm/amounts/TransactionConfirmAmountPair.js +55 -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 +50 -0
- 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 +93 -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 +20 -0
- package/dist/esm/components/composites/tx-preview/confirm/dialog/transactionConfirmPhase.js +1 -0
- package/dist/esm/components/composites/tx-preview/confirm/dialog/useTransactionConfirmDialog.js +20 -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 +54 -0
- package/dist/esm/components/composites/tx-preview/confirm/preview/OperationPreviewContent.js +192 -0
- package/dist/esm/components/composites/tx-preview/confirm/preview/index.js +4 -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/TransactionProgressStepper.js +67 -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/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 +95 -0
- package/dist/esm/components/composites/tx-preview/operations/OperationBody.js +10 -0
- package/dist/esm/components/composites/tx-preview/operations/OperationsCard.js +192 -0
- package/dist/esm/components/composites/tx-preview/operations/PoolDepositView.js +201 -0
- package/dist/esm/components/composites/tx-preview/operations/PoolRow.js +20 -0
- package/dist/esm/components/composites/tx-preview/operations/PoolWithdrawView.js +195 -0
- package/dist/esm/components/composites/tx-preview/operations/index.js +13 -0
- package/dist/esm/components/composites/tx-preview/state-change/BalanceChangeGroup.js +182 -0
- package/dist/esm/components/composites/tx-preview/state-change/BalanceChangeRow.js +61 -0
- package/dist/esm/components/composites/tx-preview/state-change/PoolStateChangeCard.js +23 -0
- package/dist/esm/components/composites/tx-preview/state-change/StateChangeCard.js +197 -0
- package/dist/esm/components/composites/tx-preview/state-change/index.js +10 -0
- package/dist/esm/components/composites/tx-preview/types.js +1 -0
- package/dist/esm/components/composites/tx-preview/utils/addressLabels.js +41 -0
- package/dist/esm/components/composites/tx-preview/utils/index.js +6 -0
- package/dist/esm/components/composites/tx-preview/utils/poolTokenInfo.js +12 -0
- 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/graph/formatters.js +127 -132
- package/dist/esm/components/health-factor/health-factor.js +3 -3
- package/dist/esm/components/index.js +504 -488
- package/dist/esm/components/layout/main-aside-layout/main-aside-layout.js +78 -55
- 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/smart-number-input/smart-number-input.js +253 -104
- 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/esm/locale/en.json.js +2 -0
- package/dist/globals.css +1 -1
- package/dist/types/components/buttons/button/button.d.ts +4 -3
- package/dist/types/components/composites/tx-preview/components/AddressAvatar.d.ts +12 -0
- package/dist/types/components/composites/tx-preview/components/AddressParty.d.ts +14 -0
- package/dist/types/components/composites/tx-preview/components/AddressRow.d.ts +7 -0
- package/dist/types/components/composites/tx-preview/components/AmountRow.d.ts +15 -0
- package/dist/types/components/composites/tx-preview/components/CollapsibleCard.d.ts +22 -0
- package/dist/types/components/composites/tx-preview/components/SectionDivider.d.ts +10 -0
- package/dist/types/components/composites/tx-preview/components/TransferList.d.ts +19 -0
- package/dist/types/components/composites/tx-preview/components/TransferRow.d.ts +30 -0
- package/dist/types/components/composites/tx-preview/components/addressLabel.d.ts +27 -0
- package/dist/types/components/composites/tx-preview/components/index.d.ts +9 -0
- package/dist/types/components/composites/tx-preview/confirm/amounts/TransactionConfirmAmountField.d.ts +13 -0
- package/dist/types/components/composites/tx-preview/confirm/amounts/TransactionConfirmAmountPair.d.ts +16 -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 +24 -0
- 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 +17 -0
- package/dist/types/components/composites/tx-preview/confirm/dialog/index.d.ts +8 -0
- package/dist/types/components/composites/tx-preview/confirm/dialog/transactionConfirmPhase.d.ts +4 -0
- package/dist/types/components/composites/tx-preview/confirm/dialog/useTransactionConfirmDialog.d.ts +8 -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 +7 -0
- package/dist/types/components/composites/tx-preview/confirm/preview/OperationPreviewContent.d.ts +12 -0
- package/dist/types/components/composites/tx-preview/confirm/preview/index.d.ts +1 -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/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/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/composites/tx-preview/index.d.ts +17 -0
- package/dist/types/components/composites/tx-preview/operations/OperationBody.d.ts +15 -0
- package/dist/types/components/composites/tx-preview/operations/OperationsCard.d.ts +21 -0
- package/dist/types/components/composites/tx-preview/operations/PoolDepositView.d.ts +11 -0
- package/dist/types/components/composites/tx-preview/operations/PoolRow.d.ts +8 -0
- package/dist/types/components/composites/tx-preview/operations/PoolWithdrawView.d.ts +11 -0
- package/dist/types/components/composites/tx-preview/operations/index.d.ts +5 -0
- package/dist/types/components/composites/tx-preview/state-change/BalanceChangeGroup.d.ts +11 -0
- package/dist/types/components/composites/tx-preview/state-change/BalanceChangeRow.d.ts +14 -0
- package/dist/types/components/composites/tx-preview/state-change/PoolStateChangeCard.d.ts +18 -0
- package/dist/types/components/composites/tx-preview/state-change/StateChangeCard.d.ts +21 -0
- package/dist/types/components/composites/tx-preview/state-change/index.d.ts +4 -0
- package/dist/types/components/composites/tx-preview/types.d.ts +19 -0
- package/dist/types/components/composites/tx-preview/utils/addressLabels.d.ts +16 -0
- package/dist/types/components/composites/tx-preview/utils/index.d.ts +2 -0
- package/dist/types/components/composites/tx-preview/utils/poolTokenInfo.d.ts +14 -0
- package/dist/types/components/confirm-menu/confirm-menu.d.ts +4 -2
- package/dist/types/components/help-tip/help-tip.d.ts +2 -2
- package/dist/types/components/layout/main-aside-layout/main-aside-layout.d.ts +24 -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/smart-number-input/smart-number-input.d.ts +52 -0
- package/dist/types/components/tip-card/tip-card.d.ts +1 -1
- package/dist/types/locale/en.json.d.ts +2 -0
- package/package.json +16 -3
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PoolRedeemOperation } from '@gearbox-protocol/sdk/preview';
|
|
2
|
+
import { Address } from 'viem';
|
|
3
|
+
import { GearboxSDKLike } from '../types';
|
|
4
|
+
export interface PoolWithdrawViewProps {
|
|
5
|
+
sdk: GearboxSDKLike;
|
|
6
|
+
operation: PoolRedeemOperation;
|
|
7
|
+
/** Wallet whose transfers are highlighted; populated after simulation. */
|
|
8
|
+
wallet: Address;
|
|
9
|
+
}
|
|
10
|
+
/** Human-readable body of a Gearbox pool withdraw (redeem) operation (rows only). */
|
|
11
|
+
export declare function PoolWithdrawView({ sdk, operation, wallet, }: PoolWithdrawViewProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { AddressBalanceChanges } from '@gearbox-protocol/sdk/preview';
|
|
2
|
+
import { AddressLabels } from '../components';
|
|
3
|
+
import { GearboxSDKLike } from '../types';
|
|
4
|
+
export interface BalanceChangeGroupProps {
|
|
5
|
+
sdk: GearboxSDKLike;
|
|
6
|
+
group: AddressBalanceChanges;
|
|
7
|
+
/** Resolved labels for the involved addresses (drives the group divider). */
|
|
8
|
+
labels: AddressLabels;
|
|
9
|
+
}
|
|
10
|
+
/** One labeled section of balance changes for a single address. */
|
|
11
|
+
export declare function BalanceChangeGroup({ sdk, group, labels, }: BalanceChangeGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { TokenBalanceChange } from '@gearbox-protocol/sdk/preview';
|
|
2
|
+
import { GearboxSDKLike } from '../types';
|
|
3
|
+
export interface BalanceChangeRowProps {
|
|
4
|
+
sdk: GearboxSDKLike;
|
|
5
|
+
change: TokenBalanceChange;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* One token balance change as three grid cells (the parent group owns the shared
|
|
9
|
+
* grid template so columns line up across rows): the token (symbol + name,
|
|
10
|
+
* left-aligned and flexible), the struck-through before value with an arrow to
|
|
11
|
+
* the after value, and the signed diff in brackets. The whole row is colored
|
|
12
|
+
* green for a positive delta and red for a negative one.
|
|
13
|
+
*/
|
|
14
|
+
export declare function BalanceChangeRow({ sdk, change }: BalanceChangeRowProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { AddressBalanceChanges, PoolOperation } from '@gearbox-protocol/sdk/preview';
|
|
2
|
+
import { Address } from 'viem';
|
|
3
|
+
import { GearboxSDKLike } from '../types';
|
|
4
|
+
export interface PoolStateChangeCardProps {
|
|
5
|
+
sdk: GearboxSDKLike;
|
|
6
|
+
/** The decoded pool deposit/redeem operation. */
|
|
7
|
+
operation: PoolOperation;
|
|
8
|
+
/** Balance changes grouped by watched address (from a successful simulation). */
|
|
9
|
+
balanceChanges: AddressBalanceChanges[];
|
|
10
|
+
/** Wallet whose balances are highlighted. */
|
|
11
|
+
wallet: Address;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Pool-specific state-change content: balance changes grouped by address (wallet
|
|
15
|
+
* and, when distinct, the recipient). Renders content only; the surrounding card
|
|
16
|
+
* chrome, loading, and error handling live in {@link StateChangeCard}.
|
|
17
|
+
*/
|
|
18
|
+
export declare function PoolStateChangeCard({ sdk, operation, balanceChanges, wallet, }: PoolStateChangeCardProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Operation, PoolSimulationResult } from '@gearbox-protocol/sdk/preview';
|
|
2
|
+
import { Address } from 'viem';
|
|
3
|
+
import { GearboxSDKLike } from '../types';
|
|
4
|
+
export interface StateChangeCardProps {
|
|
5
|
+
sdk: GearboxSDKLike;
|
|
6
|
+
/** Parsed operation that drives which specific state-change card is shown. */
|
|
7
|
+
data: Operation;
|
|
8
|
+
/** Stage-2 simulation outcome; `undefined` while it is loading. */
|
|
9
|
+
simulation: PoolSimulationResult | undefined;
|
|
10
|
+
/** Whether the simulation is still running. */
|
|
11
|
+
isLoading: boolean;
|
|
12
|
+
/** Wallet whose balances/transfers are highlighted. */
|
|
13
|
+
wallet: Address;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Parent card for transaction state changes. Owns the common logic (collapsible
|
|
17
|
+
* card shell, loading skeleton, card-styled error, and no-data handling) and
|
|
18
|
+
* decides which specific state-change card to render: pool balance changes,
|
|
19
|
+
* credit account changes (not yet supported), or the decoded revert reason.
|
|
20
|
+
*/
|
|
21
|
+
export declare function StateChangeCard({ sdk, data, simulation, isLoading, wallet, }: StateChangeCardProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Address } from 'viem';
|
|
2
|
+
/**
|
|
3
|
+
* Minimal SDK surface for tx-preview UI + hooks.
|
|
4
|
+
* Satisfied by verify OnchainSDK and client preview SDK instances.
|
|
5
|
+
*/
|
|
6
|
+
export interface GearboxSDKLike {
|
|
7
|
+
chainId: number;
|
|
8
|
+
tokensMeta: {
|
|
9
|
+
get(address: Address): {
|
|
10
|
+
symbol?: string;
|
|
11
|
+
decimals?: number;
|
|
12
|
+
name?: string;
|
|
13
|
+
} | undefined;
|
|
14
|
+
};
|
|
15
|
+
readonly plugins: {
|
|
16
|
+
adapters: unknown;
|
|
17
|
+
};
|
|
18
|
+
client: unknown;
|
|
19
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { PoolOperation } from '@gearbox-protocol/sdk/preview';
|
|
2
|
+
import { Address } from 'viem';
|
|
3
|
+
import { AddressLabels } from '../components';
|
|
4
|
+
import { GearboxSDKLike } from '../types';
|
|
5
|
+
/**
|
|
6
|
+
* Builds the UI label map for a pool deposit/redeem operation.
|
|
7
|
+
*
|
|
8
|
+
* "Our" addresses (wallet, receiver, redeem owner) are flagged `ours: true`; the
|
|
9
|
+
* pool is labeled with its name and flagged `ours: false`. When the receiver /
|
|
10
|
+
* owner coincides with the wallet, it is labeled "Your wallet".
|
|
11
|
+
*
|
|
12
|
+
* Note: the `ours` flag is a UI-only concept and is derived locally here; it is
|
|
13
|
+
* intentionally decoupled from the simulation watch set in the SDK preview
|
|
14
|
+
* `simulate` module.
|
|
15
|
+
*/
|
|
16
|
+
export declare function buildPoolOperationLabels(sdk: GearboxSDKLike, op: PoolOperation, wallet: Address): AddressLabels;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Address } from 'viem';
|
|
2
|
+
import { GearboxSDKLike } from '../types';
|
|
3
|
+
export interface TokenInfo {
|
|
4
|
+
symbol: string;
|
|
5
|
+
decimals: number;
|
|
6
|
+
/** Human-readable token/pool name, when available. */
|
|
7
|
+
name?: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Resolves a token's symbol, decimals and name from `sdk.tokensMeta`, falling
|
|
11
|
+
* back to a shortened address / 18 decimals when the token is not in the
|
|
12
|
+
* registry. For pools, the diesel-token meta carries the pool name.
|
|
13
|
+
*/
|
|
14
|
+
export declare function resolveToken(sdk: GearboxSDKLike, address: Address): TokenInfo;
|
|
@@ -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,8 +1,8 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
declare const iconColorVariants: (props?: ({
|
|
4
|
-
iconColor?: "muted" | "foreground" | "gray-
|
|
5
|
-
iconHoverColor?: "muted" | "foreground" | "gray-
|
|
4
|
+
iconColor?: "muted" | "foreground" | "gray-50" | "gray-10" | "gray-20" | "gray-30" | "gray-40" | "gray-60" | "gray-70" | "gray-80" | "gray-90" | "gray-100" | "gray-110" | null | undefined;
|
|
5
|
+
iconHoverColor?: "muted" | "foreground" | "gray-50" | "gray-10" | "gray-20" | "gray-30" | "gray-40" | "gray-60" | "gray-70" | "gray-80" | "gray-90" | "gray-100" | "gray-110" | null | undefined;
|
|
6
6
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
7
|
export interface HelpTipProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, "title"> {
|
|
8
8
|
/** Tooltip popup content (what appears when hovering the icon). */
|
|
@@ -28,6 +28,19 @@ export interface MainAsideLayoutProps extends React.HTMLAttributes<HTMLDivElemen
|
|
|
28
28
|
* - pass `asideClassName` to override or augment aside classes (e.g. z-index)
|
|
29
29
|
*/
|
|
30
30
|
variant?: "default" | "detail";
|
|
31
|
+
/**
|
|
32
|
+
* Hybrid centring for the main column. Only meaningful with
|
|
33
|
+
* `variant="detail"`.
|
|
34
|
+
*
|
|
35
|
+
* - **`≥1520px`** — the main column is centred on the viewport (`mx-auto`),
|
|
36
|
+
* capped at `56rem`, with the aside in the left gutter (`absolute`).
|
|
37
|
+
* - **`lg`…`1519px`** — LP-style in-flow row (aside + main centred as one block).
|
|
38
|
+
*
|
|
39
|
+
* On screens below `lg` the layout falls back to the normal stacked column,
|
|
40
|
+
* so wrap usage in `hidden lg:block` if the mobile layout is handled
|
|
41
|
+
* separately.
|
|
42
|
+
*/
|
|
43
|
+
centeredMain?: boolean;
|
|
31
44
|
}
|
|
32
45
|
/**
|
|
33
46
|
* MainAsideLayout — main column + optional sidebar in one row.
|
|
@@ -54,5 +67,16 @@ export interface MainAsideLayoutProps extends React.HTMLAttributes<HTMLDivElemen
|
|
|
54
67
|
* ```
|
|
55
68
|
* This reproduces the `PoolDetailsScreen` two-column layout:
|
|
56
69
|
* sticky aside below 2450 px viewport, fixed aside above it, correct max-widths.
|
|
70
|
+
*
|
|
71
|
+
* ### Detail variant — viewport-centred main (`centeredMain`)
|
|
72
|
+
* ```tsx
|
|
73
|
+
* <div className="hidden lg:block">
|
|
74
|
+
* <MainAsideLayout variant="detail" asidePosition="left" centeredMain aside={<Panel />}>
|
|
75
|
+
* <Content />
|
|
76
|
+
* </MainAsideLayout>
|
|
77
|
+
* </div>
|
|
78
|
+
* ```
|
|
79
|
+
* Centres the main column on the viewport (up to `56rem`) while the aside sits
|
|
80
|
+
* in the left gutter from `1520px`; below that the row behaves like LP detail.
|
|
57
81
|
*/
|
|
58
82
|
export declare const MainAsideLayout: React.ForwardRefExoticComponent<MainAsideLayoutProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -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;
|
|
@@ -1,6 +1,22 @@
|
|
|
1
1
|
import { NetworkType } from '@gearbox-protocol/sdk';
|
|
2
2
|
import { TokenFullData } from '../../types/common';
|
|
3
3
|
import * as React from "react";
|
|
4
|
+
export interface TokenOption {
|
|
5
|
+
/** Display label for this option. */
|
|
6
|
+
label: string;
|
|
7
|
+
/** Optional icon to display before the label. */
|
|
8
|
+
icon?: React.ReactNode;
|
|
9
|
+
/**
|
|
10
|
+
* Called when this option is selected (single-select) or toggled (multi-select).
|
|
11
|
+
* In multi-select mode the dropdown stays open; the parent manages checked state.
|
|
12
|
+
*/
|
|
13
|
+
onSelect: () => void;
|
|
14
|
+
/**
|
|
15
|
+
* When true, the option is shown with a checkmark.
|
|
16
|
+
* Used only in multi-select mode (`multiSelectMode` prop on SmartNumberInput).
|
|
17
|
+
*/
|
|
18
|
+
checked?: boolean;
|
|
19
|
+
}
|
|
4
20
|
/** A-matching SmartNumberInput size for layout (styles.tsx). */
|
|
5
21
|
export type SmartNumberInputSize = "sm" | "md";
|
|
6
22
|
export interface SmartNumberInputProps {
|
|
@@ -28,6 +44,18 @@ export interface SmartNumberInputProps {
|
|
|
28
44
|
size?: SmartNumberInputSize;
|
|
29
45
|
/** When true, currency dropdown is open (expand icon rotated). */
|
|
30
46
|
active?: boolean;
|
|
47
|
+
/** Override max character length for token symbol display. When omitted, computed from viewport width. */
|
|
48
|
+
symbolMaxLength?: number;
|
|
49
|
+
/** Inline token options for dropdown selection (alternative to onShowSelectDialog). */
|
|
50
|
+
tokenOptions?: TokenOption[];
|
|
51
|
+
/**
|
|
52
|
+
* When true, the tokenOptions dropdown works as a multi-select:
|
|
53
|
+
* - The dropdown stays open after each click (doesn't auto-close).
|
|
54
|
+
* - Options marked `checked: true` show a checkmark.
|
|
55
|
+
* - The dropdown stays open until the user closes it (e.g. click outside).
|
|
56
|
+
* The parent is responsible for maintaining `checked` state on each option.
|
|
57
|
+
*/
|
|
58
|
+
multiSelectMode?: boolean;
|
|
31
59
|
/** Callback when amount changes. Called with (value: bigint, valueView: string). */
|
|
32
60
|
onSetAmount?: (value: bigint, valueView: string) => void;
|
|
33
61
|
/** Callback to show token select dialog. */
|
|
@@ -38,6 +66,30 @@ export interface SmartNumberInputProps {
|
|
|
38
66
|
onFocus?: () => void;
|
|
39
67
|
/** Blur callback. */
|
|
40
68
|
onBlur?: () => void;
|
|
69
|
+
/**
|
|
70
|
+
* USD price per one whole token unit (e.g. 1800.5 for ETH at $1 800.50).
|
|
71
|
+
* When provided, the USD equivalent of the current amount is displayed below the input.
|
|
72
|
+
*/
|
|
73
|
+
usdPrice?: number;
|
|
74
|
+
/**
|
|
75
|
+
* When provided, renders a Health Factor slider in the balance row
|
|
76
|
+
* (replacing the max amount / "Can borrow" indicator).
|
|
77
|
+
* Intended for debt inputs where the user wants to target a specific HF.
|
|
78
|
+
*/
|
|
79
|
+
hfSlider?: HFSliderConfig;
|
|
80
|
+
}
|
|
81
|
+
/** Configuration for the inline Health Factor slider. */
|
|
82
|
+
export interface HFSliderConfig {
|
|
83
|
+
/** Current target HF as a float (e.g. 1.5 for 150%). */
|
|
84
|
+
value: number;
|
|
85
|
+
/** Minimum HF value. @default 1.0 */
|
|
86
|
+
min?: number;
|
|
87
|
+
/** Maximum HF value. @default 3.0 */
|
|
88
|
+
max?: number;
|
|
89
|
+
/** Slider step. @default 0.01 */
|
|
90
|
+
step?: number;
|
|
91
|
+
/** Called when the slider value changes. */
|
|
92
|
+
onChange: (value: number) => void;
|
|
41
93
|
}
|
|
42
94
|
/**
|
|
43
95
|
* SmartNumberInput — token amount input with balance display (matches interface).
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
declare const tipCardVariants: (props?: ({
|
|
4
|
-
backgroundColor?: "dark" | "transparent" | "light" | "gray-
|
|
4
|
+
backgroundColor?: "dark" | "transparent" | "light" | "gray-50" | "gray-10" | "gray-20" | "gray-30" | "gray-40" | "gray-60" | "gray-70" | "gray-80" | "gray-90" | "gray-100" | "gray-110" | null | undefined;
|
|
5
5
|
textColor?: "unset" | "dark" | "light" | null | undefined;
|
|
6
6
|
borderColor?: "none" | "dark" | "light" | "gradient" | null | undefined;
|
|
7
7
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
@@ -25,8 +25,10 @@ declare const _default: {
|
|
|
25
25
|
"components.loading.wait": "Please wait...",
|
|
26
26
|
|
|
27
27
|
"components.smartNumberInput.balance": "Balance",
|
|
28
|
+
"components.smartNumberInput.amountLabel": "Amount",
|
|
28
29
|
"components.smartNumberInput.inputTitle": "Token Amount",
|
|
29
30
|
"components.smartNumberInput.confirm.input": "Input",
|
|
31
|
+
"components.smartNumberInput.selectToken": "Select token",
|
|
30
32
|
|
|
31
33
|
"components.tipWindow.title": "Tip",
|
|
32
34
|
|
package/package.json
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gearbox-protocol/ui-kit",
|
|
3
|
-
"version": "3.14.0-next.
|
|
3
|
+
"version": "3.14.0-next.23",
|
|
4
4
|
"description": "Internal UI components",
|
|
5
|
-
"repository":
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/Gearbox-protocol/ui-kit.git"
|
|
8
|
+
},
|
|
6
9
|
"license": "MIT",
|
|
7
10
|
"main": "./dist/cjs/index.cjs",
|
|
8
11
|
"module": "./dist/esm/index.js",
|
|
@@ -54,6 +57,16 @@
|
|
|
54
57
|
"types": "./dist/types/components/next/connectkit/index.d.ts",
|
|
55
58
|
"import": "./dist/esm/components/next/connectkit/index.js",
|
|
56
59
|
"default": "./dist/cjs/components/next/connectkit/index.cjs"
|
|
60
|
+
},
|
|
61
|
+
"./tx-preview": {
|
|
62
|
+
"types": "./dist/types/components/composites/tx-preview/index.d.ts",
|
|
63
|
+
"import": "./dist/esm/components/composites/tx-preview/index.js",
|
|
64
|
+
"default": "./dist/cjs/components/composites/tx-preview/index.cjs"
|
|
65
|
+
},
|
|
66
|
+
"./tx-preview/*": {
|
|
67
|
+
"types": "./dist/types/components/composites/tx-preview/*.d.ts",
|
|
68
|
+
"import": "./dist/esm/components/composites/tx-preview/*.js",
|
|
69
|
+
"default": "./dist/cjs/components/composites/tx-preview/*.cjs"
|
|
57
70
|
}
|
|
58
71
|
},
|
|
59
72
|
"files": [
|
|
@@ -153,7 +166,7 @@
|
|
|
153
166
|
"@commitlint/cli": "^20.1.0",
|
|
154
167
|
"@commitlint/config-conventional": "^20.0.0",
|
|
155
168
|
"@gearbox-protocol/biome-config": "^1.0.2",
|
|
156
|
-
"@gearbox-protocol/sdk": "14.
|
|
169
|
+
"@gearbox-protocol/sdk": "14.11.0-next.4",
|
|
157
170
|
"@rollup/plugin-typescript": "^12.3.0",
|
|
158
171
|
"@storybook/addon-a11y": "^10.0.8",
|
|
159
172
|
"@storybook/addon-docs": "^10.0.8",
|