@pipelinesolucoes/form 1.0.0-beta.6 → 1.2.0-beta.1
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/ButtonFormStyled.d.ts +1 -1
- package/dist/components/FormStyled.d.ts +2 -2
- package/dist/components/NotificationSnackbar.js +1 -1
- package/dist/components/NotificationSnackbar.js.map +1 -1
- package/dist/components/TextFieldPassword.js +3 -2
- package/dist/components/TextFieldPassword.js.map +1 -1
- package/dist/components/TextFieldValidate.js +2 -2
- package/dist/components/TextFieldValidate.js.map +1 -1
- package/dist/components/login/{LoginForm.d.ts → FormLogin.d.ts} +9 -9
- package/dist/components/login/{LoginForm.js → FormLogin.js} +17 -7
- package/dist/components/login/FormLogin.js.map +1 -0
- package/dist/components/login/{PasswordRecoveryForm.d.ts → FormPasswordRecovery.d.ts} +3 -3
- package/dist/components/login/{PasswordRecoveryForm.js → FormPasswordRecovery.js} +4 -4
- package/dist/components/login/{PasswordRecoveryForm.js.map → FormPasswordRecovery.js.map} +1 -1
- package/dist/components/login/FormSignUp.d.ts +160 -0
- package/dist/components/login/FormSignUp.js +211 -0
- package/dist/components/login/FormSignUp.js.map +1 -0
- package/dist/index.d.ts +3 -3
- 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/package.json +6 -4
- package/dist/components/login/LoginForm.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/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pipelinesolucoes/form",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0-beta.1",
|
|
4
|
+
"license": "UNLICENSED",
|
|
4
5
|
"repository": {
|
|
5
6
|
"type": "git",
|
|
6
7
|
"url": "https://github.com/pipeline-solucoes/form.git"
|
|
@@ -31,11 +32,12 @@
|
|
|
31
32
|
}
|
|
32
33
|
},
|
|
33
34
|
"scripts": {
|
|
34
|
-
"build": "tsc
|
|
35
|
+
"build": "tsc",
|
|
35
36
|
"lint": "eslint .",
|
|
36
37
|
"prepublishOnly": "npm run build"
|
|
37
38
|
},
|
|
38
39
|
"dependencies": {
|
|
40
|
+
"@pipelinesolucoes/theme": "^1.0.1",
|
|
39
41
|
"react-google-recaptcha": "^3.1.0"
|
|
40
42
|
},
|
|
41
43
|
"peerDependencies": {
|
|
@@ -60,8 +62,8 @@
|
|
|
60
62
|
"@types/react-google-recaptcha": "^2.1.9",
|
|
61
63
|
"@types/react-input-mask": "^3.0.6",
|
|
62
64
|
"eslint": "^9",
|
|
63
|
-
"eslint-config-next": "15.1.6",
|
|
64
|
-
"next": "^16.0.7",
|
|
65
|
+
"eslint-config-next": "15.1.6",
|
|
66
|
+
"next": "^16.0.7",
|
|
65
67
|
"typescript": "^5"
|
|
66
68
|
}
|
|
67
69
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LoginForm.js","sourceRoot":"","sources":["../../../src/components/login/LoginForm.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,EAAE,OAAO,EAAgB,UAAU,EAAE,MAAM,eAAe,CAAC;AAC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,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,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,UAAU,EAAE,KAAK,EAAE,KAAK,EAAC,QAAQ,YACxC,KAAC,cAAc,IAAC,IAAI,EAAE,aAAa,EAAE,KAAK,EAAC,MAAM,EAAC,MAAM,EAAC,MAAM,EAAC,UAAU,EAAE,UAAU,EAAE,MAAM,EAAC,GAAG,4BAEjF,GACT,IACI,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"}
|
|
@@ -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,EAAE,MAAM,eAAe,CAAC;AACnG,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,eAAe,EAAE,M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ACD,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,MAA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