@stridge/kit 0.1.0-alpha.60 → 0.1.0-alpha.61
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 +13 -10
- package/dist/deposit/compound/index.js +1 -1
- package/dist/deposit/widgets/index.d.ts +4 -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 +77 -20
- package/dist/flows/deposit/driver/types.d.ts +64 -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 +102 -59
- package/dist/flows/deposit/shared/checkoutPopup.js +1 -0
- package/dist/flows/deposit/shared/onramp.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 +64 -0
- package/dist/flows/deposit/widgets/onramp-amount-entry/OnrampAmountEntry.js +1 -0
- package/dist/flows/deposit/widgets/onramp-amount-entry/compound/OnrampAmountEntry.d.ts +62 -0
- package/dist/flows/deposit/widgets/onramp-amount-entry/compound/OnrampAmountEntry.js +1 -0
- package/dist/flows/deposit/widgets/onramp-amount-entry/compound/OnrampAmountEntry.slots.d.ts +14 -0
- package/dist/flows/deposit/widgets/onramp-amount-entry/compound/OnrampAmountEntry.slots.js +1 -0
- package/dist/flows/deposit/widgets/onramp-amount-entry/compound/OnrampAmountEntry.styles.js +1 -0
- package/dist/flows/deposit/widgets/onramp-amount-entry/compound/components/HeroLabel.d.ts +13 -0
- package/dist/flows/deposit/widgets/onramp-amount-entry/compound/components/HeroLabel.js +1 -0
- package/dist/flows/deposit/widgets/onramp-amount-entry/compound/components/ReceiveChip.d.ts +14 -0
- package/dist/flows/deposit/widgets/onramp-amount-entry/compound/components/ReceiveChip.js +1 -0
- package/dist/flows/deposit/widgets/{cash-amount-entry → onramp-amount-entry}/compound/context.js +1 -1
- package/dist/flows/deposit/widgets/onramp-amount-entry/compound/index.d.ts +3 -0
- package/dist/flows/deposit/widgets/onramp-amount-entry/compound/index.js +1 -0
- package/dist/flows/deposit/widgets/onramp-amount-entry/compound/types.d.ts +29 -0
- package/dist/flows/deposit/widgets/onramp-amount-entry/index.d.ts +1 -0
- package/dist/flows/deposit/widgets/onramp-amount-entry/index.js +1 -0
- package/dist/flows/deposit/widgets/onramp-confirm/OnrampConfirm.d.ts +50 -0
- package/dist/flows/deposit/widgets/onramp-confirm/OnrampConfirm.js +1 -0
- package/dist/flows/deposit/widgets/onramp-confirm/compound/OnrampConfirm.d.ts +42 -0
- package/dist/flows/deposit/widgets/onramp-confirm/compound/OnrampConfirm.js +1 -0
- package/dist/flows/deposit/widgets/onramp-confirm/compound/OnrampConfirm.slots.d.ts +24 -0
- package/dist/flows/deposit/widgets/onramp-confirm/compound/OnrampConfirm.slots.js +1 -0
- package/dist/flows/deposit/widgets/onramp-confirm/compound/OnrampConfirm.styles.js +1 -0
- package/dist/flows/deposit/widgets/onramp-confirm/compound/components/Body.d.ts +16 -0
- package/dist/flows/deposit/widgets/onramp-confirm/compound/components/Body.js +1 -0
- package/dist/flows/deposit/widgets/onramp-confirm/compound/components/Header.d.ts +15 -0
- package/dist/flows/deposit/widgets/onramp-confirm/compound/components/Header.js +1 -0
- package/dist/flows/deposit/widgets/onramp-confirm/compound/components/Summary.d.ts +15 -0
- package/dist/flows/deposit/widgets/onramp-confirm/compound/components/Summary.js +1 -0
- package/dist/flows/deposit/widgets/onramp-confirm/compound/context.d.ts +25 -0
- package/dist/flows/deposit/widgets/{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 +62 -0
- package/dist/flows/deposit/widgets/onramp-confirm/index.d.ts +1 -0
- package/dist/flows/deposit/widgets/onramp-confirm/index.js +1 -0
- package/dist/flows/deposit/widgets/onramp-payment-pending/OnrampPaymentPending.d.ts +48 -0
- package/dist/flows/deposit/widgets/onramp-payment-pending/OnrampPaymentPending.js +1 -0
- package/dist/flows/deposit/widgets/onramp-payment-pending/compound/OnrampPaymentPending.d.ts +63 -0
- package/dist/flows/deposit/widgets/onramp-payment-pending/compound/OnrampPaymentPending.js +1 -0
- package/dist/flows/deposit/widgets/onramp-payment-pending/compound/OnrampPaymentPending.slots.d.ts +14 -0
- package/dist/flows/deposit/widgets/onramp-payment-pending/compound/OnrampPaymentPending.slots.js +1 -0
- package/dist/flows/deposit/widgets/onramp-payment-pending/compound/components/ReopenButton.d.ts +11 -0
- package/dist/flows/deposit/widgets/onramp-payment-pending/compound/components/ReopenButton.js +1 -0
- package/dist/flows/deposit/widgets/onramp-payment-pending/compound/context.js +1 -0
- package/dist/flows/deposit/widgets/onramp-payment-pending/compound/index.d.ts +2 -0
- package/dist/flows/deposit/widgets/onramp-payment-pending/compound/index.js +1 -0
- package/dist/flows/deposit/widgets/onramp-payment-pending/index.d.ts +1 -0
- package/dist/flows/deposit/widgets/onramp-payment-pending/index.js +1 -0
- package/dist/flows/deposit/widgets/success-state/SuccessState.js +1 -1
- package/dist/flows/deposit/widgets/transfer-crypto/compound/components/QrCode.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 +1 -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/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/orchestrator/index.js +1 -1
- package/dist/shared/orchestrator/useOnrampSessionWatcher.js +1 -0
- package/dist/shared/ui/Tabs/Tabs.d.ts +2 -2
- 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/components/Footer.js +1 -1
- package/dist/shared/widgets/amount-entry/compound/types.d.ts +6 -0
- 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 +4 -44
- package/dist/types.d.ts +3 -3
- 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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={root:`onramp-amount-entry`,heroLabel:`onramp-amount-entry-hero-label`,receiveChip:`onramp-amount-entry-receive-chip`};export{e as ONRAMP_AMOUNT_ENTRY_SLOTS};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={heroLabelWrap:{"OnrampAmountEntry__styles.heroLabelWrap":`OnrampAmountEntry__styles.heroLabelWrap`,"display-k1xSpc":`x78zum5`,"justifyContent-kjj79g":`xl56j7k`,"paddingInlineEnd-kwRFfy":`x1o5r3ls`,"paddingInlineStart-kZCmMZ":`xz7312c`,"paddingTop-kLKAdn":`xyamay9`,$$css:`@stridge/kit:src/flows/deposit/widgets/onramp-amount-entry/compound/OnrampAmountEntry.styles.ts:12`},heroLabel:{"OnrampAmountEntry__styles.heroLabel":`OnrampAmountEntry__styles.heroLabel`,"margin-kogj98":`x1ghz6dp`,"letterSpacing-kb6lSQ":`x1labic3`,$$css:`@stridge/kit:src/flows/deposit/widgets/onramp-amount-entry/compound/OnrampAmountEntry.styles.ts:19`},receiveLine:{"OnrampAmountEntry__styles.receiveLine":`OnrampAmountEntry__styles.receiveLine`,"display-k1xSpc":`x3nfvp2`,"alignItems-kGNEyG":`x6s0dn4`,"gap-kOIVth":`x167g77z`,$$css:`@stridge/kit:src/flows/deposit/widgets/onramp-amount-entry/compound/OnrampAmountEntry.styles.ts:25`},receiveLabel:{"OnrampAmountEntry__styles.receiveLabel":`OnrampAmountEntry__styles.receiveLabel`,"margin-kogj98":`x1ghz6dp`,$$css:`@stridge/kit:src/flows/deposit/widgets/onramp-amount-entry/compound/OnrampAmountEntry.styles.ts:30`},receiveChip:{"OnrampAmountEntry__styles.receiveChip":`OnrampAmountEntry__styles.receiveChip`,"display-k1xSpc":`x3nfvp2`,"alignItems-kGNEyG":`x6s0dn4`,"gap-kOIVth":`x17d4w8g`,"paddingBlock-k8WAf4":`x12ulsxz`,"paddingInlineStart-kZCmMZ":`x25sj25`,"paddingInlineEnd-kwRFfy":`x2vl965`,"borderRadius-kaIpWk":`x1npxkrn`,"backgroundColor-kWkggS":`xvaq5cg`,"borderColor-kVAM5u":`x12c9lpl`,"borderStyle-ksu8eU":`x1y0btm7`,"borderWidth-kMzoRj":`xmkeg23`,$$css:`@stridge/kit:src/flows/deposit/widgets/onramp-amount-entry/compound/OnrampAmountEntry.styles.ts:33`},receiveChipAmount:{"OnrampAmountEntry__styles.receiveChipAmount":`OnrampAmountEntry__styles.receiveChipAmount`,"margin-kogj98":`x1ghz6dp`,$$css:`@stridge/kit:src/flows/deposit/widgets/onramp-amount-entry/compound/OnrampAmountEntry.styles.ts:46`}};export{e as styles};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { OnrampAmountEntryHeroLabelProps } from "../types.js";
|
|
2
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/flows/deposit/widgets/onramp-amount-entry/compound/components/HeroLabel.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Small uppercase label rendered above the hero band on onramp amount-entry. Mirrors the design's
|
|
7
|
+
* "YOU PAY" reading. Onramp-flow-internal — the wallet path doesn't use a hero label.
|
|
8
|
+
*/
|
|
9
|
+
declare function OnrampAmountEntryHeroLabel({
|
|
10
|
+
children
|
|
11
|
+
}: OnrampAmountEntryHeroLabelProps): _$react_jsx_runtime0.JSX.Element;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { OnrampAmountEntryHeroLabel };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{text as e}from"../../../../../../shared/ui/Text/Text.js";import"../../../../../../ui/index.js";import{ONRAMP_AMOUNT_ENTRY_SLOTS as t}from"../OnrampAmountEntry.slots.js";import{styles as n}from"../OnrampAmountEntry.styles.js";import{jsx as r}from"react/jsx-runtime";import*as i from"@stylexjs/stylex";function a({children:a}){return r(`div`,{...i.props(n.heroLabelWrap),children:r(e.span,{size:`meta`,fontWeight:`medium`,leading:`tight`,color:`subdued`,transform:`uppercase`,"data-stridge-slot":t.heroLabel,...i.props(n.heroLabel),children:a})})}export{a as OnrampAmountEntryHeroLabel};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
|
+
|
|
3
|
+
//#region src/flows/deposit/widgets/onramp-amount-entry/compound/components/ReceiveChip.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Read-only receive chip slotted into the hero's `subLine` for onramp amount-entry. Mirrors the
|
|
6
|
+
* "Receive [USDC logo] 24.21 USDC" reading. Onramp-flow-internal — the wallet path's Hero uses the
|
|
7
|
+
* swap toggle in this slot, not a static chip.
|
|
8
|
+
*
|
|
9
|
+
* Reads `formattedReceive` + `receiveToken` from context. While the quote is still resolving the
|
|
10
|
+
* chip renders a shimmer so the user sees the row is live.
|
|
11
|
+
*/
|
|
12
|
+
declare function OnrampAmountEntryReceiveChip(): _$react_jsx_runtime0.JSX.Element;
|
|
13
|
+
//#endregion
|
|
14
|
+
export { OnrampAmountEntryReceiveChip };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{Trans as e}from"../../../../../../shared/i18n/Trans.js";import"../../../../../../i18n/index.js";import{Skeleton as t}from"../../../../../../shared/ui/Skeleton/Skeleton.js";import"../../../../../../shared/ui/Skeleton/index.js";import{text as n}from"../../../../../../shared/ui/Text/Text.js";import{TokenLogo as r}from"../../../../../../shared/ui/TokenLogo/TokenLogo.js";import"../../../../../../shared/ui/TokenLogo/index.js";import"../../../../../../ui/index.js";import{ONRAMP_AMOUNT_ENTRY_SLOTS as i}from"../OnrampAmountEntry.slots.js";import{styles as a}from"../OnrampAmountEntry.styles.js";import{useOnrampAmountEntryContext as o}from"../context.js";import{jsx as s,jsxs as c}from"react/jsx-runtime";import*as l from"@stylexjs/stylex";function u(){let{formattedReceive:u,receiveToken:d,loading:f}=o(`OnrampAmountEntry.ReceiveChip`);return c(`span`,{...l.props(a.receiveLine),children:[s(n.span,{size:`sm`,leading:`tight`,color:`subdued`,...l.props(a.receiveLabel),children:s(e,{id:`lDgVWA`,message:`Receive`})}),c(`span`,{"data-stridge-slot":i.receiveChip,...l.props(a.receiveChip),children:[s(r,{size:18,symbol:d.symbol,...d.chainId===void 0?{}:{chainId:d.chainId},...d.address===void 0?{}:{address:d.address},...d.isNative===void 0?{}:{isNative:d.isNative},...d.logoUrl===void 0?{}:{logoUrl:d.logoUrl},hideChainBadge:!0}),f?s(t,{width:64,height:14}):c(n.span,{size:`sm`,fontWeight:`medium`,leading:`tight`,...l.props(a.receiveChipAmount),children:[u,` `,d.symbol]})]})]})}export{u as OnrampAmountEntryReceiveChip};
|
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,3 @@
|
|
|
1
|
+
import { OnrampAmountEntryDialogProps, OnrampAmountEntryHeroLabelProps, OnrampAmountEntryProps } from "./types.js";
|
|
2
|
+
import { OnrampAmountEntry } from "./OnrampAmountEntry.js";
|
|
3
|
+
import { ONRAMP_AMOUNT_ENTRY_SLOTS, OnrampAmountEntrySlot } from "./OnrampAmountEntry.slots.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./OnrampAmountEntry.slots.js";import"./OnrampAmountEntry.js";
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { DialogShellControls } from "../../../../../shared/dialog/DialogShell.js";
|
|
2
|
+
import { AmountEntryProps, AmountEntryToken } from "../../../../../shared/widgets/amount-entry/compound/types.js";
|
|
3
|
+
import { ReactNode } from "react";
|
|
4
|
+
|
|
5
|
+
//#region src/flows/deposit/widgets/onramp-amount-entry/compound/types.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* Public props accepted by the {@link OnrampAmountEntry} compound root. Extends the underlying
|
|
8
|
+
* {@link AmountEntryProps} shape with onramp-flow-specific fields the orchestrated wrapper populates
|
|
9
|
+
* from the driver's `onrampQuote` entity.
|
|
10
|
+
*/
|
|
11
|
+
interface OnrampAmountEntryProps extends AmountEntryProps {
|
|
12
|
+
/** Pre-formatted receive amount (e.g. `"24.21"`). Rendered inside the ReceiveChip. */
|
|
13
|
+
formattedReceive: string;
|
|
14
|
+
/** The crypto asset the user receives. Drives the ReceiveChip's token logo + symbol. */
|
|
15
|
+
onrampReceiveToken: AmountEntryToken;
|
|
16
|
+
/** When `true`, the ReceiveChip renders a shimmer placeholder while the quote resolves. */
|
|
17
|
+
quoteLoading?: boolean;
|
|
18
|
+
}
|
|
19
|
+
/** Props for {@link OnrampAmountEntry.HeroLabel}. */
|
|
20
|
+
interface OnrampAmountEntryHeroLabelProps {
|
|
21
|
+
children: ReactNode;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Props for `<OnrampAmountEntry.Dialog>` — the dialog form of the OnrampAmountEntry widget.
|
|
25
|
+
* Combines the widget root props with the shared dialog shell controls.
|
|
26
|
+
*/
|
|
27
|
+
type OnrampAmountEntryDialogProps = OnrampAmountEntryProps & DialogShellControls;
|
|
28
|
+
//#endregion
|
|
29
|
+
export { OnrampAmountEntryDialogProps, OnrampAmountEntryHeroLabelProps, OnrampAmountEntryProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { OnrampAmountEntry } from "./OnrampAmountEntry.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./OnrampAmountEntry.js";
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { DialogShellControls } from "../../../../shared/dialog/DialogShell.js";
|
|
2
|
+
import { OnrampConfirmBody } from "./compound/components/Body.js";
|
|
3
|
+
import { OnrampConfirmHeader } from "./compound/components/Header.js";
|
|
4
|
+
import { OnrampConfirmSummary } from "./compound/components/Summary.js";
|
|
5
|
+
import { ComponentProps, ReactNode } from "react";
|
|
6
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
7
|
+
|
|
8
|
+
//#region src/flows/deposit/widgets/onramp-confirm/OnrampConfirm.d.ts
|
|
9
|
+
interface OnrampConfirmProps extends ComponentProps<"div"> {
|
|
10
|
+
/**
|
|
11
|
+
* Optional custom composition. When omitted, the canonical default composition renders —
|
|
12
|
+
* `<Header />` + `<Body>` (Summary + the "Continue to payment" CTA). Pass children to
|
|
13
|
+
* interleave your own elements or replace the composition entirely.
|
|
14
|
+
*/
|
|
15
|
+
children?: ReactNode;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Orchestrated `OnrampConfirm` widget — the confirm screen that follows `onrampAmountEntry`. Reads
|
|
19
|
+
* the amount + phase from the FSM ctx, the brand name from the driver's `brand` entity, and the
|
|
20
|
+
* priced breakdown from `onrampQuote`. The CTA dispatches `confirmOnramp()`, which the controller
|
|
21
|
+
* turns into `createOnrampSession` + a new-tab checkout redirect.
|
|
22
|
+
*
|
|
23
|
+
* Renders nothing on any other FSM state — the dialog routes the widget under
|
|
24
|
+
* `<Deposit.Step name="onrampConfirm">`.
|
|
25
|
+
*/
|
|
26
|
+
declare function OnrampConfirm({
|
|
27
|
+
children,
|
|
28
|
+
...props
|
|
29
|
+
}: OnrampConfirmProps): _$react_jsx_runtime0.JSX.Element | null;
|
|
30
|
+
declare function OnrampConfirmDialog({
|
|
31
|
+
open,
|
|
32
|
+
defaultOpen,
|
|
33
|
+
onOpenChange,
|
|
34
|
+
trigger,
|
|
35
|
+
...rootProps
|
|
36
|
+
}: OnrampConfirm.DialogProps): _$react_jsx_runtime0.JSX.Element;
|
|
37
|
+
declare namespace OnrampConfirm {
|
|
38
|
+
type Props = OnrampConfirmProps;
|
|
39
|
+
type DialogProps = OnrampConfirmProps & DialogShellControls;
|
|
40
|
+
const Dialog: typeof OnrampConfirmDialog;
|
|
41
|
+
/**
|
|
42
|
+
* Compound sub-parts aliased on the orchestrated widget so consumers can compose without
|
|
43
|
+
* importing the headless compound separately.
|
|
44
|
+
*/
|
|
45
|
+
const Header: typeof OnrampConfirmHeader;
|
|
46
|
+
const Body: typeof OnrampConfirmBody;
|
|
47
|
+
const Summary: typeof OnrampConfirmSummary;
|
|
48
|
+
}
|
|
49
|
+
//#endregion
|
|
50
|
+
export { OnrampConfirm };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{useKitI18n as e}from"../../../../shared/i18n/useKitI18n.js";import{useLingui as t}from"../../../../shared/i18n/useLingui.js";import"../../../../i18n/index.js";import{useDepositSnapshot as n}from"../../driver/context.js";import{useDepositActions as r,useDepositEffectiveState as i}from"../../orchestrator/controller.js";import{formatUsd as a}from"../../../../shared/format/formatUsd.js";import{DialogShell as o}from"../../../../shared/dialog/DialogShell.js";import{OnrampConfirm as s}from"./compound/OnrampConfirm.js";import"./compound/index.js";import{useMemo as c}from"react";import{jsx as l}from"react/jsx-runtime";const u={id:`kf83Ld`,message:`Something went wrong.`};function d({children:o,...d}){let f=n(),p=i(),{back:m,confirmOnramp:h}=r(),g=e(),{i18n:_}=t(),v=f.onrampQuote,y=v?.status===`ready`||v?.status===`stale`?v.payload:void 0,b=p.name===`onrampConfirm`?p.ctx.amount:0,x=c(()=>{if(y)return{totalUsd:a(b,g,{showSmallValueClamp:!1}),receive:y.receiveAmount.formatted,receiveSymbol:y.receiveAsset.symbol,amountUsd:y.amountUsd.formatted,rate:y.rate.formatted,...y.processingFeeUsd?{processingFee:y.processingFeeUsd.formatted}:{},...y.networkFeeUsd?{networkFee:y.networkFeeUsd.formatted}:{}}},[y,b,g]);if(p.name!==`onrampConfirm`)return null;let{phase:S}=p.ctx,C=f.brand.status===`ready`||f.brand.status===`stale`?f.brand.payload:void 0,w=S.kind===`failed`?S.failure.reason??_._(u):void 0;return l(s,{...d,phase:S,amount:b,...x?{summary:x}:{},...C?.name?{brandName:C.name}:{},...w?{failureReason:w}:{},onBack:m,onConfirm:h,children:o})}function f({open:e,defaultOpen:t,onOpenChange:n,trigger:r,...i}){return l(o,{open:e,defaultOpen:t,onOpenChange:n,trigger:r,children:l(d,{...i})})}(function(e){e.Dialog=f,e.Header=s.Header,e.Body=s.Body,e.Summary=s.Summary})(d||={});export{d as OnrampConfirm};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { OnrampConfirmBodyProps, OnrampConfirmDialogProps, OnrampConfirmHeaderProps, OnrampConfirmProps, OnrampConfirmSummaryProps } from "./types.js";
|
|
2
|
+
import { OnrampConfirmBody } from "./components/Body.js";
|
|
3
|
+
import { OnrampConfirmHeader } from "./components/Header.js";
|
|
4
|
+
import { OnrampConfirmSummary } from "./components/Summary.js";
|
|
5
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
6
|
+
|
|
7
|
+
//#region src/flows/deposit/widgets/onramp-confirm/compound/OnrampConfirm.d.ts
|
|
8
|
+
/**
|
|
9
|
+
* Onramp confirm widget — the screen that follows `onrampAmountEntry`. Renders the priced quote
|
|
10
|
+
* summary + a single "Continue to payment" CTA inside the shared frame + header. There is no in-app
|
|
11
|
+
* payment form: the CTA hands off to the provider's hosted checkout in a new tab and the FSM
|
|
12
|
+
* advances to `onrampPaymentPending`.
|
|
13
|
+
*
|
|
14
|
+
* Parts:
|
|
15
|
+
* - {@link OnrampConfirm.Header}
|
|
16
|
+
* - {@link OnrampConfirm.Body}
|
|
17
|
+
* - {@link OnrampConfirm.Summary}
|
|
18
|
+
*
|
|
19
|
+
* Dialog form: {@link OnrampConfirm.Dialog} pre-composes the widget into a dialog shell.
|
|
20
|
+
*/
|
|
21
|
+
declare function OnrampConfirm(props: OnrampConfirmProps): _$react_jsx_runtime0.JSX.Element;
|
|
22
|
+
declare function OnrampConfirmDialog({
|
|
23
|
+
open,
|
|
24
|
+
defaultOpen,
|
|
25
|
+
onOpenChange,
|
|
26
|
+
trigger,
|
|
27
|
+
children,
|
|
28
|
+
...rootProps
|
|
29
|
+
}: OnrampConfirmDialogProps): _$react_jsx_runtime0.JSX.Element;
|
|
30
|
+
declare namespace OnrampConfirm {
|
|
31
|
+
type Props = OnrampConfirmProps;
|
|
32
|
+
type HeaderProps = OnrampConfirmHeaderProps;
|
|
33
|
+
type BodyProps = OnrampConfirmBodyProps;
|
|
34
|
+
type SummaryProps = OnrampConfirmSummaryProps;
|
|
35
|
+
type DialogProps = OnrampConfirmDialogProps;
|
|
36
|
+
const Header: typeof OnrampConfirmHeader;
|
|
37
|
+
const Body: typeof OnrampConfirmBody;
|
|
38
|
+
const Summary: typeof OnrampConfirmSummary;
|
|
39
|
+
const Dialog: typeof OnrampConfirmDialog;
|
|
40
|
+
}
|
|
41
|
+
//#endregion
|
|
42
|
+
export { OnrampConfirm };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{DialogShell as e}from"../../../../../shared/dialog/DialogShell.js";import{Tooltip as t}from"../../../../../shared/ui/Tooltip/Tooltip.js";import"../../../../../shared/ui/Tooltip/index.js";import{Frame as n}from"../../../../../shared/dialog/Frame.js";import{OnrampConfirmContext as r}from"./context.js";import{ONRAMP_CONFIRM_SLOTS as i}from"./OnrampConfirm.slots.js";import{styles as a}from"./OnrampConfirm.styles.js";import{OnrampConfirmSummary as o}from"./components/Summary.js";import{OnrampConfirmBody as s}from"./components/Body.js";import{OnrampConfirmHeader as c}from"./components/Header.js";import{useMemo as l}from"react";import{Fragment as u,jsx as d,jsxs as f}from"react/jsx-runtime";import*as p from"@stylexjs/stylex";function m(e){let{phase:o,amount:s,summary:c,brandName:u,failureReason:f,onBack:m,onConfirm:g,children:_,...v}=e;return d(r,{value:l(()=>({phase:o,amount:s,...c===void 0?{}:{summary:c},...u===void 0?{}:{brandName:u},...f===void 0?{}:{failureReason:f},...m?{onBack:m}:{},...g?{onConfirm:g}:{}}),[o,s,c,u,f,m,g]),children:d(t.Provider,{children:d(n,{...v,"data-stridge-slot":i.root,...p.props(a.root),children:_??h})})})}const h=f(u,{children:[d(c,{}),d(s,{})]});function g({open:t,defaultOpen:n,onOpenChange:r,trigger:i,children:a,...o}){return d(e,{open:t,defaultOpen:n,onOpenChange:r,trigger:i,children:d(m,{...o,children:a})})}(function(e){e.Header=c,e.Body=s,e.Summary=o,e.Dialog=g})(m||={});export{m as OnrampConfirm};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
//#region src/flows/deposit/widgets/onramp-confirm/compound/OnrampConfirm.slots.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* `data-stridge-slot` constants for the onramp-confirm compound widget. Hosts target these via CSS
|
|
4
|
+
* selectors like `[data-stridge-slot="onramp-confirm-header"]` without forking the kit.
|
|
5
|
+
*/
|
|
6
|
+
declare const ONRAMP_CONFIRM_SLOTS: {
|
|
7
|
+
readonly root: "onramp-confirm";
|
|
8
|
+
readonly header: "onramp-confirm-header";
|
|
9
|
+
readonly body: "onramp-confirm-body";
|
|
10
|
+
readonly summary: "onramp-confirm-summary";
|
|
11
|
+
readonly summaryStaticRow: "onramp-confirm-summary-static-row";
|
|
12
|
+
readonly summaryRowLabel: "onramp-confirm-summary-row-label";
|
|
13
|
+
readonly summaryRowValue: "onramp-confirm-summary-row-value";
|
|
14
|
+
readonly summaryBreakdown: "onramp-confirm-summary-breakdown";
|
|
15
|
+
readonly breakdownTrigger: "onramp-confirm-breakdown-trigger";
|
|
16
|
+
readonly breakdownChevron: "onramp-confirm-breakdown-chevron";
|
|
17
|
+
readonly breakdownRow: "onramp-confirm-breakdown-row";
|
|
18
|
+
readonly breakdownRowLabel: "onramp-confirm-breakdown-row-label";
|
|
19
|
+
readonly breakdownRowValue: "onramp-confirm-breakdown-row-value";
|
|
20
|
+
readonly cta: "onramp-confirm-cta";
|
|
21
|
+
};
|
|
22
|
+
type OnrampConfirmSlot = (typeof ONRAMP_CONFIRM_SLOTS)[keyof typeof ONRAMP_CONFIRM_SLOTS];
|
|
23
|
+
//#endregion
|
|
24
|
+
export { ONRAMP_CONFIRM_SLOTS, OnrampConfirmSlot };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={root:`onramp-confirm`,header:`onramp-confirm-header`,body:`onramp-confirm-body`,summary:`onramp-confirm-summary`,summaryStaticRow:`onramp-confirm-summary-static-row`,summaryRowLabel:`onramp-confirm-summary-row-label`,summaryRowValue:`onramp-confirm-summary-row-value`,summaryBreakdown:`onramp-confirm-summary-breakdown`,breakdownTrigger:`onramp-confirm-breakdown-trigger`,breakdownChevron:`onramp-confirm-breakdown-chevron`,breakdownRow:`onramp-confirm-breakdown-row`,breakdownRowLabel:`onramp-confirm-breakdown-row-label`,breakdownRowValue:`onramp-confirm-breakdown-row-value`,cta:`onramp-confirm-cta`};export{e as ONRAMP_CONFIRM_SLOTS};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={root:{"OnrampConfirm__styles.root":`OnrampConfirm__styles.root`,"position-kVAEAm":`x1n2onr6`,"width-kzqmXN":`xh8yej3`,"maxWidth-ks0D6T":`x17fpy1y`,$$css:`@stridge/kit:src/flows/deposit/widgets/onramp-confirm/compound/OnrampConfirm.styles.ts:11`},body:{"OnrampConfirm__styles.body":`OnrampConfirm__styles.body`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`xdt5ytf`,"gap-kOIVth":`xsfdumc`,"paddingTop-kLKAdn":`xtgch2x`,"paddingBottom-kGO01o":`xpnfv0q`,"paddingInlineEnd-kwRFfy":`x1hvdk87`,"paddingInlineStart-kZCmMZ":`xmg6hw8`,$$css:`@stridge/kit:src/flows/deposit/widgets/onramp-confirm/compound/OnrampConfirm.styles.ts:18`},summary:{"OnrampConfirm__styles.summary":`OnrampConfirm__styles.summary`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`xdt5ytf`,$$css:`@stridge/kit:src/flows/deposit/widgets/onramp-confirm/compound/OnrampConfirm.styles.ts:28`},summaryStaticRow:{"OnrampConfirm__styles.summaryStaticRow":`OnrampConfirm__styles.summaryStaticRow`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`x1q0g3np`,"alignItems-kGNEyG":`x1pha0wt`,"justifyContent-kjj79g":`x1qughib`,"gap-kOIVth":`x2blr79`,"paddingBlock-k8WAf4":`x1yowcxs`,"paddingInline-kg3NbH":`xqsvw4s`,"borderBottomColor-kL6WhQ":`x2kdqbz`,"borderBottomStyle-kfdmCh":`x1q0q8m5`,"borderBottomWidth-kt9PQ7":`xso031l`,$$css:`@stridge/kit:src/flows/deposit/widgets/onramp-confirm/compound/OnrampConfirm.styles.ts:32`},summaryLabel:{"OnrampConfirm__styles.summaryLabel":`OnrampConfirm__styles.summaryLabel`,"color-kMwMTN":`x18cw6k6`,"fontWeight-k63SB2":`xi0sa8g`,"margin-kogj98":`x1ghz6dp`,$$css:`@stridge/kit:src/flows/deposit/widgets/onramp-confirm/compound/OnrampConfirm.styles.ts:44`},summaryValue:{"OnrampConfirm__styles.summaryValue":`OnrampConfirm__styles.summaryValue`,"color-kMwMTN":`x1i40r7x`,"fontWeight-k63SB2":`x1qvi77d`,"margin-kogj98":`x1ghz6dp`,"textAlign-k9WMMc":`xp4054r`,$$css:`@stridge/kit:src/flows/deposit/widgets/onramp-confirm/compound/OnrampConfirm.styles.ts:49`},breakdownTrigger:{"OnrampConfirm__styles.breakdownTrigger":`OnrampConfirm__styles.breakdownTrigger`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`x1q0g3np`,"alignItems-kGNEyG":`x6s0dn4`,"justifyContent-kjj79g":`x13a6bvl`,"gap-kOIVth":`x1r05nms`,"paddingBlock-k8WAf4":`x1yowcxs`,"paddingInline-kg3NbH":`xqsvw4s`,"width-kzqmXN":`xh8yej3`,"backgroundColor-kWkggS":`xjbqb8w`,"borderColor-kVAM5u":`x9r1u3d`,"borderStyle-ksu8eU":`x1y0btm7`,"borderWidth-kMzoRj":`xmkeg23`,"borderRadius-kaIpWk":`x2u8bby`,"color-kMwMTN":`xi96bwj`,"cursor-kkrTdU":`x1ypdohk`,"outline-kI3sdo":`x1a2a7pz`,":hover_color-kDPRdz":`xpscirx`,":focus-visible_borderColor-kOJeXU":`x1mt3fz5`,":focus-visible_boxShadow-kEtg5x":`x159teg`,$$css:`@stridge/kit:src/flows/deposit/widgets/onramp-confirm/compound/OnrampConfirm.styles.ts:55`},breakdownChevron:{"OnrampConfirm__styles.breakdownChevron":`OnrampConfirm__styles.breakdownChevron`,"width-kzqmXN":`xsmyaan`,"height-kZKoxP":`x1kpxq89`,"flexShrink-kmuXW":`x2lah0s`,"color-kMwMTN":`x15rks2t`,"strokeWidth-kfJifR":`xhxwl1`,"transitionProperty-k1ekBW":`x11xpdln`,"transitionDuration-kIyJzY":`x1vhb3u9`,"transitionTimingFunction-kAMwcw":`x1xv5090`,$$css:`@stridge/kit:src/flows/deposit/widgets/onramp-confirm/compound/OnrampConfirm.styles.ts:80`},breakdownPanel:{"OnrampConfirm__styles.breakdownPanel":`OnrampConfirm__styles.breakdownPanel`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`xdt5ytf`,"backgroundColor-kWkggS":`x407w7c`,"borderTopColor-kLZC3w":`x19bq4ie`,"borderTopStyle-kPef9Z":`x13fuv20`,"borderTopWidth-kEafiO":`x178xt8z`,"paddingBlock-k8WAf4":`xpuy6co`,"paddingInline-kg3NbH":`xqsvw4s`,$$css:`@stridge/kit:src/flows/deposit/widgets/onramp-confirm/compound/OnrampConfirm.styles.ts:90`},breakdownRow:{"OnrampConfirm__styles.breakdownRow":`OnrampConfirm__styles.breakdownRow`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`x1q0g3np`,"alignItems-kGNEyG":`x6s0dn4`,"justifyContent-kjj79g":`x1qughib`,"gap-kOIVth":`x2blr79`,"paddingBlock-k8WAf4":`xpuy6co`,$$css:`@stridge/kit:src/flows/deposit/widgets/onramp-confirm/compound/OnrampConfirm.styles.ts:100`},breakdownLabel:{"OnrampConfirm__styles.breakdownLabel":`OnrampConfirm__styles.breakdownLabel`,"color-kMwMTN":`x18cw6k6`,"fontWeight-k63SB2":`xi0sa8g`,"margin-kogj98":`x1ghz6dp`,$$css:`@stridge/kit:src/flows/deposit/widgets/onramp-confirm/compound/OnrampConfirm.styles.ts:108`},breakdownValue:{"OnrampConfirm__styles.breakdownValue":`OnrampConfirm__styles.breakdownValue`,"color-kMwMTN":`x1i40r7x`,"fontWeight-k63SB2":`x1qvi77d`,"margin-kogj98":`x1ghz6dp`,"textAlign-k9WMMc":`xp4054r`,$$css:`@stridge/kit:src/flows/deposit/widgets/onramp-confirm/compound/OnrampConfirm.styles.ts:113`},cta:{"OnrampConfirm__styles.cta":`OnrampConfirm__styles.cta`,"alignSelf-kSGwAc":`xkh2ocl`,"borderWidth-kMzoRj":`xc342km`,"cursor-kkrTdU":`x1ypdohk`,"borderRadius-kaIpWk":`x1s7mj9v`,$$css:`@stridge/kit:src/flows/deposit/widgets/onramp-confirm/compound/OnrampConfirm.styles.ts:120`},failureNotice:{"OnrampConfirm__styles.failureNotice":`OnrampConfirm__styles.failureNotice`,"color-kMwMTN":`xreodjm`,"margin-kogj98":`x1ghz6dp`,"textAlign-k9WMMc":`x2b8uid`,$$css:`@stridge/kit:src/flows/deposit/widgets/onramp-confirm/compound/OnrampConfirm.styles.ts:126`},header:{"OnrampConfirm__styles.header":`OnrampConfirm__styles.header`,"justifyContent-kjj79g":`x1qughib`,"gap-kOIVth":`x2blr79`,"paddingTop-kLKAdn":`x1h03h88`,"paddingInlineEnd-kwRFfy":`x1hvdk87`,"paddingBottom-kGO01o":`xfvigk`,"paddingInlineStart-kZCmMZ":`xiplbrm`,$$css:`@stridge/kit:src/flows/deposit/widgets/onramp-confirm/compound/OnrampConfirm.styles.ts:132`},headerLeft:{"OnrampConfirm__styles.headerLeft":`OnrampConfirm__styles.headerLeft`,"display-k1xSpc":`x78zum5`,"alignItems-kGNEyG":`x6s0dn4`,"gap-kOIVth":`x2blr79`,$$css:`@stridge/kit:src/flows/deposit/widgets/onramp-confirm/compound/OnrampConfirm.styles.ts:140`},headerTitle:{"OnrampConfirm__styles.headerTitle":`OnrampConfirm__styles.headerTitle`,"margin-kogj98":`x1ghz6dp`,$$css:`@stridge/kit:src/flows/deposit/widgets/onramp-confirm/compound/OnrampConfirm.styles.ts:145`},backIcon:{"OnrampConfirm__styles.backIcon":`OnrampConfirm__styles.backIcon`,"color-kMwMTN":`x15rks2t`,"strokeWidth-kfJifR":`xhxwl1`,$$css:`@stridge/kit:src/flows/deposit/widgets/onramp-confirm/compound/OnrampConfirm.styles.ts:148`}};export{e as styles};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { OnrampConfirmBodyProps } from "../types.js";
|
|
2
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/flows/deposit/widgets/onramp-confirm/compound/components/Body.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Card.Body wrapper for the onramp-confirm widget. When `children` is omitted, auto-renders
|
|
7
|
+
* `<Summary />` + the primary CTA so the canonical composition just works. Pass children to
|
|
8
|
+
* override. Wraps children in a slot div so the body's `gap` + `padding` apply where the children
|
|
9
|
+
* actually live (Card.Body's scroll viewport otherwise redirects them).
|
|
10
|
+
*/
|
|
11
|
+
declare function OnrampConfirmBody({
|
|
12
|
+
children,
|
|
13
|
+
...props
|
|
14
|
+
}?: OnrampConfirmBodyProps): _$react_jsx_runtime0.JSX.Element;
|
|
15
|
+
//#endregion
|
|
16
|
+
export { OnrampConfirmBody };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{Trans as e}from"../../../../../../shared/i18n/Trans.js";import"../../../../../../i18n/index.js";import{Button as t}from"../../../../../../shared/ui/Button/Button.js";import{Card as n}from"../../../../../../shared/ui/Card/Card.js";import{text as r}from"../../../../../../shared/ui/Text/Text.js";import"../../../../../../ui/index.js";import{useOnrampConfirmContext as i}from"../context.js";import{ONRAMP_CONFIRM_SLOTS as a}from"../OnrampConfirm.slots.js";import{styles as o}from"../OnrampConfirm.styles.js";import{OnrampConfirmSummary as s}from"./Summary.js";import{Fragment as c,jsx as l,jsxs as u}from"react/jsx-runtime";import*as d from"@stylexjs/stylex";function f({children:e,...t}={}){return l(n.Body,{...t,children:l(`div`,{"data-stridge-slot":a.body,...d.props(o.body),children:e??l(p,{})})})}function p(){let{phase:n,failureReason:f,onConfirm:p}=i(`OnrampConfirm.Body`),m=n.kind===`creating`,h=n.kind===`loading`;return u(c,{children:[l(s,{}),n.kind===`failed`&&f?l(r.span,{size:`sm`,leading:`normal`,...d.props(o.failureNotice),children:f}):null,l(t,{variant:`default`,size:`cta`,isLoading:m,disabled:h||m||!p,onClick:p,"data-stridge-slot":a.cta,...d.props(o.cta),children:m?l(e,{id:`9k9fRZ`,message:`Opening checkout…`}):l(e,{id:`hMqszB`,message:`Continue to payment`})})]})}export{f as OnrampConfirmBody};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { OnrampConfirmHeaderProps } from "../types.js";
|
|
2
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/flows/deposit/widgets/onramp-confirm/compound/components/Header.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Header row for the onramp confirm screen. Renders a back affordance + "Cash" title in a
|
|
7
|
+
* start-aligned cluster, with the dialog close button as the trailing element. Mirrors the other
|
|
8
|
+
* back-bearing flow headers so they share the same chrome rhythm.
|
|
9
|
+
*/
|
|
10
|
+
declare function OnrampConfirmHeader({
|
|
11
|
+
title,
|
|
12
|
+
onBack
|
|
13
|
+
}?: OnrampConfirmHeaderProps): _$react_jsx_runtime0.JSX.Element;
|
|
14
|
+
//#endregion
|
|
15
|
+
export { OnrampConfirmHeader };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{Trans as e}from"../../../../../../shared/i18n/Trans.js";import{useLingui as t}from"../../../../../../shared/i18n/useLingui.js";import"../../../../../../i18n/index.js";import{ChevronLeftIcon as n}from"../../../../../../shared/icons/ChevronLeftIcon.js";import"../../../../../../icons/index.js";import{IconButton as r}from"../../../../../../shared/ui/IconButton/IconButton.js";import{Dialog as i}from"../../../../../../shared/ui/Dialog/Dialog.js";import"../../../../../../shared/ui/Dialog/index.js";import{Card as a}from"../../../../../../shared/ui/Card/Card.js";import{text as o}from"../../../../../../shared/ui/Text/Text.js";import"../../../../../../ui/index.js";import{useOnrampConfirmContext as s}from"../context.js";import{ONRAMP_CONFIRM_SLOTS as c}from"../OnrampConfirm.slots.js";import{styles as l}from"../OnrampConfirm.styles.js";import{jsx as u,jsxs as d}from"react/jsx-runtime";import*as f from"@stylexjs/stylex";function p({title:p,onBack:m}={}){let h=s(`OnrampConfirm.Header`),{_:g}=t(),_=m===null?void 0:m??h.onBack,v=p??u(e,{id:`_rHUhS`,message:`Cash`});return d(a.Header,{"data-stridge-slot":c.header,...f.props(l.header),children:[d(`div`,{...f.props(l.headerLeft),children:[typeof _==`function`?u(r,{"aria-label":g({id:`iH8pgl`,message:`Back`}),onClick:_,children:u(n,{"aria-hidden":!0,...f.props(l.backIcon)})}):null,u(o.span,{size:`base`,fontWeight:`semibold`,leading:`tight`,tracking:`tight`,...f.props(l.headerTitle),children:v})]}),u(i.CloseButton,{})]})}export{p as OnrampConfirmHeader};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { OnrampConfirmSummaryProps } from "../types.js";
|
|
2
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/flows/deposit/widgets/onramp-confirm/compound/components/Summary.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Read-only summary card sitting above the CTA. Renders three static rows (Top up on / You receive
|
|
7
|
+
* / Total) followed by a `Collapsible` whose trigger shows "View breakdown ⌄" and whose panel
|
|
8
|
+
* reveals the quote breakdown rows. Reads the pre-formatted summary from context so the part stays
|
|
9
|
+
* render-only.
|
|
10
|
+
*/
|
|
11
|
+
declare function OnrampConfirmSummary({
|
|
12
|
+
brandName: brandNameOverride
|
|
13
|
+
}?: OnrampConfirmSummaryProps): _$react_jsx_runtime0.JSX.Element;
|
|
14
|
+
//#endregion
|
|
15
|
+
export { OnrampConfirmSummary };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{Trans as e}from"../../../../../../shared/i18n/Trans.js";import{useLingui as t}from"../../../../../../shared/i18n/useLingui.js";import"../../../../../../i18n/index.js";import{ChevronRightIcon as n}from"../../../../../../shared/icons/ChevronRightIcon.js";import"../../../../../../icons/index.js";import{Card as r}from"../../../../../../shared/ui/Card/Card.js";import{Collapsible as i}from"../../../../../../shared/ui/Collapsible/Collapsible.js";import{text as a}from"../../../../../../shared/ui/Text/Text.js";import"../../../../../../ui/index.js";import{useOnrampConfirmContext as o}from"../context.js";import{ONRAMP_CONFIRM_SLOTS as s}from"../OnrampConfirm.slots.js";import{styles as c}from"../OnrampConfirm.styles.js";import{useDirectionalChevronTransform as l}from"../../../../../../shared/dialog/useDirectionalChevronTransform.js";import{useState as u}from"react";import{jsx as d,jsxs as f}from"react/jsx-runtime";import*as p from"@stylexjs/stylex";function m({brandName:n}={}){let{_:l}=t(),{summary:m,brandName:v}=o(`OnrampConfirm.Summary`),[y,b]=u(!1),x=n??v;return f(r,{variant:`default`,"data-stridge-slot":s.summary,...p.props(c.summary),children:[d(h,{label:d(e,{id:`HalPBQ`,message:`Top up on`}),value:x??``}),d(h,{label:d(e,{id:`88cUW-`,message:`You receive`}),value:m?`${m.receive} ${m.receiveSymbol}`:``}),d(h,{label:d(e,{id:`72c5Qo`,message:`Total`}),value:m?.totalUsd??``}),f(i,{open:y,onOpenChange:b,children:[d(i.Trigger,{render:(t,{open:n})=>f(`button`,{type:`button`,"data-stridge-slot":s.breakdownTrigger,...t,children:[d(a.span,{size:`xs`,fontWeight:`medium`,leading:`tight`,color:`inherit`,children:n?d(e,{id:`t1k2Bt`,message:`Hide breakdown`}):d(e,{id:`3qkDVZ`,message:`View breakdown`})}),d(g,{open:n})]}),"aria-label":l(y?{id:`t1k2Bt`,message:`Hide breakdown`}:{id:`3qkDVZ`,message:`View breakdown`}),...p.props(c.breakdownTrigger)}),d(i.Panel,{children:f(`div`,{"data-stridge-slot":s.summaryBreakdown,...p.props(c.breakdownPanel),children:[d(_,{label:d(e,{id:`hehnjM`,message:`Amount`}),value:m?.amountUsd??``}),d(_,{label:d(e,{id:`vepIdX`,message:`Crypto price`}),value:m?d(e,{id:`eUbBqz`,message:`1 {0} = {1}`,values:{0:m.receiveSymbol,1:m.rate}}):``}),m?.processingFee?d(_,{label:d(e,{id:`QFwptY`,message:`Processing fee`}),value:`− ${m.processingFee}`}):null,m?.networkFee?d(_,{label:d(e,{id:`y62Dys`,message:`Network fee`}),value:`− ${m.networkFee}`}):null]})})]})]})}function h({label:e,value:t}){return f(`div`,{"data-stridge-slot":s.summaryStaticRow,...p.props(c.summaryStaticRow),children:[d(a.span,{size:`sm`,leading:`tight`,"data-stridge-slot":s.summaryRowLabel,...p.props(c.summaryLabel),children:e}),d(a.span,{size:`sm`,leading:`tight`,"data-stridge-slot":s.summaryRowValue,...p.props(c.summaryValue),children:t})]})}function g({open:e}){let t=l(e);return d(n,{"aria-hidden":!0,"data-stridge-slot":s.breakdownChevron,style:{transform:t},...p.props(c.breakdownChevron)})}function _({label:e,value:t}){return f(`div`,{"data-stridge-slot":s.breakdownRow,...p.props(c.breakdownRow),children:[d(a.span,{size:`xs`,leading:`tight`,"data-stridge-slot":s.breakdownRowLabel,...p.props(c.breakdownLabel),children:e}),d(a.span,{size:`xs`,leading:`tight`,"data-stridge-slot":s.breakdownRowValue,...p.props(c.breakdownValue),children:t})]})}export{m as OnrampConfirmSummary};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
|
|
3
|
+
//#region src/flows/deposit/widgets/onramp-confirm/compound/context.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Pre-formatted summary rows projected from the driver's `onrampQuote` entity. The orchestrated
|
|
6
|
+
* wrapper formats once and hands the strings to the compound so the Summary part stays render-only.
|
|
7
|
+
*/
|
|
8
|
+
interface OnrampConfirmSummary {
|
|
9
|
+
/** What the user pays end-to-end (the FSM `amount`). Renders in the static "Total" row. */
|
|
10
|
+
totalUsd: string;
|
|
11
|
+
/** Crypto the user receives after fees. Renders in the static "You receive" row + breakdown. */
|
|
12
|
+
receive: string;
|
|
13
|
+
/** Receive asset symbol (e.g. `"USDC"`). */
|
|
14
|
+
receiveSymbol: string;
|
|
15
|
+
/** Principal that converts to crypto. Renders in the breakdown "Amount" row. */
|
|
16
|
+
amountUsd: string;
|
|
17
|
+
/** Crypto-per-fiat rate string. Renders in the breakdown "Crypto price" row. */
|
|
18
|
+
rate: string;
|
|
19
|
+
/** Processing fee string (already prefixed when the wrapper formats it). */
|
|
20
|
+
processingFee?: string;
|
|
21
|
+
/** Network fee string. */
|
|
22
|
+
networkFee?: string;
|
|
23
|
+
}
|
|
24
|
+
//#endregion
|
|
25
|
+
export { OnrampConfirmSummary };
|
|
@@ -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 <OnrampConfirm>.`);return r}export{n as OnrampConfirmContext,r as useOnrampConfirmContext};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { OnrampConfirmSummary } from "./context.js";
|
|
2
|
+
import { OnrampConfirmBodyProps, OnrampConfirmDialogProps, OnrampConfirmHeaderProps, OnrampConfirmProps, OnrampConfirmSummaryProps } from "./types.js";
|
|
3
|
+
import { OnrampConfirm } from "./OnrampConfirm.js";
|
|
4
|
+
import { ONRAMP_CONFIRM_SLOTS, OnrampConfirmSlot } from "./OnrampConfirm.slots.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./OnrampConfirm.slots.js";import"./OnrampConfirm.js";
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { OnrampConfirmPhase } from "../../../orchestrator/types.js";
|
|
2
|
+
import { DialogShellControls } from "../../../../../shared/dialog/DialogShell.js";
|
|
3
|
+
import { OnrampConfirmSummary } from "./context.js";
|
|
4
|
+
import { ComponentProps, ReactNode } from "react";
|
|
5
|
+
|
|
6
|
+
//#region src/flows/deposit/widgets/onramp-confirm/compound/types.d.ts
|
|
7
|
+
/**
|
|
8
|
+
* Public props accepted by the {@link OnrampConfirm} compound root. Required FSM-derived data on
|
|
9
|
+
* the root + optional callbacks the orchestrated wrapper supplies. Standalone compositions feed
|
|
10
|
+
* these directly.
|
|
11
|
+
*/
|
|
12
|
+
interface OnrampConfirmProps extends ComponentProps<"div"> {
|
|
13
|
+
/** Onramp-confirm phase. Drives the CTA's loading / creating / failed chrome. */
|
|
14
|
+
phase: OnrampConfirmPhase;
|
|
15
|
+
/** USD amount the user is paying. */
|
|
16
|
+
amount: number;
|
|
17
|
+
/** Pre-formatted summary rows from the resolved quote. Absent while the quote is loading. */
|
|
18
|
+
summary?: OnrampConfirmSummary;
|
|
19
|
+
/** Brand name for the summary card's "Top up on" row. */
|
|
20
|
+
brandName?: string;
|
|
21
|
+
/** Inline failure reason shown above the CTA when `phase.kind === "failed"`. */
|
|
22
|
+
failureReason?: ReactNode;
|
|
23
|
+
/** Back-affordance handler. When omitted, the header renders without the back button. */
|
|
24
|
+
onBack?: () => void;
|
|
25
|
+
/** CTA handler — promotes the FSM into `creating` (open checkout). */
|
|
26
|
+
onConfirm?: () => void;
|
|
27
|
+
/**
|
|
28
|
+
* Optional custom composition. When omitted, the canonical default composition renders —
|
|
29
|
+
* `<Header />` + `<Body>` (Summary + CTA). Pass children to interleave your own elements.
|
|
30
|
+
*/
|
|
31
|
+
children?: ReactNode;
|
|
32
|
+
}
|
|
33
|
+
/** Props for {@link OnrampConfirm.Header}. */
|
|
34
|
+
interface OnrampConfirmHeaderProps {
|
|
35
|
+
/** Override the default "Cash" title. */
|
|
36
|
+
title?: ReactNode;
|
|
37
|
+
/**
|
|
38
|
+
* Override the context's `onBack`. Pass `null` explicitly to suppress the back affordance even
|
|
39
|
+
* when the context provides one.
|
|
40
|
+
*/
|
|
41
|
+
onBack?: (() => void) | null;
|
|
42
|
+
}
|
|
43
|
+
/** Props for {@link OnrampConfirm.Body}. */
|
|
44
|
+
interface OnrampConfirmBodyProps extends ComponentProps<"div"> {
|
|
45
|
+
/**
|
|
46
|
+
* Optional custom composition. When omitted, Body auto-renders `<Summary />` + the CTA. Pass
|
|
47
|
+
* children to override.
|
|
48
|
+
*/
|
|
49
|
+
children?: ReactNode;
|
|
50
|
+
}
|
|
51
|
+
/** Props for {@link OnrampConfirm.Summary}. */
|
|
52
|
+
interface OnrampConfirmSummaryProps {
|
|
53
|
+
/** Override the context's `brandName` for the "Top up on" row value. */
|
|
54
|
+
brandName?: string;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Props for `<OnrampConfirm.Dialog>` — the dialog form of the OnrampConfirm widget. Combines the
|
|
58
|
+
* widget root props with the shared dialog shell controls.
|
|
59
|
+
*/
|
|
60
|
+
type OnrampConfirmDialogProps = OnrampConfirmProps & DialogShellControls;
|
|
61
|
+
//#endregion
|
|
62
|
+
export { OnrampConfirmBodyProps, OnrampConfirmDialogProps, OnrampConfirmHeaderProps, OnrampConfirmProps, OnrampConfirmSummaryProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { OnrampConfirm } from "./OnrampConfirm.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./OnrampConfirm.js";
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { DialogShellControls } from "../../../../shared/dialog/DialogShell.js";
|
|
2
|
+
import { ProcessingStateBodyProps } from "../../../../shared/widgets/processing-state/compound/types.js";
|
|
3
|
+
import { ProcessingStateDetail } from "../../../../shared/widgets/processing-state/compound/components/Detail.js";
|
|
4
|
+
import { ProcessingStateDetails } from "../../../../shared/widgets/processing-state/compound/components/Details.js";
|
|
5
|
+
import { ProcessingStateHeader } from "../../../../shared/widgets/processing-state/compound/components/Header.js";
|
|
6
|
+
import { ProcessingStateHero } from "../../../../shared/widgets/processing-state/compound/components/Hero.js";
|
|
7
|
+
import { ProcessingStateStatusPill } from "../../../../shared/widgets/processing-state/compound/components/StatusPill.js";
|
|
8
|
+
import { OnrampPaymentPendingReopenButton } from "./compound/components/ReopenButton.js";
|
|
9
|
+
import { ComponentProps, ReactNode } from "react";
|
|
10
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
11
|
+
|
|
12
|
+
//#region src/flows/deposit/widgets/onramp-payment-pending/OnrampPaymentPending.d.ts
|
|
13
|
+
interface OnrampPaymentPendingOwnProps {
|
|
14
|
+
/** Optional custom composition. Replaces the default headline + body + summary + reopen tree. */
|
|
15
|
+
children?: ReactNode;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Orchestrated `OnrampPaymentPending` widget — shown while the FSM is in `onrampPaymentPending`.
|
|
19
|
+
* The hosted-checkout tab is already open; this screen tells the user to finish there and updates
|
|
20
|
+
* automatically when the controller's session watcher observes a terminal state. Reads the receive
|
|
21
|
+
* amount from the driver's `onrampSession` / `onrampQuote` entities and offers a "Reopen payment
|
|
22
|
+
* window" affordance that re-`window.open`s the same `checkoutUrl`.
|
|
23
|
+
*/
|
|
24
|
+
declare function OnrampPaymentPending({
|
|
25
|
+
children,
|
|
26
|
+
...props
|
|
27
|
+
}: ComponentProps<"div"> & OnrampPaymentPendingOwnProps): _$react_jsx_runtime0.JSX.Element | null;
|
|
28
|
+
declare function OnrampPaymentPendingDialog({
|
|
29
|
+
open,
|
|
30
|
+
defaultOpen,
|
|
31
|
+
onOpenChange,
|
|
32
|
+
trigger,
|
|
33
|
+
...rootProps
|
|
34
|
+
}: OnrampPaymentPending.DialogProps): _$react_jsx_runtime0.JSX.Element;
|
|
35
|
+
declare namespace OnrampPaymentPending {
|
|
36
|
+
type Props = ComponentProps<"div"> & OnrampPaymentPendingOwnProps;
|
|
37
|
+
type DialogProps = ComponentProps<"div"> & DialogShellControls & OnrampPaymentPendingOwnProps;
|
|
38
|
+
const Dialog: typeof OnrampPaymentPendingDialog;
|
|
39
|
+
const ReopenButton: typeof OnrampPaymentPendingReopenButton;
|
|
40
|
+
const Header: typeof ProcessingStateHeader;
|
|
41
|
+
const Body: (props: ProcessingStateBodyProps) => _$react_jsx_runtime0.JSX.Element;
|
|
42
|
+
const Hero: typeof ProcessingStateHero;
|
|
43
|
+
const StatusPill: typeof ProcessingStateStatusPill;
|
|
44
|
+
const Details: typeof ProcessingStateDetails;
|
|
45
|
+
const Detail: typeof ProcessingStateDetail;
|
|
46
|
+
}
|
|
47
|
+
//#endregion
|
|
48
|
+
export { OnrampPaymentPending };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{Trans as e}from"../../../../shared/i18n/Trans.js";import{useLingui as t}from"../../../../shared/i18n/useLingui.js";import"../../../../i18n/index.js";import{useDepositSnapshot as n}from"../../driver/context.js";import{openCheckoutPopup as r}from"../../shared/checkoutPopup.js";import{useDepositActions as i,useDepositEffectiveState as a}from"../../orchestrator/controller.js";import{DialogShell as o}from"../../../../shared/dialog/DialogShell.js";import{text as s}from"../../../../shared/ui/Text/Text.js";import"../../../../ui/index.js";import{ONRAMP_PAYMENT_PENDING_SLOTS as c}from"./compound/OnrampPaymentPending.slots.js";import{OnrampPaymentPending as l}from"./compound/OnrampPaymentPending.js";import"./compound/index.js";import{jsx as u,jsxs as d}from"react/jsx-runtime";function f({children:o,...f}){let p=n(),m=a(),{back:h}=i(),{_:g}=t();if(m.name!==`onrampPaymentPending`)return null;let{checkoutUrl:_}=m.ctx,v=p.onrampSession,y=v?.status===`ready`||v?.status===`stale`?v.payload:void 0,b=p.onrampQuote,x=b?.status===`ready`||b?.status===`stale`?b.payload:void 0,S=y?.receiveAmount?.formatted??x?.receiveAmount.formatted??``,C=x?.receiveAsset.symbol??``,w=()=>{r(_)};return u(l,{...f,amount:S,creditedAsset:{symbol:C},headerTitle:g({id:`y3dWqX`,message:`Finish your payment`}),statusPillLabel:g({id:`quR8Qp`,message:`Waiting for payment`}),onBack:h,onReopen:w,children:o??u(l.Body,{children:d(`div`,{"data-stridge-slot":c.body,className:`OnrampPaymentPending__styles.body x78zum5 xdt5ytf x1qjc9v5 x157g05j x4xct4k xpnfv0q x1hvdk87 xmg6hw8`,"data-style-src":`@stridge/kit:src/flows/deposit/widgets/onramp-payment-pending/OnrampPaymentPending.tsx:14`,children:[u(`div`,{className:`OnrampPaymentPending__styles.statusRow x78zum5 xl56j7k`,"data-style-src":`@stridge/kit:src/flows/deposit/widgets/onramp-payment-pending/OnrampPaymentPending.tsx:38`,children:u(l.StatusPill,{})}),d(`div`,{className:`OnrampPaymentPending__styles.copy x78zum5 xdt5ytf x6s0dn4 x1a6yh9e x2b8uid`,"data-style-src":`@stridge/kit:src/flows/deposit/widgets/onramp-payment-pending/OnrampPaymentPending.tsx:24`,children:[u(s.span,{size:`lg`,leading:`tight`,className:`OnrampPaymentPending__styles.headline x1ghz6dp x1qvi77d`,"data-style-src":`@stridge/kit:src/flows/deposit/widgets/onramp-payment-pending/OnrampPaymentPending.tsx:31`,children:u(e,{id:`y3dWqX`,message:`Finish your payment`})}),u(s.span,{size:`sm`,leading:`normal`,color:`subdued`,className:`OnrampPaymentPending__styles.bodyText x1ghz6dp`,"data-style-src":`@stridge/kit:src/flows/deposit/widgets/onramp-payment-pending/OnrampPaymentPending.tsx:35`,children:u(e,{id:`sMaRBz`,message:`Complete your purchase in the window we just opened. This screen updates automatically.`})})]}),S?u(l.Details,{children:u(l.Detail,{label:g({id:`88cUW-`,message:`You receive`}),value:`${S} ${C}`.trim()})}):null,u(l.ReopenButton,{})]})})})}function p({open:e,defaultOpen:t,onOpenChange:n,trigger:r,...i}){return u(o,{open:e,defaultOpen:t,onOpenChange:n,trigger:r,children:u(f,{...i})})}(function(e){e.Dialog=p,e.ReopenButton=l.ReopenButton,e.Header=l.Header,e.Body=l.Body,e.Hero=l.Hero,e.StatusPill=l.StatusPill,e.Details=l.Details,e.Detail=l.Detail})(f||={});export{f as OnrampPaymentPending};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { DialogShellControls } from "../../../../../shared/dialog/DialogShell.js";
|
|
2
|
+
import { ProcessingStateBodyProps } from "../../../../../shared/widgets/processing-state/compound/types.js";
|
|
3
|
+
import { ProcessingStateDetail } from "../../../../../shared/widgets/processing-state/compound/components/Detail.js";
|
|
4
|
+
import { ProcessingStateDetails } from "../../../../../shared/widgets/processing-state/compound/components/Details.js";
|
|
5
|
+
import { ProcessingStateHeader } from "../../../../../shared/widgets/processing-state/compound/components/Header.js";
|
|
6
|
+
import { ProcessingStateHero } from "../../../../../shared/widgets/processing-state/compound/components/Hero.js";
|
|
7
|
+
import { ProcessingStateStatusPill } from "../../../../../shared/widgets/processing-state/compound/components/StatusPill.js";
|
|
8
|
+
import { ProcessingState } from "../../../../../shared/widgets/processing-state/compound/ProcessingState.js";
|
|
9
|
+
import { OnrampPaymentPendingReopenButton } from "./components/ReopenButton.js";
|
|
10
|
+
import { ComponentProps, ReactNode } from "react";
|
|
11
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
12
|
+
|
|
13
|
+
//#region src/flows/deposit/widgets/onramp-payment-pending/compound/OnrampPaymentPending.d.ts
|
|
14
|
+
/**
|
|
15
|
+
* Public props accepted by the {@link OnrampPaymentPending} compound root. Composes the shared
|
|
16
|
+
* {@link ProcessingStateCompound} for visual parity with the crypto processing screen, plus the
|
|
17
|
+
* onramp-pending reopen affordance.
|
|
18
|
+
*/
|
|
19
|
+
interface OnrampPaymentPendingProps extends Omit<ProcessingState.Props, "children"> {
|
|
20
|
+
/** Re-opens the hosted-checkout window. Wired through to {@link OnrampPaymentPending.ReopenButton}. */
|
|
21
|
+
onReopen?: () => void;
|
|
22
|
+
/**
|
|
23
|
+
* Optional custom composition. When omitted, the canonical default renders the processing
|
|
24
|
+
* chrome (Header / Hero / StatusPill) + the order summary rows + the Reopen affordance.
|
|
25
|
+
*/
|
|
26
|
+
children?: ReactNode;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Onramp payment-pending widget — shown while the FSM is in `onrampPaymentPending`. Reuses the
|
|
30
|
+
* shared processing-state chrome (spinner hero + status pill) and adds a "Reopen payment window"
|
|
31
|
+
* affordance. The controller's session watcher drives the transition to success / error; there is
|
|
32
|
+
* no manual "I'm done" button.
|
|
33
|
+
*
|
|
34
|
+
* Parts:
|
|
35
|
+
* - {@link OnrampPaymentPending.ReopenButton}
|
|
36
|
+
* - the {@link ProcessingStateCompound} parts (`Header`, `Body`, `Hero`, `StatusPill`, `Details`,
|
|
37
|
+
* `Detail`) re-exposed for one-stop composition.
|
|
38
|
+
*/
|
|
39
|
+
declare function OnrampPaymentPending(props: OnrampPaymentPendingProps): _$react_jsx_runtime0.JSX.Element;
|
|
40
|
+
declare function OnrampPaymentPendingDialog({
|
|
41
|
+
open,
|
|
42
|
+
defaultOpen,
|
|
43
|
+
onOpenChange,
|
|
44
|
+
trigger,
|
|
45
|
+
children,
|
|
46
|
+
...rootProps
|
|
47
|
+
}: OnrampPaymentPendingProps & DialogShellControls): _$react_jsx_runtime0.JSX.Element;
|
|
48
|
+
declare namespace OnrampPaymentPending {
|
|
49
|
+
type Props = OnrampPaymentPendingProps;
|
|
50
|
+
type DialogProps = OnrampPaymentPendingProps & DialogShellControls & ComponentProps<"div">;
|
|
51
|
+
/** Onramp-pending-specific sub-part. */
|
|
52
|
+
const ReopenButton: typeof OnrampPaymentPendingReopenButton;
|
|
53
|
+
/** Processing-state compound parts re-exposed for one-stop composition. */
|
|
54
|
+
const Header: typeof ProcessingStateHeader;
|
|
55
|
+
const Body: (props: ProcessingStateBodyProps) => _$react_jsx_runtime0.JSX.Element;
|
|
56
|
+
const Hero: typeof ProcessingStateHero;
|
|
57
|
+
const StatusPill: typeof ProcessingStateStatusPill;
|
|
58
|
+
const Details: typeof ProcessingStateDetails;
|
|
59
|
+
const Detail: typeof ProcessingStateDetail;
|
|
60
|
+
const Dialog: typeof OnrampPaymentPendingDialog;
|
|
61
|
+
}
|
|
62
|
+
//#endregion
|
|
63
|
+
export { OnrampPaymentPending, OnrampPaymentPendingProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{DialogShell as e}from"../../../../../shared/dialog/DialogShell.js";import{ProcessingState as t}from"../../../../../shared/widgets/processing-state/compound/ProcessingState.js";import"../../../../../shared/widgets/processing-state/compound/index.js";import{OnrampPaymentPendingContext as n}from"./context.js";import{OnrampPaymentPendingReopenButton as r}from"./components/ReopenButton.js";import{useMemo as i}from"react";import{jsx as a}from"react/jsx-runtime";function o(e){let{onReopen:r,children:o,...s}=e;return a(n,{value:i(()=>({...r?{onReopen:r}:{}}),[r]),children:a(t,{...s,children:o})})}function s({open:t,defaultOpen:n,onOpenChange:r,trigger:i,children:s,...c}){return a(e,{open:t,defaultOpen:n,onOpenChange:r,trigger:i,children:a(o,{...c,children:s})})}(function(e){e.ReopenButton=r,e.Header=t.Header,e.Body=t.Body,e.Hero=t.Hero,e.StatusPill=t.StatusPill,e.Details=t.Details,e.Detail=t.Detail,e.Dialog=s})(o||={});export{o as OnrampPaymentPending};
|
package/dist/flows/deposit/widgets/onramp-payment-pending/compound/OnrampPaymentPending.slots.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
//#region src/flows/deposit/widgets/onramp-payment-pending/compound/OnrampPaymentPending.slots.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* `data-stridge-slot` constants for the onramp-payment-pending compound. The processing-state
|
|
4
|
+
* compound parts the widget composes carry their own `PROCESSING_STATE_SLOTS`; this file only
|
|
5
|
+
* covers the onramp-pending additions (the root + the "Reopen payment window" affordance).
|
|
6
|
+
*/
|
|
7
|
+
declare const ONRAMP_PAYMENT_PENDING_SLOTS: {
|
|
8
|
+
readonly root: "onramp-payment-pending";
|
|
9
|
+
readonly reopen: "onramp-payment-pending-reopen";
|
|
10
|
+
readonly body: "onramp-payment-pending-body";
|
|
11
|
+
};
|
|
12
|
+
type OnrampPaymentPendingSlot = (typeof ONRAMP_PAYMENT_PENDING_SLOTS)[keyof typeof ONRAMP_PAYMENT_PENDING_SLOTS];
|
|
13
|
+
//#endregion
|
|
14
|
+
export { ONRAMP_PAYMENT_PENDING_SLOTS, OnrampPaymentPendingSlot };
|
package/dist/flows/deposit/widgets/onramp-payment-pending/compound/OnrampPaymentPending.slots.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={root:`onramp-payment-pending`,reopen:`onramp-payment-pending-reopen`,body:`onramp-payment-pending-body`};export{e as ONRAMP_PAYMENT_PENDING_SLOTS};
|
package/dist/flows/deposit/widgets/onramp-payment-pending/compound/components/ReopenButton.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
|
+
|
|
3
|
+
//#region src/flows/deposit/widgets/onramp-payment-pending/compound/components/ReopenButton.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Secondary affordance that re-opens the hosted-checkout window (some browsers/users close the tab
|
|
6
|
+
* or lose it behind the app). Reads the reopen handler from context. Renders nothing when no
|
|
7
|
+
* handler is available.
|
|
8
|
+
*/
|
|
9
|
+
declare function OnrampPaymentPendingReopenButton(): _$react_jsx_runtime0.JSX.Element | null;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { OnrampPaymentPendingReopenButton };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{Trans as e}from"../../../../../../shared/i18n/Trans.js";import"../../../../../../i18n/index.js";import{Button as t}from"../../../../../../shared/ui/Button/Button.js";import"../../../../../../ui/index.js";import{useOnrampPaymentPendingContext as n}from"../context.js";import{ONRAMP_PAYMENT_PENDING_SLOTS as r}from"../OnrampPaymentPending.slots.js";import{jsx as i}from"react/jsx-runtime";function a(){let{onReopen:a}=n(`OnrampPaymentPending.ReopenButton`);return a?i(t,{variant:`secondary`,size:`cta`,onClick:a,"data-stridge-slot":r.reopen,style:{alignSelf:`stretch`},children:i(e,{id:`V_WXOs`,message:`Reopen payment window`})}):null}export{a as OnrampPaymentPendingReopenButton};
|