diff --git a/.eslintrc.json b/.eslintrc.json
index a98d7291..534c7ebc 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -4,6 +4,7 @@
"@rocketseat/eslint-config/next"
],
"rules": {
- "no-unused-vars": "off"
+ "no-unused-vars": "off",
+ "@typescript-eslint/no-explicit-any": "off"
}
}
\ No newline at end of file
diff --git a/package-lock.json b/package-lock.json
index 4dcf9e2d..ad24c5d5 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -25,6 +25,7 @@
"formik": "^2.4.2",
"framer-motion": "^10.13.0",
"next": "13.4.12",
+ "phosphor-react": "^1.4.1",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-easy-crop": "^5.0.2",
@@ -7105,6 +7106,17 @@
"node": ">=8"
}
},
+ "node_modules/phosphor-react": {
+ "version": "1.4.1",
+ "resolved": "https://registry.npmjs.org/phosphor-react/-/phosphor-react-1.4.1.tgz",
+ "integrity": "sha512-gO5j7U0xZrdglTAYDYPACU4xDOFBTJmptrrB/GeR+tHhCZF3nUMyGmV/0hnloKjuTrOmpSFlbfOY78H39rgjUQ==",
+ "engines": {
+ "node": ">=10"
+ },
+ "peerDependencies": {
+ "react": ">=16"
+ }
+ },
"node_modules/picocolors": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz",
diff --git a/package.json b/package.json
index d7ede534..ac4fc99e 100644
--- a/package.json
+++ b/package.json
@@ -36,10 +36,10 @@
"formik": "^2.4.2",
"framer-motion": "^10.13.0",
"next": "13.4.12",
+ "phosphor-react": "^1.4.1",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-easy-crop": "^5.0.2",
- "react-fast-marquee": "^1.6.0",
"react-toastify": "^9.1.3",
"styled-components": "^6.0.5",
"swiper": "^10.0.4",
diff --git a/src/assets/homepage/footer/discord.webp b/src/assets/homepage/footer/discord.webp
deleted file mode 100644
index a2018d01..00000000
Binary files a/src/assets/homepage/footer/discord.webp and /dev/null differ
diff --git a/src/assets/homepage/footer/face.webp b/src/assets/homepage/footer/face.webp
deleted file mode 100644
index ff513b80..00000000
Binary files a/src/assets/homepage/footer/face.webp and /dev/null differ
diff --git a/src/assets/homepage/footer/github.webp b/src/assets/homepage/footer/github.webp
deleted file mode 100644
index 4eec1357..00000000
Binary files a/src/assets/homepage/footer/github.webp and /dev/null differ
diff --git a/src/assets/homepage/footer/insta.webp b/src/assets/homepage/footer/insta.webp
deleted file mode 100644
index 70a1ede5..00000000
Binary files a/src/assets/homepage/footer/insta.webp and /dev/null differ
diff --git a/src/assets/homepage/footer/linkedin.webp b/src/assets/homepage/footer/linkedin.webp
deleted file mode 100644
index 1248662e..00000000
Binary files a/src/assets/homepage/footer/linkedin.webp and /dev/null differ
diff --git a/src/assets/homepage/footer/telegram.webp b/src/assets/homepage/footer/telegram.webp
deleted file mode 100644
index b2487594..00000000
Binary files a/src/assets/homepage/footer/telegram.webp and /dev/null differ
diff --git a/src/assets/homepage/footer/twitch.webp b/src/assets/homepage/footer/twitch.webp
deleted file mode 100644
index d3c8bbfa..00000000
Binary files a/src/assets/homepage/footer/twitch.webp and /dev/null differ
diff --git a/src/assets/homepage/footer/twitter.webp b/src/assets/homepage/footer/twitter.webp
deleted file mode 100644
index 15856533..00000000
Binary files a/src/assets/homepage/footer/twitter.webp and /dev/null differ
diff --git a/src/assets/homepage/footer/youtube.webp b/src/assets/homepage/footer/youtube.webp
deleted file mode 100644
index 66c71c50..00000000
Binary files a/src/assets/homepage/footer/youtube.webp and /dev/null differ
diff --git a/src/assets/homepage/onboarding/conecte.svg b/src/assets/homepage/onboarding/conecte.svg
deleted file mode 100644
index a56b39d0..00000000
--- a/src/assets/homepage/onboarding/conecte.svg
+++ /dev/null
@@ -1,46 +0,0 @@
-
diff --git a/src/assets/homepage/onboarding/descreva.svg b/src/assets/homepage/onboarding/descreva.svg
index 03531958..f2c7f426 100644
--- a/src/assets/homepage/onboarding/descreva.svg
+++ b/src/assets/homepage/onboarding/descreva.svg
@@ -1,68 +1,82 @@
-
+
\ No newline at end of file
diff --git a/src/assets/homepage/onboarding/encontre.svg b/src/assets/homepage/onboarding/encontre.svg
index 35fd0bfe..632bc2c7 100644
--- a/src/assets/homepage/onboarding/encontre.svg
+++ b/src/assets/homepage/onboarding/encontre.svg
@@ -1,51 +1,70 @@
-
+
\ No newline at end of file
diff --git a/src/assets/homepage/onboarding/marque.svg b/src/assets/homepage/onboarding/marque.svg
index 7f9467cd..336db38e 100644
--- a/src/assets/homepage/onboarding/marque.svg
+++ b/src/assets/homepage/onboarding/marque.svg
@@ -1,74 +1,85 @@
-
+
\ No newline at end of file
diff --git a/src/assets/logos/sou-junior.svg b/src/assets/logos/sou-junior.svg
index 79fc6cf1..e41b2299 100644
--- a/src/assets/logos/sou-junior.svg
+++ b/src/assets/logos/sou-junior.svg
@@ -1,18 +1,4 @@
-
-
+
Voltar ao login
diff --git a/src/components/molecules/FormEmailToReset/styled.ts b/src/components/molecules/FormEmailToReset/styled.ts
index 5749a309..4393df91 100644
--- a/src/components/molecules/FormEmailToReset/styled.ts
+++ b/src/components/molecules/FormEmailToReset/styled.ts
@@ -5,24 +5,25 @@ export const ContainerForm = styled.div`
height: 36.875rem;
background: ${(props) => props.theme.colors.white};
border-radius: 12px;
- padding: 12px 0px;
form {
- p {
- color: ${(props) => props.theme.colors.gray[700]};
- font-size: 24px;
- font-weight: 700;
- line-height: 29px;
- letter-spacing: 0em;
- text-align: left;
- }
- span {
- color: ${(props) => props.theme.colors.gray[700]};
- font-size: 16px;
- font-weight: 400;
- line-height: 24px;
- letter-spacing: 0em;
- text-align: left;
+ display: flex;
+ flex-direction: column;
+
+ label {
+ span {
+ font-size: ${(props) => props.theme.fontSizes.xs};
+ }
+
+ span:first-child {
+ font-size: 1rem;
+ line-height: 1.5rem;
+ color: ${(props) => props.theme.colors.gray[750]};
+ }
+
+ input {
+ font-size: 1rem;
+ }
}
button {
@@ -32,16 +33,27 @@ export const ContainerForm = styled.div`
`
export const MessagesContainer = styled.div`
- margin: 30px 0px;
+ margin: 1.5rem 0px;
+
+ h2 {
+ color: ${(props) => props.theme.colors.gray[750]};
+ font-size: ${(props) => props.theme.fontSizes.lg};
+ font-weight: 700;
+ line-height: 1.8rem;
+ text-align: left;
+ margin-bottom: 1rem;
+ }
+
p {
- margin-bottom: 20px;
+ color: ${(props) => props.theme.colors.gray[750]};
+ font-size: 1rem;
+ line-height: 1.5rem;
+ text-align: left;
}
`
-// ... seu código anterior ...
-
export const FormWrapper = styled.div`
- padding: 10px 30px;
+ padding: 2rem;
height: 100%;
width: 100%;
display: flex;
@@ -57,4 +69,8 @@ export const FormWrapper = styled.div`
text-align: center;
cursor: pointer;
}
+
+ button {
+ margin-top: 1.5rem !important;
+ }
`
diff --git a/src/components/molecules/FormLogin/index.tsx b/src/components/molecules/FormLogin/index.tsx
index 91ee9029..ebfde21d 100644
--- a/src/components/molecules/FormLogin/index.tsx
+++ b/src/components/molecules/FormLogin/index.tsx
@@ -1,34 +1,44 @@
import CardLoading from '@/assets/loading.gif'
import souJuniorLogoImg from '@/assets/logos/sou-junior.svg'
import { Button } from '@/components/atoms/Button'
-import { InputLogin } from '@/components/atoms/InputLogin'
import Image from 'next/image'
import Link from 'next/link'
-import { FormEvent, useEffect, useState } from 'react'
+import { useState } from 'react'
import { ToastContainer } from 'react-toastify'
import 'react-toastify/dist/ReactToastify.css'
import { Checkbox } from '../../atoms/Checkbox'
-import { ContainerForm } from './style'
+import {
+ BlockedAccountError,
+ CallToRegisterText,
+ ContainerCheckbox,
+ ContainerForm,
+ ContainerInput,
+} from './style'
import UserLoginService from '@/services/user/userLoginService'
+import { Form, Formik } from 'formik'
+import * as yup from 'yup'
+import { InputForm } from '@/components/atoms/InputForm'
+import { LockOutlined, PersonOutlineRounded } from '@mui/icons-material'
+import { Eye } from '@/components/atoms/Eye'
+
+const loginSchema = yup.object({
+ email: yup.string().email('E-mail inválido').required('Obrigatório'),
+ password: yup
+ .string()
+ .required('A senha é obrigatória')
+ .min(8, 'Senha inválida'),
+})
+
+type LoginDataType = yup.InferType
export function FormLogin() {
- const [email, setEmail] = useState('')
- const [password, setPassword] = useState('')
const [isKeepConnected, setIsKeepConnected] = useState(false)
+ const [isPasswordVisible, setIsPasswordVisible] = useState(false)
const type = 'mentor'
- const {
- sendLogin,
- formState,
- checkFields,
- disable,
- setSubmitButton,
- submitButton,
- loading,
- } = UserLoginService()
+ const { sendLogin, disable, submitButton, loading } = UserLoginService()
- const handleSubmit = async (event: FormEvent) => {
- event.preventDefault()
+ const handleSubmit = async ({ email, password }: LoginDataType) => {
const user = await sendLogin({ email, password, type })
const userStringify = JSON.stringify(user)
@@ -40,12 +50,6 @@ export function FormLogin() {
}
}
- useEffect(() => {
- const data = { email, password, type, isKeepConnected }
- setSubmitButton(!checkFields(data))
- // eslint-disable-next-line react-hooks/exhaustive-deps
- }, [email, password, type])
-
return (
<>
+
-
+ )
+ }}
+
>
)
diff --git a/src/components/molecules/FormLogin/style.ts b/src/components/molecules/FormLogin/style.ts
index 88f4b1db..028a04a9 100644
--- a/src/components/molecules/FormLogin/style.ts
+++ b/src/components/molecules/FormLogin/style.ts
@@ -1,45 +1,110 @@
import styled from 'styled-components'
export const ContainerForm = styled.div`
- max-width: 500px;
+ max-width: 31.5rem;
width: 100%;
+
display: flex;
flex-direction: column;
- background-color: ${(props) => props.theme.colors.white};
- position: absolute;
- top: 10%;
- right: 5%;
- border-radius: 12px;
- padding: 32px;
- filter: drop-shadow(1px 4px 20px rgba(0, 0, 0, 0.4))
- drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.25));
+ background: ${(props) => props.theme.colors.white};
+ border-radius: 0.5rem;
+ padding: 1.5rem;
+
+ img {
+ margin-bottom: 1rem;
+ width: 16.5rem;
+ height: 3rem;
+ }
+
+ h2 {
+ font-weight: 500;
+ font-size: ${(props) => props.theme.fontSizes.lg};
+ line-height: 120%;
+ color: ${(props) => props.theme.colors.gray[700]};
+ margin-bottom: 2rem;
+ }
form {
display: flex;
flex-direction: column;
- img {
- margin-bottom: 40px;
+ .group-fields {
+ display: flex;
+ flex-direction: column;
+ gap: 1.5rem;
}
- h2 {
- font-weight: 600;
- font-size: ${(props) => props.theme.fontSizes.lg};
- line-height: 120%;
- color: ${(props) => props.theme.colors.blue[400]};
- margin-bottom: 32px;
+ input {
+ font-size: 1rem;
+ }
+ }
+`
+
+export const ContainerInput = styled.div`
+ position: relative;
+
+ svg {
+ width: 1.5rem;
+ height: 1.5rem;
+ }
+
+ label {
+ span:first-child {
+ color: ${(props) => props.theme.colors.gray[700]};
}
span {
- color: ${(props) => props.theme.colors.error};
- /*
- position: absolute;
- bottom: 0;
- */
+ font-weight: 400;
+ font-size: 1rem;
+ line-height: 150%;
}
+ }
+
+ .eye-visibility {
+ right: 1rem;
+ top: 2.8rem;
- p {
- margin-top: 12px;
+ svg {
+ color: ${(props) => props.theme.colors.black[200]};
}
}
+
+ &.error span,
+ &.error svg {
+ color: ${(props) => props.theme.colors.red[500]} !important;
+ }
+
+ &:focus-within svg {
+ color: ${(props) => props.theme.colors.blue[800]};
+ }
+`
+
+export const ContainerCheckbox = styled.div`
+ display: flex;
+ justify-content: space-between;
+ margin-top: 1.5rem;
+ margin-bottom: 2rem;
+
+ a {
+ color: ${(props) => props.theme.colors.blue[800]};
+ font-weight: 500;
+ }
+`
+
+export const CallToRegisterText = styled.p`
+ color: ${(props) => props.theme.colors.black[200]};
+ line-height: 150%;
+ margin-top: 2.5rem;
+ padding-bottom: 0.5rem;
+
+ a {
+ color: ${(props) => props.theme.colors.blue[800]};
+ font-weight: 500;
+ }
+`
+
+export const BlockedAccountError = styled.p`
+ color: ${(props) => props.theme.colors.red[500]};
+ font-size: 0.875rem;
+ margin-top: 0.5rem;
`
diff --git a/src/components/molecules/FormNewPass/index.tsx b/src/components/molecules/FormNewPass/index.tsx
index 3d0c910e..9e8eafb4 100644
--- a/src/components/molecules/FormNewPass/index.tsx
+++ b/src/components/molecules/FormNewPass/index.tsx
@@ -6,11 +6,10 @@ import { InfoTooltip } from '@/components/atoms/InfoTooltip'
import souJuniorLogoImg from '@/assets/logos/sou-junior.svg'
import Image from 'next/image'
import Link from 'next/link'
-import { useState, MouseEvent, useEffect } from 'react'
+import { useState, useEffect } from 'react'
import {
ContainerForm,
FormWrapper,
- LabelInput,
MessagesContainer,
WrapperInput,
} from './styled'
@@ -23,10 +22,9 @@ import 'react-toastify/dist/ReactToastify.css'
import ToastSuccess from '../ToastSuccess'
export default function FormNewPass() {
- const [show, setShow] = useState(true)
- const [eye, setEye] = useState(true)
- const [showConfirm, setShowConfirm] = useState(true)
- const [eyeConfirm, setEyeConfirm] = useState(true)
+ const [isPasswordVisible, setIsPasswordVisible] = useState(false)
+ const [isConfirmPasswordVisible, setIsConfirmPasswordVisible] =
+ useState(false)
const [toast, setToast] = useState(false)
const router = useRouter()
@@ -41,22 +39,6 @@ export default function FormNewPass() {
email: '',
}
- const handleShowPassword = (
- e: MouseEvent,
- ) => {
- e.preventDefault()
- setEye(!eye)
- setShow(!show)
- }
-
- const handleConfirmPassword = (
- e: MouseEvent,
- ) => {
- e.preventDefault()
- setEyeConfirm(!eyeConfirm)
- setShowConfirm(!showConfirm)
- }
-
const { handle } = setNewPasswordService()
const formik = useFormik({
@@ -77,55 +59,47 @@ export default function FormNewPass() {
Voltar ao login
diff --git a/src/components/molecules/FormNewPass/styled.ts b/src/components/molecules/FormNewPass/styled.ts
index 33833294..d6418472 100644
--- a/src/components/molecules/FormNewPass/styled.ts
+++ b/src/components/molecules/FormNewPass/styled.ts
@@ -1,47 +1,47 @@
import { styled } from 'styled-components'
export const ContainerForm = styled.div`
- width: 31.5rem;
+ max-width: 31.5rem;
+ width: 100%;
height: 36.875rem;
background: ${(props) => props.theme.colors.white};
border-radius: 12px;
- padding: 12px 0px;
form {
- p {
- color: ${(props) => props.theme.colors.gray[700]};
- font-size: 24px;
- font-weight: 700;
- line-height: 29px;
- letter-spacing: 0em;
- text-align: left;
- }
- span {
- color: ${(props) => props.theme.colors.gray[700]};
- font-size: 16px;
- font-weight: 400;
- line-height: 24px;
- letter-spacing: 0em;
- text-align: left;
- }
+ display: flex;
+ flex-direction: column;
button {
margin-top: 10px;
}
+
+ .new-password-field {
+ margin-bottom: 1rem;
+ }
}
`
export const MessagesContainer = styled.div`
- margin: 30px 0px;
+ margin: 1.5rem 0px;
+
+ h2 {
+ color: ${(props) => props.theme.colors.gray[750]};
+ font-size: ${(props) => props.theme.fontSizes.lg};
+ font-weight: 700;
+ line-height: 1.8rem;
+ margin-bottom: 1rem;
+ }
+
p {
- margin-bottom: 20px;
+ color: ${(props) => props.theme.colors.gray[750]};
+ font-size: ${(props) => props.theme.fontSizes.sm};
+ font-weight: 400;
+ line-height: 1.5rem;
}
`
-// ... seu código anterior ...
-
export const FormWrapper = styled.div`
- padding: 10px 30px;
+ padding: 2rem;
height: 100%;
width: 100%;
display: flex;
@@ -57,20 +57,40 @@ export const FormWrapper = styled.div`
text-align: center;
cursor: pointer;
}
+
+ button {
+ margin-top: 1.5rem !important;
+ }
`
export const WrapperInput = styled.div`
position: relative;
-`
-export const LabelInput = styled.label`
- display: flex;
- flex-direction: column;
- gap: 0.2rem;
+ label {
+ span {
+ font-size: ${(props) => props.theme.fontSizes.xs};
+ }
+
+ span:first-child {
+ font-size: 1rem;
+ line-height: 1.5rem;
+ color: ${(props) => props.theme.colors.gray[750]};
+ }
+
+ input {
+ font-size: 1rem;
+ padding-right: 2rem;
+ }
+ }
+
+ // Eye visibility
+ button {
+ right: 1rem;
+ top: 1.25rem;
- span {
- color: ${(props) => props.theme.colors.gray[700]};
- font-size: 1rem;
- line-height: 150%;
+ svg {
+ width: 1.5rem;
+ height: 1.5rem;
+ }
}
`
diff --git a/src/components/molecules/FormOnboard2/index.tsx b/src/components/molecules/FormOnboard2/index.tsx
index c58fd0b3..9e6937f3 100644
--- a/src/components/molecules/FormOnboard2/index.tsx
+++ b/src/components/molecules/FormOnboard2/index.tsx
@@ -1,10 +1,13 @@
-import PhotoButtom from '@/components/atoms/PhotoButtom'
+import PhotoButton from '@/components/atoms/PhotoButton'
import {
BackButton,
ButtonContainer,
+ CharactersWarnInput,
Dotted,
FormContainer,
NextButton,
+ SelectInputContainer,
+ SelectItemStyled,
StyledHR,
StyledImportant,
StyledInfo,
@@ -12,7 +15,7 @@ import {
} from './styled'
import { Dispatch, SetStateAction, useEffect, useState } from 'react'
import EditPhotoModal from '@/components/atoms/EditPhotoModal'
-import { Field, Form, FormikProvider, useFormik } from 'formik'
+import { Form, FormikProvider, useFormik } from 'formik'
import { InputForm } from '@/components/atoms/InputForm'
import UserUpdateService from '@/services/user/userUpdateService'
import { useRouter } from 'next/router'
@@ -20,6 +23,7 @@ import { ToastContainer, toast } from 'react-toastify'
import 'react-toastify/dist/ReactToastify.css'
import useUser from '@/context/Auth/useUser'
import { genders } from '@/data/static-info'
+import { Select } from '@/components/atoms/Select'
interface FormOnBoardProps {
onStep?: Dispatch>
@@ -119,7 +123,7 @@ export default function FormOnboard2({ onStep }: FormOnBoardProps) {
}}
/>
-
Formato aceito: jpg ou png. Tamanho máx.: 8 MB.
+
setSelectedPhoto(photo)}
@@ -140,38 +145,38 @@ export default function FormOnboard2({ onStep }: FormOnBoardProps) {