Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: tela de registro #604

Merged
merged 28 commits into from
Sep 9, 2024
Merged
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
ecef9b8
feat: add register hero section
lfelipessilva Aug 29, 2024
5e27c2e
feat: add text input
lfelipessilva Aug 29, 2024
8bf74c2
feat: add mobile register screen
lfelipessilva Aug 30, 2024
a6e305c
refactor: input text
lfelipessilva Aug 30, 2024
62d390e
refactor: sign up form
lfelipessilva Aug 31, 2024
643eb64
feat: add desktop hero section
lfelipessilva Sep 1, 2024
2113c34
refactor: improvements to form inputs
lfelipessilva Sep 1, 2024
ff6fa2c
feat: add last desktop parts on register screen
lfelipessilva Sep 1, 2024
8ab1b09
fix: mobile hero octopost icon
lfelipessilva Sep 2, 2024
6af8308
fix: actually fixes mobile hero octopost icon
lfelipessilva Sep 2, 2024
8e12632
Merge branch 'master' into issue-597
lfelipessilva Sep 2, 2024
4b1e240
test: fix regsiter screen tests
lfelipessilva Sep 2, 2024
fd88961
feat: add input right icon action
lfelipessilva Sep 3, 2024
69b6707
fix: code review on register screen
lfelipessilva Sep 4, 2024
0163bcc
fix: rem calculation
lfelipessilva Sep 4, 2024
4af878f
fix: desktop register spacings
lfelipessilva Sep 4, 2024
7361ba9
fix: react router
lfelipessilva Sep 4, 2024
7e48c84
fix: register screen svgs
lfelipessilva Sep 4, 2024
2f83b17
fix: footer name on register screen
lfelipessilva Sep 4, 2024
14d3ed7
feat: add already have an account to mobile screens
lfelipessilva Sep 5, 2024
ecc26c0
fix: ale code review
lfelipessilva Sep 5, 2024
01a3ad6
fix: sign up promotion letter spacing
lfelipessilva Sep 5, 2024
eb90065
fix: social login title on desktop
lfelipessilva Sep 6, 2024
6e41314
Merge branch 'master' into issue-597
lfelipessilva Sep 6, 2024
c78770c
fix: showing already have an account componente on desktop
lfelipessilva Sep 6, 2024
7fef827
fix: update mobile hero svg positioning excuse comment
lfelipessilva Sep 6, 2024
eb4f19b
refactor: change heroes stories name
lfelipessilva Sep 6, 2024
05c7fb0
fix: duplicate media query on register module
lfelipessilva Sep 7, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"test": "vitest"
},
"dependencies": {
"@hookform/resolvers": "3.9.0",
"@redux-devtools/extension": "3.3.0",
"@sentry/react": "7.102.0",
"classnames": "2.5.1",
Expand All @@ -52,8 +53,10 @@
"normalize.css": "8.0.1",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-hook-form": "7.53.0",
"react-i18next": "13.5.0",
"react-router-dom": "6.22.1",
"zod": "3.23.8",
"zustand": "4.5.1"
},
"devDependencies": {
Expand Down
30 changes: 30 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions src/App.tsx
lfelipessilva marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { ReactNode } from 'react';
import { HashRouter as Router, Route } from 'react-router-dom';
import { BrowserRouter, Route } from 'react-router-dom';

import { ErrorBoundary } from '@sentry/react';

import Home from './pages/home/home';
import Register from './pages/register/register';

import SentryRoutes from '~components/SentrySetup/SentrySetup';

Expand All @@ -13,13 +14,12 @@ import './styles/base.scss';
function App(): ReactNode {
return (
<ErrorBoundary fallback={<p>Ocorreu um erro inesperado!</p>}>
<div>
<Router>
<SentryRoutes>
<Route element={<Home />} path="/" />
</SentryRoutes>
</Router>
</div>
<BrowserRouter>
<SentryRoutes>
<Route element={<Home />} path="/" />
<Route element={<Register />} path="/register" />
</SentryRoutes>
</BrowserRouter>
</ErrorBoundary>
);
}
Expand Down
4 changes: 4 additions & 0 deletions src/components/Button/Button.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,10 @@
@include text($primaryWhite, rgba(255, 255, 255, 0.15));
}

&.gray {
@include text($secondaryGray, $primaryGray);
}

&.disabled {
&:hover {
background: none;
Expand Down
2 changes: 1 addition & 1 deletion src/components/Button/Button.types.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { HTMLAttributes, ReactElement } from 'react';

export type IButtonProps = HTMLAttributes<HTMLButtonElement> & {
color?: 'primary' | 'secondary';
color?: 'gray' | 'primary' | 'secondary';
disabled?: boolean;
type?: 'button' | 'reset' | 'submit';
variant?: 'container' | 'outlined' | 'text';
Expand Down
4 changes: 4 additions & 0 deletions src/components/Icon/data.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import Alert from './icons/alert.svg?react';
import ArrowRight from './icons/arrow-right.svg?react';
import BlindEye from './icons/blind-eye.svg?react';
import Check from './icons/check.svg?react';
import Circle from './icons/circle.svg?react';
import Close from './icons/close.svg?react';
Expand All @@ -9,6 +10,7 @@ import Facebook from './icons/facebook.svg?react';
import Hamburguer from './icons/hamburguer.svg?react';
import Instagram from './icons/instagram.svg?react';
import LeftArrow from './icons/left-arrow.svg?react';
import Letter from './icons/letter.svg?react';
import Mag from './icons/mag.svg?react';
import Minus from './icons/minus.svg?react';
import Mobile from './icons/Mobile.svg?react';
Expand All @@ -26,6 +28,7 @@ import Twitter from './icons/twitter.svg?react';
export const icons = {
alert: Alert,
'arrow-right': ArrowRight,
'blind-eye': BlindEye,
check: Check,
circle: Circle,
close: Close,
Expand All @@ -34,6 +37,7 @@ export const icons = {
hamburguer: Hamburguer,
instagram: Instagram,
'left-arrow': LeftArrow,
letter: Letter,
mag: Mag,
minus: Minus,
mobile: Mobile,
Expand Down
4 changes: 4 additions & 0 deletions src/components/Icon/icons/blind-eye.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 1 addition & 3 deletions src/components/Icon/icons/instagram.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/components/Icon/icons/letter.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 1 addition & 3 deletions src/components/Icon/icons/tiktok.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 1 addition & 3 deletions src/components/Icon/icons/twitter.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
53 changes: 53 additions & 0 deletions src/components/TextInput/TextInput.components.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
import React from 'react';

import classNames from 'classnames';

import Icon from '~components/Icon/Icon';

import scss from './TextInput.module.scss';

import { RightIconProps } from './TextInput.types';

export function RightIcon(props: RightIconProps): React.JSX.Element | null {
const { error, handleRightIconClick, rightIcon } = props;

const rightIconClass = [scss.rightIcon];

if (error) {
rightIconClass.push(scss.rightIconError);
}

let iconElement;

if (rightIcon)
iconElement = (
<Icon
aria-label="input icon"
className={classNames(rightIconClass)}
icon={rightIcon}
/>
);

if (error)
iconElement = (
<Icon
aria-label="alert-icon"
className={classNames(rightIconClass)}
icon="alert"
/>
);

if (!iconElement) return null;

return handleRightIconClick ? (
<button
className={scss.rightIconButton}
onClick={handleRightIconClick}
type="button"
>
{iconElement}
</button>
) : (
iconElement
);
}
119 changes: 119 additions & 0 deletions src/components/TextInput/TextInput.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
@use '../../styles/global';
@use '~styles/breakpoints.scss' as *;

.container {
display: grid;

&.containerError {
color: global.$secondaryRed;
}

&.containerFocus {
color: global.$secondaryPurple;
}

.innerContainer {
display: flex;
flex-direction: row;
grid-area: 1/1;

padding: 1.6rem;
border: 1px solid global.$secondaryGray;

border-radius: 4px;

&.innerContainerFocus {
border-color: global.$secondaryPurple;
}

&.innerContainerError {
border-color: global.$secondaryRed;
}

.input {
width: 100%;

font-size: 1.6rem;
font-weight: 400;

border: 0;
letter-spacing: 0.05rem;

&.inputFocus {
caret-color: global.$secondaryPurple;
}

&.inputError {
caret-color: global.$secondaryRed;
}

&:focus {
outline: none;
}
}
}

.label {
width: fit-content;
height: fit-content;

grid-area: 1/1;

font-size: 1.2rem;
font-weight: 400;

line-height: calc(0.75 / 2);

margin-left: 1.6rem;

padding: 0 0.4rem;

z-index: 1;

background-color: global.$primaryWhite;
}

.rightIcon {
width: 2.4rem;

display: flex;

align-items: center;

&.rightIconError {
color: global.$secondaryRed;
}
}

.rightIconButton {
width: 2.4rem;

transition: all 0.1s;

&:hover {
transform: scale(0.92);

cursor: pointer;
}
}

.supportText {
height: 2.4rem;

color: global.$secondaryGray;
font-size: 1.2rem;
font-weight: 400;

padding: 0.4rem 1.6rem;

visibility: hidden;

&.supportTextExists {
visibility: visible;
}

&.supportTextError {
color: global.$secondaryRed;
}
}
}
Loading
Loading