@stigg/react-sdk 4.4.0-beta.4 → 4.4.0-beta.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 (34) hide show
  1. package/dist/components/checkout/components/Button.d.ts +0 -1
  2. package/dist/components/checkout/components/ChangePlanButton.d.ts +8 -0
  3. package/dist/components/checkout/components/DowngradeToFreeContainer.d.ts +6 -2
  4. package/dist/components/checkout/hooks/usePreviewSubscription.d.ts +3 -0
  5. package/dist/components/checkout/progressBar/CheckoutProgressBar.style.d.ts +2 -2
  6. package/dist/components/checkout/steps/plan/BillingPeriodPicker.style.d.ts +1 -0
  7. package/dist/components/checkout/steps/plan/CheckoutChargeList.d.ts +2 -1
  8. package/dist/components/customerPortal/subscriptionOverview/subscriptionView/SubscriptionView.style.d.ts +1 -1
  9. package/dist/react-sdk.cjs.development.js +295 -142
  10. package/dist/react-sdk.cjs.development.js.map +1 -1
  11. package/dist/react-sdk.cjs.production.min.js +1 -1
  12. package/dist/react-sdk.cjs.production.min.js.map +1 -1
  13. package/dist/react-sdk.esm.js +308 -146
  14. package/dist/react-sdk.esm.js.map +1 -1
  15. package/package.json +1 -1
  16. package/src/components/checkout/CheckoutContainer.style.ts +1 -0
  17. package/src/components/checkout/CheckoutContainer.tsx +2 -0
  18. package/src/components/checkout/components/Button.tsx +3 -14
  19. package/src/components/checkout/components/ChangePlanButton.tsx +32 -0
  20. package/src/components/checkout/components/DowngradeToFreeContainer.tsx +27 -7
  21. package/src/components/checkout/components/Skeletons.style.ts +4 -1
  22. package/src/components/checkout/hooks/usePreviewSubscription.ts +9 -1
  23. package/src/components/checkout/planHeader/PlanHeader.style.tsx +1 -1
  24. package/src/components/checkout/planHeader/PlanHeader.tsx +7 -15
  25. package/src/components/checkout/progressBar/CheckoutProgressBar.style.ts +3 -1
  26. package/src/components/checkout/progressBar/CheckoutProgressBar.tsx +5 -2
  27. package/src/components/checkout/promotionCode/AddPromotionCode.tsx +6 -7
  28. package/src/components/checkout/steps/addons/CheckoutAddonsStep.tsx +47 -8
  29. package/src/components/checkout/steps/plan/BillingPeriodPicker.style.tsx +26 -6
  30. package/src/components/checkout/steps/plan/BillingPeriodPicker.tsx +28 -7
  31. package/src/components/checkout/steps/plan/CheckoutChargeList.tsx +16 -16
  32. package/src/components/checkout/summary/CheckoutSummary.tsx +7 -7
  33. package/src/components/checkout/summary/components/CheckoutCaptions.tsx +2 -2
  34. package/src/components/checkout/textOverrides.ts +1 -1
@@ -58,11 +58,11 @@ const ScheduledUpdatesCaption = ({
58
58
  };
59
59
 
60
60
  const ChargeDueTodayCaption = ({ subscriptionPreview, plan, isFetchingSubscriptionPreview }: CheckoutCaptionProps) => {
61
- if (!subscriptionPreview?.total) {
61
+ if (!subscriptionPreview?.total || subscriptionPreview.total.amount <= 0) {
62
62
  return null;
63
63
  }
64
64
 
65
- const total = currencyPriceFormatter(subscriptionPreview?.total);
65
+ const total = currencyPriceFormatter(subscriptionPreview.total);
66
66
  const usedCredits = !!subscriptionPreview.credits?.used;
67
67
 
68
68
  return (
@@ -56,7 +56,7 @@ export function getResolvedCheckoutLocalize(
56
56
  },
57
57
  appliedCreditsTitle: 'Applied credits',
58
58
  taxTitle: ({ taxDetails }) => `Tax (${taxDetails?.percentage}%)`,
59
- downgradeToFreeAlertText: () => `We’re sorry to see you downgrade your plan 😞`,
59
+ downgradeToFreeAlertText: () => `We’re sorry to see you cancel your paid subscription 😭`,
60
60
  };
61
61
 
62
62
  return merge(checkoutDefaultLocalization, localizeOverride);