@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
package/dist/stridge/stubs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=Object.freeze({status:`idle`}),t=Object.freeze({brand:e,target:e,addresses:e,balances:e,quote:e,settlement:e,wallet:e,
|
|
1
|
+
const e=Object.freeze({status:`idle`}),t=Object.freeze({brand:e,target:e,addresses:e,balances:e,quote:e,settlement:e,wallet:e,onrampMethods:e,activity:e}),n=Object.freeze({withdrawableBalances:e,receiveOptions:e,quote:e,settlement:e,activity:e}),r=()=>{};function i(){if(typeof DOMException==`function`)return new DOMException(`Aborted`,`AbortError`);let e=Error(`Aborted`);return e.name=`AbortError`,e}function a(e){return new Promise((t,n)=>{if(e.aborted){n(i());return}e.addEventListener(`abort`,()=>n(i()),{once:!0})})}function o(){return{getSnapshot:()=>t,subscribe:()=>r,arm:()=>{},requestQuote:(e,t)=>a(t),submitDeposit:(e,t)=>a(t),watchSettlement:()=>{},fetchActiveSettlement:async()=>null}}function s(){return{getSnapshot:()=>n,subscribe:()=>r,arm:()=>{},requestQuote:(e,t)=>a(t),prepareWithdrawal:(e,t)=>a(t),watchSettlement:()=>{}}}export{o as createStubDepositDriver,s as createStubWithdrawDriver};
|
package/dist/styles/index.css
CHANGED
|
@@ -441,10 +441,6 @@
|
|
|
441
441
|
border-color: var(--stridge-kit-border);
|
|
442
442
|
}
|
|
443
443
|
|
|
444
|
-
.x16691aj {
|
|
445
|
-
border-color: var(--stridge-kit-destructive);
|
|
446
|
-
}
|
|
447
|
-
|
|
448
444
|
.xab7lrg {
|
|
449
445
|
border-color: var(--stridge-kit-tabs-tab-border-active);
|
|
450
446
|
}
|
|
@@ -665,6 +661,10 @@
|
|
|
665
661
|
gap: var(--stridge-kit-space-3);
|
|
666
662
|
}
|
|
667
663
|
|
|
664
|
+
.x157g05j {
|
|
665
|
+
gap: var(--stridge-kit-space-5);
|
|
666
|
+
}
|
|
667
|
+
|
|
668
668
|
.x1a6yh9e {
|
|
669
669
|
gap: var(--stridge-kit-space-2);
|
|
670
670
|
}
|
|
@@ -1869,10 +1869,6 @@
|
|
|
1869
1869
|
line-height: 0;
|
|
1870
1870
|
}
|
|
1871
1871
|
|
|
1872
|
-
.x1u7k74 {
|
|
1873
|
-
line-height: 1.2;
|
|
1874
|
-
}
|
|
1875
|
-
|
|
1876
1872
|
.x132q4wb {
|
|
1877
1873
|
line-height: 1.25;
|
|
1878
1874
|
}
|
|
@@ -2333,10 +2329,6 @@
|
|
|
2333
2329
|
transition-property: border-color, box-shadow;
|
|
2334
2330
|
}
|
|
2335
2331
|
|
|
2336
|
-
.xshfolx {
|
|
2337
|
-
transition-property: border-color;
|
|
2338
|
-
}
|
|
2339
|
-
|
|
2340
2332
|
.xkdsq27 {
|
|
2341
2333
|
transition-property: box-shadow;
|
|
2342
2334
|
}
|
|
@@ -2486,14 +2478,6 @@
|
|
|
2486
2478
|
z-index: var(--stridge-kit-z-popover);
|
|
2487
2479
|
}
|
|
2488
2480
|
|
|
2489
|
-
.x3ppix8:active:not(:disabled) {
|
|
2490
|
-
background-color: color-mix(in oklab,var(--stridge-kit-card-surface) 78%,var(--stridge-kit-foreground));
|
|
2491
|
-
}
|
|
2492
|
-
|
|
2493
|
-
.x16sea6d:hover:not(:disabled) {
|
|
2494
|
-
background-color: color-mix(in oklab,var(--stridge-kit-card-surface) 89%,var(--stridge-kit-foreground));
|
|
2495
|
-
}
|
|
2496
|
-
|
|
2497
2481
|
.x3celgi:active:not(:disabled) {
|
|
2498
2482
|
background-color: color-mix(in oklab,var(--stridge-kit-surface-hover) 70%,var(--stridge-kit-foreground));
|
|
2499
2483
|
}
|
|
@@ -2878,10 +2862,6 @@
|
|
|
2878
2862
|
height: 14px;
|
|
2879
2863
|
}
|
|
2880
2864
|
|
|
2881
|
-
.x1ymw6g {
|
|
2882
|
-
height: 160px;
|
|
2883
|
-
}
|
|
2884
|
-
|
|
2885
2865
|
.xlup9mm {
|
|
2886
2866
|
height: 16px;
|
|
2887
2867
|
}
|
|
@@ -2906,10 +2886,6 @@
|
|
|
2906
2886
|
height: 200px;
|
|
2907
2887
|
}
|
|
2908
2888
|
|
|
2909
|
-
.x1qx5ct2 {
|
|
2910
|
-
height: 20px;
|
|
2911
|
-
}
|
|
2912
|
-
|
|
2913
2889
|
.x17rw0jw {
|
|
2914
2890
|
height: 22px;
|
|
2915
2891
|
}
|
|
@@ -3374,10 +3350,6 @@
|
|
|
3374
3350
|
width: 14px;
|
|
3375
3351
|
}
|
|
3376
3352
|
|
|
3377
|
-
.xq1dxzn {
|
|
3378
|
-
width: 160px;
|
|
3379
|
-
}
|
|
3380
|
-
|
|
3381
3353
|
.x1kky2od {
|
|
3382
3354
|
width: 16px;
|
|
3383
3355
|
}
|
|
@@ -3394,10 +3366,6 @@
|
|
|
3394
3366
|
width: 1em;
|
|
3395
3367
|
}
|
|
3396
3368
|
|
|
3397
|
-
.xw4jnvo {
|
|
3398
|
-
width: 20px;
|
|
3399
|
-
}
|
|
3400
|
-
|
|
3401
3369
|
.x16grhtn {
|
|
3402
3370
|
width: 220px;
|
|
3403
3371
|
}
|
|
@@ -3426,18 +3394,10 @@
|
|
|
3426
3394
|
width: 44px;
|
|
3427
3395
|
}
|
|
3428
3396
|
|
|
3429
|
-
.x1bu4hv2 {
|
|
3430
|
-
width: 5ch;
|
|
3431
|
-
}
|
|
3432
|
-
|
|
3433
3397
|
.x1fu8urw {
|
|
3434
3398
|
width: 64px;
|
|
3435
3399
|
}
|
|
3436
3400
|
|
|
3437
|
-
.xig3uv9 {
|
|
3438
|
-
width: 6ch;
|
|
3439
|
-
}
|
|
3440
|
-
|
|
3441
3401
|
.x1xc55vz {
|
|
3442
3402
|
width: 8px;
|
|
3443
3403
|
}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Entity, SettlementFailureKind, TxRef } from "./shared/driver/types.js";
|
|
2
|
-
import { AcceptedAssetPayload, AddressItemPayload, AssetPayload, BalanceItemPayload, BrandPayload, ChainPayload, QuoteBreakdownPayload, QuotePayload, QuoteRoutePayload, SettlementFailurePayload, SettlementPayload, SettlementPendingPayload, SettlementSuccessPayload, SourceWalletPayload, TargetPayload, WalletInfo, WalletPayload } from "./flows/deposit/driver/payloads.js";
|
|
2
|
+
import { AcceptedAssetPayload, AddressItemPayload, AssetPayload, BalanceItemPayload, BrandPayload, ChainPayload, OnrampMethodCapability, OnrampMethodsPayload, OnrampQuotePayload, OnrampReceiveAssetPayload, OnrampSessionPayload, OnrampSessionStateName, QuoteBreakdownPayload, QuotePayload, QuoteRoutePayload, SettlementFailurePayload, SettlementPayload, SettlementPendingPayload, SettlementSuccessPayload, SourceWalletPayload, TargetPayload, WalletInfo, WalletPayload } from "./flows/deposit/driver/payloads.js";
|
|
3
3
|
import { DepositSnapshot } from "./flows/deposit/driver/types.js";
|
|
4
4
|
import { FailureInfo } from "./shared/orchestrator/types.js";
|
|
5
|
-
import {
|
|
5
|
+
import { ConfirmDepositPhase, DepositActions, DepositController, DepositMethod, DepositState, DepositStateName, GatewayEvent, OnrampConfirmPhase, OpenInput, ResolvedOpenInput, RetryTargetSpec } from "./flows/deposit/orchestrator/types.js";
|
|
6
6
|
import { ReceiveOptionDto, ReceiveOptionsResponse, WithdrawableBalanceDto, WithdrawableBalancesResponse, WithdrawalQuoteDto, WithdrawalQuoteResponse, WithdrawalSettlementDto, WithdrawalSettlementResponse } from "./flows/withdraw/driver/dto.js";
|
|
7
7
|
import { ReceiveChainPayload, ReceiveTokenOptionPayload, WithdrawableBalanceItemPayload, WithdrawalQuoteBreakdownPayload, WithdrawalQuotePayload, WithdrawalReceiveAssetPayload, WithdrawalSettlementFailurePayload, WithdrawalSettlementPayload, WithdrawalSettlementPendingPayload, WithdrawalSettlementSuccessPayload } from "./flows/withdraw/driver/payloads.js";
|
|
8
8
|
import { WithdrawSnapshot } from "./flows/withdraw/driver/types.js";
|
|
@@ -14,4 +14,4 @@ import { WithdrawActions, WithdrawController, WithdrawEvent, WithdrawState, With
|
|
|
14
14
|
import { STEPS_WITH_OWN_SETTLEMENT_VIEW, stepRendersSettlement } from "./flows/deposit/orchestrator/steps.js";
|
|
15
15
|
import { WithdrawBalanceInput, WithdrawBindings, WithdrawSuggestedRecipient } from "./flows/withdraw/bindings/WithdrawBindings.js";
|
|
16
16
|
import { BannerAckBucket } from "./banners/useBannerAck.js";
|
|
17
|
-
export { type AcceptedAssetPayload, type AddressItemPayload, type AssetPayload, type BalanceItemPayload, type BannerAckBucket, type BrandPayload, type
|
|
17
|
+
export { type AcceptedAssetPayload, type AddressItemPayload, type AssetPayload, type BalanceItemPayload, type BannerAckBucket, type BrandPayload, type ChainPayload, type ConfirmDepositPhase, type DepositActions, type DepositController, type DepositMethod, type DepositSnapshot, type DepositState, type DepositStateName, type Entity, type FailureInfo, type GatewayEvent, type KitConfig, type KitDirection, type KitRadius, type KitStorage, type KitStorageAdapter, type KitStoragePersistence, type KitTarget, type KitTheme, type OnrampConfirmPhase, type OnrampMethodCapability, type OnrampMethodsPayload, type OnrampQuotePayload, type OnrampReceiveAssetPayload, type OnrampSessionPayload, type OnrampSessionStateName, type OpenInput, type Presentation, type PresentationConfig, type PresentationMode, type QuoteBreakdownPayload, type QuotePayload, type QuoteRoutePayload, type ReceiveChainPayload, type ReceiveOptionDto, type ReceiveOptionsResponse, type ReceiveTokenOptionPayload, type ResolvedOpenInput, type RetryTargetSpec, STEPS_WITH_OWN_SETTLEMENT_VIEW, type SettlementFailureKind, type SettlementFailurePayload, type SettlementPayload, type SettlementPendingPayload, type SettlementSuccessPayload, type SourceWalletPayload, type TargetPayload, type TxRef, type WalletInfo, type WalletPayload, type WithdrawActions, type WithdrawBalanceInput, type WithdrawBindings, type WithdrawController, type WithdrawEvent, type WithdrawSnapshot, type WithdrawState, type WithdrawStateName, type WithdrawSubmitActions, type WithdrawSubmitCallback, type WithdrawSubmitInput, type WithdrawSuggestedRecipient, type WithdrawableBalanceDto, type WithdrawableBalanceItemPayload, type WithdrawableBalancesResponse, type WithdrawalFormSnapshot, type WithdrawalQuoteBreakdownPayload, type WithdrawalQuoteDto, type WithdrawalQuotePayload, type WithdrawalQuoteResponse, type WithdrawalReceiveAssetPayload, type WithdrawalSettlementDto, type WithdrawalSettlementFailurePayload, type WithdrawalSettlementPayload, type WithdrawalSettlementPendingPayload, type WithdrawalSettlementResponse, type WithdrawalSettlementSuccessPayload, stepRendersSettlement };
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=`0.1.0-alpha.
|
|
1
|
+
const e=`0.1.0-alpha.61`;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";
|