igloo-d2c-components 1.0.56-non-prod → 1.1.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/cjs/index.js +185 -118
- package/dist/esm/index.js +186 -119
- package/dist/types/components/BenefitsSummary/styled.d.ts +3 -3
- package/dist/types/components/BillingToggle/styled.d.ts +1 -1
- package/dist/types/components/CheckoutHeader/styled.d.ts +2 -2
- package/dist/types/components/CheckoutProgress/styled.d.ts +1 -1
- package/dist/types/components/ContactDetailsForm/styled.d.ts +2 -2
- package/dist/types/components/CoverageAmountSlider/styled.d.ts +4 -4
- package/dist/types/components/DesktopHeaderMenuBar/styled.d.ts +2 -2
- package/dist/types/components/FAQAccordion/styled.d.ts +2 -2
- package/dist/types/components/Footer/styled.d.ts +2 -2
- package/dist/types/components/Header/styled.d.ts +3 -3
- package/dist/types/components/HealthQuestionGroup/styled.d.ts +2 -2
- package/dist/types/components/InfoCallout/styled.d.ts +2 -2
- package/dist/types/components/OptionButton/styled.d.ts +1 -1
- package/dist/types/components/PersonalInformationForm/styled.d.ts +1 -1
- package/dist/types/components/ProductCard/styled.d.ts +4 -4
- package/dist/types/components/ProductSelectionDrawer/styled.d.ts +9 -9
- package/dist/types/components/QuestionSection/styled.d.ts +2 -2
- package/dist/types/components/RecommendationsDrawer/styled.d.ts +2 -2
- package/dist/types/components/ToggleGroup/styled.d.ts +1 -1
- package/dist/types/context/TenantThemeContext.d.ts +2 -1
- package/dist/types/types/tenant.d.ts +2 -0
- package/package.json +5 -2
package/dist/cjs/index.js
CHANGED
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
|
|
4
4
|
var jsxRuntime = require('react/jsx-runtime');
|
|
5
5
|
var React = require('react');
|
|
6
|
+
var styles = require('@mui/material/styles');
|
|
6
7
|
var material = require('@mui/material');
|
|
7
8
|
var ArrowDropDownIcon = require('@mui/icons-material/ArrowDropDown');
|
|
8
9
|
var CloseIcon = require('@mui/icons-material/Close');
|
|
9
10
|
var AppBar = require('@mui/material/AppBar');
|
|
10
|
-
var styles = require('@mui/material/styles');
|
|
11
11
|
var MenuIcon = require('@mui/icons-material/Menu');
|
|
12
12
|
var Container = require('@mui/material/Container');
|
|
13
13
|
var ArrowBackIcon = require('@mui/icons-material/ArrowBack');
|
|
@@ -504,6 +504,8 @@ const iglooTheme = {
|
|
|
504
504
|
calloutBorder: '#ffffff',
|
|
505
505
|
inputBackground: '#ffffff',
|
|
506
506
|
inputBorder: '#eeeeee',
|
|
507
|
+
buttonPrimary: '#5656F6',
|
|
508
|
+
buttonPrimaryHover: 'rgba(86, 86, 246, 0.7)',
|
|
507
509
|
},
|
|
508
510
|
motor: {
|
|
509
511
|
main: '#00CCFF',
|
|
@@ -545,11 +547,11 @@ const ammetlifeTheme = {
|
|
|
545
547
|
palette: {
|
|
546
548
|
primary: {
|
|
547
549
|
dark: '#2869a8',
|
|
548
|
-
main: '#
|
|
550
|
+
main: '#0090DA',
|
|
549
551
|
light: '#42A5F5',
|
|
550
552
|
bright: '#90CAF9',
|
|
551
553
|
plain: '#E3F2FD',
|
|
552
|
-
border: '#
|
|
554
|
+
border: '#0090DA',
|
|
553
555
|
},
|
|
554
556
|
secondary: {
|
|
555
557
|
dim: '#E65100',
|
|
@@ -580,13 +582,15 @@ const ammetlifeTheme = {
|
|
|
580
582
|
sliderActive: '#317abc',
|
|
581
583
|
sliderInactive: '#c8c5ca',
|
|
582
584
|
sliderBackground: '#f9f9f9',
|
|
583
|
-
toggleActive: '
|
|
585
|
+
toggleActive: 'rgb(0, 144, 218)',
|
|
584
586
|
toggleActiveText: '#fefbff',
|
|
585
|
-
toggleInactiveText: '#
|
|
587
|
+
toggleInactiveText: '#0090DA',
|
|
586
588
|
calloutBackground: '#f9f9f9',
|
|
587
589
|
calloutBorder: '#ffffff',
|
|
588
590
|
inputBackground: '#ffffff',
|
|
589
591
|
inputBorder: '#eeeeee',
|
|
592
|
+
buttonPrimary: '#0090da',
|
|
593
|
+
buttonPrimaryHover: 'rgba(0, 144, 218, 0.7)',
|
|
590
594
|
},
|
|
591
595
|
motor: {
|
|
592
596
|
main: '#1976D2',
|
|
@@ -663,6 +667,7 @@ const TenantThemeContext = React.createContext(undefined);
|
|
|
663
667
|
/**
|
|
664
668
|
* TenantThemeProvider
|
|
665
669
|
* Wraps components to provide tenant-specific theming
|
|
670
|
+
* Creates MUI theme from tenant configuration
|
|
666
671
|
*
|
|
667
672
|
* @example
|
|
668
673
|
* ```tsx
|
|
@@ -674,12 +679,74 @@ const TenantThemeContext = React.createContext(undefined);
|
|
|
674
679
|
* </TenantThemeProvider>
|
|
675
680
|
* ```
|
|
676
681
|
*/
|
|
677
|
-
function TenantThemeProvider({ children, tenantId, theme, }) {
|
|
682
|
+
function TenantThemeProvider({ children, tenantId, theme: tenantTheme, }) {
|
|
683
|
+
// Create MUI theme with tenant brand + defaults
|
|
684
|
+
const muiTheme = React.useMemo(() => styles.createTheme({
|
|
685
|
+
palette: {
|
|
686
|
+
// Tenant brand colors
|
|
687
|
+
primary: {
|
|
688
|
+
main: tenantTheme.palette.primary.main,
|
|
689
|
+
dark: tenantTheme.palette.primary.dark || tenantTheme.palette.primary.main,
|
|
690
|
+
light: tenantTheme.palette.primary.light || tenantTheme.palette.primary.main,
|
|
691
|
+
contrastText: '#fff',
|
|
692
|
+
},
|
|
693
|
+
secondary: {
|
|
694
|
+
main: tenantTheme.palette.secondary.main,
|
|
695
|
+
dark: tenantTheme.palette.secondary.dark || tenantTheme.palette.secondary.main,
|
|
696
|
+
light: tenantTheme.palette.secondary.light || tenantTheme.palette.secondary.main,
|
|
697
|
+
},
|
|
698
|
+
// MUI defaults for common patterns
|
|
699
|
+
background: {
|
|
700
|
+
default: '#ffffff',
|
|
701
|
+
paper: '#f9f9f9',
|
|
702
|
+
},
|
|
703
|
+
text: {
|
|
704
|
+
primary: '#13131B',
|
|
705
|
+
secondary: '#5F5E62',
|
|
706
|
+
},
|
|
707
|
+
divider: '#E1E2EB',
|
|
708
|
+
// Standard grey palette
|
|
709
|
+
grey: {
|
|
710
|
+
50: '#FAFAFA',
|
|
711
|
+
100: '#F5F5F5',
|
|
712
|
+
200: '#EEEEEE',
|
|
713
|
+
300: '#E0E0E0',
|
|
714
|
+
400: '#BDBDBD',
|
|
715
|
+
500: '#9E9E9E',
|
|
716
|
+
600: '#757575',
|
|
717
|
+
700: '#616161',
|
|
718
|
+
800: '#424242',
|
|
719
|
+
900: '#212121',
|
|
720
|
+
},
|
|
721
|
+
common: {
|
|
722
|
+
white: '#ffffff',
|
|
723
|
+
black: '#000000',
|
|
724
|
+
},
|
|
725
|
+
// Add tenant UI colors to MUI theme
|
|
726
|
+
ui: tenantTheme.palette.ui,
|
|
727
|
+
},
|
|
728
|
+
typography: {
|
|
729
|
+
fontFamily: tenantTheme.typography?.fontFamily || 'Roboto, sans-serif',
|
|
730
|
+
},
|
|
731
|
+
spacing: 8,
|
|
732
|
+
shape: {
|
|
733
|
+
borderRadius: 8,
|
|
734
|
+
},
|
|
735
|
+
breakpoints: {
|
|
736
|
+
values: {
|
|
737
|
+
xs: 0,
|
|
738
|
+
sm: 600,
|
|
739
|
+
md: 900,
|
|
740
|
+
lg: 1200,
|
|
741
|
+
xl: 1536,
|
|
742
|
+
},
|
|
743
|
+
},
|
|
744
|
+
}), [tenantTheme]);
|
|
678
745
|
const value = React.useMemo(() => ({
|
|
679
746
|
tenantId,
|
|
680
|
-
theme,
|
|
681
|
-
}), [tenantId,
|
|
682
|
-
return (jsxRuntime.jsx(TenantThemeContext.Provider, { value: value, children: children }));
|
|
747
|
+
theme: tenantTheme,
|
|
748
|
+
}), [tenantId, tenantTheme]);
|
|
749
|
+
return (jsxRuntime.jsx(styles.ThemeProvider, { theme: muiTheme, children: jsxRuntime.jsx(TenantThemeContext.Provider, { value: value, children: children }) }));
|
|
683
750
|
}
|
|
684
751
|
/**
|
|
685
752
|
* Hook to access tenant theme configuration
|
|
@@ -739,21 +806,20 @@ function useIsTenant(checkTenantId) {
|
|
|
739
806
|
* ```
|
|
740
807
|
*/
|
|
741
808
|
const Button = React__namespace.default.memo(function Button({ tenantColored = false, variant = 'contained', sx, color, ...props }) {
|
|
809
|
+
const theme = material.useTheme();
|
|
742
810
|
const tenantTheme = useTenantTheme();
|
|
743
|
-
const
|
|
744
|
-
const baseWordSpacingSx = { wordSpacing: '0px' };
|
|
745
|
-
const buttonSx = tenantColored && theme
|
|
811
|
+
const buttonSx = tenantColored && tenantTheme?.theme
|
|
746
812
|
? {
|
|
747
|
-
|
|
748
|
-
backgroundColor: theme.palette?.primary?.main,
|
|
749
|
-
color:
|
|
813
|
+
wordSpacing: 0,
|
|
814
|
+
backgroundColor: tenantTheme.theme.palette?.primary?.main,
|
|
815
|
+
color: theme.palette.common.white,
|
|
750
816
|
'&:hover': {
|
|
751
|
-
backgroundColor: theme.palette?.primary?.dark || theme.palette?.primary?.main,
|
|
817
|
+
backgroundColor: tenantTheme.theme.palette?.primary?.dark || tenantTheme.theme.palette?.primary?.main,
|
|
752
818
|
},
|
|
753
819
|
...sx,
|
|
754
820
|
}
|
|
755
821
|
: {
|
|
756
|
-
|
|
822
|
+
wordSpacing: 0,
|
|
757
823
|
...sx,
|
|
758
824
|
};
|
|
759
825
|
return (jsxRuntime.jsx(material.Button, { variant: variant, color: tenantColored ? undefined : color, sx: buttonSx, ...props }));
|
|
@@ -773,11 +839,11 @@ const Button = React__namespace.default.memo(function Button({ tenantColored = f
|
|
|
773
839
|
* ```
|
|
774
840
|
*/
|
|
775
841
|
const Card = React__namespace.default.memo(function Card({ title, headerAction, content, actions, tenantAccent = false, sx, children, ...props }) {
|
|
842
|
+
const theme = material.useTheme();
|
|
776
843
|
const tenantTheme = useTenantTheme();
|
|
777
|
-
const
|
|
778
|
-
const cardSx = tenantAccent && theme
|
|
844
|
+
const cardSx = tenantAccent && tenantTheme?.theme
|
|
779
845
|
? {
|
|
780
|
-
borderTop: `4px solid ${theme.palette?.primary?.main ||
|
|
846
|
+
borderTop: `4px solid ${tenantTheme.theme.palette?.primary?.main || theme.palette.primary.main}`,
|
|
781
847
|
...sx,
|
|
782
848
|
}
|
|
783
849
|
: sx;
|
|
@@ -798,18 +864,18 @@ const Card = React__namespace.default.memo(function Card({ title, headerAction,
|
|
|
798
864
|
* ```
|
|
799
865
|
*/
|
|
800
866
|
const Banner = React__namespace.default.memo(function Banner({ title, description, action, gradient = true, sx, ...props }) {
|
|
867
|
+
const theme = material.useTheme();
|
|
801
868
|
const tenantTheme = useTenantTheme();
|
|
802
|
-
const
|
|
803
|
-
const
|
|
804
|
-
const lightColor = theme?.palette?.primary?.light || primaryColor;
|
|
869
|
+
const primaryColor = tenantTheme?.theme?.palette?.primary?.main || theme.palette.primary.main;
|
|
870
|
+
const lightColor = tenantTheme?.theme?.palette?.primary?.light || theme.palette.primary.light;
|
|
805
871
|
const background = gradient
|
|
806
872
|
? `linear-gradient(135deg, ${primaryColor} 0%, ${lightColor} 100%)`
|
|
807
873
|
: primaryColor;
|
|
808
874
|
return (jsxRuntime.jsxs(material.Box, { sx: {
|
|
809
875
|
background,
|
|
810
|
-
color:
|
|
811
|
-
padding:
|
|
812
|
-
borderRadius:
|
|
876
|
+
color: theme.palette.common.white,
|
|
877
|
+
padding: theme.spacing(4),
|
|
878
|
+
borderRadius: `${theme.shape.borderRadius}px`,
|
|
813
879
|
textAlign: 'center',
|
|
814
880
|
...sx,
|
|
815
881
|
}, ...props, children: [jsxRuntime.jsx(material.Typography, { variant: "h4", component: "h2", gutterBottom: true, fontWeight: "bold", children: title }), description && (jsxRuntime.jsx(material.Typography, { variant: "body1", sx: { opacity: 0.95, mb: action ? 2 : 0 }, children: description })), action && jsxRuntime.jsx(material.Box, { sx: { mt: 2 }, children: action })] }));
|
|
@@ -2052,16 +2118,16 @@ function sanitizeUrl(url, fallback = '#') {
|
|
|
2052
2118
|
return fallback;
|
|
2053
2119
|
}
|
|
2054
2120
|
|
|
2055
|
-
const DivFooter = styles.styled('div')(() => ({
|
|
2056
|
-
backgroundColor:
|
|
2057
|
-
padding:
|
|
2058
|
-
'
|
|
2059
|
-
padding:
|
|
2121
|
+
const DivFooter = styles.styled('div')(({ theme }) => ({
|
|
2122
|
+
backgroundColor: theme.palette.grey[800],
|
|
2123
|
+
padding: theme.spacing(2.5, 2),
|
|
2124
|
+
[theme.breakpoints.up('md')]: {
|
|
2125
|
+
padding: theme.spacing(8.75, 0),
|
|
2060
2126
|
},
|
|
2061
2127
|
}));
|
|
2062
2128
|
const DivFooterConterResponsiveLayout = styles.styled('div')(({ theme }) => ({
|
|
2063
|
-
color:
|
|
2064
|
-
[theme.breakpoints.up(
|
|
2129
|
+
color: theme.palette.common.white,
|
|
2130
|
+
[theme.breakpoints.up('lg')]: {
|
|
2065
2131
|
minWidth: '1128px',
|
|
2066
2132
|
maxWidth: '1128px',
|
|
2067
2133
|
margin: '0 auto',
|
|
@@ -2071,68 +2137,64 @@ const FooterHiddenContent = styles.styled('div')(({ simplifiedLayout }) => simpl
|
|
|
2071
2137
|
const DivIglooIntro = styles.styled('div')(({ theme }) => ({
|
|
2072
2138
|
display: 'flex',
|
|
2073
2139
|
flexDirection: 'column',
|
|
2074
|
-
gap:
|
|
2075
|
-
color: theme
|
|
2076
|
-
'
|
|
2140
|
+
gap: theme.spacing(3),
|
|
2141
|
+
color: theme.palette.common.white,
|
|
2142
|
+
[theme.breakpoints.up('md')]: {
|
|
2077
2143
|
width: 320,
|
|
2078
2144
|
marginRight: 194,
|
|
2079
2145
|
},
|
|
2080
2146
|
}));
|
|
2081
|
-
const DivSocial = styles.styled('div')(() => ({
|
|
2147
|
+
const DivSocial = styles.styled('div')(({ theme }) => ({
|
|
2082
2148
|
display: 'flex',
|
|
2083
2149
|
alignItems: 'center',
|
|
2084
2150
|
margin: '0 auto',
|
|
2085
|
-
columnGap:
|
|
2151
|
+
columnGap: theme.spacing(4),
|
|
2086
2152
|
flexDirection: 'row',
|
|
2087
|
-
'
|
|
2153
|
+
[theme.breakpoints.up('md')]: {
|
|
2088
2154
|
margin: 'initial',
|
|
2089
2155
|
},
|
|
2090
2156
|
}));
|
|
2091
2157
|
const ButtonIcon = styles.styled(material.Button)(({ theme }) => ({
|
|
2092
|
-
color: theme.palette.common
|
|
2093
|
-
padding:
|
|
2094
|
-
minWidth: 'auto
|
|
2158
|
+
color: theme.palette.common.white,
|
|
2159
|
+
padding: 0,
|
|
2160
|
+
minWidth: 'auto',
|
|
2095
2161
|
}));
|
|
2096
|
-
const TypographyIntro = styles.styled(material.Typography)(() => ({
|
|
2162
|
+
const TypographyIntro = styles.styled(material.Typography)(({ theme }) => ({
|
|
2097
2163
|
textAlign: 'center',
|
|
2098
|
-
color:
|
|
2099
|
-
'
|
|
2164
|
+
color: theme.palette.common.white,
|
|
2165
|
+
[theme.breakpoints.up('md')]: {
|
|
2100
2166
|
textAlign: 'left',
|
|
2101
2167
|
},
|
|
2102
2168
|
}));
|
|
2103
|
-
const TypographyAddressFooter = styles.styled(material.Typography)(() => ({
|
|
2104
|
-
marginTop:
|
|
2169
|
+
const TypographyAddressFooter = styles.styled(material.Typography)(({ theme }) => ({
|
|
2170
|
+
marginTop: theme.spacing(2),
|
|
2105
2171
|
textAlign: 'center',
|
|
2106
|
-
color:
|
|
2107
|
-
'
|
|
2172
|
+
color: theme.palette.common.white,
|
|
2173
|
+
[theme.breakpoints.up('md')]: {
|
|
2108
2174
|
textAlign: 'left',
|
|
2109
2175
|
},
|
|
2110
2176
|
}));
|
|
2111
|
-
const DivLogos = styles.styled('div')(() => ({
|
|
2177
|
+
const DivLogos = styles.styled('div')(({ theme }) => ({
|
|
2112
2178
|
display: 'flex',
|
|
2113
2179
|
flexDirection: 'column',
|
|
2114
|
-
gap:
|
|
2180
|
+
gap: theme.spacing(2),
|
|
2115
2181
|
alignItems: 'center',
|
|
2116
|
-
marginTop:
|
|
2117
|
-
'
|
|
2182
|
+
marginTop: theme.spacing(2),
|
|
2183
|
+
[theme.breakpoints.up('md')]: {
|
|
2118
2184
|
width: '100%',
|
|
2119
2185
|
marginTop: 0,
|
|
2120
2186
|
gap: 'initial',
|
|
2121
2187
|
alignItems: 'baseline',
|
|
2122
2188
|
},
|
|
2123
2189
|
}));
|
|
2124
|
-
const DivFirstRow = styles.styled('div')(() => ({
|
|
2190
|
+
const DivFirstRow = styles.styled('div')(({ theme }) => ({
|
|
2125
2191
|
display: 'flex',
|
|
2126
2192
|
flexDirection: 'row',
|
|
2127
|
-
gap:
|
|
2193
|
+
gap: theme.spacing(2),
|
|
2128
2194
|
}));
|
|
2129
2195
|
const ButtonOjkLink = styles.styled(material.Button)(() => ({
|
|
2130
2196
|
display: 'flex',
|
|
2131
2197
|
justifyContent: 'flex-start',
|
|
2132
|
-
'@media (min-width: 769px)': {
|
|
2133
|
-
display: 'flex !important',
|
|
2134
|
-
justifyContent: 'flex-start !important ',
|
|
2135
|
-
},
|
|
2136
2198
|
}));
|
|
2137
2199
|
const ImageOjkLicense = styles.styled('img')(() => ({
|
|
2138
2200
|
alignSelf: 'flex-start',
|
|
@@ -2145,53 +2207,53 @@ const ButtonSolisoustamaLink = styles.styled(material.Button)(() => ({
|
|
|
2145
2207
|
const ImageSolisoustama = styles.styled('img')(() => ({
|
|
2146
2208
|
height: 'auto',
|
|
2147
2209
|
}));
|
|
2148
|
-
const DivLinks = styles.styled('div')(() => ({
|
|
2210
|
+
const DivLinks = styles.styled('div')(({ theme }) => ({
|
|
2149
2211
|
display: 'flex',
|
|
2150
2212
|
flex: 1,
|
|
2151
2213
|
alignItems: 'center',
|
|
2152
|
-
gap:
|
|
2214
|
+
gap: theme.spacing(2),
|
|
2153
2215
|
justifyContent: 'center',
|
|
2154
|
-
'
|
|
2216
|
+
[theme.breakpoints.up('md')]: {
|
|
2155
2217
|
flex: '1 1',
|
|
2156
2218
|
alignItems: 'normal',
|
|
2157
2219
|
},
|
|
2158
2220
|
}));
|
|
2159
|
-
const DivSection = styles.styled('div')(() => ({
|
|
2221
|
+
const DivSection = styles.styled('div')(({ theme }) => ({
|
|
2160
2222
|
display: 'flex',
|
|
2161
2223
|
flexDirection: 'column',
|
|
2162
|
-
gap:
|
|
2224
|
+
gap: theme.spacing(2),
|
|
2163
2225
|
flex: 1,
|
|
2164
2226
|
alignItems: 'flex-start',
|
|
2165
|
-
'
|
|
2166
|
-
gap:
|
|
2227
|
+
[theme.breakpoints.up('md')]: {
|
|
2228
|
+
gap: theme.spacing(3),
|
|
2167
2229
|
'&:not(:first-of-type)': {
|
|
2168
2230
|
marginLeft: 194,
|
|
2169
2231
|
},
|
|
2170
2232
|
},
|
|
2171
2233
|
}));
|
|
2172
|
-
const ButtonBottomLink = styles.styled(material.Button)(() => ({
|
|
2173
|
-
color:
|
|
2234
|
+
const ButtonBottomLink = styles.styled(material.Button)(({ theme }) => ({
|
|
2235
|
+
color: theme.palette.common.white,
|
|
2174
2236
|
textTransform: 'capitalize',
|
|
2175
|
-
'
|
|
2176
|
-
padding:
|
|
2177
|
-
textAlign: 'left
|
|
2178
|
-
minWidth: 'auto
|
|
2237
|
+
[theme.breakpoints.up('md')]: {
|
|
2238
|
+
padding: 0,
|
|
2239
|
+
textAlign: 'left',
|
|
2240
|
+
minWidth: 'auto',
|
|
2179
2241
|
},
|
|
2180
2242
|
}));
|
|
2181
|
-
const StyledDivider = styles.styled(material.Divider)(() => ({
|
|
2182
|
-
margin:
|
|
2183
|
-
borderColor: '#5F5E62
|
|
2243
|
+
const StyledDivider = styles.styled(material.Divider)(({ theme }) => ({
|
|
2244
|
+
margin: theme.spacing(3, 0, 2),
|
|
2245
|
+
borderColor: '#5F5E62',
|
|
2184
2246
|
}));
|
|
2185
2247
|
const DivBottom = styles.styled('div')(() => ({
|
|
2186
2248
|
display: 'flex',
|
|
2187
2249
|
justifyContent: 'space-between',
|
|
2188
2250
|
alignItems: 'center',
|
|
2189
2251
|
}));
|
|
2190
|
-
const DivSep = styles.styled('div')(() => ({
|
|
2252
|
+
const DivSep = styles.styled('div')(({ theme }) => ({
|
|
2191
2253
|
width: '1px',
|
|
2192
2254
|
height: 10,
|
|
2193
2255
|
borderRadius: '1px',
|
|
2194
|
-
backgroundColor:
|
|
2256
|
+
backgroundColor: theme.palette.common.white,
|
|
2195
2257
|
}));
|
|
2196
2258
|
const AnchorLink = styles.styled('a')(() => ({
|
|
2197
2259
|
color: 'inherit',
|
|
@@ -2369,9 +2431,9 @@ const BackArrowButton = styles.styled(material.IconButton)(() => ({
|
|
|
2369
2431
|
function RecommendationsDrawer({ open, onClose, children, headerIcon, title, subtitle, showBackButton = false, onBack, primaryButtonText, onPrimaryAction, primaryButtonDisabled = false, secondaryButtonText, onSecondaryAction, showFooter = true, customFooter, formatMessage = (descriptor) => descriptor.id, }) {
|
|
2370
2432
|
material.useTheme();
|
|
2371
2433
|
const tenantTheme = useTenantTheme();
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2434
|
+
const primaryColor = tenantTheme?.theme?.palette?.ui?.buttonPrimary
|
|
2435
|
+
|| tenantTheme?.theme?.palette?.primary?.main
|
|
2436
|
+
|| '#0090DA';
|
|
2375
2437
|
const hexToRgba = (hex, alpha) => {
|
|
2376
2438
|
const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
|
|
2377
2439
|
if (result) {
|
|
@@ -2380,7 +2442,7 @@ function RecommendationsDrawer({ open, onClose, children, headerIcon, title, sub
|
|
|
2380
2442
|
const b = parseInt(result[3], 16);
|
|
2381
2443
|
return `rgba(${r}, ${g}, ${b}, ${alpha})`;
|
|
2382
2444
|
}
|
|
2383
|
-
return `rgba(
|
|
2445
|
+
return `rgba(0, 144, 218, ${alpha})`;
|
|
2384
2446
|
};
|
|
2385
2447
|
const handleClose = () => {
|
|
2386
2448
|
onClose();
|
|
@@ -3152,7 +3214,7 @@ const ToggleButton = styles.styled(material.Box)(({ theme, active }) => ({
|
|
|
3152
3214
|
: 'transparent',
|
|
3153
3215
|
color: active
|
|
3154
3216
|
? theme?.palette?.ui?.toggleActiveText || '#fefbff'
|
|
3155
|
-
: theme?.palette?.ui?.toggleInactiveText || '#
|
|
3217
|
+
: theme?.palette?.ui?.toggleInactiveText || '#0090DA',
|
|
3156
3218
|
transition: 'all 0.2s ease',
|
|
3157
3219
|
'&:hover': {
|
|
3158
3220
|
opacity: 0.9,
|
|
@@ -3761,42 +3823,47 @@ const ButtonContainer = styles.styled(material.Box)(({ isFixed, desktopRightAlig
|
|
|
3761
3823
|
position: 'relative',
|
|
3762
3824
|
},
|
|
3763
3825
|
}));
|
|
3764
|
-
const StyledButton = styles.styled('button')(({ isDisabled, desktopWidth }) =>
|
|
3765
|
-
|
|
3766
|
-
|
|
3767
|
-
|
|
3768
|
-
|
|
3769
|
-
|
|
3770
|
-
|
|
3771
|
-
|
|
3772
|
-
|
|
3773
|
-
|
|
3774
|
-
|
|
3775
|
-
|
|
3776
|
-
|
|
3777
|
-
|
|
3778
|
-
|
|
3779
|
-
|
|
3780
|
-
|
|
3781
|
-
|
|
3782
|
-
|
|
3783
|
-
|
|
3784
|
-
|
|
3785
|
-
|
|
3786
|
-
|
|
3787
|
-
|
|
3788
|
-
|
|
3789
|
-
|
|
3790
|
-
|
|
3791
|
-
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
|
|
3796
|
-
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
|
|
3826
|
+
const StyledButton = styles.styled('button')(({ theme, isDisabled, desktopWidth }) => {
|
|
3827
|
+
const extendedTheme = theme;
|
|
3828
|
+
const buttonPrimary = extendedTheme?.palette?.ui?.buttonPrimary || '#0090da';
|
|
3829
|
+
const buttonPrimaryHover = extendedTheme?.palette?.ui?.buttonPrimaryHover || 'rgba(0, 144, 218, 0.7)';
|
|
3830
|
+
return {
|
|
3831
|
+
width: '100%',
|
|
3832
|
+
minHeight: '48px',
|
|
3833
|
+
padding: '14px 32px',
|
|
3834
|
+
borderRadius: '100px',
|
|
3835
|
+
border: 'none',
|
|
3836
|
+
backgroundColor: isDisabled ? '#f2f2f2' : buttonPrimary,
|
|
3837
|
+
color: isDisabled ? '#75787b' : '#ffffff',
|
|
3838
|
+
fontFamily: '"MetLifeCircular", "Roboto", "Helvetica", "Arial", sans-serif',
|
|
3839
|
+
fontSize: '16px',
|
|
3840
|
+
fontWeight: 500,
|
|
3841
|
+
lineHeight: '20px',
|
|
3842
|
+
letterSpacing: 0,
|
|
3843
|
+
textTransform: 'none',
|
|
3844
|
+
wordSpacing: '0px',
|
|
3845
|
+
cursor: isDisabled ? 'not-allowed' : 'pointer',
|
|
3846
|
+
transition: 'all 0.2s ease-in-out',
|
|
3847
|
+
boxSizing: 'border-box',
|
|
3848
|
+
'&:hover': {
|
|
3849
|
+
backgroundColor: isDisabled ? '#f2f2f2' : buttonPrimaryHover,
|
|
3850
|
+
},
|
|
3851
|
+
'&:focus': {
|
|
3852
|
+
outline: isDisabled ? 'none' : `2px solid ${buttonPrimary}`,
|
|
3853
|
+
outlineOffset: '2px',
|
|
3854
|
+
},
|
|
3855
|
+
'&:active': {
|
|
3856
|
+
backgroundColor: isDisabled ? '#f2f2f2' : buttonPrimaryHover,
|
|
3857
|
+
},
|
|
3858
|
+
// Desktop styles for fixed width button
|
|
3859
|
+
'@media (min-width: 900px)': desktopWidth
|
|
3860
|
+
? {
|
|
3861
|
+
width: desktopWidth,
|
|
3862
|
+
minWidth: desktopWidth,
|
|
3863
|
+
}
|
|
3864
|
+
: {},
|
|
3865
|
+
};
|
|
3866
|
+
});
|
|
3800
3867
|
|
|
3801
3868
|
const CheckoutFormButton = ({ text = 'Next', disabled = false, onClick, fixed = true, type = 'button', sx, loading = false, desktopRightAligned = false, desktopWidth = '180px', }) => {
|
|
3802
3869
|
return (jsxRuntime.jsx(ButtonContainer, { isFixed: fixed, desktopRightAligned: desktopRightAligned, sx: sx, children: jsxRuntime.jsx(StyledButton, { type: type, disabled: disabled || loading, isDisabled: disabled || loading, desktopWidth: desktopWidth, onClick: onClick, children: loading ? 'Processing...' : text }) }));
|