@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.
@@ -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') }), Boolean(signupErrorMessage) && (_jsx(Text, { variant: "error", children: signupErrorMessage }))] }) }), _jsx(CardFooter, { title: t('signup.signin'), buttonLabel: t('signup.signinBt'), handleButtonClick: handleSignIn })] }), _jsx(Footer, {})] }));
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
  };
@@ -15,7 +15,7 @@ export const useContactForm = ({ initialType = 'General Feedback', onClick, }) =
15
15
  return;
16
16
  }
17
17
  onClick({
18
- type: formType,
18
+ category: formType,
19
19
  message: formMessage,
20
20
  });
21
21
  setFormMessage('');
@@ -1,5 +1,5 @@
1
1
  export type FeedbackFormProps = {
2
- type: 'General Feedback' | 'Bug' | 'Account Related' | 'Feature Request';
2
+ category: 'General Feedback' | 'Bug' | 'Account Related' | 'Feature Request';
3
3
  message: string;
4
4
  };
5
5
  export interface ContactFormI {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homefile/components-v2",
3
- "version": "2.6.4",
3
+ "version": "2.6.6",
4
4
  "author": "Homefile",
5
5
  "license": "UNLICENSED",
6
6
  "typings": "dist/index.d.ts",
@@ -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) => setFormType(form as string)
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
- type: formType as FeedbackFormProps['type'],
32
+ category: formType as FeedbackFormProps['category'],
32
33
  message: formMessage,
33
34
  })
34
35
  setFormMessage('')
@@ -1,5 +1,5 @@
1
1
  export type FeedbackFormProps = {
2
- type: 'General Feedback' | 'Bug' | 'Account Related' | 'Feature Request'
2
+ category: 'General Feedback' | 'Bug' | 'Account Related' | 'Feature Request'
3
3
  message: string
4
4
  }
5
5
  export interface ContactFormI {