@homefile/components-v2 2.6.4 → 2.6.6
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/onboarding/pages/SignUp.js +2 -2
- package/dist/hooks/feedback/useContactForm.js +1 -1
- package/dist/interfaces/feedback/ContactForm.interface.d.ts +1 -1
- package/package.json +1 -1
- package/src/components/onboarding/pages/SignUp.tsx +4 -3
- package/src/hooks/feedback/useContactForm.ts +3 -2
- package/src/interfaces/feedback/ContactForm.interface.ts +1 -1
|
@@ -17,10 +17,10 @@ export const SignUp = ({ isLoading, handleCreateAccount, handleSignIn, showPromo
|
|
|
17
17
|
handleCreateAccount,
|
|
18
18
|
values,
|
|
19
19
|
});
|
|
20
|
-
return (_jsxs(BasePageWrapper, { children: [_jsxs(Container, { size: "onboarding", boxShadow: "lg", children: [_jsx(Logo, {}), _jsx(PageTitle, { title: t('signup.title') }), _jsx(Box, { px: ['container.sm', 'container.md', 'container.lg'], mb: 6, children: _jsxs(Stack, { spacing: "base", as: "form", children: [_jsx(TextInput, { errorMessage: t('forms.firstName') + ' ' + t('forms.required'), hasError: isValidated && isEmptyField(inputs.firstName), id: "firstName", placeholder: t('forms.firstName'), value: inputs.firstName, handleChange: handleInputChange, autoComplete: "given-name" }), _jsx(TextInput, { errorMessage: t('forms.lastName') + ' ' + t('forms.required'), hasError: isValidated && isEmptyField(inputs.lastName), id: "lastName", placeholder: t('forms.lastName'), value: inputs.lastName, handleChange: handleInputChange, autoComplete: "family-name" }), _jsx(TextInput, { autoCapitalize: "none", autoCorrect: "off", errorMessage: t('forms.email') + ' ' + t('forms.required'), hasError: isValidated &&
|
|
20
|
+
return (_jsxs(BasePageWrapper, { children: [_jsxs(Container, { size: "onboarding", boxShadow: "lg", children: [_jsx(Logo, {}), _jsx(PageTitle, { title: t('signup.title') }), _jsx(Box, { px: ['container.sm', 'container.md', 'container.lg'], mb: 6, children: _jsxs(Stack, { spacing: "base", as: "form", children: [Boolean(signupErrorMessage) && (_jsx(Text, { variant: "error", children: signupErrorMessage })), _jsx(TextInput, { errorMessage: t('forms.firstName') + ' ' + t('forms.required'), hasError: isValidated && isEmptyField(inputs.firstName), id: "firstName", placeholder: t('forms.firstName'), value: inputs.firstName, handleChange: handleInputChange, autoComplete: "given-name" }), _jsx(TextInput, { errorMessage: t('forms.lastName') + ' ' + t('forms.required'), hasError: isValidated && isEmptyField(inputs.lastName), id: "lastName", placeholder: t('forms.lastName'), value: inputs.lastName, handleChange: handleInputChange, autoComplete: "family-name" }), _jsx(TextInput, { autoCapitalize: "none", autoCorrect: "off", errorMessage: t('forms.email') + ' ' + t('forms.required'), hasError: isValidated &&
|
|
21
21
|
(isEmptyField(inputs.email) || !isValidEmail(inputs.email)), id: "email", placeholder: t('forms.email'), value: inputs.email, handleChange: handleInputChange, autoComplete: "email" }), showPromoCode && (_jsx(TextInput, { autoCapitalize: "none", autoCorrect: "off", id: "partnerCode", placeholder: t('forms.promoCode'), value: (_a = inputs.partnerCode) !== null && _a !== void 0 ? _a : '', handleChange: handleInputChange, autoComplete: "off" })), _jsx(Text, { textAlign: "center", variant: "caption", children: t('signup.subtitle') }), _jsx(PasswordInput, { errorMessage: passwordErrorMessage(values.password), hasError: isValidated &&
|
|
22
22
|
(!isValidPassword(inputs.password) ||
|
|
23
23
|
!passwordMatch(inputs.password, inputs.confirmPassword)), id: "password", placeholder: t('forms.password'), value: (_b = inputs.password) !== null && _b !== void 0 ? _b : '', handleChange: (event) => handleInputChange(event), autoComplete: "new-password" }), _jsx(PasswordInput, { errorMessage: passwordErrorMessage(inputs.confirmPassword), hasError: isValidated &&
|
|
24
24
|
(!isValidPassword(inputs.confirmPassword) ||
|
|
25
|
-
!passwordMatch(inputs.password, inputs.confirmPassword)), id: "confirmPassword", placeholder: t('forms.passwordConfirm'), value: (_c = inputs.confirmPassword) !== null && _c !== void 0 ? _c : '', handleChange: (event) => handleInputChange(event), autoComplete: "new-password" }), _jsx(Center, { px: ['container.sm', 'container.md', 'container.lg'], h: "4rem", children: _jsxs(Text, { textAlign: "center", variant: "info", w: "100%", children: [t('signup.terms'), _jsx("a", { target: "_blank", href: t('footer.termsUrl'), children: t('footer.termsLink') })] }) }), _jsx(Button, { isLoading: isLoading, spinner: _jsx(ButtonLoader, {}), onClick: handleSubmit, children: t('signup.signupBt') })
|
|
25
|
+
!passwordMatch(inputs.password, inputs.confirmPassword)), id: "confirmPassword", placeholder: t('forms.passwordConfirm'), value: (_c = inputs.confirmPassword) !== null && _c !== void 0 ? _c : '', handleChange: (event) => handleInputChange(event), autoComplete: "new-password" }), _jsx(Center, { px: ['container.sm', 'container.md', 'container.lg'], h: "4rem", children: _jsxs(Text, { textAlign: "center", variant: "info", w: "100%", children: [t('signup.terms'), _jsx("a", { target: "_blank", href: t('footer.termsUrl'), children: t('footer.termsLink') })] }) }), _jsx(Button, { isLoading: isLoading, spinner: _jsx(ButtonLoader, {}), onClick: handleSubmit, children: t('signup.signupBt') })] }) }), _jsx(CardFooter, { title: t('signup.signin'), buttonLabel: t('signup.signinBt'), handleButtonClick: handleSignIn })] }), _jsx(Footer, {})] }));
|
|
26
26
|
};
|
package/package.json
CHANGED
|
@@ -52,6 +52,9 @@ export const SignUp = ({
|
|
|
52
52
|
<PageTitle title={t('signup.title')} />
|
|
53
53
|
<Box px={['container.sm', 'container.md', 'container.lg']} mb={6}>
|
|
54
54
|
<Stack spacing="base" as="form">
|
|
55
|
+
{Boolean(signupErrorMessage) && (
|
|
56
|
+
<Text variant="error">{signupErrorMessage}</Text>
|
|
57
|
+
)}
|
|
55
58
|
<TextInput
|
|
56
59
|
errorMessage={t('forms.firstName') + ' ' + t('forms.required')}
|
|
57
60
|
hasError={isValidated && isEmptyField(inputs.firstName)}
|
|
@@ -95,6 +98,7 @@ export const SignUp = ({
|
|
|
95
98
|
autoComplete="off"
|
|
96
99
|
/>
|
|
97
100
|
)}
|
|
101
|
+
|
|
98
102
|
<Text textAlign="center" variant="caption">
|
|
99
103
|
{t('signup.subtitle')}
|
|
100
104
|
</Text>
|
|
@@ -142,9 +146,6 @@ export const SignUp = ({
|
|
|
142
146
|
>
|
|
143
147
|
{t('signup.signupBt')}
|
|
144
148
|
</Button>
|
|
145
|
-
{Boolean(signupErrorMessage) && (
|
|
146
|
-
<Text variant="error">{signupErrorMessage}</Text>
|
|
147
|
-
)}
|
|
148
149
|
</Stack>
|
|
149
150
|
</Box>
|
|
150
151
|
<CardFooter
|
|
@@ -15,7 +15,8 @@ export const useContactForm = ({
|
|
|
15
15
|
const [formMessage, setFormMessage] = useState('')
|
|
16
16
|
const [errorMessage, setErrorMessage] = useState('')
|
|
17
17
|
|
|
18
|
-
const handleTypeChange = (form: string | SelectItemI) =>
|
|
18
|
+
const handleTypeChange = (form: string | SelectItemI) =>
|
|
19
|
+
setFormType(form as string)
|
|
19
20
|
|
|
20
21
|
const handleMessageChange = (event: ChangeEvent<{ value: string }>) => {
|
|
21
22
|
setFormMessage(event.target.value)
|
|
@@ -28,7 +29,7 @@ export const useContactForm = ({
|
|
|
28
29
|
return
|
|
29
30
|
}
|
|
30
31
|
onClick({
|
|
31
|
-
|
|
32
|
+
category: formType as FeedbackFormProps['category'],
|
|
32
33
|
message: formMessage,
|
|
33
34
|
})
|
|
34
35
|
setFormMessage('')
|