@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
package/dist/ui/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{EXTERNAL_LINK_SLOTS as e}from"../shared/ui/ExternalLink/ExternalLink.slots.js";import{ExternalLink as t}from"../shared/ui/ExternalLink/ExternalLink.js";import"../shared/ui/ExternalLink/index.js";import{BUTTON_SLOTS as n}from"../shared/ui/Button/Button.slots.js";import{Button as r}from"../shared/ui/Button/Button.js";import"../shared/ui/Button/index.js";import{ICON_BUTTON_SLOTS as i}from"../shared/ui/IconButton/IconButton.slots.js";import{IconButton as a}from"../shared/ui/IconButton/IconButton.js";import"../shared/ui/IconButton/index.js";import{SCROLL_AREA_SLOTS as o}from"../shared/ui/ScrollArea/ScrollArea.slots.js";import{ScrollArea as s}from"../shared/ui/ScrollArea/ScrollArea.js";import"../shared/ui/ScrollArea/index.js";import{DIALOG_SLOTS as c}from"../shared/ui/Dialog/Dialog.slots.js";import{Dialog as l,useIsInsideDialogContent as u}from"../shared/ui/Dialog/Dialog.js";import"../shared/ui/Dialog/index.js";import{DRAWER_SLOTS as d}from"../shared/ui/Drawer/Drawer.slots.js";import{Drawer as f}from"../shared/ui/Drawer/Drawer.js";import"../shared/ui/Drawer/index.js";import{AdaptiveSurface as p}from"../shared/ui/AdaptiveSurface/AdaptiveSurface.js";import"../shared/ui/AdaptiveSurface/index.js";import{ALERT_SLOTS as m}from"../shared/ui/Alert/Alert.slots.js";import{Alert as h}from"../shared/ui/Alert/Alert.js";import"../shared/ui/Alert/index.js";import{AMOUNT_INPUT_SLOTS as g}from"../shared/ui/AmountInput/AmountInput.slots.js";import{formatAmountForInput as _,parseAmountInputValue as v}from"../shared/ui/AmountInput/utils.js";import{AmountInput as y}from"../shared/ui/AmountInput/AmountInput.js";import"../shared/ui/AmountInput/index.js";import{BADGE_SLOTS as b}from"../shared/ui/Badge/Badge.slots.js";import{Badge as x}from"../shared/ui/Badge/Badge.js";import"../shared/ui/Badge/index.js";import{CARD_SLOTS as S}from"../shared/ui/Card/Card.slots.js";import{Card as C}from"../shared/ui/Card/Card.js";import"../shared/ui/Card/index.js";import{
|
|
1
|
+
import{EXTERNAL_LINK_SLOTS as e}from"../shared/ui/ExternalLink/ExternalLink.slots.js";import{ExternalLink as t}from"../shared/ui/ExternalLink/ExternalLink.js";import"../shared/ui/ExternalLink/index.js";import{BUTTON_SLOTS as n}from"../shared/ui/Button/Button.slots.js";import{Button as r}from"../shared/ui/Button/Button.js";import"../shared/ui/Button/index.js";import{ICON_BUTTON_SLOTS as i}from"../shared/ui/IconButton/IconButton.slots.js";import{IconButton as a}from"../shared/ui/IconButton/IconButton.js";import"../shared/ui/IconButton/index.js";import{SCROLL_AREA_SLOTS as o}from"../shared/ui/ScrollArea/ScrollArea.slots.js";import{ScrollArea as s}from"../shared/ui/ScrollArea/ScrollArea.js";import"../shared/ui/ScrollArea/index.js";import{DIALOG_SLOTS as c}from"../shared/ui/Dialog/Dialog.slots.js";import{Dialog as l,useIsInsideDialogContent as u}from"../shared/ui/Dialog/Dialog.js";import"../shared/ui/Dialog/index.js";import{DRAWER_SLOTS as d}from"../shared/ui/Drawer/Drawer.slots.js";import{Drawer as f}from"../shared/ui/Drawer/Drawer.js";import"../shared/ui/Drawer/index.js";import{AdaptiveSurface as p}from"../shared/ui/AdaptiveSurface/AdaptiveSurface.js";import"../shared/ui/AdaptiveSurface/index.js";import{ALERT_SLOTS as m}from"../shared/ui/Alert/Alert.slots.js";import{Alert as h}from"../shared/ui/Alert/Alert.js";import"../shared/ui/Alert/index.js";import{AMOUNT_INPUT_SLOTS as g}from"../shared/ui/AmountInput/AmountInput.slots.js";import{formatAmountForInput as _,parseAmountInputValue as v}from"../shared/ui/AmountInput/utils.js";import{AmountInput as y}from"../shared/ui/AmountInput/AmountInput.js";import"../shared/ui/AmountInput/index.js";import{BADGE_SLOTS as b}from"../shared/ui/Badge/Badge.slots.js";import{Badge as x}from"../shared/ui/Badge/Badge.js";import"../shared/ui/Badge/index.js";import{CARD_SLOTS as S}from"../shared/ui/Card/Card.slots.js";import{Card as C}from"../shared/ui/Card/Card.js";import"../shared/ui/Card/index.js";import{CHECKBOX_SLOTS as w}from"../shared/ui/Checkbox/Checkbox.slots.js";import{Checkbox as T}from"../shared/ui/Checkbox/Checkbox.js";import"../shared/ui/Checkbox/index.js";import{COLLAPSIBLE_SLOTS as E}from"../shared/ui/Collapsible/Collapsible.slots.js";import{Collapsible as D}from"../shared/ui/Collapsible/Collapsible.js";import"../shared/ui/Collapsible/index.js";import{IMAGE_SLOTS as O}from"../shared/ui/Image/Image.slots.js";import{Image as k}from"../shared/ui/Image/Image.js";import"../shared/ui/Image/index.js";import{CURRENCY_GLYPH_SLOTS as A}from"../shared/ui/CurrencyGlyph/CurrencyGlyph.slots.js";import{CurrencyGlyph as j}from"../shared/ui/CurrencyGlyph/CurrencyGlyph.js";import"../shared/ui/CurrencyGlyph/index.js";import{DETAILS_SLOTS as M}from"../shared/ui/Details/Details.slots.js";import{Details as N}from"../shared/ui/Details/Details.js";import"../shared/ui/Details/index.js";import{DISCLOSURE_ROW_SLOTS as P}from"../shared/ui/DisclosureRow/DisclosureRow.slots.js";import{DisclosureRow as F}from"../shared/ui/DisclosureRow/DisclosureRow.js";import"../shared/ui/DisclosureRow/index.js";import{FiatSymbol as I}from"../shared/ui/FiatSymbol/FiatSymbol.js";import{FiatAmount as L}from"../shared/ui/FiatSymbol/FiatAmount.js";import"../shared/ui/FiatSymbol/index.js";import{FIELD_SLOTS as R}from"../shared/ui/Field/Field.slots.js";import{Field as z}from"../shared/ui/Field/Field.js";import"../shared/ui/Field/index.js";import{INPUT_GROUP_SLOTS as B}from"../shared/ui/InputGroup/InputGroup.slots.js";import{InputGroup as V}from"../shared/ui/InputGroup/InputGroup.js";import"../shared/ui/InputGroup/index.js";import{LtrAtom as H}from"../shared/ui/LtrAtom/LtrAtom.js";import"../shared/ui/LtrAtom/index.js";import{SELECT_SLOTS as U}from"../shared/ui/Select/Select.slots.js";import{Select as W}from"../shared/ui/Select/Select.js";import"../shared/ui/Select/index.js";import{SELECTABLE_TILE_SLOTS as G}from"../shared/ui/SelectableTile/SelectableTile.slots.js";import{SelectableTile as K}from"../shared/ui/SelectableTile/SelectableTile.js";import{SelectableTileGroup as q}from"../shared/ui/SelectableTile/SelectableTileGroup.js";import"../shared/ui/SelectableTile/index.js";import{SKELETON_SLOTS as J}from"../shared/ui/Skeleton/Skeleton.slots.js";import{Skeleton as Y}from"../shared/ui/Skeleton/Skeleton.js";import"../shared/ui/Skeleton/index.js";import{STEPS_SLOTS as X}from"../shared/ui/Steps/Steps.slots.js";import{Step as Z,Steps as Q}from"../shared/ui/Steps/Steps.js";import"../shared/ui/Steps/index.js";import{TABS_SLOTS as $}from"../shared/ui/Tabs/Tabs.slots.js";import{Tabs as ee,TabsIndicator as te,TabsList as ne,TabsPanel as re,TabsRoot as ie,TabsTab as ae}from"../shared/ui/Tabs/Tabs.js";import"../shared/ui/Tabs/index.js";import{TEXT_SLOTS as oe}from"../shared/ui/Text/Text.slots.js";import{text as se}from"../shared/ui/Text/Text.js";import"../shared/ui/Text/index.js";import{TokenLogo as ce}from"../shared/ui/TokenLogo/TokenLogo.js";import"../shared/ui/TokenLogo/index.js";import{TOOLTIP_SLOTS as le}from"../shared/ui/Tooltip/Tooltip.slots.js";import{Tooltip as ue}from"../shared/ui/Tooltip/Tooltip.js";import"../shared/ui/Tooltip/index.js";import{WALLET_ROW_SLOTS as de}from"../shared/ui/WalletRow/WalletRow.slots.js";import{WalletRow as fe}from"../shared/ui/WalletRow/WalletRow.js";import"../shared/ui/WalletRow/index.js";export{m as ALERT_SLOTS,g as AMOUNT_INPUT_SLOTS,p as AdaptiveSurface,h as Alert,y as AmountInput,b as BADGE_SLOTS,n as BUTTON_SLOTS,x as Badge,r as Button,S as CARD_SLOTS,w as CHECKBOX_SLOTS,E as COLLAPSIBLE_SLOTS,A as CURRENCY_GLYPH_SLOTS,C as Card,T as Checkbox,D as Collapsible,j as CurrencyGlyph,M as DETAILS_SLOTS,c as DIALOG_SLOTS,P as DISCLOSURE_ROW_SLOTS,d as DRAWER_SLOTS,N as Details,l as Dialog,F as DisclosureRow,f as Drawer,e as EXTERNAL_LINK_SLOTS,t as ExternalLink,R as FIELD_SLOTS,L as FiatAmount,I as FiatSymbol,z as Field,i as ICON_BUTTON_SLOTS,O as IMAGE_SLOTS,B as INPUT_GROUP_SLOTS,a as IconButton,k as Image,V as InputGroup,H as LtrAtom,o as SCROLL_AREA_SLOTS,G as SELECTABLE_TILE_SLOTS,U as SELECT_SLOTS,J as SKELETON_SLOTS,X as STEPS_SLOTS,s as ScrollArea,W as Select,K as SelectableTile,q as SelectableTileGroup,Y as Skeleton,Z as Step,Q as Steps,$ as TABS_SLOTS,oe as TEXT_SLOTS,le as TOOLTIP_SLOTS,ee as Tabs,te as TabsIndicator,ne as TabsList,re as TabsPanel,ie as TabsRoot,ae as TabsTab,ce as TokenLogo,ue as Tooltip,de as WALLET_ROW_SLOTS,fe as WalletRow,_ as formatAmountForInput,v as parseAmountInputValue,se as text,u as useIsInsideDialogContent};
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=`0.1.0-alpha.
|
|
1
|
+
const e=`0.1.0-alpha.62`;export{e as KIT_VERSION};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{AMOUNT_ENTRY_SLOTS as e}from"../../shared/widgets/amount-entry/compound/AmountEntry.slots.js";import{AmountEntry as t}from"../../shared/widgets/amount-entry/compound/AmountEntry.js";import"../../shared/widgets/amount-entry/compound/index.js";import{
|
|
1
|
+
import{AMOUNT_ENTRY_SLOTS as e}from"../../shared/widgets/amount-entry/compound/AmountEntry.slots.js";import{AmountEntry as t}from"../../shared/widgets/amount-entry/compound/AmountEntry.js";import"../../shared/widgets/amount-entry/compound/index.js";import{PROCESSING_STATE_SLOTS as n}from"../../shared/widgets/processing-state/compound/ProcessingState.slots.js";import{ProcessingState as r}from"../../shared/widgets/processing-state/compound/ProcessingState.js";import"../../shared/widgets/processing-state/compound/index.js";import{ASSET_PICKER_SLOTS as i}from"../../shared/widgets/asset-picker/compound/AssetPicker.slots.js";import{AssetPicker as a}from"../../shared/widgets/asset-picker/compound/AssetPicker.js";import"../../shared/widgets/asset-picker/compound/index.js";import{CONFIRM_TRANSFER_SLOTS as o}from"../../shared/widgets/confirm-transfer/compound/ConfirmTransfer.slots.js";import{ConfirmTransfer as s}from"../../shared/widgets/confirm-transfer/compound/ConfirmTransfer.js";import"../../shared/widgets/confirm-transfer/compound/index.js";import{ERROR_STATE_SLOTS as c}from"../../shared/widgets/error-state/compound/ErrorState.slots.js";import{ErrorState as l}from"../../shared/widgets/error-state/compound/ErrorState.js";import"../../shared/widgets/error-state/compound/index.js";import{SUCCESS_STATE_SLOTS as u}from"../../shared/widgets/success-state/compound/SuccessState.slots.js";import{SuccessState as d}from"../../shared/widgets/success-state/compound/SuccessState.js";import"../../shared/widgets/success-state/compound/index.js";import{Withdraw as f}from"../../flows/withdraw/widgets/withdraw/compound/Withdraw.js";import{WITHDRAW_SLOTS as p}from"../../flows/withdraw/widgets/withdraw/compound/Withdraw.slots.js";import"../../flows/withdraw/widgets/withdraw/compound/index.js";import{WITHDRAW_FORM_SLOTS as m}from"../../flows/withdraw/widgets/withdraw-form/compound/WithdrawForm.slots.js";import{WithdrawForm as h}from"../../flows/withdraw/widgets/withdraw-form/compound/WithdrawForm.js";import"../../flows/withdraw/widgets/withdraw-form/compound/index.js";export{e as AMOUNT_ENTRY_SLOTS,i as ASSET_PICKER_SLOTS,t as AmountEntry,a as AssetPicker,o as CONFIRM_TRANSFER_SLOTS,s as ConfirmTransfer,c as ERROR_STATE_SLOTS,l as ErrorState,n as PROCESSING_STATE_SLOTS,r as ProcessingState,u as SUCCESS_STATE_SLOTS,d as SuccessState,m as WITHDRAW_FORM_SLOTS,p as WITHDRAW_SLOTS,f as Withdraw,h as WithdrawForm};
|
package/package.json
CHANGED
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from "react";
|
|
2
|
-
//#region src/flows/deposit/bindings/DepositBindings.d.ts
|
|
3
|
-
/**
|
|
4
|
-
* Detected card-brand union. Matches the IIN-range coverage of the cash deposit's
|
|
5
|
-
* `CardInputRow`: Visa / Mastercard / Amex / Discover, plus `"unknown"` for any prefix outside
|
|
6
|
-
* those ranges. Exposed here (rather than alongside the widget-local masking helpers) so the
|
|
7
|
-
* public `tokenizeCard` binding can talk about it without a deep widget import.
|
|
8
|
-
*/
|
|
9
|
-
type CardBrand = "visa" | "mastercard" | "amex" | "discover" | "unknown";
|
|
10
|
-
/**
|
|
11
|
-
* Raw card data the kit hands to the host's tokenize binding when the user submits the cash
|
|
12
|
-
* deposit's card form. PAN / CVC are raw digit strings (no masking); `exp` is the formatted
|
|
13
|
-
* `MM/YY` value the user typed; `brand` is the IIN-range detection from `CardInputRow`.
|
|
14
|
-
*
|
|
15
|
-
* This struct is the host's only direct contact with cardholder data — once `tokenizeCard`
|
|
16
|
-
* resolves, the host exchanges it for an opaque token (Stripe.js / Adyen / Spreedly / similar)
|
|
17
|
-
* and the kit no longer holds the raw PAN.
|
|
18
|
-
*/
|
|
19
|
-
interface CardData {
|
|
20
|
-
/** Raw digits with no separators (16 for Visa/MC/Discover, 15 for Amex). */
|
|
21
|
-
pan: string;
|
|
22
|
-
/** Formatted `MM/YY` value. Validated upstream by `isValidExp` before submit. */
|
|
23
|
-
exp: string;
|
|
24
|
-
/** Raw digits (3 for Visa/MC/Discover, 4 for Amex). */
|
|
25
|
-
cvc: string;
|
|
26
|
-
/** Detected brand at submit time. */
|
|
27
|
-
brand: CardBrand;
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Discriminated result of a tokenize attempt. Success carries the opaque token the host's PSP
|
|
31
|
-
* returned; failure carries a host-supplied reason string the form surfaces inline.
|
|
32
|
-
*/
|
|
33
|
-
type TokenizationResult = {
|
|
34
|
-
ok: true;
|
|
35
|
-
token: string;
|
|
36
|
-
} | {
|
|
37
|
-
ok: false;
|
|
38
|
-
reason: string;
|
|
39
|
-
};
|
|
40
|
-
/**
|
|
41
|
-
* Render-time inputs the host supplies to the deposit flow. Today this is just the optional
|
|
42
|
-
* `tokenizeCard` callback — when undefined, callers compose with {@link DEFAULT_TOKENIZE_CARD}
|
|
43
|
-
* so the editable form stays observable end-to-end without any host wiring. Future per-method
|
|
44
|
-
* slots (`applePayMerchantSession`, `googlePayPaymentData`) will land on the same context.
|
|
45
|
-
*/
|
|
46
|
-
interface DepositBindings {
|
|
47
|
-
/**
|
|
48
|
-
* Optional host-supplied tokenize handler. Fired when the user submits a valid card form.
|
|
49
|
-
* Host wires this to its PSP's tokenization JS — `stripe.createPaymentMethod`,
|
|
50
|
-
* `adyenWebComponents.createToken`, `spreedlyExpress.createToken`, etc. Resolves to a
|
|
51
|
-
* discriminated result the form surfaces inline.
|
|
52
|
-
*
|
|
53
|
-
* When undefined, callers fall through to {@link DEFAULT_TOKENIZE_CARD} — keeps the demo
|
|
54
|
-
* path interactive without forcing every host to ship a tokenizer just to render the form.
|
|
55
|
-
*/
|
|
56
|
-
tokenizeCard?: (data: CardData) => Promise<TokenizationResult>;
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Publish the host's render-time deposit inputs (just `tokenizeCard` today) into the kit's
|
|
60
|
-
* deposit scope. Call it once from whatever component renders the deposit UI:
|
|
61
|
-
*
|
|
62
|
-
* - The kit's `<DepositDialog>` calls it internally when the host passes its bindings prop.
|
|
63
|
-
* - A **headless** host that renders fully custom deposit UI calls it directly — it's the
|
|
64
|
-
* supported way to wire `tokenizeCard` without mounting the dialog.
|
|
65
|
-
*
|
|
66
|
-
* Publishes via `useLayoutEffect` so the bridge ref and reactive state are committed before the
|
|
67
|
-
* next browser paint — the form's submit handler reads `ctx.ref.current.tokenizeCard` at fire
|
|
68
|
-
* time and always sees the latest value. Cleanup blanks both on unmount.
|
|
69
|
-
*
|
|
70
|
-
* React 19 StrictMode runs the layout effect mount → cleanup → mount sequence, so the cleanup
|
|
71
|
-
* blanking the ref is fine: the immediate re-mount restores the bound `tokenizeCard` before any
|
|
72
|
-
* paint, so no user interaction can observe the empty window.
|
|
73
|
-
*
|
|
74
|
-
* @example Headless usage
|
|
75
|
-
* ```tsx
|
|
76
|
-
* useDepositBindings({
|
|
77
|
-
* tokenizeCard: async (card) => {
|
|
78
|
-
* const result = await stripe.createPaymentMethod({ type: "card", card });
|
|
79
|
-
* if (result.error) return { ok: false, reason: result.error.message ?? "Tokenization failed" };
|
|
80
|
-
* return { ok: true, token: result.paymentMethod.id };
|
|
81
|
-
* },
|
|
82
|
-
* });
|
|
83
|
-
* ```
|
|
84
|
-
*/
|
|
85
|
-
declare function useDepositBindings(bindings: DepositBindings): void;
|
|
86
|
-
//#endregion
|
|
87
|
-
export { CardBrand, CardData, DepositBindings, TokenizationResult, useDepositBindings };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";import{createContext as e,use as t,useLayoutEffect as n,useMemo as r,useRef as i,useState as a}from"react";import{jsx as o}from"react/jsx-runtime";async function s(e){return await new Promise(e=>setTimeout(e,800)),{ok:!0,token:`kit-mock-token`}}const c=e(null);c.displayName=`DepositBindingsControlContext`;const l=e(null);l.displayName=`DepositBindingsValueContext`;function u({children:e}){let[t,n]=a({}),s=i({});return o(c,{value:r(()=>({setBindings:n,ref:s}),[]),children:o(l,{value:t,children:e})})}function d(){let e=t(c),n=i({});return e?.ref??n}function f(e){let r=t(c),a=e.tokenizeCard,o=i(r?.setBindings);o.current=r?.setBindings;let s=i(r?.ref);s.current=r?.ref,n(()=>{let e=o.current,t=s.current;if(!e||!t)return;let n={...a?{tokenizeCard:a}:{}};return t.current=n,e(n),()=>{let e=o.current,t=s.current;t&&(t.current={}),e&&e({})}},[a])}export{s as DEFAULT_TOKENIZE_CARD,u as DepositBindingsProvider,f as useDepositBindings,d as useDepositBindingsRef};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import { CardBrand, CardData, DepositBindings, TokenizationResult, useDepositBindings } from "./DepositBindings.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./DepositBindings.js";
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
//#region src/flows/deposit/shared/cash.d.ts
|
|
2
|
-
/**
|
|
3
|
-
* Mock breakdown computed in-widget from the entered amount + chosen cash method. Returns the
|
|
4
|
-
* same shape the future `cashQuote` driver entity will surface, so the widget only swaps its
|
|
5
|
-
* source from this helper to `useDepositSnapshot().cashQuote` when the backend ships.
|
|
6
|
-
*/
|
|
7
|
-
interface CashAmountBreakdown {
|
|
8
|
-
/** USD amount the user is paying — surfaced on the Amount row and the hero band. */
|
|
9
|
-
amountUsd: number;
|
|
10
|
-
/** USDC the user receives after fees. Drives the Receive chip + hero sub-line. */
|
|
11
|
-
receiveAmount: number;
|
|
12
|
-
/** USDC quoted-per-USD rate. Drives the Crypto price row. */
|
|
13
|
-
rate: number;
|
|
14
|
-
/** Processing fee charged by the cash method (USD, deducted from amount). */
|
|
15
|
-
processingFeeUsd: number;
|
|
16
|
-
/** Network fee paid to settle on-chain (USD, deducted from amount). */
|
|
17
|
-
networkFeeUsd: number;
|
|
18
|
-
}
|
|
19
|
-
//#endregion
|
|
20
|
-
export { CashAmountBreakdown };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e={symbol:`USDC`,chainId:1,address:`0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48`},t=[{value:200,label:`$200`},{value:500,label:`$500`},{value:1e3,label:`$1k`},{value:2e3,label:`$2k`}],n={card:.029,applePay:.025,googlePay:.025};function r(e,t){let r=e??0,i=+(r*n[t]).toFixed(2),a=.4;return{amountUsd:r,receiveAmount:Math.max(0,r-i-a)/1,rate:1,processingFeeUsd:i,networkFeeUsd:a}}export{t as MOCK_CASH_PRESETS,e as MOCK_RECEIVE_TOKEN,r as computeMockCashBreakdown};
|
|
@@ -1,71 +0,0 @@
|
|
|
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 { CashAmountEntryHeroLabel } from "./compound/components/HeroLabel.js";
|
|
11
|
-
import { CashAmountEntryMethodChip } from "./compound/components/MethodChip.js";
|
|
12
|
-
import { CashAmountEntryReceiveChip } from "./compound/components/ReceiveChip.js";
|
|
13
|
-
import { ComponentProps, ReactNode } from "react";
|
|
14
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
15
|
-
|
|
16
|
-
//#region src/flows/deposit/widgets/cash-amount-entry/CashAmountEntry.d.ts
|
|
17
|
-
interface CashAmountEntryProps extends ComponentProps<"div"> {
|
|
18
|
-
/**
|
|
19
|
-
* Optional custom composition. When omitted, the canonical default composition renders —
|
|
20
|
-
* `<Header />` + `<Body>` with method chip + YOU PAY label + Hero (Receive chip subLine) +
|
|
21
|
-
* fiat-absolute Pills + Details breakdown + Notice + `<Footer />`. Pass children to interleave
|
|
22
|
-
* your own elements between compound parts or replace the composition entirely.
|
|
23
|
-
*/
|
|
24
|
-
children?: ReactNode;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Orchestrated `CashAmountEntry` widget — the screen between the cash-method picker and the
|
|
28
|
-
* per-method confirmation form. Reads the chosen cash method from the FSM's `cashAmountEntry.ctx`,
|
|
29
|
-
* the per-method limit from the driver's `cashMethods` entity, and computes the fee breakdown
|
|
30
|
-
* from the mock fixture in {@link computeMockCashBreakdown}. The `cashQuote` driver entity that
|
|
31
|
-
* backs this in production is deferred.
|
|
32
|
-
*
|
|
33
|
-
* Renders nothing on any other FSM state — the dialog routes it under
|
|
34
|
-
* `<Deposit.Step name="cashAmountEntry">`, and the guard inside this component is a belt-and-
|
|
35
|
-
* braces check against host compositions that don't honour the step routing.
|
|
36
|
-
*/
|
|
37
|
-
declare function CashAmountEntry({
|
|
38
|
-
children,
|
|
39
|
-
...props
|
|
40
|
-
}: CashAmountEntryProps): _$react_jsx_runtime0.JSX.Element | null;
|
|
41
|
-
declare function CashAmountEntryDialog({
|
|
42
|
-
open,
|
|
43
|
-
defaultOpen,
|
|
44
|
-
onOpenChange,
|
|
45
|
-
trigger,
|
|
46
|
-
...rootProps
|
|
47
|
-
}: CashAmountEntry.DialogProps): _$react_jsx_runtime0.JSX.Element;
|
|
48
|
-
declare namespace CashAmountEntry {
|
|
49
|
-
type Props = CashAmountEntryProps;
|
|
50
|
-
type DialogProps = CashAmountEntryProps & DialogShellControls;
|
|
51
|
-
const Dialog: typeof CashAmountEntryDialog;
|
|
52
|
-
/**
|
|
53
|
-
* Compound sub-parts aliased on the orchestrated widget so consumers can compose without
|
|
54
|
-
* importing the headless compound separately. Identity-equal to the parts on the compound
|
|
55
|
-
* exported from `@stridge/kit/deposit/compound`.
|
|
56
|
-
*/
|
|
57
|
-
const MethodChip: typeof CashAmountEntryMethodChip;
|
|
58
|
-
const HeroLabel: typeof CashAmountEntryHeroLabel;
|
|
59
|
-
const ReceiveChip: typeof CashAmountEntryReceiveChip;
|
|
60
|
-
const Header: typeof AmountEntryHeader;
|
|
61
|
-
const Body: (props: AmountEntryBodyProps) => _$react_jsx_runtime0.JSX.Element;
|
|
62
|
-
const Hero: typeof AmountEntryHero;
|
|
63
|
-
const Pills: typeof AmountEntryPills;
|
|
64
|
-
const Flow: typeof AmountEntryFlow;
|
|
65
|
-
const Footer: typeof AmountEntryFooter;
|
|
66
|
-
const Notice: typeof AmountEntryNotice;
|
|
67
|
-
const Details: typeof AmountEntryDetails;
|
|
68
|
-
const DetailsRow: typeof AmountEntryDetailsRow;
|
|
69
|
-
}
|
|
70
|
-
//#endregion
|
|
71
|
-
export { CashAmountEntry };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";import{useKitI18n as e}from"../../../../shared/i18n/useKitI18n.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 a}from"../../orchestrator/controller.js";import{formatTokenAmount as o}from"../../../../shared/format/formatTokenAmount.js";import{formatUsd as s}from"../../../../shared/format/formatUsd.js";import{DialogShell as c}from"../../../../shared/dialog/DialogShell.js";import{MOCK_CASH_PRESETS as l,MOCK_RECEIVE_TOKEN as u,computeMockCashBreakdown as d}from"../../shared/cash.js";import{CashAmountEntry as f}from"./compound/CashAmountEntry.js";import"./compound/index.js";import{useEffect as p,useMemo as m,useRef as h,useState as g}from"react";import{Fragment as _,jsx as v,jsxs as y}from"react/jsx-runtime";function b({children:c,...b}){let x=r(),S=a(),{back:C,confirmCashAmount:w}=i(),{_:T}=n(),E=e(),D=S.name===`cashAmountEntry`?S.ctx.cashMethod:void 0,O=S.name===`cashAmountEntry`?S.ctx.amount:void 0,k=x.cashMethods,A=k?.status===`ready`||k?.status===`stale`?k.payload:void 0,j=D?A?.[D]?.limit?.value:void 0,M=D?A?.[D]?.limit?.formatted:void 0,N=l[0]?.value??0,P=O??N,[F,I]=g(P),[L,R]=g(()=>{let e=l.find(e=>e.value===P);return e?String(e.value):void 0}),z=h(D);p(()=>{D&&z.current!==D&&(z.current=D,I(N),R(String(N)))},[D,N]);let B=m(()=>l.map(e=>({value:String(e.value),label:e.label})),[]),V=e=>{let t=Number.parseInt(e,10);Number.isFinite(t)&&(I(t),R(e))},H=e=>{I(e),R(void 0)},U=j===0,W=()=>{if(!U){if(typeof j==`number`&&F!==null&&F>j){I(j),R(void 0);return}F===null||F<=0||!D||w(F)}};if(S.name!==`cashAmountEntry`||!D)return null;let G=!U&&typeof j==`number`&&F!==null&&F>j,K=U?v(t,{id:`FWbwx6`,message:`Cash deposit unavailable for your account`}):G&&M?v(t,{id:`GXkBas`,message:`Max {formattedLimit}`,values:{formattedLimit:M}}):void 0,q=G?T({id:`wkskq5`,message:`Use max`}):void 0,J=d(F,D),Y=o(J.receiveAmount,E,{maxDecimals:2,useGrouping:!0}),X=S.ctx.backTarget===`closed`?void 0:C;return v(f,{...b,cashMethod:D,breakdown:J,formattedReceive:Y,...X?{onChangeMethod:X}:{},amount:F,sendToken:{symbol:`USD`},receiveToken:u,...typeof j==`number`?{max:j}:{},headerTitle:T({id:`kj3M8S`,message:`Deposit`}),currencySymbol:`$`,onAmountChange:H,...X?{onBack:X}:{},presets:B,...L===void 0?{}:{activePreset:L},onPresetSelect:V,...q===void 0?{}:{footerLabel:q},...U?{}:{onContinue:W},notice:K,children:c??y(_,{children:[v(f.Header,{}),y(f.Body,{children:[v(f.MethodChip,{}),v(f.HeroLabel,{children:v(t,{id:`VAxOSg`,message:`You pay`})}),v(f.Hero,{}),v(f.Pills,{}),y(f.Details,{children:[v(f.DetailsRow,{label:v(t,{id:`hehnjM`,message:`Amount`}),children:s(J.amountUsd,E,{showSmallValueClamp:!1})}),v(f.DetailsRow,{label:v(t,{id:`vepIdX`,message:`Crypto price`}),children:v(t,{id:`eUbBqz`,message:`1 {0} = {1}`,values:{0:u.symbol,1:s(J.rate,E,{showSmallValueClamp:!1})}})}),y(f.DetailsRow,{label:v(t,{id:`QFwptY`,message:`Processing fee`}),info:v(t,{id:`C7cyXd`,message:`The processing fee covers the cost of processing your payment through the selected payment method.`}),children:[`− `,s(J.processingFeeUsd,E,{showSmallValueClamp:!1})]}),y(f.DetailsRow,{label:v(t,{id:`y62Dys`,message:`Network fee`}),info:v(t,{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:[`− `,s(J.networkFeeUsd,E,{showSmallValueClamp:!1})]})]})]}),v(f.Footer,{children:v(f.Notice,{})})]})})}function x({open:e,defaultOpen:t,onOpenChange:n,trigger:r,...i}){return v(c,{open:e,defaultOpen:t,onOpenChange:n,trigger:r,children:v(b,{...i})})}(function(e){e.Dialog=x,e.MethodChip=f.MethodChip,e.HeroLabel=f.HeroLabel,e.ReceiveChip=f.ReceiveChip,e.Header=f.Header,e.Body=f.Body,e.Hero=f.Hero,e.Pills=f.Pills,e.Flow=f.Flow,e.Footer=f.Footer,e.Notice=f.Notice,e.Details=f.Details,e.DetailsRow=f.DetailsRow})(b||={});export{b as CashAmountEntry};
|
|
@@ -1,69 +0,0 @@
|
|
|
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 { CashAmountEntryDialogProps, CashAmountEntryHeroLabelProps, CashAmountEntryMethodChipProps, CashAmountEntryProps } from "./types.js";
|
|
10
|
-
import { CashAmountEntryHeroLabel } from "./components/HeroLabel.js";
|
|
11
|
-
import { CashAmountEntryMethodChip } from "./components/MethodChip.js";
|
|
12
|
-
import { CashAmountEntryReceiveChip } from "./components/ReceiveChip.js";
|
|
13
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
14
|
-
|
|
15
|
-
//#region src/flows/deposit/widgets/cash-amount-entry/compound/CashAmountEntry.d.ts
|
|
16
|
-
/**
|
|
17
|
-
* Root of the CashAmountEntry compound. Wraps the shared {@link AmountEntryCompound} and provides
|
|
18
|
-
* cash-flow-specific context (cashMethod, breakdown, formattedReceive, onChangeMethod) to the
|
|
19
|
-
* three cash-flow-internal sub-parts (`MethodChip`, `HeroLabel`, `ReceiveChip`) so children render
|
|
20
|
-
* without prop-drilling from the host.
|
|
21
|
-
*
|
|
22
|
-
* Defaults the `subLine` slot to a `<CashAmountEntry.ReceiveChip />` when the host doesn't provide
|
|
23
|
-
* one explicitly — that's the canonical Paper composition. Pass `subLine={…}` to override.
|
|
24
|
-
*
|
|
25
|
-
* Parts:
|
|
26
|
-
* - {@link CashAmountEntry.MethodChip}
|
|
27
|
-
* - {@link CashAmountEntry.HeroLabel}
|
|
28
|
-
* - {@link CashAmountEntry.ReceiveChip}
|
|
29
|
-
*
|
|
30
|
-
* The AmountEntry compound parts (`Header`, `Body`, `Hero`, `Pills`, `Details`, `DetailsRow`,
|
|
31
|
-
* `Notice`, `Footer`) are re-exposed off the namespace too so consumers can compose the full tree
|
|
32
|
-
* without importing two compounds. Identity-equal to the parts on
|
|
33
|
-
* {@link AmountEntryCompound}.
|
|
34
|
-
*
|
|
35
|
-
* Dialog form: {@link CashAmountEntry.Dialog} pre-composes the widget into a
|
|
36
|
-
* `Dialog.Root + Dialog.Trigger + Dialog.Content` shell.
|
|
37
|
-
*/
|
|
38
|
-
declare function CashAmountEntry(props: CashAmountEntryProps): _$react_jsx_runtime0.JSX.Element;
|
|
39
|
-
declare function CashAmountEntryDialog({
|
|
40
|
-
open,
|
|
41
|
-
defaultOpen,
|
|
42
|
-
onOpenChange,
|
|
43
|
-
trigger,
|
|
44
|
-
children,
|
|
45
|
-
...rootProps
|
|
46
|
-
}: CashAmountEntryDialogProps): _$react_jsx_runtime0.JSX.Element;
|
|
47
|
-
declare namespace CashAmountEntry {
|
|
48
|
-
type Props = CashAmountEntryProps;
|
|
49
|
-
type MethodChipProps = CashAmountEntryMethodChipProps;
|
|
50
|
-
type HeroLabelProps = CashAmountEntryHeroLabelProps;
|
|
51
|
-
type DialogProps = CashAmountEntryDialogProps;
|
|
52
|
-
/** Cash-flow-specific sub-parts. */
|
|
53
|
-
const MethodChip: typeof CashAmountEntryMethodChip;
|
|
54
|
-
const HeroLabel: typeof CashAmountEntryHeroLabel;
|
|
55
|
-
const ReceiveChip: typeof CashAmountEntryReceiveChip;
|
|
56
|
-
/** AmountEntry compound parts re-exposed for one-stop composition. */
|
|
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
|
-
const Dialog: typeof CashAmountEntryDialog;
|
|
67
|
-
}
|
|
68
|
-
//#endregion
|
|
69
|
-
export { CashAmountEntry };
|
|
@@ -1 +0,0 @@
|
|
|
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{CashAmountEntryHeroLabel as n}from"./components/HeroLabel.js";import{CashAmountEntryContext as r}from"./context.js";import{CashAmountEntryMethodChip as i}from"./components/MethodChip.js";import{CashAmountEntryReceiveChip as a}from"./components/ReceiveChip.js";import{useMemo as o}from"react";import{jsx as s}from"react/jsx-runtime";const c=s(a,{});function l(e){let{cashMethod:n,breakdown:i,formattedReceive:a,onChangeMethod:l,subLine:u,children:d,...f}=e;return s(r,{value:o(()=>({cashMethod:n,breakdown:i,formattedReceive:a,...l?{onChangeMethod:l}:{}}),[n,i,a,l]),children:s(t,{...f,subLine:u??c,children:d})})}function u({open:t,defaultOpen:n,onOpenChange:r,trigger:i,children:a,...o}){return s(e,{open:t,defaultOpen:n,onOpenChange:r,trigger:i,children:s(l,{...o,children:a})})}(function(e){e.MethodChip=i,e.HeroLabel=n,e.ReceiveChip=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=u})(l||={});export{l as CashAmountEntry};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
//#region src/flows/deposit/widgets/cash-amount-entry/compound/CashAmountEntry.slots.d.ts
|
|
2
|
-
/**
|
|
3
|
-
* `data-stridge-slot` constants for the cash-amount-entry widget's cash-flow-internal sub-parts
|
|
4
|
-
* (method chip, hero label, receive chip). The amount-input chrome itself stamps the shared
|
|
5
|
-
* `AMOUNT_ENTRY_SLOTS` from `#/shared/widgets/amount-entry`; this file only covers the cash
|
|
6
|
-
* additions.
|
|
7
|
-
*/
|
|
8
|
-
declare const CASH_AMOUNT_ENTRY_SLOTS: {
|
|
9
|
-
readonly methodChip: "cash-amount-entry-method-chip";
|
|
10
|
-
readonly methodChipChange: "cash-amount-entry-method-chip-change";
|
|
11
|
-
readonly heroLabel: "cash-amount-entry-hero-label";
|
|
12
|
-
readonly receiveChip: "cash-amount-entry-receive-chip";
|
|
13
|
-
};
|
|
14
|
-
type CashAmountEntrySlot = (typeof CASH_AMOUNT_ENTRY_SLOTS)[keyof typeof CASH_AMOUNT_ENTRY_SLOTS];
|
|
15
|
-
//#endregion
|
|
16
|
-
export { CASH_AMOUNT_ENTRY_SLOTS, CashAmountEntrySlot };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e={methodChip:`cash-amount-entry-method-chip`,methodChipChange:`cash-amount-entry-method-chip-change`,heroLabel:`cash-amount-entry-hero-label`,receiveChip:`cash-amount-entry-receive-chip`};export{e as CASH_AMOUNT_ENTRY_SLOTS};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e={heroLabelWrap:{"CashAmountEntry__styles.heroLabelWrap":`CashAmountEntry__styles.heroLabelWrap`,"display-k1xSpc":`x78zum5`,"justifyContent-kjj79g":`xl56j7k`,"paddingInlineEnd-kwRFfy":`x1o5r3ls`,"paddingInlineStart-kZCmMZ":`xz7312c`,"paddingTop-kLKAdn":`xyamay9`,$$css:`@stridge/kit:src/flows/deposit/widgets/cash-amount-entry/compound/CashAmountEntry.styles.ts:12`},heroLabel:{"CashAmountEntry__styles.heroLabel":`CashAmountEntry__styles.heroLabel`,"margin-kogj98":`x1ghz6dp`,"letterSpacing-kb6lSQ":`x1labic3`,$$css:`@stridge/kit:src/flows/deposit/widgets/cash-amount-entry/compound/CashAmountEntry.styles.ts:19`},methodChipWrap:{"CashAmountEntry__styles.methodChipWrap":`CashAmountEntry__styles.methodChipWrap`,"display-k1xSpc":`x78zum5`,"justifyContent-kjj79g":`xl56j7k`,"paddingTop-kLKAdn":`xyamay9`,"paddingInlineEnd-kwRFfy":`x1o5r3ls`,"paddingInlineStart-kZCmMZ":`xz7312c`,$$css:`@stridge/kit:src/flows/deposit/widgets/cash-amount-entry/compound/CashAmountEntry.styles.ts:24`},methodChip:{"CashAmountEntry__styles.methodChip":`CashAmountEntry__styles.methodChip`,"display-k1xSpc":`x3nfvp2`,"alignItems-kGNEyG":`x6s0dn4`,"gap-kOIVth":`x167g77z`,"paddingBlock-k8WAf4":`x1t0vds8`,"paddingInlineStart-kZCmMZ":`x25sj25`,"paddingInlineEnd-kwRFfy":`xpdmqnj`,"borderRadius-kaIpWk":`x1npxkrn`,"backgroundColor-kWkggS":`x1qkydf4`,"borderColor-kVAM5u":`x12c9lpl`,"borderStyle-ksu8eU":`x1y0btm7`,"borderWidth-kMzoRj":`xmkeg23`,$$css:`@stridge/kit:src/flows/deposit/widgets/cash-amount-entry/compound/CashAmountEntry.styles.ts:31`},methodChipIcon:{"CashAmountEntry__styles.methodChipIcon":`CashAmountEntry__styles.methodChipIcon`,"display-k1xSpc":`x3nfvp2`,"alignItems-kGNEyG":`x6s0dn4`,"justifyContent-kjj79g":`xl56j7k`,"width-kzqmXN":`x17z2i9w`,"height-kZKoxP":`x17rw0jw`,"flexShrink-kmuXW":`x2lah0s`,"color-kMwMTN":`xzn0pkc`,$$css:`@stridge/kit:src/flows/deposit/widgets/cash-amount-entry/compound/CashAmountEntry.styles.ts:44`},methodChipLabel:{"CashAmountEntry__styles.methodChipLabel":`CashAmountEntry__styles.methodChipLabel`,"margin-kogj98":`x1ghz6dp`,$$css:`@stridge/kit:src/flows/deposit/widgets/cash-amount-entry/compound/CashAmountEntry.styles.ts:53`},methodChipChange:{"CashAmountEntry__styles.methodChipChange":`CashAmountEntry__styles.methodChipChange`,"appearance-kysU6D":`xjyslct`,"margin-kogj98":`x1ghz6dp`,"padding-kmVPX3":`x1717udv`,"font-kVVagm":`xln7xf2`,"color-kMwMTN":`xi96bwj`,"cursor-kkrTdU":`x1ypdohk`,":hover_color-kDPRdz":`xpscirx`,":focus-visible_outline-k3Woio":`x67ar3w`,":focus-visible_outlineOffset-kiEn40":`x7s97pk`,":focus-visible_borderRadius-k7aC84":`x63abuj`,$$css:`@stridge/kit:src/flows/deposit/widgets/cash-amount-entry/compound/CashAmountEntry.styles.ts:56`},receiveLine:{"CashAmountEntry__styles.receiveLine":`CashAmountEntry__styles.receiveLine`,"display-k1xSpc":`x3nfvp2`,"alignItems-kGNEyG":`x6s0dn4`,"gap-kOIVth":`x167g77z`,$$css:`@stridge/kit:src/flows/deposit/widgets/cash-amount-entry/compound/CashAmountEntry.styles.ts:76`},receiveLabel:{"CashAmountEntry__styles.receiveLabel":`CashAmountEntry__styles.receiveLabel`,"margin-kogj98":`x1ghz6dp`,$$css:`@stridge/kit:src/flows/deposit/widgets/cash-amount-entry/compound/CashAmountEntry.styles.ts:81`},receiveChip:{"CashAmountEntry__styles.receiveChip":`CashAmountEntry__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/cash-amount-entry/compound/CashAmountEntry.styles.ts:84`},receiveChipAmount:{"CashAmountEntry__styles.receiveChipAmount":`CashAmountEntry__styles.receiveChipAmount`,"margin-kogj98":`x1ghz6dp`,$$css:`@stridge/kit:src/flows/deposit/widgets/cash-amount-entry/compound/CashAmountEntry.styles.ts:97`}};export{e as styles};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { CashAmountEntryHeroLabelProps } from "../types.js";
|
|
2
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
-
|
|
4
|
-
//#region src/flows/deposit/widgets/cash-amount-entry/compound/components/HeroLabel.d.ts
|
|
5
|
-
/**
|
|
6
|
-
* Small uppercase label rendered above the hero band on cash amount-entry. Mirrors the Paper
|
|
7
|
-
* design's "YOU PAY" reading. Cash-flow-internal — the wallet path doesn't use a hero label.
|
|
8
|
-
*/
|
|
9
|
-
declare function CashAmountEntryHeroLabel({
|
|
10
|
-
children
|
|
11
|
-
}: CashAmountEntryHeroLabelProps): _$react_jsx_runtime0.JSX.Element;
|
|
12
|
-
//#endregion
|
|
13
|
-
export { CashAmountEntryHeroLabel };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";import{text as e}from"../../../../../../shared/ui/Text/Text.js";import"../../../../../../ui/index.js";import{CASH_AMOUNT_ENTRY_SLOTS as t}from"../CashAmountEntry.slots.js";import{styles as n}from"../CashAmountEntry.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 CashAmountEntryHeroLabel};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { CashAmountEntryMethodChipProps } from "../types.js";
|
|
2
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
-
|
|
4
|
-
//#region src/flows/deposit/widgets/cash-amount-entry/compound/components/MethodChip.d.ts
|
|
5
|
-
/**
|
|
6
|
-
* Compact chip above the hero showing which cash method the user picked, with a `Change` link
|
|
7
|
-
* that takes them back to the method picker. Cash-flow-internal — the crypto path has no equivalent
|
|
8
|
-
* (the asset picker fills the same "what's selected, change it" role inline on the deposit method
|
|
9
|
-
* tile).
|
|
10
|
-
*
|
|
11
|
-
* Reads `cashMethod` and `onChangeMethod` from context. Pass `onChange={null}` to suppress the
|
|
12
|
-
* `Change` link even when context supplies a callback; pass an explicit function to override.
|
|
13
|
-
*/
|
|
14
|
-
declare function CashAmountEntryMethodChip({
|
|
15
|
-
onChange
|
|
16
|
-
}?: CashAmountEntryMethodChipProps): _$react_jsx_runtime0.JSX.Element;
|
|
17
|
-
//#endregion
|
|
18
|
-
export { CashAmountEntryMethodChip };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";import{Trans as e}from"../../../../../../shared/i18n/Trans.js";import"../../../../../../i18n/index.js";import{ApplePayIcon as t}from"../../../../../../shared/icons/ApplePayIcon.js";import{CardIcon as n}from"../../../../../../shared/icons/CardIcon.js";import{GooglePayIcon as r}from"../../../../../../shared/icons/GooglePayIcon.js";import"../../../../../../icons/index.js";import{text as i}from"../../../../../../shared/ui/Text/Text.js";import"../../../../../../ui/index.js";import{CASH_AMOUNT_ENTRY_SLOTS as a}from"../CashAmountEntry.slots.js";import{styles as o}from"../CashAmountEntry.styles.js";import{useCashAmountEntryContext as s}from"../context.js";import{jsx as c,jsxs as l}from"react/jsx-runtime";import*as u from"@stylexjs/stylex";const d={width:13,height:13,"aria-hidden":!0};function f({onChange:t}={}){let n=s(`CashAmountEntry.MethodChip`),r=t===null?void 0:t??n.onChangeMethod;return c(`div`,{...u.props(o.methodChipWrap),children:l(`div`,{"data-stridge-slot":a.methodChip,...u.props(o.methodChip),children:[c(`span`,{...u.props(o.methodChipIcon),children:p(n.cashMethod)}),c(i.span,{size:`sm`,fontWeight:`medium`,leading:`tight`,...u.props(o.methodChipLabel),children:m(n.cashMethod)}),r?c(`button`,{type:`button`,onClick:r,"data-stridge-slot":a.methodChipChange,...u.props(o.methodChipChange),children:c(i.span,{size:`sm`,fontWeight:`medium`,leading:`tight`,color:`inherit`,children:c(e,{id:`o-XJ9D`,message:`Change`})})}):null]})})}function p(e){return c(e===`applePay`?t:e===`googlePay`?r:n,{...d})}function m(t){return t===`applePay`?c(e,{id:`TMA5Ot`,message:`Paying with Apple Pay`}):t===`googlePay`?c(e,{id:`FkAVbF`,message:`Paying with Google Pay`}):c(e,{id:`tInLgk`,message:`Paying with Card`})}export{f as CashAmountEntryMethodChip};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
|
-
|
|
3
|
-
//#region src/flows/deposit/widgets/cash-amount-entry/compound/components/ReceiveChip.d.ts
|
|
4
|
-
/**
|
|
5
|
-
* Read-only receive chip slotted into the hero's `subLine` for cash amount-entry. Mirrors the
|
|
6
|
-
* Paper design's "Receive [USDC logo] 24.21 USDC" reading. Cash-flow-internal — the wallet path's
|
|
7
|
-
* Hero uses the swap toggle in this slot, not a static chip.
|
|
8
|
-
*
|
|
9
|
-
* Reads `formattedReceive` from context. The token is sourced from
|
|
10
|
-
* {@link MOCK_RECEIVE_TOKEN} while the cash backend is mocked.
|
|
11
|
-
*/
|
|
12
|
-
declare function CashAmountEntryReceiveChip(): _$react_jsx_runtime0.JSX.Element;
|
|
13
|
-
//#endregion
|
|
14
|
-
export { CashAmountEntryReceiveChip };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";import{Trans as e}from"../../../../../../shared/i18n/Trans.js";import"../../../../../../i18n/index.js";import{text as t}from"../../../../../../shared/ui/Text/Text.js";import{TokenLogo as n}from"../../../../../../shared/ui/TokenLogo/TokenLogo.js";import"../../../../../../shared/ui/TokenLogo/index.js";import"../../../../../../ui/index.js";import{CASH_AMOUNT_ENTRY_SLOTS as r}from"../CashAmountEntry.slots.js";import{styles as i}from"../CashAmountEntry.styles.js";import{useCashAmountEntryContext as a}from"../context.js";import{MOCK_RECEIVE_TOKEN as o}from"../../../../shared/cash.js";import{jsx as s,jsxs as c}from"react/jsx-runtime";import*as l from"@stylexjs/stylex";function u(){let{formattedReceive:u}=a(`CashAmountEntry.ReceiveChip`),d=o;return c(`span`,{...l.props(i.receiveLine),children:[s(t.span,{size:`sm`,leading:`tight`,color:`subdued`,...l.props(i.receiveLabel),children:s(e,{id:`lDgVWA`,message:`Receive`})}),c(`span`,{"data-stridge-slot":r.receiveChip,...l.props(i.receiveChip),children:[s(n,{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}),c(t.span,{size:`sm`,fontWeight:`medium`,leading:`tight`,...l.props(i.receiveChipAmount),children:[u,` `,d.symbol]})]})]})}export{u as CashAmountEntryReceiveChip};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { CashAmountEntryDialogProps, CashAmountEntryHeroLabelProps, CashAmountEntryMethodChipProps, CashAmountEntryProps } from "./types.js";
|
|
2
|
-
import { CashAmountEntry } from "./CashAmountEntry.js";
|
|
3
|
-
import { CASH_AMOUNT_ENTRY_SLOTS, CashAmountEntrySlot } from "./CashAmountEntry.slots.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./CashAmountEntry.slots.js";import"./CashAmountEntry.js";
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { CashMethodId } from "../../../orchestrator/types.js";
|
|
2
|
-
import { DialogShellControls } from "../../../../../shared/dialog/DialogShell.js";
|
|
3
|
-
import { AmountEntryProps } from "../../../../../shared/widgets/amount-entry/compound/types.js";
|
|
4
|
-
import { CashAmountBreakdown } from "../../../shared/cash.js";
|
|
5
|
-
import { ReactNode } from "react";
|
|
6
|
-
|
|
7
|
-
//#region src/flows/deposit/widgets/cash-amount-entry/compound/types.d.ts
|
|
8
|
-
/**
|
|
9
|
-
* Public props accepted by the {@link CashAmountEntry} compound root. Extends the underlying
|
|
10
|
-
* {@link AmountEntryProps} shape with cash-flow-specific fields the orchestrated wrapper populates
|
|
11
|
-
* from the deposit FSM ctx + the mock cash breakdown.
|
|
12
|
-
*/
|
|
13
|
-
interface CashAmountEntryProps extends AmountEntryProps {
|
|
14
|
-
/** Cash method picked on the previous step. */
|
|
15
|
-
cashMethod: CashMethodId;
|
|
16
|
-
/** Mock fee + receive breakdown computed from the entered amount + chosen method. */
|
|
17
|
-
breakdown: CashAmountBreakdown;
|
|
18
|
-
/** Pre-formatted receive amount (e.g. `"24.21"`). Rendered inside the ReceiveChip. */
|
|
19
|
-
formattedReceive: string;
|
|
20
|
-
/**
|
|
21
|
-
* Callback invoked when the user clicks `Change` on the method chip. When omitted, the chip
|
|
22
|
-
* renders without the `Change` link.
|
|
23
|
-
*/
|
|
24
|
-
onChangeMethod?: () => void;
|
|
25
|
-
}
|
|
26
|
-
/** Props for {@link CashAmountEntry.MethodChip}. */
|
|
27
|
-
interface CashAmountEntryMethodChipProps {
|
|
28
|
-
/** Override the context's `onChangeMethod`. Pass `null` to suppress the `Change` link. */
|
|
29
|
-
onChange?: (() => void) | null;
|
|
30
|
-
}
|
|
31
|
-
/** Props for {@link CashAmountEntry.HeroLabel}. */
|
|
32
|
-
interface CashAmountEntryHeroLabelProps {
|
|
33
|
-
children: ReactNode;
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Props for `<CashAmountEntry.Dialog>` — the dialog form of the CashAmountEntry widget. Combines
|
|
37
|
-
* the widget root props with the shared dialog shell controls (`open` / `defaultOpen` /
|
|
38
|
-
* `onOpenChange` / `trigger`).
|
|
39
|
-
*/
|
|
40
|
-
type CashAmountEntryDialogProps = CashAmountEntryProps & DialogShellControls;
|
|
41
|
-
//#endregion
|
|
42
|
-
export { CashAmountEntryDialogProps, CashAmountEntryHeroLabelProps, CashAmountEntryMethodChipProps, CashAmountEntryProps };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import { CashAmountEntry } from "./CashAmountEntry.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./CashAmountEntry.js";
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { DialogShellControls } from "../../../../shared/dialog/DialogShell.js";
|
|
2
|
-
import { CashConfirmApplePayBody } from "./compound/components/ApplePayBody.js";
|
|
3
|
-
import { CashConfirmBody } from "./compound/components/Body.js";
|
|
4
|
-
import { CashConfirmCardBody } from "./compound/components/CardBody.js";
|
|
5
|
-
import { CashConfirmGooglePayBody } from "./compound/components/GooglePayBody.js";
|
|
6
|
-
import { CashConfirmHeader } from "./compound/components/Header.js";
|
|
7
|
-
import { CashConfirmSummary } from "./compound/components/Summary.js";
|
|
8
|
-
import { ComponentProps, ReactNode } from "react";
|
|
9
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
10
|
-
|
|
11
|
-
//#region src/flows/deposit/widgets/cash-confirm/CashConfirm.d.ts
|
|
12
|
-
interface CashConfirmProps extends ComponentProps<"div"> {
|
|
13
|
-
/**
|
|
14
|
-
* Optional custom composition. When omitted, the canonical default composition renders —
|
|
15
|
-
* `<Header />` + `<Body>` (which auto-renders `<Summary />` + the cashMethod-branched per-method
|
|
16
|
-
* body). Pass children to interleave your own elements between compound parts or replace the
|
|
17
|
-
* composition entirely.
|
|
18
|
-
*/
|
|
19
|
-
children?: ReactNode;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Orchestrated `CashConfirm` widget — the per-method confirm screen that follows
|
|
23
|
-
* `cashAmountEntry`. Reads the chosen cash method + amount + phase from the FSM ctx and the brand
|
|
24
|
-
* name from the driver's `brand` entity, then renders the {@link CashConfirmCompound}. Schedules
|
|
25
|
-
* its own `cashMethodReady` dispatch after a short delay so the loading → ready phase transition
|
|
26
|
-
* is observable in the mock canvas.
|
|
27
|
-
*
|
|
28
|
-
* Renders nothing on any other FSM state — the dialog routes the widget under
|
|
29
|
-
* `<Deposit.Step name="cashConfirm">`, and the guard below is a belt-and-braces check for hosts
|
|
30
|
-
* that bypass the step routing.
|
|
31
|
-
*
|
|
32
|
-
* Real card-form / Apple Pay merchant session / Google Pay `PaymentRequest` SDK integrations are
|
|
33
|
-
* deferred. The mock loading lifecycle here is the seam those will replace.
|
|
34
|
-
*/
|
|
35
|
-
declare function CashConfirm({
|
|
36
|
-
children,
|
|
37
|
-
...props
|
|
38
|
-
}: CashConfirmProps): _$react_jsx_runtime0.JSX.Element | null;
|
|
39
|
-
declare function CashConfirmDialog({
|
|
40
|
-
open,
|
|
41
|
-
defaultOpen,
|
|
42
|
-
onOpenChange,
|
|
43
|
-
trigger,
|
|
44
|
-
...rootProps
|
|
45
|
-
}: CashConfirm.DialogProps): _$react_jsx_runtime0.JSX.Element;
|
|
46
|
-
declare namespace CashConfirm {
|
|
47
|
-
type Props = CashConfirmProps;
|
|
48
|
-
type DialogProps = CashConfirmProps & DialogShellControls;
|
|
49
|
-
const Dialog: typeof CashConfirmDialog;
|
|
50
|
-
/**
|
|
51
|
-
* Compound sub-parts aliased on the orchestrated widget so consumers can compose without
|
|
52
|
-
* importing the headless compound separately. Identity-equal to the parts on the compound
|
|
53
|
-
* exported from `@stridge/kit/deposit/compound`.
|
|
54
|
-
*/
|
|
55
|
-
const Header: typeof CashConfirmHeader;
|
|
56
|
-
const Body: typeof CashConfirmBody;
|
|
57
|
-
const Summary: typeof CashConfirmSummary;
|
|
58
|
-
const CardBody: typeof CashConfirmCardBody;
|
|
59
|
-
const ApplePayBody: typeof CashConfirmApplePayBody;
|
|
60
|
-
const GooglePayBody: typeof CashConfirmGooglePayBody;
|
|
61
|
-
}
|
|
62
|
-
//#endregion
|
|
63
|
-
export { CashConfirm };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";import{useDepositSnapshot as e}from"../../driver/context.js";import{useDepositActions as t,useDepositEffectiveState as n}from"../../orchestrator/controller.js";import{DialogShell as r}from"../../../../shared/dialog/DialogShell.js";import{LOADING_TRANSITION_MS as i}from"./mocks.js";import{CashConfirm as a}from"./compound/CashConfirm.js";import"./compound/index.js";import{useEffect as o}from"react";import{Fragment as s,jsx as c,jsxs as l}from"react/jsx-runtime";const u=l(s,{children:[c(a.Header,{}),c(a.Body,{})]});function d({children:r,...s}){let l=e(),d=n(),{back:f,cashMethodReady:p}=t(),m=d.name===`cashConfirm`?d.ctx.phase.kind:void 0;if(o(()=>{if(m!==`loading`)return;let e=setTimeout(()=>{p()},i);return()=>clearTimeout(e)},[m,d.name===`cashConfirm`?d.ctx.cashMethod:void 0,p]),d.name!==`cashConfirm`)return null;let{cashMethod:h,amount:g,phase:_}=d.ctx,v=l.brand.status===`ready`||l.brand.status===`stale`?l.brand.payload:void 0;return c(a,{...s,phase:_,cashMethod:h,amount:g,...v?.name?{brandName:v.name}:{},onBack:f,children:r??u})}function f({open:e,defaultOpen:t,onOpenChange:n,trigger:i,...a}){return c(r,{open:e,defaultOpen:t,onOpenChange:n,trigger:i,children:c(d,{...a})})}(function(e){e.Dialog=f,e.Header=a.Header,e.Body=a.Body,e.Summary=a.Summary,e.CardBody=a.CardBody,e.ApplePayBody=a.ApplePayBody,e.GooglePayBody=a.GooglePayBody})(d||={});export{d as CashConfirm};
|