@stigg/react-sdk 4.3.0-beta.0 → 4.3.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.
- package/README.md +1 -1
- package/dist/components/common/Icon.d.ts +2 -3
- package/dist/components/common/PoweredByStigg.d.ts +1 -1
- package/dist/components/common/customIcons.d.ts +5 -17
- package/dist/components/common/mapExternalTheme.d.ts +0 -2
- package/dist/components/customerPortal/subscriptionOverview/tabs/SubscriptionTabs.d.ts +1 -1
- package/dist/components/{common/TiersSelectContainer.d.ts → paywall/TiersLayout.d.ts} +3 -2
- package/dist/components/paywall/paywallTextOverrides.d.ts +2 -0
- package/dist/components/{utils/priceTierUtils.d.ts → paywall/planPriceTier.d.ts} +1 -3
- package/dist/components/utils/calculateDiscountRate.d.ts +0 -1
- package/dist/components/utils/currencyUtils.d.ts +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/react-sdk.cjs.development.js +201 -3447
- package/dist/react-sdk.cjs.development.js.map +1 -1
- package/dist/react-sdk.cjs.production.min.js +1 -1
- package/dist/react-sdk.cjs.production.min.js.map +1 -1
- package/dist/react-sdk.esm.js +207 -3590
- package/dist/react-sdk.esm.js.map +1 -1
- package/dist/theme/getResolvedTheme.d.ts +0 -1
- package/dist/theme/types.d.ts +0 -1
- package/package.json +22 -11
- package/src/components/StiggProvider.tsx +2 -0
- package/src/components/common/Icon.tsx +22 -17
- package/src/components/common/PoweredByStigg.tsx +1 -1
- package/src/components/common/Typography.tsx +1 -11
- package/src/components/common/customIcons.ts +28 -17
- package/src/components/common/mapExternalTheme.ts +0 -6
- package/src/components/customerPortal/subscriptionOverview/tabs/SubscriptionTabs.tsx +12 -6
- package/src/components/paywall/Paywall.tsx +1 -1
- package/src/components/paywall/PlanOffering.tsx +1 -1
- package/src/components/paywall/PlanOfferingButton.tsx +1 -1
- package/src/components/paywall/PlanPrice.tsx +13 -5
- package/src/components/{common/TiersSelectContainer.tsx → paywall/TiersLayout.tsx} +7 -8
- package/src/components/paywall/paywallTextOverrides.ts +1 -0
- package/src/components/{utils/priceTierUtils.ts → paywall/planPriceTier.ts} +3 -25
- package/src/components/paywall/utils/calculateUnitQuantityText.ts +4 -9
- package/src/components/utils/calculateDiscountRate.ts +1 -1
- package/src/components/utils/currencyUtils.ts +1 -1
- package/src/components/utils/getPaidPriceText.ts +2 -2
- package/src/index.ts +0 -1
- package/src/stories/CustomerPortal.stories.tsx +11 -11
- package/src/stories/Paywall.stories.tsx +4 -6
- package/src/stories/baseArgs.ts +1 -1
- package/src/theme/Fonts.tsx +1 -1
- package/src/theme/Theme.tsx +7 -9
- package/src/theme/getResolvedTheme.ts +0 -1
- package/src/theme/types.ts +0 -1
- package/dist/components/checkout/Checkout.d.ts +0 -5
- package/dist/components/checkout/CheckoutContainer.d.ts +0 -22
- package/dist/components/checkout/CheckoutContainer.style.d.ts +0 -29
- package/dist/components/checkout/CheckoutProvider.d.ts +0 -33
- package/dist/components/checkout/CheckoutSummary.d.ts +0 -9
- package/dist/components/checkout/components/Button.d.ts +0 -6
- package/dist/components/checkout/components/InputField.d.ts +0 -8
- package/dist/components/checkout/components/index.d.ts +0 -2
- package/dist/components/checkout/formatting.d.ts +0 -2
- package/dist/components/checkout/hooks/index.d.ts +0 -8
- package/dist/components/checkout/hooks/useAddonsStepModel.d.ts +0 -21
- package/dist/components/checkout/hooks/useCheckoutModel.d.ts +0 -9
- package/dist/components/checkout/hooks/useCouponModel.d.ts +0 -7
- package/dist/components/checkout/hooks/useLoadCheckout.d.ts +0 -13
- package/dist/components/checkout/hooks/usePaymentStepModel.d.ts +0 -16
- package/dist/components/checkout/hooks/usePlanStepModel.d.ts +0 -23
- package/dist/components/checkout/hooks/usePreviewSubscription.d.ts +0 -13
- package/dist/components/checkout/hooks/useProgressBarModel.d.ts +0 -26
- package/dist/components/checkout/hooks/useSubscriptionModel.d.ts +0 -5
- package/dist/components/checkout/hooks/useSubscriptionState.d.ts +0 -2
- package/dist/components/checkout/index.d.ts +0 -3
- package/dist/components/checkout/planHeader/PlanHeader.d.ts +0 -7
- package/dist/components/checkout/planHeader/PlanHeader.style.d.ts +0 -25
- package/dist/components/checkout/planHeader/index.d.ts +0 -1
- package/dist/components/checkout/progressBar/CheckoutProgressBar.d.ts +0 -2
- package/dist/components/checkout/progressBar/CheckoutProgressBar.style.d.ts +0 -45
- package/dist/components/checkout/promotionCode/AddPromotionCode.d.ts +0 -5
- package/dist/components/checkout/promotionCode/AddPromotionCodeButton.d.ts +0 -7
- package/dist/components/checkout/promotionCode/AppliedPromotionCode.d.ts +0 -6
- package/dist/components/checkout/promotionCode/PromotionCodeSection.d.ts +0 -5
- package/dist/components/checkout/promotionCode/index.d.ts +0 -1
- package/dist/components/checkout/steps/addons/CheckoutAddonsStep.d.ts +0 -2
- package/dist/components/checkout/steps/addons/CheckoutAddonsStep.style.d.ts +0 -93
- package/dist/components/checkout/steps/addons/addon.utils.d.ts +0 -15
- package/dist/components/checkout/steps/addons/index.d.ts +0 -1
- package/dist/components/checkout/steps/payment/PaymentMethods.d.ts +0 -19
- package/dist/components/checkout/steps/payment/PaymentMethods.style.d.ts +0 -113
- package/dist/components/checkout/steps/payment/PaymentStep.d.ts +0 -2
- package/dist/components/checkout/steps/payment/index.d.ts +0 -1
- package/dist/components/checkout/steps/payment/stripe/StripePaymentForm.d.ts +0 -2
- package/dist/components/checkout/steps/payment/stripe/index.d.ts +0 -3
- package/dist/components/checkout/steps/payment/stripe/stripe.utils.d.ts +0 -33
- package/dist/components/checkout/steps/payment/stripe/useStripeIntegration.d.ts +0 -5
- package/dist/components/checkout/steps/payment/stripe/useSubmit.d.ts +0 -10
- package/dist/components/checkout/steps/plan/BillingPeriodPicker.d.ts +0 -9
- package/dist/components/checkout/steps/plan/BillingPeriodPicker.style.d.ts +0 -52
- package/dist/components/checkout/steps/plan/CheckoutChargeList.d.ts +0 -16
- package/dist/components/checkout/steps/plan/CheckoutPlanStep.d.ts +0 -4
- package/dist/components/checkout/steps/plan/CheckoutPlanStep.style.d.ts +0 -12
- package/dist/components/checkout/steps/plan/index.d.ts +0 -1
- package/dist/components/checkout/steps/surprise/SurpriseStep.d.ts +0 -2
- package/dist/components/checkout/textOverrides.d.ts +0 -28
- package/dist/components/checkout/theme.d.ts +0 -8
- package/dist/components/checkout/types.d.ts +0 -7
- package/dist/components/hooks/useChargeSort.d.ts +0 -3
- package/dist/components/utils/priceUtils.d.ts +0 -2
- package/dist/stories/Checkout.stories.d.ts +0 -3
- package/src/assets/arrow-forward.svg +0 -3
- package/src/assets/arrow-right.svg +0 -6
- package/src/assets/close.svg +0 -3
- package/src/assets/nyancat.svg +0 -634
- package/src/assets/outlined-checked-circle.svg +0 -6
- package/src/assets/outlined-circle.svg +0 -3
- package/src/assets/payment-method.svg +0 -11
- package/src/assets/plus-icon.svg +0 -6
- package/src/assets/trash.svg +0 -8
- package/src/components/checkout/Checkout.tsx +0 -30
- package/src/components/checkout/CheckoutContainer.style.ts +0 -34
- package/src/components/checkout/CheckoutContainer.tsx +0 -92
- package/src/components/checkout/CheckoutProvider.tsx +0 -135
- package/src/components/checkout/CheckoutSummary.tsx +0 -361
- package/src/components/checkout/components/Button.tsx +0 -30
- package/src/components/checkout/components/InputField.tsx +0 -23
- package/src/components/checkout/components/index.ts +0 -2
- package/src/components/checkout/formatting.ts +0 -12
- package/src/components/checkout/hooks/index.ts +0 -8
- package/src/components/checkout/hooks/useAddonsStepModel.ts +0 -96
- package/src/components/checkout/hooks/useCheckoutModel.ts +0 -31
- package/src/components/checkout/hooks/useCouponModel.ts +0 -28
- package/src/components/checkout/hooks/useLoadCheckout.ts +0 -40
- package/src/components/checkout/hooks/usePaymentStepModel.ts +0 -49
- package/src/components/checkout/hooks/usePlanStepModel.ts +0 -170
- package/src/components/checkout/hooks/usePreviewSubscription.ts +0 -82
- package/src/components/checkout/hooks/useProgressBarModel.ts +0 -89
- package/src/components/checkout/hooks/useSubscriptionModel.ts +0 -16
- package/src/components/checkout/hooks/useSubscriptionState.ts +0 -26
- package/src/components/checkout/index.ts +0 -3
- package/src/components/checkout/planHeader/PlanHeader.style.tsx +0 -23
- package/src/components/checkout/planHeader/PlanHeader.tsx +0 -61
- package/src/components/checkout/planHeader/index.ts +0 -1
- package/src/components/checkout/progressBar/CheckoutProgressBar.style.ts +0 -29
- package/src/components/checkout/progressBar/CheckoutProgressBar.tsx +0 -48
- package/src/components/checkout/promotionCode/AddPromotionCode.tsx +0 -85
- package/src/components/checkout/promotionCode/AddPromotionCodeButton.tsx +0 -39
- package/src/components/checkout/promotionCode/AppliedPromotionCode.tsx +0 -37
- package/src/components/checkout/promotionCode/PromotionCodeSection.tsx +0 -27
- package/src/components/checkout/promotionCode/index.ts +0 -1
- package/src/components/checkout/steps/addons/CheckoutAddonsStep.style.tsx +0 -24
- package/src/components/checkout/steps/addons/CheckoutAddonsStep.tsx +0 -125
- package/src/components/checkout/steps/addons/addon.utils.ts +0 -68
- package/src/components/checkout/steps/addons/index.ts +0 -1
- package/src/components/checkout/steps/payment/PaymentMethods.style.ts +0 -26
- package/src/components/checkout/steps/payment/PaymentMethods.tsx +0 -83
- package/src/components/checkout/steps/payment/PaymentStep.tsx +0 -41
- package/src/components/checkout/steps/payment/index.ts +0 -1
- package/src/components/checkout/steps/payment/stripe/StripePaymentForm.tsx +0 -43
- package/src/components/checkout/steps/payment/stripe/index.ts +0 -3
- package/src/components/checkout/steps/payment/stripe/stripe.utils.ts +0 -109
- package/src/components/checkout/steps/payment/stripe/useStripeIntegration.ts +0 -27
- package/src/components/checkout/steps/payment/stripe/useSubmit.ts +0 -100
- package/src/components/checkout/steps/plan/BillingPeriodPicker.style.tsx +0 -46
- package/src/components/checkout/steps/plan/BillingPeriodPicker.tsx +0 -63
- package/src/components/checkout/steps/plan/CheckoutChargeList.tsx +0 -138
- package/src/components/checkout/steps/plan/CheckoutPlanStep.style.tsx +0 -6
- package/src/components/checkout/steps/plan/CheckoutPlanStep.tsx +0 -22
- package/src/components/checkout/steps/plan/index.ts +0 -1
- package/src/components/checkout/steps/surprise/SurpriseStep.tsx +0 -27
- package/src/components/checkout/textOverrides.ts +0 -58
- package/src/components/checkout/theme.ts +0 -26
- package/src/components/checkout/types.ts +0 -7
- package/src/components/hooks/useChargeSort.ts +0 -17
- package/src/components/utils/priceUtils.ts +0 -10
- package/src/stories/Checkout.stories.tsx +0 -59
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { BillingPeriod } from '@stigg/js-client-sdk';
|
|
2
|
-
import { DeepPartial } from '../../types';
|
|
3
|
-
export declare type CheckoutLocalization = {
|
|
4
|
-
changePlan: string;
|
|
5
|
-
billingPeriodsTitle: string;
|
|
6
|
-
addAddonText: string;
|
|
7
|
-
newPaymentMethodText: string;
|
|
8
|
-
newPaymentMethodCardTitle: string;
|
|
9
|
-
newPaymentMethodBillingAddressTitle: string;
|
|
10
|
-
baseChargeText: string | ((params: {
|
|
11
|
-
billingPeriod: BillingPeriod;
|
|
12
|
-
}) => string);
|
|
13
|
-
totalText: string;
|
|
14
|
-
subTotalText: string;
|
|
15
|
-
addCouponCodeText: string;
|
|
16
|
-
couponCodeTitle: string;
|
|
17
|
-
addonsSectionTitle: string;
|
|
18
|
-
changesWillApplyAtEndOfBillingPeriod: string | ((params: {
|
|
19
|
-
billingPeriodEnd: Date;
|
|
20
|
-
}) => string);
|
|
21
|
-
checkoutButton: {
|
|
22
|
-
nextText: string;
|
|
23
|
-
downgradeText: string;
|
|
24
|
-
upgradeText: string;
|
|
25
|
-
purchaseText: string;
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
export declare function getResolvedCheckoutLocalize(localizeOverride?: DeepPartial<CheckoutLocalization>): CheckoutLocalization;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { StiggTheme } from '../../theme/types';
|
|
2
|
-
import { DeepPartial } from '../../types';
|
|
3
|
-
import { CheckoutConfiguration } from './types';
|
|
4
|
-
export declare type CheckoutTheme = {
|
|
5
|
-
backgroundColor: string;
|
|
6
|
-
borderColor: string;
|
|
7
|
-
};
|
|
8
|
-
export declare function getResolvedCheckoutTheme(_globalTheme: StiggTheme, themeOverride?: DeepPartial<CheckoutTheme>, remoteConfiguration?: CheckoutConfiguration | null): CheckoutTheme;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
declare const _default: import("@storybook/csf").ComponentAnnotations<import("@storybook/react").ReactFramework, import("../components/checkout").CheckoutProps>;
|
|
2
|
-
export default _default;
|
|
3
|
-
export declare const DefaultCheckout: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactFramework, any>;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<g id="arrow-right">
|
|
3
|
-
<path id="Shape" d="M2.66699 8H13.3337" stroke="#7586B0" stroke-width="1.33333" stroke-linecap="round" stroke-linejoin="round"/>
|
|
4
|
-
<path id="Shape_2" d="M9.33301 4L13.333 8L9.33301 12" stroke="#7586B0" stroke-width="1.33333" stroke-linecap="round" stroke-linejoin="round"/>
|
|
5
|
-
</g>
|
|
6
|
-
</svg>
|
package/src/assets/close.svg
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<path d="M15.8337 5.34199L14.6587 4.16699L10.0003 8.82533L5.34199 4.16699L4.16699 5.34199L8.82533 10.0003L4.16699 14.6587L5.34199 15.8337L10.0003 11.1753L14.6587 15.8337L15.8337 14.6587L11.1753 10.0003L15.8337 5.34199Z" fill="#327EEE"/>
|
|
3
|
-
</svg>
|