@blocklet/payment-react 1.14.21 → 1.14.23

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 (137) hide show
  1. package/README.md +77 -0
  2. package/es/checkout/donate.d.ts +4 -2
  3. package/es/checkout/donate.js +13 -10
  4. package/es/checkout/form.d.ts +1 -1
  5. package/es/checkout/form.js +50 -4
  6. package/es/checkout/table.d.ts +1 -1
  7. package/es/checkout/table.js +11 -1
  8. package/es/components/blockchain/tx.js +2 -1
  9. package/es/components/country-select.d.ts +16 -0
  10. package/es/components/country-select.js +82 -0
  11. package/es/components/input.d.ts +21 -21
  12. package/es/components/input.js +43 -42
  13. package/es/components/livemode.js +1 -0
  14. package/es/components/pricing-table.js +0 -2
  15. package/es/components/status.js +2 -3
  16. package/es/components/table.d.ts +2 -0
  17. package/es/components/table.js +186 -0
  18. package/es/contexts/payment.d.ts +2 -0
  19. package/es/contexts/payment.js +5 -2
  20. package/es/history/invoice/list.d.ts +3 -1
  21. package/es/history/invoice/list.js +215 -48
  22. package/es/hooks/mobile.d.ts +4 -0
  23. package/es/hooks/mobile.js +10 -0
  24. package/es/index.d.ts +5 -1
  25. package/es/index.js +7 -1
  26. package/es/libs/util.d.ts +21 -8
  27. package/es/libs/util.js +92 -28
  28. package/es/locales/en.js +22 -7
  29. package/es/locales/index.d.ts +0 -1
  30. package/es/locales/index.js +10 -1
  31. package/es/locales/zh.js +21 -6
  32. package/es/payment/error.js +2 -2
  33. package/es/payment/footer.js +1 -1
  34. package/es/payment/form/address.d.ts +9 -2
  35. package/es/payment/form/address.js +69 -69
  36. package/es/payment/form/currency.js +39 -25
  37. package/es/payment/form/index.d.ts +1 -1
  38. package/es/payment/form/index.js +83 -81
  39. package/es/payment/form/phone.js +15 -51
  40. package/es/payment/index.d.ts +3 -10
  41. package/es/payment/index.js +295 -224
  42. package/es/payment/product-card.js +4 -4
  43. package/es/payment/product-donation.js +9 -3
  44. package/es/payment/product-item.d.ts +2 -2
  45. package/es/payment/product-item.js +120 -81
  46. package/es/payment/summary.js +188 -118
  47. package/es/theme/index.css +240 -0
  48. package/es/theme/index.d.ts +14 -0
  49. package/es/theme/index.js +256 -0
  50. package/es/theme/typography.d.ts +2 -0
  51. package/es/theme/typography.js +53 -0
  52. package/es/types/index.d.ts +16 -0
  53. package/lib/checkout/donate.d.ts +4 -2
  54. package/lib/checkout/donate.js +23 -2
  55. package/lib/checkout/form.d.ts +1 -1
  56. package/lib/checkout/form.js +60 -15
  57. package/lib/checkout/table.d.ts +1 -1
  58. package/lib/checkout/table.js +22 -1
  59. package/lib/components/blockchain/tx.js +4 -1
  60. package/lib/components/country-select.d.ts +16 -0
  61. package/lib/components/country-select.js +115 -0
  62. package/lib/components/input.d.ts +21 -21
  63. package/lib/components/input.js +21 -12
  64. package/lib/components/livemode.js +1 -0
  65. package/lib/components/pricing-table.js +0 -2
  66. package/lib/components/status.js +2 -3
  67. package/lib/components/table.d.ts +2 -0
  68. package/lib/components/table.js +220 -0
  69. package/lib/contexts/payment.d.ts +2 -0
  70. package/lib/contexts/payment.js +4 -1
  71. package/lib/history/invoice/list.d.ts +3 -1
  72. package/lib/history/invoice/list.js +290 -62
  73. package/lib/hooks/mobile.d.ts +4 -0
  74. package/lib/hooks/mobile.js +17 -0
  75. package/lib/index.d.ts +5 -1
  76. package/lib/index.js +36 -0
  77. package/lib/libs/util.d.ts +21 -8
  78. package/lib/libs/util.js +115 -37
  79. package/lib/locales/en.js +22 -7
  80. package/lib/locales/index.d.ts +0 -1
  81. package/lib/locales/index.js +14 -3
  82. package/lib/locales/zh.js +21 -6
  83. package/lib/payment/error.js +5 -1
  84. package/lib/payment/footer.js +1 -1
  85. package/lib/payment/form/address.d.ts +9 -2
  86. package/lib/payment/form/address.js +67 -59
  87. package/lib/payment/form/currency.js +31 -24
  88. package/lib/payment/form/index.d.ts +1 -1
  89. package/lib/payment/form/index.js +92 -93
  90. package/lib/payment/form/phone.js +11 -59
  91. package/lib/payment/index.d.ts +3 -10
  92. package/lib/payment/index.js +302 -225
  93. package/lib/payment/product-card.js +5 -4
  94. package/lib/payment/product-donation.js +11 -7
  95. package/lib/payment/product-item.d.ts +2 -2
  96. package/lib/payment/product-item.js +38 -19
  97. package/lib/payment/summary.js +219 -127
  98. package/lib/theme/index.css +240 -0
  99. package/lib/theme/index.d.ts +14 -0
  100. package/lib/theme/index.js +273 -0
  101. package/lib/theme/typography.d.ts +2 -0
  102. package/lib/theme/typography.js +59 -0
  103. package/lib/types/index.d.ts +16 -0
  104. package/package.json +14 -11
  105. package/src/checkout/donate.tsx +25 -11
  106. package/src/checkout/form.tsx +63 -15
  107. package/src/checkout/table.tsx +20 -1
  108. package/src/components/blockchain/tx.tsx +2 -1
  109. package/src/components/country-select.tsx +93 -0
  110. package/src/components/input.tsx +49 -46
  111. package/src/components/livemode.tsx +1 -0
  112. package/src/components/pricing-table.tsx +0 -2
  113. package/src/components/status.tsx +1 -2
  114. package/src/components/table.tsx +200 -0
  115. package/src/contexts/payment.tsx +6 -1
  116. package/src/history/invoice/list.tsx +254 -49
  117. package/src/hooks/mobile.ts +13 -0
  118. package/src/index.ts +7 -0
  119. package/src/libs/util.ts +120 -31
  120. package/src/locales/en.tsx +18 -4
  121. package/src/locales/index.tsx +10 -3
  122. package/src/locales/zh.tsx +17 -3
  123. package/src/payment/error.tsx +2 -2
  124. package/src/payment/footer.tsx +1 -1
  125. package/src/payment/form/address.tsx +56 -47
  126. package/src/payment/form/currency.tsx +29 -23
  127. package/src/payment/form/index.tsx +89 -76
  128. package/src/payment/form/phone.tsx +14 -51
  129. package/src/payment/index.tsx +298 -231
  130. package/src/payment/product-card.tsx +4 -4
  131. package/src/payment/product-donation.tsx +9 -4
  132. package/src/payment/product-item.tsx +49 -20
  133. package/src/payment/summary.tsx +191 -108
  134. package/src/theme/index.css +240 -0
  135. package/src/theme/index.tsx +271 -0
  136. package/src/theme/typography.ts +56 -0
  137. package/src/types/index.ts +17 -0
@@ -4,24 +4,17 @@ import { CheckoutCallbacks, CheckoutContext } from '../types';
4
4
  type Props = CheckoutContext & CheckoutCallbacks & {
5
5
  completed?: boolean;
6
6
  error?: any;
7
+ showCheckoutSummary?: boolean;
7
8
  };
8
- declare function Payment({ checkoutSession, paymentMethods, paymentIntent, paymentLink, customer, completed, error, mode, onPaid, onError, onChange, goBack, action, }: Props): import("react").JSX.Element;
9
+ declare function Payment({ checkoutSession, paymentMethods, paymentIntent, paymentLink, customer, completed, mode, onPaid, onError, onChange, goBack, action, showCheckoutSummary, }: Props): import("react").JSX.Element;
9
10
  declare namespace Payment {
10
11
  var defaultProps: {
11
12
  completed: boolean;
12
13
  error: null;
14
+ showCheckoutSummary: boolean;
13
15
  };
14
16
  }
15
17
  export default Payment;
16
- type MainProps = CheckoutContext & CheckoutCallbacks & {
17
- completed?: boolean;
18
- };
19
- export declare function PaymentInner({ checkoutSession, paymentMethods, paymentLink, paymentIntent, customer, completed, mode, onPaid, onError, onChange, goBack, action, }: MainProps): import("react").JSX.Element;
20
- export declare namespace PaymentInner {
21
- var defaultProps: {
22
- completed: boolean;
23
- };
24
- }
25
18
  export declare const Root: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
26
19
  ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
27
20
  }, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/system").Theme> & {