@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.
Files changed (255) hide show
  1. package/dist/components/identity/IdentityBar.d.ts +8 -0
  2. package/dist/components/identity/IdentityBar.d.ts.map +1 -0
  3. package/dist/components/order/OrderSummaryAccordion.d.ts +9 -0
  4. package/dist/components/order/OrderSummaryAccordion.d.ts.map +1 -0
  5. package/dist/components/order/ShipmentCard.d.ts +8 -0
  6. package/dist/components/order/ShipmentCard.d.ts.map +1 -0
  7. package/dist/components/payos/ActiveCardWidget.d.ts +55 -0
  8. package/dist/components/payos/ActiveCardWidget.d.ts.map +1 -0
  9. package/dist/components/payos/PayOSFooter.d.ts +24 -0
  10. package/dist/components/payos/PayOSFooter.d.ts.map +1 -0
  11. package/dist/components/payos/PaymentMethodRow.d.ts +53 -0
  12. package/dist/components/payos/PaymentMethodRow.d.ts.map +1 -0
  13. package/dist/components/payos/PaymentSheet.d.ts +32 -0
  14. package/dist/components/payos/PaymentSheet.d.ts.map +1 -0
  15. package/dist/components/payos/PriceTag.d.ts +64 -0
  16. package/dist/components/payos/PriceTag.d.ts.map +1 -0
  17. package/dist/components/payos/ReceiptPanel.d.ts +67 -0
  18. package/dist/components/payos/ReceiptPanel.d.ts.map +1 -0
  19. package/dist/components/payos/ViewHeader.d.ts +40 -0
  20. package/dist/components/payos/ViewHeader.d.ts.map +1 -0
  21. package/dist/components/payos/drawer.d.ts +98 -0
  22. package/dist/components/payos/drawer.d.ts.map +1 -0
  23. package/dist/components/payos/order-summary.d.ts +44 -0
  24. package/dist/components/payos/order-summary.d.ts.map +1 -0
  25. package/dist/components/payos/otp-input.d.ts +37 -0
  26. package/dist/components/payos/otp-input.d.ts.map +1 -0
  27. package/dist/components/payos/phone-input.d.ts +107 -0
  28. package/dist/components/payos/phone-input.d.ts.map +1 -0
  29. package/dist/components/payos/views/AgentRegistrationView.d.ts +58 -0
  30. package/dist/components/payos/views/AgentRegistrationView.d.ts.map +1 -0
  31. package/dist/components/payos/views/CardAddView.d.ts +78 -0
  32. package/dist/components/payos/views/CardAddView.d.ts.map +1 -0
  33. package/dist/components/payos/views/CheckoutView.d.ts +80 -0
  34. package/dist/components/payos/views/CheckoutView.d.ts.map +1 -0
  35. package/dist/components/payos/views/IdentityView.d.ts +43 -0
  36. package/dist/components/payos/views/IdentityView.d.ts.map +1 -0
  37. package/dist/components/payos/views/MethodListView.d.ts +52 -0
  38. package/dist/components/payos/views/MethodListView.d.ts.map +1 -0
  39. package/dist/components/payos/views/OTPView.d.ts +54 -0
  40. package/dist/components/payos/views/OTPView.d.ts.map +1 -0
  41. package/dist/components/payos/views/SuccessView.d.ts +49 -0
  42. package/dist/components/payos/views/SuccessView.d.ts.map +1 -0
  43. package/dist/components/payos/views/VisaIframeView.d.ts +19 -0
  44. package/dist/components/payos/views/VisaIframeView.d.ts.map +1 -0
  45. package/dist/components/payos/views/VisaMethodView.d.ts +35 -0
  46. package/dist/components/payos/views/VisaMethodView.d.ts.map +1 -0
  47. package/dist/components/payos/views/VisaOtpView.d.ts +45 -0
  48. package/dist/components/payos/views/VisaOtpView.d.ts.map +1 -0
  49. package/dist/components/payos/views/WelcomeBackView.d.ts +34 -0
  50. package/dist/components/payos/views/WelcomeBackView.d.ts.map +1 -0
  51. package/dist/components/ui/CardBrandIcon.d.ts +10 -0
  52. package/dist/components/ui/CardBrandIcon.d.ts.map +1 -0
  53. package/dist/components/ui/ConfirmDialog.d.ts +25 -0
  54. package/dist/components/ui/ConfirmDialog.d.ts.map +1 -0
  55. package/dist/components/ui/InfoTooltip.d.ts +8 -0
  56. package/dist/components/ui/InfoTooltip.d.ts.map +1 -0
  57. package/dist/components/ui/PinInput.d.ts +12 -0
  58. package/dist/components/ui/PinInput.d.ts.map +1 -0
  59. package/dist/components/ui/button.d.ts +14 -0
  60. package/dist/components/ui/button.d.ts.map +1 -0
  61. package/dist/components/ui/card.d.ts +15 -0
  62. package/dist/components/ui/card.d.ts.map +1 -0
  63. package/dist/components/ui/input.d.ts +6 -0
  64. package/dist/components/ui/input.d.ts.map +1 -0
  65. package/dist/components/ui/label.d.ts +6 -0
  66. package/dist/components/ui/label.d.ts.map +1 -0
  67. package/dist/components/ui/separator.d.ts +5 -0
  68. package/dist/components/ui/separator.d.ts.map +1 -0
  69. package/dist/hooks/index.d.ts +8 -0
  70. package/dist/hooks/index.d.ts.map +1 -0
  71. package/dist/hooks/useBodyScrollLock.d.ts +32 -0
  72. package/dist/hooks/useBodyScrollLock.d.ts.map +1 -0
  73. package/dist/hooks/useCardElement.d.ts +123 -0
  74. package/dist/hooks/useCardElement.d.ts.map +1 -0
  75. package/dist/hooks/useCheckoutFlow.d.ts +29 -0
  76. package/dist/hooks/useCheckoutFlow.d.ts.map +1 -0
  77. package/dist/hooks/useDrawerState.d.ts +4 -0
  78. package/dist/hooks/useDrawerState.d.ts.map +1 -0
  79. package/dist/hooks/usePasskeySDK.d.ts +99 -0
  80. package/dist/hooks/usePasskeySDK.d.ts.map +1 -0
  81. package/dist/hooks/useSession.d.ts +68 -0
  82. package/dist/hooks/useSession.d.ts.map +1 -0
  83. package/dist/hooks/useVisualViewport.d.ts +15 -0
  84. package/dist/hooks/useVisualViewport.d.ts.map +1 -0
  85. package/dist/index.css +1 -0
  86. package/dist/index.d.ts +43 -0
  87. package/dist/index.d.ts.map +1 -0
  88. package/dist/lib/theme.d.ts +53 -0
  89. package/dist/lib/theme.d.ts.map +1 -0
  90. package/dist/lib/utils.d.ts +3 -0
  91. package/dist/lib/utils.d.ts.map +1 -0
  92. package/dist/mocks/index.d.ts +3 -0
  93. package/dist/mocks/index.d.ts.map +1 -0
  94. package/dist/mocks/mockCheckoutFlow.d.ts +25 -0
  95. package/dist/mocks/mockCheckoutFlow.d.ts.map +1 -0
  96. package/dist/mocks/mockData.d.ts +6 -0
  97. package/dist/mocks/mockData.d.ts.map +1 -0
  98. package/dist/mocks/mockSessionData.d.ts +38 -0
  99. package/dist/mocks/mockSessionData.d.ts.map +1 -0
  100. package/dist/payos-react.css +1 -0
  101. package/dist/payos-react.esm.js +23 -0
  102. package/dist/payos-react.min.js +1 -0
  103. package/dist/services/apiService.d.ts +297 -0
  104. package/dist/services/apiService.d.ts.map +1 -0
  105. package/dist/services/linkTokenService.d.ts +27 -0
  106. package/dist/services/linkTokenService.d.ts.map +1 -0
  107. package/dist/services/mockSessionService.d.ts +78 -0
  108. package/dist/services/mockSessionService.d.ts.map +1 -0
  109. package/dist/types/cardElement.d.ts +138 -0
  110. package/dist/types/cardElement.d.ts.map +1 -0
  111. package/dist/types/components/identity/IdentityBar.d.ts +8 -0
  112. package/dist/types/components/identity/IdentityBar.d.ts.map +1 -0
  113. package/dist/types/components/order/OrderSummaryAccordion.d.ts +9 -0
  114. package/dist/types/components/order/OrderSummaryAccordion.d.ts.map +1 -0
  115. package/dist/types/components/order/ShipmentCard.d.ts +8 -0
  116. package/dist/types/components/order/ShipmentCard.d.ts.map +1 -0
  117. package/dist/types/components/payos/ActiveCardWidget.d.ts +55 -0
  118. package/dist/types/components/payos/ActiveCardWidget.d.ts.map +1 -0
  119. package/dist/types/components/payos/PayOSFooter.d.ts +24 -0
  120. package/dist/types/components/payos/PayOSFooter.d.ts.map +1 -0
  121. package/dist/types/components/payos/PaymentMethodRow.d.ts +53 -0
  122. package/dist/types/components/payos/PaymentMethodRow.d.ts.map +1 -0
  123. package/dist/types/components/payos/PaymentSheet.d.ts +32 -0
  124. package/dist/types/components/payos/PaymentSheet.d.ts.map +1 -0
  125. package/dist/types/components/payos/PriceTag.d.ts +64 -0
  126. package/dist/types/components/payos/PriceTag.d.ts.map +1 -0
  127. package/dist/types/components/payos/ReceiptPanel.d.ts +67 -0
  128. package/dist/types/components/payos/ReceiptPanel.d.ts.map +1 -0
  129. package/dist/types/components/payos/ViewHeader.d.ts +40 -0
  130. package/dist/types/components/payos/ViewHeader.d.ts.map +1 -0
  131. package/dist/types/components/payos/drawer.d.ts +98 -0
  132. package/dist/types/components/payos/drawer.d.ts.map +1 -0
  133. package/dist/types/components/payos/order-summary.d.ts +44 -0
  134. package/dist/types/components/payos/order-summary.d.ts.map +1 -0
  135. package/dist/types/components/payos/otp-input.d.ts +37 -0
  136. package/dist/types/components/payos/otp-input.d.ts.map +1 -0
  137. package/dist/types/components/payos/phone-input.d.ts +107 -0
  138. package/dist/types/components/payos/phone-input.d.ts.map +1 -0
  139. package/dist/types/components/payos/views/AgentRegistrationView.d.ts +58 -0
  140. package/dist/types/components/payos/views/AgentRegistrationView.d.ts.map +1 -0
  141. package/dist/types/components/payos/views/CardAddView.d.ts +78 -0
  142. package/dist/types/components/payos/views/CardAddView.d.ts.map +1 -0
  143. package/dist/types/components/payos/views/CheckoutView.d.ts +80 -0
  144. package/dist/types/components/payos/views/CheckoutView.d.ts.map +1 -0
  145. package/dist/types/components/payos/views/IdentityView.d.ts +43 -0
  146. package/dist/types/components/payos/views/IdentityView.d.ts.map +1 -0
  147. package/dist/types/components/payos/views/MethodListView.d.ts +52 -0
  148. package/dist/types/components/payos/views/MethodListView.d.ts.map +1 -0
  149. package/dist/types/components/payos/views/OTPView.d.ts +54 -0
  150. package/dist/types/components/payos/views/OTPView.d.ts.map +1 -0
  151. package/dist/types/components/payos/views/SuccessView.d.ts +49 -0
  152. package/dist/types/components/payos/views/SuccessView.d.ts.map +1 -0
  153. package/dist/types/components/payos/views/VisaIframeView.d.ts +19 -0
  154. package/dist/types/components/payos/views/VisaIframeView.d.ts.map +1 -0
  155. package/dist/types/components/payos/views/VisaMethodView.d.ts +35 -0
  156. package/dist/types/components/payos/views/VisaMethodView.d.ts.map +1 -0
  157. package/dist/types/components/payos/views/VisaOtpView.d.ts +45 -0
  158. package/dist/types/components/payos/views/VisaOtpView.d.ts.map +1 -0
  159. package/dist/types/components/payos/views/WelcomeBackView.d.ts +34 -0
  160. package/dist/types/components/payos/views/WelcomeBackView.d.ts.map +1 -0
  161. package/dist/types/components/ui/CardBrandIcon.d.ts +10 -0
  162. package/dist/types/components/ui/CardBrandIcon.d.ts.map +1 -0
  163. package/dist/types/components/ui/ConfirmDialog.d.ts +25 -0
  164. package/dist/types/components/ui/ConfirmDialog.d.ts.map +1 -0
  165. package/dist/types/components/ui/InfoTooltip.d.ts +8 -0
  166. package/dist/types/components/ui/InfoTooltip.d.ts.map +1 -0
  167. package/dist/types/components/ui/PinInput.d.ts +12 -0
  168. package/dist/types/components/ui/PinInput.d.ts.map +1 -0
  169. package/dist/types/components/ui/button.d.ts +14 -0
  170. package/dist/types/components/ui/button.d.ts.map +1 -0
  171. package/dist/types/components/ui/card.d.ts +15 -0
  172. package/dist/types/components/ui/card.d.ts.map +1 -0
  173. package/dist/types/components/ui/input.d.ts +6 -0
  174. package/dist/types/components/ui/input.d.ts.map +1 -0
  175. package/dist/types/components/ui/label.d.ts +6 -0
  176. package/dist/types/components/ui/label.d.ts.map +1 -0
  177. package/dist/types/components/ui/separator.d.ts +5 -0
  178. package/dist/types/components/ui/separator.d.ts.map +1 -0
  179. package/dist/types/drawer.d.ts +33 -0
  180. package/dist/types/drawer.d.ts.map +1 -0
  181. package/dist/types/hooks/index.d.ts +8 -0
  182. package/dist/types/hooks/index.d.ts.map +1 -0
  183. package/dist/types/hooks/useBodyScrollLock.d.ts +32 -0
  184. package/dist/types/hooks/useBodyScrollLock.d.ts.map +1 -0
  185. package/dist/types/hooks/useCardElement.d.ts +123 -0
  186. package/dist/types/hooks/useCardElement.d.ts.map +1 -0
  187. package/dist/types/hooks/useCheckoutFlow.d.ts +29 -0
  188. package/dist/types/hooks/useCheckoutFlow.d.ts.map +1 -0
  189. package/dist/types/hooks/useDrawerState.d.ts +4 -0
  190. package/dist/types/hooks/useDrawerState.d.ts.map +1 -0
  191. package/dist/types/hooks/usePasskeySDK.d.ts +99 -0
  192. package/dist/types/hooks/usePasskeySDK.d.ts.map +1 -0
  193. package/dist/types/hooks/useSession.d.ts +68 -0
  194. package/dist/types/hooks/useSession.d.ts.map +1 -0
  195. package/dist/types/hooks/useVisualViewport.d.ts +15 -0
  196. package/dist/types/hooks/useVisualViewport.d.ts.map +1 -0
  197. package/dist/types/index.d.ts +43 -0
  198. package/dist/types/index.d.ts.map +1 -0
  199. package/dist/types/lib/theme.d.ts +53 -0
  200. package/dist/types/lib/theme.d.ts.map +1 -0
  201. package/dist/types/lib/utils.d.ts +3 -0
  202. package/dist/types/lib/utils.d.ts.map +1 -0
  203. package/dist/types/mocks/index.d.ts +3 -0
  204. package/dist/types/mocks/index.d.ts.map +1 -0
  205. package/dist/types/mocks/mockCheckoutFlow.d.ts +25 -0
  206. package/dist/types/mocks/mockCheckoutFlow.d.ts.map +1 -0
  207. package/dist/types/mocks/mockData.d.ts +6 -0
  208. package/dist/types/mocks/mockData.d.ts.map +1 -0
  209. package/dist/types/mocks/mockSessionData.d.ts +38 -0
  210. package/dist/types/mocks/mockSessionData.d.ts.map +1 -0
  211. package/dist/types/order.d.ts +25 -0
  212. package/dist/types/order.d.ts.map +1 -0
  213. package/dist/types/payment.d.ts +52 -0
  214. package/dist/types/payment.d.ts.map +1 -0
  215. package/dist/types/services/apiService.d.ts +297 -0
  216. package/dist/types/services/apiService.d.ts.map +1 -0
  217. package/dist/types/services/linkTokenService.d.ts +27 -0
  218. package/dist/types/services/linkTokenService.d.ts.map +1 -0
  219. package/dist/types/services/mockSessionService.d.ts +78 -0
  220. package/dist/types/services/mockSessionService.d.ts.map +1 -0
  221. package/dist/types/session.d.ts +148 -0
  222. package/dist/types/session.d.ts.map +1 -0
  223. package/dist/types/types/cardElement.d.ts +138 -0
  224. package/dist/types/types/cardElement.d.ts.map +1 -0
  225. package/dist/types/types/drawer.d.ts +33 -0
  226. package/dist/types/types/drawer.d.ts.map +1 -0
  227. package/dist/types/types/index.d.ts +4 -0
  228. package/dist/types/types/index.d.ts.map +1 -0
  229. package/dist/types/types/order.d.ts +25 -0
  230. package/dist/types/types/order.d.ts.map +1 -0
  231. package/dist/types/types/payment.d.ts +52 -0
  232. package/dist/types/types/payment.d.ts.map +1 -0
  233. package/dist/types/types/session.d.ts +148 -0
  234. package/dist/types/types/session.d.ts.map +1 -0
  235. package/dist/types/utils/deviceFingerprint.d.ts +27 -0
  236. package/dist/types/utils/deviceFingerprint.d.ts.map +1 -0
  237. package/dist/types/utils/environment.d.ts +22 -0
  238. package/dist/types/utils/environment.d.ts.map +1 -0
  239. package/dist/types/utils/formatting.d.ts +38 -0
  240. package/dist/types/utils/formatting.d.ts.map +1 -0
  241. package/dist/types/utils/index.d.ts +3 -0
  242. package/dist/types/utils/index.d.ts.map +1 -0
  243. package/dist/types/utils/validation.d.ts +52 -0
  244. package/dist/types/utils/validation.d.ts.map +1 -0
  245. package/dist/utils/deviceFingerprint.d.ts +27 -0
  246. package/dist/utils/deviceFingerprint.d.ts.map +1 -0
  247. package/dist/utils/environment.d.ts +22 -0
  248. package/dist/utils/environment.d.ts.map +1 -0
  249. package/dist/utils/formatting.d.ts +38 -0
  250. package/dist/utils/formatting.d.ts.map +1 -0
  251. package/dist/utils/index.d.ts +3 -0
  252. package/dist/utils/index.d.ts.map +1 -0
  253. package/dist/utils/validation.d.ts +52 -0
  254. package/dist/utils/validation.d.ts.map +1 -0
  255. package/package.json +84 -0
@@ -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"}
@@ -0,0 +1,107 @@
1
+ import * as React from "react";
2
+ /**
3
+ * Supported countries for phone input
4
+ */
5
+ declare const COUNTRIES: readonly [{
6
+ readonly code: "US";
7
+ readonly name: "United States";
8
+ readonly dial: "+1";
9
+ readonly flag: "🇺🇸";
10
+ }, {
11
+ readonly code: "CA";
12
+ readonly name: "Canada";
13
+ readonly dial: "+1";
14
+ readonly flag: "🇨🇦";
15
+ }, {
16
+ readonly code: "GB";
17
+ readonly name: "United Kingdom";
18
+ readonly dial: "+44";
19
+ readonly flag: "🇬🇧";
20
+ }, {
21
+ readonly code: "AU";
22
+ readonly name: "Australia";
23
+ readonly dial: "+61";
24
+ readonly flag: "🇦🇺";
25
+ }, {
26
+ readonly code: "DE";
27
+ readonly name: "Germany";
28
+ readonly dial: "+49";
29
+ readonly flag: "🇩🇪";
30
+ }, {
31
+ readonly code: "FR";
32
+ readonly name: "France";
33
+ readonly dial: "+33";
34
+ readonly flag: "🇫🇷";
35
+ }, {
36
+ readonly code: "ES";
37
+ readonly name: "Spain";
38
+ readonly dial: "+34";
39
+ readonly flag: "🇪🇸";
40
+ }, {
41
+ readonly code: "IT";
42
+ readonly name: "Italy";
43
+ readonly dial: "+39";
44
+ readonly flag: "🇮🇹";
45
+ }, {
46
+ readonly code: "NL";
47
+ readonly name: "Netherlands";
48
+ readonly dial: "+31";
49
+ readonly flag: "🇳🇱";
50
+ }, {
51
+ readonly code: "MX";
52
+ readonly name: "Mexico";
53
+ readonly dial: "+52";
54
+ readonly flag: "🇲🇽";
55
+ }, {
56
+ readonly code: "BR";
57
+ readonly name: "Brazil";
58
+ readonly dial: "+55";
59
+ readonly flag: "🇧🇷";
60
+ }, {
61
+ readonly code: "IN";
62
+ readonly name: "India";
63
+ readonly dial: "+91";
64
+ readonly flag: "🇮🇳";
65
+ }, {
66
+ readonly code: "JP";
67
+ readonly name: "Japan";
68
+ readonly dial: "+81";
69
+ readonly flag: "🇯🇵";
70
+ }, {
71
+ readonly code: "KR";
72
+ readonly name: "South Korea";
73
+ readonly dial: "+82";
74
+ readonly flag: "🇰🇷";
75
+ }, {
76
+ readonly code: "SG";
77
+ readonly name: "Singapore";
78
+ readonly dial: "+65";
79
+ readonly flag: "🇸🇬";
80
+ }];
81
+ export type CountryCode = typeof COUNTRIES[number]['code'];
82
+ /**
83
+ * Format phone number as user types
84
+ * US/CA: (555) 123-4567
85
+ * Others: digits only
86
+ */
87
+ export declare function formatPhoneForDisplay(value: string, countryCode?: string): string;
88
+ /**
89
+ * Engineered Phone Input - "Apple-Level" component
90
+ *
91
+ * Features:
92
+ * - 56px height (h-14) for prominence
93
+ * - Country selector with gray background
94
+ * - Large text (18px) for confidence
95
+ * - Lock icon as trust signal
96
+ * - Entire container gets focus ring
97
+ * - Auto-formats phone numbers as (555) 123-4567
98
+ */
99
+ interface PhoneInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'onChange'> {
100
+ value?: string;
101
+ onChange?: (value: string) => void;
102
+ countryCode?: CountryCode;
103
+ onCountryChange?: (code: CountryCode) => void;
104
+ }
105
+ export declare const PhoneInput: React.ForwardRefExoticComponent<PhoneInputProps & React.RefAttributes<HTMLInputElement>>;
106
+ export { COUNTRIES };
107
+ //# sourceMappingURL=phone-input.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"phone-input.d.ts","sourceRoot":"","sources":["../../../../src/components/payos/phone-input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B;;GAEG;AACH,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgBL,CAAC;AAEX,MAAM,MAAM,WAAW,GAAG,OAAO,SAAS,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;AAE3D;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,EAAE,WAAW,GAAE,MAAa,GAAG,MAAM,CAmBvF;AAED;;;;;;;;;;GAUG;AAEH,UAAU,eAAgB,SAAQ,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,UAAU,CAAC;IAC7F,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,IAAI,CAAC;CAC/C;AAED,eAAO,MAAM,UAAU,0FAgItB,CAAC;AAGF,OAAO,EAAE,SAAS,EAAE,CAAC"}
@@ -0,0 +1,58 @@
1
+ import * as React from "react";
2
+ import type { MultiPaymentIntent } from "../../../types/session";
3
+ /**
4
+ * AgentRegistrationView - Mandatory Biometric Authorization for Agent Mode
5
+ *
6
+ * Features:
7
+ * - Explains why passkey is required (agent authorization)
8
+ * - Two-card stack: Context + Action
9
+ * - Handles both Visa (step-up) and Mastercard (SDK) flows
10
+ * - Mandatory step before agent can execute purchase
11
+ * - Error display with retry and skip options
12
+ *
13
+ * Flow:
14
+ * - Mastercard: Clicking "Create Mastercard Passkey" → calls sdk.register()
15
+ * - Visa: Clicking "Create Visa Passkey" → triggers Visa step-up views
16
+ * - On Success: Returns to checkout with passkey enrolled
17
+ * - On Failure: Shows error with retry and optional skip
18
+ */
19
+ export interface AgentRegistrationViewProps {
20
+ /**
21
+ * Card network (determines passkey flow and button text)
22
+ */
23
+ cardNetwork: 'visa' | 'mastercard';
24
+ /**
25
+ * Handler for creating passkey (Mastercard SDK or Visa step-up trigger)
26
+ */
27
+ onCreatePasskey: () => void;
28
+ /**
29
+ * Handler for skipping registration (only shown after failure)
30
+ */
31
+ onSkip?: () => void;
32
+ /**
33
+ * Back handler (return to checkout view)
34
+ */
35
+ onBack?: () => void;
36
+ /**
37
+ * Whether passkey creation is loading
38
+ */
39
+ isLoading?: boolean;
40
+ /**
41
+ * Error message to display
42
+ */
43
+ error?: string;
44
+ /**
45
+ * Whether to show the skip button (typically after failure)
46
+ */
47
+ showSkip?: boolean;
48
+ /**
49
+ * Payment intent for context (optional - for showing amount)
50
+ */
51
+ paymentIntent?: MultiPaymentIntent;
52
+ /**
53
+ * Merchant name for context
54
+ */
55
+ merchantName?: string;
56
+ }
57
+ export declare const AgentRegistrationView: React.FC<AgentRegistrationViewProps>;
58
+ //# sourceMappingURL=AgentRegistrationView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AgentRegistrationView.d.ts","sourceRoot":"","sources":["../../../../../src/components/payos/views/AgentRegistrationView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAEjE;;;;;;;;;;;;;;;GAeG;AAEH,MAAM,WAAW,0BAA0B;IACzC;;OAEG;IACH,WAAW,EAAE,MAAM,GAAG,YAAY,CAAC;IACnC;;OAEG;IACH,eAAe,EAAE,MAAM,IAAI,CAAC;IAC5B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,aAAa,CAAC,EAAE,kBAAkB,CAAC;IACnC;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,EAAE,CAAC,0BAA0B,CAuGtE,CAAC"}