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(primer/react): update version #1578

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
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
Loading