Skip to content

Commit

Permalink
Merge pull request #1578 from ErickCReis/feat/update-primer-react
Browse files Browse the repository at this point in the history
feat(primer/react): update version
  • Loading branch information
aprendendofelipe authored Dec 21, 2023
2 parents 41c940e + 39d4af0 commit 2e42e9e
Show file tree
Hide file tree
Showing 7 changed files with 230 additions and 93 deletions.
289 changes: 213 additions & 76 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"@bytemd/plugin-math": "1.21.0",
"@bytemd/plugin-mermaid": "1.21.0",
"@bytemd/react": "1.21.0",
"@primer/octicons-react": "18.3.0",
"@primer/react": "35.25.1",
"@primer/octicons-react": "19.8.0",
"@primer/react": "36.4.0",
"@resvg/resvg-js": "2.4.1",
"@upstash/ratelimit": "0.4.2",
"@upstash/redis": "1.20.4",
Expand Down
2 changes: 1 addition & 1 deletion pages/interface/components/EmptyState/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default function EmptyState(props) {
<Heading sx={{ fontSize: 3 }}>{title}</Heading>
{description && <Text>{description}</Text>}
{action && (
<Button style={{ marginTop: '1rem' }} leadingIcon={PlusIcon} onClick={action.onClick}>
<Button style={{ marginTop: '1rem' }} leadingVisual={PlusIcon} onClick={action.onClick}>
{action.text}
</Button>
)}
Expand Down
7 changes: 5 additions & 2 deletions pages/interface/components/PasswordInput/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useEffect, useState } from 'react';

import { FormControl, TextInput } from '@/TabNewsUI';
import { EyeClosedIcon, EyeIcon } from '@/TabNewsUI/icons';
import { AlertFillIcon, EyeClosedIcon, EyeIcon } from '@/TabNewsUI/icons';

export default function PasswordInput({ inputRef, id, name, label, errorObject, setErrorObject, ...props }) {
const [isPasswordVisible, setIsPasswordVisible] = useState(false);
Expand Down Expand Up @@ -70,7 +70,10 @@ export default function PasswordInput({ inputRef, id, name, label, errorObject,
{...props}
/>
{capsLockWarningMessage && (
<FormControl.Validation variant="warning">{capsLockWarningMessage}</FormControl.Validation>
<FormControl.Caption sx={{ display: 'flex', gap: 1, alignItems: 'center' }}>
<AlertFillIcon size={12} />
{capsLockWarningMessage}
</FormControl.Caption>
)}
{['empty', 'password', 'password_confirm'].includes(errorObject?.key) && (
<FormControl.Validation variant="error">{errorObject.message}</FormControl.Validation>
Expand Down
4 changes: 2 additions & 2 deletions pages/interface/components/SearchBox/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export default function useSearchBox() {
},
...sx,
}}
leadingIcon={SearchIcon}
leadingVisual={SearchIcon}
{...props}>
Pesquisar
</Button>
Expand All @@ -80,7 +80,7 @@ export default function useSearchBox() {
},
...sx,
}}
leadingIcon={SearchIcon}
leadingVisual={SearchIcon}
{...props}>
Pesquisar
</Button>
Expand Down
3 changes: 2 additions & 1 deletion pages/interface/components/TabNewsUI/icons/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
export { CgTab } from 'react-icons/cg';
export { FaPause, FaPlay, FaTree, FaUser } from 'react-icons/fa';
export {
AlertFillIcon,
ChevronDownIcon,
ChevronLeftIcon,
ChevronRightIcon,
Expand All @@ -24,8 +25,8 @@ export {
SignOutIcon,
SquareFillIcon,
SunIcon,
TrashIcon,
ThreeBarsIcon,
TrashIcon,
UnfoldIcon,
XCircleFillIcon,
} from '@primer/octicons-react';
14 changes: 5 additions & 9 deletions pages/perfil/index.public.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,11 @@ function EditProfileForm() {
await fetchUser();

if (user.email !== email) {
setErrorObject({
message: `Atenção: Um email de confirmação foi enviado para ${email}`,
key: 'email',
type: 'confirmation',
});
const hasSavedModifications = Object.keys(payload).length > 1;
const text = hasSavedModifications
? `Alterações salvas. O email será alterado apenas após a confirmação pelo link enviado para "${email}".`
: `Alteração pendente. Um email de confirmação foi enviado para "${email}".`;
setGlobalMessageObject({ text, type: 'warning' });
setEmailDisabled(true);
} else {
setGlobalMessageObject({
Expand Down Expand Up @@ -246,10 +246,6 @@ function EditProfileForm() {
</Box>
</FormControl.Validation>
)}

{errorObject?.key === 'email' && errorObject?.type === 'confirmation' && (
<FormControl.Validation variant="warning">{errorObject.message}</FormControl.Validation>
)}
</FormControl>

<FormControl id="description">
Expand Down

1 comment on commit 2e42e9e

@vercel
Copy link

@vercel vercel bot commented on 2e42e9e Dec 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

tabnews – ./

tabnews-git-main-tabnews.vercel.app
tabnews-tabnews.vercel.app
tabnews.com.br
www.tabnews.com.br

Please sign in to comment.