@blocklet/payment-react 1.18.56 → 1.19.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 (220) hide show
  1. package/es/checkout/donate.d.ts +1 -15
  2. package/es/checkout/donate.js +301 -189
  3. package/es/checkout/form.d.ts +1 -15
  4. package/es/checkout/form.js +5 -13
  5. package/es/checkout/table.js +3 -3
  6. package/es/components/blockchain/gas.d.ts +1 -5
  7. package/es/components/blockchain/gas.js +10 -2
  8. package/es/components/blockchain/tx.d.ts +1 -8
  9. package/es/components/blockchain/tx.js +28 -7
  10. package/es/components/confirm.d.ts +1 -10
  11. package/es/components/confirm.js +4 -10
  12. package/es/components/country-select.d.ts +3 -2
  13. package/es/components/country-select.js +375 -352
  14. package/es/components/input.d.ts +11 -20
  15. package/es/components/input.js +46 -43
  16. package/es/components/lazy-loader.js +1 -2
  17. package/es/components/link.d.ts +2 -9
  18. package/es/components/link.js +9 -6
  19. package/es/components/livemode.d.ts +2 -8
  20. package/es/components/livemode.js +1 -5
  21. package/es/components/loading-button.d.ts +6 -1
  22. package/es/components/loading-button.js +56 -66
  23. package/es/components/over-due-invoice-payment.d.ts +0 -18
  24. package/es/components/over-due-invoice-payment.js +138 -95
  25. package/es/components/payment-beneficiaries.d.ts +2 -7
  26. package/es/components/payment-beneficiaries.js +86 -40
  27. package/es/components/pricing-item.d.ts +0 -5
  28. package/es/components/pricing-item.js +1 -4
  29. package/es/components/pricing-table.d.ts +2 -10
  30. package/es/components/pricing-table.js +8 -7
  31. package/es/components/resume-subscription.d.ts +0 -10
  32. package/es/components/resume-subscription.js +42 -21
  33. package/es/components/truncated-text.d.ts +2 -9
  34. package/es/components/truncated-text.js +0 -5
  35. package/es/contexts/donate.d.ts +0 -7
  36. package/es/contexts/donate.js +10 -8
  37. package/es/contexts/payment.d.ts +1 -4
  38. package/es/contexts/payment.js +7 -2
  39. package/es/history/invoice/list.d.ts +2 -18
  40. package/es/history/invoice/list.js +151 -73
  41. package/es/history/payment/list.js +115 -38
  42. package/es/hooks/keyboard.d.ts +1 -1
  43. package/es/hooks/keyboard.js +2 -4
  44. package/es/libs/cached-request.js +2 -4
  45. package/es/libs/phone-validator.js +1 -2
  46. package/es/libs/util.js +2 -4
  47. package/es/libs/validator.js +2 -4
  48. package/es/payment/amount.d.ts +2 -7
  49. package/es/payment/amount.js +1 -5
  50. package/es/payment/donation-form.d.ts +2 -10
  51. package/es/payment/donation-form.js +196 -160
  52. package/es/payment/error.d.ts +2 -8
  53. package/es/payment/error.js +40 -20
  54. package/es/payment/footer.d.ts +2 -3
  55. package/es/payment/footer.js +19 -6
  56. package/es/payment/form/addon.js +14 -4
  57. package/es/payment/form/address.d.ts +2 -9
  58. package/es/payment/form/address.js +3 -6
  59. package/es/payment/form/currency.js +45 -25
  60. package/es/payment/form/index.d.ts +2 -8
  61. package/es/payment/form/index.js +107 -65
  62. package/es/payment/form/phone.js +2 -4
  63. package/es/payment/form/stripe/form.d.ts +2 -8
  64. package/es/payment/form/stripe/form.js +1 -3
  65. package/es/payment/header.js +38 -16
  66. package/es/payment/index.d.ts +2 -9
  67. package/es/payment/index.js +5 -14
  68. package/es/payment/product-card.d.ts +2 -11
  69. package/es/payment/product-card.js +84 -50
  70. package/es/payment/product-donation.js +175 -114
  71. package/es/payment/product-item.d.ts +2 -9
  72. package/es/payment/product-item.js +185 -142
  73. package/es/payment/product-skeleton.js +2 -2
  74. package/es/payment/skeleton/donation.js +27 -7
  75. package/es/payment/skeleton/overview.js +22 -2
  76. package/es/payment/skeleton/payment.js +33 -5
  77. package/es/payment/success.d.ts +2 -9
  78. package/es/payment/success.js +41 -14
  79. package/es/payment/summary.d.ts +2 -17
  80. package/es/payment/summary.js +184 -111
  81. package/es/theme/index.d.ts +0 -5
  82. package/es/theme/index.js +2 -5
  83. package/es/theme/typography.d.ts +2 -2
  84. package/lib/checkout/donate.d.ts +1 -15
  85. package/lib/checkout/donate.js +75 -54
  86. package/lib/checkout/form.d.ts +1 -15
  87. package/lib/checkout/form.js +7 -15
  88. package/lib/checkout/table.js +4 -4
  89. package/lib/components/blockchain/gas.d.ts +1 -5
  90. package/lib/components/blockchain/gas.js +3 -2
  91. package/lib/components/blockchain/tx.d.ts +1 -8
  92. package/lib/components/blockchain/tx.js +11 -7
  93. package/lib/components/confirm.d.ts +1 -10
  94. package/lib/components/confirm.js +5 -11
  95. package/lib/components/country-select.d.ts +3 -2
  96. package/lib/components/country-select.js +23 -22
  97. package/lib/components/input.d.ts +11 -20
  98. package/lib/components/input.js +20 -23
  99. package/lib/components/lazy-loader.js +1 -1
  100. package/lib/components/link.d.ts +2 -9
  101. package/lib/components/link.js +3 -8
  102. package/lib/components/livemode.d.ts +2 -8
  103. package/lib/components/livemode.js +3 -7
  104. package/lib/components/loading-button.d.ts +6 -1
  105. package/lib/components/loading-button.js +9 -17
  106. package/lib/components/over-due-invoice-payment.d.ts +0 -18
  107. package/lib/components/over-due-invoice-payment.js +31 -33
  108. package/lib/components/payment-beneficiaries.d.ts +2 -7
  109. package/lib/components/payment-beneficiaries.js +12 -11
  110. package/lib/components/pricing-item.d.ts +0 -5
  111. package/lib/components/pricing-item.js +2 -5
  112. package/lib/components/pricing-table.d.ts +2 -10
  113. package/lib/components/pricing-table.js +5 -11
  114. package/lib/components/resume-subscription.d.ts +0 -10
  115. package/lib/components/resume-subscription.js +16 -16
  116. package/lib/components/table.js +1 -1
  117. package/lib/components/truncated-text.d.ts +2 -9
  118. package/lib/components/truncated-text.js +1 -6
  119. package/lib/contexts/donate.d.ts +0 -7
  120. package/lib/contexts/donate.js +4 -7
  121. package/lib/contexts/payment.d.ts +1 -4
  122. package/lib/contexts/payment.js +4 -7
  123. package/lib/history/invoice/list.d.ts +2 -18
  124. package/lib/history/invoice/list.js +49 -37
  125. package/lib/history/payment/list.js +30 -16
  126. package/lib/hooks/keyboard.d.ts +1 -1
  127. package/lib/hooks/mobile.js +1 -1
  128. package/lib/hooks/subscription.js +1 -1
  129. package/lib/index.js +2 -2
  130. package/lib/libs/api.js +1 -1
  131. package/lib/libs/dayjs.js +1 -1
  132. package/lib/libs/phone-validator.js +0 -2
  133. package/lib/libs/theme.js +1 -1
  134. package/lib/libs/util.js +1 -1
  135. package/lib/libs/validator.js +1 -1
  136. package/lib/locales/en.js +1 -1
  137. package/lib/locales/index.js +1 -1
  138. package/lib/locales/zh.js +1 -1
  139. package/lib/payment/amount.d.ts +2 -7
  140. package/lib/payment/amount.js +2 -6
  141. package/lib/payment/donation-form.d.ts +2 -10
  142. package/lib/payment/donation-form.js +33 -38
  143. package/lib/payment/error.d.ts +2 -8
  144. package/lib/payment/error.js +11 -13
  145. package/lib/payment/footer.d.ts +2 -3
  146. package/lib/payment/footer.js +5 -5
  147. package/lib/payment/form/addon.js +5 -3
  148. package/lib/payment/form/address.d.ts +2 -9
  149. package/lib/payment/form/address.js +5 -8
  150. package/lib/payment/form/currency.js +3 -3
  151. package/lib/payment/form/index.d.ts +2 -8
  152. package/lib/payment/form/index.js +19 -15
  153. package/lib/payment/form/phone.js +1 -1
  154. package/lib/payment/form/stripe/form.d.ts +2 -8
  155. package/lib/payment/form/stripe/form.js +3 -6
  156. package/lib/payment/header.js +8 -4
  157. package/lib/payment/index.d.ts +2 -9
  158. package/lib/payment/index.js +7 -16
  159. package/lib/payment/product-card.d.ts +2 -11
  160. package/lib/payment/product-card.js +13 -20
  161. package/lib/payment/product-donation.js +71 -66
  162. package/lib/payment/product-item.d.ts +2 -9
  163. package/lib/payment/product-item.js +24 -25
  164. package/lib/payment/product-skeleton.js +2 -2
  165. package/lib/payment/skeleton/donation.js +8 -4
  166. package/lib/payment/skeleton/overview.js +6 -2
  167. package/lib/payment/skeleton/payment.js +9 -3
  168. package/lib/payment/success.d.ts +2 -9
  169. package/lib/payment/success.js +12 -15
  170. package/lib/payment/summary.d.ts +2 -17
  171. package/lib/payment/summary.js +44 -45
  172. package/lib/theme/index.d.ts +0 -5
  173. package/lib/theme/index.js +2 -5
  174. package/lib/theme/typography.d.ts +2 -2
  175. package/package.json +40 -40
  176. package/src/checkout/donate.tsx +103 -35
  177. package/src/checkout/form.tsx +5 -14
  178. package/src/checkout/table.tsx +3 -3
  179. package/src/components/blockchain/gas.tsx +5 -3
  180. package/src/components/blockchain/tx.tsx +22 -8
  181. package/src/components/confirm.tsx +4 -11
  182. package/src/components/country-select.tsx +391 -378
  183. package/src/components/input.tsx +49 -45
  184. package/src/components/link.tsx +9 -7
  185. package/src/components/livemode.tsx +2 -6
  186. package/src/components/loading-button.tsx +63 -76
  187. package/src/components/over-due-invoice-payment.tsx +43 -28
  188. package/src/components/payment-beneficiaries.tsx +33 -14
  189. package/src/components/pricing-item.tsx +1 -4
  190. package/src/components/pricing-table.tsx +8 -8
  191. package/src/components/resume-subscription.tsx +20 -14
  192. package/src/components/table.tsx +2 -2
  193. package/src/components/truncated-text.tsx +0 -6
  194. package/src/contexts/donate.tsx +6 -7
  195. package/src/contexts/payment.tsx +7 -3
  196. package/src/history/invoice/list.tsx +74 -35
  197. package/src/history/payment/list.tsx +53 -16
  198. package/src/hooks/keyboard.ts +1 -1
  199. package/src/payment/amount.tsx +1 -6
  200. package/src/payment/donation-form.tsx +47 -29
  201. package/src/payment/error.tsx +16 -8
  202. package/src/payment/footer.tsx +11 -3
  203. package/src/payment/form/addon.tsx +6 -1
  204. package/src/payment/form/address.tsx +3 -7
  205. package/src/payment/form/currency.tsx +12 -2
  206. package/src/payment/form/index.tsx +30 -12
  207. package/src/payment/form/stripe/form.tsx +1 -5
  208. package/src/payment/header.tsx +14 -2
  209. package/src/payment/index.tsx +10 -21
  210. package/src/payment/product-card.tsx +41 -18
  211. package/src/payment/product-donation.tsx +85 -47
  212. package/src/payment/product-item.tsx +46 -24
  213. package/src/payment/product-skeleton.tsx +3 -2
  214. package/src/payment/skeleton/donation.tsx +12 -2
  215. package/src/payment/skeleton/overview.tsx +12 -2
  216. package/src/payment/skeleton/payment.tsx +16 -3
  217. package/src/payment/success.tsx +26 -15
  218. package/src/payment/summary.tsx +74 -42
  219. package/src/theme/index.tsx +5 -8
  220. package/src/theme/typography.ts +2 -2
@@ -14,7 +14,7 @@ var _util = require("../libs/util");
14
14
  var _payment = require("../contexts/payment");
15
15
  var _scroll = require("../hooks/scroll");
16
16
  var _keyboard = require("../hooks/keyboard");
17
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
18
18
  const DONATION_PRESET_KEY_BASE = "payment-donation-preset";
19
19
  const DONATION_CUSTOM_AMOUNT_KEY_BASE = "payment-donation-custom-amount";
20
20
  const formatAmount = amount => {
@@ -259,22 +259,23 @@ function ProductDonation({
259
259
  };
260
260
  return /* @__PURE__ */(0, _jsxRuntime.jsxs)(_material.Box, {
261
261
  ref: containerRef,
262
- display: "flex",
263
- flexDirection: "column",
264
- alignItems: "flex-start",
265
- gap: 1.5,
266
262
  onKeyDown: handleKeyDown,
267
263
  tabIndex: 0,
268
264
  sx: {
265
+ display: "flex",
266
+ flexDirection: "column",
267
+ alignItems: "flex-start",
268
+ gap: 1.5,
269
269
  outline: "none"
270
270
  },
271
271
  children: [supportPreset && /* @__PURE__ */(0, _jsxRuntime.jsxs)(_material.Grid, {
272
272
  container: true,
273
273
  spacing: 2,
274
274
  children: [presets.map(amount => /* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Grid, {
275
- item: true,
276
- xs: 6,
277
- sm: 3,
275
+ size: {
276
+ xs: 6,
277
+ sm: 3
278
+ },
278
279
  children: /* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Card, {
279
280
  variant: "outlined",
280
281
  className: "tab-navigable-card",
@@ -302,13 +303,13 @@ function ProductDonation({
302
303
  "aria-selected": formatAmount(state.selected) === formatAmount(amount) && !state.custom,
303
304
  children: /* @__PURE__ */(0, _jsxRuntime.jsxs)(_material.Stack, {
304
305
  direction: "row",
306
+ spacing: 0.5,
305
307
  sx: {
308
+ alignItems: "center",
309
+ justifyContent: "center",
306
310
  py: 1.5,
307
311
  px: 1.5
308
312
  },
309
- spacing: 0.5,
310
- alignItems: "center",
311
- justifyContent: "center",
312
313
  children: [/* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Avatar, {
313
314
  src: currency?.logo,
314
315
  sx: {
@@ -319,26 +320,29 @@ function ProductDonation({
319
320
  alt: currency?.symbol
320
321
  }), /* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Typography, {
321
322
  component: "strong",
322
- lineHeight: 1,
323
323
  variant: "h3",
324
324
  sx: {
325
+ lineHeight: 1,
325
326
  fontVariantNumeric: "tabular-nums",
326
327
  fontWeight: 400
327
328
  },
328
329
  children: amount
329
330
  }), /* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Typography, {
330
- lineHeight: 1,
331
- fontSize: 14,
332
- color: "text.secondary",
331
+ sx: {
332
+ lineHeight: 1,
333
+ fontSize: 14,
334
+ color: "text.secondary"
335
+ },
333
336
  children: currency?.symbol
334
337
  })]
335
338
  })
336
339
  })
337
340
  })
338
341
  }, amount)), supportCustom && /* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Grid, {
339
- item: true,
340
- xs: 6,
341
- sm: 3,
342
+ size: {
343
+ xs: 6,
344
+ sm: 3
345
+ },
342
346
  children: /* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Card, {
343
347
  variant: "outlined",
344
348
  className: "tab-navigable-card",
@@ -365,17 +369,17 @@ function ProductDonation({
365
369
  "aria-selected": state.custom,
366
370
  children: /* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Stack, {
367
371
  direction: "row",
372
+ spacing: 0.5,
368
373
  sx: {
374
+ alignItems: "center",
375
+ justifyContent: "center",
369
376
  py: 1.5,
370
377
  px: 1.5
371
378
  },
372
- spacing: 0.5,
373
- alignItems: "center",
374
- justifyContent: "center",
375
379
  children: /* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Typography, {
376
380
  variant: "h3",
377
- lineHeight: 1,
378
381
  sx: {
382
+ lineHeight: 1,
379
383
  fontWeight: 400
380
384
  },
381
385
  children: t("common.custom")
@@ -393,49 +397,6 @@ function ProductDonation({
393
397
  error: !!state.error,
394
398
  helperText: state.error,
395
399
  inputRef: customInputRef,
396
- InputProps: {
397
- endAdornment: /* @__PURE__ */(0, _jsxRuntime.jsxs)(_material.Stack, {
398
- direction: "row",
399
- spacing: 0.5,
400
- alignItems: "center",
401
- sx: {
402
- ml: 1
403
- },
404
- children: [/* @__PURE__ */(0, _jsxRuntime.jsx)(_material.IconButton, {
405
- size: "small",
406
- onClick: handleCustomSelect,
407
- disabled: state.animating,
408
- sx: {
409
- mr: 0.5,
410
- opacity: state.animating ? 0.5 : 1,
411
- transition: "all 0.2s ease",
412
- "&:hover": {
413
- transform: "scale(1.2)",
414
- transition: "transform 0.3s ease"
415
- }
416
- },
417
- "aria-label": t("common.random"),
418
- children: /* @__PURE__ */(0, _jsxRuntime.jsx)(_AutoAwesome.default, {
419
- fontSize: "small"
420
- })
421
- }), /* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Avatar, {
422
- src: currency?.logo,
423
- sx: {
424
- width: 16,
425
- height: 16
426
- },
427
- alt: currency?.symbol
428
- }), /* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Typography, {
429
- children: currency?.symbol
430
- })]
431
- }),
432
- autoComplete: "off",
433
- sx: {
434
- "& input": {
435
- transition: "all 0.25s ease"
436
- }
437
- }
438
- },
439
400
  sx: {
440
401
  mt: defaultPreset !== "0" ? 0 : 1,
441
402
  "& .MuiInputBase-root": {
@@ -451,8 +412,52 @@ function ProductDonation({
451
412
  "& input[type=number]::-webkit-inner-spin-button": {
452
413
  WebkitAppearance: "none",
453
414
  margin: 0
415
+ },
416
+ "& input": {
417
+ transition: "all 0.25s ease"
454
418
  }
455
- }
419
+ },
420
+ slotProps: {
421
+ input: {
422
+ endAdornment: /* @__PURE__ */(0, _jsxRuntime.jsxs)(_material.Stack, {
423
+ direction: "row",
424
+ spacing: 0.5,
425
+ sx: {
426
+ alignItems: "center",
427
+ ml: 1
428
+ },
429
+ children: [/* @__PURE__ */(0, _jsxRuntime.jsx)(_material.IconButton, {
430
+ size: "small",
431
+ onClick: handleCustomSelect,
432
+ disabled: state.animating,
433
+ sx: {
434
+ mr: 0.5,
435
+ opacity: state.animating ? 0.5 : 1,
436
+ transition: "all 0.2s ease",
437
+ "&:hover": {
438
+ transform: "scale(1.2)",
439
+ transition: "transform 0.3s ease"
440
+ }
441
+ },
442
+ "aria-label": t("common.random"),
443
+ children: /* @__PURE__ */(0, _jsxRuntime.jsx)(_AutoAwesome.default, {
444
+ fontSize: "small"
445
+ })
446
+ }), /* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Avatar, {
447
+ src: currency?.logo,
448
+ sx: {
449
+ width: 16,
450
+ height: 16
451
+ },
452
+ alt: currency?.symbol
453
+ }), /* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Typography, {
454
+ children: currency?.symbol
455
+ })]
456
+ }),
457
+ autoComplete: "off"
458
+ }
459
+ },
460
+ autoComplete: "off"
456
461
  })]
457
462
  });
458
463
  }
@@ -11,12 +11,5 @@ type Props = {
11
11
  mode?: 'normal' | 'cross-sell';
12
12
  children?: React.ReactNode;
13
13
  };
14
- declare function ProductItem({ item, items, trialInDays, trialEnd, currency, mode, children, onUpsell, onDownsell, }: Props): JSX.Element;
15
- declare namespace ProductItem {
16
- var defaultProps: {
17
- mode: string;
18
- children: null;
19
- trialEnd: number;
20
- };
21
- }
22
- export default ProductItem;
14
+ export default function ProductItem({ item, items, trialInDays, trialEnd, currency, mode, children, onUpsell, onDownsell, }: Props): JSX.Element;
15
+ export {};
@@ -13,20 +13,15 @@ var _switchButton = _interopRequireDefault(require("../components/switch-button"
13
13
  var _util = require("../libs/util");
14
14
  var _productCard = _interopRequireDefault(require("./product-card"));
15
15
  var _dayjs = _interopRequireDefault(require("../libs/dayjs"));
16
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
- ProductItem.defaultProps = {
18
- mode: "normal",
19
- children: null,
20
- trialEnd: 0
21
- };
16
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
22
17
  function ProductItem({
23
18
  item,
24
19
  items,
25
20
  trialInDays,
26
21
  trialEnd = 0,
27
22
  currency,
28
- mode,
29
- children,
23
+ mode = "normal",
24
+ children = null,
30
25
  onUpsell,
31
26
  onDownsell
32
27
  }) {
@@ -52,42 +47,46 @@ function ProductItem({
52
47
  }, [trialInDays, trialEnd, pricing, item, locale]);
53
48
  return /* @__PURE__ */(0, _jsxRuntime.jsxs)(_material.Stack, {
54
49
  direction: "column",
55
- alignItems: "flex-start",
56
50
  spacing: 1,
51
+ className: "product-item",
57
52
  sx: {
53
+ alignItems: "flex-start",
58
54
  width: "100%"
59
55
  },
60
- className: "product-item",
61
56
  children: [/* @__PURE__ */(0, _jsxRuntime.jsxs)(_material.Stack, {
62
57
  direction: "column",
63
- alignItems: "flex-start",
58
+ className: "product-item-content",
64
59
  sx: {
60
+ alignItems: "flex-start",
65
61
  width: "100%"
66
62
  },
67
- className: "product-item-content",
68
63
  children: [/* @__PURE__ */(0, _jsxRuntime.jsxs)(_material.Stack, {
69
64
  direction: "row",
70
- alignItems: "center",
71
- flexWrap: "wrap",
72
65
  spacing: 0.5,
73
- justifyContent: "space-between",
74
66
  sx: {
67
+ alignItems: "center",
68
+ flexWrap: "wrap",
69
+ justifyContent: "space-between",
75
70
  width: "100%"
76
71
  },
77
72
  children: [/* @__PURE__ */(0, _jsxRuntime.jsx)(_productCard.default, {
78
73
  logo: item.price.product?.images[0],
79
74
  name: item.price.product?.name,
80
75
  extra: /* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Box, {
81
- display: "flex",
82
- alignItems: "center",
76
+ sx: {
77
+ display: "flex",
78
+ alignItems: "center"
79
+ },
83
80
  children: item.price.type === "recurring" && item.price.recurring ? [pricing.quantity, t("common.billed", {
84
81
  rule: `${(0, _util.formatRecurring)(item.upsell_price?.recurring || item.price.recurring, true, "per", locale)} ${metered}`
85
82
  })].filter(Boolean).join(", ") : pricing.quantity
86
83
  })
87
84
  }), /* @__PURE__ */(0, _jsxRuntime.jsxs)(_material.Stack, {
88
85
  direction: "column",
89
- alignItems: "flex-end",
90
- flex: 1,
86
+ sx: {
87
+ alignItems: "flex-end",
88
+ flex: 1
89
+ },
91
90
  children: [/* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Typography, {
92
91
  sx: {
93
92
  color: "text.primary",
@@ -116,12 +115,12 @@ function ProductItem({
116
115
  }) : null, children]
117
116
  }), canUpsell && !item.upsell_price_id && item.price.upsell?.upsells_to && /* @__PURE__ */(0, _jsxRuntime.jsxs)(_material.Stack, {
118
117
  direction: "row",
119
- alignItems: "center",
120
- justifyContent: "space-between",
118
+ className: "product-item-upsell",
121
119
  sx: {
120
+ alignItems: "center",
121
+ justifyContent: "space-between",
122
122
  width: "100%"
123
123
  },
124
- className: "product-item-upsell",
125
124
  children: [/* @__PURE__ */(0, _jsxRuntime.jsxs)(_material.Typography, {
126
125
  component: "label",
127
126
  htmlFor: "upsell-switch",
@@ -161,12 +160,12 @@ function ProductItem({
161
160
  })]
162
161
  }), canUpsell && item.upsell_price_id && /* @__PURE__ */(0, _jsxRuntime.jsxs)(_material.Stack, {
163
162
  direction: "row",
164
- alignItems: "center",
165
- justifyContent: "space-between",
163
+ className: "product-item-upsell",
166
164
  sx: {
165
+ alignItems: "center",
166
+ justifyContent: "space-between",
167
167
  width: "100%"
168
168
  },
169
- className: "product-item-upsell",
170
169
  children: [/* @__PURE__ */(0, _jsxRuntime.jsxs)(_material.Typography, {
171
170
  component: "label",
172
171
  htmlFor: "upsell-switch",
@@ -13,10 +13,10 @@ function ProductSkeleton({
13
13
  in: true,
14
14
  children: /* @__PURE__ */(0, _jsxRuntime.jsxs)(_material.Stack, {
15
15
  direction: "column",
16
- alignItems: "center",
17
- padding: 4,
18
16
  spacing: 1,
19
17
  sx: {
18
+ alignItems: "center",
19
+ padding: 4,
20
20
  width: 320,
21
21
  border: "1px solid",
22
22
  borderColor: "grey.100",
@@ -36,8 +36,10 @@ function DonationSkeleton() {
36
36
  }
37
37
  }), /* @__PURE__ */(0, _jsxRuntime.jsxs)(_material.Stack, {
38
38
  direction: "row",
39
- justifyContent: "space-between",
40
39
  spacing: 2,
40
+ sx: {
41
+ justifyContent: "space-between"
42
+ },
41
43
  children: [/* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Skeleton, {
42
44
  variant: "text",
43
45
  sx: {
@@ -45,9 +47,11 @@ function DonationSkeleton() {
45
47
  width: "40%"
46
48
  }
47
49
  }), /* @__PURE__ */(0, _jsxRuntime.jsxs)(_material.Box, {
48
- display: "flex",
49
- alignItems: "center",
50
- gap: 2,
50
+ sx: {
51
+ display: "flex",
52
+ alignItems: "center",
53
+ gap: 2
54
+ },
51
55
  children: [/* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Box, {
52
56
  children: /* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Skeleton, {
53
57
  height: 60,
@@ -13,8 +13,10 @@ function OverviewSkeleton() {
13
13
  direction: "column",
14
14
  children: [/* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Stack, {
15
15
  direction: "row",
16
- alignItems: "center",
17
16
  spacing: 2,
17
+ sx: {
18
+ alignItems: "center"
19
+ },
18
20
  children: /* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Skeleton, {
19
21
  variant: "text",
20
22
  sx: {
@@ -29,9 +31,11 @@ function OverviewSkeleton() {
29
31
  variant: "rounded",
30
32
  height: 100
31
33
  }), /* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Typography, {
32
- mt: 2,
33
34
  component: "div",
34
35
  variant: "h4",
36
+ sx: {
37
+ mt: 2
38
+ },
35
39
  children: /* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Skeleton, {})
36
40
  }), /* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Typography, {
37
41
  component: "div",
@@ -24,11 +24,15 @@ function PaymentSkeleton() {
24
24
  variant: "rounded",
25
25
  height: 68
26
26
  }), /* @__PURE__ */(0, _jsxRuntime.jsxs)(_material.Box, {
27
- mt: 1,
27
+ sx: {
28
+ mt: 1
29
+ },
28
30
  children: [/* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Typography, {
29
31
  component: "div",
30
32
  variant: "h4",
31
- mb: -1,
33
+ sx: {
34
+ mb: -1
35
+ },
32
36
  children: /* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Skeleton, {})
33
37
  }), /* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Typography, {
34
38
  component: "div",
@@ -40,7 +44,9 @@ function PaymentSkeleton() {
40
44
  children: [/* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Typography, {
41
45
  component: "div",
42
46
  variant: "h4",
43
- mb: -1,
47
+ sx: {
48
+ mb: -1
49
+ },
44
50
  children: /* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Skeleton, {})
45
51
  }), /* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Typography, {
46
52
  component: "div",
@@ -7,12 +7,5 @@ type Props = {
7
7
  subscriptionId?: string;
8
8
  subscriptions?: any[];
9
9
  };
10
- declare function PaymentSuccess({ mode, message, action, payee, invoiceId, subscriptionId, subscriptions, }: Props): import("react").JSX.Element;
11
- declare namespace PaymentSuccess {
12
- var defaultProps: {
13
- invoiceId: string;
14
- subscriptionId: string;
15
- subscriptions: never[];
16
- };
17
- }
18
- export default PaymentSuccess;
10
+ export default function PaymentSuccess({ mode, message, action, payee, invoiceId, subscriptionId, subscriptions, }: Props): import("react").JSX.Element;
11
+ export {};
@@ -15,9 +15,9 @@ function PaymentSuccess({
15
15
  message,
16
16
  action,
17
17
  payee,
18
- invoiceId,
19
- subscriptionId,
20
- subscriptions
18
+ invoiceId = "",
19
+ subscriptionId = "",
20
+ subscriptions = []
21
21
  }) {
22
22
  const {
23
23
  t
@@ -91,8 +91,8 @@ function PaymentSuccess({
91
91
  }
92
92
  } else if (invoiceId) {
93
93
  next = /* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Typography, {
94
- textAlign: "center",
95
94
  sx: {
95
+ textAlign: "center",
96
96
  mt: 2
97
97
  },
98
98
  children: /* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Link, {
@@ -107,9 +107,9 @@ function PaymentSuccess({
107
107
  in: true,
108
108
  children: /* @__PURE__ */(0, _jsxRuntime.jsxs)(_material.Stack, {
109
109
  direction: "column",
110
- alignItems: "center",
111
- justifyContent: mode === "standalone" ? "center" : "flex-start",
112
110
  sx: {
111
+ alignItems: "center",
112
+ justifyContent: mode === "standalone" ? "center" : "flex-start",
113
113
  height: mode === "standalone" ? "fit-content" : 300
114
114
  },
115
115
  children: [/* @__PURE__ */(0, _jsxRuntime.jsx)(Div, {
@@ -127,14 +127,16 @@ function PaymentSuccess({
127
127
  })
128
128
  }), /* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Typography, {
129
129
  variant: "h5",
130
- color: "text.primary",
131
- mb: 3,
130
+ sx: {
131
+ color: "text.primary",
132
+ mb: 3
133
+ },
132
134
  children: message
133
135
  }), /* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Typography, {
134
136
  variant: "body1",
135
- color: "text.secondary",
136
- textAlign: "center",
137
137
  sx: {
138
+ color: "text.secondary",
139
+ textAlign: "center",
138
140
  fontSize: "14px"
139
141
  },
140
142
  children: t("payment.checkout.completed.tip", {
@@ -144,11 +146,6 @@ function PaymentSuccess({
144
146
  })
145
147
  });
146
148
  }
147
- PaymentSuccess.defaultProps = {
148
- invoiceId: "",
149
- subscriptionId: "",
150
- subscriptions: []
151
- };
152
149
  const Div = (0, _material.styled)("div")`
153
150
  width: 80px;
154
151
  height: 115px;
@@ -16,20 +16,5 @@ type Props = {
16
16
  donationSettings?: DonationSettings;
17
17
  action?: string;
18
18
  };
19
- declare function PaymentSummary({ items, currency, trialInDays, billingThreshold, onUpsell, onDownsell, onApplyCrossSell, onCancelCrossSell, onChangeAmount, checkoutSessionId, crossSellBehavior, showStaking, donationSettings, action, trialEnd, ...rest }: Props): import("react").JSX.Element;
20
- declare namespace PaymentSummary {
21
- var defaultProps: {
22
- onUpsell: any;
23
- onDownsell: any;
24
- onApplyCrossSell: any;
25
- onCancelCrossSell: any;
26
- onChangeAmount: any;
27
- checkoutSessionId: string;
28
- crossSellBehavior: string;
29
- showStaking: boolean;
30
- donationSettings: null;
31
- action: string;
32
- trialEnd: number;
33
- };
34
- }
35
- export default PaymentSummary;
19
+ export default function PaymentSummary({ items, currency, trialInDays, billingThreshold, onUpsell, onDownsell, onApplyCrossSell, onCancelCrossSell, onChangeAmount, checkoutSessionId, crossSellBehavior, showStaking, donationSettings, action, trialEnd, ...rest }: Props): import("react").JSX.Element;
20
+ export {};