@stigg/react-sdk 4.2.3 → 4.3.0-beta.1
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/checkout/Checkout.d.ts +5 -0
- package/dist/components/checkout/CheckoutContainer.d.ts +22 -0
- package/dist/components/checkout/CheckoutContainer.style.d.ts +26 -0
- package/dist/components/checkout/CheckoutProvider.d.ts +35 -0
- package/dist/components/checkout/CheckoutSummary.d.ts +9 -0
- package/dist/components/checkout/components/Button.d.ts +6 -0
- package/dist/components/checkout/components/InputField.d.ts +8 -0
- package/dist/components/checkout/components/index.d.ts +2 -0
- package/dist/components/checkout/formatting.d.ts +2 -0
- package/dist/components/checkout/hooks/index.d.ts +8 -0
- package/dist/components/checkout/hooks/useAddonsStepModel.d.ts +21 -0
- package/dist/components/checkout/hooks/useCheckoutModel.d.ts +9 -0
- package/dist/components/checkout/hooks/useCouponModel.d.ts +7 -0
- package/dist/components/checkout/hooks/useLoadCheckout.d.ts +11 -0
- package/dist/components/checkout/hooks/usePaymentStepModel.d.ts +16 -0
- package/dist/components/checkout/hooks/usePlanStepModel.d.ts +23 -0
- package/dist/components/checkout/hooks/usePreviewSubscription.d.ts +13 -0
- package/dist/components/checkout/hooks/useProgressBarModel.d.ts +26 -0
- package/dist/components/checkout/hooks/useSubscriptionModel.d.ts +5 -0
- package/dist/components/checkout/hooks/useSubscriptionState.d.ts +2 -0
- package/dist/components/checkout/index.d.ts +3 -0
- package/dist/components/checkout/planHeader/PlanHeader.d.ts +7 -0
- package/dist/components/checkout/planHeader/PlanHeader.style.d.ts +25 -0
- package/dist/components/checkout/planHeader/index.d.ts +1 -0
- package/dist/components/checkout/progressBar/CheckoutProgressBar.d.ts +2 -0
- package/dist/components/checkout/progressBar/CheckoutProgressBar.style.d.ts +45 -0
- package/dist/components/checkout/promotionCode/AddPromotionCode.d.ts +5 -0
- package/dist/components/checkout/promotionCode/AddPromotionCodeButton.d.ts +7 -0
- package/dist/components/checkout/promotionCode/AppliedPromotionCode.d.ts +6 -0
- package/dist/components/checkout/promotionCode/PromotionCodeSection.d.ts +5 -0
- package/dist/components/checkout/promotionCode/index.d.ts +1 -0
- package/dist/components/checkout/steps/addons/CheckoutAddonsStep.d.ts +2 -0
- package/dist/components/checkout/steps/addons/CheckoutAddonsStep.style.d.ts +93 -0
- package/dist/components/checkout/steps/addons/addon.utils.d.ts +15 -0
- package/dist/components/checkout/steps/addons/index.d.ts +1 -0
- package/dist/components/checkout/steps/payment/PaymentMethods.d.ts +19 -0
- package/dist/components/checkout/steps/payment/PaymentMethods.style.d.ts +113 -0
- package/dist/components/checkout/steps/payment/PaymentStep.d.ts +2 -0
- package/dist/components/checkout/steps/payment/index.d.ts +1 -0
- package/dist/components/checkout/steps/payment/stripe/StripePaymentForm.d.ts +2 -0
- package/dist/components/checkout/steps/payment/stripe/index.d.ts +3 -0
- package/dist/components/checkout/steps/payment/stripe/stripe.utils.d.ts +33 -0
- package/dist/components/checkout/steps/payment/stripe/useStripeIntegration.d.ts +5 -0
- package/dist/components/checkout/steps/payment/stripe/useSubmit.d.ts +10 -0
- package/dist/components/checkout/steps/plan/BillingPeriodPicker.d.ts +9 -0
- package/dist/components/checkout/steps/plan/BillingPeriodPicker.style.d.ts +52 -0
- package/dist/components/checkout/steps/plan/CheckoutChargeList.d.ts +16 -0
- package/dist/components/checkout/steps/plan/CheckoutPlanStep.d.ts +4 -0
- package/dist/components/checkout/steps/plan/CheckoutPlanStep.style.d.ts +12 -0
- package/dist/components/checkout/steps/plan/index.d.ts +1 -0
- package/dist/components/checkout/steps/surprise/SurpriseStep.d.ts +2 -0
- package/dist/components/checkout/textOverrides.d.ts +28 -0
- package/dist/components/checkout/theme.d.ts +12 -0
- package/dist/components/common/Icon.d.ts +3 -2
- package/dist/components/common/PoweredByStigg.d.ts +1 -1
- package/dist/components/{paywall/TiersLayout.d.ts → common/TiersSelectContainer.d.ts} +2 -3
- package/dist/components/common/customIcons.d.ts +17 -5
- package/dist/components/common/mapExternalTheme.d.ts +2 -1
- package/dist/components/customerPortal/subscriptionOverview/tabs/SubscriptionTabs.d.ts +1 -1
- package/dist/components/hooks/useChargeSort.d.ts +3 -0
- package/dist/components/utils/calculateDiscountRate.d.ts +1 -0
- package/dist/components/utils/currencyUtils.d.ts +1 -1
- package/dist/components/{paywall/planPriceTier.d.ts → utils/priceTierUtils.d.ts} +3 -1
- package/dist/components/utils/priceUtils.d.ts +2 -0
- package/dist/index.d.ts +1 -0
- package/dist/react-sdk.cjs.development.js +3476 -201
- 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 +3616 -207
- package/dist/react-sdk.esm.js.map +1 -1
- package/dist/stories/Checkout.stories.d.ts +3 -0
- package/dist/stories/CustomerPortal.stories.d.ts +1 -1
- package/dist/theme/getResolvedTheme.d.ts +1 -0
- package/dist/theme/types.d.ts +1 -0
- package/package.json +7 -4
- package/src/assets/arrow-forward.svg +3 -0
- package/src/assets/arrow-right.svg +6 -0
- package/src/assets/close.svg +3 -0
- package/src/assets/nyancat.svg +634 -0
- package/src/assets/outlined-checked-circle.svg +6 -0
- package/src/assets/outlined-circle.svg +3 -0
- package/src/assets/payment-method.svg +11 -0
- package/src/assets/plus-icon.svg +6 -0
- package/src/assets/trash.svg +8 -0
- package/src/components/StiggProvider.tsx +5 -5
- package/src/components/checkout/Checkout.tsx +30 -0
- package/src/components/checkout/CheckoutContainer.style.ts +34 -0
- package/src/components/checkout/CheckoutContainer.tsx +88 -0
- package/src/components/checkout/CheckoutProvider.tsx +140 -0
- package/src/components/checkout/CheckoutSummary.tsx +361 -0
- package/src/components/checkout/components/Button.tsx +30 -0
- package/src/components/checkout/components/InputField.tsx +22 -0
- package/src/components/checkout/components/index.ts +2 -0
- package/src/components/checkout/formatting.ts +12 -0
- package/src/components/checkout/hooks/index.ts +8 -0
- package/src/components/checkout/hooks/useAddonsStepModel.ts +96 -0
- package/src/components/checkout/hooks/useCheckoutModel.ts +31 -0
- package/src/components/checkout/hooks/useCouponModel.ts +28 -0
- package/src/components/checkout/hooks/useLoadCheckout.ts +40 -0
- package/src/components/checkout/hooks/usePaymentStepModel.ts +49 -0
- package/src/components/checkout/hooks/usePlanStepModel.ts +170 -0
- package/src/components/checkout/hooks/usePreviewSubscription.ts +82 -0
- package/src/components/checkout/hooks/useProgressBarModel.ts +89 -0
- package/src/components/checkout/hooks/useSubscriptionModel.ts +16 -0
- package/src/components/checkout/hooks/useSubscriptionState.ts +26 -0
- package/src/components/checkout/index.ts +3 -0
- package/src/components/checkout/planHeader/PlanHeader.style.tsx +23 -0
- package/src/components/checkout/planHeader/PlanHeader.tsx +61 -0
- package/src/components/checkout/planHeader/index.ts +1 -0
- package/src/components/checkout/progressBar/CheckoutProgressBar.style.ts +29 -0
- package/src/components/checkout/progressBar/CheckoutProgressBar.tsx +48 -0
- package/src/components/checkout/promotionCode/AddPromotionCode.tsx +85 -0
- package/src/components/checkout/promotionCode/AddPromotionCodeButton.tsx +39 -0
- package/src/components/checkout/promotionCode/AppliedPromotionCode.tsx +37 -0
- package/src/components/checkout/promotionCode/PromotionCodeSection.tsx +27 -0
- package/src/components/checkout/promotionCode/index.ts +1 -0
- package/src/components/checkout/steps/addons/CheckoutAddonsStep.style.tsx +24 -0
- package/src/components/checkout/steps/addons/CheckoutAddonsStep.tsx +125 -0
- package/src/components/checkout/steps/addons/addon.utils.ts +68 -0
- package/src/components/checkout/steps/addons/index.ts +1 -0
- package/src/components/checkout/steps/payment/PaymentMethods.style.ts +26 -0
- package/src/components/checkout/steps/payment/PaymentMethods.tsx +83 -0
- package/src/components/checkout/steps/payment/PaymentStep.tsx +41 -0
- package/src/components/checkout/steps/payment/index.ts +1 -0
- package/src/components/checkout/steps/payment/stripe/StripePaymentForm.tsx +43 -0
- package/src/components/checkout/steps/payment/stripe/index.ts +3 -0
- package/src/components/checkout/steps/payment/stripe/stripe.utils.ts +109 -0
- package/src/components/checkout/steps/payment/stripe/useStripeIntegration.ts +27 -0
- package/src/components/checkout/steps/payment/stripe/useSubmit.ts +100 -0
- package/src/components/checkout/steps/plan/BillingPeriodPicker.style.tsx +46 -0
- package/src/components/checkout/steps/plan/BillingPeriodPicker.tsx +63 -0
- package/src/components/checkout/steps/plan/CheckoutChargeList.tsx +138 -0
- package/src/components/checkout/steps/plan/CheckoutPlanStep.style.tsx +6 -0
- package/src/components/checkout/steps/plan/CheckoutPlanStep.tsx +22 -0
- package/src/components/checkout/steps/plan/index.ts +1 -0
- package/src/components/checkout/steps/surprise/SurpriseStep.tsx +27 -0
- package/src/components/checkout/textOverrides.ts +58 -0
- package/src/components/checkout/theme.ts +43 -0
- package/src/components/common/Icon.tsx +17 -22
- package/src/components/common/PoweredByStigg.tsx +1 -1
- package/src/components/{paywall/TiersLayout.tsx → common/TiersSelectContainer.tsx} +8 -7
- package/src/components/common/Typography.tsx +11 -1
- package/src/components/common/customIcons.ts +17 -28
- package/src/components/common/mapExternalTheme.ts +24 -8
- package/src/components/customerPortal/subscriptionOverview/tabs/SubscriptionTabs.tsx +6 -12
- package/src/components/hooks/useChargeSort.ts +17 -0
- 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 +3 -3
- package/src/components/paywall/utils/calculateUnitQuantityText.ts +9 -4
- 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/components/{paywall/planPriceTier.ts → utils/priceTierUtils.ts} +25 -3
- package/src/components/utils/priceUtils.ts +10 -0
- package/src/index.ts +1 -0
- package/src/stories/Checkout.stories.tsx +62 -0
- package/src/stories/CustomerPortal.stories.tsx +1 -1
- package/src/theme/Theme.tsx +9 -8
- package/src/theme/getResolvedTheme.ts +1 -0
- package/src/theme/types.ts +1 -0
|
@@ -0,0 +1,3 @@
|
|
|
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,4 +1,4 @@
|
|
|
1
|
-
declare const _default: import("@storybook/csf").ComponentAnnotations<import("@storybook/react").ReactFramework, import("..").
|
|
1
|
+
declare const _default: import("@storybook/csf").ComponentAnnotations<import("@storybook/react").ReactFramework, import("..").CustomerPortalProps>;
|
|
2
2
|
export default _default;
|
|
3
3
|
export declare const DefaultCustomerPortal: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactFramework, any>;
|
|
4
4
|
export declare const CustomerPortalTheming: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactFramework, any>;
|
|
@@ -3,6 +3,7 @@ export declare const flexLayoutMapper: (horizontalAlignment: HorizontalAlignment
|
|
|
3
3
|
export declare const getResolvedTheme: (customizedTheme?: {
|
|
4
4
|
palette?: {
|
|
5
5
|
primary?: string | undefined;
|
|
6
|
+
primaryDark?: string | undefined;
|
|
6
7
|
backgroundPaper?: string | undefined;
|
|
7
8
|
backgroundHighlight?: string | undefined;
|
|
8
9
|
backgroundSection?: string | undefined;
|
package/dist/theme/types.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "4.
|
|
2
|
+
"version": "4.3.0-beta.1",
|
|
3
3
|
"license": "MIT",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"typings": "dist/index.d.ts",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"lint": "tsdx lint",
|
|
18
18
|
"size": "size-limit",
|
|
19
19
|
"analyze": "size-limit --why",
|
|
20
|
-
"storybook": "start-storybook -p 6006",
|
|
20
|
+
"storybook": "export NODE_OPTIONS=--openssl-legacy-provider && start-storybook -p 6006",
|
|
21
21
|
"build-storybook": "build-storybook",
|
|
22
22
|
"docs": "typedoc",
|
|
23
23
|
"link-sdk": "yarn link && cd node_modules/react && yarn link && cd ../../node_modules/react-dom && yarn link && cd ../../",
|
|
@@ -85,11 +85,14 @@
|
|
|
85
85
|
"@emotion/react": "^11.10.5",
|
|
86
86
|
"@emotion/styled": "^11.10.5",
|
|
87
87
|
"@mui/material": "^5.10.13",
|
|
88
|
-
"@stigg/js-client-sdk": "2.
|
|
88
|
+
"@stigg/js-client-sdk": "2.19.1",
|
|
89
|
+
"@stripe/react-stripe-js": "^2.1.1",
|
|
90
|
+
"@stripe/stripe-js": "^1.54.1",
|
|
89
91
|
"@types/styled-components": "^5.1.26",
|
|
90
92
|
"classnames": "^2.3.2",
|
|
91
93
|
"color": "^4.2.3",
|
|
92
94
|
"currency-symbol-map": "^5.1.0",
|
|
95
|
+
"immer": "^10.0.2",
|
|
93
96
|
"lodash": "^4.17.21",
|
|
94
97
|
"lodash-es": "^4.17.21",
|
|
95
98
|
"moment": "^2.29.4",
|
|
@@ -101,5 +104,5 @@
|
|
|
101
104
|
"styled-typography": "^1.0.3"
|
|
102
105
|
},
|
|
103
106
|
"readme": "ERROR: No README data found!",
|
|
104
|
-
"_id": "@stigg/react-sdk@0.
|
|
107
|
+
"_id": "@stigg/react-sdk@1.0.0"
|
|
105
108
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
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>
|
|
@@ -0,0 +1,3 @@
|
|
|
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>
|