@stridge/kit 0.1.0-alpha.6 → 0.1.0-alpha.61
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -6
- package/dist/KitProvider.d.ts +40 -0
- package/dist/KitProvider.js +1 -1
- package/dist/_internal/activity/driver/index.d.ts +3 -0
- package/dist/_internal/activity/driver/index.js +1 -0
- package/dist/_internal/deposit/driver/index.d.ts +3 -3
- package/dist/_internal/drivers/stridge/index.d.ts +4 -2
- package/dist/_internal/drivers/stridge/index.js +1 -1
- package/dist/_internal/drivers/stridge-mock/index.d.ts +4 -2
- package/dist/_internal/drivers/stridge-mock/index.js +1 -1
- package/dist/_internal/withdraw/driver/index.d.ts +2 -2
- package/dist/activity/compound/index.d.ts +19 -0
- package/dist/activity/compound/index.js +1 -0
- package/dist/activity/dialog/index.d.ts +4 -0
- package/dist/activity/dialog/index.js +1 -0
- package/dist/activity/widgets/index.d.ts +5 -0
- package/dist/activity/widgets/index.js +1 -0
- package/dist/deposit/compound/index.d.ts +25 -15
- package/dist/deposit/compound/index.js +1 -1
- package/dist/deposit/dialog/index.d.ts +2 -1
- package/dist/deposit/widgets/index.d.ts +17 -0
- package/dist/deposit/widgets/index.js +1 -0
- package/dist/drivers/stridge/catalog.d.ts +54 -0
- package/dist/drivers/stridge/catalog.js +1 -0
- package/dist/drivers/stridge/createStridgeActivityDriver.d.ts +44 -0
- package/dist/drivers/stridge/createStridgeActivityDriver.js +1 -0
- package/dist/drivers/stridge/createStridgeDepositDriver.d.ts +10 -1
- package/dist/drivers/stridge/createStridgeDepositDriver.js +1 -1
- package/dist/drivers/stridge/createStridgeWithdrawDriver.d.ts +37 -14
- package/dist/drivers/stridge/createStridgeWithdrawDriver.js +1 -1
- package/dist/drivers/stridge/internal/ensureWalletChain.js +1 -0
- package/dist/drivers/stridge/internal/pollOnce.js +1 -1
- package/dist/drivers/stridge/internal/resolveAddEthereumChain.js +1 -0
- package/dist/drivers/stridge/internal/retry.js +1 -0
- package/dist/drivers/stridge/internal/supportedChains.js +1 -0
- package/dist/drivers/stridge/types.d.ts +20 -14
- package/dist/drivers/stridge/types.js +1 -1
- package/dist/drivers/stridge/wagmiSigner.js +1 -1
- package/dist/drivers/stridge-mock/checkoutChannel.d.ts +31 -0
- package/dist/drivers/stridge-mock/checkoutChannel.js +1 -0
- package/dist/drivers/stridge-mock/createStridgeMockActivityDriver.d.ts +44 -0
- package/dist/drivers/stridge-mock/createStridgeMockActivityDriver.js +1 -0
- package/dist/drivers/stridge-mock/createStridgeMockDriver.d.ts +30 -2
- package/dist/drivers/stridge-mock/createStridgeMockDriver.js +1 -1
- package/dist/drivers/stridge-mock/createStridgeMockWithdrawDriver.d.ts +15 -3
- package/dist/drivers/stridge-mock/createStridgeMockWithdrawDriver.js +1 -1
- package/dist/drivers/stridge-mock/fixtures.d.ts +19 -13
- package/dist/drivers/stridge-mock/fixtures.js +1 -1
- package/dist/drivers/stridge-mock/triggers.d.ts +12 -0
- package/dist/events/bus/createBus.d.ts +26 -0
- package/dist/events/bus/createBus.js +1 -0
- package/dist/events/bus/flowIdRegistry.d.ts +17 -0
- package/dist/events/bus/flowIdRegistry.js +1 -0
- package/dist/events/bus/index.js +1 -0
- package/dist/events/bus/metadata.js +1 -0
- package/dist/events/context.js +1 -0
- package/dist/events/emit/index.js +1 -0
- package/dist/events/emit/mapFailure.js +1 -0
- package/dist/events/emit/useActivityEmissions.js +1 -0
- package/dist/events/emit/useDepositEmissions.js +1 -0
- package/dist/events/emit/useKitEmitter.js +1 -0
- package/dist/events/emit/useWithdrawEmissions.js +1 -0
- package/dist/events/hooks/index.d.ts +6 -0
- package/dist/events/hooks/index.js +1 -0
- package/dist/events/hooks/useCurrentFlowId.d.ts +6 -0
- package/dist/events/hooks/useCurrentFlowId.js +1 -0
- package/dist/events/hooks/useStableHandler.js +1 -0
- package/dist/events/hooks/useStridgeEvent.d.ts +9 -0
- package/dist/events/hooks/useStridgeEvent.js +1 -0
- package/dist/events/hooks/useStridgeEventBus.d.ts +34 -0
- package/dist/events/hooks/useStridgeEventBus.js +1 -0
- package/dist/events/hooks/useStridgeEvents.d.ts +7 -0
- package/dist/events/hooks/useStridgeEvents.js +1 -0
- package/dist/events/hooks/useStridgeFlowEvent.d.ts +8 -0
- package/dist/events/hooks/useStridgeFlowEvent.js +1 -0
- package/dist/events/hooks/useStridgeFlowEvents.d.ts +6 -0
- package/dist/events/hooks/useStridgeFlowEvents.js +1 -0
- package/dist/events/index.d.ts +17 -0
- package/dist/events/index.js +1 -0
- package/dist/events/publish.js +1 -0
- package/dist/events/redact.d.ts +34 -0
- package/dist/events/redact.js +1 -0
- package/dist/events/types/activity.d.ts +53 -0
- package/dist/events/types/deposit.d.ts +235 -0
- package/dist/events/types/envelope.d.ts +145 -0
- package/dist/events/types/index.d.ts +32 -0
- package/dist/events/types/kit.d.ts +23 -0
- package/dist/events/types/withdraw.d.ts +150 -0
- package/dist/flows/activity/compound/ActivityFlow.d.ts +46 -0
- package/dist/flows/activity/compound/ActivityFlow.js +1 -0
- package/dist/flows/activity/compound/components/Boundary.d.ts +29 -0
- package/dist/flows/activity/compound/components/Boundary.js +1 -0
- package/dist/flows/activity/compound/components/Steps.d.ts +24 -0
- package/dist/flows/activity/compound/components/Steps.js +1 -0
- package/dist/flows/activity/dialog/ActivityDialog.d.ts +55 -0
- package/dist/flows/activity/dialog/ActivityDialog.js +1 -0
- package/dist/flows/activity/dialog/ActivityFlowBoundary.d.ts +1 -0
- package/dist/flows/activity/dialog/ActivityFlowBoundary.js +1 -0
- package/dist/flows/activity/driver/context.d.ts +38 -0
- package/dist/flows/activity/driver/context.js +1 -0
- package/dist/flows/activity/driver/types.d.ts +58 -0
- package/dist/flows/activity/orchestrator/controller.d.ts +11 -0
- package/dist/flows/activity/orchestrator/controller.js +1 -0
- package/dist/flows/activity/orchestrator/index.d.ts +4 -0
- package/dist/flows/activity/orchestrator/index.js +1 -0
- package/dist/flows/activity/orchestrator/reducer.d.ts +1 -0
- package/dist/flows/activity/orchestrator/reducer.js +1 -0
- package/dist/flows/activity/orchestrator/types.d.ts +71 -0
- package/dist/flows/activity/orchestrator/useActivity.d.ts +94 -0
- package/dist/flows/activity/orchestrator/useActivity.js +1 -0
- package/dist/flows/activity/widgets/ActivityDetail.d.ts +41 -0
- package/dist/flows/activity/widgets/ActivityDetail.js +1 -0
- package/dist/flows/activity/widgets/ActivityList.d.ts +38 -0
- package/dist/flows/activity/widgets/ActivityList.js +1 -0
- package/dist/flows/activity/widgets/useStandaloneActivitySource.js +1 -0
- package/dist/flows/deposit/dialog/DepositBootstrapErrorState.js +1 -1
- package/dist/flows/deposit/dialog/DepositDialog.d.ts +26 -79
- package/dist/flows/deposit/dialog/DepositDialog.js +1 -1
- package/dist/flows/deposit/dialog/WalletRequiredState.js +1 -0
- package/dist/flows/deposit/dialog/WalletRequiredState.styles.js +1 -0
- package/dist/flows/deposit/driver/payloads.d.ts +109 -5
- package/dist/flows/deposit/driver/transformers/balanceToBalancesPayload.d.ts +2 -0
- package/dist/flows/deposit/driver/transformers/balanceToBalancesPayload.js +1 -1
- package/dist/flows/deposit/driver/transformers/index.d.ts +1 -0
- package/dist/flows/deposit/driver/transformers/quoteToPayload.d.ts +2 -0
- package/dist/flows/deposit/driver/transformers/settlementToPayload.d.ts +25 -0
- package/dist/flows/deposit/driver/transformers/settlementToPayload.js +1 -1
- package/dist/flows/deposit/driver/transformers/startToAddressesPayload.d.ts +2 -0
- package/dist/flows/deposit/driver/transformers/startToAddressesPayload.js +1 -1
- package/dist/flows/deposit/driver/transformers/startToBrandPayload.d.ts +1 -0
- package/dist/flows/deposit/driver/transformers/startToTargetPayload.d.ts +2 -0
- package/dist/flows/deposit/driver/transformers/startToTargetPayload.js +1 -1
- package/dist/flows/deposit/driver/transformers/walletAddressToWalletPayload.d.ts +1 -0
- package/dist/flows/deposit/driver/types.d.ts +92 -5
- package/dist/flows/deposit/orchestrator/controller.js +1 -1
- package/dist/flows/deposit/orchestrator/index.d.ts +5 -0
- package/dist/flows/deposit/orchestrator/reducer.d.ts +1 -0
- package/dist/flows/deposit/orchestrator/reducer.js +1 -1
- package/dist/flows/deposit/orchestrator/types.d.ts +276 -12
- package/dist/flows/deposit/orchestrator/useDeposit.d.ts +45 -1
- package/dist/flows/deposit/orchestrator/useDeposit.js +1 -1
- package/dist/flows/deposit/shared/checkoutPopup.js +1 -0
- package/dist/flows/deposit/shared/onramp.js +1 -0
- package/dist/flows/deposit/widgets/activity/DepositActivityDetail.d.ts +40 -0
- package/dist/flows/deposit/widgets/activity/DepositActivityDetail.js +1 -0
- package/dist/flows/deposit/widgets/activity/DepositActivityList.d.ts +38 -0
- package/dist/flows/deposit/widgets/activity/DepositActivityList.js +1 -0
- package/dist/flows/deposit/widgets/activity/index.d.ts +2 -0
- package/dist/flows/deposit/widgets/activity/index.js +1 -0
- package/dist/flows/deposit/widgets/activity/useDepositActivitySource.js +1 -0
- package/dist/flows/deposit/widgets/amount-entry/AmountEntry.d.ts +32 -5
- package/dist/flows/deposit/widgets/amount-entry/AmountEntry.js +1 -1
- package/dist/flows/deposit/widgets/amount-entry/footerIntent.js +1 -0
- package/dist/flows/deposit/widgets/asset-picker/AssetPicker.d.ts +24 -4
- package/dist/flows/deposit/widgets/asset-picker/AssetPicker.js +1 -1
- package/dist/flows/deposit/widgets/confirm-deposit/ConfirmDeposit.d.ts +37 -4
- package/dist/flows/deposit/widgets/confirm-deposit/ConfirmDeposit.js +1 -1
- package/dist/flows/deposit/widgets/deposit/Deposit.d.ts +39 -4
- package/dist/flows/deposit/widgets/deposit/Deposit.js +1 -1
- package/dist/flows/deposit/widgets/deposit/compound/Deposit.d.ts +58 -1
- package/dist/flows/deposit/widgets/deposit/compound/Deposit.js +1 -1
- package/dist/flows/deposit/widgets/deposit/compound/Deposit.slots.d.ts +6 -0
- package/dist/flows/deposit/widgets/deposit/compound/Deposit.slots.js +1 -1
- package/dist/flows/deposit/widgets/deposit/compound/Deposit.styles.js +1 -1
- package/dist/flows/deposit/widgets/deposit/compound/components/Boundary.d.ts +29 -0
- package/dist/flows/deposit/widgets/deposit/compound/components/Boundary.js +1 -0
- package/dist/flows/deposit/widgets/deposit/compound/components/Guards.d.ts +28 -0
- package/dist/flows/deposit/widgets/deposit/compound/components/Guards.js +1 -0
- package/dist/flows/deposit/widgets/deposit/compound/components/Header.d.ts +11 -0
- package/dist/flows/deposit/widgets/deposit/compound/components/Header.js +1 -1
- package/dist/flows/deposit/widgets/deposit/compound/components/Method.d.ts +7 -0
- package/dist/flows/deposit/widgets/deposit/compound/components/Method.js +1 -1
- package/dist/flows/deposit/widgets/deposit/compound/components/MethodSection.d.ts +40 -0
- package/dist/flows/deposit/widgets/deposit/compound/components/MethodSection.js +1 -0
- package/dist/flows/deposit/widgets/deposit/compound/components/Methods.d.ts +15 -9
- package/dist/flows/deposit/widgets/deposit/compound/components/Methods.js +1 -1
- package/dist/flows/deposit/widgets/deposit/compound/components/Rail.d.ts +18 -0
- package/dist/flows/deposit/widgets/deposit/compound/components/Rail.js +1 -0
- package/dist/flows/deposit/widgets/deposit/compound/components/RailPicker.d.ts +43 -0
- package/dist/flows/deposit/widgets/deposit/compound/components/RailPicker.js +1 -0
- package/dist/flows/deposit/widgets/deposit/compound/components/Steps.d.ts +24 -0
- package/dist/flows/deposit/widgets/deposit/compound/components/Steps.js +1 -0
- package/dist/flows/deposit/widgets/deposit/compound/index.d.ts +2 -1
- package/dist/flows/deposit/widgets/deposit/compound/types.d.ts +106 -4
- package/dist/flows/deposit/widgets/deposit-status-banner/DepositStatusBanner.d.ts +41 -1
- package/dist/flows/deposit/widgets/deposit-status-banner/DepositStatusBanner.js +1 -1
- package/dist/flows/deposit/widgets/deposit-status-banner/compound/DepositStatusBanner.js +1 -1
- package/dist/flows/deposit/widgets/deposit-status-banner/compound/components/Hero.js +1 -1
- package/dist/flows/deposit/widgets/deposit-status-banner/compound/components/PrimaryAction.js +1 -1
- package/dist/flows/deposit/widgets/deposit-status-banner/compound/types.d.ts +5 -5
- package/dist/flows/deposit/widgets/error-state/ErrorState.d.ts +39 -4
- package/dist/flows/deposit/widgets/error-state/ErrorState.js +1 -1
- package/dist/flows/deposit/widgets/onramp-amount-entry/OnrampAmountEntry.d.ts +64 -0
- package/dist/flows/deposit/widgets/onramp-amount-entry/OnrampAmountEntry.js +1 -0
- package/dist/flows/deposit/widgets/onramp-amount-entry/compound/OnrampAmountEntry.d.ts +62 -0
- package/dist/flows/deposit/widgets/onramp-amount-entry/compound/OnrampAmountEntry.js +1 -0
- package/dist/flows/deposit/widgets/onramp-amount-entry/compound/OnrampAmountEntry.slots.d.ts +14 -0
- package/dist/flows/deposit/widgets/onramp-amount-entry/compound/OnrampAmountEntry.slots.js +1 -0
- package/dist/flows/deposit/widgets/onramp-amount-entry/compound/OnrampAmountEntry.styles.js +1 -0
- package/dist/flows/deposit/widgets/onramp-amount-entry/compound/components/HeroLabel.d.ts +13 -0
- package/dist/flows/deposit/widgets/onramp-amount-entry/compound/components/HeroLabel.js +1 -0
- package/dist/flows/deposit/widgets/onramp-amount-entry/compound/components/ReceiveChip.d.ts +14 -0
- package/dist/flows/deposit/widgets/onramp-amount-entry/compound/components/ReceiveChip.js +1 -0
- package/dist/flows/deposit/widgets/onramp-amount-entry/compound/context.js +1 -0
- package/dist/flows/deposit/widgets/onramp-amount-entry/compound/index.d.ts +3 -0
- package/dist/flows/deposit/widgets/onramp-amount-entry/compound/index.js +1 -0
- package/dist/flows/deposit/widgets/onramp-amount-entry/compound/types.d.ts +29 -0
- package/dist/flows/deposit/widgets/onramp-amount-entry/index.d.ts +1 -0
- package/dist/flows/deposit/widgets/onramp-amount-entry/index.js +1 -0
- package/dist/flows/deposit/widgets/onramp-confirm/OnrampConfirm.d.ts +50 -0
- package/dist/flows/deposit/widgets/onramp-confirm/OnrampConfirm.js +1 -0
- package/dist/flows/deposit/widgets/onramp-confirm/compound/OnrampConfirm.d.ts +42 -0
- package/dist/flows/deposit/widgets/onramp-confirm/compound/OnrampConfirm.js +1 -0
- package/dist/flows/deposit/widgets/onramp-confirm/compound/OnrampConfirm.slots.d.ts +24 -0
- package/dist/flows/deposit/widgets/onramp-confirm/compound/OnrampConfirm.slots.js +1 -0
- package/dist/flows/deposit/widgets/onramp-confirm/compound/OnrampConfirm.styles.js +1 -0
- package/dist/flows/deposit/widgets/onramp-confirm/compound/components/Body.d.ts +16 -0
- package/dist/flows/deposit/widgets/onramp-confirm/compound/components/Body.js +1 -0
- package/dist/flows/deposit/widgets/onramp-confirm/compound/components/Header.d.ts +15 -0
- package/dist/flows/deposit/widgets/onramp-confirm/compound/components/Header.js +1 -0
- package/dist/flows/deposit/widgets/onramp-confirm/compound/components/Summary.d.ts +15 -0
- package/dist/flows/deposit/widgets/onramp-confirm/compound/components/Summary.js +1 -0
- package/dist/flows/deposit/widgets/onramp-confirm/compound/context.d.ts +25 -0
- package/dist/flows/deposit/widgets/onramp-confirm/compound/context.js +1 -0
- package/dist/flows/deposit/widgets/onramp-confirm/compound/index.d.ts +4 -0
- package/dist/flows/deposit/widgets/onramp-confirm/compound/index.js +1 -0
- package/dist/flows/deposit/widgets/onramp-confirm/compound/types.d.ts +62 -0
- package/dist/flows/deposit/widgets/onramp-confirm/index.d.ts +1 -0
- package/dist/flows/deposit/widgets/onramp-confirm/index.js +1 -0
- package/dist/flows/deposit/widgets/onramp-payment-pending/OnrampPaymentPending.d.ts +48 -0
- package/dist/flows/deposit/widgets/onramp-payment-pending/OnrampPaymentPending.js +1 -0
- package/dist/flows/deposit/widgets/onramp-payment-pending/compound/OnrampPaymentPending.d.ts +63 -0
- package/dist/flows/deposit/widgets/onramp-payment-pending/compound/OnrampPaymentPending.js +1 -0
- package/dist/flows/deposit/widgets/onramp-payment-pending/compound/OnrampPaymentPending.slots.d.ts +14 -0
- package/dist/flows/deposit/widgets/onramp-payment-pending/compound/OnrampPaymentPending.slots.js +1 -0
- package/dist/flows/deposit/widgets/onramp-payment-pending/compound/components/ReopenButton.d.ts +11 -0
- package/dist/flows/deposit/widgets/onramp-payment-pending/compound/components/ReopenButton.js +1 -0
- package/dist/flows/deposit/widgets/onramp-payment-pending/compound/context.js +1 -0
- package/dist/flows/deposit/widgets/onramp-payment-pending/compound/index.d.ts +2 -0
- package/dist/flows/deposit/widgets/onramp-payment-pending/compound/index.js +1 -0
- package/dist/flows/deposit/widgets/onramp-payment-pending/index.d.ts +1 -0
- package/dist/flows/deposit/widgets/onramp-payment-pending/index.js +1 -0
- package/dist/flows/deposit/widgets/processing-state/ProcessingState.d.ts +30 -4
- package/dist/flows/deposit/widgets/processing-state/ProcessingState.js +1 -1
- package/dist/flows/deposit/widgets/success-state/SuccessState.d.ts +38 -4
- package/dist/flows/deposit/widgets/success-state/SuccessState.js +1 -1
- package/dist/flows/deposit/widgets/transfer-crypto/TransferCrypto.d.ts +34 -3
- package/dist/flows/deposit/widgets/transfer-crypto/TransferCrypto.js +1 -1
- package/dist/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.d.ts +1 -1
- package/dist/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.js +1 -1
- package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Address.js +1 -1
- package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Disclosure.d.ts +5 -2
- package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Disclosure.js +1 -1
- package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Header.d.ts +6 -0
- package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Header.js +1 -1
- package/dist/flows/deposit/widgets/transfer-crypto/compound/components/QrCode.d.ts +4 -10
- package/dist/flows/deposit/widgets/transfer-crypto/compound/components/QrCode.js +1 -1
- package/dist/flows/deposit/widgets/transfer-crypto/compound/types.d.ts +16 -2
- package/dist/flows/shared/transformers/computeQuoteAttrs.d.ts +1 -0
- package/dist/flows/shared/transformers/index.d.ts +1 -0
- package/dist/flows/shared/transformers/pickRelevantSettlement.d.ts +1 -0
- package/dist/flows/shared/transformers/pickRelevantSettlement.js +1 -1
- package/dist/flows/shared/transformers/testnets.js +1 -0
- package/dist/flows/withdraw/bindings/WithdrawBindings.d.ts +92 -0
- package/dist/flows/withdraw/bindings/WithdrawBindings.js +1 -0
- package/dist/flows/withdraw/bindings/index.d.ts +1 -0
- package/dist/flows/withdraw/bindings/index.js +1 -0
- package/dist/flows/withdraw/dialog/WithdrawDialog.d.ts +44 -71
- package/dist/flows/withdraw/dialog/WithdrawDialog.js +1 -1
- package/dist/flows/withdraw/driver/dto.d.ts +8 -7
- package/dist/flows/withdraw/driver/payloads.d.ts +16 -1
- package/dist/flows/withdraw/driver/transformers/settlementToWithdrawalPayload.js +1 -1
- package/dist/flows/withdraw/driver/transformers/supportedAssetsToReceiveOptionsPayload.js +1 -1
- package/dist/flows/withdraw/driver/types.d.ts +77 -14
- package/dist/flows/withdraw/orchestrator/controller.js +1 -1
- package/dist/flows/withdraw/orchestrator/index.d.ts +1 -1
- package/dist/flows/withdraw/orchestrator/reducer.js +1 -1
- package/dist/flows/withdraw/orchestrator/types.d.ts +218 -35
- package/dist/flows/withdraw/orchestrator/useWithdraw.d.ts +36 -1
- package/dist/flows/withdraw/orchestrator/useWithdraw.js +1 -1
- package/dist/flows/withdraw/widgets/activity/WithdrawActivityDetail.d.ts +39 -0
- package/dist/flows/withdraw/widgets/activity/WithdrawActivityDetail.js +1 -0
- package/dist/flows/withdraw/widgets/activity/WithdrawActivityList.d.ts +36 -0
- package/dist/flows/withdraw/widgets/activity/WithdrawActivityList.js +1 -0
- package/dist/flows/withdraw/widgets/activity/index.d.ts +2 -0
- package/dist/flows/withdraw/widgets/activity/index.js +1 -0
- package/dist/flows/withdraw/widgets/activity/useWithdrawActivitySource.js +1 -0
- package/dist/flows/withdraw/widgets/withdraw/compound/Withdraw.d.ts +60 -0
- package/dist/flows/withdraw/widgets/withdraw/compound/Withdraw.js +1 -0
- package/dist/flows/withdraw/widgets/withdraw/compound/Withdraw.slots.d.ts +13 -0
- package/dist/flows/withdraw/widgets/withdraw/compound/Withdraw.slots.js +1 -0
- package/dist/flows/withdraw/widgets/withdraw/compound/components/Boundary.d.ts +29 -0
- package/dist/flows/withdraw/widgets/withdraw/compound/components/Boundary.js +1 -0
- package/dist/flows/withdraw/widgets/withdraw/compound/components/Guards.d.ts +25 -0
- package/dist/flows/withdraw/widgets/withdraw/compound/components/Guards.js +1 -0
- package/dist/flows/withdraw/widgets/withdraw/compound/components/Steps.d.ts +27 -0
- package/dist/flows/withdraw/widgets/withdraw/compound/components/Steps.js +1 -0
- package/dist/flows/withdraw/widgets/withdraw/compound/index.d.ts +3 -0
- package/dist/flows/withdraw/widgets/withdraw/compound/index.js +1 -0
- package/dist/flows/withdraw/widgets/withdraw-error/WithdrawError.d.ts +45 -2
- package/dist/flows/withdraw/widgets/withdraw-error/WithdrawError.js +1 -1
- package/dist/flows/withdraw/widgets/withdraw-form/WithdrawForm.d.ts +32 -12
- package/dist/flows/withdraw/widgets/withdraw-form/WithdrawForm.js +1 -1
- package/dist/flows/withdraw/widgets/withdraw-form/compound/WithdrawForm.js +1 -1
- package/dist/flows/withdraw/widgets/withdraw-form/compound/components/Body.d.ts +7 -6
- package/dist/flows/withdraw/widgets/withdraw-form/compound/components/Header.d.ts +6 -1
- package/dist/flows/withdraw/widgets/withdraw-form/compound/components/Header.js +1 -1
- package/dist/flows/withdraw/widgets/withdraw-form/compound/components/RecipientField.d.ts +7 -5
- package/dist/flows/withdraw/widgets/withdraw-form/compound/components/RecipientField.js +1 -1
- package/dist/flows/withdraw/widgets/withdraw-form/compound/types.d.ts +15 -5
- package/dist/flows/withdraw/widgets/withdraw-form/validation.js +1 -1
- package/dist/flows/withdraw/widgets/withdraw-in-progress/WithdrawInProgress.d.ts +39 -3
- package/dist/flows/withdraw/widgets/withdraw-in-progress/WithdrawInProgress.js +1 -1
- package/dist/flows/withdraw/widgets/withdraw-success/WithdrawSuccess.d.ts +46 -2
- package/dist/flows/withdraw/widgets/withdraw-success/WithdrawSuccess.js +1 -1
- package/dist/format/index.d.ts +2 -1
- package/dist/format/index.js +1 -1
- package/dist/i18n/index.d.ts +5 -4
- package/dist/i18n/index.js +1 -1
- package/dist/i18n/locales/ar.js +1 -1
- package/dist/i18n/locales/es.js +1 -1
- package/dist/i18n/locales/source-keys.d.ts +12 -0
- package/dist/i18n/locales/source-keys.js +0 -0
- package/dist/icons/index.d.ts +5 -1
- package/dist/icons/index.js +1 -1
- package/dist/index.d.ts +35 -11
- package/dist/index.js +1 -1
- package/dist/package.js +1 -1
- package/dist/scope/KitPortalScope.js +1 -1
- package/dist/scope/KitScope.d.ts +27 -1
- package/dist/scope/KitScope.js +1 -1
- package/dist/scope/context.d.ts +24 -1
- package/dist/scope/index.d.ts +1 -1
- package/dist/shared/attribution/Attribution.js +1 -0
- package/dist/shared/attribution/Attribution.slots.js +1 -0
- package/dist/shared/attribution/Attribution.styles.js +1 -0
- package/dist/shared/attribution/index.js +1 -0
- package/dist/shared/chains/index.d.ts +48 -29
- package/dist/shared/chains/index.js +1 -1
- package/dist/shared/constants/brand-intercom.js +1 -0
- package/dist/shared/cuer/Cuer.js +1 -1
- package/dist/shared/dialog/DialogShell.d.ts +21 -6
- package/dist/shared/dialog/DialogShell.js +1 -1
- package/dist/shared/dialog/Frame.js +1 -1
- package/dist/shared/dialog/LoadingState.js +1 -0
- package/dist/shared/dialog/LoadingState.styles.js +1 -0
- package/dist/shared/dialog/StepTransition.js +1 -1
- package/dist/shared/dialog/useDirectionalChevronTransform.js +1 -1
- package/dist/shared/driver/types.d.ts +4 -3
- package/dist/shared/format/formatSmartRelative.d.ts +25 -0
- package/dist/shared/format/formatSmartRelative.js +1 -0
- package/dist/shared/format/formatUsd.js +1 -1
- package/dist/shared/i18n/KitI18nProvider.d.ts +11 -8
- package/dist/shared/i18n/KitI18nProvider.js +1 -1
- package/dist/shared/i18n/createKitI18n.d.ts +79 -16
- package/dist/shared/i18n/createKitI18n.js +1 -1
- package/dist/shared/i18n/useLingui.d.ts +11 -3
- package/dist/shared/icons/ActivityIcon.d.ts +12 -0
- package/dist/shared/icons/ActivityIcon.js +1 -0
- package/dist/shared/icons/BitcoinIcon.d.ts +14 -0
- package/dist/shared/icons/BitcoinIcon.js +1 -0
- package/dist/shared/icons/CardIcon.d.ts +16 -0
- package/dist/shared/icons/CardIcon.js +1 -0
- package/dist/shared/icons/LogoIcon.d.ts +13 -0
- package/dist/shared/icons/LogoIcon.js +1 -0
- package/dist/shared/merchant-link/MerchantLink.d.ts +1 -0
- package/dist/shared/merchant-link/MerchantLink.js +1 -0
- package/dist/shared/merchant-link/MerchantLinkButton.d.ts +1 -0
- package/dist/shared/merchant-link/MerchantLinkButton.js +1 -0
- package/dist/shared/merchant-link/index.d.ts +1 -0
- package/dist/shared/merchant-link/index.js +1 -0
- package/dist/shared/merchant-link/resolveMerchantLink.js +1 -0
- package/dist/shared/orchestrator/activityOpenInput.d.ts +21 -0
- package/dist/shared/orchestrator/createActivityReducers.js +1 -0
- package/dist/shared/orchestrator/index.d.ts +2 -0
- package/dist/shared/orchestrator/index.js +1 -1
- package/dist/shared/orchestrator/resolveActivityEntry.d.ts +1 -0
- package/dist/shared/orchestrator/resolveActivityEntry.js +1 -0
- package/dist/shared/orchestrator/toFailure.js +1 -1
- package/dist/shared/orchestrator/types.d.ts +8 -0
- package/dist/shared/orchestrator/useOnrampSessionWatcher.js +1 -0
- package/dist/shared/orchestrator/useSettlementWatcher.js +1 -1
- package/dist/shared/presentation/index.js +1 -0
- package/dist/shared/presentation/types.d.ts +30 -0
- package/dist/shared/presentation/types.js +1 -0
- package/dist/shared/presentation/useResolvedSurfaceKind.js +1 -0
- package/dist/shared/primitives/TxHashValue/TxHashValue.js +1 -1
- package/dist/shared/support/SupportConfigContext.d.ts +1 -0
- package/dist/shared/support/SupportConfigContext.js +1 -0
- package/dist/shared/support/SupportLink.d.ts +1 -0
- package/dist/shared/support/SupportLink.js +1 -0
- package/dist/shared/support/SupportSpinner.d.ts +1 -0
- package/dist/shared/support/SupportSpinner.js +1 -0
- package/dist/shared/support/index.d.ts +2 -0
- package/dist/shared/support/index.js +1 -0
- package/dist/shared/support/intercom-loader.d.ts +17 -0
- package/dist/shared/support/intercom-loader.js +1 -0
- package/dist/shared/support/types.d.ts +43 -0
- package/dist/shared/support/useIntercomMerchantContext.d.ts +27 -0
- package/dist/shared/support/useIntercomMerchantContext.js +1 -0
- package/dist/shared/support/useIntercomShutdownOnUnmount.js +1 -0
- package/dist/shared/support/useMerchantContext.d.ts +1 -0
- package/dist/shared/support/useMerchantContext.js +1 -0
- package/dist/shared/support/useSupportTrigger.js +1 -0
- package/dist/shared/terms/TermsConfigContext.d.ts +1 -0
- package/dist/shared/terms/TermsConfigContext.js +1 -0
- package/dist/shared/terms/TermsLink.d.ts +1 -0
- package/dist/shared/terms/TermsLink.js +1 -0
- package/dist/shared/terms/index.d.ts +1 -0
- package/dist/shared/terms/index.js +1 -0
- package/dist/shared/terms/types.d.ts +43 -0
- package/dist/shared/ui/AdaptiveSurface/AdaptiveSurface.d.ts +52 -0
- package/dist/shared/ui/AdaptiveSurface/AdaptiveSurface.js +1 -0
- package/dist/shared/ui/AdaptiveSurface/index.d.ts +2 -0
- package/dist/shared/ui/AdaptiveSurface/index.js +1 -0
- package/dist/shared/ui/Card/Card.d.ts +12 -9
- package/dist/shared/ui/Card/Card.js +1 -1
- package/dist/shared/ui/Card/Card.styles.js +1 -1
- package/dist/shared/ui/Details/Details.d.ts +9 -1
- package/dist/shared/ui/Details/Details.styles.js +1 -1
- package/dist/shared/ui/Dialog/Dialog.d.ts +10 -8
- package/dist/shared/ui/Dialog/Dialog.js +1 -1
- package/dist/shared/ui/Dialog/Dialog.styles.js +1 -1
- package/dist/shared/ui/Drawer/Drawer.d.ts +135 -0
- package/dist/shared/ui/Drawer/Drawer.js +1 -0
- package/dist/shared/ui/Drawer/Drawer.slots.d.ts +19 -0
- package/dist/shared/ui/Drawer/Drawer.slots.js +1 -0
- package/dist/shared/ui/Drawer/Drawer.styles.js +1 -0
- package/dist/shared/ui/Drawer/index.d.ts +2 -0
- package/dist/shared/ui/Drawer/index.js +1 -0
- package/dist/shared/ui/Select/Select.js +1 -1
- package/dist/shared/ui/SelectableTile/SelectableTile.d.ts +21 -8
- package/dist/shared/ui/SelectableTile/SelectableTile.js +1 -1
- package/dist/shared/ui/Steps/Steps.d.ts +52 -0
- package/dist/shared/ui/Steps/Steps.js +1 -0
- package/dist/shared/ui/Steps/Steps.slots.d.ts +7 -0
- package/dist/shared/ui/Steps/Steps.slots.js +1 -0
- package/dist/shared/ui/Steps/Steps.styles.js +1 -0
- package/dist/shared/ui/Steps/index.d.ts +2 -0
- package/dist/shared/ui/Steps/index.js +1 -0
- package/dist/shared/ui/Tabs/Tabs.d.ts +79 -0
- package/dist/shared/ui/Tabs/Tabs.js +1 -0
- package/dist/shared/ui/Tabs/Tabs.slots.d.ts +11 -0
- package/dist/shared/ui/Tabs/Tabs.slots.js +1 -0
- package/dist/shared/ui/Tabs/Tabs.styles.js +1 -0
- package/dist/shared/ui/Tabs/index.d.ts +2 -0
- package/dist/shared/ui/Tabs/index.js +1 -0
- package/dist/shared/ui/WalletRow/WalletRow.d.ts +1 -1
- package/dist/shared/ui/WalletRow/WalletRow.js +1 -1
- package/dist/shared/ui/surfaceContext.d.ts +9 -0
- package/dist/shared/ui/surfaceContext.js +1 -0
- package/dist/shared/utils/assertNever.js +1 -0
- package/dist/shared/utils/logos/types.d.ts +1 -1
- package/dist/shared/utils/useDeepMemo.js +1 -0
- package/dist/shared/wallet/ConnectWalletContext.d.ts +17 -0
- package/dist/shared/wallet/ConnectWalletContext.js +1 -0
- package/dist/shared/widgets/activity/ActivityTrigger.js +1 -0
- package/dist/shared/widgets/activity/ActivityTrigger.styles.js +1 -0
- package/dist/shared/widgets/activity/adapters/settlementToWidgetProps.js +1 -0
- package/dist/shared/widgets/activity/compound/Activity.d.ts +95 -0
- package/dist/shared/widgets/activity/compound/Activity.js +1 -0
- package/dist/shared/widgets/activity/compound/Activity.slots.d.ts +22 -0
- package/dist/shared/widgets/activity/compound/Activity.slots.js +1 -0
- package/dist/shared/widgets/activity/compound/Activity.styles.js +1 -0
- package/dist/shared/widgets/activity/compound/ActivityDetail.d.ts +82 -0
- package/dist/shared/widgets/activity/compound/ActivityDetail.js +1 -0
- package/dist/shared/widgets/activity/compound/Row.slots.d.ts +21 -0
- package/dist/shared/widgets/activity/compound/Row.slots.js +1 -0
- package/dist/shared/widgets/activity/compound/Row.styles.js +1 -0
- package/dist/shared/widgets/activity/compound/components/ActivityHeader.d.ts +39 -0
- package/dist/shared/widgets/activity/compound/components/ActivityHeader.js +1 -0
- package/dist/shared/widgets/activity/compound/components/Empty.d.ts +15 -0
- package/dist/shared/widgets/activity/compound/components/Empty.js +1 -0
- package/dist/shared/widgets/activity/compound/components/ErrorView.d.ts +26 -0
- package/dist/shared/widgets/activity/compound/components/ErrorView.js +1 -0
- package/dist/shared/widgets/activity/compound/components/List.d.ts +23 -0
- package/dist/shared/widgets/activity/compound/components/List.js +1 -0
- package/dist/shared/widgets/activity/compound/components/Row.d.ts +51 -0
- package/dist/shared/widgets/activity/compound/components/Row.js +1 -0
- package/dist/shared/widgets/activity/compound/components/StatusPip.js +1 -0
- package/dist/shared/widgets/activity/compound/context.d.ts +95 -0
- package/dist/shared/widgets/activity/compound/context.js +1 -0
- package/dist/shared/widgets/activity/compound/index.d.ts +8 -0
- package/dist/shared/widgets/activity/compound/index.js +1 -0
- package/dist/shared/widgets/activity/index.js +1 -0
- package/dist/shared/widgets/activity/payloads.d.ts +108 -0
- package/dist/shared/widgets/activity/transformers/activityResponseToPayload.js +1 -0
- package/dist/shared/widgets/activity/transformers/resolveDirection.js +1 -0
- package/dist/shared/widgets/amount-entry/compound/AmountEntry.d.ts +10 -2
- package/dist/shared/widgets/amount-entry/compound/AmountEntry.js +1 -1
- package/dist/shared/widgets/amount-entry/compound/AmountEntry.slots.d.ts +6 -0
- package/dist/shared/widgets/amount-entry/compound/AmountEntry.slots.js +1 -1
- package/dist/shared/widgets/amount-entry/compound/AmountEntry.styles.js +1 -1
- package/dist/shared/widgets/amount-entry/compound/components/Details.d.ts +34 -0
- package/dist/shared/widgets/amount-entry/compound/components/Details.js +1 -0
- package/dist/shared/widgets/amount-entry/compound/components/Footer.d.ts +2 -1
- package/dist/shared/widgets/amount-entry/compound/components/Footer.js +1 -1
- package/dist/shared/widgets/amount-entry/compound/components/Header.d.ts +6 -1
- package/dist/shared/widgets/amount-entry/compound/components/Header.js +1 -1
- package/dist/shared/widgets/amount-entry/compound/components/Hero/Hero.js +1 -1
- package/dist/shared/widgets/amount-entry/compound/components/Hero/SwapBackdrop.js +1 -1
- package/dist/shared/widgets/amount-entry/compound/components/Notice.d.ts +7 -0
- package/dist/shared/widgets/amount-entry/compound/components/Notice.js +1 -0
- package/dist/shared/widgets/amount-entry/compound/index.d.ts +1 -1
- package/dist/shared/widgets/amount-entry/compound/types.d.ts +69 -3
- package/dist/shared/widgets/asset-picker/compound/AssetPicker.d.ts +3 -0
- package/dist/shared/widgets/asset-picker/compound/AssetPicker.js +1 -1
- package/dist/shared/widgets/asset-picker/compound/AssetPicker.slots.d.ts +2 -0
- package/dist/shared/widgets/asset-picker/compound/AssetPicker.slots.js +1 -1
- package/dist/shared/widgets/asset-picker/compound/AssetPicker.styles.js +1 -1
- package/dist/shared/widgets/asset-picker/compound/components/Asset.d.ts +7 -1
- package/dist/shared/widgets/asset-picker/compound/components/Asset.js +1 -1
- package/dist/shared/widgets/asset-picker/compound/components/Empty.d.ts +15 -0
- package/dist/shared/widgets/asset-picker/compound/components/Empty.js +1 -0
- package/dist/shared/widgets/asset-picker/compound/components/Header.d.ts +6 -1
- package/dist/shared/widgets/asset-picker/compound/components/Header.js +1 -1
- package/dist/shared/widgets/asset-picker/compound/types.d.ts +15 -1
- package/dist/shared/widgets/confirm-transfer/compound/ConfirmTransfer.styles.js +1 -1
- package/dist/shared/widgets/confirm-transfer/compound/components/Breakdown.js +1 -1
- package/dist/shared/widgets/confirm-transfer/compound/components/Disclaimer.d.ts +4 -3
- package/dist/shared/widgets/confirm-transfer/compound/components/Disclaimer.js +1 -1
- package/dist/shared/widgets/confirm-transfer/compound/components/QuoteTimer.js +1 -1
- package/dist/shared/widgets/error-state/compound/components/AssetValue.js +1 -1
- package/dist/shared/widgets/error-state/compound/components/HelpInfo.js +1 -1
- package/dist/shared/widgets/error-state/compound/components/MoreDetails.d.ts +1 -1
- package/dist/shared/widgets/error-state/compound/components/MoreDetails.js +1 -1
- package/dist/shared/widgets/error-state/compound/components/StatusValue.js +1 -1
- package/dist/shared/widgets/processing-state/compound/ProcessingState.d.ts +1 -5
- package/dist/shared/widgets/processing-state/compound/ProcessingState.js +1 -1
- package/dist/shared/widgets/processing-state/compound/ProcessingState.slots.d.ts +0 -1
- package/dist/shared/widgets/processing-state/compound/ProcessingState.slots.js +1 -1
- package/dist/shared/widgets/processing-state/compound/ProcessingState.styles.js +1 -1
- package/dist/shared/widgets/processing-state/compound/components/Details.d.ts +6 -1
- package/dist/shared/widgets/processing-state/compound/components/Details.js +1 -1
- package/dist/shared/widgets/processing-state/compound/components/Header.d.ts +4 -3
- package/dist/shared/widgets/processing-state/compound/components/Header.js +1 -1
- package/dist/shared/widgets/processing-state/compound/components/Hero.d.ts +14 -7
- package/dist/shared/widgets/processing-state/compound/components/Hero.js +1 -1
- package/dist/shared/widgets/processing-state/compound/components/Rows.js +1 -1
- package/dist/shared/widgets/processing-state/compound/components/StatusPill.js +1 -1
- package/dist/shared/widgets/processing-state/compound/components/splitAmount.js +1 -0
- package/dist/shared/widgets/processing-state/compound/index.d.ts +1 -1
- package/dist/shared/widgets/processing-state/compound/types.d.ts +11 -29
- package/dist/shared/widgets/success-state/compound/components/Actions.js +1 -1
- package/dist/shared/widgets/success-state/compound/components/AssetValue.js +1 -1
- package/dist/shared/widgets/success-state/compound/components/MoreDetails.d.ts +1 -1
- package/dist/shared/widgets/success-state/compound/components/MoreDetails.js +1 -1
- package/dist/shared/widgets/success-state/compound/components/RouteValue.js +1 -1
- package/dist/shared/widgets/success-state/compound/components/StatusPill.js +1 -1
- package/dist/shared/widgets/success-state/compound/types.d.ts +5 -5
- package/dist/storage/context.d.ts +9 -1
- package/dist/storage/context.js +1 -1
- package/dist/storage/index.d.ts +1 -1
- package/dist/stridge/StridgeProvider.d.ts +177 -35
- package/dist/stridge/StridgeProvider.js +1 -1
- package/dist/stridge/depositOwner.js +1 -0
- package/dist/stridge/optionalWagmi.js +1 -0
- package/dist/stridge/stubs.js +1 -1
- package/dist/styles/index.css +567 -12
- package/dist/types.d.ts +8 -6
- package/dist/ui/index.d.ts +9 -1
- package/dist/ui/index.js +1 -1
- package/dist/version.d.ts +10 -0
- package/dist/version.js +1 -0
- package/dist/withdraw/compound/index.d.ts +11 -8
- package/dist/withdraw/compound/index.js +1 -1
- package/dist/withdraw/dialog/index.d.ts +4 -1
- package/dist/withdraw/widgets/index.d.ts +7 -0
- package/dist/withdraw/widgets/index.js +1 -0
- package/package.json +31 -7
- package/dist/_internal/deposit/widgets/index.d.ts +0 -11
- package/dist/_internal/deposit/widgets/index.js +0 -1
- package/dist/_internal/withdraw/widgets/index.d.ts +0 -5
- package/dist/_internal/withdraw/widgets/index.js +0 -1
- package/dist/flows/withdraw/dialog/WithdrawDialogEventsContext.d.ts +0 -36
- package/dist/flows/withdraw/dialog/WithdrawDialogEventsContext.js +0 -1
- package/dist/shared/widgets/processing-state/compound/components/Actions.d.ts +0 -17
- package/dist/shared/widgets/processing-state/compound/components/Actions.js +0 -1
- package/dist/stridge/StridgeContext.d.ts +0 -29
- package/dist/stridge/StridgeContext.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{
|
|
1
|
+
"use client";import{useLingui as e}from"../../../../shared/i18n/useLingui.js";import"../../../../i18n/index.js";import{useFailureReasonForKind as t}from"../../../../shared/orchestrator/failureReason.js";import"../../../../shared/orchestrator/index.js";import{useDepositSnapshot as n}from"../../driver/context.js";import{useDepositActions as r,useDepositEffectiveState as i}from"../../orchestrator/controller.js";import{DialogShell as a}from"../../../../shared/dialog/DialogShell.js";import{ErrorState as o}from"../../../../shared/widgets/error-state/compound/ErrorState.js";import"../../../../shared/widgets/error-state/compound/index.js";import{toAssetDescriptor as s}from"../../../../shared/widgets/asset-descriptor.js";import{Fragment as c,jsx as l,jsxs as u}from"react/jsx-runtime";const d={declined:{headline:{id:`mn0HrT`,message:`Payment declined`},reason:{id:`UDBU3S`,message:`Your payment was declined. Try a different card or amount.`}},cancelled:{headline:{id:`0VFO13`,message:`Payment cancelled`},reason:{id:`5R2524`,message:`You cancelled the payment before it completed.`}},refunded:{headline:{id:`hPpyl6`,message:`Payment refunded`},reason:{id:`3ytoeI`,message:`This payment was refunded. No crypto was delivered.`}},timeout:{headline:{id:`S7anoa`,message:`Payment timed out`},reason:{id:`Z1fsV0`,message:`The checkout window expired before payment completed.`}},generic:{headline:{id:`NzshpK`,message:`Purchase failed`},reason:{id:`X_Y-Ev`,message:`Something went wrong with your purchase. Please try again.`}}};function f(e,t){let n=e?.toLowerCase()??``,r=`generic`;n.includes(`declin`)?r=`declined`:n.includes(`cancel`)?r=`cancelled`:n.includes(`refund`)?r=`refunded`:(n.includes(`timeout`)||n.includes(`expire`))&&(r=`timeout`);let i=d[r];return{headline:t._(i.headline),reason:t._(i.reason)}}function p({children:a,...d}){let p=n(),m=i(),{tryAgain:h}=r(),{_:g,i18n:_}=e(),v=t();if(m.name!==`error`)return null;if(m.ctx.sessionId!==void 0){let e=p.onrampSession,{headline:t,reason:n}=f((e?.status===`ready`||e?.status===`stale`?e.payload:void 0)?.failureCode??m.ctx.failure?.code,_);return l(o,{...d,headline:t,reason:n,onTryAgain:h,children:a??u(c,{children:[l(o.Header,{}),l(o.Body,{children:l(o.Hero,{})}),l(o.Actions,{})]})})}let y=p.settlement,b=y.status===`ready`&&y.payload.kind===`failed`?y.payload:void 0,x=m.name===`error`?m.ctx.failure:void 0,S=g({id:`i-4Fbp`,message:`Deposit failed`}),C=b?v(b.failureKind):x?.reason;if(!b)return l(o,{...d,headline:S,...C?{reason:C}:{},onTryAgain:h,children:a??u(c,{children:[l(o.Header,{}),l(o.Body,{children:l(o.Hero,{})}),l(o.Actions,{})]})});let w=b,T={...w.sourceWallet.name===void 0?{}:{name:w.sourceWallet.name},address:w.sourceWallet.address.formatted,...w.sourceWallet.explorerUrl?{explorerUrl:w.sourceWallet.explorerUrl}:{}},E={...w.destination.name===void 0?{}:{name:w.destination.name},address:w.destination.address.formatted},D=s(w.creditedAsset)??{symbol:w.creditedAsset.symbol},O={hash:w.txHash.formatted,...w.txExplorerUrl?{explorerUrl:w.txExplorerUrl}:{}};return l(o,{...d,headline:S,...C?{reason:C}:{},sourceWallet:T,destination:E,receiveAmount:w.receiveAmount.formatted,receiveAsset:D,depositTx:O,submittedAt:w.submittedAt.formatted,failedAt:w.failedAt.formatted,onTryAgain:h,children:a??u(c,{children:[l(o.Header,{}),u(o.Body,{children:[l(o.Hero,{}),u(o.Details,{children:[l(o.FillStatusRow,{}),l(o.SourceRow,{}),l(o.DestinationRow,{}),l(o.YouReceiveRow,{}),u(o.MoreDetails,{children:[l(o.DepositTxRow,{}),l(o.SubmittedAtRow,{}),l(o.FailedAtRow,{})]})]}),l(o.HelpInfo,{})]}),l(o.Actions,{})]})})}function m({open:e,defaultOpen:t,onOpenChange:n,trigger:r,...i}){return l(a,{open:e,defaultOpen:t,onOpenChange:n,trigger:r,children:l(p,{...i})})}(function(e){e.Dialog=m,e.Header=o.Header,e.Body=o.Body,e.Hero=o.Hero,e.Details=o.Details,e.FillStatusRow=o.FillStatusRow,e.SourceRow=o.SourceRow,e.DestinationRow=o.DestinationRow,e.YouReceiveRow=o.YouReceiveRow,e.MoreDetails=o.MoreDetails,e.DepositTxRow=o.DepositTxRow,e.SubmittedAtRow=o.SubmittedAtRow,e.FailedAtRow=o.FailedAtRow,e.HelpInfo=o.HelpInfo,e.Actions=o.Actions})(p||={});export{p as ErrorState};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { DialogShellControls } from "../../../../shared/dialog/DialogShell.js";
|
|
2
|
+
import { AmountEntryBodyProps } from "../../../../shared/widgets/amount-entry/compound/types.js";
|
|
3
|
+
import { AmountEntryHeader } from "../../../../shared/widgets/amount-entry/compound/components/Header.js";
|
|
4
|
+
import { AmountEntryDetails, AmountEntryDetailsRow } from "../../../../shared/widgets/amount-entry/compound/components/Details.js";
|
|
5
|
+
import { AmountEntryFlow } from "../../../../shared/widgets/amount-entry/compound/components/Flow.js";
|
|
6
|
+
import { AmountEntryFooter } from "../../../../shared/widgets/amount-entry/compound/components/Footer.js";
|
|
7
|
+
import { AmountEntryHero } from "../../../../shared/widgets/amount-entry/compound/components/Hero/Hero.js";
|
|
8
|
+
import { AmountEntryNotice } from "../../../../shared/widgets/amount-entry/compound/components/Notice.js";
|
|
9
|
+
import { AmountEntryPills } from "../../../../shared/widgets/amount-entry/compound/components/Pills.js";
|
|
10
|
+
import { OnrampAmountEntryHeroLabel } from "./compound/components/HeroLabel.js";
|
|
11
|
+
import { OnrampAmountEntryReceiveChip } from "./compound/components/ReceiveChip.js";
|
|
12
|
+
import { ComponentProps, ReactNode } from "react";
|
|
13
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
14
|
+
|
|
15
|
+
//#region src/flows/deposit/widgets/onramp-amount-entry/OnrampAmountEntry.d.ts
|
|
16
|
+
interface OnrampAmountEntryOwnProps {
|
|
17
|
+
/**
|
|
18
|
+
* Optional custom composition. When omitted, the canonical default composition renders —
|
|
19
|
+
* `<Header />` + `<Body>` with YOU PAY label + Hero (Receive chip subLine) + fiat-absolute
|
|
20
|
+
* Pills + Details breakdown + `<Footer />`. Pass children to interleave your own elements
|
|
21
|
+
* between compound parts or replace the composition entirely.
|
|
22
|
+
*/
|
|
23
|
+
children?: ReactNode;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Orchestrated `OnrampAmountEntry` widget — the screen between the "Cash" rail and the
|
|
27
|
+
* onramp confirm screen. Reads the entered fiat amount from the FSM's `onrampAmountEntry.ctx`, the
|
|
28
|
+
* limit from the driver's `onrampMethods` entity, and the live fee/receive breakdown from the
|
|
29
|
+
* driver's `onrampQuote` entity (refreshed by the controller's debounced quote effect). Renders
|
|
30
|
+
* nothing on any other FSM state.
|
|
31
|
+
*/
|
|
32
|
+
declare function OnrampAmountEntry({
|
|
33
|
+
children,
|
|
34
|
+
...props
|
|
35
|
+
}: ComponentProps<"div"> & OnrampAmountEntryOwnProps): _$react_jsx_runtime0.JSX.Element | null;
|
|
36
|
+
declare function OnrampAmountEntryDialog({
|
|
37
|
+
open,
|
|
38
|
+
defaultOpen,
|
|
39
|
+
onOpenChange,
|
|
40
|
+
trigger,
|
|
41
|
+
...rootProps
|
|
42
|
+
}: OnrampAmountEntry.DialogProps): _$react_jsx_runtime0.JSX.Element;
|
|
43
|
+
declare namespace OnrampAmountEntry {
|
|
44
|
+
type Props = ComponentProps<"div"> & OnrampAmountEntryOwnProps;
|
|
45
|
+
type DialogProps = Props & DialogShellControls;
|
|
46
|
+
const Dialog: typeof OnrampAmountEntryDialog;
|
|
47
|
+
/**
|
|
48
|
+
* Compound sub-parts aliased on the orchestrated widget so consumers can compose without
|
|
49
|
+
* importing the headless compound separately.
|
|
50
|
+
*/
|
|
51
|
+
const HeroLabel: typeof OnrampAmountEntryHeroLabel;
|
|
52
|
+
const ReceiveChip: typeof OnrampAmountEntryReceiveChip;
|
|
53
|
+
const Header: typeof AmountEntryHeader;
|
|
54
|
+
const Body: (props: AmountEntryBodyProps) => _$react_jsx_runtime0.JSX.Element;
|
|
55
|
+
const Hero: typeof AmountEntryHero;
|
|
56
|
+
const Pills: typeof AmountEntryPills;
|
|
57
|
+
const Flow: typeof AmountEntryFlow;
|
|
58
|
+
const Footer: typeof AmountEntryFooter;
|
|
59
|
+
const Notice: typeof AmountEntryNotice;
|
|
60
|
+
const Details: typeof AmountEntryDetails;
|
|
61
|
+
const DetailsRow: typeof AmountEntryDetailsRow;
|
|
62
|
+
}
|
|
63
|
+
//#endregion
|
|
64
|
+
export { OnrampAmountEntry };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{Trans as e}from"../../../../shared/i18n/Trans.js";import{useLingui as t}from"../../../../shared/i18n/useLingui.js";import"../../../../i18n/index.js";import{useDepositSnapshot as n}from"../../driver/context.js";import{useDepositActions as r,useDepositEffectiveState as i}from"../../orchestrator/controller.js";import{DialogShell as a}from"../../../../shared/dialog/DialogShell.js";import{OnrampAmountEntry as o}from"./compound/OnrampAmountEntry.js";import"./compound/index.js";import{ONRAMP_AMOUNT_PRESETS as s}from"../../shared/onramp.js";import{useEffect as c,useMemo as l,useState as u}from"react";import{Fragment as d,jsx as f,jsxs as p}from"react/jsx-runtime";const m={symbol:`USDC`,chainId:1,address:`0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48`};function h({children:a,...h}){let g=n(),_=i(),{back:v,confirmOnrampAmount:y,setOnrampAmount:b}=r(),{_:x}=t(),S=_.name===`onrampAmountEntry`?_.ctx.amount:void 0,C=g.onrampMethods,w=C?.status===`ready`||C?.status===`stale`?C.payload:void 0,T=w?.limit?.value,E=w?.limit?.formatted,D=g.onrampQuote,O=D?.status===`ready`||D?.status===`stale`?D.payload:void 0,k=D==null||D.status===`idle`||D.status===`loading`,A=s[0]?.value??0,j=S??A,[M,N]=u(j),[P,F]=u(()=>{let e=s.find(e=>e.value===j);return e?String(e.value):void 0}),I=l(()=>s.map(e=>({value:String(e.value),label:e.label})),[]);c(()=>{b(M)},[M,b]);let L=e=>{let t=Number.parseInt(e,10);Number.isFinite(t)&&(N(t),F(e))},R=e=>{N(e),F(void 0)},z=T===0,B=()=>{if(!z){if(typeof T==`number`&&M!==null&&M>T){N(T),F(void 0);return}M===null||M<=0||y(M)}};if(_.name!==`onrampAmountEntry`)return null;let V=!z&&typeof T==`number`&&M!==null&&M>T,H=z?f(e,{id:`EzZNDI`,message:`Buy-with-card isn't available for your region`}):V&&E?f(e,{id:`GXkBas`,message:`Max {formattedLimit}`,values:{formattedLimit:E}}):void 0,U=V?x({id:`wkskq5`,message:`Use max`}):void 0,W=O?{symbol:O.receiveAsset.symbol,chainId:O.receiveAsset.chainId,address:O.receiveAsset.address,isNative:O.receiveAsset.isNative,...O.receiveAsset.assetLogoUrl?{logoUrl:O.receiveAsset.assetLogoUrl}:{}}:m,G=O?.receiveAmount.formatted??``,K=_.ctx.backTarget===`closed`?void 0:v;return f(o,{...h,formattedReceive:G,onrampReceiveToken:W,quoteLoading:k,amount:M,sendToken:{symbol:`USD`},receiveToken:W,...typeof T==`number`&&T>0?{max:T}:{},headerTitle:x({id:`kj3M8S`,message:`Deposit`}),currencySymbol:`$`,onAmountChange:R,...K?{onBack:K}:{},presets:I,...P===void 0?{}:{activePreset:P},onPresetSelect:L,...U===void 0?{}:{footerLabel:U},...z?{}:{onContinue:B},ctaDisabled:k,notice:H,children:a??p(d,{children:[f(o.Header,{}),p(o.Body,{children:[f(o.HeroLabel,{children:f(e,{id:`VAxOSg`,message:`You pay`})}),f(o.Hero,{}),f(o.Pills,{}),p(o.Details,{children:[f(o.DetailsRow,{label:f(e,{id:`hehnjM`,message:`Amount`}),children:O?O.amountUsd.formatted:``}),f(o.DetailsRow,{label:f(e,{id:`vepIdX`,message:`Crypto price`}),children:O?f(e,{id:`eUbBqz`,message:`1 {0} = {1}`,values:{0:O.receiveAsset.symbol,1:O.rate.formatted}}):``}),f(o.DetailsRow,{label:f(e,{id:`QFwptY`,message:`Processing fee`}),info:f(e,{id:`A-C4hO`,message:`The processing fee covers the cost of processing your payment through the hosted checkout provider.`}),children:O?.processingFeeUsd?`− ${O.processingFeeUsd.formatted}`:``}),f(o.DetailsRow,{label:f(e,{id:`y62Dys`,message:`Network fee`}),info:f(e,{id:`f-nEg4`,message:`The network fee is paid to miners and validators of the blockchain to make sure the transaction is processed and confirmed.`}),children:O?.networkFeeUsd?`− ${O.networkFeeUsd.formatted}`:``})]})]}),f(o.Footer,{children:f(o.Notice,{})})]})})}function g({open:e,defaultOpen:t,onOpenChange:n,trigger:r,...i}){return f(a,{open:e,defaultOpen:t,onOpenChange:n,trigger:r,children:f(h,{...i})})}(function(e){e.Dialog=g,e.HeroLabel=o.HeroLabel,e.ReceiveChip=o.ReceiveChip,e.Header=o.Header,e.Body=o.Body,e.Hero=o.Hero,e.Pills=o.Pills,e.Flow=o.Flow,e.Footer=o.Footer,e.Notice=o.Notice,e.Details=o.Details,e.DetailsRow=o.DetailsRow})(h||={});export{h as OnrampAmountEntry};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { AmountEntryBodyProps } from "../../../../../shared/widgets/amount-entry/compound/types.js";
|
|
2
|
+
import { AmountEntryHeader } from "../../../../../shared/widgets/amount-entry/compound/components/Header.js";
|
|
3
|
+
import { AmountEntryDetails, AmountEntryDetailsRow } from "../../../../../shared/widgets/amount-entry/compound/components/Details.js";
|
|
4
|
+
import { AmountEntryFlow } from "../../../../../shared/widgets/amount-entry/compound/components/Flow.js";
|
|
5
|
+
import { AmountEntryFooter } from "../../../../../shared/widgets/amount-entry/compound/components/Footer.js";
|
|
6
|
+
import { AmountEntryHero } from "../../../../../shared/widgets/amount-entry/compound/components/Hero/Hero.js";
|
|
7
|
+
import { AmountEntryNotice } from "../../../../../shared/widgets/amount-entry/compound/components/Notice.js";
|
|
8
|
+
import { AmountEntryPills } from "../../../../../shared/widgets/amount-entry/compound/components/Pills.js";
|
|
9
|
+
import { OnrampAmountEntryDialogProps, OnrampAmountEntryHeroLabelProps, OnrampAmountEntryProps } from "./types.js";
|
|
10
|
+
import { OnrampAmountEntryHeroLabel } from "./components/HeroLabel.js";
|
|
11
|
+
import { OnrampAmountEntryReceiveChip } from "./components/ReceiveChip.js";
|
|
12
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
13
|
+
|
|
14
|
+
//#region src/flows/deposit/widgets/onramp-amount-entry/compound/OnrampAmountEntry.d.ts
|
|
15
|
+
/**
|
|
16
|
+
* Root of the OnrampAmountEntry compound. Wraps the shared {@link AmountEntryCompound} and provides
|
|
17
|
+
* onramp-flow-specific context (formattedReceive, receiveToken, loading) to the onramp-flow-internal
|
|
18
|
+
* sub-parts (`HeroLabel`, `ReceiveChip`) so children render without prop-drilling from the host.
|
|
19
|
+
*
|
|
20
|
+
* Defaults the `subLine` slot to a `<OnrampAmountEntry.ReceiveChip />` when the host doesn't provide
|
|
21
|
+
* one explicitly — that's the canonical composition. Pass `subLine={…}` to override.
|
|
22
|
+
*
|
|
23
|
+
* Parts:
|
|
24
|
+
* - {@link OnrampAmountEntry.HeroLabel}
|
|
25
|
+
* - {@link OnrampAmountEntry.ReceiveChip}
|
|
26
|
+
*
|
|
27
|
+
* The AmountEntry compound parts (`Header`, `Body`, `Hero`, `Pills`, `Details`, `DetailsRow`,
|
|
28
|
+
* `Notice`, `Footer`) are re-exposed off the namespace too so consumers can compose the full tree
|
|
29
|
+
* without importing two compounds.
|
|
30
|
+
*
|
|
31
|
+
* Dialog form: {@link OnrampAmountEntry.Dialog} pre-composes the widget into a dialog shell.
|
|
32
|
+
*/
|
|
33
|
+
declare function OnrampAmountEntry(props: OnrampAmountEntryProps): _$react_jsx_runtime0.JSX.Element;
|
|
34
|
+
declare function OnrampAmountEntryDialog({
|
|
35
|
+
open,
|
|
36
|
+
defaultOpen,
|
|
37
|
+
onOpenChange,
|
|
38
|
+
trigger,
|
|
39
|
+
children,
|
|
40
|
+
...rootProps
|
|
41
|
+
}: OnrampAmountEntryDialogProps): _$react_jsx_runtime0.JSX.Element;
|
|
42
|
+
declare namespace OnrampAmountEntry {
|
|
43
|
+
type Props = OnrampAmountEntryProps;
|
|
44
|
+
type HeroLabelProps = OnrampAmountEntryHeroLabelProps;
|
|
45
|
+
type DialogProps = OnrampAmountEntryDialogProps;
|
|
46
|
+
/** Onramp-flow-specific sub-parts. */
|
|
47
|
+
const HeroLabel: typeof OnrampAmountEntryHeroLabel;
|
|
48
|
+
const ReceiveChip: typeof OnrampAmountEntryReceiveChip;
|
|
49
|
+
/** AmountEntry compound parts re-exposed for one-stop composition. */
|
|
50
|
+
const Header: typeof AmountEntryHeader;
|
|
51
|
+
const Body: (props: AmountEntryBodyProps) => _$react_jsx_runtime0.JSX.Element;
|
|
52
|
+
const Hero: typeof AmountEntryHero;
|
|
53
|
+
const Pills: typeof AmountEntryPills;
|
|
54
|
+
const Flow: typeof AmountEntryFlow;
|
|
55
|
+
const Footer: typeof AmountEntryFooter;
|
|
56
|
+
const Notice: typeof AmountEntryNotice;
|
|
57
|
+
const Details: typeof AmountEntryDetails;
|
|
58
|
+
const DetailsRow: typeof AmountEntryDetailsRow;
|
|
59
|
+
const Dialog: typeof OnrampAmountEntryDialog;
|
|
60
|
+
}
|
|
61
|
+
//#endregion
|
|
62
|
+
export { OnrampAmountEntry };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{DialogShell as e}from"../../../../../shared/dialog/DialogShell.js";import{AmountEntry as t}from"../../../../../shared/widgets/amount-entry/compound/AmountEntry.js";import"../../../../../shared/widgets/amount-entry/compound/index.js";import{OnrampAmountEntryHeroLabel as n}from"./components/HeroLabel.js";import{OnrampAmountEntryContext as r}from"./context.js";import{OnrampAmountEntryReceiveChip as i}from"./components/ReceiveChip.js";import{useMemo as a}from"react";import{jsx as o}from"react/jsx-runtime";const s=o(i,{});function c(e){let{formattedReceive:n,onrampReceiveToken:i,quoteLoading:c=!1,subLine:l,children:u,...d}=e;return o(r,{value:a(()=>({formattedReceive:n,receiveToken:i,loading:c}),[n,i,c]),children:o(t,{...d,subLine:l??s,children:u})})}function l({open:t,defaultOpen:n,onOpenChange:r,trigger:i,children:a,...s}){return o(e,{open:t,defaultOpen:n,onOpenChange:r,trigger:i,children:o(c,{...s,children:a})})}(function(e){e.HeroLabel=n,e.ReceiveChip=i,e.Header=t.Header,e.Body=t.Body,e.Hero=t.Hero,e.Pills=t.Pills,e.Flow=t.Flow,e.Footer=t.Footer,e.Notice=t.Notice,e.Details=t.Details,e.DetailsRow=t.DetailsRow,e.Dialog=l})(c||={});export{c as OnrampAmountEntry};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
//#region src/flows/deposit/widgets/onramp-amount-entry/compound/OnrampAmountEntry.slots.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* `data-stridge-slot` constants for the onramp-amount-entry widget's onramp-flow-internal sub-parts
|
|
4
|
+
* (hero label, receive chip). The amount-input chrome itself stamps the shared `AMOUNT_ENTRY_SLOTS`
|
|
5
|
+
* from `#/shared/widgets/amount-entry`; this file only covers the onramp additions.
|
|
6
|
+
*/
|
|
7
|
+
declare const ONRAMP_AMOUNT_ENTRY_SLOTS: {
|
|
8
|
+
readonly root: "onramp-amount-entry";
|
|
9
|
+
readonly heroLabel: "onramp-amount-entry-hero-label";
|
|
10
|
+
readonly receiveChip: "onramp-amount-entry-receive-chip";
|
|
11
|
+
};
|
|
12
|
+
type OnrampAmountEntrySlot = (typeof ONRAMP_AMOUNT_ENTRY_SLOTS)[keyof typeof ONRAMP_AMOUNT_ENTRY_SLOTS];
|
|
13
|
+
//#endregion
|
|
14
|
+
export { ONRAMP_AMOUNT_ENTRY_SLOTS, OnrampAmountEntrySlot };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={root:`onramp-amount-entry`,heroLabel:`onramp-amount-entry-hero-label`,receiveChip:`onramp-amount-entry-receive-chip`};export{e as ONRAMP_AMOUNT_ENTRY_SLOTS};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={heroLabelWrap:{"OnrampAmountEntry__styles.heroLabelWrap":`OnrampAmountEntry__styles.heroLabelWrap`,"display-k1xSpc":`x78zum5`,"justifyContent-kjj79g":`xl56j7k`,"paddingInlineEnd-kwRFfy":`x1o5r3ls`,"paddingInlineStart-kZCmMZ":`xz7312c`,"paddingTop-kLKAdn":`xyamay9`,$$css:`@stridge/kit:src/flows/deposit/widgets/onramp-amount-entry/compound/OnrampAmountEntry.styles.ts:12`},heroLabel:{"OnrampAmountEntry__styles.heroLabel":`OnrampAmountEntry__styles.heroLabel`,"margin-kogj98":`x1ghz6dp`,"letterSpacing-kb6lSQ":`x1labic3`,$$css:`@stridge/kit:src/flows/deposit/widgets/onramp-amount-entry/compound/OnrampAmountEntry.styles.ts:19`},receiveLine:{"OnrampAmountEntry__styles.receiveLine":`OnrampAmountEntry__styles.receiveLine`,"display-k1xSpc":`x3nfvp2`,"alignItems-kGNEyG":`x6s0dn4`,"gap-kOIVth":`x167g77z`,$$css:`@stridge/kit:src/flows/deposit/widgets/onramp-amount-entry/compound/OnrampAmountEntry.styles.ts:25`},receiveLabel:{"OnrampAmountEntry__styles.receiveLabel":`OnrampAmountEntry__styles.receiveLabel`,"margin-kogj98":`x1ghz6dp`,$$css:`@stridge/kit:src/flows/deposit/widgets/onramp-amount-entry/compound/OnrampAmountEntry.styles.ts:30`},receiveChip:{"OnrampAmountEntry__styles.receiveChip":`OnrampAmountEntry__styles.receiveChip`,"display-k1xSpc":`x3nfvp2`,"alignItems-kGNEyG":`x6s0dn4`,"gap-kOIVth":`x17d4w8g`,"paddingBlock-k8WAf4":`x12ulsxz`,"paddingInlineStart-kZCmMZ":`x25sj25`,"paddingInlineEnd-kwRFfy":`x2vl965`,"borderRadius-kaIpWk":`x1npxkrn`,"backgroundColor-kWkggS":`xvaq5cg`,"borderColor-kVAM5u":`x12c9lpl`,"borderStyle-ksu8eU":`x1y0btm7`,"borderWidth-kMzoRj":`xmkeg23`,$$css:`@stridge/kit:src/flows/deposit/widgets/onramp-amount-entry/compound/OnrampAmountEntry.styles.ts:33`},receiveChipAmount:{"OnrampAmountEntry__styles.receiveChipAmount":`OnrampAmountEntry__styles.receiveChipAmount`,"margin-kogj98":`x1ghz6dp`,$$css:`@stridge/kit:src/flows/deposit/widgets/onramp-amount-entry/compound/OnrampAmountEntry.styles.ts:46`}};export{e as styles};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { OnrampAmountEntryHeroLabelProps } from "../types.js";
|
|
2
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/flows/deposit/widgets/onramp-amount-entry/compound/components/HeroLabel.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Small uppercase label rendered above the hero band on onramp amount-entry. Mirrors the design's
|
|
7
|
+
* "YOU PAY" reading. Onramp-flow-internal — the wallet path doesn't use a hero label.
|
|
8
|
+
*/
|
|
9
|
+
declare function OnrampAmountEntryHeroLabel({
|
|
10
|
+
children
|
|
11
|
+
}: OnrampAmountEntryHeroLabelProps): _$react_jsx_runtime0.JSX.Element;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { OnrampAmountEntryHeroLabel };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{text as e}from"../../../../../../shared/ui/Text/Text.js";import"../../../../../../ui/index.js";import{ONRAMP_AMOUNT_ENTRY_SLOTS as t}from"../OnrampAmountEntry.slots.js";import{styles as n}from"../OnrampAmountEntry.styles.js";import{jsx as r}from"react/jsx-runtime";import*as i from"@stylexjs/stylex";function a({children:a}){return r(`div`,{...i.props(n.heroLabelWrap),children:r(e.span,{size:`meta`,fontWeight:`medium`,leading:`tight`,color:`subdued`,transform:`uppercase`,"data-stridge-slot":t.heroLabel,...i.props(n.heroLabel),children:a})})}export{a as OnrampAmountEntryHeroLabel};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
|
+
|
|
3
|
+
//#region src/flows/deposit/widgets/onramp-amount-entry/compound/components/ReceiveChip.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Read-only receive chip slotted into the hero's `subLine` for onramp amount-entry. Mirrors the
|
|
6
|
+
* "Receive [USDC logo] 24.21 USDC" reading. Onramp-flow-internal — the wallet path's Hero uses the
|
|
7
|
+
* swap toggle in this slot, not a static chip.
|
|
8
|
+
*
|
|
9
|
+
* Reads `formattedReceive` + `receiveToken` from context. While the quote is still resolving the
|
|
10
|
+
* chip renders a shimmer so the user sees the row is live.
|
|
11
|
+
*/
|
|
12
|
+
declare function OnrampAmountEntryReceiveChip(): _$react_jsx_runtime0.JSX.Element;
|
|
13
|
+
//#endregion
|
|
14
|
+
export { OnrampAmountEntryReceiveChip };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{Trans as e}from"../../../../../../shared/i18n/Trans.js";import"../../../../../../i18n/index.js";import{Skeleton as t}from"../../../../../../shared/ui/Skeleton/Skeleton.js";import"../../../../../../shared/ui/Skeleton/index.js";import{text as n}from"../../../../../../shared/ui/Text/Text.js";import{TokenLogo as r}from"../../../../../../shared/ui/TokenLogo/TokenLogo.js";import"../../../../../../shared/ui/TokenLogo/index.js";import"../../../../../../ui/index.js";import{ONRAMP_AMOUNT_ENTRY_SLOTS as i}from"../OnrampAmountEntry.slots.js";import{styles as a}from"../OnrampAmountEntry.styles.js";import{useOnrampAmountEntryContext as o}from"../context.js";import{jsx as s,jsxs as c}from"react/jsx-runtime";import*as l from"@stylexjs/stylex";function u(){let{formattedReceive:u,receiveToken:d,loading:f}=o(`OnrampAmountEntry.ReceiveChip`);return c(`span`,{...l.props(a.receiveLine),children:[s(n.span,{size:`sm`,leading:`tight`,color:`subdued`,...l.props(a.receiveLabel),children:s(e,{id:`lDgVWA`,message:`Receive`})}),c(`span`,{"data-stridge-slot":i.receiveChip,...l.props(a.receiveChip),children:[s(r,{size:18,symbol:d.symbol,...d.chainId===void 0?{}:{chainId:d.chainId},...d.address===void 0?{}:{address:d.address},...d.isNative===void 0?{}:{isNative:d.isNative},...d.logoUrl===void 0?{}:{logoUrl:d.logoUrl},hideChainBadge:!0}),f?s(t,{width:64,height:14}):c(n.span,{size:`sm`,fontWeight:`medium`,leading:`tight`,...l.props(a.receiveChipAmount),children:[u,` `,d.symbol]})]})]})}export{u as OnrampAmountEntryReceiveChip};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{createContext as e,use as t}from"react";const n=e(null);function r(e){let r=t(n);if(!r)throw Error(`${e} must be rendered inside <OnrampAmountEntry>.`);return r}export{n as OnrampAmountEntryContext,r as useOnrampAmountEntryContext};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { OnrampAmountEntryDialogProps, OnrampAmountEntryHeroLabelProps, OnrampAmountEntryProps } from "./types.js";
|
|
2
|
+
import { OnrampAmountEntry } from "./OnrampAmountEntry.js";
|
|
3
|
+
import { ONRAMP_AMOUNT_ENTRY_SLOTS, OnrampAmountEntrySlot } from "./OnrampAmountEntry.slots.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./OnrampAmountEntry.slots.js";import"./OnrampAmountEntry.js";
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { DialogShellControls } from "../../../../../shared/dialog/DialogShell.js";
|
|
2
|
+
import { AmountEntryProps, AmountEntryToken } from "../../../../../shared/widgets/amount-entry/compound/types.js";
|
|
3
|
+
import { ReactNode } from "react";
|
|
4
|
+
|
|
5
|
+
//#region src/flows/deposit/widgets/onramp-amount-entry/compound/types.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* Public props accepted by the {@link OnrampAmountEntry} compound root. Extends the underlying
|
|
8
|
+
* {@link AmountEntryProps} shape with onramp-flow-specific fields the orchestrated wrapper populates
|
|
9
|
+
* from the driver's `onrampQuote` entity.
|
|
10
|
+
*/
|
|
11
|
+
interface OnrampAmountEntryProps extends AmountEntryProps {
|
|
12
|
+
/** Pre-formatted receive amount (e.g. `"24.21"`). Rendered inside the ReceiveChip. */
|
|
13
|
+
formattedReceive: string;
|
|
14
|
+
/** The crypto asset the user receives. Drives the ReceiveChip's token logo + symbol. */
|
|
15
|
+
onrampReceiveToken: AmountEntryToken;
|
|
16
|
+
/** When `true`, the ReceiveChip renders a shimmer placeholder while the quote resolves. */
|
|
17
|
+
quoteLoading?: boolean;
|
|
18
|
+
}
|
|
19
|
+
/** Props for {@link OnrampAmountEntry.HeroLabel}. */
|
|
20
|
+
interface OnrampAmountEntryHeroLabelProps {
|
|
21
|
+
children: ReactNode;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Props for `<OnrampAmountEntry.Dialog>` — the dialog form of the OnrampAmountEntry widget.
|
|
25
|
+
* Combines the widget root props with the shared dialog shell controls.
|
|
26
|
+
*/
|
|
27
|
+
type OnrampAmountEntryDialogProps = OnrampAmountEntryProps & DialogShellControls;
|
|
28
|
+
//#endregion
|
|
29
|
+
export { OnrampAmountEntryDialogProps, OnrampAmountEntryHeroLabelProps, OnrampAmountEntryProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { OnrampAmountEntry } from "./OnrampAmountEntry.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./OnrampAmountEntry.js";
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { DialogShellControls } from "../../../../shared/dialog/DialogShell.js";
|
|
2
|
+
import { OnrampConfirmBody } from "./compound/components/Body.js";
|
|
3
|
+
import { OnrampConfirmHeader } from "./compound/components/Header.js";
|
|
4
|
+
import { OnrampConfirmSummary } from "./compound/components/Summary.js";
|
|
5
|
+
import { ComponentProps, ReactNode } from "react";
|
|
6
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
7
|
+
|
|
8
|
+
//#region src/flows/deposit/widgets/onramp-confirm/OnrampConfirm.d.ts
|
|
9
|
+
interface OnrampConfirmProps extends ComponentProps<"div"> {
|
|
10
|
+
/**
|
|
11
|
+
* Optional custom composition. When omitted, the canonical default composition renders —
|
|
12
|
+
* `<Header />` + `<Body>` (Summary + the "Continue to payment" CTA). Pass children to
|
|
13
|
+
* interleave your own elements or replace the composition entirely.
|
|
14
|
+
*/
|
|
15
|
+
children?: ReactNode;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Orchestrated `OnrampConfirm` widget — the confirm screen that follows `onrampAmountEntry`. Reads
|
|
19
|
+
* the amount + phase from the FSM ctx, the brand name from the driver's `brand` entity, and the
|
|
20
|
+
* priced breakdown from `onrampQuote`. The CTA dispatches `confirmOnramp()`, which the controller
|
|
21
|
+
* turns into `createOnrampSession` + a new-tab checkout redirect.
|
|
22
|
+
*
|
|
23
|
+
* Renders nothing on any other FSM state — the dialog routes the widget under
|
|
24
|
+
* `<Deposit.Step name="onrampConfirm">`.
|
|
25
|
+
*/
|
|
26
|
+
declare function OnrampConfirm({
|
|
27
|
+
children,
|
|
28
|
+
...props
|
|
29
|
+
}: OnrampConfirmProps): _$react_jsx_runtime0.JSX.Element | null;
|
|
30
|
+
declare function OnrampConfirmDialog({
|
|
31
|
+
open,
|
|
32
|
+
defaultOpen,
|
|
33
|
+
onOpenChange,
|
|
34
|
+
trigger,
|
|
35
|
+
...rootProps
|
|
36
|
+
}: OnrampConfirm.DialogProps): _$react_jsx_runtime0.JSX.Element;
|
|
37
|
+
declare namespace OnrampConfirm {
|
|
38
|
+
type Props = OnrampConfirmProps;
|
|
39
|
+
type DialogProps = OnrampConfirmProps & DialogShellControls;
|
|
40
|
+
const Dialog: typeof OnrampConfirmDialog;
|
|
41
|
+
/**
|
|
42
|
+
* Compound sub-parts aliased on the orchestrated widget so consumers can compose without
|
|
43
|
+
* importing the headless compound separately.
|
|
44
|
+
*/
|
|
45
|
+
const Header: typeof OnrampConfirmHeader;
|
|
46
|
+
const Body: typeof OnrampConfirmBody;
|
|
47
|
+
const Summary: typeof OnrampConfirmSummary;
|
|
48
|
+
}
|
|
49
|
+
//#endregion
|
|
50
|
+
export { OnrampConfirm };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{useKitI18n as e}from"../../../../shared/i18n/useKitI18n.js";import{useLingui as t}from"../../../../shared/i18n/useLingui.js";import"../../../../i18n/index.js";import{useDepositSnapshot as n}from"../../driver/context.js";import{useDepositActions as r,useDepositEffectiveState as i}from"../../orchestrator/controller.js";import{formatUsd as a}from"../../../../shared/format/formatUsd.js";import{DialogShell as o}from"../../../../shared/dialog/DialogShell.js";import{OnrampConfirm as s}from"./compound/OnrampConfirm.js";import"./compound/index.js";import{useMemo as c}from"react";import{jsx as l}from"react/jsx-runtime";const u={id:`kf83Ld`,message:`Something went wrong.`};function d({children:o,...d}){let f=n(),p=i(),{back:m,confirmOnramp:h}=r(),g=e(),{i18n:_}=t(),v=f.onrampQuote,y=v?.status===`ready`||v?.status===`stale`?v.payload:void 0,b=p.name===`onrampConfirm`?p.ctx.amount:0,x=c(()=>{if(y)return{totalUsd:a(b,g,{showSmallValueClamp:!1}),receive:y.receiveAmount.formatted,receiveSymbol:y.receiveAsset.symbol,amountUsd:y.amountUsd.formatted,rate:y.rate.formatted,...y.processingFeeUsd?{processingFee:y.processingFeeUsd.formatted}:{},...y.networkFeeUsd?{networkFee:y.networkFeeUsd.formatted}:{}}},[y,b,g]);if(p.name!==`onrampConfirm`)return null;let{phase:S}=p.ctx,C=f.brand.status===`ready`||f.brand.status===`stale`?f.brand.payload:void 0,w=S.kind===`failed`?S.failure.reason??_._(u):void 0;return l(s,{...d,phase:S,amount:b,...x?{summary:x}:{},...C?.name?{brandName:C.name}:{},...w?{failureReason:w}:{},onBack:m,onConfirm:h,children:o})}function f({open:e,defaultOpen:t,onOpenChange:n,trigger:r,...i}){return l(o,{open:e,defaultOpen:t,onOpenChange:n,trigger:r,children:l(d,{...i})})}(function(e){e.Dialog=f,e.Header=s.Header,e.Body=s.Body,e.Summary=s.Summary})(d||={});export{d as OnrampConfirm};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { OnrampConfirmBodyProps, OnrampConfirmDialogProps, OnrampConfirmHeaderProps, OnrampConfirmProps, OnrampConfirmSummaryProps } from "./types.js";
|
|
2
|
+
import { OnrampConfirmBody } from "./components/Body.js";
|
|
3
|
+
import { OnrampConfirmHeader } from "./components/Header.js";
|
|
4
|
+
import { OnrampConfirmSummary } from "./components/Summary.js";
|
|
5
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
6
|
+
|
|
7
|
+
//#region src/flows/deposit/widgets/onramp-confirm/compound/OnrampConfirm.d.ts
|
|
8
|
+
/**
|
|
9
|
+
* Onramp confirm widget — the screen that follows `onrampAmountEntry`. Renders the priced quote
|
|
10
|
+
* summary + a single "Continue to payment" CTA inside the shared frame + header. There is no in-app
|
|
11
|
+
* payment form: the CTA hands off to the provider's hosted checkout in a new tab and the FSM
|
|
12
|
+
* advances to `onrampPaymentPending`.
|
|
13
|
+
*
|
|
14
|
+
* Parts:
|
|
15
|
+
* - {@link OnrampConfirm.Header}
|
|
16
|
+
* - {@link OnrampConfirm.Body}
|
|
17
|
+
* - {@link OnrampConfirm.Summary}
|
|
18
|
+
*
|
|
19
|
+
* Dialog form: {@link OnrampConfirm.Dialog} pre-composes the widget into a dialog shell.
|
|
20
|
+
*/
|
|
21
|
+
declare function OnrampConfirm(props: OnrampConfirmProps): _$react_jsx_runtime0.JSX.Element;
|
|
22
|
+
declare function OnrampConfirmDialog({
|
|
23
|
+
open,
|
|
24
|
+
defaultOpen,
|
|
25
|
+
onOpenChange,
|
|
26
|
+
trigger,
|
|
27
|
+
children,
|
|
28
|
+
...rootProps
|
|
29
|
+
}: OnrampConfirmDialogProps): _$react_jsx_runtime0.JSX.Element;
|
|
30
|
+
declare namespace OnrampConfirm {
|
|
31
|
+
type Props = OnrampConfirmProps;
|
|
32
|
+
type HeaderProps = OnrampConfirmHeaderProps;
|
|
33
|
+
type BodyProps = OnrampConfirmBodyProps;
|
|
34
|
+
type SummaryProps = OnrampConfirmSummaryProps;
|
|
35
|
+
type DialogProps = OnrampConfirmDialogProps;
|
|
36
|
+
const Header: typeof OnrampConfirmHeader;
|
|
37
|
+
const Body: typeof OnrampConfirmBody;
|
|
38
|
+
const Summary: typeof OnrampConfirmSummary;
|
|
39
|
+
const Dialog: typeof OnrampConfirmDialog;
|
|
40
|
+
}
|
|
41
|
+
//#endregion
|
|
42
|
+
export { OnrampConfirm };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{DialogShell as e}from"../../../../../shared/dialog/DialogShell.js";import{Tooltip as t}from"../../../../../shared/ui/Tooltip/Tooltip.js";import"../../../../../shared/ui/Tooltip/index.js";import{Frame as n}from"../../../../../shared/dialog/Frame.js";import{OnrampConfirmContext as r}from"./context.js";import{ONRAMP_CONFIRM_SLOTS as i}from"./OnrampConfirm.slots.js";import{styles as a}from"./OnrampConfirm.styles.js";import{OnrampConfirmSummary as o}from"./components/Summary.js";import{OnrampConfirmBody as s}from"./components/Body.js";import{OnrampConfirmHeader as c}from"./components/Header.js";import{useMemo as l}from"react";import{Fragment as u,jsx as d,jsxs as f}from"react/jsx-runtime";import*as p from"@stylexjs/stylex";function m(e){let{phase:o,amount:s,summary:c,brandName:u,failureReason:f,onBack:m,onConfirm:g,children:_,...v}=e;return d(r,{value:l(()=>({phase:o,amount:s,...c===void 0?{}:{summary:c},...u===void 0?{}:{brandName:u},...f===void 0?{}:{failureReason:f},...m?{onBack:m}:{},...g?{onConfirm:g}:{}}),[o,s,c,u,f,m,g]),children:d(t.Provider,{children:d(n,{...v,"data-stridge-slot":i.root,...p.props(a.root),children:_??h})})})}const h=f(u,{children:[d(c,{}),d(s,{})]});function g({open:t,defaultOpen:n,onOpenChange:r,trigger:i,children:a,...o}){return d(e,{open:t,defaultOpen:n,onOpenChange:r,trigger:i,children:d(m,{...o,children:a})})}(function(e){e.Header=c,e.Body=s,e.Summary=o,e.Dialog=g})(m||={});export{m as OnrampConfirm};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
//#region src/flows/deposit/widgets/onramp-confirm/compound/OnrampConfirm.slots.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* `data-stridge-slot` constants for the onramp-confirm compound widget. Hosts target these via CSS
|
|
4
|
+
* selectors like `[data-stridge-slot="onramp-confirm-header"]` without forking the kit.
|
|
5
|
+
*/
|
|
6
|
+
declare const ONRAMP_CONFIRM_SLOTS: {
|
|
7
|
+
readonly root: "onramp-confirm";
|
|
8
|
+
readonly header: "onramp-confirm-header";
|
|
9
|
+
readonly body: "onramp-confirm-body";
|
|
10
|
+
readonly summary: "onramp-confirm-summary";
|
|
11
|
+
readonly summaryStaticRow: "onramp-confirm-summary-static-row";
|
|
12
|
+
readonly summaryRowLabel: "onramp-confirm-summary-row-label";
|
|
13
|
+
readonly summaryRowValue: "onramp-confirm-summary-row-value";
|
|
14
|
+
readonly summaryBreakdown: "onramp-confirm-summary-breakdown";
|
|
15
|
+
readonly breakdownTrigger: "onramp-confirm-breakdown-trigger";
|
|
16
|
+
readonly breakdownChevron: "onramp-confirm-breakdown-chevron";
|
|
17
|
+
readonly breakdownRow: "onramp-confirm-breakdown-row";
|
|
18
|
+
readonly breakdownRowLabel: "onramp-confirm-breakdown-row-label";
|
|
19
|
+
readonly breakdownRowValue: "onramp-confirm-breakdown-row-value";
|
|
20
|
+
readonly cta: "onramp-confirm-cta";
|
|
21
|
+
};
|
|
22
|
+
type OnrampConfirmSlot = (typeof ONRAMP_CONFIRM_SLOTS)[keyof typeof ONRAMP_CONFIRM_SLOTS];
|
|
23
|
+
//#endregion
|
|
24
|
+
export { ONRAMP_CONFIRM_SLOTS, OnrampConfirmSlot };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={root:`onramp-confirm`,header:`onramp-confirm-header`,body:`onramp-confirm-body`,summary:`onramp-confirm-summary`,summaryStaticRow:`onramp-confirm-summary-static-row`,summaryRowLabel:`onramp-confirm-summary-row-label`,summaryRowValue:`onramp-confirm-summary-row-value`,summaryBreakdown:`onramp-confirm-summary-breakdown`,breakdownTrigger:`onramp-confirm-breakdown-trigger`,breakdownChevron:`onramp-confirm-breakdown-chevron`,breakdownRow:`onramp-confirm-breakdown-row`,breakdownRowLabel:`onramp-confirm-breakdown-row-label`,breakdownRowValue:`onramp-confirm-breakdown-row-value`,cta:`onramp-confirm-cta`};export{e as ONRAMP_CONFIRM_SLOTS};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={root:{"OnrampConfirm__styles.root":`OnrampConfirm__styles.root`,"position-kVAEAm":`x1n2onr6`,"width-kzqmXN":`xh8yej3`,"maxWidth-ks0D6T":`x17fpy1y`,$$css:`@stridge/kit:src/flows/deposit/widgets/onramp-confirm/compound/OnrampConfirm.styles.ts:11`},body:{"OnrampConfirm__styles.body":`OnrampConfirm__styles.body`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`xdt5ytf`,"gap-kOIVth":`xsfdumc`,"paddingTop-kLKAdn":`xtgch2x`,"paddingBottom-kGO01o":`xpnfv0q`,"paddingInlineEnd-kwRFfy":`x1hvdk87`,"paddingInlineStart-kZCmMZ":`xmg6hw8`,$$css:`@stridge/kit:src/flows/deposit/widgets/onramp-confirm/compound/OnrampConfirm.styles.ts:18`},summary:{"OnrampConfirm__styles.summary":`OnrampConfirm__styles.summary`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`xdt5ytf`,$$css:`@stridge/kit:src/flows/deposit/widgets/onramp-confirm/compound/OnrampConfirm.styles.ts:28`},summaryStaticRow:{"OnrampConfirm__styles.summaryStaticRow":`OnrampConfirm__styles.summaryStaticRow`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`x1q0g3np`,"alignItems-kGNEyG":`x1pha0wt`,"justifyContent-kjj79g":`x1qughib`,"gap-kOIVth":`x2blr79`,"paddingBlock-k8WAf4":`x1yowcxs`,"paddingInline-kg3NbH":`xqsvw4s`,"borderBottomColor-kL6WhQ":`x2kdqbz`,"borderBottomStyle-kfdmCh":`x1q0q8m5`,"borderBottomWidth-kt9PQ7":`xso031l`,$$css:`@stridge/kit:src/flows/deposit/widgets/onramp-confirm/compound/OnrampConfirm.styles.ts:32`},summaryLabel:{"OnrampConfirm__styles.summaryLabel":`OnrampConfirm__styles.summaryLabel`,"color-kMwMTN":`x18cw6k6`,"fontWeight-k63SB2":`xi0sa8g`,"margin-kogj98":`x1ghz6dp`,$$css:`@stridge/kit:src/flows/deposit/widgets/onramp-confirm/compound/OnrampConfirm.styles.ts:44`},summaryValue:{"OnrampConfirm__styles.summaryValue":`OnrampConfirm__styles.summaryValue`,"color-kMwMTN":`x1i40r7x`,"fontWeight-k63SB2":`x1qvi77d`,"margin-kogj98":`x1ghz6dp`,"textAlign-k9WMMc":`xp4054r`,$$css:`@stridge/kit:src/flows/deposit/widgets/onramp-confirm/compound/OnrampConfirm.styles.ts:49`},breakdownTrigger:{"OnrampConfirm__styles.breakdownTrigger":`OnrampConfirm__styles.breakdownTrigger`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`x1q0g3np`,"alignItems-kGNEyG":`x6s0dn4`,"justifyContent-kjj79g":`x13a6bvl`,"gap-kOIVth":`x1r05nms`,"paddingBlock-k8WAf4":`x1yowcxs`,"paddingInline-kg3NbH":`xqsvw4s`,"width-kzqmXN":`xh8yej3`,"backgroundColor-kWkggS":`xjbqb8w`,"borderColor-kVAM5u":`x9r1u3d`,"borderStyle-ksu8eU":`x1y0btm7`,"borderWidth-kMzoRj":`xmkeg23`,"borderRadius-kaIpWk":`x2u8bby`,"color-kMwMTN":`xi96bwj`,"cursor-kkrTdU":`x1ypdohk`,"outline-kI3sdo":`x1a2a7pz`,":hover_color-kDPRdz":`xpscirx`,":focus-visible_borderColor-kOJeXU":`x1mt3fz5`,":focus-visible_boxShadow-kEtg5x":`x159teg`,$$css:`@stridge/kit:src/flows/deposit/widgets/onramp-confirm/compound/OnrampConfirm.styles.ts:55`},breakdownChevron:{"OnrampConfirm__styles.breakdownChevron":`OnrampConfirm__styles.breakdownChevron`,"width-kzqmXN":`xsmyaan`,"height-kZKoxP":`x1kpxq89`,"flexShrink-kmuXW":`x2lah0s`,"color-kMwMTN":`x15rks2t`,"strokeWidth-kfJifR":`xhxwl1`,"transitionProperty-k1ekBW":`x11xpdln`,"transitionDuration-kIyJzY":`x1vhb3u9`,"transitionTimingFunction-kAMwcw":`x1xv5090`,$$css:`@stridge/kit:src/flows/deposit/widgets/onramp-confirm/compound/OnrampConfirm.styles.ts:80`},breakdownPanel:{"OnrampConfirm__styles.breakdownPanel":`OnrampConfirm__styles.breakdownPanel`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`xdt5ytf`,"backgroundColor-kWkggS":`x407w7c`,"borderTopColor-kLZC3w":`x19bq4ie`,"borderTopStyle-kPef9Z":`x13fuv20`,"borderTopWidth-kEafiO":`x178xt8z`,"paddingBlock-k8WAf4":`xpuy6co`,"paddingInline-kg3NbH":`xqsvw4s`,$$css:`@stridge/kit:src/flows/deposit/widgets/onramp-confirm/compound/OnrampConfirm.styles.ts:90`},breakdownRow:{"OnrampConfirm__styles.breakdownRow":`OnrampConfirm__styles.breakdownRow`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`x1q0g3np`,"alignItems-kGNEyG":`x6s0dn4`,"justifyContent-kjj79g":`x1qughib`,"gap-kOIVth":`x2blr79`,"paddingBlock-k8WAf4":`xpuy6co`,$$css:`@stridge/kit:src/flows/deposit/widgets/onramp-confirm/compound/OnrampConfirm.styles.ts:100`},breakdownLabel:{"OnrampConfirm__styles.breakdownLabel":`OnrampConfirm__styles.breakdownLabel`,"color-kMwMTN":`x18cw6k6`,"fontWeight-k63SB2":`xi0sa8g`,"margin-kogj98":`x1ghz6dp`,$$css:`@stridge/kit:src/flows/deposit/widgets/onramp-confirm/compound/OnrampConfirm.styles.ts:108`},breakdownValue:{"OnrampConfirm__styles.breakdownValue":`OnrampConfirm__styles.breakdownValue`,"color-kMwMTN":`x1i40r7x`,"fontWeight-k63SB2":`x1qvi77d`,"margin-kogj98":`x1ghz6dp`,"textAlign-k9WMMc":`xp4054r`,$$css:`@stridge/kit:src/flows/deposit/widgets/onramp-confirm/compound/OnrampConfirm.styles.ts:113`},cta:{"OnrampConfirm__styles.cta":`OnrampConfirm__styles.cta`,"alignSelf-kSGwAc":`xkh2ocl`,"borderWidth-kMzoRj":`xc342km`,"cursor-kkrTdU":`x1ypdohk`,"borderRadius-kaIpWk":`x1s7mj9v`,$$css:`@stridge/kit:src/flows/deposit/widgets/onramp-confirm/compound/OnrampConfirm.styles.ts:120`},failureNotice:{"OnrampConfirm__styles.failureNotice":`OnrampConfirm__styles.failureNotice`,"color-kMwMTN":`xreodjm`,"margin-kogj98":`x1ghz6dp`,"textAlign-k9WMMc":`x2b8uid`,$$css:`@stridge/kit:src/flows/deposit/widgets/onramp-confirm/compound/OnrampConfirm.styles.ts:126`},header:{"OnrampConfirm__styles.header":`OnrampConfirm__styles.header`,"justifyContent-kjj79g":`x1qughib`,"gap-kOIVth":`x2blr79`,"paddingTop-kLKAdn":`x1h03h88`,"paddingInlineEnd-kwRFfy":`x1hvdk87`,"paddingBottom-kGO01o":`xfvigk`,"paddingInlineStart-kZCmMZ":`xiplbrm`,$$css:`@stridge/kit:src/flows/deposit/widgets/onramp-confirm/compound/OnrampConfirm.styles.ts:132`},headerLeft:{"OnrampConfirm__styles.headerLeft":`OnrampConfirm__styles.headerLeft`,"display-k1xSpc":`x78zum5`,"alignItems-kGNEyG":`x6s0dn4`,"gap-kOIVth":`x2blr79`,$$css:`@stridge/kit:src/flows/deposit/widgets/onramp-confirm/compound/OnrampConfirm.styles.ts:140`},headerTitle:{"OnrampConfirm__styles.headerTitle":`OnrampConfirm__styles.headerTitle`,"margin-kogj98":`x1ghz6dp`,$$css:`@stridge/kit:src/flows/deposit/widgets/onramp-confirm/compound/OnrampConfirm.styles.ts:145`},backIcon:{"OnrampConfirm__styles.backIcon":`OnrampConfirm__styles.backIcon`,"color-kMwMTN":`x15rks2t`,"strokeWidth-kfJifR":`xhxwl1`,$$css:`@stridge/kit:src/flows/deposit/widgets/onramp-confirm/compound/OnrampConfirm.styles.ts:148`}};export{e as styles};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { OnrampConfirmBodyProps } from "../types.js";
|
|
2
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/flows/deposit/widgets/onramp-confirm/compound/components/Body.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Card.Body wrapper for the onramp-confirm widget. When `children` is omitted, auto-renders
|
|
7
|
+
* `<Summary />` + the primary CTA so the canonical composition just works. Pass children to
|
|
8
|
+
* override. Wraps children in a slot div so the body's `gap` + `padding` apply where the children
|
|
9
|
+
* actually live (Card.Body's scroll viewport otherwise redirects them).
|
|
10
|
+
*/
|
|
11
|
+
declare function OnrampConfirmBody({
|
|
12
|
+
children,
|
|
13
|
+
...props
|
|
14
|
+
}?: OnrampConfirmBodyProps): _$react_jsx_runtime0.JSX.Element;
|
|
15
|
+
//#endregion
|
|
16
|
+
export { OnrampConfirmBody };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{Trans as e}from"../../../../../../shared/i18n/Trans.js";import"../../../../../../i18n/index.js";import{Button as t}from"../../../../../../shared/ui/Button/Button.js";import{Card as n}from"../../../../../../shared/ui/Card/Card.js";import{text as r}from"../../../../../../shared/ui/Text/Text.js";import"../../../../../../ui/index.js";import{useOnrampConfirmContext as i}from"../context.js";import{ONRAMP_CONFIRM_SLOTS as a}from"../OnrampConfirm.slots.js";import{styles as o}from"../OnrampConfirm.styles.js";import{OnrampConfirmSummary as s}from"./Summary.js";import{Fragment as c,jsx as l,jsxs as u}from"react/jsx-runtime";import*as d from"@stylexjs/stylex";function f({children:e,...t}={}){return l(n.Body,{...t,children:l(`div`,{"data-stridge-slot":a.body,...d.props(o.body),children:e??l(p,{})})})}function p(){let{phase:n,failureReason:f,onConfirm:p}=i(`OnrampConfirm.Body`),m=n.kind===`creating`,h=n.kind===`loading`;return u(c,{children:[l(s,{}),n.kind===`failed`&&f?l(r.span,{size:`sm`,leading:`normal`,...d.props(o.failureNotice),children:f}):null,l(t,{variant:`default`,size:`cta`,isLoading:m,disabled:h||m||!p,onClick:p,"data-stridge-slot":a.cta,...d.props(o.cta),children:m?l(e,{id:`9k9fRZ`,message:`Opening checkout…`}):l(e,{id:`hMqszB`,message:`Continue to payment`})})]})}export{f as OnrampConfirmBody};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { OnrampConfirmHeaderProps } from "../types.js";
|
|
2
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/flows/deposit/widgets/onramp-confirm/compound/components/Header.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Header row for the onramp confirm screen. Renders a back affordance + "Cash" title in a
|
|
7
|
+
* start-aligned cluster, with the dialog close button as the trailing element. Mirrors the other
|
|
8
|
+
* back-bearing flow headers so they share the same chrome rhythm.
|
|
9
|
+
*/
|
|
10
|
+
declare function OnrampConfirmHeader({
|
|
11
|
+
title,
|
|
12
|
+
onBack
|
|
13
|
+
}?: OnrampConfirmHeaderProps): _$react_jsx_runtime0.JSX.Element;
|
|
14
|
+
//#endregion
|
|
15
|
+
export { OnrampConfirmHeader };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{Trans as e}from"../../../../../../shared/i18n/Trans.js";import{useLingui as t}from"../../../../../../shared/i18n/useLingui.js";import"../../../../../../i18n/index.js";import{ChevronLeftIcon as n}from"../../../../../../shared/icons/ChevronLeftIcon.js";import"../../../../../../icons/index.js";import{IconButton as r}from"../../../../../../shared/ui/IconButton/IconButton.js";import{Dialog as i}from"../../../../../../shared/ui/Dialog/Dialog.js";import"../../../../../../shared/ui/Dialog/index.js";import{Card as a}from"../../../../../../shared/ui/Card/Card.js";import{text as o}from"../../../../../../shared/ui/Text/Text.js";import"../../../../../../ui/index.js";import{useOnrampConfirmContext as s}from"../context.js";import{ONRAMP_CONFIRM_SLOTS as c}from"../OnrampConfirm.slots.js";import{styles as l}from"../OnrampConfirm.styles.js";import{jsx as u,jsxs as d}from"react/jsx-runtime";import*as f from"@stylexjs/stylex";function p({title:p,onBack:m}={}){let h=s(`OnrampConfirm.Header`),{_:g}=t(),_=m===null?void 0:m??h.onBack,v=p??u(e,{id:`_rHUhS`,message:`Cash`});return d(a.Header,{"data-stridge-slot":c.header,...f.props(l.header),children:[d(`div`,{...f.props(l.headerLeft),children:[typeof _==`function`?u(r,{"aria-label":g({id:`iH8pgl`,message:`Back`}),onClick:_,children:u(n,{"aria-hidden":!0,...f.props(l.backIcon)})}):null,u(o.span,{size:`base`,fontWeight:`semibold`,leading:`tight`,tracking:`tight`,...f.props(l.headerTitle),children:v})]}),u(i.CloseButton,{})]})}export{p as OnrampConfirmHeader};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { OnrampConfirmSummaryProps } from "../types.js";
|
|
2
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/flows/deposit/widgets/onramp-confirm/compound/components/Summary.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Read-only summary card sitting above the CTA. Renders three static rows (Top up on / You receive
|
|
7
|
+
* / Total) followed by a `Collapsible` whose trigger shows "View breakdown ⌄" and whose panel
|
|
8
|
+
* reveals the quote breakdown rows. Reads the pre-formatted summary from context so the part stays
|
|
9
|
+
* render-only.
|
|
10
|
+
*/
|
|
11
|
+
declare function OnrampConfirmSummary({
|
|
12
|
+
brandName: brandNameOverride
|
|
13
|
+
}?: OnrampConfirmSummaryProps): _$react_jsx_runtime0.JSX.Element;
|
|
14
|
+
//#endregion
|
|
15
|
+
export { OnrampConfirmSummary };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{Trans as e}from"../../../../../../shared/i18n/Trans.js";import{useLingui as t}from"../../../../../../shared/i18n/useLingui.js";import"../../../../../../i18n/index.js";import{ChevronRightIcon as n}from"../../../../../../shared/icons/ChevronRightIcon.js";import"../../../../../../icons/index.js";import{Card as r}from"../../../../../../shared/ui/Card/Card.js";import{Collapsible as i}from"../../../../../../shared/ui/Collapsible/Collapsible.js";import{text as a}from"../../../../../../shared/ui/Text/Text.js";import"../../../../../../ui/index.js";import{useOnrampConfirmContext as o}from"../context.js";import{ONRAMP_CONFIRM_SLOTS as s}from"../OnrampConfirm.slots.js";import{styles as c}from"../OnrampConfirm.styles.js";import{useDirectionalChevronTransform as l}from"../../../../../../shared/dialog/useDirectionalChevronTransform.js";import{useState as u}from"react";import{jsx as d,jsxs as f}from"react/jsx-runtime";import*as p from"@stylexjs/stylex";function m({brandName:n}={}){let{_:l}=t(),{summary:m,brandName:v}=o(`OnrampConfirm.Summary`),[y,b]=u(!1),x=n??v;return f(r,{variant:`default`,"data-stridge-slot":s.summary,...p.props(c.summary),children:[d(h,{label:d(e,{id:`HalPBQ`,message:`Top up on`}),value:x??``}),d(h,{label:d(e,{id:`88cUW-`,message:`You receive`}),value:m?`${m.receive} ${m.receiveSymbol}`:``}),d(h,{label:d(e,{id:`72c5Qo`,message:`Total`}),value:m?.totalUsd??``}),f(i,{open:y,onOpenChange:b,children:[d(i.Trigger,{render:(t,{open:n})=>f(`button`,{type:`button`,"data-stridge-slot":s.breakdownTrigger,...t,children:[d(a.span,{size:`xs`,fontWeight:`medium`,leading:`tight`,color:`inherit`,children:n?d(e,{id:`t1k2Bt`,message:`Hide breakdown`}):d(e,{id:`3qkDVZ`,message:`View breakdown`})}),d(g,{open:n})]}),"aria-label":l(y?{id:`t1k2Bt`,message:`Hide breakdown`}:{id:`3qkDVZ`,message:`View breakdown`}),...p.props(c.breakdownTrigger)}),d(i.Panel,{children:f(`div`,{"data-stridge-slot":s.summaryBreakdown,...p.props(c.breakdownPanel),children:[d(_,{label:d(e,{id:`hehnjM`,message:`Amount`}),value:m?.amountUsd??``}),d(_,{label:d(e,{id:`vepIdX`,message:`Crypto price`}),value:m?d(e,{id:`eUbBqz`,message:`1 {0} = {1}`,values:{0:m.receiveSymbol,1:m.rate}}):``}),m?.processingFee?d(_,{label:d(e,{id:`QFwptY`,message:`Processing fee`}),value:`− ${m.processingFee}`}):null,m?.networkFee?d(_,{label:d(e,{id:`y62Dys`,message:`Network fee`}),value:`− ${m.networkFee}`}):null]})})]})]})}function h({label:e,value:t}){return f(`div`,{"data-stridge-slot":s.summaryStaticRow,...p.props(c.summaryStaticRow),children:[d(a.span,{size:`sm`,leading:`tight`,"data-stridge-slot":s.summaryRowLabel,...p.props(c.summaryLabel),children:e}),d(a.span,{size:`sm`,leading:`tight`,"data-stridge-slot":s.summaryRowValue,...p.props(c.summaryValue),children:t})]})}function g({open:e}){let t=l(e);return d(n,{"aria-hidden":!0,"data-stridge-slot":s.breakdownChevron,style:{transform:t},...p.props(c.breakdownChevron)})}function _({label:e,value:t}){return f(`div`,{"data-stridge-slot":s.breakdownRow,...p.props(c.breakdownRow),children:[d(a.span,{size:`xs`,leading:`tight`,"data-stridge-slot":s.breakdownRowLabel,...p.props(c.breakdownLabel),children:e}),d(a.span,{size:`xs`,leading:`tight`,"data-stridge-slot":s.breakdownRowValue,...p.props(c.breakdownValue),children:t})]})}export{m as OnrampConfirmSummary};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
|
|
3
|
+
//#region src/flows/deposit/widgets/onramp-confirm/compound/context.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Pre-formatted summary rows projected from the driver's `onrampQuote` entity. The orchestrated
|
|
6
|
+
* wrapper formats once and hands the strings to the compound so the Summary part stays render-only.
|
|
7
|
+
*/
|
|
8
|
+
interface OnrampConfirmSummary {
|
|
9
|
+
/** What the user pays end-to-end (the FSM `amount`). Renders in the static "Total" row. */
|
|
10
|
+
totalUsd: string;
|
|
11
|
+
/** Crypto the user receives after fees. Renders in the static "You receive" row + breakdown. */
|
|
12
|
+
receive: string;
|
|
13
|
+
/** Receive asset symbol (e.g. `"USDC"`). */
|
|
14
|
+
receiveSymbol: string;
|
|
15
|
+
/** Principal that converts to crypto. Renders in the breakdown "Amount" row. */
|
|
16
|
+
amountUsd: string;
|
|
17
|
+
/** Crypto-per-fiat rate string. Renders in the breakdown "Crypto price" row. */
|
|
18
|
+
rate: string;
|
|
19
|
+
/** Processing fee string (already prefixed when the wrapper formats it). */
|
|
20
|
+
processingFee?: string;
|
|
21
|
+
/** Network fee string. */
|
|
22
|
+
networkFee?: string;
|
|
23
|
+
}
|
|
24
|
+
//#endregion
|
|
25
|
+
export { OnrampConfirmSummary };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{createContext as e,use as t}from"react";const n=e(null);function r(e){let r=t(n);if(!r)throw Error(`${e} must be rendered inside <OnrampConfirm>.`);return r}export{n as OnrampConfirmContext,r as useOnrampConfirmContext};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { OnrampConfirmSummary } from "./context.js";
|
|
2
|
+
import { OnrampConfirmBodyProps, OnrampConfirmDialogProps, OnrampConfirmHeaderProps, OnrampConfirmProps, OnrampConfirmSummaryProps } from "./types.js";
|
|
3
|
+
import { OnrampConfirm } from "./OnrampConfirm.js";
|
|
4
|
+
import { ONRAMP_CONFIRM_SLOTS, OnrampConfirmSlot } from "./OnrampConfirm.slots.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./OnrampConfirm.slots.js";import"./OnrampConfirm.js";
|