@12-apps/payments-frontend 3.37.0 → 3.39.0

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 (36) hide show
  1. package/package.json +1 -1
  2. package/src/card/types.ts +6 -0
  3. package/src/components/checkout/card-sources.ts +140 -0
  4. package/src/components/checkout/card-view.tsx +6 -2
  5. package/src/components/checkout/cart-changed.tsx +26 -15
  6. package/src/components/checkout/checkout-actions.ts +18 -0
  7. package/src/components/checkout/checkout-flow.tsx +24 -77
  8. package/src/components/checkout/google-pay-button.tsx +4 -4
  9. package/src/components/checkout/list/buyer-inline.tsx +125 -0
  10. package/src/components/checkout/list/charge-runners.tsx +175 -0
  11. package/src/components/checkout/list/choice-list.tsx +159 -0
  12. package/src/components/checkout/list/choice.ts +213 -0
  13. package/src/components/checkout/list/context.tsx +55 -0
  14. package/src/components/checkout/list/en-US.ts +63 -0
  15. package/src/components/checkout/list/list-bar.tsx +186 -0
  16. package/src/components/checkout/list/list-face.tsx +338 -0
  17. package/src/components/checkout/list/list-pix.tsx +206 -0
  18. package/src/components/checkout/list/online-content.tsx +144 -0
  19. package/src/components/checkout/list/option-row.tsx +125 -0
  20. package/src/components/checkout/list/payment-list-step.tsx +166 -0
  21. package/src/components/checkout/list/pt-BR.ts +79 -0
  22. package/src/components/checkout/list/types.ts +218 -0
  23. package/src/components/checkout/list/use-capability.ts +58 -0
  24. package/src/components/checkout/list/use-list-charge.ts +186 -0
  25. package/src/components/checkout/list/use-list-state.ts +152 -0
  26. package/src/components/checkout/payment-phase.tsx +119 -0
  27. package/src/components/checkout/pix-parts.tsx +3 -0
  28. package/src/components/checkout/pix-view.tsx +53 -20
  29. package/src/components/checkout/transport.ts +3 -1
  30. package/src/components/checkout/types.ts +9 -9
  31. package/src/components/checkout/use-card-checkout.ts +11 -78
  32. package/src/components/checkout/use-checkout-controller.ts +3 -1
  33. package/src/flows/create-payment-flows.tsx +7 -0
  34. package/src/flows/types.ts +7 -0
  35. package/src/index.ts +4 -5
  36. package/src/locales.ts +13 -0
package/src/locales.ts CHANGED
@@ -20,6 +20,9 @@ import {
20
20
  import { EN_US_CHECKOUT_SCREENS_COPY } from './components/checkout/screens-en-US';
21
21
  import type { CheckoutScreensCopy } from './components/checkout/screens-copy';
22
22
  import { PT_BR_CHECKOUT_SCREENS_COPY } from './components/checkout/screens-pt-BR';
23
+ import { EN_US_PAYMENT_LIST_COPY } from './components/checkout/list/en-US';
24
+ import { PT_BR_PAYMENT_LIST_COPY } from './components/checkout/list/pt-BR';
25
+ import type { PaymentListCopy } from './components/checkout/list/types';
23
26
  import type { CheckoutViewCopy, PaymentStatusCopy } from './components/checkout/view-copy';
24
27
  import type { PlatformHomologacaoCopy } from './components/platform/copy';
25
28
  import { EN_US_PLATFORM_HOMOLOGACAO_COPY } from './components/platform/en-US';
@@ -76,6 +79,15 @@ export const CHECKOUT_SCREENS_COPY = {
76
79
  'en-US': EN_US_CHECKOUT_SCREENS_COPY,
77
80
  } as const satisfies LocalePack<CheckoutScreensCopy>;
78
81
 
82
+ /**
83
+ * The one-list Pagamento step's words (FUT-3591) — `CheckoutFlowProps.paymentList.copy`.
84
+ * Read by the SHOPPER, like every checkout pack.
85
+ */
86
+ export const PAYMENT_LIST_COPY = {
87
+ 'pt-BR': PT_BR_PAYMENT_LIST_COPY,
88
+ 'en-US': EN_US_PAYMENT_LIST_COPY,
89
+ } as const satisfies LocalePack<PaymentListCopy>;
90
+
79
91
  export const CHECKOUT_COPY = {
80
92
  'pt-BR': PT_BR_CHECKOUT_COPY,
81
93
  'en-US': EN_US_CHECKOUT_COPY,
@@ -123,6 +135,7 @@ export {
123
135
  EN_US_PAYMENT_STATUS_COPY,
124
136
  } from './components/checkout/en-US';
125
137
  export { EN_US_CHECKOUT_SCREENS_COPY } from './components/checkout/screens-en-US';
138
+ export { EN_US_PAYMENT_LIST_COPY } from './components/checkout/list/en-US';
126
139
  export { EN_US_PAYMENTS_SETTINGS_COPY } from './components/settings-en-US';
127
140
  export { EN_US_PLATFORM_HOMOLOGACAO_COPY } from './components/platform/en-US';
128
141
  export { EN_US_TENDER_SPLIT_COPY } from './tender-split/en-US';