Skip to content

Commit

Permalink
feat: ✨ Aprimoramento da aplicação
Browse files Browse the repository at this point in the history
  • Loading branch information
welllucky committed Feb 14, 2024
1 parent b339015 commit 4770813
Show file tree
Hide file tree
Showing 22 changed files with 1,291 additions and 1,250 deletions.
6 changes: 1 addition & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,8 @@ yarn-debug.log*
yarn-error.log*

# local env files
.env*.local
.env*
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

# vercel
.vercel
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"dependencies": {
"@phosphor-icons/react": "^2.0.15",
"@react-spring/web": "^9.7.3",
"@uidotdev/usehooks": "^2.4.1-experimental.1",
"@uidotdev/usehooks": "^2.4.1",
"@use-gesture/react": "^10.3.0",
"@vercel/analytics": "^1.1.1",
"@vercel/speed-insights": "^1.0.2",
Expand Down
2 changes: 1 addition & 1 deletion src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"use client";
"use client";

import { NavigationBar } from "@/components";
import navigationOptions from "@/components/NavBar/data";
Expand Down
3 changes: 2 additions & 1 deletion src/components/CalledMobile/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
} from "./styles";
import { Selo } from "@/assets/Icons";
import { IssueMobileProps } from "@/assets";

export const IssueMobile = ({
id,
nome,
Expand All @@ -33,7 +34,7 @@ export const IssueMobile = ({
color={color}
$borderColor={$borderColor}
$hasUpdate={isUpdated}>
<IssueContent>
<IssueContent $hasUpdate={isUpdated}>
<IssueNumber>{`Chamado Nº ${id}`}</IssueNumber>
<IssueDescription>{nome}</IssueDescription>
</IssueContent>
Expand Down
34 changes: 18 additions & 16 deletions src/components/CalledMobile/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,12 @@ export const IssueWrapper = styled(Link)`

export const IssueContainer = styled(Row)<ContainerStyleProps>`
display: flex;
/* width: 360px; */
align-items: center;
padding: 1rem;
min-height: 6.5rem;
padding: 0.8rem;
gap: 1.5rem;
background-color: ${({ color }) => color ?? "#D9F5C5"};
border-radius: 0.5rem;
justify-content: space-around;
transition: 0.4s ease-in-out;
transition: 0.3s ease-in-out;
&:hover {
box-shadow: 0px 8px 12px rgba(0, 0, 0, 0.28);
Expand All @@ -53,38 +51,40 @@ export const IssueContainer = styled(Row)<ContainerStyleProps>`
}
`;

export const IssueContent = styled.div`
export const IssueContent = styled.div<{ $hasUpdate?: boolean }>`
display: flex;
flex-direction: column;
width: max-content;
height: 100%;
gap: 0.8rem;
justify-content: space-between;
${({ $hasUpdate }) =>
$hasUpdate &&
css`
padding-top: 8px;
`}
`;

export const IssueState = styled.div`
display: flex;
flex-direction: column;
width: 30%;
gap: 0.5rem;
margin-left: 1rem;
gap: 1rem;
`;

export const IssueNumber = styled.p`
font-weight: 500;
font-size: 0.9rem;
display: flex;
margin-bottom: 0.5rem;
width: max-content;
letter-spacing: 0.01em;
color: ${({ theme }) => theme.colors.neutral.inverted};
`;

export const IssueDescription = styled.p`
font-weight: 600;
font-size: 1.2rem;
max-width: 172px;
max-height: 56px;
line-height: 1.4rem;
font-weight: 500;
font-size: 1.1rem;
line-height: 120%;
color: ${({ theme }) => theme.colors.neutral.inverted};
text-overflow: ellipsis;
word-wrap: break-word;
Expand All @@ -104,6 +104,7 @@ export const IssueStatus = styled.div`
font-weight: 500;
font-size: 0.8rem;
line-height: 1rem;
overflow-x: hidden;
`;

export const OpeningText = styled.p`
Expand All @@ -115,12 +116,13 @@ export const OpeningText = styled.p`

export const StatusText = styled.p`
font-weight: 600;
font-size: 1.1rem;
font-size: 1rem;
line-height: 1.25rem;
letter-spacing: 0.06em;
color: ${({ theme }) => theme.colors.neutral.inverted};
`;

export const InfoLabel = styled.label`
color: ${({ theme }) => theme.colors.neutral.inverted};
overflow-x: hidden;
`;
2 changes: 1 addition & 1 deletion src/components/Modals/ConfirmModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ const ConfirmModal = ({
text="Voltar"
color={theme.colors.neutral.default}
$backgroundColor="transparent"
height="40px"
height="60px"
mode="outlined"
$$borderColor={theme.colors.neutral.default}
onClick={shouldCloseModal}
Expand Down
140 changes: 70 additions & 70 deletions src/components/Modals/ConfirmModal/styles.tsx
Original file line number Diff line number Diff line change
@@ -1,70 +1,70 @@
import { Row } from "@/styles";
import styled, { css } from "styled-components";

export const ConfirmModalWrapper = styled.div<{
$shouldHavePaddingBottom?: boolean;
$wasConfirmed?: boolean;
}>`
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
gap: 1rem;
padding: 1rem;
text-align: center;
background-color: ${({ theme }) => theme.colors.green["25"]};
animation-name: modalConfirmTransition;
animation-duration: 2s;
${({ $wasConfirmed }) =>
$wasConfirmed &&
css`
@keyframes modalConfirmTransition {
from {
background-color: ${({ theme }) => theme.colors.green["25"]};
}
to {
background-color: ${({ theme }) => theme.colors.green.default};
}
}
`}
${({ $shouldHavePaddingBottom }) =>
$shouldHavePaddingBottom
? css`
padding-bottom: 3rem;
`
: css`
p {
margin-bottom: 0.6rem;
}
`};
`;

export const ConfirmModalText = styled.p`
font-size: 1.33rem;
font-weight: 500;
line-height: 1.4rem;
color: ${({ theme }) => theme.colors.neutral.default};
@media (max-width: 374px) {
font-size: 1.2rem;
}
`;

export const ConfirmModalButtons = styled(Row)`
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
@media (max-width: 374px) {
flex-direction: column;
}
div {
height: 2rem;
width: 10rem;
}
`;
import { Row } from "@/styles";
import styled, { css } from "styled-components";

export const ConfirmModalWrapper = styled.div<{
$shouldHavePaddingBottom?: boolean;
$wasConfirmed?: boolean;
}>`
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
gap: 1rem;
padding: 1rem;
text-align: center;
background-color: ${({ theme }) => theme.colors.green["25"]};
animation-name: modalConfirmTransition;
animation-duration: 2s;
${({ $wasConfirmed }) =>
$wasConfirmed &&
css`
@keyframes modalConfirmTransition {
from {
background-color: ${({ theme }) => theme.colors.green["25"]};
}
to {
background-color: ${({ theme }) => theme.colors.green.default};
}
}
`}
${({ $shouldHavePaddingBottom }) =>
$shouldHavePaddingBottom
? css`
padding-bottom: 3rem;
`
: css`
p {
margin-bottom: 0.6rem;
}
`};
`;

export const ConfirmModalText = styled.p`
font-size: 1.33rem;
font-weight: 500;
line-height: 1.4rem;
color: ${({ theme }) => theme.colors.neutral.default};
@media (max-width: 374px) {
font-size: 1.2rem;
}
`;

export const ConfirmModalButtons = styled(Row)`
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
@media (max-width: 374px) {
flex-direction: column;
}
div {
height: 2.5rem;
width: 10rem;
}
`;
70 changes: 37 additions & 33 deletions src/components/NavBar/OptionMenu/index.tsx
Original file line number Diff line number Diff line change
@@ -1,33 +1,37 @@
import Image from "next/image";
import { IconArea, TextMenu } from "../styles";
import { OptionMenuProps } from "@/assets";
import { CustomLink } from "@/components";

const OptionMenu = ({
name,
iconUnselect,
iconSelect,
path,
alt,
onClick,
$isSelected,
color,
$highlightTextColor
}: OptionMenuProps) => {
return (
<button onClick={onClick}>
<CustomLink $flexDirection="column" href={path}>
<IconArea $backgroundColor={color} $isClicked={$isSelected}>
<Image src={$isSelected ? iconSelect : iconUnselect} alt={alt} />
</IconArea>
<TextMenu
$highlightTextColor={$highlightTextColor}
$isClicked={$isSelected}>
{name}
</TextMenu>
</CustomLink>
</button>
);
};

export default OptionMenu;
import Image from "next/image";
import { IconArea, TextMenu } from "../styles";
import { OptionMenuProps } from "@/assets";
import { CustomLink } from "@/components";

const OptionMenu = ({
name,
iconUnselect,
iconSelect,
path,
alt,
$isSelected,
color,
$highlightTextColor
}: OptionMenuProps) => {
return (
<CustomLink
$flexDirection="column"
href={path}>
<IconArea
$backgroundColor={color}
$isClicked={$isSelected}>
<Image
src={$isSelected ? iconSelect : iconUnselect}
alt={alt}
/>
</IconArea>
<TextMenu
$highlightTextColor={$highlightTextColor}
$isClicked={$isSelected}>
{name}
</TextMenu>
</CustomLink>
);
};

export default OptionMenu;
Loading

0 comments on commit 4770813

Please sign in to comment.