@stigg/react-sdk 4.4.0-beta.7 → 4.4.0-beta.9

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 (25) hide show
  1. package/dist/components/checkout/CheckoutContainer.d.ts +2 -1
  2. package/dist/components/checkout/steps/payment/stripe/useSubmit.d.ts +2 -2
  3. package/dist/components/checkout/summary/CheckoutSuccess.d.ts +4 -1
  4. package/dist/components/checkout/summary/CheckoutSummary.d.ts +1 -1
  5. package/dist/components/checkout/summary/components/CheckoutCaptions.d.ts +2 -1
  6. package/dist/components/checkout/textOverrides.d.ts +3 -2
  7. package/dist/react-sdk.cjs.development.js +211 -142
  8. package/dist/react-sdk.cjs.development.js.map +1 -1
  9. package/dist/react-sdk.cjs.production.min.js +1 -1
  10. package/dist/react-sdk.cjs.production.min.js.map +1 -1
  11. package/dist/react-sdk.esm.js +219 -145
  12. package/dist/react-sdk.esm.js.map +1 -1
  13. package/package.json +1 -1
  14. package/src/components/checkout/CheckoutContainer.tsx +3 -0
  15. package/src/components/checkout/components/Button.tsx +17 -22
  16. package/src/components/checkout/hooks/usePlanStepModel.ts +22 -7
  17. package/src/components/checkout/hooks/usePreviewSubscription.ts +2 -1
  18. package/src/components/checkout/steps/addons/CheckoutAddonsStep.tsx +3 -1
  19. package/src/components/checkout/steps/payment/stripe/useSubmit.ts +8 -4
  20. package/src/components/checkout/steps/plan/BillingPeriodPicker.tsx +6 -6
  21. package/src/components/checkout/summary/CheckoutSuccess.tsx +52 -6
  22. package/src/components/checkout/summary/CheckoutSummary.tsx +23 -13
  23. package/src/components/checkout/summary/components/CheckoutCaptions.tsx +30 -29
  24. package/src/components/checkout/textOverrides.ts +10 -8
  25. package/src/stories/Checkout.stories.tsx +5 -4
@@ -22,5 +22,6 @@ export declare type CheckoutContainerProps = {
22
22
  billingAddress: BillingAddress;
23
23
  }) => Promise<void>;
24
24
  disablePromotionCode?: boolean;
25
+ disableSuccessAnimation?: boolean;
25
26
  };
26
- export declare function CheckoutContainer({ onCheckout, onCheckoutCompleted, onChangePlan, onBillingAddressChange, disablePromotionCode, }: CheckoutContainerProps): JSX.Element;
27
+ export declare function CheckoutContainer({ onCheckout, onCheckoutCompleted, onChangePlan, onBillingAddressChange, disablePromotionCode, disableSuccessAnimation, }: CheckoutContainerProps): JSX.Element;
@@ -7,8 +7,8 @@ export declare type HandleSubmitResult = {
7
7
  };
8
8
  export declare type UseSubmitProps = {
9
9
  onSuccess?: () => void;
10
- } & Pick<CheckoutContainerProps, 'onCheckout' | 'onCheckoutCompleted'>;
11
- export declare function useSubmit({ onCheckout, onCheckoutCompleted, onSuccess }: UseSubmitProps): {
10
+ } & Pick<CheckoutContainerProps, 'onCheckout' | 'onCheckoutCompleted' | 'disableSuccessAnimation'>;
11
+ export declare function useSubmit({ onCheckout, onCheckoutCompleted, onSuccess, disableSuccessAnimation }: UseSubmitProps): {
12
12
  handleSubmit: (e: any) => Promise<HandleSubmitResult>;
13
13
  isLoading: boolean;
14
14
  };
@@ -1,3 +1,6 @@
1
1
  /// <reference types="react" />
2
+ import { CheckoutLocalization } from '../textOverrides';
2
3
  export declare const ANIMATION_DURATION = 5000;
3
- export declare function CheckoutSuccess(): JSX.Element;
4
+ export declare function CheckoutSuccess({ checkoutLocalization }: {
5
+ checkoutLocalization: CheckoutLocalization;
6
+ }): JSX.Element;
@@ -13,6 +13,6 @@ export declare const SummaryCard: import("@emotion/styled/macro").StyledComponen
13
13
  }, "slot" | "title" | "ref" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & {
14
14
  theme?: import("@emotion/react").Theme | undefined;
15
15
  }, {}, {}>;
16
- export declare const CheckoutSummary: ({ onCheckout, onCheckoutCompleted, disablePromotionCode, isFreeDowngrade, }: CheckoutContainerProps & {
16
+ export declare const CheckoutSummary: ({ onCheckout, onCheckoutCompleted, disablePromotionCode, disableSuccessAnimation, isFreeDowngrade, }: CheckoutContainerProps & {
17
17
  isFreeDowngrade: boolean;
18
18
  }) => JSX.Element;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { Plan, Subscription, SubscriptionPreview } from '@stigg/js-client-sdk';
2
+ import { BillingPeriod, Plan, Subscription, SubscriptionPreview } from '@stigg/js-client-sdk';
3
3
  import { CheckoutLocalization } from '../../textOverrides';
4
4
  export declare type CheckoutCaptionProps = {
5
5
  subscriptionPreview?: SubscriptionPreview | null;
@@ -7,5 +7,6 @@ export declare type CheckoutCaptionProps = {
7
7
  activeSubscription?: Subscription | null;
8
8
  plan?: Plan;
9
9
  checkoutLocalization: CheckoutLocalization;
10
+ billingPeriod: BillingPeriod;
10
11
  };
11
12
  export declare function CheckoutCaptions(props: CheckoutCaptionProps): JSX.Element;
@@ -20,9 +20,9 @@ export declare type CheckoutLocalization = {
20
20
  }) => string);
21
21
  checkoutButton: {
22
22
  nextText: string;
23
- downgradeText: string;
23
+ updateText: string;
24
+ downgradeToFreeText: string;
24
25
  upgradeText: string;
25
- purchaseText: string;
26
26
  };
27
27
  appliedCreditsTitle: string;
28
28
  taxTitle: (params: {
@@ -31,5 +31,6 @@ export declare type CheckoutLocalization = {
31
31
  downgradeToFreeAlertText: (params: {
32
32
  plan: Plan;
33
33
  }) => string;
34
+ checkoutSuccessText: string;
34
35
  };
35
36
  export declare function getResolvedCheckoutLocalize(localizeOverride?: DeepPartial<CheckoutLocalization>): CheckoutLocalization;