@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 @@
|
|
|
1
|
+
{"version":3,"file":"IdentityBar.d.ts","sourceRoot":"","sources":["../../../src/components/identity/IdentityBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,UAAU,gBAAgB;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAkBlD,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { OrderData } from '../../types';
|
|
3
|
+
interface OrderSummaryAccordionProps {
|
|
4
|
+
orderData: OrderData;
|
|
5
|
+
mode?: 'standard' | 'agent';
|
|
6
|
+
}
|
|
7
|
+
export declare const OrderSummaryAccordion: React.FC<OrderSummaryAccordionProps>;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=OrderSummaryAccordion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OrderSummaryAccordion.d.ts","sourceRoot":"","sources":["../../../src/components/order/OrderSummaryAccordion.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAIxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAI7C,UAAU,0BAA0B;IAClC,SAAS,EAAE,SAAS,CAAC;IACrB,IAAI,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC;CAC7B;AAED,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,EAAE,CAAC,0BAA0B,CA6FtE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ShipmentCard.d.ts","sourceRoot":"","sources":["../../../src/components/order/ShipmentCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C,UAAU,iBAAiB;IACzB,IAAI,EAAE,SAAS,CAAC;CACjB;AAED,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAqBpD,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { SavedCard } from "../../types";
|
|
3
|
+
/**
|
|
4
|
+
* ActiveCardWidget - The "Hero" card component for CheckoutView
|
|
5
|
+
*
|
|
6
|
+
* Combines card display + CVC entry in a unified widget with two sections:
|
|
7
|
+
* - Top Half: Card display (brand icon + last4 + expiry) with "Change" link
|
|
8
|
+
* - Bottom Half: Security code (CVC) input with subtle background contrast
|
|
9
|
+
*
|
|
10
|
+
* **Design System (World-Class Polish):**
|
|
11
|
+
* - Unified container with internal divider
|
|
12
|
+
* - Top section: white background
|
|
13
|
+
* - Bottom section: bg-gray-50/50 for subtle contrast
|
|
14
|
+
* - CVC input:
|
|
15
|
+
* - Placeholder: "123" (not "•••") for clarity
|
|
16
|
+
* - Styling: bg-white, border-gray-300, shadow-sm (looks like input, not button)
|
|
17
|
+
* - Centered, bold text, focus:border-black
|
|
18
|
+
* - "Change" link: text-blue-600 for primary action
|
|
19
|
+
*
|
|
20
|
+
* This follows the "Apple" approach of combining related inputs into a single
|
|
21
|
+
* card container rather than separating them.
|
|
22
|
+
*/
|
|
23
|
+
interface ActiveCardWidgetProps {
|
|
24
|
+
/**
|
|
25
|
+
* The saved card to display
|
|
26
|
+
*/
|
|
27
|
+
card: SavedCard;
|
|
28
|
+
/**
|
|
29
|
+
* Current CVC value
|
|
30
|
+
*/
|
|
31
|
+
cvc: string;
|
|
32
|
+
/**
|
|
33
|
+
* CVC change handler
|
|
34
|
+
*/
|
|
35
|
+
onCvcChange: (cvc: string) => void;
|
|
36
|
+
/**
|
|
37
|
+
* Handler when "Change" button is clicked (opens MethodListView)
|
|
38
|
+
*/
|
|
39
|
+
onChangeClick: () => void;
|
|
40
|
+
/**
|
|
41
|
+
* Optional error message for CVC
|
|
42
|
+
*/
|
|
43
|
+
error?: string;
|
|
44
|
+
/**
|
|
45
|
+
* Disable CVC input
|
|
46
|
+
*/
|
|
47
|
+
disabled?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Hide security code section (for agent mode where passkey replaces CVC)
|
|
50
|
+
*/
|
|
51
|
+
hideSecurityCode?: boolean;
|
|
52
|
+
}
|
|
53
|
+
export declare const ActiveCardWidget: React.FC<ActiveCardWidgetProps>;
|
|
54
|
+
export {};
|
|
55
|
+
//# sourceMappingURL=ActiveCardWidget.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActiveCardWidget.d.ts","sourceRoot":"","sources":["../../../src/components/payos/ActiveCardWidget.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,UAAU,qBAAqB;IAC7B;;OAEG;IACH,IAAI,EAAE,SAAS,CAAC;IAChB;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,WAAW,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC;;OAEG;IACH,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CA8H5D,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface PayOSFooterProps {
|
|
3
|
+
/**
|
|
4
|
+
* Additional CSS classes
|
|
5
|
+
*/
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* PayOSFooter - Atomic "Powered by PayOS" footer component
|
|
10
|
+
*
|
|
11
|
+
* Features:
|
|
12
|
+
* - Consistent branding footer across all views
|
|
13
|
+
* - ShieldCheck icon for trust signal
|
|
14
|
+
* - Dark mode support
|
|
15
|
+
* - Flexible positioning via className prop
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```tsx
|
|
19
|
+
* <PayOSFooter />
|
|
20
|
+
* <PayOSFooter className="mt-8" />
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
export declare const PayOSFooter: React.ForwardRefExoticComponent<PayOSFooterProps & React.RefAttributes<HTMLDivElement>>;
|
|
24
|
+
//# sourceMappingURL=PayOSFooter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PayOSFooter.d.ts","sourceRoot":"","sources":["../../../src/components/payos/PayOSFooter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,WAAW,yFAevB,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { CardBrand } from "../../types";
|
|
3
|
+
/**
|
|
4
|
+
* PaymentMethodRow - Reusable payment method row for list views
|
|
5
|
+
*
|
|
6
|
+
* Features:
|
|
7
|
+
* - Brand icon + card details (last4, expiry)
|
|
8
|
+
* - Hover and active states (tactile physics)
|
|
9
|
+
* - Selected state with blue checkmark
|
|
10
|
+
* - Designed for list-style payment method selection
|
|
11
|
+
*
|
|
12
|
+
* Design System:
|
|
13
|
+
* - Apple-level tactile feedback (hover:bg-gray-50, active:bg-gray-100)
|
|
14
|
+
* - Border dividers between rows (border-b border-gray-100)
|
|
15
|
+
* - Clean typography hierarchy
|
|
16
|
+
*/
|
|
17
|
+
interface PaymentMethodRowProps {
|
|
18
|
+
/**
|
|
19
|
+
* Card last 4 digits
|
|
20
|
+
*/
|
|
21
|
+
last4: string;
|
|
22
|
+
/**
|
|
23
|
+
* Card brand (visa, mastercard, amex, etc.)
|
|
24
|
+
*/
|
|
25
|
+
brand: CardBrand;
|
|
26
|
+
/**
|
|
27
|
+
* Expiry in MM/YY format
|
|
28
|
+
*/
|
|
29
|
+
expiry: string;
|
|
30
|
+
/**
|
|
31
|
+
* URL to card artwork image (optional)
|
|
32
|
+
*/
|
|
33
|
+
cardArtUrl?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Issuer name (e.g., "Chase", "Wells Fargo")
|
|
36
|
+
*/
|
|
37
|
+
issuerName?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Whether this row is currently selected
|
|
40
|
+
*/
|
|
41
|
+
selected?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Click handler
|
|
44
|
+
*/
|
|
45
|
+
onClick?: () => void;
|
|
46
|
+
/**
|
|
47
|
+
* Whether this is the last row (removes bottom border)
|
|
48
|
+
*/
|
|
49
|
+
isLast?: boolean;
|
|
50
|
+
}
|
|
51
|
+
export declare const PaymentMethodRow: React.FC<PaymentMethodRowProps>;
|
|
52
|
+
export {};
|
|
53
|
+
//# sourceMappingURL=PaymentMethodRow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PaymentMethodRow.d.ts","sourceRoot":"","sources":["../../../src/components/payos/PaymentMethodRow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C;;;;;;;;;;;;;GAaG;AAEH,UAAU,qBAAqB;IAC7B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,EAAE,SAAS,CAAC;IACjB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAgD5D,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { PaymentSheetResult, PaymentSheetError } from '../../types/session';
|
|
3
|
+
import '../../styles/base.css';
|
|
4
|
+
export interface PaymentSheetProps {
|
|
5
|
+
/**
|
|
6
|
+
* Session secret (JWT) for authenticating SDK API calls.
|
|
7
|
+
* Obtained from POST /api/sessions/checkout response.
|
|
8
|
+
* Contains sessionId in JWT metadata.
|
|
9
|
+
*/
|
|
10
|
+
sessionSecret: string;
|
|
11
|
+
open: boolean;
|
|
12
|
+
onClose: () => void;
|
|
13
|
+
onSuccess: (result: PaymentSheetResult) => void;
|
|
14
|
+
onError: (error: PaymentSheetError) => void;
|
|
15
|
+
onCancel?: () => void;
|
|
16
|
+
accentColor?: string;
|
|
17
|
+
/** Organization name to display in the drawer header */
|
|
18
|
+
title?: string;
|
|
19
|
+
/** Environment mode - determines API URL (sandbox.api.payos.ai or api.payos.ai) */
|
|
20
|
+
environment?: 'sandbox' | 'production';
|
|
21
|
+
/** Override API URL for local development - used for direct SDK calls like passkey, credential gen (e.g., 'http://localhost:3000') */
|
|
22
|
+
developmentApiUrl?: string;
|
|
23
|
+
/** Backend API URL for CardElement iframe - needed because iframe on Azure can't reach localhost (e.g., ngrok URL) */
|
|
24
|
+
cardElementApiUrl?: string;
|
|
25
|
+
/** PayOS Link UI URL for CardElement iframe (e.g., purple-grass Azure endpoint) */
|
|
26
|
+
cardElementUrl?: string;
|
|
27
|
+
/** Enable debug logging */
|
|
28
|
+
debug?: boolean;
|
|
29
|
+
}
|
|
30
|
+
export declare const PaymentSheet: React.FC<PaymentSheetProps>;
|
|
31
|
+
export default PaymentSheet;
|
|
32
|
+
//# sourceMappingURL=PaymentSheet.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PaymentSheet.d.ts","sourceRoot":"","sources":["../../../src/components/payos/PaymentSheet.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAmBxE,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,qBAAqB,CAAC;AAG7B,OAAO,uBAAuB,CAAC;AAK/B,MAAM,WAAW,iBAAiB;IAChC;;;;OAIG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,EAAE,CAAC,MAAM,EAAE,kBAAkB,KAAK,IAAI,CAAC;IAChD,OAAO,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC5C,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,wDAAwD;IACxD,KAAK,CAAC,EAAE,MAAM,CAAC;IAGf,mFAAmF;IACnF,WAAW,CAAC,EAAE,SAAS,GAAG,YAAY,CAAC;IACvC,sIAAsI;IACtI,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,sHAAsH;IACtH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,mFAAmF;IACnF,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,2BAA2B;IAC3B,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAKD,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CA4rBpD,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* PriceTag - Pill-style price display component
|
|
4
|
+
*
|
|
5
|
+
* A subtle badge that makes the price unambiguous in headers.
|
|
6
|
+
* Follows the "Pill" style recommendation with label + value pattern.
|
|
7
|
+
*
|
|
8
|
+
* Features:
|
|
9
|
+
* - Gray background with subtle border
|
|
10
|
+
* - Label ("Total") + Value ("$185.50") layout
|
|
11
|
+
* - Compact padding for tight spaces
|
|
12
|
+
* - Right-aligned for header placement
|
|
13
|
+
* - Optional interactive mode with click handler
|
|
14
|
+
* - Optional ShoppingCart icon and ChevronDown indicator
|
|
15
|
+
* - Dark mode support
|
|
16
|
+
*
|
|
17
|
+
* Usage:
|
|
18
|
+
* ```tsx
|
|
19
|
+
* // Static display
|
|
20
|
+
* <PriceTag amount="$185.50" />
|
|
21
|
+
*
|
|
22
|
+
* // Interactive toggle
|
|
23
|
+
* <PriceTag
|
|
24
|
+
* amount="$185.50"
|
|
25
|
+
* onClick={() => setExpanded(!expanded)}
|
|
26
|
+
* isExpanded={expanded}
|
|
27
|
+
* showChevron={true}
|
|
28
|
+
* showIcon={true}
|
|
29
|
+
* />
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
interface PriceTagProps {
|
|
33
|
+
/**
|
|
34
|
+
* Formatted price amount (e.g., "$185.50")
|
|
35
|
+
*/
|
|
36
|
+
amount: string;
|
|
37
|
+
/**
|
|
38
|
+
* Optional label text (defaults to "Total")
|
|
39
|
+
*/
|
|
40
|
+
label?: string;
|
|
41
|
+
/**
|
|
42
|
+
* Optional click handler (makes component interactive)
|
|
43
|
+
*/
|
|
44
|
+
onClick?: () => void;
|
|
45
|
+
/**
|
|
46
|
+
* Whether the associated panel is expanded (controls chevron rotation)
|
|
47
|
+
*/
|
|
48
|
+
isExpanded?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Show ChevronDown icon (only when onClick is provided)
|
|
51
|
+
*/
|
|
52
|
+
showChevron?: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Show ShoppingCart icon on the left
|
|
55
|
+
*/
|
|
56
|
+
showIcon?: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* Additional CSS classes
|
|
59
|
+
*/
|
|
60
|
+
className?: string;
|
|
61
|
+
}
|
|
62
|
+
export declare const PriceTag: React.FC<PriceTagProps>;
|
|
63
|
+
export {};
|
|
64
|
+
//# sourceMappingURL=PriceTag.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PriceTag.d.ts","sourceRoot":"","sources":["../../../src/components/payos/PriceTag.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,UAAU,aAAa;IACrB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAmE5C,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* ReceiptPanel - Custom receipt-style dropdown for Smart Header
|
|
4
|
+
*
|
|
5
|
+
* **Design: Recessed Gray Tray**
|
|
6
|
+
* - NO shadow (looks buggy when expanded)
|
|
7
|
+
* - Gray background (bg-gray-50) creates "recessed" appearance
|
|
8
|
+
* - Simple border-bottom for clean separation
|
|
9
|
+
* - Slides down smoothly, pushing white content below
|
|
10
|
+
*
|
|
11
|
+
* Features:
|
|
12
|
+
* - Line items with labels and values
|
|
13
|
+
* - Subtotal, shipping, tax breakdown
|
|
14
|
+
* - Agent fee support (conditional)
|
|
15
|
+
* - Total summary with bold emphasis
|
|
16
|
+
* - Clean dividers between sections
|
|
17
|
+
* - Dark mode support
|
|
18
|
+
*
|
|
19
|
+
* Usage:
|
|
20
|
+
* ```tsx
|
|
21
|
+
* <ReceiptPanel
|
|
22
|
+
* items={orderItems}
|
|
23
|
+
* subtotal="$130.97"
|
|
24
|
+
* shipping="$12.00"
|
|
25
|
+
* tax="$42.53"
|
|
26
|
+
* total="$185.50"
|
|
27
|
+
* />
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
export interface OrderItem {
|
|
31
|
+
label: string;
|
|
32
|
+
value: string;
|
|
33
|
+
description?: string;
|
|
34
|
+
}
|
|
35
|
+
interface ReceiptPanelProps {
|
|
36
|
+
/**
|
|
37
|
+
* Optional line items (products/services)
|
|
38
|
+
*/
|
|
39
|
+
items?: OrderItem[];
|
|
40
|
+
/**
|
|
41
|
+
* Subtotal amount (before shipping/tax)
|
|
42
|
+
*/
|
|
43
|
+
subtotal: string;
|
|
44
|
+
/**
|
|
45
|
+
* Optional shipping cost
|
|
46
|
+
*/
|
|
47
|
+
shipping?: string;
|
|
48
|
+
/**
|
|
49
|
+
* Optional tax amount
|
|
50
|
+
*/
|
|
51
|
+
tax?: string;
|
|
52
|
+
/**
|
|
53
|
+
* Optional agent fee (for agent mode)
|
|
54
|
+
*/
|
|
55
|
+
agentFee?: string;
|
|
56
|
+
/**
|
|
57
|
+
* Total amount
|
|
58
|
+
*/
|
|
59
|
+
total: string;
|
|
60
|
+
/**
|
|
61
|
+
* Whether this is an agent purchase
|
|
62
|
+
*/
|
|
63
|
+
isAgentMode?: boolean;
|
|
64
|
+
}
|
|
65
|
+
export declare const ReceiptPanel: React.FC<ReceiptPanelProps>;
|
|
66
|
+
export {};
|
|
67
|
+
//# sourceMappingURL=ReceiptPanel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReceiptPanel.d.ts","sourceRoot":"","sources":["../../../src/components/payos/ReceiptPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,UAAU,iBAAiB;IACzB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,EAAE,CAAC;IACpB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CA2GpD,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* ViewHeader - iOS-style navigation header for sub-views
|
|
4
|
+
*
|
|
5
|
+
* Features:
|
|
6
|
+
* - Back button with ChevronLeft icon (when onBack is provided)
|
|
7
|
+
* - Title text (left-aligned after back button)
|
|
8
|
+
* - Tactile physics on back button (active:scale-95)
|
|
9
|
+
* - Bottom border separator
|
|
10
|
+
*
|
|
11
|
+
* Design System:
|
|
12
|
+
* - Follows iOS Settings app pattern
|
|
13
|
+
* - Back button: p-2 hover:bg-gray-100 rounded-lg
|
|
14
|
+
* - Title: text-lg font-semibold
|
|
15
|
+
* - Bottom border: border-b border-gray-200
|
|
16
|
+
*
|
|
17
|
+
* Used in:
|
|
18
|
+
* - MethodListView: "Payment Methods"
|
|
19
|
+
* - AddCardView: "Add Card"
|
|
20
|
+
*
|
|
21
|
+
* Not used in CheckoutView (it's the root view)
|
|
22
|
+
*/
|
|
23
|
+
interface ViewHeaderProps {
|
|
24
|
+
/**
|
|
25
|
+
* Header title text
|
|
26
|
+
*/
|
|
27
|
+
title: string;
|
|
28
|
+
/**
|
|
29
|
+
* Optional back button handler
|
|
30
|
+
* If provided, shows back button with ChevronLeft icon
|
|
31
|
+
*/
|
|
32
|
+
onBack?: () => void;
|
|
33
|
+
/**
|
|
34
|
+
* Optional right-side action element
|
|
35
|
+
*/
|
|
36
|
+
action?: React.ReactNode;
|
|
37
|
+
}
|
|
38
|
+
export declare const ViewHeader: React.FC<ViewHeaderProps>;
|
|
39
|
+
export {};
|
|
40
|
+
//# sourceMappingURL=ViewHeader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ViewHeader.d.ts","sourceRoot":"","sources":["../../../src/components/payos/ViewHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,UAAU,eAAe;IACvB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC1B;AAED,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CA6BhD,CAAC"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type OrderItem } from "./ReceiptPanel";
|
|
3
|
+
export interface DrawerProps {
|
|
4
|
+
/**
|
|
5
|
+
* Whether the drawer is open
|
|
6
|
+
*/
|
|
7
|
+
open?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Callback when the drawer should close
|
|
10
|
+
*/
|
|
11
|
+
onClose?: () => void;
|
|
12
|
+
/**
|
|
13
|
+
* Drawer title (merchant name in merchant-first pattern)
|
|
14
|
+
*/
|
|
15
|
+
title?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Optional subtitle or "Powered by PayOS" badge
|
|
18
|
+
* @deprecated Use `amount` prop with PriceTag component instead
|
|
19
|
+
*/
|
|
20
|
+
subtitle?: React.ReactNode;
|
|
21
|
+
/**
|
|
22
|
+
* Total amount to display in PriceTag (e.g., "$185.50")
|
|
23
|
+
*/
|
|
24
|
+
amount?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Additional CSS classes
|
|
27
|
+
*/
|
|
28
|
+
className?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Optional line items for receipt panel
|
|
31
|
+
*/
|
|
32
|
+
orderItems?: OrderItem[];
|
|
33
|
+
/**
|
|
34
|
+
* Subtotal amount (before shipping/tax)
|
|
35
|
+
*/
|
|
36
|
+
subtotal?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Optional shipping cost
|
|
39
|
+
*/
|
|
40
|
+
shipping?: string;
|
|
41
|
+
/**
|
|
42
|
+
* Optional tax amount
|
|
43
|
+
*/
|
|
44
|
+
tax?: string;
|
|
45
|
+
/**
|
|
46
|
+
* Optional agent fee (for agent mode)
|
|
47
|
+
*/
|
|
48
|
+
orderAgentFee?: string;
|
|
49
|
+
/**
|
|
50
|
+
* Mode for checkout (affects receipt panel styling)
|
|
51
|
+
*/
|
|
52
|
+
mode?: 'standard' | 'agent';
|
|
53
|
+
/**
|
|
54
|
+
* Prefilled user data for "Welcome Back" flow
|
|
55
|
+
*/
|
|
56
|
+
prefill?: {
|
|
57
|
+
phone?: string;
|
|
58
|
+
email?: string;
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* Callback when phone is submitted (guest flow)
|
|
62
|
+
*/
|
|
63
|
+
onPhoneSubmit?: (phone: string) => void;
|
|
64
|
+
/**
|
|
65
|
+
* Callback when user continues (known user flow)
|
|
66
|
+
*/
|
|
67
|
+
onContinue?: () => void;
|
|
68
|
+
/**
|
|
69
|
+
* Custom children (for non-smart flows) - backward compatible
|
|
70
|
+
*/
|
|
71
|
+
children?: React.ReactNode;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* PayOSDrawer - Responsive checkout drawer with merchant-first branding
|
|
75
|
+
*
|
|
76
|
+
* Features:
|
|
77
|
+
* - Responsive: Bottom sheet (mobile) / Right sidebar (desktop)
|
|
78
|
+
* - Gray canvas background (bg-gray-50 dark:bg-slate-900) per Card Stack Architecture
|
|
79
|
+
* - Merchant-first header with close button
|
|
80
|
+
* - Drag handle for visual affordance (mobile only)
|
|
81
|
+
* - Smooth animations (slide-up on mobile, slide-in-right on desktop)
|
|
82
|
+
* - Dark mode support
|
|
83
|
+
* - Overlay backdrop
|
|
84
|
+
*
|
|
85
|
+
* @example
|
|
86
|
+
* ```tsx
|
|
87
|
+
* <PayOSDrawer
|
|
88
|
+
* open={isOpen}
|
|
89
|
+
* onClose={() => setIsOpen(false)}
|
|
90
|
+
* title="Acme Store"
|
|
91
|
+
* subtitle={<span className="text-xs text-gray-500">Powered by PayOS</span>}
|
|
92
|
+
* >
|
|
93
|
+
* <Card>Payment content here</Card>
|
|
94
|
+
* </PayOSDrawer>
|
|
95
|
+
* ```
|
|
96
|
+
*/
|
|
97
|
+
export declare const PayOSDrawer: React.ForwardRefExoticComponent<DrawerProps & React.RefAttributes<HTMLDivElement>>;
|
|
98
|
+
//# sourceMappingURL=drawer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drawer.d.ts","sourceRoot":"","sources":["../../../src/components/payos/drawer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,OAAO,EAAgB,KAAK,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAK9D,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAGnB;;OAEG;IACH,UAAU,CAAC,EAAE,SAAS,EAAE,CAAC;IACzB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,IAAI,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC;IAG5B;;OAEG;IACH,OAAO,CAAC,EAAE;QACR,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IACF;;OAEG;IACH,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IAExB;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,WAAW,oFAyOvB,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* OrderSummary - Collapsible order details accordion
|
|
4
|
+
*
|
|
5
|
+
* Features:
|
|
6
|
+
* - Prominent total display
|
|
7
|
+
* - Collapsible line items
|
|
8
|
+
* - Agent mode badge integration
|
|
9
|
+
* - Dark mode support
|
|
10
|
+
*/
|
|
11
|
+
export interface OrderItem {
|
|
12
|
+
label: string;
|
|
13
|
+
value: string | number;
|
|
14
|
+
description?: string;
|
|
15
|
+
}
|
|
16
|
+
interface OrderSummaryProps {
|
|
17
|
+
/**
|
|
18
|
+
* Total amount (e.g., "$85.24")
|
|
19
|
+
*/
|
|
20
|
+
total: string;
|
|
21
|
+
/**
|
|
22
|
+
* Line items to show when expanded
|
|
23
|
+
*/
|
|
24
|
+
items?: OrderItem[];
|
|
25
|
+
/**
|
|
26
|
+
* Whether to show agent badge
|
|
27
|
+
*/
|
|
28
|
+
isAgentMode?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Agent fee amount (e.g., "$2.00")
|
|
31
|
+
*/
|
|
32
|
+
agentFee?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Whether the accordion starts expanded
|
|
35
|
+
*/
|
|
36
|
+
defaultExpanded?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Additional CSS classes
|
|
39
|
+
*/
|
|
40
|
+
className?: string;
|
|
41
|
+
}
|
|
42
|
+
export declare const OrderSummary: React.ForwardRefExoticComponent<OrderSummaryProps & React.RefAttributes<HTMLDivElement>>;
|
|
43
|
+
export {};
|
|
44
|
+
//# sourceMappingURL=order-summary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"order-summary.d.ts","sourceRoot":"","sources":["../../../src/components/payos/order-summary.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B;;;;;;;;GAQG;AAEH,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,UAAU,iBAAiB;IACzB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,EAAE,CAAC;IACpB;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,YAAY,0FAoFxB,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* OTPInput - 6-digit verification code input
|
|
4
|
+
*
|
|
5
|
+
* Features:
|
|
6
|
+
* - 6 individual input boxes with auto-focus progression
|
|
7
|
+
* - Large text, centered for easy reading
|
|
8
|
+
* - Numeric only input
|
|
9
|
+
* - Paste support (auto-fills all boxes)
|
|
10
|
+
* - Dark mode support
|
|
11
|
+
* - Auto-submit when complete
|
|
12
|
+
*/
|
|
13
|
+
interface OTPInputProps {
|
|
14
|
+
/**
|
|
15
|
+
* Current OTP value (6 digits)
|
|
16
|
+
*/
|
|
17
|
+
value?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Callback when OTP changes
|
|
20
|
+
*/
|
|
21
|
+
onChange?: (value: string) => void;
|
|
22
|
+
/**
|
|
23
|
+
* Callback when OTP is complete (all 6 digits entered)
|
|
24
|
+
*/
|
|
25
|
+
onComplete?: (value: string) => void;
|
|
26
|
+
/**
|
|
27
|
+
* Number of digits (default: 6)
|
|
28
|
+
*/
|
|
29
|
+
length?: number;
|
|
30
|
+
/**
|
|
31
|
+
* Additional CSS classes
|
|
32
|
+
*/
|
|
33
|
+
className?: string;
|
|
34
|
+
}
|
|
35
|
+
export declare const OTPInput: React.ForwardRefExoticComponent<OTPInputProps & React.RefAttributes<HTMLDivElement>>;
|
|
36
|
+
export {};
|
|
37
|
+
//# sourceMappingURL=otp-input.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"otp-input.d.ts","sourceRoot":"","sources":["../../../src/components/payos/otp-input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B;;;;;;;;;;GAUG;AAEH,UAAU,aAAa;IACrB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC;;OAEG;IACH,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,QAAQ,sFA4HpB,CAAC"}
|