@homefile/components-v2 2.6.6 → 2.6.7

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.
@@ -15,13 +15,13 @@ import { isEmptyField } from '../../../utils';
15
15
  import { useSignIn } from '../../../hooks';
16
16
  export const SignIn = ({ isLoading, handleForgotPassword, handleSignIn, handleSignUp, loginErrorMessage, values = { email: '', password: '' }, }) => {
17
17
  const { inputs, handleInputChange, isValidated, setIsValidated } = useSignIn(values);
18
- return (_jsxs(BasePageWrapper, { children: [_jsxs(Container, { size: "onboarding", boxShadow: "lg", children: [_jsx(Logo, {}), _jsx(PageTitle, { title: t('signin.title') }), _jsx(Box, { px: ['container.sm', 'container.md', 'container.lg'], mb: 6, children: _jsxs(Stack, { spacing: 8, children: [_jsxs(Stack, { spacing: "base", as: "form", children: [_jsx(TextInput, { autoCapitalize: "none", autoCorrect: "off", autoComplete: "username", errorMessage: t('forms.email') + ' ' + t('forms.required'), hasError: isValidated && isEmptyField(inputs.email), id: "email", placeholder: t('forms.email'), value: values.email || inputs.email, handleChange: (event) => {
18
+ return (_jsxs(BasePageWrapper, { children: [_jsxs(Container, { size: "onboarding", boxShadow: "lg", children: [_jsx(Logo, {}), _jsx(PageTitle, { title: t('signin.title') }), _jsx(Box, { px: ['container.sm', 'container.md', 'container.lg'], mb: 6, children: _jsxs(Stack, { spacing: 8, children: [_jsxs(Stack, { spacing: "base", as: "form", children: [Boolean(loginErrorMessage) && (_jsx(Text, { variant: "error", children: loginErrorMessage })), _jsx(TextInput, { autoCapitalize: "none", autoCorrect: "off", autoComplete: "username", errorMessage: t('forms.email') + ' ' + t('forms.required'), hasError: isValidated && isEmptyField(inputs.email), id: "email", placeholder: t('forms.email'), value: values.email || inputs.email, handleChange: (event) => {
19
19
  values.email = event.target.value;
20
20
  handleInputChange(event);
21
21
  } }), _jsx(PasswordInput, { autoComplete: "current-password", errorMessage: t('forms.password') + ' ' + t('forms.required'), hasError: isValidated && isEmptyField(inputs.password), id: "password", placeholder: t('forms.password'), value: values.password || inputs.password, handleChange: (event) => {
22
22
  values.password = event.target.value;
23
23
  handleInputChange(event);
24
- } }), Boolean(loginErrorMessage) && (_jsx(Text, { variant: "error", children: loginErrorMessage }))] }), _jsxs(Stack, { spacing: 4, children: [_jsx(Button, { isLoading: isLoading, spinner: _jsx(ButtonLoader, {}), onClick: () => __awaiter(void 0, void 0, void 0, function* () {
24
+ } })] }), _jsxs(Stack, { spacing: 4, children: [_jsx(Button, { isLoading: isLoading, spinner: _jsx(ButtonLoader, {}), onClick: () => __awaiter(void 0, void 0, void 0, function* () {
25
25
  setIsValidated(true);
26
26
  if (!isEmptyField(inputs.email) &&
27
27
  !isEmptyField(inputs.password)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homefile/components-v2",
3
- "version": "2.6.6",
3
+ "version": "2.6.7",
4
4
  "author": "Homefile",
5
5
  "license": "UNLICENSED",
6
6
  "typings": "dist/index.d.ts",
@@ -34,6 +34,9 @@ export const SignIn = ({
34
34
  <Box px={['container.sm', 'container.md', 'container.lg']} mb={6}>
35
35
  <Stack spacing={8}>
36
36
  <Stack spacing="base" as="form">
37
+ {Boolean(loginErrorMessage) && (
38
+ <Text variant="error">{loginErrorMessage}</Text>
39
+ )}
37
40
  <TextInput
38
41
  autoCapitalize="none"
39
42
  autoCorrect="off"
@@ -60,9 +63,6 @@ export const SignIn = ({
60
63
  handleInputChange(event)
61
64
  }}
62
65
  />
63
- {Boolean(loginErrorMessage) && (
64
- <Text variant="error">{loginErrorMessage}</Text>
65
- )}
66
66
  </Stack>
67
67
  <Stack spacing={4}>
68
68
  <Button