@stigg/react-sdk 4.4.0-beta.1 → 4.4.0-beta.11

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 (94) hide show
  1. package/dist/components/checkout/Checkout.d.ts +1 -1
  2. package/dist/components/checkout/CheckoutContainer.d.ts +7 -2
  3. package/dist/components/checkout/CheckoutProvider.d.ts +3 -1
  4. package/dist/components/checkout/components/Button.d.ts +0 -1
  5. package/dist/components/checkout/components/ChangePlanButton.d.ts +8 -0
  6. package/dist/components/checkout/components/DowngradeToFreeContainer.d.ts +28 -0
  7. package/dist/components/checkout/components/StyledArrow.d.ts +5 -0
  8. package/dist/components/checkout/hooks/useCheckoutModel.d.ts +2 -0
  9. package/dist/components/checkout/hooks/usePaymentStepModel.d.ts +8 -2
  10. package/dist/components/checkout/hooks/usePreviewSubscription.d.ts +8 -1
  11. package/dist/components/checkout/hooks/useProgressBarModel.d.ts +3 -0
  12. package/dist/components/checkout/hooks/useSubscriptionModel.d.ts +2 -1
  13. package/dist/components/checkout/index.d.ts +2 -0
  14. package/dist/components/checkout/progressBar/CheckoutProgressBar.style.d.ts +3 -2
  15. package/dist/components/checkout/steps/payment/PaymentMethods.d.ts +3 -2
  16. package/dist/components/checkout/steps/payment/PaymentStep.d.ts +2 -1
  17. package/dist/components/checkout/steps/payment/stripe/StripePaymentForm.d.ts +2 -1
  18. package/dist/components/checkout/steps/payment/stripe/stripe.utils.d.ts +4 -0
  19. package/dist/components/checkout/steps/payment/stripe/useSubmit.d.ts +4 -3
  20. package/dist/components/checkout/steps/plan/BillingPeriodPicker.style.d.ts +1 -0
  21. package/dist/components/checkout/steps/plan/CheckoutChargeList.d.ts +6 -1
  22. package/dist/components/checkout/summary/CheckoutSuccess.d.ts +4 -1
  23. package/dist/components/checkout/summary/CheckoutSummary.d.ts +3 -1
  24. package/dist/components/checkout/summary/components/CheckoutCaptions.d.ts +2 -1
  25. package/dist/components/checkout/summary/components/LineItems.d.ts +8 -8
  26. package/dist/components/checkout/textOverrides.d.ts +28 -3
  27. package/dist/components/checkout/theme.d.ts +0 -1
  28. package/dist/components/checkout/types.d.ts +7 -0
  29. package/dist/components/customerPortal/subscriptionOverview/subscriptionView/SubscriptionView.style.d.ts +1 -1
  30. package/dist/components/paywall/paywallTextOverrides.d.ts +4 -0
  31. package/dist/components/utils/getPaidPriceText.d.ts +3 -1
  32. package/dist/react-sdk.cjs.development.js +1234 -599
  33. package/dist/react-sdk.cjs.development.js.map +1 -1
  34. package/dist/react-sdk.cjs.production.min.js +1 -1
  35. package/dist/react-sdk.cjs.production.min.js.map +1 -1
  36. package/dist/react-sdk.esm.js +1273 -622
  37. package/dist/react-sdk.esm.js.map +1 -1
  38. package/dist/theme/getResolvedTheme.d.ts +1 -0
  39. package/dist/theme/types.d.ts +1 -0
  40. package/package.json +2 -2
  41. package/src/assets/payment-method.svg +3 -10
  42. package/src/components/checkout/Checkout.tsx +2 -1
  43. package/src/components/checkout/CheckoutContainer.style.ts +1 -0
  44. package/src/components/checkout/CheckoutContainer.tsx +59 -28
  45. package/src/components/checkout/CheckoutProvider.tsx +18 -18
  46. package/src/components/checkout/components/Button.tsx +19 -35
  47. package/src/components/checkout/components/ChangePlanButton.tsx +32 -0
  48. package/src/components/checkout/components/DowngradeToFreeContainer.tsx +115 -0
  49. package/src/components/checkout/components/Skeletons.style.ts +4 -1
  50. package/src/components/checkout/components/StyledArrow.tsx +9 -0
  51. package/src/components/checkout/hooks/useCheckoutModel.ts +12 -2
  52. package/src/components/checkout/hooks/usePaymentStepModel.ts +22 -3
  53. package/src/components/checkout/hooks/usePlanStepModel.ts +25 -10
  54. package/src/components/checkout/hooks/usePreviewSubscription.ts +112 -40
  55. package/src/components/checkout/hooks/useProgressBarModel.ts +18 -0
  56. package/src/components/checkout/hooks/useSubscriptionModel.ts +8 -2
  57. package/src/components/checkout/hooks/useSubscriptionState.ts +2 -1
  58. package/src/components/checkout/index.ts +2 -0
  59. package/src/components/checkout/planHeader/PlanHeader.tsx +19 -34
  60. package/src/components/checkout/progressBar/CheckoutProgressBar.style.ts +6 -3
  61. package/src/components/checkout/progressBar/CheckoutProgressBar.tsx +13 -9
  62. package/src/components/checkout/promotionCode/AddPromotionCode.tsx +8 -8
  63. package/src/components/checkout/steps/addons/CheckoutAddonsStep.tsx +58 -11
  64. package/src/components/checkout/steps/payment/PaymentMethods.style.ts +1 -0
  65. package/src/components/checkout/steps/payment/PaymentMethods.tsx +13 -6
  66. package/src/components/checkout/steps/payment/PaymentStep.tsx +3 -1
  67. package/src/components/checkout/steps/payment/stripe/StripePaymentForm.tsx +35 -4
  68. package/src/components/checkout/steps/payment/stripe/stripe.utils.ts +4 -3
  69. package/src/components/checkout/steps/payment/stripe/useSubmit.ts +61 -48
  70. package/src/components/checkout/steps/plan/BillingPeriodPicker.style.tsx +27 -6
  71. package/src/components/checkout/steps/plan/BillingPeriodPicker.tsx +26 -5
  72. package/src/components/checkout/steps/plan/CheckoutChargeList.tsx +62 -12
  73. package/src/components/checkout/summary/CheckoutSuccess.tsx +52 -6
  74. package/src/components/checkout/summary/CheckoutSummary.tsx +74 -48
  75. package/src/components/checkout/summary/components/CheckoutCaptions.tsx +30 -29
  76. package/src/components/checkout/summary/components/LineItems.tsx +18 -33
  77. package/src/components/checkout/textOverrides.ts +33 -13
  78. package/src/components/checkout/theme.ts +0 -4
  79. package/src/components/checkout/types.ts +9 -0
  80. package/src/components/common/Icon.tsx +4 -6
  81. package/src/components/common/mapExternalTheme.ts +1 -2
  82. package/src/components/paywall/PlanPrice.tsx +10 -2
  83. package/src/components/paywall/paywallTextOverrides.ts +3 -0
  84. package/src/components/utils/getPaidPriceText.ts +8 -2
  85. package/src/components/utils/getPlanPrice.ts +1 -1
  86. package/src/stories/Checkout.stories.tsx +6 -5
  87. package/src/theme/Theme.tsx +10 -1
  88. package/src/theme/getResolvedTheme.ts +1 -0
  89. package/src/theme/types.ts +1 -0
  90. package/dist/components/checkout/planHeader/PlanHeader.style.d.ts +0 -25
  91. package/dist/components/checkout/steps/surprise/SurpriseStep.d.ts +0 -2
  92. package/src/assets/nyancat.svg +0 -634
  93. package/src/components/checkout/planHeader/PlanHeader.style.tsx +0 -23
  94. package/src/components/checkout/steps/surprise/SurpriseStep.tsx +0 -27
@@ -1,5 +1,6 @@
1
1
  import { BillingPeriod, PaywallCalculatedPricePoint, Price, PriceTierFragment } from '@stigg/js-client-sdk';
2
2
  import { PlanPriceText } from './getPlanPrice';
3
+ import { PaywallLocalization } from '../paywall';
3
4
  declare type GetPaidPriceTextParams = {
4
5
  planPrices: Price[];
5
6
  paywallCalculatedPrice?: PaywallCalculatedPricePoint;
@@ -7,6 +8,7 @@ declare type GetPaidPriceTextParams = {
7
8
  locale: string;
8
9
  shouldShowMonthlyPriceAmount: boolean;
9
10
  selectedTierByFeature: Record<string, PriceTierFragment>;
11
+ paywallLocale: PaywallLocalization;
10
12
  };
11
- export declare function getPaidPriceText({ planPrices, paywallCalculatedPrice, selectedBillingPeriod, locale, shouldShowMonthlyPriceAmount, selectedTierByFeature, }: GetPaidPriceTextParams): PlanPriceText;
13
+ export declare function getPaidPriceText({ planPrices, paywallCalculatedPrice, selectedBillingPeriod, locale, shouldShowMonthlyPriceAmount, selectedTierByFeature, paywallLocale, }: GetPaidPriceTextParams): PlanPriceText;
12
14
  export {};