igloo-d2c-components 1.0.14 → 1.0.15
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 +46 -6
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +46 -6
- package/dist/esm/index.js.map +1 -1
- package/dist/types/components/ContactDetailsForm/ContactDetailsForm.d.ts +12 -1
- package/dist/types/components/ContactDetailsForm/styled.d.ts +3 -0
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -2082,7 +2082,7 @@ function BillingToggle({ value, onChange, formatMessage = (descriptor) => descri
|
|
|
2082
2082
|
const toggleBgColor = getThemeColor(theme, 'ui.sliderBackground', '#f9f9f9');
|
|
2083
2083
|
return (jsxs(ToggleContainer, Object.assign({ sx: {
|
|
2084
2084
|
backgroundColor: toggleBgColor,
|
|
2085
|
-
} }, { children: [jsx(ToggleButton, Object.assign({ active: value === '
|
|
2085
|
+
} }, { children: [jsx(ToggleButton, Object.assign({ active: value === 'annually', onClick: () => onChange('monthly'), sx: {
|
|
2086
2086
|
backgroundColor: value === 'monthly' ? toggleActiveColor : 'transparent',
|
|
2087
2087
|
color: value === 'monthly'
|
|
2088
2088
|
? toggleActiveTextColor
|
|
@@ -2618,7 +2618,7 @@ const HeaderContainer = styled(Box)(({ sticky }) => (Object.assign(Object.assign
|
|
|
2618
2618
|
const SectionHeader = styled(Box)({
|
|
2619
2619
|
padding: '0 16px 24px',
|
|
2620
2620
|
});
|
|
2621
|
-
const SectionTitle$
|
|
2621
|
+
const SectionTitle$2 = styled(Typography)({
|
|
2622
2622
|
fontFamily: 'Montserrat',
|
|
2623
2623
|
fontSize: '20px',
|
|
2624
2624
|
fontWeight: 700,
|
|
@@ -2635,7 +2635,7 @@ const SectionDescription = styled(Typography)({
|
|
|
2635
2635
|
});
|
|
2636
2636
|
|
|
2637
2637
|
const CheckoutHeader = ({ progress, product, sectionTitle, sectionDescription, sticky = true, progressBarTheme, sx, }) => {
|
|
2638
|
-
return (jsxs(HeaderContainer, Object.assign({ sticky: sticky, sx: sx }, { children: [jsx(CheckoutProgress, Object.assign({}, progress, { progressBarTheme: progressBarTheme })), product && (jsx(Box, Object.assign({ sx: { padding: '0 16px 24px' } }, { children: jsx(ProductCard, Object.assign({}, product)) }))), jsxs(SectionHeader, { children: [jsx(SectionTitle$
|
|
2638
|
+
return (jsxs(HeaderContainer, Object.assign({ sticky: sticky, sx: sx }, { children: [jsx(CheckoutProgress, Object.assign({}, progress, { progressBarTheme: progressBarTheme })), product && (jsx(Box, Object.assign({ sx: { padding: '0 16px 24px' } }, { children: jsx(ProductCard, Object.assign({}, product)) }))), jsxs(SectionHeader, { children: [jsx(SectionTitle$2, { children: sectionTitle }), jsx(SectionDescription, { children: sectionDescription })] })] })));
|
|
2639
2639
|
};
|
|
2640
2640
|
|
|
2641
2641
|
const ButtonContainer = styled(Box)(({ isFixed }) => ({
|
|
@@ -2787,9 +2787,16 @@ const CheckboxLabel = styled(Typography)({
|
|
|
2787
2787
|
color: '#5F5E62',
|
|
2788
2788
|
lineHeight: '18px',
|
|
2789
2789
|
});
|
|
2790
|
+
const SectionTitle$1 = styled(Typography)({
|
|
2791
|
+
fontFamily: 'Montserrat',
|
|
2792
|
+
fontSize: '16px',
|
|
2793
|
+
fontWeight: 600,
|
|
2794
|
+
color: '#13131B',
|
|
2795
|
+
lineHeight: '24px',
|
|
2796
|
+
});
|
|
2790
2797
|
|
|
2791
|
-
const ContactDetailsForm = ({ renderField, fields, mailingAddressSame, onSubmit, formRef, sx, }) => {
|
|
2792
|
-
const defaultMailingLabel = 'My mailing address is the same as residential';
|
|
2798
|
+
const ContactDetailsForm = ({ renderField, fields, mailingFields, mailingAddressSame, onSubmit, formRef, sx, }) => {
|
|
2799
|
+
const defaultMailingLabel = 'My mailing address is not the same as residential';
|
|
2793
2800
|
return (jsx(FormContainer$2, Object.assign({ ref: formRef, component: "form", onSubmit: onSubmit, sx: sx }, { children: jsxs(Box, Object.assign({ sx: { display: 'flex', flexDirection: 'column', gap: '24px' } }, { children: [jsxs(Box, { children: [renderField(fields.phone_number), fields.phone_number.helperText && (jsx(Box, Object.assign({ component: "span", sx: {
|
|
2794
2801
|
display: 'block',
|
|
2795
2802
|
mt: 0.5,
|
|
@@ -2797,7 +2804,40 @@ const ContactDetailsForm = ({ renderField, fields, mailingAddressSame, onSubmit,
|
|
|
2797
2804
|
color: '#5F5E62',
|
|
2798
2805
|
fontSize: '12px',
|
|
2799
2806
|
fontFamily: 'Montserrat',
|
|
2800
|
-
} }, { children: fields.phone_number.helperText })))] }), renderField(fields.email_address),
|
|
2807
|
+
} }, { children: fields.phone_number.helperText })))] }), renderField(fields.email_address), jsx(Divider, { sx: { borderColor: 'rgba(0,0,0,0.1)' } }), jsx(SectionTitle$1, { children: "Residential address" }), jsxs(Box, { children: [renderField(fields.residential_address_line1), fields.residential_address_line1.helperText && (jsx(Box, Object.assign({ component: "span", sx: {
|
|
2808
|
+
display: 'block',
|
|
2809
|
+
mt: 0.5,
|
|
2810
|
+
ml: 2,
|
|
2811
|
+
color: '#5F5E62',
|
|
2812
|
+
fontSize: '12px',
|
|
2813
|
+
fontFamily: 'Montserrat',
|
|
2814
|
+
} }, { children: fields.residential_address_line1.helperText })))] }), jsxs(Box, { children: [renderField(fields.residential_address_line2), fields.residential_address_line2.helperText && (jsx(Box, Object.assign({ component: "span", sx: {
|
|
2815
|
+
display: 'block',
|
|
2816
|
+
mt: 0.5,
|
|
2817
|
+
ml: 2,
|
|
2818
|
+
color: '#5F5E62',
|
|
2819
|
+
fontSize: '12px',
|
|
2820
|
+
fontFamily: 'Montserrat',
|
|
2821
|
+
} }, { children: fields.residential_address_line2.helperText })))] }), renderField(fields.postal_code), renderField(fields.city), renderField(fields.state), jsx(Divider, { sx: { borderColor: 'rgba(0,0,0,0.1)' } }), (mailingAddressSame === null || mailingAddressSame === void 0 ? void 0 : mailingAddressSame.checked) && mailingFields && (jsxs(Fragment, { children: [jsx(SectionTitle$1, { children: "Mailing address" }), jsxs(Box, { children: [renderField(mailingFields.mailing_address_line1), mailingFields.mailing_address_line1.helperText && (jsx(Box, Object.assign({ component: "span", sx: {
|
|
2822
|
+
display: 'block',
|
|
2823
|
+
mt: 0.5,
|
|
2824
|
+
ml: 2,
|
|
2825
|
+
color: '#5F5E62',
|
|
2826
|
+
fontSize: '12px',
|
|
2827
|
+
fontFamily: 'Montserrat',
|
|
2828
|
+
} }, { children: mailingFields.mailing_address_line1.helperText })))] }), jsxs(Box, { children: [renderField(mailingFields.mailing_address_line2), mailingFields.mailing_address_line2.helperText && (jsx(Box, Object.assign({ component: "span", sx: {
|
|
2829
|
+
display: 'block',
|
|
2830
|
+
mt: 0.5,
|
|
2831
|
+
ml: 2,
|
|
2832
|
+
color: '#5F5E62',
|
|
2833
|
+
fontSize: '12px',
|
|
2834
|
+
fontFamily: 'Montserrat',
|
|
2835
|
+
} }, { children: mailingFields.mailing_address_line2.helperText })))] }), renderField(mailingFields.mailing_postal_code), renderField(mailingFields.mailing_city), renderField(mailingFields.mailing_state)] })), mailingAddressSame && (jsx(CheckboxContainer, { children: jsx(FormControlLabel, { control: jsx(Checkbox, { checked: mailingAddressSame.checked, onChange: (e) => mailingAddressSame.onChange(e.target.checked), name: "mailing_not_same_as_residential", sx: {
|
|
2836
|
+
color: '#929094',
|
|
2837
|
+
'&.Mui-checked': {
|
|
2838
|
+
color: '#317abc',
|
|
2839
|
+
},
|
|
2840
|
+
} }), label: jsx(CheckboxLabel, { children: mailingAddressSame.label || defaultMailingLabel }) }) }))] })) })));
|
|
2801
2841
|
};
|
|
2802
2842
|
|
|
2803
2843
|
const FormContainer$1 = styled(Box)({
|