@pipelinesolucoes/form 1.0.0-beta.7 → 1.2.0-beta.10
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/SelectField.d.ts +73 -0
- package/dist/components/SelectField.js +140 -0
- package/dist/components/SelectField.js.map +1 -0
- package/dist/components/TextFieldPassword.d.ts +7 -33
- package/dist/components/TextFieldPassword.js +34 -23
- package/dist/components/TextFieldPassword.js.map +1 -1
- package/dist/components/TextFieldValidate.d.ts +8 -15
- package/dist/components/TextFieldValidate.js +47 -44
- package/dist/components/TextFieldValidate.js.map +1 -1
- package/dist/components/login/ClickResult.d.ts +11 -0
- package/dist/components/login/ClickResult.js +2 -0
- package/dist/components/login/ClickResult.js.map +1 -0
- package/dist/components/login/FormLogin.d.ts +150 -0
- package/dist/components/login/FormLogin.js +221 -0
- package/dist/components/login/FormLogin.js.map +1 -0
- package/dist/components/login/FormPasswordRecovery.d.ts +129 -0
- package/dist/components/login/FormPasswordRecovery.js +196 -0
- package/dist/components/login/FormPasswordRecovery.js.map +1 -0
- package/dist/components/login/FormSignUp.d.ts +147 -0
- package/dist/components/login/FormSignUp.js +215 -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/login/StyleLogin.d.ts +14 -0
- package/dist/components/login/StyleLogin.js +57 -0
- package/dist/components/login/StyleLogin.js.map +1 -0
- 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 +4 -7
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/dist/theme.d.ts +2 -2
- package/dist/theme.js +46 -20
- 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.d.ts +0 -161
- package/dist/components/login/LoginForm.js +0 -198
- package/dist/components/login/LoginForm.js.map +0 -1
- package/dist/components/login/PasswordRecoveryForm.d.ts +0 -142
- 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
|
@@ -1,169 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { useState } from 'react';
|
|
4
|
-
import { styled } 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 '../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'].includes(prop),
|
|
31
|
-
})(({ background, border_radius }) => ({
|
|
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
|
-
background: background !== null && background !== void 0 ? background : 'transparent',
|
|
40
|
-
}));
|
|
41
|
-
/**
|
|
42
|
-
* Componente de formulário para recuperação de senha via e-mail.
|
|
43
|
-
* Faz a validação do e-mail, dispara um `onSubmit` assíncrono (obrigatório) e exibe a mensagem retornada.
|
|
44
|
-
*
|
|
45
|
-
* @param {React.ElementType<SvgIconProps>} [Icon] Ícone do Material UI exibido no topo do formulário.
|
|
46
|
-
* @param {() => React.ReactElement} [titulo] Função que renderiza o título (ex.: <Typography />).
|
|
47
|
-
* @param {() => React.ReactElement} [subTitulo] Função que renderiza o subtítulo (ex.: <Typography />).
|
|
48
|
-
*
|
|
49
|
-
* @param {string} [background='transparent'] Cor/estilo de fundo do container externo.
|
|
50
|
-
* @param {string} [borderRadius='0px'] Borda arredondada do container externo.
|
|
51
|
-
*
|
|
52
|
-
* @param {string} [backgroundField='transparent'] Cor/estilo de fundo do campo de e-mail.
|
|
53
|
-
* @param {string} [colorField='#000'] Cor do texto do campo de e-mail.
|
|
54
|
-
* @param {string} [borderRadiusField='0px'] Borda arredondada do campo de e-mail.
|
|
55
|
-
* @param {string} [boxShadowField='none'] Sombra do campo de e-mail.
|
|
56
|
-
* @param {string} [borderColorField='#ccc'] Cor da borda do campo de e-mail.
|
|
57
|
-
* @param {string} [paddingField='4px 8px'] Espaçamento interno do campo de e-mail.
|
|
58
|
-
*
|
|
59
|
-
* @param {string} [textButton='Enviar'] Texto exibido no botão quando não está carregando.
|
|
60
|
-
* @param {TypographyVariant} [variantButton='body1'] Variant do Typography usado dentro do botão.
|
|
61
|
-
* @param {string} [backgroundButton='transparent'] Cor/estilo de fundo do botão.
|
|
62
|
-
* @param {string} [backgroundHoverButton='transparent'] Cor/estilo de fundo do botão no hover.
|
|
63
|
-
* @param {string} [colorButton='#000'] Cor do texto do botão.
|
|
64
|
-
* @param {string} [colorHoverButton='#000'] Cor do texto do botão no hover.
|
|
65
|
-
* @param {string} [borderRadiusButton='0'] Borda arredondada do botão.
|
|
66
|
-
* @param {string} [borderButton='none'] Borda do botão.
|
|
67
|
-
* @param {string} [boxShadowButton='none'] Sombra do botão.
|
|
68
|
-
* @param {string} [widthButton='auto'] Largura do botão.
|
|
69
|
-
* @param {string} [heightButton='auto'] Altura do botão.
|
|
70
|
-
* @param {string} [paddingButton='4px 24px'] Espaçamento interno do botão.
|
|
71
|
-
* @param {string} [marginButton='0'] Margem externa do botão.
|
|
72
|
-
*
|
|
73
|
-
* @param {string} color_message_sucess Cor aplicada na mensagem quando o submit retorna sucesso.
|
|
74
|
-
* @param {string} color_message_erro Cor aplicada na mensagem quando o submit retorna erro ou validação falha.
|
|
75
|
-
*
|
|
76
|
-
* @param {(email: string) => Promise<{ success: boolean; message: string }>} onSubmit
|
|
77
|
-
* Callback assíncrono obrigatório chamado após validação do e-mail. Deve retornar `{ success, message }`.
|
|
78
|
-
*
|
|
79
|
-
* @param {(success: boolean) => void} [onResult]
|
|
80
|
-
* Callback opcional disparado com o resultado final (true/false) após o submit (ou validação falhar).
|
|
81
|
-
*
|
|
82
|
-
* @param {React.ReactNode} [children] Conteúdo extra renderizado abaixo do formulário (ex.: links, textos auxiliares).
|
|
83
|
-
*
|
|
84
|
-
* @example
|
|
85
|
-
* ```tsx
|
|
86
|
-
* import RecuperarSenhaForm from '@/components/RecuperarSenhaForm';
|
|
87
|
-
* import { Typography } from '@mui/material';
|
|
88
|
-
*
|
|
89
|
-
* const Page = () => {
|
|
90
|
-
* return (
|
|
91
|
-
* <RecuperarSenhaForm
|
|
92
|
-
* titulo={() => <Typography variant="h5">Recuperar senha</Typography>}
|
|
93
|
-
* subTitulo={() => <Typography variant="body2">Digite seu e-mail para receber o link.</Typography>}
|
|
94
|
-
* background="#fff"
|
|
95
|
-
* borderRadius="12px"
|
|
96
|
-
* backgroundField="#fafafa"
|
|
97
|
-
* borderRadiusField="8px"
|
|
98
|
-
* borderColorField="#e0e0e0"
|
|
99
|
-
* paddingField="10px 12px"
|
|
100
|
-
* textButton="Enviar link"
|
|
101
|
-
* variantButton="button"
|
|
102
|
-
* backgroundButton="#1976d2"
|
|
103
|
-
* backgroundHoverButton="#1565c0"
|
|
104
|
-
* colorButton="#fff"
|
|
105
|
-
* colorHoverButton="#fff"
|
|
106
|
-
* borderRadiusButton="10px"
|
|
107
|
-
* widthButton="100%"
|
|
108
|
-
* color_message_sucess="green"
|
|
109
|
-
* color_message_erro="red"
|
|
110
|
-
* onSubmit={async (email) => {
|
|
111
|
-
* const response = await fetch('/api/recover', {
|
|
112
|
-
* method: 'POST',
|
|
113
|
-
* headers: { 'Content-Type': 'application/json' },
|
|
114
|
-
* body: JSON.stringify({ email }),
|
|
115
|
-
* });
|
|
116
|
-
*
|
|
117
|
-
* if (!response.ok) {
|
|
118
|
-
* return { success: false, message: 'Falha ao enviar o e-mail. Tente novamente.' };
|
|
119
|
-
* }
|
|
120
|
-
*
|
|
121
|
-
* return { success: true, message: 'Se o e-mail existir, enviaremos um link de recuperação.' };
|
|
122
|
-
* }}
|
|
123
|
-
* onResult={(success) => console.log('Resultado:', success)}
|
|
124
|
-
* >
|
|
125
|
-
* <Typography variant="caption">Verifique também sua caixa de spam.</Typography>
|
|
126
|
-
* </RecuperarSenhaForm>
|
|
127
|
-
* );
|
|
128
|
-
* };
|
|
129
|
-
* ```
|
|
130
|
-
*/
|
|
131
|
-
const PasswordRecoveryForm = ({ Icon, titulo, subTitulo, background = 'transparent', borderRadius = '0px', backgroundField = 'transparent', colorField = '#000', borderRadiusField = '0px', boxShadowField = 'none', borderColorField = "#ccc", paddingField = '4px 8px', textButton = "Enviar", variantButton = "body1", backgroundButton = 'transparent', backgroundHoverButton = 'transparent', colorButton = '#000', colorHoverButton = '#000', borderRadiusButton = '0', borderButton = 'none', boxShadowButton = 'none', widthButton = 'auto', heightButton = 'auto', paddingButton = '4px 24px', marginButton = '0', color_message_sucess, color_message_erro, onSubmit, onResult, children, }) => {
|
|
132
|
-
const [mensagemApi, setMensagemApi] = useState('');
|
|
133
|
-
const [corMensagemApi, setCorMensagemApi] = useState(color_message_erro);
|
|
134
|
-
const [email, setEmail] = useState('');
|
|
135
|
-
const [isLoading, setIsLoading] = useState(false);
|
|
136
|
-
const handleClick = async (e) => {
|
|
137
|
-
e.preventDefault();
|
|
138
|
-
if (!validateEmail(email)) {
|
|
139
|
-
setCorMensagemApi(color_message_erro);
|
|
140
|
-
setMensagemApi('Alguns dos dados fornecidos estão inválidos. Por favor, revise as informações preenchidas e corrija os campos destacados.');
|
|
141
|
-
onResult === null || onResult === void 0 ? void 0 : onResult(false);
|
|
142
|
-
return;
|
|
143
|
-
}
|
|
144
|
-
setIsLoading(true);
|
|
145
|
-
setMensagemApi('');
|
|
146
|
-
try {
|
|
147
|
-
const result = await onSubmit(email);
|
|
148
|
-
setMensagemApi(result.message);
|
|
149
|
-
setCorMensagemApi(result.success ? color_message_sucess : color_message_erro);
|
|
150
|
-
onResult === null || onResult === void 0 ? void 0 : onResult(result.success);
|
|
151
|
-
}
|
|
152
|
-
catch (_a) {
|
|
153
|
-
// Mesmo obrigando a mensagem vir do onSubmit, exceções podem acontecer (rede, throw etc.)
|
|
154
|
-
// Aqui escolhi exibir uma mensagem mínima interna para não deixar a UI muda.
|
|
155
|
-
setCorMensagemApi(color_message_erro);
|
|
156
|
-
setMensagemApi('Ocorreu um erro inesperado. Tente novamente.');
|
|
157
|
-
onResult === null || onResult === void 0 ? void 0 : onResult(false);
|
|
158
|
-
}
|
|
159
|
-
finally {
|
|
160
|
-
setIsLoading(false);
|
|
161
|
-
}
|
|
162
|
-
};
|
|
163
|
-
return (_jsxs(StyledRoot, { background: background, border_radius: borderRadius, 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: backgroundField, color: colorField, borderRadius: borderRadiusField, borderColor: borderColorField, boxShadow: boxShadowField, padding: paddingField, value: email, onChange: (e) => setEmail(e.target.value), required: true, requiredMessage: "Campo obrigat\u00F3rio", validate: validateEmailMessage, showErrorOn: "blur" }), _jsx(ButtonFormStyled, { backgroundButton: backgroundButton, backgroundHoverButton: backgroundHoverButton, colorButton: colorButton, colorHoverButton: colorHoverButton, borderRadiusButton: borderRadiusButton, borderButton: borderButton, boxShadowButton: boxShadowButton, widthButton: widthButton, heightButton: heightButton, paddingButton: paddingButton, marginButton: marginButton, disabled: isLoading, onClick: handleClick, children: isLoading
|
|
164
|
-
? 'Enviando...'
|
|
165
|
-
: _jsx(Typography, { variant: variantButton, component: "span", children: textButton }) }), mensagemApi && (_jsx(Typography, { variant: "body1", component: "span", color: corMensagemApi, children: mensagemApi }))] }), children] }));
|
|
166
|
-
};
|
|
167
|
-
PasswordRecoveryForm.displayName = 'PasswordRecoveryForm';
|
|
168
|
-
export default PasswordRecoveryForm;
|
|
169
|
-
//# sourceMappingURL=PasswordRecoveryForm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PasswordRecoveryForm.js","sourceRoot":"","sources":["../../../src/components/login/PasswordRecoveryForm.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAc,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,MAAM,EAAqB,MAAM,sBAAsB,CAAC;AACjE,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,qBAAqB,CAAC;AAKvD,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;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Q,EAAE,IAAI,EACd,eAAe,EAAC,wBAAmB,EACnC,QAAQ,EAAE,oBAAoB,EAC9B,WAAW,EAAC,MAAM,GAClB,EAEF,KAAC,gBAAgB,IACf,gBAAgB,EAAE,gBAAgB,EAClC,qBAAqB,EAAE,qBAAqB,EAC5C,WAAW,EAAE,WAAW,EACxB,gBAAgB,EAAE,gBAAgB,EAClC,kBAAkB,EAAE,kBAAkB,EACtC,YAAY,EAAE,YAAY,EAC1B,eAAe,EAAE,eAAe,EAChC,WAAW,EAAE,WAAW,EACxB,YAAY,EAAE,YAAY,EAC1B,aAAa,EAAE,aAAa,EAC5B,YAAY,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,26 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { SvgIconProps } from '@mui/material';
|
|
3
|
-
interface SignUpFormProps {
|
|
4
|
-
Icon?: React.ElementType<SvgIconProps>;
|
|
5
|
-
titulo?: () => React.ReactElement;
|
|
6
|
-
googleButton: () => React.ReactElement;
|
|
7
|
-
color: string;
|
|
8
|
-
background?: string;
|
|
9
|
-
border_radius?: string;
|
|
10
|
-
background_color_field?: string;
|
|
11
|
-
border_radius_field?: string;
|
|
12
|
-
color_button: string;
|
|
13
|
-
background_color_button?: string;
|
|
14
|
-
border_radius_button?: string;
|
|
15
|
-
text_button: string;
|
|
16
|
-
message_sucess: string;
|
|
17
|
-
color_message_sucess: string;
|
|
18
|
-
message_erro?: string;
|
|
19
|
-
color_message_erro: string;
|
|
20
|
-
color_separador: string;
|
|
21
|
-
children?: React.ReactNode;
|
|
22
|
-
urlLogin: string;
|
|
23
|
-
color_link: string;
|
|
24
|
-
}
|
|
25
|
-
declare const SignUpForm: React.FC<SignUpFormProps>;
|
|
26
|
-
export default SignUpForm;
|
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { useState } from 'react';
|
|
4
|
-
import { styled } from '@mui/material/styles';
|
|
5
|
-
import { Box, Divider, IconButton, InputAdornment, Typography } from '@mui/material';
|
|
6
|
-
import { ButtonFormStyled, LinkFormStyled, TextFieldStyled } from '../FormStyled';
|
|
7
|
-
import VisibilityOffIcon from '@mui/icons-material/VisibilityOff';
|
|
8
|
-
import VisibilityIcon from '@mui/icons-material/Visibility';
|
|
9
|
-
const FormContainer = styled('div')(() => ({
|
|
10
|
-
display: 'flex',
|
|
11
|
-
flexDirection: 'column',
|
|
12
|
-
gap: '16px',
|
|
13
|
-
width: '100%',
|
|
14
|
-
margin: 'auto',
|
|
15
|
-
padding: '0px',
|
|
16
|
-
}));
|
|
17
|
-
const DivPassword = styled('div')(() => ({
|
|
18
|
-
display: 'flex',
|
|
19
|
-
flexDirection: 'column',
|
|
20
|
-
gap: '8px',
|
|
21
|
-
width: '100%',
|
|
22
|
-
margin: '0',
|
|
23
|
-
padding: '0',
|
|
24
|
-
}));
|
|
25
|
-
const DivTitulo = styled('div')(() => ({
|
|
26
|
-
display: 'flex',
|
|
27
|
-
flexDirection: 'column',
|
|
28
|
-
gap: '8px',
|
|
29
|
-
width: '100%',
|
|
30
|
-
margin: '0',
|
|
31
|
-
padding: '0',
|
|
32
|
-
alignItems: 'center',
|
|
33
|
-
justifyContent: 'center'
|
|
34
|
-
}));
|
|
35
|
-
const DivLink = styled("div", {
|
|
36
|
-
shouldForwardProp: (prop) => !['text_color', 'align'].includes(prop),
|
|
37
|
-
})(({ theme, text_color, align }) => ({
|
|
38
|
-
display: 'flex',
|
|
39
|
-
flexDirection: 'row',
|
|
40
|
-
alignItems: 'center',
|
|
41
|
-
justifyContent: align,
|
|
42
|
-
width: '100%',
|
|
43
|
-
padding: '0',
|
|
44
|
-
flex: '1',
|
|
45
|
-
color: text_color,
|
|
46
|
-
}));
|
|
47
|
-
const SignUpForm = ({ Icon, titulo, googleButton, color, background = 'transparent', border_radius = '0px', background_color_field = 'transparent', border_radius_field = '0px', color_button, background_color_button = 'transparent', border_radius_button = '0px', text_button, message_sucess, color_message_sucess, message_erro, color_message_erro, color_separador, children, urlLogin, color_link, }) => {
|
|
48
|
-
const [mensagemApi, setMensagemApi] = useState('');
|
|
49
|
-
const [corMensagemApi, setCorMensagemApi] = useState(color_message_erro);
|
|
50
|
-
const [email, setEmail] = useState('');
|
|
51
|
-
const [password, setPassword] = useState('');
|
|
52
|
-
const [errors, setErrors] = useState({});
|
|
53
|
-
const [isLoading, setIsLoading] = useState(false);
|
|
54
|
-
const [showPassword, setShowPassword] = useState(false);
|
|
55
|
-
const [showConfirmPassword, setShowConfirmPassword] = useState(false);
|
|
56
|
-
const [confirmPassword, setConfirmPassword] = useState('');
|
|
57
|
-
const validateEmail = (email) => /\S+@\S+\.\S+/.test(email);
|
|
58
|
-
const handleBlur = (field) => {
|
|
59
|
-
switch (field) {
|
|
60
|
-
case 'email':
|
|
61
|
-
setErrors((prevErrors) => (Object.assign(Object.assign({}, prevErrors), { email: !validateEmail(email) })));
|
|
62
|
-
break;
|
|
63
|
-
case 'password':
|
|
64
|
-
setErrors((prevErrors) => (Object.assign(Object.assign({}, prevErrors), { password: !password.trim() })));
|
|
65
|
-
break;
|
|
66
|
-
case 'confirmPassword':
|
|
67
|
-
setErrors((prevErrors) => (Object.assign(Object.assign({}, prevErrors), { confirmPassword: confirmPassword !== password })));
|
|
68
|
-
break;
|
|
69
|
-
default:
|
|
70
|
-
break;
|
|
71
|
-
}
|
|
72
|
-
};
|
|
73
|
-
const handleSubmit = async (e) => {
|
|
74
|
-
e.preventDefault();
|
|
75
|
-
// Validação dos campos
|
|
76
|
-
const newErrors = {
|
|
77
|
-
email: !validateEmail(email),
|
|
78
|
-
password: !password.trim(),
|
|
79
|
-
confirmPassword: confirmPassword !== password,
|
|
80
|
-
};
|
|
81
|
-
setErrors(newErrors);
|
|
82
|
-
const hasErrors = Object.values(newErrors).some(Boolean);
|
|
83
|
-
if (hasErrors) {
|
|
84
|
-
setCorMensagemApi(color_message_erro);
|
|
85
|
-
setMensagemApi(`Alguns dos dados fornecidos estão inválidos. Por favor, revise as informações preenchidas e corrija os campos destacados.`);
|
|
86
|
-
return;
|
|
87
|
-
}
|
|
88
|
-
setIsLoading(true);
|
|
89
|
-
setMensagemApi('');
|
|
90
|
-
//try {
|
|
91
|
-
const formData = new FormData();
|
|
92
|
-
formData.append('email', email);
|
|
93
|
-
formData.append('password', password);
|
|
94
|
-
// const response = await fetch('https://backend-sites-pipelinesolucoes.onrender.com/send-email-gmail', {
|
|
95
|
-
// method: 'POST',
|
|
96
|
-
// headers: {
|
|
97
|
-
// Authorization: `Bearer ${token_bearer}`,
|
|
98
|
-
// },
|
|
99
|
-
// body: formData,
|
|
100
|
-
// });
|
|
101
|
-
// if (response.status === 200) {
|
|
102
|
-
//setCorMensagemApi(color_message_sucess);
|
|
103
|
-
//setMensagemApi(message_sucess);
|
|
104
|
-
setEmail('');
|
|
105
|
-
setPassword('');
|
|
106
|
-
// setErrors({});
|
|
107
|
-
// } else {
|
|
108
|
-
// setCorMensagemApi(color_message_erro);
|
|
109
|
-
// setMensagemApi(
|
|
110
|
-
// message_erro ??
|
|
111
|
-
// `Houve um problema ao enviar sua mensagem. Por favor, verifique sua conexão e tente novamente mais tarde.`
|
|
112
|
-
// );
|
|
113
|
-
// console.error('Erro ao enviar dados:', response.statusText);
|
|
114
|
-
// }
|
|
115
|
-
// } catch (error) {
|
|
116
|
-
// setCorMensagemApi(color_message_erro);
|
|
117
|
-
// setMensagemApi(
|
|
118
|
-
// message_erro ??
|
|
119
|
-
// `Houve um problema ao enviar sua mensagem. Por favor, verifique sua conexão e tente novamente mais tarde.`
|
|
120
|
-
// );
|
|
121
|
-
// console.error('Erro na solicitação:', error);
|
|
122
|
-
// } finally {
|
|
123
|
-
// setIsLoading(false);
|
|
124
|
-
// }
|
|
125
|
-
};
|
|
126
|
-
return (_jsxs(Box, { display: "flex", flexDirection: 'column', justifyContent: "center", gap: "24px", flex: 1, sx: { padding: "24px", borderRadius: border_radius, background: background }, children: [(Icon || titulo) &&
|
|
127
|
-
_jsxs(DivTitulo, { children: [Icon && _jsx(Icon, {}), titulo && titulo()] }), _jsxs(FormContainer, { children: [googleButton && googleButton(), _jsx(Divider, { sx: { borderColor: color_separador }, children: "ou" }), _jsx(TextFieldStyled, { id: "email", label: "Email", placeholder: "Email", value: email, onChange: (e) => setEmail(e.target.value), onBlur: () => handleBlur('email'), error: errors.email, helperText: errors.email && _jsx("span", { style: { color: color_message_erro }, children: "Email inv\u00E1lido" }), required: true, background_color: background_color_field, text_color: color, text_color_error: color_message_erro, border_radius: border_radius_field }), _jsxs(DivPassword, { children: [_jsx(TextFieldStyled, { id: "password", label: "Senha", type: showPassword ? 'text' : 'password', value: password, onChange: (e) => setPassword(e.target.value), onBlur: () => handleBlur('password'), error: errors.password, helperText: errors.password && (_jsx("span", { style: { color: color_message_erro }, children: "Senha inv\u00E1lida" })), required: true, background_color: background_color_field, text_color: color, text_color_error: color_message_erro, border_radius: border_radius_field, slotProps: {
|
|
128
|
-
input: {
|
|
129
|
-
endAdornment: (_jsx(InputAdornment, { position: "end", children: _jsx(IconButton, { onClick: () => setShowPassword((prev) => !prev), edge: "end", children: showPassword ? _jsx(VisibilityOffIcon, {}) : _jsx(VisibilityIcon, {}) }) })),
|
|
130
|
-
},
|
|
131
|
-
} }), _jsx(TextFieldStyled, { id: "passwordconfirmada", label: "Confirmar Senha", type: showConfirmPassword ? 'text' : 'password', value: confirmPassword, onChange: (e) => setConfirmPassword(e.target.value), onBlur: () => handleBlur('confirmPassword'), error: errors.confirmPassword, helperText: errors.confirmPassword && (_jsx("span", { style: { color: color_message_erro }, children: "As senhas n\u00E3o coincidem" })), required: true, background_color: background_color_field, text_color: color, text_color_error: color_message_erro, border_radius: border_radius_field, slotProps: {
|
|
132
|
-
input: {
|
|
133
|
-
endAdornment: (_jsx(InputAdornment, { position: "end", children: _jsx(IconButton, { onClick: () => setShowConfirmPassword((prev) => !prev), edge: "end", children: showConfirmPassword ? _jsx(VisibilityOffIcon, {}) : _jsx(VisibilityIcon, {}) }) })),
|
|
134
|
-
},
|
|
135
|
-
} })] }), _jsx(ButtonFormStyled, { width: "100%", height: "100%", onClick: handleSubmit, background_color: background_color_button, text_color: color_button, border_radius: border_radius_button, disabled: isLoading, margin: '16px 0 0 0', children: isLoading ? 'Enviando...' : text_button }), mensagemApi && (_jsx(Typography, { variant: "body1", component: "span", color: corMensagemApi, children: mensagemApi })), _jsxs(DivLink, { text_color: color, align: "center", children: ["J\u00E1 tem uma conta?", _jsx(LinkFormStyled, { href: urlLogin, width: "auto", height: "100%", text_color: color_link, margin: '0 0 0 8px', children: "Entrar" })] })] }), children] }));
|
|
136
|
-
};
|
|
137
|
-
export default SignUpForm;
|
|
138
|
-
//# sourceMappingURL=SignUpForm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SignUpForm.js","sourceRoot":"","sources":["../../../src/components/login/SignUpForm.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAc,EAAU,QAAQ,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,UAAU,EAAE,cAAc,EAAgB,UAAU,EA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BAAiB,KAAG,CAAC,CAAC,CAAC,KAAC,cAAc,KAAG,GACtD,GACE,CAClB;qCACF;iCACF,GACD,IAEU,EAGd,KAAC,gBAAgB,IAAC,KAAK,EAAC,MAAM,EAAC,MAAM,EAAC,MAAM,EAC1C,OAAO,EAAE,YAAY,EACrB,gBAAgB,EAAE,uBAAuB,EACzC,UAAU,EAAE,YAAY,EACxB,aAAa,EAAE,oBAAoB,EACnC,QAAQ,EAAE,SAAS,EACnB,MAAM,EAAC,YAAY,YAElB,SAAS,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,WAAW,GACvB,EAClB,WAAW,IAAI,CACd,KAAC,UAAU,IAAC,OAAO,EAAC,OAAO,EAAC,SAAS,EAAC,MAAM,EAAC,KAAK,EAAE,cAAc,YAC/D,WAAW,GACD,CACd,EAED,MAAC,OAAO,IAAC,UAAU,EAAE,KAAK,EAAE,KAAK,EAAC,QAAQ,uCAExC,KAAC,cAAc,IAAC,IAAI,EAAE,QAAQ,EAC5B,KAAK,EAAC,MAAM,EAAC,MAAM,EAAC,MAAM,EAAC,UAAU,EAAE,UAAU,EAAE,MAAM,EAAC,WAAW,uBAEtD,IACT,IAEI,EAEf,QAAQ,IAEL,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
package/dist/mui-theme.d.ts
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import "@mui/material/styles";
|
|
2
|
-
|
|
3
|
-
export interface PipeSolFormTokens {
|
|
4
|
-
|
|
5
|
-
notification?: {
|
|
6
|
-
background: string;
|
|
7
|
-
},
|
|
8
|
-
field?: {
|
|
9
|
-
background?: string;
|
|
10
|
-
backgroundDisabled?: string;
|
|
11
|
-
color?: string;
|
|
12
|
-
colorFocused?: string;
|
|
13
|
-
colorDisabled?: string;
|
|
14
|
-
borderRadius?: string;
|
|
15
|
-
boxShadow?: string;
|
|
16
|
-
borderColor?: string;
|
|
17
|
-
padding?: string;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
declare module "@mui/material/styles" {
|
|
22
|
-
interface Theme {
|
|
23
|
-
pipesol?: {
|
|
24
|
-
forms?: PipeSolFormTokens;
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
interface ThemeOptions {
|
|
29
|
-
pipesol?: {
|
|
30
|
-
forms?: PipeSolFormTokens;
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
}
|
package/dist/mui-theme.js
DELETED
package/dist/mui-theme.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mui-theme.js","sourceRoot":"","sources":["../src/mui-theme.ts"],"names":[],"mappings":""}
|
package/dist/pages/_app.d.ts
DELETED
package/dist/pages/_app.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { ThemeProvider as MuiThemeProvider } from '@mui/material/styles';
|
|
4
|
-
import CssBaseline from '@mui/material/CssBaseline';
|
|
5
|
-
import { CacheProvider } from '@emotion/react';
|
|
6
|
-
import createCache from '@emotion/cache';
|
|
7
|
-
import { theme } from '@/theme';
|
|
8
|
-
// Crie uma instância de cache para o Emotion
|
|
9
|
-
const cache = createCache({ key: 'css', prepend: true });
|
|
10
|
-
export default function MyApp({ Component, pageProps }) {
|
|
11
|
-
React.useEffect(() => {
|
|
12
|
-
// Remove o CSS injetado pelo servidor, se existir
|
|
13
|
-
const jssStyles = document.querySelector('#jss-server-side');
|
|
14
|
-
if (jssStyles && jssStyles.parentElement) {
|
|
15
|
-
jssStyles.parentElement.removeChild(jssStyles);
|
|
16
|
-
}
|
|
17
|
-
}, []);
|
|
18
|
-
return (_jsx(CacheProvider, { value: cache, children: _jsxs(MuiThemeProvider, { theme: theme, children: [_jsx(CssBaseline, {}), _jsx(Component, Object.assign({}, pageProps))] }) }));
|
|
19
|
-
}
|
|
20
|
-
//# sourceMappingURL=_app.js.map
|
package/dist/pages/_app.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_app.js","sourceRoot":"","sources":["../../src/pages/_app.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,aAAa,IAAI,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACzE,OAAO,WAAW,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,WAAW,MAAM,gBAAgB,CAAC;AAEzC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAGhC,6CAA6C;AAC7C,MAAM,KAAK,GAAG,WAAW,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;AAEzD,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,EAAE,SAAS,EAAE,SAAS,EAAY;IAC9D,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,kDAAkD;QAClD,MAAM,SAAS,GAAG,QAAQ,CAAC,aAAa,CAAC,kBAAkB,CAAC,CAAC;QAC7D,IAAI,SAAS,IAAI,SAAS,CAAC,aAAa,EAAE,CAAC;YACzC,SAAS,CAAC,aAAa,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;QACjD,CAAC;IACH,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CACL,KAAC,aAAa,IAAC,KAAK,EAAE,KAAK,YACzB,MAAC,gBAAgB,IAAC,KAAK,EAAE,KAAK,aAC5B,KAAC,WAAW,KAAe,EAC3B,KAAC,SAAS,oBAAK,SAAS,EAAe,IACtB,GACL,CACjB,CAAC;AACJ,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import Document, { DocumentContext } from "next/document";
|
|
2
|
-
export default class MyDocument extends Document {
|
|
3
|
-
static getInitialProps(ctx: DocumentContext): Promise<{
|
|
4
|
-
styles: import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
html: string;
|
|
6
|
-
head?: Array<import("react").JSX.Element | null>;
|
|
7
|
-
}>;
|
|
8
|
-
render(): import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
}
|
package/dist/pages/_document.js
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import Document, { Html, Head, Main, NextScript } from "next/document";
|
|
3
|
-
import createCache from "@emotion/cache";
|
|
4
|
-
import createEmotionServer from "@emotion/server/create-instance";
|
|
5
|
-
import { CacheProvider } from "@emotion/react";
|
|
6
|
-
// Função para criar o cache do Emotion
|
|
7
|
-
const createEmotionCache = () => {
|
|
8
|
-
return createCache({ key: "css", prepend: true });
|
|
9
|
-
};
|
|
10
|
-
export default class MyDocument extends Document {
|
|
11
|
-
static async getInitialProps(ctx) {
|
|
12
|
-
const cache = createEmotionCache();
|
|
13
|
-
const { extractCriticalToChunks } = createEmotionServer(cache);
|
|
14
|
-
const originalRenderPage = ctx.renderPage;
|
|
15
|
-
try {
|
|
16
|
-
ctx.renderPage = () => originalRenderPage({
|
|
17
|
-
enhanceApp: (App) => (props) => (_jsx(CacheProvider, { value: cache, children: _jsx(App, Object.assign({}, props)) })),
|
|
18
|
-
});
|
|
19
|
-
const initialProps = await Document.getInitialProps(ctx);
|
|
20
|
-
// Extrai os estilos críticos para renderização no lado do servidor
|
|
21
|
-
const emotionStyles = extractCriticalToChunks(initialProps.html);
|
|
22
|
-
const emotionStyleTags = emotionStyles.styles.map((style) => (_jsx("style", { "data-emotion": `${style.key} ${style.ids.join(" ")}`, dangerouslySetInnerHTML: { __html: style.css } }, style.key)));
|
|
23
|
-
return Object.assign(Object.assign({}, initialProps), { styles: (_jsxs(_Fragment, { children: [initialProps.styles, emotionStyleTags] })) });
|
|
24
|
-
}
|
|
25
|
-
finally {
|
|
26
|
-
// Nada a liberar como no caso do styled-components
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
render() {
|
|
30
|
-
return (_jsxs(Html, { lang: "pt", children: [_jsx(Head, {}), _jsxs("body", { children: [_jsx(Main, {}), _jsx(NextScript, {})] })] }));
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
//# sourceMappingURL=_document.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_document.js","sourceRoot":"","sources":["../../src/pages/_document.tsx"],"names":[],"mappings":";AAAA,OAAO,QAAQ,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAmB,MAAM,eAAe,CAAC;AACxF,OAAO,WAAW,MAAM,gBAAgB,CAAC;AACzC,OAAO,mBAAmB,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/C,uCAAuC;AACvC,MAAM,kBAAkB,GAAG,GAAG,EAAE;IAC9B,OAAO,WAAW,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;AACpD,CAAC,CAAC;AAEF,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,QAAQ;IAC9C,MAAM,CAAC,KAAK,CAAC,eAAe,CAAC,GAAoB;QAC/C,MAAM,KAAK,GAAG,kBAAkB,EAAE,CAAC;QACnC,MAAM,EAAE,uBAAuB,EAAE,GAAG,mBAAmB,CAAC,KAAK,CAAC,CAAC;QAE/D,MAAM,kBAAkB,GAAG,GAAG,CAAC,UAAU,CAAC;QAE1C,IAAI,CAAC;YACH,GAAG,CAAC,UAAU,GAAG,GAAG,EAAE,CACpB,kBAAkB,CAAC;gBACjB,UAAU,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,KAAK,EAAE,EAAE,CAC7B,CACE,KAAC,aAAa,IAAC,KAAK,EAAE,KAAK,YACzB,KAAC,GAAG,oBAAK,KAAK,EAAI,GACJ,CACjB;aACJ,CAAC,CAAC;YAEL,MAAM,YAAY,GAAG,MAAM,QAAQ,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC;YAEzD,mEAAmE;YACnE,MAAM,aAAa,GAAG,uBAAuB,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;YACjE,MAAM,gBAAgB,GAAG,aAAa,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAC3D,gCAEgB,GAAG,KAAK,CAAC,GAAG,IAAI,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,EACnD,uBAAuB,EAAE,EAAE,MAAM,EAAE,KAAK,CAAC,GAAG,EAAE,IAFzC,KAAK,CAAC,GAAG,CAGd,CACH,CAAC,CAAC;YAEH,uCACK,YAAY,KACf,MAAM,EAAE,CACN,8BACG,YAAY,CAAC,MAAM,EACnB,gBAAgB,IAChB,CACJ,IACD;QACJ,CAAC;gBAAS,CAAC;YACT,mDAAmD;QACrD,CAAC;IACH,CAAC;IAED,MAAM;QACJ,OAAO,CACL,MAAC,IAAI,IAAC,IAAI,EAAC,IAAI,aACb,KAAC,IAAI,KACE,EACP,2BACE,KAAC,IAAI,KAAG,EACR,KAAC,UAAU,KAAG,IACT,IACF,CACR,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BorderProps.js","sourceRoot":"","sources":["../../src/types/BorderProps.ts"],"names":[],"mappings":""}
|
package/dist/types/ColorProps.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ColorProps.js","sourceRoot":"","sources":["../../src/types/ColorProps.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LayoutProps.js","sourceRoot":"","sources":["../../src/types/LayoutProps.ts"],"names":[],"mappings":""}
|
package/dist/types/TextProps.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TextProps.js","sourceRoot":"","sources":["../../src/types/TextProps.ts"],"names":[],"mappings":""}
|