@stigg/react-sdk 4.4.4 → 4.4.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 (44) hide show
  1. package/dist/components/checkout/CheckoutProvider.d.ts +2 -2
  2. package/dist/components/checkout/components/ChangePlanButton.d.ts +1 -1
  3. package/dist/components/checkout/components/DowngradeToFreeContainer.d.ts +1 -1
  4. package/dist/components/checkout/{textOverrides.d.ts → configurations/textOverrides.d.ts} +1 -1
  5. package/dist/components/checkout/{theme.d.ts → configurations/theme.d.ts} +2 -2
  6. package/dist/components/checkout/configurations/typography.d.ts +2 -0
  7. package/dist/components/checkout/index.d.ts +2 -2
  8. package/dist/components/checkout/promotionCode/AddPromotionCodeButton.d.ts +1 -1
  9. package/dist/components/checkout/promotionCode/PromotionCodeSection.d.ts +1 -1
  10. package/dist/components/checkout/steps/payment/PaymentMethods.d.ts +1 -1
  11. package/dist/components/checkout/steps/plan/BillingPeriodPicker.d.ts +1 -1
  12. package/dist/components/checkout/summary/CheckoutSuccess.d.ts +1 -1
  13. package/dist/components/checkout/summary/components/CheckoutCaptions.d.ts +1 -1
  14. package/dist/components/checkout/summary/components/LineItems.d.ts +1 -1
  15. package/dist/components/common/TiersSelectContainer.d.ts +2 -1
  16. package/dist/components/common/mapExternalTheme.d.ts +2 -1
  17. package/dist/components/paywall/PlanPrice.d.ts +2 -2
  18. package/dist/react-sdk.cjs.development.js +70 -51
  19. package/dist/react-sdk.cjs.development.js.map +1 -1
  20. package/dist/react-sdk.cjs.production.min.js +1 -1
  21. package/dist/react-sdk.cjs.production.min.js.map +1 -1
  22. package/dist/react-sdk.esm.js +70 -51
  23. package/dist/react-sdk.esm.js.map +1 -1
  24. package/package.json +1 -1
  25. package/src/components/checkout/CheckoutProvider.tsx +6 -5
  26. package/src/components/checkout/components/ChangePlanButton.tsx +4 -4
  27. package/src/components/checkout/components/DowngradeToFreeContainer.tsx +1 -1
  28. package/src/components/checkout/{textOverrides.ts → configurations/textOverrides.ts} +2 -2
  29. package/src/components/checkout/{theme.ts → configurations/theme.ts} +2 -2
  30. package/src/components/checkout/configurations/typography.ts +20 -0
  31. package/src/components/checkout/index.ts +2 -2
  32. package/src/components/checkout/planHeader/PlanHeader.tsx +1 -3
  33. package/src/components/checkout/promotionCode/AddPromotionCodeButton.tsx +3 -2
  34. package/src/components/checkout/promotionCode/PromotionCodeSection.tsx +1 -1
  35. package/src/components/checkout/steps/addons/CheckoutAddonsStep.tsx +1 -1
  36. package/src/components/checkout/steps/payment/PaymentMethods.tsx +1 -1
  37. package/src/components/checkout/steps/plan/BillingPeriodPicker.tsx +2 -2
  38. package/src/components/checkout/summary/CheckoutSuccess.tsx +1 -1
  39. package/src/components/checkout/summary/CheckoutSummary.tsx +10 -6
  40. package/src/components/checkout/summary/components/CheckoutCaptions.tsx +2 -2
  41. package/src/components/checkout/summary/components/LineItems.tsx +1 -1
  42. package/src/components/common/TiersSelectContainer.tsx +3 -1
  43. package/src/components/common/mapExternalTheme.ts +14 -10
  44. package/src/components/paywall/PlanPrice.tsx +12 -17
@@ -2,8 +2,8 @@ import React from 'react';
2
2
  import { BillableFeature, BillingPeriod, GetCheckoutStateResults } from '@stigg/js-client-sdk';
3
3
  import { DeepPartial } from '../../types';
4
4
  import { AddonsStepState, PaymentStepState, PlanStepState, ProgressBarState, WidgetState } from './hooks';
5
- import { CheckoutLocalization } from './textOverrides';
6
- import { CheckoutTheme } from './theme';
5
+ import { CheckoutLocalization } from './configurations/textOverrides';
6
+ import { CheckoutTheme } from './configurations/theme';
7
7
  import { StiggTheme } from '../../theme/types';
8
8
  import { BillingInformation, MockCheckoutStateCallback } from './types';
9
9
  export interface CheckoutContextState {
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
- import { CheckoutLocalization } from '../textOverrides';
3
2
  import { ButtonProps } from '@mui/material/Button';
3
+ import { CheckoutLocalization } from '../configurations/textOverrides';
4
4
  export declare const ChangePlanButton: ({ onClick, checkoutLocalization, size, }: {
5
5
  onClick: () => void;
6
6
  checkoutLocalization: CheckoutLocalization;
@@ -1,7 +1,7 @@
1
1
  /// <reference types="@emotion/styled/macro" />
2
2
  import React from 'react';
3
3
  import { CheckoutStatePlan, Subscription } from '@stigg/js-client-sdk';
4
- import { CheckoutLocalization } from '../textOverrides';
4
+ import { CheckoutLocalization } from '../configurations/textOverrides';
5
5
  import { CheckoutContainerProps } from '../CheckoutContainer';
6
6
  export declare const DowngradeToFreePlanBox: import("@emotion/styled/macro").StyledComponent<import("@mui/system").SystemProps<import("@mui/material").Theme> & {
7
7
  children?: React.ReactNode;
@@ -1,5 +1,5 @@
1
1
  import { BillingPeriod, Plan, SubscriptionPreviewDiscount, SubscriptionPreviewTaxDetails } from '@stigg/js-client-sdk';
2
- import { DeepPartial } from '../../types';
2
+ import { DeepPartial } from '../../../types';
3
3
  export declare type CheckoutLocalization = {
4
4
  changePlan: string;
5
5
  billingPeriodsTitle: string;
@@ -1,6 +1,6 @@
1
1
  import { CheckoutConfiguration } from '@stigg/js-client-sdk';
2
- import { StiggTheme } from '../../theme/types';
3
- import { DeepPartial } from '../../types';
2
+ import { StiggTheme } from '../../../theme/types';
3
+ import { DeepPartial } from '../../../types';
4
4
  export declare type CheckoutTheme = {
5
5
  primary: string;
6
6
  textColor: string;
@@ -0,0 +1,2 @@
1
+ import { TypographyConfiguration } from '@stigg/js-client-sdk';
2
+ export declare const defaultCheckoutTypography: TypographyConfiguration;
@@ -1,6 +1,6 @@
1
- export { CheckoutTheme } from './theme';
1
+ export { CheckoutTheme } from './configurations/theme';
2
2
  export { OnCheckoutCompletedParams, OnCheckoutParams, CheckoutResult, CheckoutContainerProps, } from './CheckoutContainer';
3
3
  export { CheckoutProviderProps } from './CheckoutProvider';
4
- export { CheckoutLocalization } from './textOverrides';
4
+ export { CheckoutLocalization } from './configurations/textOverrides';
5
5
  export { Checkout, CheckoutProps } from './Checkout';
6
6
  export * from './types';
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { CheckoutLocalization } from '../textOverrides';
2
+ import { CheckoutLocalization } from '../configurations/textOverrides';
3
3
  export declare type AddPromotionCodeButtonProps = {
4
4
  onAddClick: () => void;
5
5
  checkoutLocalization: CheckoutLocalization;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { CheckoutLocalization } from '../textOverrides';
2
+ import { CheckoutLocalization } from '../configurations/textOverrides';
3
3
  import { MockCheckoutPreviewCallback } from '../types';
4
4
  export declare type PromotionCodeSectionProps = {
5
5
  disabled: boolean;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { Customer } from '@stigg/js-client-sdk';
3
3
  import { Icons } from '../../../common/Icon';
4
- import { CheckoutLocalization } from '../../textOverrides';
4
+ import { CheckoutLocalization } from '../../configurations/textOverrides';
5
5
  import { CheckoutContainerProps } from '../../CheckoutContainer';
6
6
  export declare type PaymentMethodLayoutProps = {
7
7
  checked: boolean;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { Plan } from '@stigg/js-client-sdk';
3
- import { CheckoutLocalization } from '../../textOverrides';
3
+ import { CheckoutLocalization } from '../../configurations/textOverrides';
4
4
  declare type BillingPeriodPickerProps = {
5
5
  plan?: Plan;
6
6
  checkoutLocalization: CheckoutLocalization;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { CheckoutLocalization } from '../textOverrides';
2
+ import { CheckoutLocalization } from '../configurations/textOverrides';
3
3
  export declare const ANIMATION_DURATION = 5000;
4
4
  export declare function CheckoutSuccess({ checkoutLocalization }: {
5
5
  checkoutLocalization: CheckoutLocalization;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { BillingPeriod, Plan, Subscription, SubscriptionPreviewV2 } from '@stigg/js-client-sdk';
3
- import { CheckoutLocalization } from '../../textOverrides';
3
+ import { CheckoutLocalization } from '../../configurations/textOverrides';
4
4
  export declare type CheckoutCaptionProps = {
5
5
  subscriptionPreview?: SubscriptionPreviewV2 | null;
6
6
  isFetchingSubscriptionPreview: boolean;
@@ -1,7 +1,7 @@
1
1
  /// <reference types="@emotion/styled/macro" />
2
2
  import React from 'react';
3
3
  import { Price, SubscriptionPreviewV2 } from '@stigg/js-client-sdk';
4
- import { CheckoutLocalization } from '../../textOverrides';
4
+ import { CheckoutLocalization } from '../../configurations/textOverrides';
5
5
  export declare const LineItemContainer: import("@emotion/styled/macro").StyledComponent<{
6
6
  theme?: import("@emotion/react").Theme | undefined;
7
7
  as?: "symbol" | "object" | "a" | "abbr" | "address" | "area" | "article" | "aside" | "audio" | "b" | "base" | "bdi" | "bdo" | "big" | "blockquote" | "body" | "br" | "button" | "canvas" | "caption" | "cite" | "code" | "col" | "colgroup" | "data" | "datalist" | "dd" | "del" | "details" | "dfn" | "dialog" | "div" | "dl" | "dt" | "em" | "embed" | "fieldset" | "figcaption" | "figure" | "footer" | "form" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "head" | "header" | "hgroup" | "hr" | "html" | "i" | "iframe" | "img" | "input" | "ins" | "kbd" | "keygen" | "label" | "legend" | "li" | "link" | "main" | "map" | "mark" | "menu" | "menuitem" | "meta" | "meter" | "nav" | "noindex" | "noscript" | "ol" | "optgroup" | "option" | "output" | "p" | "param" | "picture" | "pre" | "progress" | "q" | "rp" | "rt" | "ruby" | "s" | "samp" | "slot" | "script" | "section" | "select" | "small" | "source" | "span" | "strong" | "style" | "sub" | "summary" | "sup" | "table" | "template" | "tbody" | "td" | "textarea" | "tfoot" | "th" | "thead" | "time" | "title" | "tr" | "track" | "u" | "ul" | "var" | "video" | "wbr" | "webview" | "svg" | "animate" | "animateMotion" | "animateTransform" | "circle" | "clipPath" | "defs" | "desc" | "ellipse" | "feBlend" | "feColorMatrix" | "feComponentTransfer" | "feComposite" | "feConvolveMatrix" | "feDiffuseLighting" | "feDisplacementMap" | "feDistantLight" | "feDropShadow" | "feFlood" | "feFuncA" | "feFuncB" | "feFuncG" | "feFuncR" | "feGaussianBlur" | "feImage" | "feMerge" | "feMergeNode" | "feMorphology" | "feOffset" | "fePointLight" | "feSpecularLighting" | "feSpotLight" | "feTile" | "feTurbulence" | "filter" | "foreignObject" | "g" | "image" | "line" | "linearGradient" | "marker" | "mask" | "metadata" | "mpath" | "path" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "stop" | "switch" | "text" | "textPath" | "tspan" | "use" | "view" | React.ComponentClass<any, any> | React.FunctionComponent<any> | undefined;
@@ -1,8 +1,9 @@
1
1
  /// <reference types="react" />
2
2
  import { PriceTierFragment } from '@stigg/js-client-sdk';
3
- export declare function TiersSelectContainer({ componentId, tiers, selectedTier, handleTierChange, }: {
3
+ export declare function TiersSelectContainer({ componentId, tiers, tierUnits, selectedTier, handleTierChange, }: {
4
4
  componentId: string;
5
5
  tiers?: PriceTierFragment[] | null;
6
+ tierUnits?: string;
6
7
  selectedTier?: PriceTierFragment;
7
8
  handleTierChange: (tier: PriceTierFragment) => void;
8
9
  }): JSX.Element;
@@ -1,5 +1,6 @@
1
- import { CheckoutConfiguration, CustomerPortalConfiguration, PaywallConfiguration } from '@stigg/js-client-sdk';
1
+ import { CheckoutConfiguration, CustomerPortalConfiguration, PaywallConfiguration, TypographyConfiguration } from '@stigg/js-client-sdk';
2
2
  import { CustomizedTheme } from '../../theme/Theme';
3
+ export declare function mapTypography(typography?: TypographyConfiguration | null, defaultTypography?: TypographyConfiguration | null): CustomizedTheme['typography'];
3
4
  export declare function mapCustomerPortalConfiguration(configuration: CustomerPortalConfiguration): CustomizedTheme;
4
5
  export declare function mapPaywallConfiguration(paywallConfiguration: PaywallConfiguration): CustomizedTheme;
5
6
  export declare function mapCheckoutConfiguration(configuration: CheckoutConfiguration): CustomizedTheme;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { BillingPeriod, PriceTierFragment } from '@stigg/js-client-sdk';
3
3
  import { PaywallPlan } from './types';
4
4
  import { PaywallLocalization } from './paywallTextOverrides';
@@ -8,7 +8,7 @@ export declare const PlanPrice: ({ showStartingAt, withUnitPriceRow, withStartin
8
8
  withStartingAtRow: boolean;
9
9
  withTiersRow: boolean;
10
10
  selectedTierByFeature: Record<string, PriceTierFragment>;
11
- setSelectedTierByFeature: (selectedTierByFeature: Record<string, PriceTierFragment>) => void;
11
+ setSelectedTierByFeature: React.Dispatch<React.SetStateAction<Record<string, PriceTierFragment>>>;
12
12
  plan: PaywallPlan;
13
13
  billingPeriod: BillingPeriod;
14
14
  paywallLocale: PaywallLocalization;