@stigg/react-sdk 4.5.1 → 4.6.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/dist/components/checkout/CheckoutContainer.style.d.ts +4 -14
- package/dist/components/checkout/components/DowngradeToFreeContainer.d.ts +2 -7
- package/dist/components/checkout/components/InputField.d.ts +4 -6
- package/dist/components/checkout/components/Skeletons.style.d.ts +6 -75
- package/dist/components/checkout/progressBar/CheckoutProgressBar.style.d.ts +1 -31
- package/dist/components/checkout/steps/addons/CheckoutAddonsStep.style.d.ts +8 -82
- package/dist/components/checkout/steps/payment/PaymentMethods.style.d.ts +8 -100
- package/dist/components/checkout/steps/plan/BillingPeriodPicker.style.d.ts +6 -30
- package/dist/components/checkout/steps/plan/CheckoutPlanStep.style.d.ts +2 -7
- package/dist/components/checkout/summary/CheckoutSummary.d.ts +4 -16
- package/dist/components/customerPortal/common/StyledButton.d.ts +2 -32
- package/dist/components/customerPortal/subscriptionOverview/tabs/SubscriptionTabs.style.d.ts +5 -31
- package/dist/components/customerPortal/usage/featureUsage/FeatureUsageProgressBar.d.ts +1 -11
- package/dist/react-sdk.cjs.development.js +10 -6
- 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 +11 -7
- package/dist/react-sdk.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/components/checkout/configurations/theme.ts +2 -1
- package/src/stories/baseArgs.ts +3 -3
- package/src/theme/Theme.tsx +3 -2
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "4.
|
|
2
|
+
"version": "4.6.1",
|
|
3
3
|
"license": "MIT",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"typings": "dist/index.d.ts",
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
"dependencies": {
|
|
109
109
|
"@emotion/react": "^11.10.5",
|
|
110
110
|
"@emotion/styled": "^11.10.5",
|
|
111
|
-
"@mui/material": "^5.
|
|
111
|
+
"@mui/material": "^5.12.0",
|
|
112
112
|
"@stigg/js-client-sdk": "2.24.1",
|
|
113
113
|
"@stripe/react-stripe-js": "^2.1.1",
|
|
114
114
|
"@stripe/stripe-js": "^1.54.1",
|
|
@@ -21,7 +21,8 @@ const defaultCheckoutTheme: CheckoutTheme = {
|
|
|
21
21
|
export function getResolvedCheckoutTheme(
|
|
22
22
|
globalTheme: StiggTheme,
|
|
23
23
|
themeOverride?: DeepPartial<CheckoutTheme>,
|
|
24
|
-
|
|
24
|
+
// all the remote colors override theme colors, no need to use them here
|
|
25
|
+
_remoteConfiguration?: CheckoutConfiguration | null,
|
|
25
26
|
): CheckoutTheme {
|
|
26
27
|
const { palette: globalPalette } = globalTheme || {};
|
|
27
28
|
|
package/src/stories/baseArgs.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export const defaultArgs = {
|
|
2
|
-
apiKey: process.env.API_KEY || '
|
|
3
|
-
baseUri: process.env.BASE_URI || '
|
|
4
|
-
disableEdge:
|
|
2
|
+
apiKey: process.env.API_KEY || 'client-8b907ff9-743d-4be2-ba10-c56d0ec1acc7:8d04a53d-14ad-4a9e-967b-8ed7d126297f',
|
|
3
|
+
baseUri: process.env.BASE_URI || 'http://localhost:4000',
|
|
4
|
+
disableEdge: true,
|
|
5
5
|
};
|
|
6
6
|
|
|
7
7
|
export const defaultArgsWithCustomer = {
|
package/src/theme/Theme.tsx
CHANGED
|
@@ -4,7 +4,7 @@ import { ThemeProvider as StyledThemeProvider } from 'styled-components';
|
|
|
4
4
|
import { TypographyProps } from 'styled-typography';
|
|
5
5
|
import { css, ThemeProvider } from '@emotion/react';
|
|
6
6
|
import styled from '@emotion/styled/macro';
|
|
7
|
-
import { createTheme, ThemeProvider as MuiThemeProvider } from '@mui/material/styles';
|
|
7
|
+
import { createTheme, ThemeProvider as MuiThemeProvider, THEME_ID } from '@mui/material/styles';
|
|
8
8
|
import { useStiggContext } from '../components/StiggProvider';
|
|
9
9
|
import { DeepPartial } from '../types';
|
|
10
10
|
import { Fonts } from './Fonts';
|
|
@@ -72,11 +72,12 @@ const createMuiPalette = (theme: StiggTheme) => {
|
|
|
72
72
|
export const SdkThemeProvider: React.FC<PropsWithChildren<SdkThemeProviderProps>> = ({ children, componentTheme }) => {
|
|
73
73
|
const theme = useStiggTheme(componentTheme);
|
|
74
74
|
const muiPalette = createMuiPalette(theme);
|
|
75
|
+
const materialTheme = createTheme({ palette: muiPalette, stigg: theme });
|
|
75
76
|
|
|
76
77
|
return (
|
|
77
78
|
// We are using styled-components theme here only because we are using styled-typography
|
|
78
79
|
// which depends on styled-components for the typography theming
|
|
79
|
-
<MuiThemeProvider theme={
|
|
80
|
+
<MuiThemeProvider theme={{ [THEME_ID]: materialTheme }}>
|
|
80
81
|
<ThemeProvider theme={{ stigg: theme }}>
|
|
81
82
|
<CustomCssGlobal customCss={theme.customCss}>
|
|
82
83
|
<Fonts externalFontUrl={theme.typography.fontFamilyUrl} />
|