@payos-inc/payos-react 1.0.3-staging.6
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/components/identity/IdentityBar.d.ts +8 -0
- package/dist/components/identity/IdentityBar.d.ts.map +1 -0
- package/dist/components/order/OrderSummaryAccordion.d.ts +9 -0
- package/dist/components/order/OrderSummaryAccordion.d.ts.map +1 -0
- package/dist/components/order/ShipmentCard.d.ts +8 -0
- package/dist/components/order/ShipmentCard.d.ts.map +1 -0
- package/dist/components/payos/ActiveCardWidget.d.ts +55 -0
- package/dist/components/payos/ActiveCardWidget.d.ts.map +1 -0
- package/dist/components/payos/PayOSFooter.d.ts +24 -0
- package/dist/components/payos/PayOSFooter.d.ts.map +1 -0
- package/dist/components/payos/PaymentMethodRow.d.ts +53 -0
- package/dist/components/payos/PaymentMethodRow.d.ts.map +1 -0
- package/dist/components/payos/PaymentSheet.d.ts +32 -0
- package/dist/components/payos/PaymentSheet.d.ts.map +1 -0
- package/dist/components/payos/PriceTag.d.ts +64 -0
- package/dist/components/payos/PriceTag.d.ts.map +1 -0
- package/dist/components/payos/ReceiptPanel.d.ts +67 -0
- package/dist/components/payos/ReceiptPanel.d.ts.map +1 -0
- package/dist/components/payos/ViewHeader.d.ts +40 -0
- package/dist/components/payos/ViewHeader.d.ts.map +1 -0
- package/dist/components/payos/drawer.d.ts +98 -0
- package/dist/components/payos/drawer.d.ts.map +1 -0
- package/dist/components/payos/order-summary.d.ts +44 -0
- package/dist/components/payos/order-summary.d.ts.map +1 -0
- package/dist/components/payos/otp-input.d.ts +37 -0
- package/dist/components/payos/otp-input.d.ts.map +1 -0
- package/dist/components/payos/phone-input.d.ts +107 -0
- package/dist/components/payos/phone-input.d.ts.map +1 -0
- package/dist/components/payos/views/AgentRegistrationView.d.ts +58 -0
- package/dist/components/payos/views/AgentRegistrationView.d.ts.map +1 -0
- package/dist/components/payos/views/CardAddView.d.ts +78 -0
- package/dist/components/payos/views/CardAddView.d.ts.map +1 -0
- package/dist/components/payos/views/CheckoutView.d.ts +80 -0
- package/dist/components/payos/views/CheckoutView.d.ts.map +1 -0
- package/dist/components/payos/views/IdentityView.d.ts +43 -0
- package/dist/components/payos/views/IdentityView.d.ts.map +1 -0
- package/dist/components/payos/views/MethodListView.d.ts +52 -0
- package/dist/components/payos/views/MethodListView.d.ts.map +1 -0
- package/dist/components/payos/views/OTPView.d.ts +54 -0
- package/dist/components/payos/views/OTPView.d.ts.map +1 -0
- package/dist/components/payos/views/SuccessView.d.ts +49 -0
- package/dist/components/payos/views/SuccessView.d.ts.map +1 -0
- package/dist/components/payos/views/VisaIframeView.d.ts +19 -0
- package/dist/components/payos/views/VisaIframeView.d.ts.map +1 -0
- package/dist/components/payos/views/VisaMethodView.d.ts +35 -0
- package/dist/components/payos/views/VisaMethodView.d.ts.map +1 -0
- package/dist/components/payos/views/VisaOtpView.d.ts +45 -0
- package/dist/components/payos/views/VisaOtpView.d.ts.map +1 -0
- package/dist/components/payos/views/WelcomeBackView.d.ts +34 -0
- package/dist/components/payos/views/WelcomeBackView.d.ts.map +1 -0
- package/dist/components/ui/CardBrandIcon.d.ts +10 -0
- package/dist/components/ui/CardBrandIcon.d.ts.map +1 -0
- package/dist/components/ui/ConfirmDialog.d.ts +25 -0
- package/dist/components/ui/ConfirmDialog.d.ts.map +1 -0
- package/dist/components/ui/InfoTooltip.d.ts +8 -0
- package/dist/components/ui/InfoTooltip.d.ts.map +1 -0
- package/dist/components/ui/PinInput.d.ts +12 -0
- package/dist/components/ui/PinInput.d.ts.map +1 -0
- package/dist/components/ui/button.d.ts +14 -0
- package/dist/components/ui/button.d.ts.map +1 -0
- package/dist/components/ui/card.d.ts +15 -0
- package/dist/components/ui/card.d.ts.map +1 -0
- package/dist/components/ui/input.d.ts +6 -0
- package/dist/components/ui/input.d.ts.map +1 -0
- package/dist/components/ui/label.d.ts +6 -0
- package/dist/components/ui/label.d.ts.map +1 -0
- package/dist/components/ui/separator.d.ts +5 -0
- package/dist/components/ui/separator.d.ts.map +1 -0
- package/dist/hooks/index.d.ts +8 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/useBodyScrollLock.d.ts +32 -0
- package/dist/hooks/useBodyScrollLock.d.ts.map +1 -0
- package/dist/hooks/useCardElement.d.ts +123 -0
- package/dist/hooks/useCardElement.d.ts.map +1 -0
- package/dist/hooks/useCheckoutFlow.d.ts +29 -0
- package/dist/hooks/useCheckoutFlow.d.ts.map +1 -0
- package/dist/hooks/useDrawerState.d.ts +4 -0
- package/dist/hooks/useDrawerState.d.ts.map +1 -0
- package/dist/hooks/usePasskeySDK.d.ts +99 -0
- package/dist/hooks/usePasskeySDK.d.ts.map +1 -0
- package/dist/hooks/useSession.d.ts +68 -0
- package/dist/hooks/useSession.d.ts.map +1 -0
- package/dist/hooks/useVisualViewport.d.ts +15 -0
- package/dist/hooks/useVisualViewport.d.ts.map +1 -0
- package/dist/index.css +1 -0
- package/dist/index.d.ts +43 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/lib/theme.d.ts +53 -0
- package/dist/lib/theme.d.ts.map +1 -0
- package/dist/lib/utils.d.ts +3 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/mocks/index.d.ts +3 -0
- package/dist/mocks/index.d.ts.map +1 -0
- package/dist/mocks/mockCheckoutFlow.d.ts +25 -0
- package/dist/mocks/mockCheckoutFlow.d.ts.map +1 -0
- package/dist/mocks/mockData.d.ts +6 -0
- package/dist/mocks/mockData.d.ts.map +1 -0
- package/dist/mocks/mockSessionData.d.ts +38 -0
- package/dist/mocks/mockSessionData.d.ts.map +1 -0
- package/dist/payos-react.css +1 -0
- package/dist/payos-react.esm.js +23 -0
- package/dist/payos-react.min.js +1 -0
- package/dist/services/apiService.d.ts +297 -0
- package/dist/services/apiService.d.ts.map +1 -0
- package/dist/services/linkTokenService.d.ts +27 -0
- package/dist/services/linkTokenService.d.ts.map +1 -0
- package/dist/services/mockSessionService.d.ts +78 -0
- package/dist/services/mockSessionService.d.ts.map +1 -0
- package/dist/types/cardElement.d.ts +138 -0
- package/dist/types/cardElement.d.ts.map +1 -0
- package/dist/types/components/identity/IdentityBar.d.ts +8 -0
- package/dist/types/components/identity/IdentityBar.d.ts.map +1 -0
- package/dist/types/components/order/OrderSummaryAccordion.d.ts +9 -0
- package/dist/types/components/order/OrderSummaryAccordion.d.ts.map +1 -0
- package/dist/types/components/order/ShipmentCard.d.ts +8 -0
- package/dist/types/components/order/ShipmentCard.d.ts.map +1 -0
- package/dist/types/components/payos/ActiveCardWidget.d.ts +55 -0
- package/dist/types/components/payos/ActiveCardWidget.d.ts.map +1 -0
- package/dist/types/components/payos/PayOSFooter.d.ts +24 -0
- package/dist/types/components/payos/PayOSFooter.d.ts.map +1 -0
- package/dist/types/components/payos/PaymentMethodRow.d.ts +53 -0
- package/dist/types/components/payos/PaymentMethodRow.d.ts.map +1 -0
- package/dist/types/components/payos/PaymentSheet.d.ts +32 -0
- package/dist/types/components/payos/PaymentSheet.d.ts.map +1 -0
- package/dist/types/components/payos/PriceTag.d.ts +64 -0
- package/dist/types/components/payos/PriceTag.d.ts.map +1 -0
- package/dist/types/components/payos/ReceiptPanel.d.ts +67 -0
- package/dist/types/components/payos/ReceiptPanel.d.ts.map +1 -0
- package/dist/types/components/payos/ViewHeader.d.ts +40 -0
- package/dist/types/components/payos/ViewHeader.d.ts.map +1 -0
- package/dist/types/components/payos/drawer.d.ts +98 -0
- package/dist/types/components/payos/drawer.d.ts.map +1 -0
- package/dist/types/components/payos/order-summary.d.ts +44 -0
- package/dist/types/components/payos/order-summary.d.ts.map +1 -0
- package/dist/types/components/payos/otp-input.d.ts +37 -0
- package/dist/types/components/payos/otp-input.d.ts.map +1 -0
- package/dist/types/components/payos/phone-input.d.ts +107 -0
- package/dist/types/components/payos/phone-input.d.ts.map +1 -0
- package/dist/types/components/payos/views/AgentRegistrationView.d.ts +58 -0
- package/dist/types/components/payos/views/AgentRegistrationView.d.ts.map +1 -0
- package/dist/types/components/payos/views/CardAddView.d.ts +78 -0
- package/dist/types/components/payos/views/CardAddView.d.ts.map +1 -0
- package/dist/types/components/payos/views/CheckoutView.d.ts +80 -0
- package/dist/types/components/payos/views/CheckoutView.d.ts.map +1 -0
- package/dist/types/components/payos/views/IdentityView.d.ts +43 -0
- package/dist/types/components/payos/views/IdentityView.d.ts.map +1 -0
- package/dist/types/components/payos/views/MethodListView.d.ts +52 -0
- package/dist/types/components/payos/views/MethodListView.d.ts.map +1 -0
- package/dist/types/components/payos/views/OTPView.d.ts +54 -0
- package/dist/types/components/payos/views/OTPView.d.ts.map +1 -0
- package/dist/types/components/payos/views/SuccessView.d.ts +49 -0
- package/dist/types/components/payos/views/SuccessView.d.ts.map +1 -0
- package/dist/types/components/payos/views/VisaIframeView.d.ts +19 -0
- package/dist/types/components/payos/views/VisaIframeView.d.ts.map +1 -0
- package/dist/types/components/payos/views/VisaMethodView.d.ts +35 -0
- package/dist/types/components/payos/views/VisaMethodView.d.ts.map +1 -0
- package/dist/types/components/payos/views/VisaOtpView.d.ts +45 -0
- package/dist/types/components/payos/views/VisaOtpView.d.ts.map +1 -0
- package/dist/types/components/payos/views/WelcomeBackView.d.ts +34 -0
- package/dist/types/components/payos/views/WelcomeBackView.d.ts.map +1 -0
- package/dist/types/components/ui/CardBrandIcon.d.ts +10 -0
- package/dist/types/components/ui/CardBrandIcon.d.ts.map +1 -0
- package/dist/types/components/ui/ConfirmDialog.d.ts +25 -0
- package/dist/types/components/ui/ConfirmDialog.d.ts.map +1 -0
- package/dist/types/components/ui/InfoTooltip.d.ts +8 -0
- package/dist/types/components/ui/InfoTooltip.d.ts.map +1 -0
- package/dist/types/components/ui/PinInput.d.ts +12 -0
- package/dist/types/components/ui/PinInput.d.ts.map +1 -0
- package/dist/types/components/ui/button.d.ts +14 -0
- package/dist/types/components/ui/button.d.ts.map +1 -0
- package/dist/types/components/ui/card.d.ts +15 -0
- package/dist/types/components/ui/card.d.ts.map +1 -0
- package/dist/types/components/ui/input.d.ts +6 -0
- package/dist/types/components/ui/input.d.ts.map +1 -0
- package/dist/types/components/ui/label.d.ts +6 -0
- package/dist/types/components/ui/label.d.ts.map +1 -0
- package/dist/types/components/ui/separator.d.ts +5 -0
- package/dist/types/components/ui/separator.d.ts.map +1 -0
- package/dist/types/drawer.d.ts +33 -0
- package/dist/types/drawer.d.ts.map +1 -0
- package/dist/types/hooks/index.d.ts +8 -0
- package/dist/types/hooks/index.d.ts.map +1 -0
- package/dist/types/hooks/useBodyScrollLock.d.ts +32 -0
- package/dist/types/hooks/useBodyScrollLock.d.ts.map +1 -0
- package/dist/types/hooks/useCardElement.d.ts +123 -0
- package/dist/types/hooks/useCardElement.d.ts.map +1 -0
- package/dist/types/hooks/useCheckoutFlow.d.ts +29 -0
- package/dist/types/hooks/useCheckoutFlow.d.ts.map +1 -0
- package/dist/types/hooks/useDrawerState.d.ts +4 -0
- package/dist/types/hooks/useDrawerState.d.ts.map +1 -0
- package/dist/types/hooks/usePasskeySDK.d.ts +99 -0
- package/dist/types/hooks/usePasskeySDK.d.ts.map +1 -0
- package/dist/types/hooks/useSession.d.ts +68 -0
- package/dist/types/hooks/useSession.d.ts.map +1 -0
- package/dist/types/hooks/useVisualViewport.d.ts +15 -0
- package/dist/types/hooks/useVisualViewport.d.ts.map +1 -0
- package/dist/types/index.d.ts +43 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/lib/theme.d.ts +53 -0
- package/dist/types/lib/theme.d.ts.map +1 -0
- package/dist/types/lib/utils.d.ts +3 -0
- package/dist/types/lib/utils.d.ts.map +1 -0
- package/dist/types/mocks/index.d.ts +3 -0
- package/dist/types/mocks/index.d.ts.map +1 -0
- package/dist/types/mocks/mockCheckoutFlow.d.ts +25 -0
- package/dist/types/mocks/mockCheckoutFlow.d.ts.map +1 -0
- package/dist/types/mocks/mockData.d.ts +6 -0
- package/dist/types/mocks/mockData.d.ts.map +1 -0
- package/dist/types/mocks/mockSessionData.d.ts +38 -0
- package/dist/types/mocks/mockSessionData.d.ts.map +1 -0
- package/dist/types/order.d.ts +25 -0
- package/dist/types/order.d.ts.map +1 -0
- package/dist/types/payment.d.ts +52 -0
- package/dist/types/payment.d.ts.map +1 -0
- package/dist/types/services/apiService.d.ts +297 -0
- package/dist/types/services/apiService.d.ts.map +1 -0
- package/dist/types/services/linkTokenService.d.ts +27 -0
- package/dist/types/services/linkTokenService.d.ts.map +1 -0
- package/dist/types/services/mockSessionService.d.ts +78 -0
- package/dist/types/services/mockSessionService.d.ts.map +1 -0
- package/dist/types/session.d.ts +148 -0
- package/dist/types/session.d.ts.map +1 -0
- package/dist/types/types/cardElement.d.ts +138 -0
- package/dist/types/types/cardElement.d.ts.map +1 -0
- package/dist/types/types/drawer.d.ts +33 -0
- package/dist/types/types/drawer.d.ts.map +1 -0
- package/dist/types/types/index.d.ts +4 -0
- package/dist/types/types/index.d.ts.map +1 -0
- package/dist/types/types/order.d.ts +25 -0
- package/dist/types/types/order.d.ts.map +1 -0
- package/dist/types/types/payment.d.ts +52 -0
- package/dist/types/types/payment.d.ts.map +1 -0
- package/dist/types/types/session.d.ts +148 -0
- package/dist/types/types/session.d.ts.map +1 -0
- package/dist/types/utils/deviceFingerprint.d.ts +27 -0
- package/dist/types/utils/deviceFingerprint.d.ts.map +1 -0
- package/dist/types/utils/environment.d.ts +22 -0
- package/dist/types/utils/environment.d.ts.map +1 -0
- package/dist/types/utils/formatting.d.ts +38 -0
- package/dist/types/utils/formatting.d.ts.map +1 -0
- package/dist/types/utils/index.d.ts +3 -0
- package/dist/types/utils/index.d.ts.map +1 -0
- package/dist/types/utils/validation.d.ts +52 -0
- package/dist/types/utils/validation.d.ts.map +1 -0
- package/dist/utils/deviceFingerprint.d.ts +27 -0
- package/dist/utils/deviceFingerprint.d.ts.map +1 -0
- package/dist/utils/environment.d.ts +22 -0
- package/dist/utils/environment.d.ts.map +1 -0
- package/dist/utils/formatting.d.ts +38 -0
- package/dist/utils/formatting.d.ts.map +1 -0
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/validation.d.ts +52 -0
- package/dist/utils/validation.d.ts.map +1 -0
- package/package.json +84 -0
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { CardData, BillingAddress } from "../../../types";
|
|
3
|
+
import type { CardElementAddress } from "../../../types/cardElement";
|
|
4
|
+
/**
|
|
5
|
+
* CardAddView - Secure Card Entry via PayOS Card Element (VGS iframe)
|
|
6
|
+
*
|
|
7
|
+
* **PCI Compliance:**
|
|
8
|
+
* Card data capture is handled exclusively via the CardElement iframe
|
|
9
|
+
* powered by VGS (Very Good Security). No manual card input fields.
|
|
10
|
+
*
|
|
11
|
+
* **Flow:**
|
|
12
|
+
* 1. CardElement iframe mounts with linkToken
|
|
13
|
+
* 2. User enters card details in secure iframe
|
|
14
|
+
* 3. On submit, iframe tokenizes card via VGS
|
|
15
|
+
* 4. onTokenized callback fires with card data (id, brand, last4, artwork, etc.)
|
|
16
|
+
* 5. Parent component receives CardData and BillingAddress
|
|
17
|
+
*
|
|
18
|
+
* **Design:**
|
|
19
|
+
* - iOS-style navigation header (contextual for first-time users)
|
|
20
|
+
* - CardElement iframe fills the card container
|
|
21
|
+
* - Loading and error states
|
|
22
|
+
*/
|
|
23
|
+
interface CardAddViewProps {
|
|
24
|
+
/**
|
|
25
|
+
* Link token for CardElement initialization (REQUIRED for PCI compliance)
|
|
26
|
+
*/
|
|
27
|
+
linkToken: string;
|
|
28
|
+
/**
|
|
29
|
+
* Wallet user ID for card tokenization (REQUIRED after OTP verification)
|
|
30
|
+
* This is passed to the CardElement iframe for VGS to associate the card with the user
|
|
31
|
+
*/
|
|
32
|
+
walletUserId?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Callback when user submits new card
|
|
35
|
+
* Called with tokenized card data from VGS iframe
|
|
36
|
+
*/
|
|
37
|
+
onSubmit: (cardData: CardData, billingAddress: BillingAddress) => void;
|
|
38
|
+
/**
|
|
39
|
+
* Back button handler (optional - hidden when isFirstCard is true)
|
|
40
|
+
*/
|
|
41
|
+
onBack?: () => void;
|
|
42
|
+
/**
|
|
43
|
+
* Loading state (external, e.g., from parent during card save)
|
|
44
|
+
*/
|
|
45
|
+
isLoading?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Error message (external, from parent)
|
|
48
|
+
*/
|
|
49
|
+
error?: string;
|
|
50
|
+
/**
|
|
51
|
+
* Whether this is the first card being added (user has no saved cards)
|
|
52
|
+
* When true:
|
|
53
|
+
* - Hides back button
|
|
54
|
+
* - Changes title from "Add Card" to "Secure Checkout"
|
|
55
|
+
*/
|
|
56
|
+
isFirstCard?: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* Target environment for CardElement
|
|
59
|
+
*/
|
|
60
|
+
environment?: "sandbox" | "production";
|
|
61
|
+
/**
|
|
62
|
+
* Custom base URL for CardElement iframe UI (where iframe HTML is loaded from)
|
|
63
|
+
*/
|
|
64
|
+
customBaseUrl?: string;
|
|
65
|
+
/**
|
|
66
|
+
* Backend API URL for CardElement iframe (for local dev - iframe on Azure can't reach localhost)
|
|
67
|
+
* This is passed to the iframe via customParams so it knows where to make API calls
|
|
68
|
+
*/
|
|
69
|
+
devApiUrl?: string;
|
|
70
|
+
/**
|
|
71
|
+
* Shipping address for "Same as shipping" feature
|
|
72
|
+
* When provided, shows a checkbox to use shipping address as billing
|
|
73
|
+
*/
|
|
74
|
+
shippingAddress?: CardElementAddress;
|
|
75
|
+
}
|
|
76
|
+
export declare const CardAddView: React.FC<CardAddViewProps>;
|
|
77
|
+
export {};
|
|
78
|
+
//# sourceMappingURL=CardAddView.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CardAddView.d.ts","sourceRoot":"","sources":["../../../../../src/components/payos/views/CardAddView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC/D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAErE;;;;;;;;;;;;;;;;;;GAkBG;AAEH,UAAU,gBAAgB;IACxB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;OAGG;IACH,QAAQ,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,cAAc,EAAE,cAAc,KAAK,IAAI,CAAC;IAEvE;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IAEpB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;;;OAKG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;OAEG;IACH,WAAW,CAAC,EAAE,SAAS,GAAG,YAAY,CAAC;IAEvC;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,eAAe,CAAC,EAAE,kBAAkB,CAAC;CACtC;AAED,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CA+OlD,CAAC"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { SavedCard } from "../../../types";
|
|
3
|
+
import type { MultiPaymentIntent } from "../../../types/session";
|
|
4
|
+
/**
|
|
5
|
+
* CheckoutView - Root payment view with payment method + submit
|
|
6
|
+
*
|
|
7
|
+
* This is the main checkout screen in the Card Stack Architecture.
|
|
8
|
+
* Features:
|
|
9
|
+
* - ActiveCardWidget (card display + CVC entry in unified component)
|
|
10
|
+
* - Pay button (disabled until CVC is valid)
|
|
11
|
+
* - Trust footer with PayOS branding
|
|
12
|
+
* - Order summary now accessible via Smart Header (receipt toggle)
|
|
13
|
+
*
|
|
14
|
+
* Navigation:
|
|
15
|
+
* - No back button (this is the root view)
|
|
16
|
+
* - "Change" button in ActiveCardWidget → navigates to MethodListView
|
|
17
|
+
*
|
|
18
|
+
* Design System:
|
|
19
|
+
* - Cards on Gray canvas
|
|
20
|
+
* - Section labels with proper hierarchy
|
|
21
|
+
* - Tactile physics on buttons
|
|
22
|
+
*/
|
|
23
|
+
export interface OrderItem {
|
|
24
|
+
label: string;
|
|
25
|
+
value: string | number;
|
|
26
|
+
description?: string;
|
|
27
|
+
}
|
|
28
|
+
export interface CheckoutViewProps {
|
|
29
|
+
/**
|
|
30
|
+
* Selected payment card
|
|
31
|
+
*/
|
|
32
|
+
selectedCard: SavedCard;
|
|
33
|
+
/**
|
|
34
|
+
* Current CVC value
|
|
35
|
+
*/
|
|
36
|
+
cvc: string;
|
|
37
|
+
/**
|
|
38
|
+
* CVC change handler
|
|
39
|
+
*/
|
|
40
|
+
onCvcChange: (cvc: string) => void;
|
|
41
|
+
/**
|
|
42
|
+
* Handler when "Change" button is clicked in ActiveCardWidget
|
|
43
|
+
* Should navigate to MethodListView
|
|
44
|
+
*/
|
|
45
|
+
onChangeCard: () => void;
|
|
46
|
+
/**
|
|
47
|
+
* Payment intent with all order/payment details
|
|
48
|
+
* Preferred over individual props for full session integration
|
|
49
|
+
*/
|
|
50
|
+
paymentIntent?: MultiPaymentIntent;
|
|
51
|
+
/**
|
|
52
|
+
* Total amount to display (formatted, e.g., "$185.50")
|
|
53
|
+
* @deprecated Use paymentIntent instead - this is kept for backward compatibility
|
|
54
|
+
*/
|
|
55
|
+
total?: string;
|
|
56
|
+
/**
|
|
57
|
+
* Optional order line items
|
|
58
|
+
* @deprecated Use paymentIntent.payments instead
|
|
59
|
+
*/
|
|
60
|
+
items?: OrderItem[];
|
|
61
|
+
/**
|
|
62
|
+
* Whether this is an agent purchase
|
|
63
|
+
* @deprecated Use paymentIntent.type instead - derived automatically
|
|
64
|
+
*/
|
|
65
|
+
isAgentMode?: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Payment submission handler
|
|
68
|
+
*/
|
|
69
|
+
onSubmit: () => void;
|
|
70
|
+
/**
|
|
71
|
+
* Loading state during payment processing
|
|
72
|
+
*/
|
|
73
|
+
isLoading?: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Error message
|
|
76
|
+
*/
|
|
77
|
+
error?: string;
|
|
78
|
+
}
|
|
79
|
+
export declare const CheckoutView: React.FC<CheckoutViewProps>;
|
|
80
|
+
//# sourceMappingURL=CheckoutView.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CheckoutView.d.ts","sourceRoot":"","sources":["../../../../../src/components/payos/views/CheckoutView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,EAAE,kBAAkB,EAAqB,MAAM,wBAAwB,CAAC;AAEpF;;;;;;;;;;;;;;;;;;GAkBG;AAEH,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAeD,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,YAAY,EAAE,SAAS,CAAC;IACxB;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,WAAW,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC;;;OAGG;IACH,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB;;;OAGG;IACH,aAAa,CAAC,EAAE,kBAAkB,CAAC;IACnC;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,EAAE,CAAC;IACpB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAiFpD,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type CountryCode } from "../phone-input";
|
|
3
|
+
/**
|
|
4
|
+
* IdentityView - Phone entry screen for authentication
|
|
5
|
+
*
|
|
6
|
+
* State 1 of checkout flow:
|
|
7
|
+
* - Minimal header with context
|
|
8
|
+
* - Phone input (Engineered component)
|
|
9
|
+
* - Submit button attached below
|
|
10
|
+
*/
|
|
11
|
+
interface IdentityViewProps {
|
|
12
|
+
/**
|
|
13
|
+
* Phone number value
|
|
14
|
+
*/
|
|
15
|
+
phone: string;
|
|
16
|
+
/**
|
|
17
|
+
* Phone change handler
|
|
18
|
+
*/
|
|
19
|
+
onPhoneChange: (phone: string) => void;
|
|
20
|
+
/**
|
|
21
|
+
* Selected country code
|
|
22
|
+
*/
|
|
23
|
+
countryCode?: CountryCode;
|
|
24
|
+
/**
|
|
25
|
+
* Country change handler
|
|
26
|
+
*/
|
|
27
|
+
onCountryChange?: (code: CountryCode) => void;
|
|
28
|
+
/**
|
|
29
|
+
* Submit handler
|
|
30
|
+
*/
|
|
31
|
+
onSubmit: () => void;
|
|
32
|
+
/**
|
|
33
|
+
* Whether submission is loading
|
|
34
|
+
*/
|
|
35
|
+
isLoading?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Validation error message
|
|
38
|
+
*/
|
|
39
|
+
error?: string;
|
|
40
|
+
}
|
|
41
|
+
export declare const IdentityView: React.FC<IdentityViewProps>;
|
|
42
|
+
export {};
|
|
43
|
+
//# sourceMappingURL=IdentityView.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IdentityView.d.ts","sourceRoot":"","sources":["../../../../../src/components/payos/views/IdentityView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAc,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAG9D;;;;;;;GAOG;AAEH,UAAU,iBAAiB;IACzB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC;;OAEG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B;;OAEG;IACH,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,IAAI,CAAC;IAC9C;;OAEG;IACH,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAkEpD,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { SavedCard } from "../../../types";
|
|
3
|
+
/**
|
|
4
|
+
* MethodListView - Full card list with radio-style selection
|
|
5
|
+
*
|
|
6
|
+
* **High-Density Design:**
|
|
7
|
+
* - iOS-style navigation header with back button
|
|
8
|
+
* - List of all saved cards using PaymentMethodRow
|
|
9
|
+
* - One-tap selection: clicking immediately returns to CheckoutView
|
|
10
|
+
* - "Add new card" merged INTO list as final row (not floating footer)
|
|
11
|
+
* - Card Stack Architecture pattern
|
|
12
|
+
* - Optional delete functionality with swipe-to-delete gesture
|
|
13
|
+
*
|
|
14
|
+
* Navigation Flow:
|
|
15
|
+
* - Back button → returns to CheckoutView
|
|
16
|
+
* - Selecting a card → immediately returns to CheckoutView
|
|
17
|
+
* - "Add new card" → navigates to AddCardView
|
|
18
|
+
*/
|
|
19
|
+
interface MethodListViewProps {
|
|
20
|
+
/**
|
|
21
|
+
* List of saved cards
|
|
22
|
+
*/
|
|
23
|
+
cards: SavedCard[];
|
|
24
|
+
/**
|
|
25
|
+
* Currently selected card ID
|
|
26
|
+
*/
|
|
27
|
+
selectedCardId: string | null;
|
|
28
|
+
/**
|
|
29
|
+
* Callback when user selects a card
|
|
30
|
+
* Implementation should:
|
|
31
|
+
* 1. Update selectedCardId
|
|
32
|
+
* 2. Immediately navigate back to CheckoutView (one-tap selection)
|
|
33
|
+
*/
|
|
34
|
+
onSelectCard: (cardId: string) => void;
|
|
35
|
+
/**
|
|
36
|
+
* Callback when user clicks "Add new card"
|
|
37
|
+
* Should navigate to AddCardView
|
|
38
|
+
*/
|
|
39
|
+
onAddNewCard: () => void;
|
|
40
|
+
/**
|
|
41
|
+
* Callback when back button is clicked
|
|
42
|
+
* Should return to CheckoutView
|
|
43
|
+
*/
|
|
44
|
+
onBack: () => void;
|
|
45
|
+
/**
|
|
46
|
+
* Optional callback when user deletes a card
|
|
47
|
+
*/
|
|
48
|
+
onDeleteCard?: (cardId: string) => void;
|
|
49
|
+
}
|
|
50
|
+
export declare const MethodListView: React.FC<MethodListViewProps>;
|
|
51
|
+
export {};
|
|
52
|
+
//# sourceMappingURL=MethodListView.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MethodListView.d.ts","sourceRoot":"","sources":["../../../../../src/components/payos/views/MethodListView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD;;;;;;;;;;;;;;;GAeG;AAEH,UAAU,mBAAmB;IAC3B;;OAEG;IACH,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB;;OAEG;IACH,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B;;;;;OAKG;IACH,YAAY,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC;;;OAGG;IACH,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB;;;OAGG;IACH,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB;;OAEG;IACH,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CACzC;AAED,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA8GxD,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
interface OTPViewProps {
|
|
3
|
+
/**
|
|
4
|
+
* Phone number (masked, e.g., "(555) 123-****")
|
|
5
|
+
*/
|
|
6
|
+
phoneNumber: string;
|
|
7
|
+
/**
|
|
8
|
+
* OTP value
|
|
9
|
+
*/
|
|
10
|
+
otp: string;
|
|
11
|
+
/**
|
|
12
|
+
* OTP change handler
|
|
13
|
+
*/
|
|
14
|
+
onOtpChange: (otp: string) => void;
|
|
15
|
+
/**
|
|
16
|
+
* Submit handler (receives code directly for auto-submit)
|
|
17
|
+
*/
|
|
18
|
+
onSubmit: (code?: string) => void;
|
|
19
|
+
/**
|
|
20
|
+
* Edit phone number handler
|
|
21
|
+
*/
|
|
22
|
+
onEdit?: () => void;
|
|
23
|
+
/**
|
|
24
|
+
* Resend code handler
|
|
25
|
+
*/
|
|
26
|
+
onResend?: () => void;
|
|
27
|
+
/**
|
|
28
|
+
* Whether submission is loading
|
|
29
|
+
*/
|
|
30
|
+
isLoading?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Whether resend is loading
|
|
33
|
+
*/
|
|
34
|
+
isResending?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Validation error message
|
|
37
|
+
*/
|
|
38
|
+
error?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Seconds remaining until resend is allowed (0 = can resend)
|
|
41
|
+
*/
|
|
42
|
+
resendCooldown?: number;
|
|
43
|
+
/**
|
|
44
|
+
* Number of failed OTP attempts
|
|
45
|
+
*/
|
|
46
|
+
retryCount?: number;
|
|
47
|
+
/**
|
|
48
|
+
* Maximum allowed retry attempts (default: 3)
|
|
49
|
+
*/
|
|
50
|
+
maxRetries?: number;
|
|
51
|
+
}
|
|
52
|
+
export declare const OTPView: React.FC<OTPViewProps>;
|
|
53
|
+
export {};
|
|
54
|
+
//# sourceMappingURL=OTPView.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OTPView.d.ts","sourceRoot":"","sources":["../../../../../src/components/payos/views/OTPView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAmD/B,UAAU,YAAY;IACpB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,WAAW,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC;;OAEG;IACH,QAAQ,EAAE,CAAC,IAAI,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CA4H1C,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { MultiPaymentIntent, CompletionResult, WalletUser } from "../../../types/session";
|
|
3
|
+
export interface SuccessViewProps {
|
|
4
|
+
/**
|
|
5
|
+
* Payment intent - used to derive success type and mode
|
|
6
|
+
* Preferred over individual props for full session integration
|
|
7
|
+
*/
|
|
8
|
+
paymentIntent?: MultiPaymentIntent;
|
|
9
|
+
/**
|
|
10
|
+
* Completion result from payment
|
|
11
|
+
*/
|
|
12
|
+
completionResult?: CompletionResult;
|
|
13
|
+
/**
|
|
14
|
+
* Wallet user for personalization
|
|
15
|
+
*/
|
|
16
|
+
walletUser?: WalletUser;
|
|
17
|
+
/**
|
|
18
|
+
* Success message type
|
|
19
|
+
* @deprecated Use paymentIntent instead - type is derived automatically
|
|
20
|
+
*/
|
|
21
|
+
type?: 'payment' | 'card-added';
|
|
22
|
+
/**
|
|
23
|
+
* Card network (determines passkey flow)
|
|
24
|
+
*/
|
|
25
|
+
cardNetwork?: 'visa' | 'mastercard';
|
|
26
|
+
/**
|
|
27
|
+
* Checkout mode - affects messaging and passkey upsell display
|
|
28
|
+
* @deprecated Use paymentIntent.type instead - mode is derived automatically
|
|
29
|
+
*/
|
|
30
|
+
mode?: 'standard' | 'agent';
|
|
31
|
+
/**
|
|
32
|
+
* Handler for creating passkey (Mastercard SDK or Visa step-up trigger)
|
|
33
|
+
*/
|
|
34
|
+
onCreatePasskey?: () => void;
|
|
35
|
+
/**
|
|
36
|
+
* Handler for dismissing upsell
|
|
37
|
+
*/
|
|
38
|
+
onDismiss: () => void;
|
|
39
|
+
/**
|
|
40
|
+
* Whether passkey creation is loading (Mastercard SDK call)
|
|
41
|
+
*/
|
|
42
|
+
isLoading?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Whether user already has passkey enrolled
|
|
45
|
+
*/
|
|
46
|
+
passkeyEnrolled?: boolean;
|
|
47
|
+
}
|
|
48
|
+
export declare const SuccessView: React.FC<SuccessViewProps>;
|
|
49
|
+
//# sourceMappingURL=SuccessView.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SuccessView.d.ts","sourceRoot":"","sources":["../../../../../src/components/payos/views/SuccessView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,KAAK,EAAE,kBAAkB,EAAqB,gBAAgB,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAiClH,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,aAAa,CAAC,EAAE,kBAAkB,CAAC;IACnC;;OAEG;IACH,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC;;OAEG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB;;;OAGG;IACH,IAAI,CAAC,EAAE,SAAS,GAAG,YAAY,CAAC;IAChC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,YAAY,CAAC;IACpC;;;OAGG;IACH,IAAI,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC;IAC5B;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;IAC7B;;OAEG;IACH,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAkHlD,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* VisaIframeView - Visa Passkey SDK Iframe Container
|
|
4
|
+
*
|
|
5
|
+
* Features:
|
|
6
|
+
* - Container div for Visa VTS SDK iframe
|
|
7
|
+
* - Shown after OTP validation succeeds
|
|
8
|
+
* - SDK injects iframe into the container via showIframe()
|
|
9
|
+
*
|
|
10
|
+
* Design Pattern: Dedicated view for Visa passkey registration UI
|
|
11
|
+
*/
|
|
12
|
+
export interface VisaIframeViewProps {
|
|
13
|
+
/**
|
|
14
|
+
* Cancel handler
|
|
15
|
+
*/
|
|
16
|
+
onCancel?: () => void;
|
|
17
|
+
}
|
|
18
|
+
export declare const VisaIframeView: React.FC<VisaIframeViewProps>;
|
|
19
|
+
//# sourceMappingURL=VisaIframeView.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VisaIframeView.d.ts","sourceRoot":"","sources":["../../../../../src/components/payos/views/VisaIframeView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B;;;;;;;;;GASG;AAEH,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAqBxD,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface VisaVerificationMethod {
|
|
3
|
+
/**
|
|
4
|
+
* Unique method ID
|
|
5
|
+
*/
|
|
6
|
+
id: string;
|
|
7
|
+
/**
|
|
8
|
+
* Method type
|
|
9
|
+
*/
|
|
10
|
+
type: 'sms' | 'email';
|
|
11
|
+
/**
|
|
12
|
+
* Masked contact info (e.g., "•••• 1234" or "••••@gmail.com")
|
|
13
|
+
*/
|
|
14
|
+
maskedValue: string;
|
|
15
|
+
}
|
|
16
|
+
export interface VisaMethodViewProps {
|
|
17
|
+
/**
|
|
18
|
+
* Available verification methods
|
|
19
|
+
*/
|
|
20
|
+
methods: VisaVerificationMethod[];
|
|
21
|
+
/**
|
|
22
|
+
* Selection handler - triggers OTP send
|
|
23
|
+
*/
|
|
24
|
+
onSelectMethod: (methodId: string) => void;
|
|
25
|
+
/**
|
|
26
|
+
* Back handler (return to SuccessView)
|
|
27
|
+
*/
|
|
28
|
+
onBack: () => void;
|
|
29
|
+
/**
|
|
30
|
+
* Loading state during method selection
|
|
31
|
+
*/
|
|
32
|
+
isLoading?: boolean;
|
|
33
|
+
}
|
|
34
|
+
export declare const VisaMethodView: React.FC<VisaMethodViewProps>;
|
|
35
|
+
//# sourceMappingURL=VisaMethodView.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VisaMethodView.d.ts","sourceRoot":"","sources":["../../../../../src/components/payos/views/VisaMethodView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAoB/B,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,IAAI,EAAE,KAAK,GAAG,OAAO,CAAC;IACtB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,OAAO,EAAE,sBAAsB,EAAE,CAAC;IAClC;;OAEG;IACH,cAAc,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C;;OAEG;IACH,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAkFxD,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface VisaOtpViewProps {
|
|
3
|
+
/**
|
|
4
|
+
* Selected method description (e.g., "Text to •••• 1234")
|
|
5
|
+
*/
|
|
6
|
+
methodDescription: string;
|
|
7
|
+
/**
|
|
8
|
+
* Current OTP value
|
|
9
|
+
*/
|
|
10
|
+
otp: string;
|
|
11
|
+
/**
|
|
12
|
+
* OTP change handler
|
|
13
|
+
*/
|
|
14
|
+
onOtpChange: (otp: string) => void;
|
|
15
|
+
/**
|
|
16
|
+
* Verify handler
|
|
17
|
+
*/
|
|
18
|
+
onVerify: () => void;
|
|
19
|
+
/**
|
|
20
|
+
* Back handler (return to VisaMethodView)
|
|
21
|
+
*/
|
|
22
|
+
onBack: () => void;
|
|
23
|
+
/**
|
|
24
|
+
* Resend handler
|
|
25
|
+
*/
|
|
26
|
+
onResend?: () => void;
|
|
27
|
+
/**
|
|
28
|
+
* Handler for "verify another way" action (when locked out)
|
|
29
|
+
*/
|
|
30
|
+
onVerifyAnotherWay?: () => void;
|
|
31
|
+
/**
|
|
32
|
+
* Loading state
|
|
33
|
+
*/
|
|
34
|
+
isLoading?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Error message
|
|
37
|
+
*/
|
|
38
|
+
error?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Whether user can retry OTP entry (false = locked out)
|
|
41
|
+
*/
|
|
42
|
+
canRetry?: boolean;
|
|
43
|
+
}
|
|
44
|
+
export declare const VisaOtpView: React.FC<VisaOtpViewProps>;
|
|
45
|
+
//# sourceMappingURL=VisaOtpView.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VisaOtpView.d.ts","sourceRoot":"","sources":["../../../../../src/components/payos/views/VisaOtpView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAuB/B,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,iBAAiB,EAAE,MAAM,CAAC;IAC1B;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,WAAW,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC;;OAEG;IACH,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB;;OAEG;IACH,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;IAChC;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CA8HlD,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* WelcomeBackView - Profile Selection / Known User Identity Confirmation
|
|
4
|
+
*
|
|
5
|
+
* Features:
|
|
6
|
+
* - "Welcome back!" headline for warm greeting
|
|
7
|
+
* - Identity Tile: Compact card showing phone number with verified indicator
|
|
8
|
+
* - User icon in rounded gray container (non-floaty design)
|
|
9
|
+
* - Clean vertical flow: Headline → Tile → Button → Subtext
|
|
10
|
+
* - "Not you?" link for account switching
|
|
11
|
+
*
|
|
12
|
+
* Design Pattern: "Sandwich" layout with subtext below button for better hierarchy
|
|
13
|
+
*/
|
|
14
|
+
interface WelcomeBackViewProps {
|
|
15
|
+
/**
|
|
16
|
+
* Prefilled phone number (formatted)
|
|
17
|
+
*/
|
|
18
|
+
phone: string;
|
|
19
|
+
/**
|
|
20
|
+
* Continue handler (sends SMS code)
|
|
21
|
+
*/
|
|
22
|
+
onContinue: () => void;
|
|
23
|
+
/**
|
|
24
|
+
* Switch account handler (clears prefill, goes to IdentityView)
|
|
25
|
+
*/
|
|
26
|
+
onSwitchAccount: () => void;
|
|
27
|
+
/**
|
|
28
|
+
* Whether continue action is loading
|
|
29
|
+
*/
|
|
30
|
+
isLoading?: boolean;
|
|
31
|
+
}
|
|
32
|
+
export declare const WelcomeBackView: React.FC<WelcomeBackViewProps>;
|
|
33
|
+
export {};
|
|
34
|
+
//# sourceMappingURL=WelcomeBackView.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WelcomeBackView.d.ts","sourceRoot":"","sources":["../../../../../src/components/payos/views/WelcomeBackView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B;;;;;;;;;;;GAWG;AAEH,UAAU,oBAAoB;IAC5B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB;;OAEG;IACH,eAAe,EAAE,MAAM,IAAI,CAAC;IAC5B;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAsE1D,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { CardBrand } from '../../types/payment';
|
|
3
|
+
interface CardBrandIconProps {
|
|
4
|
+
brand: CardBrand;
|
|
5
|
+
size?: 'sm' | 'md';
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const CardBrandIcon: React.FC<CardBrandIconProps>;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=CardBrandIcon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CardBrandIcon.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/CardBrandIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAErD,UAAU,kBAAkB;IAC1B,KAAK,EAAE,SAAS,CAAC;IACjB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAyCtD,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* ConfirmDialog - Reusable confirmation modal
|
|
4
|
+
*
|
|
5
|
+
* Features:
|
|
6
|
+
* - Semi-transparent backdrop overlay
|
|
7
|
+
* - Centered modal card
|
|
8
|
+
* - Title, message, Cancel and Confirm buttons
|
|
9
|
+
* - variant='danger' for red confirm button (delete actions)
|
|
10
|
+
* - Loading state support
|
|
11
|
+
*/
|
|
12
|
+
interface ConfirmDialogProps {
|
|
13
|
+
isOpen: boolean;
|
|
14
|
+
title: string;
|
|
15
|
+
message: string;
|
|
16
|
+
confirmText?: string;
|
|
17
|
+
cancelText?: string;
|
|
18
|
+
onConfirm: () => void;
|
|
19
|
+
onCancel: () => void;
|
|
20
|
+
isLoading?: boolean;
|
|
21
|
+
variant?: "danger" | "default";
|
|
22
|
+
}
|
|
23
|
+
export declare const ConfirmDialog: React.FC<ConfirmDialogProps>;
|
|
24
|
+
export {};
|
|
25
|
+
//# sourceMappingURL=ConfirmDialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfirmDialog.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/ConfirmDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B;;;;;;;;;GASG;AAEH,UAAU,kBAAkB;IAC1B,MAAM,EAAE,OAAO,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;CAChC;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAyEtD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InfoTooltip.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/InfoTooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAGxC,UAAU,gBAAgB;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CA2BlD,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface PinInputProps {
|
|
3
|
+
length: number;
|
|
4
|
+
value: string;
|
|
5
|
+
onChange: (value: string) => void;
|
|
6
|
+
onComplete?: () => void;
|
|
7
|
+
error?: boolean;
|
|
8
|
+
autoFocus?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare const PinInput: React.FC<PinInputProps>;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=PinInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PinInput.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/PinInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAEjD,UAAU,aAAa;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAmF5C,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
declare const buttonVariants: (props?: ({
|
|
4
|
+
variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null | undefined;
|
|
5
|
+
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
7
|
+
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
8
|
+
asChild?: boolean;
|
|
9
|
+
isLoading?: boolean;
|
|
10
|
+
loadingText?: string;
|
|
11
|
+
}
|
|
12
|
+
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
13
|
+
export { Button, buttonVariants };
|
|
14
|
+
//# sourceMappingURL=button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAKlE,QAAA,MAAM,cAAc;;;mFA4BnB,CAAC;AAEF,MAAM,WAAW,WACf,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EACnD,YAAY,CAAC,OAAO,cAAc,CAAC;IACrC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,QAAA,MAAM,MAAM,uFAuBX,CAAC;AAGF,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
declare const cardVariants: (props?: ({
|
|
4
|
+
variant?: "default" | "flat" | "transparent" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
6
|
+
export interface CardProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof cardVariants> {
|
|
7
|
+
}
|
|
8
|
+
declare const Card: React.ForwardRefExoticComponent<CardProps & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
declare const CardHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
+
declare const CardTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
11
|
+
declare const CardDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
12
|
+
declare const CardContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
+
declare const CardFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
14
|
+
export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent };
|
|
15
|
+
//# sourceMappingURL=card.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAIlE,QAAA,MAAM,YAAY;;mFAcjB,CAAC;AAEF,MAAM,WAAW,SACf,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAC1C,YAAY,CAAC,OAAO,YAAY,CAAC;CAAG;AAExC,QAAA,MAAM,IAAI,kFAQT,CAAC;AAGF,QAAA,MAAM,UAAU,6GASd,CAAC;AAGH,QAAA,MAAM,SAAS,uHAYb,CAAC;AAGH,QAAA,MAAM,eAAe,yHASnB,CAAC;AAGH,QAAA,MAAM,WAAW,6GAKf,CAAC;AAGH,QAAA,MAAM,UAAU,6GASd,CAAC;AAGH,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,eAAe,EAAE,WAAW,EAAE,CAAC"}
|