@stridge/kit 0.1.0-alpha.60 → 0.1.0-alpha.62
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/KitProvider.d.ts +0 -21
- package/dist/KitProvider.js +1 -1
- package/dist/_internal/deposit/driver/index.d.ts +3 -3
- package/dist/_internal/drivers/stridge-mock/index.d.ts +3 -2
- package/dist/_internal/drivers/stridge-mock/index.js +1 -1
- package/dist/activity/compound/index.js +1 -1
- package/dist/deposit/compound/index.d.ts +21 -10
- package/dist/deposit/compound/index.js +1 -1
- package/dist/deposit/widgets/index.d.ts +6 -3
- package/dist/deposit/widgets/index.js +1 -1
- package/dist/drivers/stridge/createStridgeDepositDriver.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/createStridgeMockDriver.d.ts +28 -0
- package/dist/drivers/stridge-mock/createStridgeMockDriver.js +1 -1
- package/dist/drivers/stridge-mock/fixtures.d.ts +6 -2
- package/dist/drivers/stridge-mock/fixtures.js +1 -1
- package/dist/drivers/stridge-mock/triggers.d.ts +12 -0
- package/dist/events/emit/useDepositEmissions.js +1 -1
- package/dist/flows/deposit/dialog/DepositDialog.js +1 -1
- package/dist/flows/deposit/driver/payloads.d.ts +206 -20
- package/dist/flows/deposit/driver/types.d.ts +106 -10
- package/dist/flows/deposit/orchestrator/controller.js +1 -1
- package/dist/flows/deposit/orchestrator/index.d.ts +1 -1
- package/dist/flows/deposit/orchestrator/reducer.js +1 -1
- package/dist/flows/deposit/orchestrator/types.d.ts +202 -66
- package/dist/flows/deposit/shared/checkoutPopup.js +1 -0
- package/dist/flows/deposit/shared/onramp.js +1 -0
- package/dist/flows/deposit/shared/onrampError.js +1 -0
- package/dist/flows/deposit/widgets/amount-entry/AmountEntry.js +1 -1
- package/dist/flows/deposit/widgets/deposit/Deposit.js +1 -1
- package/dist/flows/deposit/widgets/deposit/compound/Deposit.d.ts +5 -5
- package/dist/flows/deposit/widgets/deposit/compound/components/Guards.js +1 -1
- package/dist/flows/deposit/widgets/deposit/compound/components/Methods.d.ts +1 -2
- package/dist/flows/deposit/widgets/deposit/compound/components/RailPicker.js +1 -1
- package/dist/flows/deposit/widgets/deposit/compound/types.d.ts +9 -9
- package/dist/flows/deposit/widgets/error-state/ErrorState.js +1 -1
- package/dist/flows/deposit/widgets/onramp-amount-entry/OnrampAmountEntry.d.ts +68 -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 +66 -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 +21 -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/CurrencyChip.d.ts +12 -0
- package/dist/flows/deposit/widgets/onramp-amount-entry/compound/components/CurrencyChip.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/ProviderCard.d.ts +12 -0
- package/dist/flows/deposit/widgets/onramp-amount-entry/compound/components/ProviderCard.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.d.ts +14 -0
- package/dist/flows/deposit/widgets/{cash-amount-entry → onramp-amount-entry}/compound/context.js +1 -1
- package/dist/flows/deposit/widgets/onramp-amount-entry/compound/index.d.ts +4 -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 +40 -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 +52 -0
- package/dist/flows/deposit/widgets/onramp-confirm/OnrampConfirm.js +1 -0
- package/dist/flows/deposit/widgets/onramp-confirm/compound/OnrampConfirm.d.ts +44 -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 +31 -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/Disclaimer.d.ts +21 -0
- package/dist/flows/deposit/widgets/onramp-confirm/compound/components/Disclaimer.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 +46 -0
- package/dist/flows/deposit/widgets/{cash-confirm → onramp-confirm}/compound/context.js +1 -1
- 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 +67 -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-currency-picker/OnrampCurrencyPicker.d.ts +39 -0
- package/dist/flows/deposit/widgets/onramp-currency-picker/OnrampCurrencyPicker.js +1 -0
- package/dist/flows/deposit/widgets/onramp-currency-picker/compound/OnrampCurrencyPicker.d.ts +37 -0
- package/dist/flows/deposit/widgets/onramp-currency-picker/compound/OnrampCurrencyPicker.js +1 -0
- package/dist/flows/deposit/widgets/onramp-currency-picker/compound/OnrampCurrencyPicker.slots.d.ts +17 -0
- package/dist/flows/deposit/widgets/onramp-currency-picker/compound/OnrampCurrencyPicker.slots.js +1 -0
- package/dist/flows/deposit/widgets/onramp-currency-picker/compound/OnrampCurrencyPicker.styles.js +1 -0
- package/dist/flows/deposit/widgets/onramp-currency-picker/compound/components/Body.d.ts +6 -0
- package/dist/flows/deposit/widgets/onramp-currency-picker/compound/components/Body.js +1 -0
- package/dist/flows/deposit/widgets/onramp-currency-picker/compound/components/CurrencyRow.d.ts +12 -0
- package/dist/flows/deposit/widgets/onramp-currency-picker/compound/components/CurrencyRow.js +1 -0
- package/dist/flows/deposit/widgets/onramp-currency-picker/compound/components/Empty.js +1 -0
- package/dist/flows/deposit/widgets/onramp-currency-picker/compound/components/Header.d.ts +10 -0
- package/dist/flows/deposit/widgets/onramp-currency-picker/compound/components/Header.js +1 -0
- package/dist/flows/deposit/widgets/onramp-currency-picker/compound/components/Search.d.ts +6 -0
- package/dist/flows/deposit/widgets/onramp-currency-picker/compound/components/Search.js +1 -0
- package/dist/flows/deposit/widgets/onramp-currency-picker/compound/context.js +1 -0
- package/dist/flows/deposit/widgets/onramp-currency-picker/compound/index.d.ts +3 -0
- package/dist/flows/deposit/widgets/onramp-currency-picker/compound/index.js +1 -0
- package/dist/flows/deposit/widgets/onramp-currency-picker/compound/types.d.ts +48 -0
- package/dist/flows/deposit/widgets/onramp-currency-picker/index.d.ts +1 -0
- package/dist/flows/deposit/widgets/onramp-currency-picker/index.js +1 -0
- package/dist/flows/deposit/widgets/onramp-payment-pending/OnrampPaymentPending.d.ts +50 -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 +68 -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 +17 -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/Flow.d.ts +13 -0
- package/dist/flows/deposit/widgets/onramp-payment-pending/compound/components/Flow.js +1 -0
- package/dist/flows/deposit/widgets/onramp-payment-pending/compound/components/Flow.styles.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.d.ts +32 -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 +3 -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/onramp-provider-picker/OnrampProviderPicker.d.ts +38 -0
- package/dist/flows/deposit/widgets/onramp-provider-picker/OnrampProviderPicker.js +1 -0
- package/dist/flows/deposit/widgets/onramp-provider-picker/compound/OnrampProviderPicker.d.ts +35 -0
- package/dist/flows/deposit/widgets/onramp-provider-picker/compound/OnrampProviderPicker.js +1 -0
- package/dist/flows/deposit/widgets/onramp-provider-picker/compound/OnrampProviderPicker.slots.d.ts +19 -0
- package/dist/flows/deposit/widgets/onramp-provider-picker/compound/OnrampProviderPicker.slots.js +1 -0
- package/dist/flows/deposit/widgets/onramp-provider-picker/compound/OnrampProviderPicker.styles.js +1 -0
- package/dist/flows/deposit/widgets/onramp-provider-picker/compound/components/Body.d.ts +6 -0
- package/dist/flows/deposit/widgets/onramp-provider-picker/compound/components/Body.js +1 -0
- package/dist/flows/deposit/widgets/onramp-provider-picker/compound/components/Header.d.ts +10 -0
- package/dist/flows/deposit/widgets/onramp-provider-picker/compound/components/Header.js +1 -0
- package/dist/flows/deposit/widgets/onramp-provider-picker/compound/components/ProviderRow.d.ts +15 -0
- package/dist/flows/deposit/widgets/onramp-provider-picker/compound/components/ProviderRow.js +1 -0
- package/dist/flows/deposit/widgets/onramp-provider-picker/compound/context.js +1 -0
- package/dist/flows/deposit/widgets/onramp-provider-picker/compound/index.d.ts +3 -0
- package/dist/flows/deposit/widgets/onramp-provider-picker/compound/index.js +1 -0
- package/dist/flows/deposit/widgets/onramp-provider-picker/compound/types.d.ts +50 -0
- package/dist/flows/deposit/widgets/onramp-provider-picker/index.d.ts +1 -0
- package/dist/flows/deposit/widgets/onramp-provider-picker/index.js +1 -0
- package/dist/flows/deposit/widgets/success-state/SuccessState.js +1 -1
- package/dist/flows/deposit/widgets/transfer-crypto/compound/components/QrCode.js +1 -1
- package/dist/flows/withdraw/widgets/withdraw-form/compound/components/RecipientField.js +1 -1
- package/dist/format/index.d.ts +2 -1
- package/dist/format/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 +1 -1
- package/dist/icons/index.d.ts +4 -8
- package/dist/icons/index.js +1 -1
- package/dist/index.d.ts +3 -4
- package/dist/index.js +1 -1
- package/dist/package.js +1 -1
- package/dist/shared/attribution/Attribution.js +1 -1
- package/dist/shared/attribution/Attribution.styles.js +1 -1
- package/dist/shared/dialog/Frame.js +1 -1
- package/dist/shared/format/formatFiat.d.ts +31 -0
- package/dist/shared/format/formatFiat.js +1 -0
- package/dist/shared/icons/BellIcon.d.ts +7 -0
- package/dist/shared/icons/BellIcon.js +1 -0
- package/dist/shared/icons/BitcoinIcon.d.ts +5 -8
- package/dist/shared/icons/BitcoinIcon.js +1 -1
- package/dist/shared/icons/CardIcon.d.ts +3 -3
- package/dist/shared/icons/DirhamSignIcon.d.ts +16 -0
- package/dist/shared/icons/DirhamSignIcon.js +1 -0
- package/dist/shared/icons/SearchIcon.d.ts +7 -0
- package/dist/shared/icons/SearchIcon.js +1 -0
- package/dist/shared/orchestrator/index.js +1 -1
- package/dist/shared/orchestrator/useOnrampSessionWatcher.js +1 -0
- package/dist/shared/ui/AmountInput/useAutoShrinkFontSize.js +1 -1
- package/dist/shared/ui/Checkbox/Checkbox.d.ts +47 -0
- package/dist/shared/ui/Checkbox/Checkbox.js +1 -0
- package/dist/shared/ui/Checkbox/Checkbox.slots.d.ts +12 -0
- package/dist/shared/ui/Checkbox/Checkbox.slots.js +1 -0
- package/dist/shared/ui/Checkbox/Checkbox.styles.js +1 -0
- package/dist/shared/ui/Checkbox/index.d.ts +2 -0
- package/dist/shared/ui/Checkbox/index.js +1 -0
- package/dist/shared/ui/CurrencyGlyph/CurrencyGlyph.d.ts +36 -0
- package/dist/shared/ui/CurrencyGlyph/CurrencyGlyph.js +1 -0
- package/dist/shared/ui/CurrencyGlyph/CurrencyGlyph.slots.d.ts +12 -0
- package/dist/shared/ui/CurrencyGlyph/CurrencyGlyph.slots.js +1 -0
- package/dist/shared/ui/CurrencyGlyph/CurrencyGlyph.styles.js +1 -0
- package/dist/shared/ui/CurrencyGlyph/flags.js +1 -0
- package/dist/shared/ui/CurrencyGlyph/index.d.ts +2 -0
- package/dist/shared/ui/CurrencyGlyph/index.js +1 -0
- package/dist/shared/ui/DisclosureRow/DisclosureRow.d.ts +56 -0
- package/dist/shared/ui/DisclosureRow/DisclosureRow.js +1 -0
- package/dist/shared/ui/DisclosureRow/DisclosureRow.slots.d.ts +8 -0
- package/dist/shared/ui/DisclosureRow/DisclosureRow.slots.js +1 -0
- package/dist/shared/ui/DisclosureRow/DisclosureRow.styles.js +1 -0
- package/dist/shared/ui/DisclosureRow/index.d.ts +2 -0
- package/dist/shared/ui/DisclosureRow/index.js +1 -0
- package/dist/shared/ui/FiatSymbol/FiatAmount.d.ts +32 -0
- package/dist/shared/ui/FiatSymbol/FiatAmount.js +1 -0
- package/dist/shared/ui/FiatSymbol/FiatSymbol.d.ts +30 -0
- package/dist/shared/ui/FiatSymbol/FiatSymbol.js +1 -0
- package/dist/shared/ui/FiatSymbol/index.d.ts +2 -0
- package/dist/shared/ui/FiatSymbol/index.js +1 -0
- package/dist/shared/ui/Tabs/Tabs.d.ts +2 -2
- package/dist/shared/utils/logos/resolveLogoSrc.js +1 -1
- package/dist/shared/widgets/activity/compound/ActivityDetail.js +1 -1
- package/dist/shared/widgets/amount-entry/compound/AmountEntry.js +1 -1
- package/dist/shared/widgets/amount-entry/compound/AmountEntry.styles.js +1 -1
- package/dist/shared/widgets/amount-entry/compound/components/Footer.js +1 -1
- package/dist/shared/widgets/amount-entry/compound/components/Hero/Hero.d.ts +2 -1
- package/dist/shared/widgets/amount-entry/compound/components/Hero/Hero.js +1 -1
- package/dist/shared/widgets/amount-entry/compound/components/Hero/StaticBand.js +1 -1
- package/dist/shared/widgets/amount-entry/compound/types.d.ts +16 -0
- package/dist/shared/widgets/confirm-transfer/compound/components/Breakdown.js +1 -1
- package/dist/shared/widgets/error-state/compound/ErrorState.styles.js +1 -1
- package/dist/shared/widgets/error-state/compound/components/MoreDetails.d.ts +3 -3
- package/dist/shared/widgets/error-state/compound/components/MoreDetails.js +1 -1
- package/dist/shared/widgets/success-state/compound/SuccessState.styles.js +1 -1
- package/dist/shared/widgets/success-state/compound/components/MoreDetails.d.ts +2 -3
- package/dist/shared/widgets/success-state/compound/components/MoreDetails.js +1 -1
- package/dist/stridge/StridgeProvider.d.ts +0 -10
- package/dist/stridge/StridgeProvider.js +1 -1
- package/dist/stridge/stubs.js +1 -1
- package/dist/styles/index.css +118 -40
- package/dist/types.d.ts +3 -3
- package/dist/ui/index.d.ts +9 -1
- package/dist/ui/index.js +1 -1
- package/dist/version.js +1 -1
- package/dist/withdraw/compound/index.js +1 -1
- package/package.json +1 -1
- package/dist/flows/deposit/bindings/DepositBindings.d.ts +0 -87
- package/dist/flows/deposit/bindings/DepositBindings.js +0 -1
- package/dist/flows/deposit/bindings/index.d.ts +0 -1
- package/dist/flows/deposit/bindings/index.js +0 -1
- package/dist/flows/deposit/shared/cash.d.ts +0 -20
- package/dist/flows/deposit/shared/cash.js +0 -1
- package/dist/flows/deposit/widgets/cash-amount-entry/CashAmountEntry.d.ts +0 -71
- package/dist/flows/deposit/widgets/cash-amount-entry/CashAmountEntry.js +0 -1
- package/dist/flows/deposit/widgets/cash-amount-entry/compound/CashAmountEntry.d.ts +0 -69
- package/dist/flows/deposit/widgets/cash-amount-entry/compound/CashAmountEntry.js +0 -1
- package/dist/flows/deposit/widgets/cash-amount-entry/compound/CashAmountEntry.slots.d.ts +0 -16
- package/dist/flows/deposit/widgets/cash-amount-entry/compound/CashAmountEntry.slots.js +0 -1
- package/dist/flows/deposit/widgets/cash-amount-entry/compound/CashAmountEntry.styles.js +0 -1
- package/dist/flows/deposit/widgets/cash-amount-entry/compound/components/HeroLabel.d.ts +0 -13
- package/dist/flows/deposit/widgets/cash-amount-entry/compound/components/HeroLabel.js +0 -1
- package/dist/flows/deposit/widgets/cash-amount-entry/compound/components/MethodChip.d.ts +0 -18
- package/dist/flows/deposit/widgets/cash-amount-entry/compound/components/MethodChip.js +0 -1
- package/dist/flows/deposit/widgets/cash-amount-entry/compound/components/ReceiveChip.d.ts +0 -14
- package/dist/flows/deposit/widgets/cash-amount-entry/compound/components/ReceiveChip.js +0 -1
- package/dist/flows/deposit/widgets/cash-amount-entry/compound/index.d.ts +0 -3
- package/dist/flows/deposit/widgets/cash-amount-entry/compound/index.js +0 -1
- package/dist/flows/deposit/widgets/cash-amount-entry/compound/types.d.ts +0 -42
- package/dist/flows/deposit/widgets/cash-amount-entry/index.d.ts +0 -1
- package/dist/flows/deposit/widgets/cash-amount-entry/index.js +0 -1
- package/dist/flows/deposit/widgets/cash-confirm/CashConfirm.d.ts +0 -63
- package/dist/flows/deposit/widgets/cash-confirm/CashConfirm.js +0 -1
- package/dist/flows/deposit/widgets/cash-confirm/compound/CashConfirm.d.ts +0 -54
- package/dist/flows/deposit/widgets/cash-confirm/compound/CashConfirm.js +0 -1
- package/dist/flows/deposit/widgets/cash-confirm/compound/CashConfirm.slots.d.ts +0 -33
- package/dist/flows/deposit/widgets/cash-confirm/compound/CashConfirm.slots.js +0 -1
- package/dist/flows/deposit/widgets/cash-confirm/compound/CashConfirm.styles.js +0 -1
- package/dist/flows/deposit/widgets/cash-confirm/compound/cashConfirmDimensions.js +0 -1
- package/dist/flows/deposit/widgets/cash-confirm/compound/components/ApplePayBody.d.ts +0 -15
- package/dist/flows/deposit/widgets/cash-confirm/compound/components/ApplePayBody.js +0 -1
- package/dist/flows/deposit/widgets/cash-confirm/compound/components/Body.d.ts +0 -22
- package/dist/flows/deposit/widgets/cash-confirm/compound/components/Body.js +0 -1
- package/dist/flows/deposit/widgets/cash-confirm/compound/components/BodyLabel.js +0 -1
- package/dist/flows/deposit/widgets/cash-confirm/compound/components/CardBody.d.ts +0 -16
- package/dist/flows/deposit/widgets/cash-confirm/compound/components/CardBody.js +0 -1
- package/dist/flows/deposit/widgets/cash-confirm/compound/components/CardInputRow.icons.js +0 -1
- package/dist/flows/deposit/widgets/cash-confirm/compound/components/CardInputRow.js +0 -1
- package/dist/flows/deposit/widgets/cash-confirm/compound/components/CardInputRow.keys.js +0 -1
- package/dist/flows/deposit/widgets/cash-confirm/compound/components/CardInputRow.state.js +0 -1
- package/dist/flows/deposit/widgets/cash-confirm/compound/components/CardInputRow.styles.js +0 -1
- package/dist/flows/deposit/widgets/cash-confirm/compound/components/GooglePayBody.d.ts +0 -16
- package/dist/flows/deposit/widgets/cash-confirm/compound/components/GooglePayBody.js +0 -1
- package/dist/flows/deposit/widgets/cash-confirm/compound/components/Header.d.ts +0 -21
- package/dist/flows/deposit/widgets/cash-confirm/compound/components/Header.js +0 -1
- package/dist/flows/deposit/widgets/cash-confirm/compound/components/Summary.d.ts +0 -17
- package/dist/flows/deposit/widgets/cash-confirm/compound/components/Summary.js +0 -1
- package/dist/flows/deposit/widgets/cash-confirm/compound/components/cardFormat.js +0 -1
- package/dist/flows/deposit/widgets/cash-confirm/compound/index.d.ts +0 -3
- package/dist/flows/deposit/widgets/cash-confirm/compound/index.js +0 -1
- package/dist/flows/deposit/widgets/cash-confirm/compound/types.d.ts +0 -66
- package/dist/flows/deposit/widgets/cash-confirm/index.d.ts +0 -1
- package/dist/flows/deposit/widgets/cash-confirm/index.js +0 -1
- package/dist/flows/deposit/widgets/cash-confirm/mocks.js +0 -1
- package/dist/shared/icons/AmexIcon.d.ts +0 -14
- package/dist/shared/icons/AmexIcon.js +0 -1
- package/dist/shared/icons/ApplePayIcon.d.ts +0 -15
- package/dist/shared/icons/ApplePayIcon.js +0 -1
- package/dist/shared/icons/CashIcon.d.ts +0 -16
- package/dist/shared/icons/CashIcon.js +0 -1
- package/dist/shared/icons/DiscoverIcon.d.ts +0 -14
- package/dist/shared/icons/DiscoverIcon.js +0 -1
- package/dist/shared/icons/GooglePayIcon.d.ts +0 -15
- package/dist/shared/icons/GooglePayIcon.js +0 -1
- package/dist/shared/icons/MastercardIcon.d.ts +0 -16
- package/dist/shared/icons/MastercardIcon.js +0 -1
- package/dist/shared/icons/VisaIcon.d.ts +0 -15
- package/dist/shared/icons/VisaIcon.js +0 -1
|
@@ -14,8 +14,7 @@ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
|
14
14
|
* - **Sectioned**: when at least one `<Deposit.MethodSection>` child is
|
|
15
15
|
* detected, the outer label and tile-group are skipped — each section
|
|
16
16
|
* owns its own label and roving-focus group so arrow-key navigation
|
|
17
|
-
* stays contained inside a single section (the
|
|
18
|
-
* cash picker shape).
|
|
17
|
+
* stays contained inside a single section (the sectioned picker shape).
|
|
19
18
|
*
|
|
20
19
|
* No `value` is supplied to the tile group — each row's click navigates to
|
|
21
20
|
* the next step rather than toggling a pressed state, so the group is purely
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{StepTransition as e}from"../../../../../../shared/dialog/StepTransition.js";import{Tabs as t}from"../../../../../../shared/ui/Tabs/Tabs.js";import"../../../../../../shared/ui/Tabs/index.js";import{DEPOSIT_SLOTS as n}from"../Deposit.slots.js";import{styles as r}from"../Deposit.styles.js";import{DepositRail as i}from"./Rail.js";import{Children as a,isValidElement as o,useId as s,useMemo as c,useState as l}from"react";import{jsx as u,jsxs as d}from"react/jsx-runtime";import*as f from"@stylexjs/stylex";function p(e,t){let n=null;return a.forEach(e,e=>{n===null&&o(e)&&e.type===i&&e.props.value===t&&(n=e.props.children)}),n}function m(e){return e.rails.length===0?null:u(h,{...e})}m.displayName=`Deposit.RailPicker`;function h({defaultValue:i,value:a,onValueChange:o,rails:m,variant:h=`default`,children:g}){let[_]=m;if(!_)return null;let[v,y]=l(i??_.value),b=a!==void 0,x=b?a:v,S=s(),C=e=>{e!==`crypto`&&e!==`
|
|
1
|
+
"use client";import{StepTransition as e}from"../../../../../../shared/dialog/StepTransition.js";import{Tabs as t}from"../../../../../../shared/ui/Tabs/Tabs.js";import"../../../../../../shared/ui/Tabs/index.js";import{DEPOSIT_SLOTS as n}from"../Deposit.slots.js";import{styles as r}from"../Deposit.styles.js";import{DepositRail as i}from"./Rail.js";import{Children as a,isValidElement as o,useId as s,useMemo as c,useState as l}from"react";import{jsx as u,jsxs as d}from"react/jsx-runtime";import*as f from"@stylexjs/stylex";function p(e,t){let n=null;return a.forEach(e,e=>{n===null&&o(e)&&e.type===i&&e.props.value===t&&(n=e.props.children)}),n}function m(e){return e.rails.length===0?null:u(h,{...e})}m.displayName=`Deposit.RailPicker`;function h({defaultValue:i,value:a,onValueChange:o,rails:m,variant:h=`default`,children:g}){let[_]=m;if(!_)return null;let[v,y]=l(i??_.value),b=a!==void 0,x=b?a:v,S=s(),C=e=>{e!==`crypto`&&e!==`onramp`||(b||y(e),o?.(e))},w=c(()=>p(g,x),[g,x]);return d(t.Root,{"data-stridge-slot":n.railPicker,value:x,onValueChange:C,...f.props(r.railPicker),children:[u(`div`,{...f.props(r.railList),children:d(t.List,{"data-stridge-slot":n.railList,variant:h,...f.props(r.railListInner),children:[m.map(e=>u(t.Tab,{id:`${S}-${e.value}`,"data-stridge-slot":n.railTab,"data-rail":e.value,value:e.value,disabled:e.disabled,render:(t,n)=>d(`button`,{type:`button`,...t,children:[e.icon?u(`span`,{"data-active":n.active?``:void 0,...f.props(r.railTabBadge),children:e.icon}):null,e.label]})},e.value)),u(t.Indicator,{})]})}),u(e,{stateKey:x,children:u(`div`,{role:`tabpanel`,"aria-labelledby":`${S}-${x}`,"data-stridge-slot":n.rail,"data-rail":x,children:w})})]})}export{m as DepositRailPicker};
|
|
@@ -29,7 +29,7 @@ interface DepositMethodOption {
|
|
|
29
29
|
* default) renders the first segment at `medium` weight with full-foreground
|
|
30
30
|
* colour and subdues the rest — the wallet and transfer-crypto tiles.
|
|
31
31
|
* `"uniform"` renders every segment at `medium` weight with subdued colour —
|
|
32
|
-
* the
|
|
32
|
+
* the onramp method tile. Ignored when `meta` is a single node.
|
|
33
33
|
*/
|
|
34
34
|
metaEmphasis?: "lead" | "uniform";
|
|
35
35
|
/** Icon rendered inside the 36×36 slot on the left of the row. */
|
|
@@ -139,9 +139,9 @@ interface DepositMethodProps extends DepositMethodOption {
|
|
|
139
139
|
}
|
|
140
140
|
/**
|
|
141
141
|
* Method section part props. A `<Deposit.MethodSection>` is a labelled cluster
|
|
142
|
-
* of methods within a single rail —
|
|
143
|
-
*
|
|
144
|
-
*
|
|
142
|
+
* of methods within a single rail — used to partition a rail's methods into
|
|
143
|
+
* named groups ("Most popular" / "Other options"). Sections live in the JSX
|
|
144
|
+
* composition rather than on the method
|
|
145
145
|
* data shape, so moving a method between sections, swapping a label per
|
|
146
146
|
* locale, or dropping a section entirely never touches `DepositMethodInput`
|
|
147
147
|
* or the orchestrator. Each section owns its own roving-focus
|
|
@@ -166,15 +166,15 @@ interface DepositMethodSectionProps {
|
|
|
166
166
|
/**
|
|
167
167
|
* Payment rail discriminator. The first-step picker is partitioned by rail,
|
|
168
168
|
* then by method within the active rail. Crypto rail hosts the existing
|
|
169
|
-
* wallet / transfer methods;
|
|
170
|
-
*
|
|
169
|
+
* wallet / transfer methods; the onramp rail hosts the single "Cash"
|
|
170
|
+
* method.
|
|
171
171
|
*
|
|
172
172
|
* Lives in the compound layer while it is UI-only. Promotes to
|
|
173
173
|
* `orchestrator/types.ts` the first time the FSM needs to branch on rail
|
|
174
|
-
* (e.g. when
|
|
174
|
+
* (e.g. when the onramp method dispatches a different reducer event than
|
|
175
175
|
* `selectMethod`).
|
|
176
176
|
*/
|
|
177
|
-
type DepositRail = "crypto" | "
|
|
177
|
+
type DepositRail = "crypto" | "onramp";
|
|
178
178
|
/**
|
|
179
179
|
* A single rail tab — the label rendered in the `Deposit.RailPicker` tab
|
|
180
180
|
* strip plus the value that maps to a `Deposit.Rail` panel.
|
|
@@ -209,7 +209,7 @@ interface DepositRailPickerProps {
|
|
|
209
209
|
onValueChange?: (rail: DepositRail) => void;
|
|
210
210
|
/**
|
|
211
211
|
* Rail tabs rendered in the strip. Order in the array determines visual order.
|
|
212
|
-
* The kit ships `crypto` and `
|
|
212
|
+
* The kit ships `crypto` and `onramp` today; consumers pick the subset they want
|
|
213
213
|
* to surface based on host capabilities.
|
|
214
214
|
*/
|
|
215
215
|
rails: readonly DepositRailDescriptor[];
|
|
@@ -1 +1 @@
|
|
|
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{
|
|
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{FiatAmount as o}from"../../../../shared/ui/FiatSymbol/FiatAmount.js";import"../../../../shared/ui/FiatSymbol/index.js";import{ErrorState as s}from"../../../../shared/widgets/error-state/compound/ErrorState.js";import"../../../../shared/widgets/error-state/compound/index.js";import{toAssetDescriptor as c}from"../../../../shared/widgets/asset-descriptor.js";import{Fragment as l,jsx as u,jsxs as d}from"react/jsx-runtime";const f={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 p(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=f[r];return{headline:t._(i.headline),reason:t._(i.reason)}}function m({children:a,...f}){let m=n(),h=i(),{tryAgain:g}=r(),{_,i18n:v}=e(),y=t();if(h.name!==`error`)return null;if(h.ctx.sessionId!==void 0){let e=m.onrampSession,t=e?.status===`ready`||e?.status===`stale`?e.payload:void 0,n=m.onrampQuote,r=n?.status===`ready`||n?.status===`stale`?n.payload:void 0,{headline:i,reason:y}=p(t?.failureCode??h.ctx.failure?.code,v),b=t?.fiatAmount?.formatted??r?.amountFiat.formatted,x=t?.fiatAmount?.value??r?.amountFiat.value,S=t?.fiatCurrency??r?.fiatCurrency,C=x!==void 0&&S?u(o,{value:x,currency:S,locale:v.locale}):b,w=t?.receiveAmount?.formatted??r?.receiveAmount.formatted,T=r?.receiveAsset.symbol??t?.depositAsset,E=r?c({symbol:r.receiveAsset.symbol,chainId:r.receiveAsset.chainId,address:r.receiveAsset.address,isNative:r.receiveAsset.isNative,...r.receiveAsset.assetLogoUrl?{assetLogoUrl:r.receiveAsset.assetLogoUrl}:{}})??(T?{symbol:T}:void 0):T?{symbol:T}:void 0,D=t?.providerOrderId,O=!!(b||w||D);return u(s,{...f,headline:i,reason:y,...w?{receiveAmount:w}:{},...E?{receiveAsset:E}:{},onTryAgain:g,children:a??d(l,{children:[u(s.Header,{}),d(s.Body,{children:[u(s.Hero,{}),O?d(s.Details,{children:[b?u(s.Detail,{label:_({id:`VAxOSg`,message:`You pay`}),value:C}):null,w?u(s.YouReceiveRow,{}):null,D?u(s.Detail,{label:_({id:`oI_hGR`,message:`Order ID`}),value:D}):null]}):null]}),u(s.Actions,{})]})})}let b=m.settlement,x=b.status===`ready`&&b.payload.kind===`failed`?b.payload:void 0,S=h.name===`error`?h.ctx.failure:void 0,C=_({id:`i-4Fbp`,message:`Deposit failed`}),w=x?y(x.failureKind):S?.reason;if(!x)return u(s,{...f,headline:C,...w?{reason:w}:{},onTryAgain:g,children:a??d(l,{children:[u(s.Header,{}),u(s.Body,{children:u(s.Hero,{})}),u(s.Actions,{})]})});let T=x,E={...T.sourceWallet.name===void 0?{}:{name:T.sourceWallet.name},address:T.sourceWallet.address.formatted,...T.sourceWallet.explorerUrl?{explorerUrl:T.sourceWallet.explorerUrl}:{}},D={...T.destination.name===void 0?{}:{name:T.destination.name},address:T.destination.address.formatted},O=c(T.creditedAsset)??{symbol:T.creditedAsset.symbol},k={hash:T.txHash.formatted,...T.txExplorerUrl?{explorerUrl:T.txExplorerUrl}:{}};return u(s,{...f,headline:C,...w?{reason:w}:{},sourceWallet:E,destination:D,receiveAmount:T.receiveAmount.formatted,receiveAsset:O,depositTx:k,submittedAt:T.submittedAt.formatted,failedAt:T.failedAt.formatted,onTryAgain:g,children:a??d(l,{children:[u(s.Header,{}),d(s.Body,{children:[u(s.Hero,{}),d(s.Details,{children:[u(s.FillStatusRow,{}),u(s.SourceRow,{}),u(s.DestinationRow,{}),u(s.YouReceiveRow,{}),d(s.MoreDetails,{children:[u(s.DepositTxRow,{}),u(s.SubmittedAtRow,{}),u(s.FailedAtRow,{})]})]}),u(s.HelpInfo,{})]}),u(s.Actions,{})]})})}function h({open:e,defaultOpen:t,onOpenChange:n,trigger:r,...i}){return u(a,{open:e,defaultOpen:t,onOpenChange:n,trigger:r,children:u(m,{...i})})}(function(e){e.Dialog=h,e.Header=s.Header,e.Body=s.Body,e.Hero=s.Hero,e.Details=s.Details,e.FillStatusRow=s.FillStatusRow,e.SourceRow=s.SourceRow,e.DestinationRow=s.DestinationRow,e.YouReceiveRow=s.YouReceiveRow,e.MoreDetails=s.MoreDetails,e.DepositTxRow=s.DepositTxRow,e.SubmittedAtRow=s.SubmittedAtRow,e.FailedAtRow=s.FailedAtRow,e.HelpInfo=s.HelpInfo,e.Actions=s.Actions})(m||={});export{m as ErrorState};
|
|
@@ -0,0 +1,68 @@
|
|
|
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 { OnrampAmountEntryCurrencyChip } from "./compound/components/CurrencyChip.js";
|
|
11
|
+
import { OnrampAmountEntryHeroLabel } from "./compound/components/HeroLabel.js";
|
|
12
|
+
import { OnrampAmountEntryProviderCard } from "./compound/components/ProviderCard.js";
|
|
13
|
+
import { OnrampAmountEntryReceiveChip } from "./compound/components/ReceiveChip.js";
|
|
14
|
+
import { ComponentProps, ReactNode } from "react";
|
|
15
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
16
|
+
|
|
17
|
+
//#region src/flows/deposit/widgets/onramp-amount-entry/OnrampAmountEntry.d.ts
|
|
18
|
+
interface OnrampAmountEntryOwnProps {
|
|
19
|
+
/**
|
|
20
|
+
* Optional custom composition. When omitted, the canonical default composition renders —
|
|
21
|
+
* `<Header />` + `<Body>` with the currency chip, YOU PAY label, Hero (Receive chip subLine),
|
|
22
|
+
* currency-aware Pills, and the Provider card + `<Footer />`. The full fee breakdown lives on the
|
|
23
|
+
* confirm step, so it is intentionally omitted here.
|
|
24
|
+
*/
|
|
25
|
+
children?: ReactNode;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Orchestrated `OnrampAmountEntry` widget — the screen between the "Cash" rail and the onramp
|
|
29
|
+
* confirm screen. Reads the entered fiat amount + selected currency from the FSM's
|
|
30
|
+
* `onrampAmountEntry.ctx`, the limit from `onrampMethods`, the live breakdown from `onrampQuote`, and
|
|
31
|
+
* the currency / provider catalogs from `onrampCurrencies` / `onrampProviders`. Renders nothing on
|
|
32
|
+
* any other FSM state.
|
|
33
|
+
*/
|
|
34
|
+
declare function OnrampAmountEntry({
|
|
35
|
+
children,
|
|
36
|
+
...props
|
|
37
|
+
}: ComponentProps<"div"> & OnrampAmountEntryOwnProps): _$react_jsx_runtime0.JSX.Element | null;
|
|
38
|
+
declare function OnrampAmountEntryDialog({
|
|
39
|
+
open,
|
|
40
|
+
defaultOpen,
|
|
41
|
+
onOpenChange,
|
|
42
|
+
trigger,
|
|
43
|
+
...rootProps
|
|
44
|
+
}: OnrampAmountEntry.DialogProps): _$react_jsx_runtime0.JSX.Element;
|
|
45
|
+
declare namespace OnrampAmountEntry {
|
|
46
|
+
type Props = ComponentProps<"div"> & OnrampAmountEntryOwnProps;
|
|
47
|
+
type DialogProps = Props & DialogShellControls;
|
|
48
|
+
const Dialog: typeof OnrampAmountEntryDialog;
|
|
49
|
+
/**
|
|
50
|
+
* Compound sub-parts aliased on the orchestrated widget so consumers can compose without
|
|
51
|
+
* importing the headless compound separately.
|
|
52
|
+
*/
|
|
53
|
+
const HeroLabel: typeof OnrampAmountEntryHeroLabel;
|
|
54
|
+
const ReceiveChip: typeof OnrampAmountEntryReceiveChip;
|
|
55
|
+
const CurrencyChip: typeof OnrampAmountEntryCurrencyChip;
|
|
56
|
+
const ProviderCard: typeof OnrampAmountEntryProviderCard;
|
|
57
|
+
const Header: typeof AmountEntryHeader;
|
|
58
|
+
const Body: (props: AmountEntryBodyProps) => _$react_jsx_runtime0.JSX.Element;
|
|
59
|
+
const Hero: typeof AmountEntryHero;
|
|
60
|
+
const Pills: typeof AmountEntryPills;
|
|
61
|
+
const Flow: typeof AmountEntryFlow;
|
|
62
|
+
const Footer: typeof AmountEntryFooter;
|
|
63
|
+
const Notice: typeof AmountEntryNotice;
|
|
64
|
+
const Details: typeof AmountEntryDetails;
|
|
65
|
+
const DetailsRow: typeof AmountEntryDetailsRow;
|
|
66
|
+
}
|
|
67
|
+
//#endregion
|
|
68
|
+
export { OnrampAmountEntry };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{useOptionalKitStorage as e}from"../../../../storage/context.js";import"../../../../storage/index.js";import{Trans as t}from"../../../../shared/i18n/Trans.js";import{useLingui as n}from"../../../../shared/i18n/useLingui.js";import"../../../../i18n/index.js";import{useDepositSnapshot as r}from"../../driver/context.js";import{useDepositActions as i,useDepositEffectiveState as ee}from"../../orchestrator/controller.js";import{resolveOnrampPresets as te}from"../../shared/onramp.js";import{DialogShell as a}from"../../../../shared/dialog/DialogShell.js";import{OnrampAmountEntry as o}from"./compound/OnrampAmountEntry.js";import"./compound/index.js";import{resolveOnrampErrorMessage as ne}from"../../shared/onrampError.js";import{useEffect as s,useMemo as c,useRef as re,useState as l}from"react";import{Fragment as u,jsx as d,jsxs as f}from"react/jsx-runtime";const ie={symbol:`USDC`,chainId:1,address:`0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48`};function ae(e,t){try{return new Intl.NumberFormat(t,{style:`currency`,currency:e,currencyDisplay:`narrowSymbol`}).formatToParts(0).find(e=>e.type===`currency`)?.value??e}catch{return e}}function p(e,t){try{return new Intl.NumberFormat(t,{style:`currency`,currency:e}).resolvedOptions().maximumFractionDigits??2}catch{return 2}}function m({children:a,...m}){let h=r(),g=ee(),{back:oe,confirmOnrampAmount:se,setOnrampAmount:_,openOnrampCurrencyPicker:ce,openOnrampProviderPicker:le,selectOnrampCurrency:v}=i(),{_:y,i18n:b}=n(),ue=e(),x=g.name===`onrampAmountEntry`,S=x?g.ctx.amount:void 0,C=x?g.ctx.currency:void 0,w=h.onrampMethods,T=w?.status===`ready`||w?.status===`stale`?w.payload:void 0,E=T?.limit?.value,D=T?.limit?.formatted,O=h.onrampQuote,k=O?.status===`ready`||O?.status===`stale`?O.payload:void 0,A=O==null||O.status===`idle`||O.status===`loading`,j=O?.status===`error`?ne(O.error,b):void 0,M=h.onrampCurrencies,N=M?.status===`ready`||M?.status===`stale`,de=N?M.payload.suggested:void 0,P=ue?.get(`deposit.last-currency`)??void 0??de,F=C??P??`USD`,I=(N?M.payload.currencies.find(e=>e.code===F):void 0)?.symbol??k?.fiatSymbol??ae(F,b.locale),fe=p(F,b.locale);s(()=>{x&&C===void 0&&P!==void 0&&v(P)},[x,C,P,v]);let L=c(()=>{let e=te(F),t=typeof E==`number`?e.filter(e=>e.value<=E):e;return t.length>0?t:typeof E==`number`&&D?[{value:E,label:D}]:e},[F,E,D]),R=L[0]?.value??0,z=S??R,[B,V]=l(z),[H,U]=l(()=>{let e=L.find(e=>e.value===z);return e?String(e.value):void 0}),pe=c(()=>L.map(e=>({value:String(e.value),label:e.label})),[L]),W=re(F);s(()=>{W.current!==F&&(W.current=F,V(R),U(R?String(R):void 0))},[F,R]),s(()=>{_(B)},[B,_]);let me=e=>{let t=Number(e);Number.isFinite(t)&&(V(t),U(e))},he=e=>{V(e),U(void 0)},G=E===0,ge=()=>{if(!G){if(typeof E==`number`&&B!==null&&B>E){V(E),U(void 0);return}B===null||B<=0||se(B)}},K=h.onrampProviders,q=K?.status===`ready`||K?.status===`stale`?K.payload.providers.find(e=>e.id===K.payload.activeId):void 0,J=c(()=>{if(q)return{name:q.name,...q.logoUrl===void 0?{}:{logoUrl:q.logoUrl},...q.note===void 0?{}:{note:q.note},...T?.processingTime?.formatted?{deliveryTime:T.processingTime.formatted}:{}}},[q,T]);if(!x)return null;let Y=!G&&typeof E==`number`&&B!==null&&B>E,X=(()=>{if(G)return d(t,{id:`EzZNDI`,message:`Buy-with-card isn't available for your region`});if(Y&&D)return d(t,{id:`GXkBas`,message:`Max {formattedLimit}`,values:{formattedLimit:D}});if(j)return j})(),Z=Y?y({id:`wkskq5`,message:`Use max`}):void 0,Q=k?{symbol:k.receiveAsset.symbol,chainId:k.receiveAsset.chainId,address:k.receiveAsset.address,isNative:k.receiveAsset.isNative,...k.receiveAsset.assetLogoUrl?{logoUrl:k.receiveAsset.assetLogoUrl}:{}}:ie,_e=k?.receiveAmount.formatted??``,$=g.ctx.backTarget===`closed`?void 0:oe;return d(o,{...m,formattedReceive:_e,onrampReceiveToken:Q,quoteLoading:A,amount:B,sendToken:{symbol:F},receiveToken:Q,...typeof E==`number`&&E>0?{max:E}:{},headerTitle:y({id:`WE9GC7`,message:`Deposit Cash`}),currencySymbol:I,format:{useGrouping:!0,maximumFractionDigits:fe},currencyCode:F,currencyGlyphSymbol:I,onOpenCurrencyPicker:ce,...J?{provider:J}:{},onOpenProviderPicker:le,onAmountChange:he,...$?{onBack:$}:{},presets:pe,...H===void 0?{}:{activePreset:H},onPresetSelect:me,...Z===void 0?{}:{footerLabel:Z},...G?{}:{onContinue:ge},ctaDisabled:A||!Y&&j!==void 0,notice:X,children:a??f(u,{children:[d(o.Header,{}),f(o.Body,{children:[d(o.CurrencyChip,{}),d(o.HeroLabel,{children:d(t,{id:`VAxOSg`,message:`You pay`})}),d(o.Hero,{compact:!0}),d(o.Pills,{}),d(o.ProviderCard,{})]}),d(o.Footer,{children:d(o.Notice,{})})]})})}function h({open:e,defaultOpen:t,onOpenChange:n,trigger:r,...i}){return d(a,{open:e,defaultOpen:t,onOpenChange:n,trigger:r,children:d(m,{...i})})}(function(e){e.Dialog=h,e.HeroLabel=o.HeroLabel,e.ReceiveChip=o.ReceiveChip,e.CurrencyChip=o.CurrencyChip,e.ProviderCard=o.ProviderCard,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})(m||={});export{m as OnrampAmountEntry};
|
|
@@ -0,0 +1,66 @@
|
|
|
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 { OnrampAmountEntryCurrencyChip } from "./components/CurrencyChip.js";
|
|
10
|
+
import { OnrampAmountEntryDialogProps, OnrampAmountEntryHeroLabelProps, OnrampAmountEntryProps } from "./types.js";
|
|
11
|
+
import { OnrampAmountEntryHeroLabel } from "./components/HeroLabel.js";
|
|
12
|
+
import { OnrampAmountEntryProviderCard } from "./components/ProviderCard.js";
|
|
13
|
+
import { OnrampAmountEntryReceiveChip } from "./components/ReceiveChip.js";
|
|
14
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
15
|
+
|
|
16
|
+
//#region src/flows/deposit/widgets/onramp-amount-entry/compound/OnrampAmountEntry.d.ts
|
|
17
|
+
/**
|
|
18
|
+
* Root of the OnrampAmountEntry compound. Wraps the shared {@link AmountEntryCompound} and provides
|
|
19
|
+
* onramp-flow-specific context (formattedReceive, receiveToken, loading) to the onramp-flow-internal
|
|
20
|
+
* sub-parts (`HeroLabel`, `ReceiveChip`) so children render without prop-drilling from the host.
|
|
21
|
+
*
|
|
22
|
+
* Defaults the `subLine` slot to a `<OnrampAmountEntry.ReceiveChip />` when the host doesn't provide
|
|
23
|
+
* one explicitly — that's the canonical composition. Pass `subLine={…}` to override.
|
|
24
|
+
*
|
|
25
|
+
* Parts:
|
|
26
|
+
* - {@link OnrampAmountEntry.HeroLabel}
|
|
27
|
+
* - {@link OnrampAmountEntry.ReceiveChip}
|
|
28
|
+
*
|
|
29
|
+
* The AmountEntry compound parts (`Header`, `Body`, `Hero`, `Pills`, `Details`, `DetailsRow`,
|
|
30
|
+
* `Notice`, `Footer`) are re-exposed off the namespace too so consumers can compose the full tree
|
|
31
|
+
* without importing two compounds.
|
|
32
|
+
*
|
|
33
|
+
* Dialog form: {@link OnrampAmountEntry.Dialog} pre-composes the widget into a dialog shell.
|
|
34
|
+
*/
|
|
35
|
+
declare function OnrampAmountEntry(props: OnrampAmountEntryProps): _$react_jsx_runtime0.JSX.Element;
|
|
36
|
+
declare function OnrampAmountEntryDialog({
|
|
37
|
+
open,
|
|
38
|
+
defaultOpen,
|
|
39
|
+
onOpenChange,
|
|
40
|
+
trigger,
|
|
41
|
+
children,
|
|
42
|
+
...rootProps
|
|
43
|
+
}: OnrampAmountEntryDialogProps): _$react_jsx_runtime0.JSX.Element;
|
|
44
|
+
declare namespace OnrampAmountEntry {
|
|
45
|
+
type Props = OnrampAmountEntryProps;
|
|
46
|
+
type HeroLabelProps = OnrampAmountEntryHeroLabelProps;
|
|
47
|
+
type DialogProps = OnrampAmountEntryDialogProps;
|
|
48
|
+
/** Onramp-flow-specific sub-parts. */
|
|
49
|
+
const HeroLabel: typeof OnrampAmountEntryHeroLabel;
|
|
50
|
+
const ReceiveChip: typeof OnrampAmountEntryReceiveChip;
|
|
51
|
+
const CurrencyChip: typeof OnrampAmountEntryCurrencyChip;
|
|
52
|
+
const ProviderCard: typeof OnrampAmountEntryProviderCard;
|
|
53
|
+
/** AmountEntry compound parts re-exposed for one-stop composition. */
|
|
54
|
+
const Header: typeof AmountEntryHeader;
|
|
55
|
+
const Body: (props: AmountEntryBodyProps) => _$react_jsx_runtime0.JSX.Element;
|
|
56
|
+
const Hero: typeof AmountEntryHero;
|
|
57
|
+
const Pills: typeof AmountEntryPills;
|
|
58
|
+
const Flow: typeof AmountEntryFlow;
|
|
59
|
+
const Footer: typeof AmountEntryFooter;
|
|
60
|
+
const Notice: typeof AmountEntryNotice;
|
|
61
|
+
const Details: typeof AmountEntryDetails;
|
|
62
|
+
const DetailsRow: typeof AmountEntryDetailsRow;
|
|
63
|
+
const Dialog: typeof OnrampAmountEntryDialog;
|
|
64
|
+
}
|
|
65
|
+
//#endregion
|
|
66
|
+
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{OnrampAmountEntryContext as n}from"./context.js";import{OnrampAmountEntryCurrencyChip as r}from"./components/CurrencyChip.js";import{OnrampAmountEntryHeroLabel as i}from"./components/HeroLabel.js";import{OnrampAmountEntryProviderCard as a}from"./components/ProviderCard.js";import{OnrampAmountEntryReceiveChip as o}from"./components/ReceiveChip.js";import{useMemo as s}from"react";import{jsx as c}from"react/jsx-runtime";const l=c(o,{});function u(e){let{formattedReceive:r,onrampReceiveToken:i,quoteLoading:a=!1,currencyCode:o,currencyGlyphSymbol:u,onOpenCurrencyPicker:d,provider:f,onOpenProviderPicker:p,subLine:m,children:h,...g}=e;return c(n,{value:s(()=>({formattedReceive:r,receiveToken:i,loading:a,...o===void 0?{}:{currencyCode:o},...u===void 0?{}:{currencyGlyphSymbol:u},...d?{onOpenCurrencyPicker:d}:{},...f===void 0?{}:{provider:f},...p?{onOpenProviderPicker:p}:{}}),[r,i,a,o,u,d,f,p]),children:c(t,{...g,...o===void 0?{}:{currencyCode:o},subLine:m??l,children:h})})}function d({open:t,defaultOpen:n,onOpenChange:r,trigger:i,children:a,...o}){return c(e,{open:t,defaultOpen:n,onOpenChange:r,trigger:i,children:c(u,{...o,children:a})})}(function(e){e.HeroLabel=i,e.ReceiveChip=o,e.CurrencyChip=r,e.ProviderCard=a,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=d})(u||={});export{u as OnrampAmountEntry};
|
|
@@ -0,0 +1,21 @@
|
|
|
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
|
+
readonly currencyChip: "onramp-amount-entry-currency-chip";
|
|
12
|
+
readonly providerCard: "onramp-amount-entry-provider-card";
|
|
13
|
+
readonly providerCardLabel: "onramp-amount-entry-provider-card-label";
|
|
14
|
+
readonly providerCardRow: "onramp-amount-entry-provider-card-row";
|
|
15
|
+
readonly providerCardName: "onramp-amount-entry-provider-card-name";
|
|
16
|
+
readonly providerCardNote: "onramp-amount-entry-provider-card-note";
|
|
17
|
+
readonly providerCardDelivery: "onramp-amount-entry-provider-card-delivery";
|
|
18
|
+
};
|
|
19
|
+
type OnrampAmountEntrySlot = (typeof ONRAMP_AMOUNT_ENTRY_SLOTS)[keyof typeof ONRAMP_AMOUNT_ENTRY_SLOTS];
|
|
20
|
+
//#endregion
|
|
21
|
+
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`,currencyChip:`onramp-amount-entry-currency-chip`,providerCard:`onramp-amount-entry-provider-card`,providerCardLabel:`onramp-amount-entry-provider-card-label`,providerCardRow:`onramp-amount-entry-provider-card-row`,providerCardName:`onramp-amount-entry-provider-card-name`,providerCardNote:`onramp-amount-entry-provider-card-note`,providerCardDelivery:`onramp-amount-entry-provider-card-delivery`};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":`x109j2v6`,$$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`},currencyChipWrap:{"OnrampAmountEntry__styles.currencyChipWrap":`OnrampAmountEntry__styles.currencyChipWrap`,"display-k1xSpc":`x78zum5`,"justifyContent-kjj79g":`xl56j7k`,"paddingTop-kLKAdn":`xyamay9`,"paddingInlineEnd-kwRFfy":`x1o5r3ls`,"paddingInlineStart-kZCmMZ":`xz7312c`,$$css:`@stridge/kit:src/flows/deposit/widgets/onramp-amount-entry/compound/OnrampAmountEntry.styles.ts:50`},currencyChip:{"OnrampAmountEntry__styles.currencyChip":`OnrampAmountEntry__styles.currencyChip`,"display-k1xSpc":`x3nfvp2`,"alignItems-kGNEyG":`x6s0dn4`,"gap-kOIVth":`x167g77z`,"paddingBlock-k8WAf4":`xifx94n`,"paddingInlineStart-kZCmMZ":`xaso8d8`,"paddingInlineEnd-kwRFfy":`xpdmqnj`,"margin-kogj98":`x1ghz6dp`,"borderRadius-kaIpWk":`x1npxkrn`,"borderWidth-kMzoRj":`xmkeg23`,"borderStyle-ksu8eU":`x1y0btm7`,"borderColor-kVAM5u":`x12c9lpl`,"backgroundColor-kWkggS":`xvaq5cg xiy4fg7`,"color-kMwMTN":`xzn0pkc`,"cursor-kkrTdU":`x1ypdohk`,"appearance-kysU6D":`xjyslct`,"transitionProperty-k1ekBW":`xts7igz`,"transitionDuration-kIyJzY":`xx6bhzk`,"transitionTimingFunction-kAMwcw":`x9lcvmn`,"outline-kI3sdo":`x1a2a7pz`,"boxShadow-kGVxlE":`x159teg`,$$css:`@stridge/kit:src/flows/deposit/widgets/onramp-amount-entry/compound/OnrampAmountEntry.styles.ts:57`},currencyChipCode:{"OnrampAmountEntry__styles.currencyChipCode":`OnrampAmountEntry__styles.currencyChipCode`,"margin-kogj98":`x1ghz6dp`,$$css:`@stridge/kit:src/flows/deposit/widgets/onramp-amount-entry/compound/OnrampAmountEntry.styles.ts:85`},currencyChipChevron:{"OnrampAmountEntry__styles.currencyChipChevron":`OnrampAmountEntry__styles.currencyChipChevron`,"width-kzqmXN":`x1a00udw`,"height-kZKoxP":`xx3o462`,"flexShrink-kmuXW":`x2lah0s`,"color-kMwMTN":`xi96bwj`,"strokeWidth-kfJifR":`x68fu6m`,$$css:`@stridge/kit:src/flows/deposit/widgets/onramp-amount-entry/compound/OnrampAmountEntry.styles.ts:88`},providerCardWrap:{"OnrampAmountEntry__styles.providerCardWrap":`OnrampAmountEntry__styles.providerCardWrap`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`xdt5ytf`,"gap-kOIVth":`x1a6yh9e`,"paddingTop-kLKAdn":`x1cnzs8`,"paddingInlineEnd-kwRFfy":`x1x5flf6`,"paddingInlineStart-kZCmMZ":`xwn43p0`,$$css:`@stridge/kit:src/flows/deposit/widgets/onramp-amount-entry/compound/OnrampAmountEntry.styles.ts:96`},providerCardLabel:{"OnrampAmountEntry__styles.providerCardLabel":`OnrampAmountEntry__styles.providerCardLabel`,"paddingInlineStart-kZCmMZ":`xyiysdx`,"textAlign-k9WMMc":`x1yc453h`,$$css:`@stridge/kit:src/flows/deposit/widgets/onramp-amount-entry/compound/OnrampAmountEntry.styles.ts:104`},providerRow:{"OnrampAmountEntry__styles.providerRow":`OnrampAmountEntry__styles.providerRow`,"gap-kOIVth":`x1v2ro7d`,$$css:`@stridge/kit:src/flows/deposit/widgets/onramp-amount-entry/compound/OnrampAmountEntry.styles.ts:108`},providerText:{"OnrampAmountEntry__styles.providerText":`OnrampAmountEntry__styles.providerText`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`xdt5ytf`,"flexBasis-kCS8Yb":`x1r8uery`,"flexGrow-kzQI83":`x1iyjqo2`,"flexShrink-kmuXW":`xs83m0k`,"minWidth-k7Eaqz":`xeuugli`,"gap-kOIVth":`x195vfkc`,$$css:`@stridge/kit:src/flows/deposit/widgets/onramp-amount-entry/compound/OnrampAmountEntry.styles.ts:111`},providerChevron:{"OnrampAmountEntry__styles.providerChevron":`OnrampAmountEntry__styles.providerChevron`,"width-kzqmXN":`x1kky2od`,"height-kZKoxP":`xlup9mm`,"flexShrink-kmuXW":`x2lah0s`,"color-kMwMTN":`xi96bwj`,"strokeWidth-kfJifR":`x68fu6m`,$$css:`@stridge/kit:src/flows/deposit/widgets/onramp-amount-entry/compound/OnrampAmountEntry.styles.ts:120`},providerDelivery:{"OnrampAmountEntry__styles.providerDelivery":`OnrampAmountEntry__styles.providerDelivery`,"display-k1xSpc":`x78zum5`,"alignItems-kGNEyG":`x6s0dn4`,"gap-kOIVth":`x17d4w8g`,"paddingInlineStart-kZCmMZ":`xyiysdx`,$$css:`@stridge/kit:src/flows/deposit/widgets/onramp-amount-entry/compound/OnrampAmountEntry.styles.ts:127`},providerDeliveryIcon:{"OnrampAmountEntry__styles.providerDeliveryIcon":`OnrampAmountEntry__styles.providerDeliveryIcon`,"width-kzqmXN":`x1fxhmyf`,"height-kZKoxP":`x18gnavp`,"flexShrink-kmuXW":`x2lah0s`,"color-kMwMTN":`xi96bwj`,"strokeWidth-kfJifR":`x68fu6m`,$$css:`@stridge/kit:src/flows/deposit/widgets/onramp-amount-entry/compound/OnrampAmountEntry.styles.ts:133`}};export{e as styles};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
|
+
|
|
3
|
+
//#region src/flows/deposit/widgets/onramp-amount-entry/compound/components/CurrencyChip.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Currency chip at the top of the amount-entry Body — a compact, self-sizing pill button rendering
|
|
6
|
+
* the selected currency's {@link CurrencyGlyph} (flag) + code + a chevron. Tapping it opens the
|
|
7
|
+
* currency picker. Renders nothing until the orchestrated wrapper has wired a currency + an open
|
|
8
|
+
* handler.
|
|
9
|
+
*/
|
|
10
|
+
declare function OnrampAmountEntryCurrencyChip(): _$react_jsx_runtime0.JSX.Element | null;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { OnrampAmountEntryCurrencyChip };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{useLingui as e}from"../../../../../../shared/i18n/useLingui.js";import"../../../../../../i18n/index.js";import{ChevronDownIcon as t}from"../../../../../../shared/icons/ChevronDownIcon.js";import"../../../../../../icons/index.js";import{CurrencyGlyph as n}from"../../../../../../shared/ui/CurrencyGlyph/CurrencyGlyph.js";import"../../../../../../shared/ui/CurrencyGlyph/index.js";import{text as r}from"../../../../../../shared/ui/Text/Text.js";import"../../../../../../ui/index.js";import{useOnrampAmountEntryContext as i}from"../context.js";import{ONRAMP_AMOUNT_ENTRY_SLOTS as a}from"../OnrampAmountEntry.slots.js";import{styles as o}from"../OnrampAmountEntry.styles.js";import{jsx as s,jsxs as c}from"react/jsx-runtime";import*as l from"@stylexjs/stylex";function u(){let u=i(`OnrampAmountEntry.CurrencyChip`),{_:d}=e();if(!u.onOpenCurrencyPicker||!u.currencyCode)return null;let f=u.currencyCode;return s(`div`,{...l.props(o.currencyChipWrap),children:c(`button`,{type:`button`,onClick:u.onOpenCurrencyPicker,"aria-label":d({id:`LS3na9`,message:`Change currency, currently {code}`,values:{code:f}}),"data-stridge-slot":a.currencyChip,...l.props(o.currencyChip),children:[s(n,{code:f,...u.currencyGlyphSymbol?{symbol:u.currencyGlyphSymbol}:{},size:22}),s(r.span,{size:`callout`,fontWeight:`semibold`,leading:`tight`,tracking:`tight`,...l.props(o.currencyChipCode),children:f}),s(t,{"aria-hidden":!0,...l.props(o.currencyChipChevron)})]})})}export{u as OnrampAmountEntryCurrencyChip};
|
|
@@ -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,12 @@
|
|
|
1
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
|
+
|
|
3
|
+
//#region src/flows/deposit/widgets/onramp-amount-entry/compound/components/ProviderCard.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Provider card on the amount-entry screen — a "Provider" section label, a navigable card row with
|
|
6
|
+
* the active provider's logo / neutral name / "Auto-picked for you" sub-line, and an estimated
|
|
7
|
+
* delivery-time line. Tapping the row opens the provider picker. Renders nothing when no provider is
|
|
8
|
+
* wired (crypto-only / capability-less drivers unaffected).
|
|
9
|
+
*/
|
|
10
|
+
declare function OnrampAmountEntryProviderCard(): _$react_jsx_runtime0.JSX.Element | null;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { OnrampAmountEntryProviderCard };
|
|
@@ -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{ClockIcon as r}from"../../../../../../shared/icons/ClockIcon.js";import"../../../../../../icons/index.js";import{Image as i}from"../../../../../../shared/ui/Image/Image.js";import"../../../../../../shared/ui/Image/index.js";import{SelectableTile as a}from"../../../../../../shared/ui/SelectableTile/SelectableTile.js";import"../../../../../../shared/ui/SelectableTile/index.js";import{text as o}from"../../../../../../shared/ui/Text/Text.js";import"../../../../../../ui/index.js";import{useOnrampAmountEntryContext as s}from"../context.js";import{ONRAMP_AMOUNT_ENTRY_SLOTS as c}from"../OnrampAmountEntry.slots.js";import{styles as l}from"../OnrampAmountEntry.styles.js";import{jsx as u,jsxs as d}from"react/jsx-runtime";import*as f from"@stylexjs/stylex";function p(){let p=s(`OnrampAmountEntry.ProviderCard`),{_:m}=t(),h=p.provider;if(!h)return null;let g=typeof p.onOpenProviderPicker==`function`;return d(`div`,{"data-stridge-slot":c.providerCard,...f.props(l.providerCardWrap),children:[u(o.span,{size:`meta`,fontWeight:`medium`,leading:`tight`,color:`subdued`,transform:`uppercase`,"data-stridge-slot":c.providerCardLabel,...f.props(l.providerCardLabel),children:m({id:`aemBRq`,message:`Provider`})}),d(a,{shape:`card`,interactive:g?`navigation`:!1,...g?{onClick:p.onOpenProviderPicker,"aria-label":m({id:`a_Zu3Q`,message:`Change provider, currently {0}`,values:{0:h.name}})}:{},"data-stridge-slot":c.providerCardRow,...f.props(l.providerRow),children:[u(i,{...h.logoUrl?{src:h.logoUrl}:{},alt:h.name,size:36,shape:`rounded`}),d(`span`,{...f.props(l.providerText),children:[u(o.span,{size:`callout`,fontWeight:`semibold`,leading:`tight`,tracking:`tight`,truncate:!0,"data-stridge-slot":c.providerCardName,children:h.name}),u(o.span,{size:`xs`,fontWeight:`medium`,leading:`tight`,color:`subdued`,truncate:!0,"data-stridge-slot":c.providerCardNote,children:h.note??m({id:`iKuXva`,message:`Auto-picked for you`})})]}),g?u(n,{"aria-hidden":!0,...f.props(l.providerChevron)}):null]}),h.deliveryTime?d(`div`,{"data-stridge-slot":c.providerCardDelivery,...f.props(l.providerDelivery),children:[u(r,{"aria-hidden":!0,...f.props(l.providerDeliveryIcon)}),u(o.span,{size:`xs`,fontWeight:`medium`,leading:`tight`,color:`subdued`,children:u(e,{id:`xu_4Dj`,message:`Estimated delivery time: {0}`,values:{0:h.deliveryTime}})})]}):null]})}export{p as OnrampAmountEntryProviderCard};
|
|
@@ -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{useOnrampAmountEntryContext as i}from"../context.js";import{ONRAMP_AMOUNT_ENTRY_SLOTS as a}from"../OnrampAmountEntry.slots.js";import{styles as o}from"../OnrampAmountEntry.styles.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}=i(`OnrampAmountEntry.ReceiveChip`);return c(`span`,{...l.props(o.receiveLine),children:[s(n.span,{size:`sm`,leading:`tight`,color:`subdued`,...l.props(o.receiveLabel),children:s(e,{id:`lDgVWA`,message:`Receive`})}),c(`span`,{"data-stridge-slot":a.receiveChip,...l.props(o.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(o.receiveChipAmount),children:[u,` `,d.symbol]})]})]})}export{u as OnrampAmountEntryReceiveChip};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
//#region src/flows/deposit/widgets/onramp-amount-entry/compound/context.d.ts
|
|
2
|
+
/** Active-provider summary rendered by the amount-entry ProviderCard. */
|
|
3
|
+
interface OnrampAmountEntryProviderInfo {
|
|
4
|
+
/** Neutral, driver-supplied provider name. */
|
|
5
|
+
name: string;
|
|
6
|
+
/** Optional driver-supplied logo URL — rendered through `Image`; else a neutral monogram. */
|
|
7
|
+
logoUrl?: string;
|
|
8
|
+
/** Optional sub-line; the card falls back to "Auto-picked for you". */
|
|
9
|
+
note?: string;
|
|
10
|
+
/** Pre-formatted estimated delivery time (from `onrampMethods.processingTime.formatted`). */
|
|
11
|
+
deliveryTime?: string;
|
|
12
|
+
}
|
|
13
|
+
//#endregion
|
|
14
|
+
export { OnrampAmountEntryProviderInfo };
|
package/dist/flows/deposit/widgets/{cash-amount-entry → onramp-amount-entry}/compound/context.js
RENAMED
|
@@ -1 +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 <
|
|
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,4 @@
|
|
|
1
|
+
import { OnrampAmountEntryProviderInfo } from "./context.js";
|
|
2
|
+
import { OnrampAmountEntryDialogProps, OnrampAmountEntryHeroLabelProps, OnrampAmountEntryProps } from "./types.js";
|
|
3
|
+
import { OnrampAmountEntry } from "./OnrampAmountEntry.js";
|
|
4
|
+
import { ONRAMP_AMOUNT_ENTRY_SLOTS, OnrampAmountEntrySlot } from "./OnrampAmountEntry.slots.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./OnrampAmountEntry.slots.js";import"./OnrampAmountEntry.js";
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { DialogShellControls } from "../../../../../shared/dialog/DialogShell.js";
|
|
2
|
+
import { AmountEntryProps, AmountEntryToken } from "../../../../../shared/widgets/amount-entry/compound/types.js";
|
|
3
|
+
import { OnrampAmountEntryProviderInfo } from "./context.js";
|
|
4
|
+
import { ReactNode } from "react";
|
|
5
|
+
|
|
6
|
+
//#region src/flows/deposit/widgets/onramp-amount-entry/compound/types.d.ts
|
|
7
|
+
/**
|
|
8
|
+
* Public props accepted by the {@link OnrampAmountEntry} compound root. Extends the underlying
|
|
9
|
+
* {@link AmountEntryProps} shape with onramp-flow-specific fields the orchestrated wrapper populates
|
|
10
|
+
* from the driver's `onrampQuote` / `onrampCurrencies` / `onrampProviders` entities.
|
|
11
|
+
*/
|
|
12
|
+
interface OnrampAmountEntryProps extends AmountEntryProps {
|
|
13
|
+
/** Pre-formatted receive amount (e.g. `"24.21"`). Rendered inside the ReceiveChip. */
|
|
14
|
+
formattedReceive: string;
|
|
15
|
+
/** The crypto asset the user receives. Drives the ReceiveChip's token logo + symbol. */
|
|
16
|
+
onrampReceiveToken: AmountEntryToken;
|
|
17
|
+
/** When `true`, the ReceiveChip renders a shimmer placeholder while the quote resolves. */
|
|
18
|
+
quoteLoading?: boolean;
|
|
19
|
+
/** Selected fiat currency code (e.g. `"USD"`) — drives the CurrencyChip. */
|
|
20
|
+
currencyCode?: string;
|
|
21
|
+
/** Narrow symbol for {@link currencyCode} — drives the CurrencyChip glyph. */
|
|
22
|
+
currencyGlyphSymbol?: string;
|
|
23
|
+
/** Opens the currency picker. When absent, the CurrencyChip renders nothing. */
|
|
24
|
+
onOpenCurrencyPicker?: () => void;
|
|
25
|
+
/** Active provider for the ProviderCard. When absent, the ProviderCard renders nothing. */
|
|
26
|
+
provider?: OnrampAmountEntryProviderInfo;
|
|
27
|
+
/** Opens the provider picker. */
|
|
28
|
+
onOpenProviderPicker?: () => void;
|
|
29
|
+
}
|
|
30
|
+
/** Props for {@link OnrampAmountEntry.HeroLabel}. */
|
|
31
|
+
interface OnrampAmountEntryHeroLabelProps {
|
|
32
|
+
children: ReactNode;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Props for `<OnrampAmountEntry.Dialog>` — the dialog form of the OnrampAmountEntry widget.
|
|
36
|
+
* Combines the widget root props with the shared dialog shell controls.
|
|
37
|
+
*/
|
|
38
|
+
type OnrampAmountEntryDialogProps = OnrampAmountEntryProps & DialogShellControls;
|
|
39
|
+
//#endregion
|
|
40
|
+
export { OnrampAmountEntryDialogProps, OnrampAmountEntryHeroLabelProps, OnrampAmountEntryProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { OnrampAmountEntry } from "./OnrampAmountEntry.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./OnrampAmountEntry.js";
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { DialogShellControls } from "../../../../shared/dialog/DialogShell.js";
|
|
2
|
+
import { OnrampConfirmBody } from "./compound/components/Body.js";
|
|
3
|
+
import { OnrampConfirmDisclaimer } from "./compound/components/Disclaimer.js";
|
|
4
|
+
import { OnrampConfirmHeader } from "./compound/components/Header.js";
|
|
5
|
+
import { OnrampConfirmSummary } from "./compound/components/Summary.js";
|
|
6
|
+
import { ComponentProps, ReactNode } from "react";
|
|
7
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
8
|
+
|
|
9
|
+
//#region src/flows/deposit/widgets/onramp-confirm/OnrampConfirm.d.ts
|
|
10
|
+
interface OnrampConfirmProps extends ComponentProps<"div"> {
|
|
11
|
+
/**
|
|
12
|
+
* Optional custom composition. When omitted, the canonical default composition renders —
|
|
13
|
+
* `<Header />` + `<Body>` (Summary + the "Continue to payment" CTA). Pass children to
|
|
14
|
+
* interleave your own elements or replace the composition entirely.
|
|
15
|
+
*/
|
|
16
|
+
children?: ReactNode;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Orchestrated `OnrampConfirm` widget — the confirm screen that follows `onrampAmountEntry`. Reads
|
|
20
|
+
* the amount + phase from the FSM ctx, the brand name from the driver's `brand` entity, and the
|
|
21
|
+
* priced breakdown from `onrampQuote`. The CTA dispatches `confirmOnramp()`, which the controller
|
|
22
|
+
* turns into `createOnrampSession` + a new-tab checkout redirect.
|
|
23
|
+
*
|
|
24
|
+
* Renders nothing on any other FSM state — the dialog routes the widget under
|
|
25
|
+
* `<Deposit.Step name="onrampConfirm">`.
|
|
26
|
+
*/
|
|
27
|
+
declare function OnrampConfirm({
|
|
28
|
+
children,
|
|
29
|
+
...props
|
|
30
|
+
}: OnrampConfirmProps): _$react_jsx_runtime0.JSX.Element | null;
|
|
31
|
+
declare function OnrampConfirmDialog({
|
|
32
|
+
open,
|
|
33
|
+
defaultOpen,
|
|
34
|
+
onOpenChange,
|
|
35
|
+
trigger,
|
|
36
|
+
...rootProps
|
|
37
|
+
}: OnrampConfirm.DialogProps): _$react_jsx_runtime0.JSX.Element;
|
|
38
|
+
declare namespace OnrampConfirm {
|
|
39
|
+
type Props = OnrampConfirmProps;
|
|
40
|
+
type DialogProps = OnrampConfirmProps & DialogShellControls;
|
|
41
|
+
const Dialog: typeof OnrampConfirmDialog;
|
|
42
|
+
/**
|
|
43
|
+
* Compound sub-parts aliased on the orchestrated widget so consumers can compose without
|
|
44
|
+
* importing the headless compound separately.
|
|
45
|
+
*/
|
|
46
|
+
const Header: typeof OnrampConfirmHeader;
|
|
47
|
+
const Body: typeof OnrampConfirmBody;
|
|
48
|
+
const Summary: typeof OnrampConfirmSummary;
|
|
49
|
+
const Disclaimer: typeof OnrampConfirmDisclaimer;
|
|
50
|
+
}
|
|
51
|
+
//#endregion
|
|
52
|
+
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{DialogShell as a}from"../../../../shared/dialog/DialogShell.js";import{FiatAmount as o}from"../../../../shared/ui/FiatSymbol/FiatAmount.js";import"../../../../shared/ui/FiatSymbol/index.js";import{OnrampConfirm as s}from"./compound/OnrampConfirm.js";import"./compound/index.js";import{resolveOnrampErrorMessage as c}from"../../shared/onrampError.js";import{useMemo as l}from"react";import{jsx as u}from"react/jsx-runtime";function d({children:a,...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=l(()=>{if(!y)return;let e=y.fiatCurrency;return{totalUsd:u(o,{value:b,currency:e,locale:g.locale}),receive:y.receiveAmount.formatted,receiveSymbol:y.receiveAsset.symbol,amountUsd:u(o,{value:y.amountFiat.value,currency:e,locale:g.locale}),rate:y.rate.formatted,...y.processingFeeUsd?{processingFee:u(o,{value:y.processingFeeUsd.value,currency:e,locale:g.locale})}:{},...y.networkFeeUsd?{networkFee:u(o,{value:y.networkFeeUsd.value,currency:e,locale:g.locale})}:{}}},[y,b,g]),S=f.onrampProviders,C=S?.status===`ready`||S?.status===`stale`?S.payload.providers.find(e=>e.id===S.payload.activeId):void 0,w=f.onrampMethods,T=w?.status===`ready`||w?.status===`stale`?w.payload.processingTime?.formatted:void 0,E=l(()=>{let e=C?.disclaimer;if(e)return{providerName:e.providerName,links:e.links,...C?.logoUrl===void 0?{}:{logoUrl:C.logoUrl},...e.bodyOverride===void 0?{}:{bodyOverride:e.bodyOverride},...T===void 0?{}:{deliveryTime:T}}},[C,T]);if(p.name!==`onrampConfirm`)return null;let{phase:D}=p.ctx,O=f.brand.status===`ready`||f.brand.status===`stale`?f.brand.payload:void 0,k=D.kind===`failed`?c(D.failure.cause??D.failure.reason,_):void 0;return u(s,{...d,phase:D,amount:b,...x?{summary:x}:{},...O?.name?{brandName:O.name}:{},...k?{failureReason:k}:{},...E?{disclaimer:E}:{},onBack:m,onConfirm:h,children:a})}function f({open:e,defaultOpen:t,onOpenChange:n,trigger:r,...i}){return u(a,{open:e,defaultOpen:t,onOpenChange:n,trigger:r,children:u(d,{...i})})}(function(e){e.Dialog=f,e.Header=s.Header,e.Body=s.Body,e.Summary=s.Summary,e.Disclaimer=s.Disclaimer})(d||={});export{d as OnrampConfirm};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { OnrampConfirmBodyProps, OnrampConfirmDialogProps, OnrampConfirmHeaderProps, OnrampConfirmProps, OnrampConfirmSummaryProps } from "./types.js";
|
|
2
|
+
import { OnrampConfirmBody } from "./components/Body.js";
|
|
3
|
+
import { OnrampConfirmDisclaimer } from "./components/Disclaimer.js";
|
|
4
|
+
import { OnrampConfirmHeader } from "./components/Header.js";
|
|
5
|
+
import { OnrampConfirmSummary } from "./components/Summary.js";
|
|
6
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
7
|
+
|
|
8
|
+
//#region src/flows/deposit/widgets/onramp-confirm/compound/OnrampConfirm.d.ts
|
|
9
|
+
/**
|
|
10
|
+
* Onramp confirm widget — the screen that follows `onrampAmountEntry`. Renders the priced quote
|
|
11
|
+
* summary + a single "Continue to payment" CTA inside the shared frame + header. There is no in-app
|
|
12
|
+
* payment form: the CTA hands off to the provider's hosted checkout in a new tab and the FSM
|
|
13
|
+
* advances to `onrampPaymentPending`.
|
|
14
|
+
*
|
|
15
|
+
* Parts:
|
|
16
|
+
* - {@link OnrampConfirm.Header}
|
|
17
|
+
* - {@link OnrampConfirm.Body}
|
|
18
|
+
* - {@link OnrampConfirm.Summary}
|
|
19
|
+
*
|
|
20
|
+
* Dialog form: {@link OnrampConfirm.Dialog} pre-composes the widget into a dialog shell.
|
|
21
|
+
*/
|
|
22
|
+
declare function OnrampConfirm(props: OnrampConfirmProps): _$react_jsx_runtime0.JSX.Element;
|
|
23
|
+
declare function OnrampConfirmDialog({
|
|
24
|
+
open,
|
|
25
|
+
defaultOpen,
|
|
26
|
+
onOpenChange,
|
|
27
|
+
trigger,
|
|
28
|
+
children,
|
|
29
|
+
...rootProps
|
|
30
|
+
}: OnrampConfirmDialogProps): _$react_jsx_runtime0.JSX.Element;
|
|
31
|
+
declare namespace OnrampConfirm {
|
|
32
|
+
type Props = OnrampConfirmProps;
|
|
33
|
+
type HeaderProps = OnrampConfirmHeaderProps;
|
|
34
|
+
type BodyProps = OnrampConfirmBodyProps;
|
|
35
|
+
type SummaryProps = OnrampConfirmSummaryProps;
|
|
36
|
+
type DialogProps = OnrampConfirmDialogProps;
|
|
37
|
+
const Header: typeof OnrampConfirmHeader;
|
|
38
|
+
const Body: typeof OnrampConfirmBody;
|
|
39
|
+
const Summary: typeof OnrampConfirmSummary;
|
|
40
|
+
const Disclaimer: typeof OnrampConfirmDisclaimer;
|
|
41
|
+
const Dialog: typeof OnrampConfirmDialog;
|
|
42
|
+
}
|
|
43
|
+
//#endregion
|
|
44
|
+
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{OnrampConfirmDisclaimer as o}from"./components/Disclaimer.js";import{OnrampConfirmSummary as s}from"./components/Summary.js";import{OnrampConfirmBody as c}from"./components/Body.js";import{OnrampConfirmHeader as l}from"./components/Header.js";import{useMemo as u}from"react";import{Fragment as d,jsx as f,jsxs as p}from"react/jsx-runtime";import*as m from"@stylexjs/stylex";function h(e){let{phase:o,amount:s,summary:c,brandName:l,failureReason:d,onBack:p,onConfirm:h,disclaimer:_,children:v,...y}=e;return f(r,{value:u(()=>({phase:o,amount:s,...c===void 0?{}:{summary:c},...l===void 0?{}:{brandName:l},...d===void 0?{}:{failureReason:d},...p?{onBack:p}:{},...h?{onConfirm:h}:{},..._===void 0?{}:{disclaimer:_}}),[o,s,c,l,d,p,h,_]),children:f(t.Provider,{children:f(n,{...y,"data-stridge-slot":i.root,...m.props(a.root),children:v??g})})})}const g=p(d,{children:[f(l,{}),f(c,{})]});function _({open:t,defaultOpen:n,onOpenChange:r,trigger:i,children:a,...o}){return f(e,{open:t,defaultOpen:n,onOpenChange:r,trigger:i,children:f(h,{...o,children:a})})}(function(e){e.Header=l,e.Body=c,e.Summary=s,e.Disclaimer=o,e.Dialog=_})(h||={});export{h as OnrampConfirm};
|