@pipelinesolucoes/form 1.0.0-beta.7 → 1.2.0-beta.2
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/README.md +2 -2
- package/dist/components/NotificationSnackbar.d.ts +1 -2
- package/dist/components/NotificationSnackbar.js +2 -2
- package/dist/components/NotificationSnackbar.js.map +1 -1
- package/dist/components/TextFieldPassword.d.ts +4 -33
- package/dist/components/TextFieldPassword.js +20 -18
- package/dist/components/TextFieldPassword.js.map +1 -1
- package/dist/components/TextFieldValidate.d.ts +5 -6
- package/dist/components/TextFieldValidate.js +14 -13
- package/dist/components/TextFieldValidate.js.map +1 -1
- package/dist/components/login/FormLogin.d.ts +131 -0
- package/dist/components/login/FormLogin.js +227 -0
- package/dist/components/login/FormLogin.js.map +1 -0
- package/dist/components/login/{PasswordRecoveryForm.d.ts → FormPasswordRecovery.d.ts} +4 -25
- package/dist/components/login/FormPasswordRecovery.js +190 -0
- package/dist/components/login/FormPasswordRecovery.js.map +1 -0
- package/dist/components/login/{LoginForm.d.ts → FormSignUp.d.ts} +8 -36
- package/dist/components/login/FormSignUp.js +231 -0
- package/dist/components/login/FormSignUp.js.map +1 -0
- package/dist/components/login/GoogleButton.d.ts +1 -4
- package/dist/components/login/GoogleButton.js.map +1 -1
- package/dist/components/{FormStyled.d.ts → recaptcha/FormStyled.d.ts} +1 -8
- package/dist/components/{FormStyled.js → recaptcha/FormStyled.js} +0 -13
- package/dist/components/recaptcha/FormStyled.js.map +1 -0
- package/dist/components/recaptcha/RecaptchaForm.js +1 -1
- package/dist/components/recaptcha/RecaptchaForm.js.map +1 -1
- package/dist/components/style/ButtonFormStyled.d.ts +2 -0
- package/dist/components/style/ButtonFormStyled.js +22 -0
- package/dist/components/style/ButtonFormStyled.js.map +1 -0
- package/dist/components/style/LinkFormStyled.d.ts +7 -0
- package/dist/components/style/LinkFormStyled.js +15 -0
- package/dist/components/style/LinkFormStyled.js.map +1 -0
- package/dist/index.d.ts +3 -7
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/theme.d.ts +2 -2
- package/dist/theme.js +20 -21
- package/dist/theme.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/FieldProps.d.ts +4 -0
- package/package.json +9 -5
- package/dist/components/ButtonFormStyled.d.ts +0 -2
- package/dist/components/ButtonFormStyled.js +0 -22
- package/dist/components/ButtonFormStyled.js.map +0 -1
- package/dist/components/FormStyled.js.map +0 -1
- package/dist/components/login/LoginForm.js +0 -198
- package/dist/components/login/LoginForm.js.map +0 -1
- package/dist/components/login/PasswordRecoveryForm.js +0 -169
- package/dist/components/login/PasswordRecoveryForm.js.map +0 -1
- package/dist/components/login/SignUpForm.d.ts +0 -26
- package/dist/components/login/SignUpForm.js +0 -138
- package/dist/components/login/SignUpForm.js.map +0 -1
- package/dist/mui-theme.d.ts +0 -33
- package/dist/mui-theme.js +0 -2
- package/dist/mui-theme.js.map +0 -1
- package/dist/pages/_app.d.ts +0 -2
- package/dist/pages/_app.js +0 -20
- package/dist/pages/_app.js.map +0 -1
- package/dist/pages/_document.d.ts +0 -9
- package/dist/pages/_document.js +0 -33
- package/dist/pages/_document.js.map +0 -1
- package/dist/types/BorderProps.d.ts +0 -6
- package/dist/types/BorderProps.js +0 -2
- package/dist/types/BorderProps.js.map +0 -1
- package/dist/types/ColorProps.d.ts +0 -9
- package/dist/types/ColorProps.js +0 -2
- package/dist/types/ColorProps.js.map +0 -1
- package/dist/types/LayoutProps.d.ts +0 -7
- package/dist/types/LayoutProps.js +0 -2
- package/dist/types/LayoutProps.js.map +0 -1
- package/dist/types/TextProps.d.ts +0 -5
- package/dist/types/TextProps.js +0 -2
- package/dist/types/TextProps.js.map +0 -1
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useState } from 'react';
|
|
4
|
+
import { styled, useTheme } from '@mui/material/styles';
|
|
5
|
+
import { Box, Divider, Typography } from '@mui/material';
|
|
6
|
+
import { ButtonFormStyled } from '../style/ButtonFormStyled';
|
|
7
|
+
import { validateEmailMessage } from '../../utils/validateEmail';
|
|
8
|
+
import TextFieldValidate from '../TextFieldValidate';
|
|
9
|
+
import TextFieldPassword from '../TextFieldPassword';
|
|
10
|
+
import { LinkFormStyled } from '../style/LinkFormStyled';
|
|
11
|
+
const FormContainer = styled('div')(() => ({
|
|
12
|
+
display: 'flex',
|
|
13
|
+
flexDirection: 'column',
|
|
14
|
+
gap: '16px',
|
|
15
|
+
width: '100%',
|
|
16
|
+
margin: 'auto',
|
|
17
|
+
padding: '0px',
|
|
18
|
+
}));
|
|
19
|
+
const DivPassword = styled('div')(() => ({
|
|
20
|
+
display: 'flex',
|
|
21
|
+
flexDirection: 'column',
|
|
22
|
+
gap: '8px',
|
|
23
|
+
width: '100%',
|
|
24
|
+
margin: '0',
|
|
25
|
+
padding: '0',
|
|
26
|
+
}));
|
|
27
|
+
const DivTitulo = styled('div')(() => ({
|
|
28
|
+
display: 'flex',
|
|
29
|
+
flexDirection: 'column',
|
|
30
|
+
gap: '8px',
|
|
31
|
+
width: '100%',
|
|
32
|
+
margin: '0',
|
|
33
|
+
padding: '0',
|
|
34
|
+
alignItems: 'center',
|
|
35
|
+
justifyContent: 'center',
|
|
36
|
+
}));
|
|
37
|
+
const DivLink = styled('div', {
|
|
38
|
+
shouldForwardProp: (prop) => !['text_color', 'align'].includes(prop),
|
|
39
|
+
})(({ text_color, align }) => ({
|
|
40
|
+
display: 'flex',
|
|
41
|
+
flexDirection: 'row',
|
|
42
|
+
alignItems: 'center',
|
|
43
|
+
justifyContent: align,
|
|
44
|
+
width: '100%',
|
|
45
|
+
padding: '0',
|
|
46
|
+
flex: '1',
|
|
47
|
+
color: text_color !== null && text_color !== void 0 ? text_color : "#000",
|
|
48
|
+
}));
|
|
49
|
+
const DivCampos = styled('div')(() => ({
|
|
50
|
+
display: 'flex',
|
|
51
|
+
flexDirection: 'column',
|
|
52
|
+
gap: '4px',
|
|
53
|
+
width: '100%',
|
|
54
|
+
margin: '0',
|
|
55
|
+
padding: '0',
|
|
56
|
+
alignItems: 'center',
|
|
57
|
+
justifyContent: 'center',
|
|
58
|
+
}));
|
|
59
|
+
/**
|
|
60
|
+
* Componente de formulário de login com suporte a autenticação via Google e login por email/senha.
|
|
61
|
+
* Inclui validação básica de email, exibição de mensagens de erro/sucesso retornadas pelo handler `onClick`
|
|
62
|
+
* e customização visual via props (container, campos, botão e links).
|
|
63
|
+
*
|
|
64
|
+
* @param {string} urlRecuperarConta URL para a página de recuperação de conta/senha. Obrigatório.
|
|
65
|
+
* @param {string} urlCriarConta URL para a página de criação de conta. Obrigatório.
|
|
66
|
+
* @param {React.ElementType<SvgIconProps>} [Icon] Ícone opcional (MUI SvgIcon) exibido no topo do formulário.
|
|
67
|
+
* @param {() => React.ReactElement} [titulo] Função que retorna o conteúdo do título exibido no topo do formulário.
|
|
68
|
+
* @param {() => React.ReactElement} googleButton Função que retorna o botão de login com Google. Obrigatório.
|
|
69
|
+
*
|
|
70
|
+
* @param {string} [background='transparent'] Cor de fundo do container principal.
|
|
71
|
+
* @param {string} [borderRadius='0'] Raio da borda do container principal.
|
|
72
|
+
* @param {string} [border='none'] Borda do container principal.
|
|
73
|
+
* @param {string} [boxShadow='none'] Sombra do container principal.
|
|
74
|
+
*
|
|
75
|
+
* @param {string} [backgroundField='transparent'] Fundo dos campos (email/senha).
|
|
76
|
+
* @param {string} [colorField='#000'] Cor do texto dos campos (email/senha).
|
|
77
|
+
* @param {string} [colorFocusedField] Cor do estado focado do campo (se suportado pelos campos internos).
|
|
78
|
+
* @param {string} [borderRadiusField='0px'] Raio da borda dos campos.
|
|
79
|
+
* @param {string} [boxShadowField='none'] Sombra dos campos.
|
|
80
|
+
* @param {string} [borderColorField='#ccc'] Cor da borda dos campos.
|
|
81
|
+
* @param {string} [paddingField='4px 8px'] Espaçamento interno dos campos.
|
|
82
|
+
*
|
|
83
|
+
* @param {string} [textButton='Enviar'] Texto do botão principal.
|
|
84
|
+
* @param {TypographyVariant} [variantButton='body1'] Variante do Typography usada no texto do botão.
|
|
85
|
+
* @param {string} [backgroundButton='transparent'] Fundo do botão principal.
|
|
86
|
+
* @param {string} [backgroundHoverButton='transparent'] Fundo do botão no hover.
|
|
87
|
+
* @param {string} [colorButton='#000'] Cor do texto do botão.
|
|
88
|
+
* @param {string} [colorHoverButton='#000'] Cor do texto do botão no hover.
|
|
89
|
+
* @param {string} [borderRadiusButton='0'] Raio da borda do botão.
|
|
90
|
+
* @param {string} [borderButton='none'] Borda do botão.
|
|
91
|
+
* @param {string} [boxShadowButton='none'] Sombra do botão.
|
|
92
|
+
* @param {string} [widthButton='auto'] Largura do botão.
|
|
93
|
+
* @param {string} [heightButton='auto'] Altura do botão.
|
|
94
|
+
* @param {string} [paddingButton='4px 24px'] Padding do botão.
|
|
95
|
+
* @param {string} [marginButton='0'] Margem do botão.
|
|
96
|
+
*
|
|
97
|
+
* @param {string} color_message_sucess Cor padrão para mensagem de sucesso (caso `onClick` não retorne `color`). Obrigatório.
|
|
98
|
+
* @param {string} color_message_erro Cor padrão para mensagem de erro (caso `onClick` não retorne `color`). Obrigatório.
|
|
99
|
+
* @param {string} color_link Cor aplicada nos links "Esqueceu sua senha?" e "Criar conta". Obrigatório.
|
|
100
|
+
* @param {string} color_separador Cor da linha separadora (Divider). Obrigatório.
|
|
101
|
+
*
|
|
102
|
+
* @param {(data: { email: string; password: string }) => Promise<ClickResult> | ClickResult} [onClick]
|
|
103
|
+
* Handler chamado ao submeter o formulário. Recebe `{ email, password }` e deve retornar um `ClickResult`.
|
|
104
|
+
* - Se `success` for `true`, exibe `message` com `color_message_sucess` (ou `result.color` se fornecida)
|
|
105
|
+
* - Se `success` for `false`, exibe `message` com `color_message_erro` (ou `result.color` se fornecida)
|
|
106
|
+
* Se não for informado, o componente exibirá a mensagem: "Nenhuma ação foi configurada para o botão.".
|
|
107
|
+
*
|
|
108
|
+
* @param {React.ReactNode} [children] Conteúdo extra renderizado ao final do container (abaixo da mensagem).
|
|
109
|
+
*
|
|
110
|
+
* @example
|
|
111
|
+
* ```tsx
|
|
112
|
+
* import FormLogin from '@/components/FormLogin';
|
|
113
|
+
* import LockOutlinedIcon from '@mui/icons-material/LockOutlined';
|
|
114
|
+
* import { Button } from '@mui/material';
|
|
115
|
+
*
|
|
116
|
+
* export default function Example() {
|
|
117
|
+
* return (
|
|
118
|
+
* <FormLogin
|
|
119
|
+
* urlRecuperarConta="/recuperar"
|
|
120
|
+
* urlCriarConta="/cadastro"
|
|
121
|
+
* Icon={LockOutlinedIcon}
|
|
122
|
+
* titulo={() => <h2>Entrar</h2>}
|
|
123
|
+
* googleButton={() => <Button variant="outlined">Continuar com Google</Button>}
|
|
124
|
+
* color="#111"
|
|
125
|
+
* background="#fff"
|
|
126
|
+
* borderRadius="12px"
|
|
127
|
+
* boxShadow="0 10px 30px rgba(0,0,0,0.08)"
|
|
128
|
+
* backgroundField="#fafafa"
|
|
129
|
+
* borderColorField="#e0e0e0"
|
|
130
|
+
* paddingField="10px 12px"
|
|
131
|
+
* textButton="Acessar"
|
|
132
|
+
* backgroundButton="#111"
|
|
133
|
+
* backgroundHoverButton="#000"
|
|
134
|
+
* colorButton="#fff"
|
|
135
|
+
* colorHoverButton="#fff"
|
|
136
|
+
* borderRadiusButton="10px"
|
|
137
|
+
* paddingButton="10px 16px"
|
|
138
|
+
* color_message_sucess="#1b5e20"
|
|
139
|
+
* color_message_erro="#b71c1c"
|
|
140
|
+
* color_link="#1976d2"
|
|
141
|
+
* color_separador="#e0e0e0"
|
|
142
|
+
* onClick={async ({ email, password }) => {
|
|
143
|
+
* if (email === 'teste@exemplo.com' && password === '123') {
|
|
144
|
+
* return { success: true, message: 'Login realizado com sucesso!' };
|
|
145
|
+
* }
|
|
146
|
+
* return { success: false, message: 'Email ou senha inválidos.' };
|
|
147
|
+
* }}
|
|
148
|
+
* />
|
|
149
|
+
* );
|
|
150
|
+
* }
|
|
151
|
+
* ```
|
|
152
|
+
*/
|
|
153
|
+
const FormLogin = ({ urlRecuperarConta, urlCriarConta, Icon, titulo, googleButton, background, borderRadius, border, boxShadow, backgroundField, colorField, borderRadiusField, boxShadowField, borderColorField, paddingField, marginField, textButton = 'Enviar', variantButton = 'body1', backgroundButton, backgroundHoverButton, colorButton, colorHoverButton, borderRadiusButton, borderButton = 'none', boxShadowButton, widthButton = 'auto', heightButton = 'auto', paddingButton, marginButton = '0', color_message_sucess, color_message_erro, color_link, color_separador, onClick, children, }) => {
|
|
154
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61;
|
|
155
|
+
const theme = useTheme();
|
|
156
|
+
const [mensagemApi, setMensagemApi] = useState('');
|
|
157
|
+
const [corMensagemApi, setCorMensagemApi] = useState(color_message_erro);
|
|
158
|
+
const [email, setEmail] = useState('');
|
|
159
|
+
const [password, setPassword] = useState('');
|
|
160
|
+
const [errors, setErrors] = useState({});
|
|
161
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
162
|
+
const validateEmail = (value) => /\S+@\S+\.\S+/.test(value);
|
|
163
|
+
const handleClick = async (e) => {
|
|
164
|
+
var _a, _b, _c;
|
|
165
|
+
e.preventDefault();
|
|
166
|
+
// validação local básica (mantém o comportamento atual)
|
|
167
|
+
const newErrors = {
|
|
168
|
+
email: !validateEmail(email),
|
|
169
|
+
};
|
|
170
|
+
setErrors(newErrors);
|
|
171
|
+
const hasErrors = Object.values(newErrors).some(Boolean);
|
|
172
|
+
if (hasErrors) {
|
|
173
|
+
setCorMensagemApi(color_message_erro);
|
|
174
|
+
setMensagemApi('Alguns dos dados fornecidos estão inválidos. Por favor, revise as informações preenchidas e corrija os campos destacados.');
|
|
175
|
+
return;
|
|
176
|
+
}
|
|
177
|
+
setIsLoading(true);
|
|
178
|
+
setMensagemApi('');
|
|
179
|
+
try {
|
|
180
|
+
if (!onClick) {
|
|
181
|
+
// Se o pai não passou handler, mantém feedback amigável
|
|
182
|
+
setCorMensagemApi(color_message_erro);
|
|
183
|
+
setMensagemApi('Nenhuma ação foi configurada para o botão.');
|
|
184
|
+
return;
|
|
185
|
+
}
|
|
186
|
+
const result = await onClick({ email, password });
|
|
187
|
+
if (result === null || result === void 0 ? void 0 : result.success) {
|
|
188
|
+
setCorMensagemApi((_a = result.color) !== null && _a !== void 0 ? _a : color_message_sucess);
|
|
189
|
+
setMensagemApi(result.message);
|
|
190
|
+
}
|
|
191
|
+
else {
|
|
192
|
+
setCorMensagemApi((_b = result.color) !== null && _b !== void 0 ? _b : color_message_erro);
|
|
193
|
+
setMensagemApi((_c = result === null || result === void 0 ? void 0 : result.message) !== null && _c !== void 0 ? _c : 'Falha ao realizar a operação.');
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
catch (err) {
|
|
197
|
+
setCorMensagemApi(color_message_erro);
|
|
198
|
+
setMensagemApi('Erro inesperado ao processar a solicitação.');
|
|
199
|
+
}
|
|
200
|
+
finally {
|
|
201
|
+
setIsLoading(false);
|
|
202
|
+
}
|
|
203
|
+
};
|
|
204
|
+
const bContainer = (_d = background !== null && background !== void 0 ? background : (_c = (_b = (_a = theme === null || theme === void 0 ? void 0 : theme.pipelinesolucoes) === null || _a === void 0 ? void 0 : _a.forms) === null || _b === void 0 ? void 0 : _b.login) === null || _c === void 0 ? void 0 : _c.background) !== null && _d !== void 0 ? _d : 'transparent';
|
|
205
|
+
const brContainer = (_h = borderRadius !== null && borderRadius !== void 0 ? borderRadius : (_g = (_f = (_e = theme === null || theme === void 0 ? void 0 : theme.pipelinesolucoes) === null || _e === void 0 ? void 0 : _e.forms) === null || _f === void 0 ? void 0 : _f.login) === null || _g === void 0 ? void 0 : _g.borderRadius) !== null && _h !== void 0 ? _h : '0';
|
|
206
|
+
const bdContainer = (_m = border !== null && border !== void 0 ? border : (_l = (_k = (_j = theme === null || theme === void 0 ? void 0 : theme.pipelinesolucoes) === null || _j === void 0 ? void 0 : _j.forms) === null || _k === void 0 ? void 0 : _k.login) === null || _l === void 0 ? void 0 : _l.border) !== null && _m !== void 0 ? _m : '0';
|
|
207
|
+
const bsContainer = (_r = boxShadow !== null && boxShadow !== void 0 ? boxShadow : (_q = (_p = (_o = theme === null || theme === void 0 ? void 0 : theme.pipelinesolucoes) === null || _o === void 0 ? void 0 : _o.forms) === null || _p === void 0 ? void 0 : _p.login) === null || _q === void 0 ? void 0 : _q.boxShadow) !== null && _r !== void 0 ? _r : 'none';
|
|
208
|
+
const bField = (_w = backgroundField !== null && backgroundField !== void 0 ? backgroundField : (_v = (_u = (_t = (_s = theme === null || theme === void 0 ? void 0 : theme.pipelinesolucoes) === null || _s === void 0 ? void 0 : _s.forms) === null || _t === void 0 ? void 0 : _t.login) === null || _u === void 0 ? void 0 : _u.field) === null || _v === void 0 ? void 0 : _v.background) !== null && _w !== void 0 ? _w : undefined;
|
|
209
|
+
const cField = (_1 = colorField !== null && colorField !== void 0 ? colorField : (_0 = (_z = (_y = (_x = theme === null || theme === void 0 ? void 0 : theme.pipelinesolucoes) === null || _x === void 0 ? void 0 : _x.forms) === null || _y === void 0 ? void 0 : _y.login) === null || _z === void 0 ? void 0 : _z.field) === null || _0 === void 0 ? void 0 : _0.color) !== null && _1 !== void 0 ? _1 : undefined;
|
|
210
|
+
const brField = (_6 = borderRadiusField !== null && borderRadiusField !== void 0 ? borderRadiusField : (_5 = (_4 = (_3 = (_2 = theme === null || theme === void 0 ? void 0 : theme.pipelinesolucoes) === null || _2 === void 0 ? void 0 : _2.forms) === null || _3 === void 0 ? void 0 : _3.login) === null || _4 === void 0 ? void 0 : _4.field) === null || _5 === void 0 ? void 0 : _5.borderRadius) !== null && _6 !== void 0 ? _6 : undefined;
|
|
211
|
+
const bsField = (_11 = boxShadowField !== null && boxShadowField !== void 0 ? boxShadowField : (_10 = (_9 = (_8 = (_7 = theme === null || theme === void 0 ? void 0 : theme.pipelinesolucoes) === null || _7 === void 0 ? void 0 : _7.forms) === null || _8 === void 0 ? void 0 : _8.login) === null || _9 === void 0 ? void 0 : _9.field) === null || _10 === void 0 ? void 0 : _10.boxShadow) !== null && _11 !== void 0 ? _11 : undefined;
|
|
212
|
+
const bcField = (_16 = borderColorField !== null && borderColorField !== void 0 ? borderColorField : (_15 = (_14 = (_13 = (_12 = theme === null || theme === void 0 ? void 0 : theme.pipelinesolucoes) === null || _12 === void 0 ? void 0 : _12.forms) === null || _13 === void 0 ? void 0 : _13.login) === null || _14 === void 0 ? void 0 : _14.field) === null || _15 === void 0 ? void 0 : _15.borderColor) !== null && _16 !== void 0 ? _16 : undefined;
|
|
213
|
+
const pField = (_21 = paddingField !== null && paddingField !== void 0 ? paddingField : (_20 = (_19 = (_18 = (_17 = theme === null || theme === void 0 ? void 0 : theme.pipelinesolucoes) === null || _17 === void 0 ? void 0 : _17.forms) === null || _18 === void 0 ? void 0 : _18.login) === null || _19 === void 0 ? void 0 : _19.field) === null || _20 === void 0 ? void 0 : _20.padding) !== null && _21 !== void 0 ? _21 : undefined;
|
|
214
|
+
const mgField = (_26 = marginField !== null && marginField !== void 0 ? marginField : (_25 = (_24 = (_23 = (_22 = theme === null || theme === void 0 ? void 0 : theme.pipelinesolucoes) === null || _22 === void 0 ? void 0 : _22.forms) === null || _23 === void 0 ? void 0 : _23.login) === null || _24 === void 0 ? void 0 : _24.field) === null || _25 === void 0 ? void 0 : _25.margin) !== null && _26 !== void 0 ? _26 : undefined;
|
|
215
|
+
const bgButton = (_31 = backgroundButton !== null && backgroundButton !== void 0 ? backgroundButton : (_30 = (_29 = (_28 = (_27 = theme === null || theme === void 0 ? void 0 : theme.pipelinesolucoes) === null || _27 === void 0 ? void 0 : _27.forms) === null || _28 === void 0 ? void 0 : _28.login) === null || _29 === void 0 ? void 0 : _29.button) === null || _30 === void 0 ? void 0 : _30.background) !== null && _31 !== void 0 ? _31 : undefined;
|
|
216
|
+
const bgHoverButton = (_36 = backgroundHoverButton !== null && backgroundHoverButton !== void 0 ? backgroundHoverButton : (_35 = (_34 = (_33 = (_32 = theme === null || theme === void 0 ? void 0 : theme.pipelinesolucoes) === null || _32 === void 0 ? void 0 : _32.forms) === null || _33 === void 0 ? void 0 : _33.login) === null || _34 === void 0 ? void 0 : _34.button) === null || _35 === void 0 ? void 0 : _35.backgroundHover) !== null && _36 !== void 0 ? _36 : undefined;
|
|
217
|
+
const cButton = (_41 = colorButton !== null && colorButton !== void 0 ? colorButton : (_40 = (_39 = (_38 = (_37 = theme === null || theme === void 0 ? void 0 : theme.pipelinesolucoes) === null || _37 === void 0 ? void 0 : _37.forms) === null || _38 === void 0 ? void 0 : _38.login) === null || _39 === void 0 ? void 0 : _39.button) === null || _40 === void 0 ? void 0 : _40.color) !== null && _41 !== void 0 ? _41 : undefined;
|
|
218
|
+
const cHoverButton = (_46 = colorHoverButton !== null && colorHoverButton !== void 0 ? colorHoverButton : (_45 = (_44 = (_43 = (_42 = theme === null || theme === void 0 ? void 0 : theme.pipelinesolucoes) === null || _42 === void 0 ? void 0 : _42.forms) === null || _43 === void 0 ? void 0 : _43.login) === null || _44 === void 0 ? void 0 : _44.button) === null || _45 === void 0 ? void 0 : _45.colorHover) !== null && _46 !== void 0 ? _46 : undefined;
|
|
219
|
+
const brButton = (_51 = borderRadiusButton !== null && borderRadiusButton !== void 0 ? borderRadiusButton : (_50 = (_49 = (_48 = (_47 = theme === null || theme === void 0 ? void 0 : theme.pipelinesolucoes) === null || _47 === void 0 ? void 0 : _47.forms) === null || _48 === void 0 ? void 0 : _48.login) === null || _49 === void 0 ? void 0 : _49.button) === null || _50 === void 0 ? void 0 : _50.borderRadius) !== null && _51 !== void 0 ? _51 : undefined;
|
|
220
|
+
const bsButton = (_56 = boxShadowButton !== null && boxShadowButton !== void 0 ? boxShadowButton : (_55 = (_54 = (_53 = (_52 = theme === null || theme === void 0 ? void 0 : theme.pipelinesolucoes) === null || _52 === void 0 ? void 0 : _52.forms) === null || _53 === void 0 ? void 0 : _53.login) === null || _54 === void 0 ? void 0 : _54.button) === null || _55 === void 0 ? void 0 : _55.boxShadow) !== null && _56 !== void 0 ? _56 : undefined;
|
|
221
|
+
const pButton = (_61 = paddingButton !== null && paddingButton !== void 0 ? paddingButton : (_60 = (_59 = (_58 = (_57 = theme === null || theme === void 0 ? void 0 : theme.pipelinesolucoes) === null || _57 === void 0 ? void 0 : _57.forms) === null || _58 === void 0 ? void 0 : _58.login) === null || _59 === void 0 ? void 0 : _59.button) === null || _60 === void 0 ? void 0 : _60.padding) !== null && _61 !== void 0 ? _61 : undefined;
|
|
222
|
+
return (_jsxs(Box, { display: "flex", flexDirection: "column", justifyContent: "center", gap: "24px", flex: 1, sx: { padding: '24px', borderRadius: brContainer,
|
|
223
|
+
background: bContainer, border: bdContainer,
|
|
224
|
+
boxShadow: bsContainer }, children: [(Icon || titulo) && (_jsxs(DivTitulo, { children: [Icon && _jsx(Icon, {}), titulo && titulo()] })), _jsxs(FormContainer, { children: [googleButton && googleButton(), _jsx(Divider, { sx: { borderColor: color_separador }, children: "ou" }), _jsxs(DivCampos, { children: [_jsx(TextFieldValidate, { id: "email", label: "Email", placeholder: "Email", background: bField, color: cField, borderRadius: brField, borderColor: bcField, boxShadow: bsField, padding: pField, margin: mgField, value: email, onChange: (e) => setEmail(e.target.value), required: true, requiredMessage: "Campo obrigat\u00F3rio", validate: validateEmailMessage, showErrorOn: "blur" }), _jsxs(DivPassword, { children: [_jsx(TextFieldPassword, { id: "password", label: "Senha", placeholder: "Senha", required: true, background: bField, color: cField, borderRadius: brField, borderColor: bcField, boxShadow: bsField, padding: pField, margin: mgField, value: password, onPasswordChange: (p) => setPassword(p) }), _jsx(DivLink, { align: "flex-start", children: _jsx(LinkFormStyled, { href: urlRecuperarConta, width: "auto", height: "auto", text_color: color_link, font_size: "0.8rem", children: "Esqueceu sua senha?" }) })] })] }), _jsx(ButtonFormStyled, { backgroundButton: bgButton, backgroundHoverButton: bgHoverButton, colorButton: cButton, colorHoverButton: cHoverButton, borderRadiusButton: brButton, borderButton: borderButton, boxShadowButton: bsButton, widthButton: widthButton, heightButton: heightButton, paddingButton: pButton, marginButton: marginButton, disabled: isLoading, onClick: handleClick, children: isLoading ? ('Enviando...') : (_jsx(Typography, { variant: variantButton, component: "span", children: textButton })) }), _jsx(DivLink, { align: "center", children: _jsx(LinkFormStyled, { href: urlCriarConta, width: "auto", height: "100%", text_color: color_link, margin: "0", children: "Criar conta" }) })] }), mensagemApi && (_jsx(Typography, { variant: "body2", sx: { color: corMensagemApi }, children: mensagemApi })), children] }));
|
|
225
|
+
};
|
|
226
|
+
export default FormLogin;
|
|
227
|
+
//# sourceMappingURL=FormLogin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormLogin.js","sourceRoot":"","sources":["../../../src/components/login/FormLogin.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAc,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,MAAM,EAAqB,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAC3E,OAAO,EAAE,GAAG,EAAE,OAAO,EAAgB,UAAU,EAAE,MAAM,eAAe,CAAC;AAEvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAE7D,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,iBAAiB,MAAM,sBAAsB,CAAC;AACrD,OAAO,iBAAiB,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAGzD,MAAM,aAAa,GAAG,MA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,QAAQ,EACzB,WAAW,EAAE,WAAW,EACxB,YAAY,EAAE,YAAY,EAC1B,aAAa,EAAE,OAAO,EACtB,YAAY,EAAE,YAAY,EAC1B,QAAQ,EAAE,SAAS,EACnB,OAAO,EAAE,WAAW,YAEnB,SAAS,CAAC,CAAC,CAAC,CACX,aAAa,CACd,CAAC,CAAC,CAAC,CACF,KAAC,UAAU,IAAC,OAAO,EAAE,aAAa,EAAE,SAAS,EAAC,MAAM,YACjD,UAAU,GACA,CACd,GACgB,EAEnB,KAAC,OAAO,IAAC,KAAK,EAAC,QAAQ,YACrB,KAAC,cAAc,IAAC,IAAI,EAAE,aAAa,EAAE,KAAK,EAAC,MAAM,EAAC,MAAM,EAAC,MAAM,EAAC,UAAU,EAAE,UAAU,EAAE,MAAM,EAAC,GAAG,4BAEjF,GACT,IAEI,EAGf,WAAW,IAAI,CACd,KAAC,UAAU,IAAC,OAAO,EAAC,OAAO,EAAC,EAAE,EAAE,EAAE,KAAK,EAAE,cAAc,EAAE,YACtD,WAAW,GACD,CACd,EAEA,QAAQ,IACL,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -2,39 +2,18 @@ import React from 'react';
|
|
|
2
2
|
import { TypographyVariant } from '@mui/material/styles';
|
|
3
3
|
import { SvgIconProps } from '@mui/material';
|
|
4
4
|
import { ButtonProps } from '../../types/ButtonProps';
|
|
5
|
-
import { ColorProps } from '../../types/ColorProps';
|
|
6
|
-
import { BorderProps } from '../../types/BorderProps';
|
|
7
5
|
import { FieldProps } from '../../types/FieldProps';
|
|
6
|
+
import { BorderProps, ColorProps } from '@pipelinesolucoes/theme';
|
|
8
7
|
interface RecuperarSenhaSubmitResult {
|
|
9
8
|
success: boolean;
|
|
10
9
|
message: string;
|
|
11
10
|
}
|
|
12
|
-
interface
|
|
11
|
+
interface FormPasswordRecoveryProps extends ButtonProps, ColorProps, BorderProps, FieldProps {
|
|
13
12
|
Icon?: React.ElementType<SvgIconProps>;
|
|
14
13
|
titulo?: () => React.ReactElement;
|
|
15
14
|
subTitulo?: () => React.ReactElement;
|
|
16
|
-
background?: string;
|
|
17
|
-
borderRadius?: string;
|
|
18
|
-
backgroundField?: string;
|
|
19
|
-
colorField?: string;
|
|
20
|
-
colorFocusedField?: string;
|
|
21
|
-
borderRadiusField?: string;
|
|
22
|
-
boxShadowField?: string;
|
|
23
|
-
borderColorField?: string;
|
|
24
|
-
paddingField?: string;
|
|
25
15
|
textButton?: string;
|
|
26
16
|
variantButton?: TypographyVariant;
|
|
27
|
-
backgroundButton?: string;
|
|
28
|
-
backgroundHoverButton?: string;
|
|
29
|
-
colorButton?: string;
|
|
30
|
-
colorHoverButton?: string;
|
|
31
|
-
borderRadiusButton?: string;
|
|
32
|
-
borderButton?: string;
|
|
33
|
-
boxShadowButton?: string;
|
|
34
|
-
widthButton?: string;
|
|
35
|
-
heightButton?: string;
|
|
36
|
-
paddingButton?: string;
|
|
37
|
-
marginButton?: string;
|
|
38
17
|
color_message_sucess: string;
|
|
39
18
|
color_message_erro: string;
|
|
40
19
|
/**
|
|
@@ -138,5 +117,5 @@ interface PasswordRecoveryFormProps extends ButtonProps, ColorProps, BorderProps
|
|
|
138
117
|
* };
|
|
139
118
|
* ```
|
|
140
119
|
*/
|
|
141
|
-
declare const
|
|
142
|
-
export default
|
|
120
|
+
declare const FormPasswordRecovery: React.FC<FormPasswordRecoveryProps>;
|
|
121
|
+
export default FormPasswordRecovery;
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useState } from 'react';
|
|
4
|
+
import { styled, useTheme } from '@mui/material/styles';
|
|
5
|
+
import { Box, Typography } from '@mui/material';
|
|
6
|
+
import TextFieldValidate from '../TextFieldValidate';
|
|
7
|
+
import { validateEmail, validateEmailMessage } from '../../utils/validateEmail';
|
|
8
|
+
import { ButtonFormStyled } from '../style/ButtonFormStyled';
|
|
9
|
+
const FormContainer = styled('div')(() => ({
|
|
10
|
+
display: 'flex',
|
|
11
|
+
flexDirection: 'column',
|
|
12
|
+
gap: '16px',
|
|
13
|
+
width: '100%',
|
|
14
|
+
margin: 'auto',
|
|
15
|
+
padding: '0px',
|
|
16
|
+
alignItems: 'center',
|
|
17
|
+
justifyContent: 'center',
|
|
18
|
+
}));
|
|
19
|
+
const DivTitulo = styled('div')(() => ({
|
|
20
|
+
display: 'flex',
|
|
21
|
+
flexDirection: 'column',
|
|
22
|
+
gap: '8px',
|
|
23
|
+
width: '100%',
|
|
24
|
+
margin: '0',
|
|
25
|
+
padding: '0',
|
|
26
|
+
alignItems: 'center',
|
|
27
|
+
justifyContent: 'center',
|
|
28
|
+
}));
|
|
29
|
+
const StyledRoot = styled(Box, {
|
|
30
|
+
shouldForwardProp: (prop) => !['background', 'border_radius', 'box_shadow'].includes(prop),
|
|
31
|
+
})(({ background, border_radius, box_shadow }) => ({
|
|
32
|
+
display: 'flex',
|
|
33
|
+
flexDirection: 'column',
|
|
34
|
+
justifyContent: 'center',
|
|
35
|
+
gap: '24px',
|
|
36
|
+
flex: 1,
|
|
37
|
+
padding: '24px',
|
|
38
|
+
borderRadius: border_radius !== null && border_radius !== void 0 ? border_radius : '0px',
|
|
39
|
+
boxShadow: box_shadow,
|
|
40
|
+
background: background !== null && background !== void 0 ? background : 'transparent',
|
|
41
|
+
}));
|
|
42
|
+
/**
|
|
43
|
+
* Componente de formulário para recuperação de senha via e-mail.
|
|
44
|
+
* Faz a validação do e-mail, dispara um `onSubmit` assíncrono (obrigatório) e exibe a mensagem retornada.
|
|
45
|
+
*
|
|
46
|
+
* @param {React.ElementType<SvgIconProps>} [Icon] Ícone do Material UI exibido no topo do formulário.
|
|
47
|
+
* @param {() => React.ReactElement} [titulo] Função que renderiza o título (ex.: <Typography />).
|
|
48
|
+
* @param {() => React.ReactElement} [subTitulo] Função que renderiza o subtítulo (ex.: <Typography />).
|
|
49
|
+
*
|
|
50
|
+
* @param {string} [background='transparent'] Cor/estilo de fundo do container externo.
|
|
51
|
+
* @param {string} [borderRadius='0px'] Borda arredondada do container externo.
|
|
52
|
+
*
|
|
53
|
+
* @param {string} [backgroundField='transparent'] Cor/estilo de fundo do campo de e-mail.
|
|
54
|
+
* @param {string} [colorField='#000'] Cor do texto do campo de e-mail.
|
|
55
|
+
* @param {string} [borderRadiusField='0px'] Borda arredondada do campo de e-mail.
|
|
56
|
+
* @param {string} [boxShadowField='none'] Sombra do campo de e-mail.
|
|
57
|
+
* @param {string} [borderColorField='#ccc'] Cor da borda do campo de e-mail.
|
|
58
|
+
* @param {string} [paddingField='4px 8px'] Espaçamento interno do campo de e-mail.
|
|
59
|
+
*
|
|
60
|
+
* @param {string} [textButton='Enviar'] Texto exibido no botão quando não está carregando.
|
|
61
|
+
* @param {TypographyVariant} [variantButton='body1'] Variant do Typography usado dentro do botão.
|
|
62
|
+
* @param {string} [backgroundButton='transparent'] Cor/estilo de fundo do botão.
|
|
63
|
+
* @param {string} [backgroundHoverButton='transparent'] Cor/estilo de fundo do botão no hover.
|
|
64
|
+
* @param {string} [colorButton='#000'] Cor do texto do botão.
|
|
65
|
+
* @param {string} [colorHoverButton='#000'] Cor do texto do botão no hover.
|
|
66
|
+
* @param {string} [borderRadiusButton='0'] Borda arredondada do botão.
|
|
67
|
+
* @param {string} [borderButton='none'] Borda do botão.
|
|
68
|
+
* @param {string} [boxShadowButton='none'] Sombra do botão.
|
|
69
|
+
* @param {string} [widthButton='auto'] Largura do botão.
|
|
70
|
+
* @param {string} [heightButton='auto'] Altura do botão.
|
|
71
|
+
* @param {string} [paddingButton='4px 24px'] Espaçamento interno do botão.
|
|
72
|
+
* @param {string} [marginButton='0'] Margem externa do botão.
|
|
73
|
+
*
|
|
74
|
+
* @param {string} color_message_sucess Cor aplicada na mensagem quando o submit retorna sucesso.
|
|
75
|
+
* @param {string} color_message_erro Cor aplicada na mensagem quando o submit retorna erro ou validação falha.
|
|
76
|
+
*
|
|
77
|
+
* @param {(email: string) => Promise<{ success: boolean; message: string }>} onSubmit
|
|
78
|
+
* Callback assíncrono obrigatório chamado após validação do e-mail. Deve retornar `{ success, message }`.
|
|
79
|
+
*
|
|
80
|
+
* @param {(success: boolean) => void} [onResult]
|
|
81
|
+
* Callback opcional disparado com o resultado final (true/false) após o submit (ou validação falhar).
|
|
82
|
+
*
|
|
83
|
+
* @param {React.ReactNode} [children] Conteúdo extra renderizado abaixo do formulário (ex.: links, textos auxiliares).
|
|
84
|
+
*
|
|
85
|
+
* @example
|
|
86
|
+
* ```tsx
|
|
87
|
+
* import RecuperarSenhaForm from '@/components/RecuperarSenhaForm';
|
|
88
|
+
* import { Typography } from '@mui/material';
|
|
89
|
+
*
|
|
90
|
+
* const Page = () => {
|
|
91
|
+
* return (
|
|
92
|
+
* <RecuperarSenhaForm
|
|
93
|
+
* titulo={() => <Typography variant="h5">Recuperar senha</Typography>}
|
|
94
|
+
* subTitulo={() => <Typography variant="body2">Digite seu e-mail para receber o link.</Typography>}
|
|
95
|
+
* background="#fff"
|
|
96
|
+
* borderRadius="12px"
|
|
97
|
+
* backgroundField="#fafafa"
|
|
98
|
+
* borderRadiusField="8px"
|
|
99
|
+
* borderColorField="#e0e0e0"
|
|
100
|
+
* paddingField="10px 12px"
|
|
101
|
+
* textButton="Enviar link"
|
|
102
|
+
* variantButton="button"
|
|
103
|
+
* backgroundButton="#1976d2"
|
|
104
|
+
* backgroundHoverButton="#1565c0"
|
|
105
|
+
* colorButton="#fff"
|
|
106
|
+
* colorHoverButton="#fff"
|
|
107
|
+
* borderRadiusButton="10px"
|
|
108
|
+
* widthButton="100%"
|
|
109
|
+
* color_message_sucess="green"
|
|
110
|
+
* color_message_erro="red"
|
|
111
|
+
* onSubmit={async (email) => {
|
|
112
|
+
* const response = await fetch('/api/recover', {
|
|
113
|
+
* method: 'POST',
|
|
114
|
+
* headers: { 'Content-Type': 'application/json' },
|
|
115
|
+
* body: JSON.stringify({ email }),
|
|
116
|
+
* });
|
|
117
|
+
*
|
|
118
|
+
* if (!response.ok) {
|
|
119
|
+
* return { success: false, message: 'Falha ao enviar o e-mail. Tente novamente.' };
|
|
120
|
+
* }
|
|
121
|
+
*
|
|
122
|
+
* return { success: true, message: 'Se o e-mail existir, enviaremos um link de recuperação.' };
|
|
123
|
+
* }}
|
|
124
|
+
* onResult={(success) => console.log('Resultado:', success)}
|
|
125
|
+
* >
|
|
126
|
+
* <Typography variant="caption">Verifique também sua caixa de spam.</Typography>
|
|
127
|
+
* </RecuperarSenhaForm>
|
|
128
|
+
* );
|
|
129
|
+
* };
|
|
130
|
+
* ```
|
|
131
|
+
*/
|
|
132
|
+
const FormPasswordRecovery = ({ Icon, titulo, subTitulo, background = 'transparent', borderRadius = '0', border = 'none', boxShadow = 'none', backgroundField, colorField, borderRadiusField, boxShadowField, borderColorField, paddingField, marginField, textButton = 'Enviar', variantButton = 'body1', backgroundButton, backgroundHoverButton, colorButton, colorHoverButton, borderRadiusButton, borderButton = 'none', boxShadowButton, widthButton = 'auto', heightButton = 'auto', paddingButton, marginButton = '0', color_message_sucess, color_message_erro, onSubmit, onResult, children, }) => {
|
|
133
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61;
|
|
134
|
+
const theme = useTheme();
|
|
135
|
+
const [mensagemApi, setMensagemApi] = useState('');
|
|
136
|
+
const [corMensagemApi, setCorMensagemApi] = useState(color_message_erro);
|
|
137
|
+
const [email, setEmail] = useState('');
|
|
138
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
139
|
+
const handleClick = async (e) => {
|
|
140
|
+
e.preventDefault();
|
|
141
|
+
if (!validateEmail(email)) {
|
|
142
|
+
setCorMensagemApi(color_message_erro);
|
|
143
|
+
setMensagemApi('Alguns dos dados fornecidos estão inválidos. Por favor, revise as informações preenchidas e corrija os campos destacados.');
|
|
144
|
+
onResult === null || onResult === void 0 ? void 0 : onResult(false);
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
setIsLoading(true);
|
|
148
|
+
setMensagemApi('');
|
|
149
|
+
try {
|
|
150
|
+
const result = await onSubmit(email);
|
|
151
|
+
setMensagemApi(result.message);
|
|
152
|
+
setCorMensagemApi(result.success ? color_message_sucess : color_message_erro);
|
|
153
|
+
onResult === null || onResult === void 0 ? void 0 : onResult(result.success);
|
|
154
|
+
}
|
|
155
|
+
catch (_a) {
|
|
156
|
+
// Mesmo obrigando a mensagem vir do onSubmit, exceções podem acontecer (rede, throw etc.)
|
|
157
|
+
// Aqui escolhi exibir uma mensagem mínima interna para não deixar a UI muda.
|
|
158
|
+
setCorMensagemApi(color_message_erro);
|
|
159
|
+
setMensagemApi('Ocorreu um erro inesperado. Tente novamente.');
|
|
160
|
+
onResult === null || onResult === void 0 ? void 0 : onResult(false);
|
|
161
|
+
}
|
|
162
|
+
finally {
|
|
163
|
+
setIsLoading(false);
|
|
164
|
+
}
|
|
165
|
+
};
|
|
166
|
+
const bContainer = (_d = background !== null && background !== void 0 ? background : (_c = (_b = (_a = theme === null || theme === void 0 ? void 0 : theme.pipelinesolucoes) === null || _a === void 0 ? void 0 : _a.forms) === null || _b === void 0 ? void 0 : _b.login) === null || _c === void 0 ? void 0 : _c.background) !== null && _d !== void 0 ? _d : 'transparent';
|
|
167
|
+
const brContainer = (_h = borderRadius !== null && borderRadius !== void 0 ? borderRadius : (_g = (_f = (_e = theme === null || theme === void 0 ? void 0 : theme.pipelinesolucoes) === null || _e === void 0 ? void 0 : _e.forms) === null || _f === void 0 ? void 0 : _f.login) === null || _g === void 0 ? void 0 : _g.borderRadius) !== null && _h !== void 0 ? _h : '0';
|
|
168
|
+
const bdContainer = (_m = border !== null && border !== void 0 ? border : (_l = (_k = (_j = theme === null || theme === void 0 ? void 0 : theme.pipelinesolucoes) === null || _j === void 0 ? void 0 : _j.forms) === null || _k === void 0 ? void 0 : _k.login) === null || _l === void 0 ? void 0 : _l.border) !== null && _m !== void 0 ? _m : '0';
|
|
169
|
+
const bsContainer = (_r = boxShadow !== null && boxShadow !== void 0 ? boxShadow : (_q = (_p = (_o = theme === null || theme === void 0 ? void 0 : theme.pipelinesolucoes) === null || _o === void 0 ? void 0 : _o.forms) === null || _p === void 0 ? void 0 : _p.login) === null || _q === void 0 ? void 0 : _q.boxShadow) !== null && _r !== void 0 ? _r : 'none';
|
|
170
|
+
const bField = (_w = backgroundField !== null && backgroundField !== void 0 ? backgroundField : (_v = (_u = (_t = (_s = theme === null || theme === void 0 ? void 0 : theme.pipelinesolucoes) === null || _s === void 0 ? void 0 : _s.forms) === null || _t === void 0 ? void 0 : _t.login) === null || _u === void 0 ? void 0 : _u.field) === null || _v === void 0 ? void 0 : _v.background) !== null && _w !== void 0 ? _w : undefined;
|
|
171
|
+
const cField = (_1 = colorField !== null && colorField !== void 0 ? colorField : (_0 = (_z = (_y = (_x = theme === null || theme === void 0 ? void 0 : theme.pipelinesolucoes) === null || _x === void 0 ? void 0 : _x.forms) === null || _y === void 0 ? void 0 : _y.login) === null || _z === void 0 ? void 0 : _z.field) === null || _0 === void 0 ? void 0 : _0.color) !== null && _1 !== void 0 ? _1 : undefined;
|
|
172
|
+
const brField = (_6 = borderRadiusField !== null && borderRadiusField !== void 0 ? borderRadiusField : (_5 = (_4 = (_3 = (_2 = theme === null || theme === void 0 ? void 0 : theme.pipelinesolucoes) === null || _2 === void 0 ? void 0 : _2.forms) === null || _3 === void 0 ? void 0 : _3.login) === null || _4 === void 0 ? void 0 : _4.field) === null || _5 === void 0 ? void 0 : _5.borderRadius) !== null && _6 !== void 0 ? _6 : undefined;
|
|
173
|
+
const bsField = (_11 = boxShadowField !== null && boxShadowField !== void 0 ? boxShadowField : (_10 = (_9 = (_8 = (_7 = theme === null || theme === void 0 ? void 0 : theme.pipelinesolucoes) === null || _7 === void 0 ? void 0 : _7.forms) === null || _8 === void 0 ? void 0 : _8.login) === null || _9 === void 0 ? void 0 : _9.field) === null || _10 === void 0 ? void 0 : _10.boxShadow) !== null && _11 !== void 0 ? _11 : undefined;
|
|
174
|
+
const bcField = (_16 = borderColorField !== null && borderColorField !== void 0 ? borderColorField : (_15 = (_14 = (_13 = (_12 = theme === null || theme === void 0 ? void 0 : theme.pipelinesolucoes) === null || _12 === void 0 ? void 0 : _12.forms) === null || _13 === void 0 ? void 0 : _13.login) === null || _14 === void 0 ? void 0 : _14.field) === null || _15 === void 0 ? void 0 : _15.borderColor) !== null && _16 !== void 0 ? _16 : undefined;
|
|
175
|
+
const pField = (_21 = paddingField !== null && paddingField !== void 0 ? paddingField : (_20 = (_19 = (_18 = (_17 = theme === null || theme === void 0 ? void 0 : theme.pipelinesolucoes) === null || _17 === void 0 ? void 0 : _17.forms) === null || _18 === void 0 ? void 0 : _18.login) === null || _19 === void 0 ? void 0 : _19.field) === null || _20 === void 0 ? void 0 : _20.padding) !== null && _21 !== void 0 ? _21 : undefined;
|
|
176
|
+
const mgField = (_26 = marginField !== null && marginField !== void 0 ? marginField : (_25 = (_24 = (_23 = (_22 = theme === null || theme === void 0 ? void 0 : theme.pipelinesolucoes) === null || _22 === void 0 ? void 0 : _22.forms) === null || _23 === void 0 ? void 0 : _23.login) === null || _24 === void 0 ? void 0 : _24.field) === null || _25 === void 0 ? void 0 : _25.margin) !== null && _26 !== void 0 ? _26 : undefined;
|
|
177
|
+
const bgButton = (_31 = backgroundButton !== null && backgroundButton !== void 0 ? backgroundButton : (_30 = (_29 = (_28 = (_27 = theme === null || theme === void 0 ? void 0 : theme.pipelinesolucoes) === null || _27 === void 0 ? void 0 : _27.forms) === null || _28 === void 0 ? void 0 : _28.login) === null || _29 === void 0 ? void 0 : _29.button) === null || _30 === void 0 ? void 0 : _30.background) !== null && _31 !== void 0 ? _31 : undefined;
|
|
178
|
+
const bgHoverButton = (_36 = backgroundHoverButton !== null && backgroundHoverButton !== void 0 ? backgroundHoverButton : (_35 = (_34 = (_33 = (_32 = theme === null || theme === void 0 ? void 0 : theme.pipelinesolucoes) === null || _32 === void 0 ? void 0 : _32.forms) === null || _33 === void 0 ? void 0 : _33.login) === null || _34 === void 0 ? void 0 : _34.button) === null || _35 === void 0 ? void 0 : _35.backgroundHover) !== null && _36 !== void 0 ? _36 : undefined;
|
|
179
|
+
const cButton = (_41 = colorButton !== null && colorButton !== void 0 ? colorButton : (_40 = (_39 = (_38 = (_37 = theme === null || theme === void 0 ? void 0 : theme.pipelinesolucoes) === null || _37 === void 0 ? void 0 : _37.forms) === null || _38 === void 0 ? void 0 : _38.login) === null || _39 === void 0 ? void 0 : _39.button) === null || _40 === void 0 ? void 0 : _40.color) !== null && _41 !== void 0 ? _41 : undefined;
|
|
180
|
+
const cHoverButton = (_46 = colorHoverButton !== null && colorHoverButton !== void 0 ? colorHoverButton : (_45 = (_44 = (_43 = (_42 = theme === null || theme === void 0 ? void 0 : theme.pipelinesolucoes) === null || _42 === void 0 ? void 0 : _42.forms) === null || _43 === void 0 ? void 0 : _43.login) === null || _44 === void 0 ? void 0 : _44.button) === null || _45 === void 0 ? void 0 : _45.colorHover) !== null && _46 !== void 0 ? _46 : undefined;
|
|
181
|
+
const brButton = (_51 = borderRadiusButton !== null && borderRadiusButton !== void 0 ? borderRadiusButton : (_50 = (_49 = (_48 = (_47 = theme === null || theme === void 0 ? void 0 : theme.pipelinesolucoes) === null || _47 === void 0 ? void 0 : _47.forms) === null || _48 === void 0 ? void 0 : _48.login) === null || _49 === void 0 ? void 0 : _49.button) === null || _50 === void 0 ? void 0 : _50.borderRadius) !== null && _51 !== void 0 ? _51 : undefined;
|
|
182
|
+
const bsButton = (_56 = boxShadowButton !== null && boxShadowButton !== void 0 ? boxShadowButton : (_55 = (_54 = (_53 = (_52 = theme === null || theme === void 0 ? void 0 : theme.pipelinesolucoes) === null || _52 === void 0 ? void 0 : _52.forms) === null || _53 === void 0 ? void 0 : _53.login) === null || _54 === void 0 ? void 0 : _54.button) === null || _55 === void 0 ? void 0 : _55.boxShadow) !== null && _56 !== void 0 ? _56 : undefined;
|
|
183
|
+
const pButton = (_61 = paddingButton !== null && paddingButton !== void 0 ? paddingButton : (_60 = (_59 = (_58 = (_57 = theme === null || theme === void 0 ? void 0 : theme.pipelinesolucoes) === null || _57 === void 0 ? void 0 : _57.forms) === null || _58 === void 0 ? void 0 : _58.login) === null || _59 === void 0 ? void 0 : _59.button) === null || _60 === void 0 ? void 0 : _60.padding) !== null && _61 !== void 0 ? _61 : undefined;
|
|
184
|
+
return (_jsxs(StyledRoot, { background: bContainer, border_radius: brContainer, box_shadow: bsContainer, border: bdContainer, children: [(Icon || titulo) && (_jsxs(DivTitulo, { children: [Icon && _jsx(Icon, {}), titulo && titulo(), subTitulo && subTitulo()] })), _jsxs(FormContainer, { children: [_jsx(TextFieldValidate, { id: "email", label: "Email", placeholder: "Email", background: bField, color: cField, borderRadius: brField, borderColor: bcField, boxShadow: bsField, padding: pField, margin: mgField, value: email, onChange: (e) => setEmail(e.target.value), required: true, requiredMessage: "Campo obrigat\u00F3rio", validate: validateEmailMessage, showErrorOn: "blur" }), _jsx(ButtonFormStyled, { backgroundButton: bgButton, backgroundHoverButton: bgHoverButton, colorButton: cButton, colorHoverButton: cHoverButton, borderRadiusButton: brButton, borderButton: borderButton, boxShadowButton: bsButton, widthButton: widthButton, heightButton: heightButton, paddingButton: pButton, marginButton: marginButton, disabled: isLoading, onClick: handleClick, children: isLoading
|
|
185
|
+
? 'Enviando...'
|
|
186
|
+
: _jsx(Typography, { variant: variantButton, component: "span", children: textButton }) }), mensagemApi && (_jsx(Typography, { variant: "body1", component: "span", color: corMensagemApi, children: mensagemApi }))] }), children] }));
|
|
187
|
+
};
|
|
188
|
+
FormPasswordRecovery.displayName = 'FormPasswordRecovery';
|
|
189
|
+
export default FormPasswordRecovery;
|
|
190
|
+
//# sourceMappingURL=FormPasswordRecovery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormPasswordRecovery.js","sourceRoot":"","sources":["../../../src/components/login/FormPasswordRecovery.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAc,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,MAAM,EAAqB,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAC3E,OAAO,EAAE,GAAG,EAAgB,UAAU,EAAE,MAAM,eAAe,CAAC;AAC9D,OAAO,iBAAiB,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEhF,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAI7D,MAAM,aAAa,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;IACzC,OAAO,EAAE,MAAM;IACf,aAAa,EAAE,QAAQ;IACvB,GAAG,EAAE,MAAM;IACX,KAAK,EAAE,MAAM;IACb,MAAM,EAAE,MAAM;IACd,OAAO,EAAE,KAAK;IACd,UAAU,EAAE,QAAQ;IACpB,cAAc,EAAE,QAAQ;CACzB,CAAC,CAAC,CAAC;AAEJ,MAAM,SAAS,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;IACrC,OAAO,EAAE,MAAM;IACf,aAAa,EAAE,QAAQ;IACvB,GAAG,EAAE,KAAK;IACV,KAAK,EAAE,MAAM;IACb,MAAM,EAAE,GAAG;IACX,OAAO,EAAE,GAAG;IACZ,UAAU,EAAE,QAAQ;IACpB,cAAc,EAAE,QAAQ;CACzB,CAAC,CAAC,CAAC;AAEJ,MAAM,UAAU,GAAG,MAAM,CAAC,GAAG,EAAE;IAC7B,iBAAiB,EAAE,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,EAAE,YAAY,EAC1B,QAAQ,EAAE,SAAS,EACnB,OAAO,EAAE,WAAW,YAEnB,SAAS;4BACR,CAAC,CAAC,aAAa;4BACf,CAAC,CAAC,KAAC,UAAU,IAAC,OAAO,EAAE,aAAa,EAAE,SAAS,EAAC,MAAM,YAAE,UAAU,GAAc,GAEjE,EAElB,WAAW,IAAI,CACd,KAAC,UAAU,IAAC,OAAO,EAAC,OAAO,EAAC,SAAS,EAAC,MAAM,EAAC,KAAK,EAAE,cAAc,YAC/D,WAAW,GACD,CACd,IACa,EAEf,QAAQ,IACE,CACd,CAAC;AACJ,CAAC,CAAC;AAEF,oBAAoB,CAAC,WAAW,GAAG,sBAAsB,CAAC;AAC1D,eAAe,oBAAoB,CAAC"}
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { TypographyVariant } from '@mui/material/styles';
|
|
3
2
|
import { SvgIconProps } from '@mui/material';
|
|
4
3
|
import { ButtonProps } from '../../types/ButtonProps';
|
|
5
4
|
import { FieldProps } from '@/types/FieldProps';
|
|
6
|
-
import { ColorProps } from '
|
|
7
|
-
import { BorderProps } from '../../types/BorderProps';
|
|
5
|
+
import { BorderProps, ColorProps } from '@pipelinesolucoes/theme';
|
|
8
6
|
/**
|
|
9
7
|
* Retorno do onClick/onSubmit do componente pai.
|
|
10
8
|
* - success: define se a ação foi bem sucedida
|
|
11
|
-
* - message: mensagem para exibir no próprio
|
|
9
|
+
* - message: mensagem para exibir no próprio FormLogin
|
|
12
10
|
* - color: cor opcional para a mensagem (caso queira sobrescrever as cores padrão)
|
|
13
11
|
*/
|
|
14
12
|
export interface ClickResult {
|
|
@@ -16,42 +14,16 @@ export interface ClickResult {
|
|
|
16
14
|
message: string;
|
|
17
15
|
color?: string;
|
|
18
16
|
}
|
|
19
|
-
export interface
|
|
17
|
+
export interface FormSignUpProps extends ColorProps, BorderProps, ButtonProps, FieldProps {
|
|
20
18
|
Icon?: React.ElementType<SvgIconProps>;
|
|
21
19
|
titulo?: () => React.ReactElement;
|
|
22
20
|
googleButton: () => React.ReactElement;
|
|
23
|
-
color: string;
|
|
24
|
-
background?: string;
|
|
25
|
-
borderRadius?: string;
|
|
26
|
-
border?: string;
|
|
27
|
-
boxShadow?: string;
|
|
28
|
-
backgroundField?: string;
|
|
29
|
-
colorField?: string;
|
|
30
|
-
colorFocusedField?: string;
|
|
31
|
-
borderRadiusField?: string;
|
|
32
|
-
boxShadowField?: string;
|
|
33
|
-
borderColorField?: string;
|
|
34
|
-
paddingField?: string;
|
|
35
|
-
textButton?: string;
|
|
36
|
-
variantButton?: TypographyVariant;
|
|
37
|
-
backgroundButton?: string;
|
|
38
|
-
backgroundHoverButton?: string;
|
|
39
|
-
colorButton?: string;
|
|
40
|
-
colorHoverButton?: string;
|
|
41
|
-
borderRadiusButton?: string;
|
|
42
|
-
borderButton?: string;
|
|
43
|
-
boxShadowButton?: string;
|
|
44
|
-
widthButton?: string;
|
|
45
|
-
heightButton?: string;
|
|
46
|
-
paddingButton?: string;
|
|
47
|
-
marginButton?: string;
|
|
48
21
|
/** Cores padrão para mensagem (caso o pai não retorne color no ClickResult) */
|
|
49
22
|
color_message_sucess: string;
|
|
50
23
|
color_message_erro: string;
|
|
51
24
|
color_link: string;
|
|
52
25
|
color_separador: string;
|
|
53
|
-
|
|
54
|
-
urlCriarConta: string;
|
|
26
|
+
urlLogin: string;
|
|
55
27
|
children?: React.ReactNode;
|
|
56
28
|
/**
|
|
57
29
|
* Evento disparado ao clicar no botão principal.
|
|
@@ -116,13 +88,13 @@ export interface LoginFormProps extends ColorProps, BorderProps, ButtonProps, Fi
|
|
|
116
88
|
*
|
|
117
89
|
* @example
|
|
118
90
|
* ```tsx
|
|
119
|
-
* import
|
|
91
|
+
* import FormLogin from '@/components/FormLogin';
|
|
120
92
|
* import LockOutlinedIcon from '@mui/icons-material/LockOutlined';
|
|
121
93
|
* import { Button } from '@mui/material';
|
|
122
94
|
*
|
|
123
95
|
* export default function Example() {
|
|
124
96
|
* return (
|
|
125
|
-
* <
|
|
97
|
+
* <FormLogin
|
|
126
98
|
* urlRecuperarConta="/recuperar"
|
|
127
99
|
* urlCriarConta="/cadastro"
|
|
128
100
|
* Icon={LockOutlinedIcon}
|
|
@@ -157,5 +129,5 @@ export interface LoginFormProps extends ColorProps, BorderProps, ButtonProps, Fi
|
|
|
157
129
|
* }
|
|
158
130
|
* ```
|
|
159
131
|
*/
|
|
160
|
-
declare const
|
|
161
|
-
export default
|
|
132
|
+
declare const FormSignUp: React.FC<FormSignUpProps>;
|
|
133
|
+
export default FormSignUp;
|