♻️(app-desk) replace classname spacings
Replace the classname spacings with the new spacing system based on props.
This commit is contained in:
@@ -20,7 +20,7 @@ export const TextErrors = ({
|
||||
causes.map((cause, i) => (
|
||||
<Text
|
||||
key={`causes-${i}`}
|
||||
className="mt-s"
|
||||
$margin={{ top: 'small' }}
|
||||
$theme="danger"
|
||||
$textAlign="center"
|
||||
{...textProps}
|
||||
@@ -31,7 +31,7 @@ export const TextErrors = ({
|
||||
|
||||
{!causes && (
|
||||
<Text
|
||||
className="mt-s"
|
||||
$margin={{ top: 'small' }}
|
||||
$theme="danger"
|
||||
$textAlign="center"
|
||||
{...textProps}
|
||||
|
||||
@@ -165,14 +165,14 @@ export const ModalAddMembers = ({
|
||||
title={
|
||||
<Box $align="center" $gap="1rem">
|
||||
<IconAddMember width={48} color={colorsTokens()['primary-text']} />
|
||||
<Text $size="h3" className="m-0">
|
||||
<Text $size="h3" $margin="none">
|
||||
{t('Add a member')}
|
||||
</Text>
|
||||
</Box>
|
||||
}
|
||||
>
|
||||
<GlobalStyle />
|
||||
<Box className="mb-xl mt-l">
|
||||
<Box $margin={{ bottom: 'xl', top: 'large' }}>
|
||||
<SearchMembers
|
||||
team={team}
|
||||
setSelectedMembers={setSelectedMembers}
|
||||
@@ -180,8 +180,8 @@ export const ModalAddMembers = ({
|
||||
disabled={isPending}
|
||||
/>
|
||||
{selectedMembers.length > 0 && (
|
||||
<Box className="mt-s">
|
||||
<Text as="h4" $textAlign="left" className="mb-t">
|
||||
<Box $margin={{ top: 'small' }}>
|
||||
<Text as="h4" $textAlign="left" $margin={{ bottom: 'tiny' }}>
|
||||
{t('Choose a role')}
|
||||
</Text>
|
||||
<ChooseRole
|
||||
|
||||
@@ -41,7 +41,7 @@ export const Header = () => {
|
||||
<StyledHeader>
|
||||
<RedStripe />
|
||||
<Box
|
||||
className="ml-bx mr-bx"
|
||||
$margin={{ horizontal: 'xbig' }}
|
||||
$align="center"
|
||||
$justify="space-between"
|
||||
$direction="row"
|
||||
@@ -56,7 +56,7 @@ export const Header = () => {
|
||||
/>
|
||||
<Box $align="center" $gap="1rem" $direction="row">
|
||||
<Image priority src={IconApplication} alt={t('Equipes Logo')} />
|
||||
<Text className="m-0" as="h2" $theme="primary">
|
||||
<Text $margin="none" as="h2" $theme="primary">
|
||||
{t('Equipes')}
|
||||
</Text>
|
||||
</Box>
|
||||
|
||||
@@ -24,7 +24,7 @@ export function MailContent() {
|
||||
];
|
||||
|
||||
return (
|
||||
<Card className="m-l p-s">
|
||||
<Card $padding="small" $margin="large">
|
||||
<DataGrid
|
||||
columns={[
|
||||
{
|
||||
|
||||
@@ -96,7 +96,7 @@ export const MemberGrid = ({ team, currentRole }: MemberGridProps) => {
|
||||
return (
|
||||
<>
|
||||
{currentRole !== Role.MEMBER && (
|
||||
<Box className="m-b mb-s" $align="flex-end">
|
||||
<Box $margin={{ all: 'big', bottom: 'small' }} $align="flex-end">
|
||||
<Button
|
||||
aria-label={t('Add members to the team')}
|
||||
style={{
|
||||
@@ -111,10 +111,10 @@ export const MemberGrid = ({ team, currentRole }: MemberGridProps) => {
|
||||
</Box>
|
||||
)}
|
||||
<Card
|
||||
className="m-b pb-s"
|
||||
$padding={{ bottom: 'small' }}
|
||||
$margin={{ all: 'big', top: 'none' }}
|
||||
$overflow="auto"
|
||||
$css={`
|
||||
margin-top:0;
|
||||
& .c__pagination__goto {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ export const ModalDelete = ({ access, onClose, team }: ModalDeleteProps) => {
|
||||
title={
|
||||
<Box $align="center" $gap="1rem">
|
||||
<IconRemoveMember width={48} color={colorsTokens()['primary-text']} />
|
||||
<Text $size="h3" className="m-0">
|
||||
<Text $size="h3" $margin="none">
|
||||
{t('Remove the member')}
|
||||
</Text>
|
||||
</Box>
|
||||
@@ -98,7 +98,10 @@ export const ModalDelete = ({ access, onClose, team }: ModalDeleteProps) => {
|
||||
</Text>
|
||||
|
||||
{isErrorUpdate && (
|
||||
<TextErrors className="mb-s" causes={errorUpdate.cause} />
|
||||
<TextErrors
|
||||
$margin={{ bottom: 'small' }}
|
||||
causes={errorUpdate.cause}
|
||||
/>
|
||||
)}
|
||||
|
||||
{(isLastOwner || isOtherOwner) && (
|
||||
@@ -107,7 +110,7 @@ export const ModalDelete = ({ access, onClose, team }: ModalDeleteProps) => {
|
||||
$direction="row"
|
||||
$align="center"
|
||||
$gap="0.5rem"
|
||||
className="m-t"
|
||||
$margin="tiny"
|
||||
$justify="center"
|
||||
>
|
||||
<span className="material-icons">warning</span>
|
||||
@@ -121,7 +124,7 @@ export const ModalDelete = ({ access, onClose, team }: ModalDeleteProps) => {
|
||||
|
||||
<Text
|
||||
as="p"
|
||||
className="p-b"
|
||||
$padding="big"
|
||||
$direction="row"
|
||||
$gap="0.5rem"
|
||||
$background={colorsTokens()['primary-150']}
|
||||
|
||||
@@ -87,7 +87,10 @@ export const ModalRole = ({
|
||||
>
|
||||
<Box aria-label={t('Radio buttons to update the roles')}>
|
||||
{isErrorUpdate && (
|
||||
<TextErrors className="mb-s" causes={errorUpdate.cause} />
|
||||
<TextErrors
|
||||
$margin={{ bottom: 'small' }}
|
||||
causes={errorUpdate.cause}
|
||||
/>
|
||||
)}
|
||||
|
||||
{(isLastOwner || isOtherOwner) && (
|
||||
@@ -96,7 +99,7 @@ export const ModalRole = ({
|
||||
$direction="row"
|
||||
$align="center"
|
||||
$gap="0.5rem"
|
||||
className="mb-t"
|
||||
$margin={{ bottom: 'tiny' }}
|
||||
$justify="center"
|
||||
>
|
||||
<span className="material-icons">warning</span>
|
||||
|
||||
@@ -19,12 +19,13 @@ export const Menu = () => {
|
||||
return (
|
||||
<Box
|
||||
as="menu"
|
||||
className="m-0 p-0"
|
||||
$background={colorsTokens()['primary-800']}
|
||||
$height="100%"
|
||||
$justify="space-between"
|
||||
$padding="none"
|
||||
$margin="none"
|
||||
>
|
||||
<Box className="pt-l" $direction="column" $gap="0.8rem">
|
||||
<Box $padding={{ top: 'large' }} $direction="column" $gap="0.8rem">
|
||||
<MenuItem Icon={IconSearch} label={t('Search')} href="/" />
|
||||
<MenuItem Icon={IconMail} label={t('Mails')} href="/mails" />
|
||||
<MenuItem Icon={IconFavorite} label={t('Favorite')} href="/favorite" />
|
||||
|
||||
@@ -46,7 +46,8 @@ const MenuItem = ({ Icon, label, href }: MenuItemProps) => {
|
||||
style={{ display: 'block' }}
|
||||
>
|
||||
<Box
|
||||
className="m-st p-t"
|
||||
$margin="xtiny"
|
||||
$padding="tiny"
|
||||
as="li"
|
||||
$justify="center"
|
||||
$css={`
|
||||
|
||||
@@ -26,7 +26,8 @@ export const Tooltip = ({
|
||||
<Popover parentRef={parentRef} onClickOutside={() => ''} borderless>
|
||||
<Box
|
||||
aria-label="tooltip"
|
||||
className="ml-t p-t"
|
||||
$padding="tiny"
|
||||
$margin={{ left: 'tiny' }}
|
||||
$background={backgroundColor}
|
||||
$radius="4px"
|
||||
$css={`
|
||||
|
||||
@@ -29,7 +29,7 @@ export const CardCreateTeam = () => {
|
||||
|
||||
return (
|
||||
<Card
|
||||
className="p-b"
|
||||
$padding="big"
|
||||
$height="70%"
|
||||
$justify="space-between"
|
||||
$width="100%"
|
||||
|
||||
@@ -73,24 +73,29 @@ export const ModalRemoveTeam = ({ onClose, team }: ModalRemoveTeamProps) => {
|
||||
title={
|
||||
<Box $align="center" $gap="1rem">
|
||||
<IconRemove width={48} color={colorsTokens()['primary-text']} />
|
||||
<Text $size="h3" className="m-0">
|
||||
<Text $size="h3" $margin="none">
|
||||
{t('Deleting the {{teamName}} team', { teamName: team.name })}
|
||||
</Text>
|
||||
</Box>
|
||||
}
|
||||
>
|
||||
<Box className="mb-xl" aria-label={t('Content modal to delete the team')}>
|
||||
<Text as="p" className="mb-b">
|
||||
<Box
|
||||
$margin={{ bottom: 'xl' }}
|
||||
aria-label={t('Content modal to delete the team')}
|
||||
>
|
||||
<Text as="p" $margin={{ bottom: 'big' }}>
|
||||
{t('Are you sure you want to delete {{teamName}} team?', {
|
||||
teamName: team.name,
|
||||
})}
|
||||
</Text>
|
||||
|
||||
{isError && <TextErrors className="mb-s" causes={error.cause} />}
|
||||
{isError && (
|
||||
<TextErrors $margin={{ bottom: 'small' }} causes={error.cause} />
|
||||
)}
|
||||
|
||||
<Text
|
||||
as="p"
|
||||
className="p-s"
|
||||
$padding="small"
|
||||
$direction="row"
|
||||
$gap="0.5rem"
|
||||
$background={colorsTokens()['primary-150']}
|
||||
|
||||
@@ -76,14 +76,17 @@ export const ModalUpdateTeam = ({ onClose, team }: ModalUpdateTeamProps) => {
|
||||
title={
|
||||
<Box $align="center" $gap="1rem">
|
||||
<IconEdit width={48} color={colorsTokens()['primary-text']} />
|
||||
<Text $size="h3" className="m-0">
|
||||
<Text $size="h3" $margin="none">
|
||||
{t('Update team {{teamName}}', { teamName: team.name })}
|
||||
</Text>
|
||||
</Box>
|
||||
}
|
||||
>
|
||||
<Box className="mb-xl" aria-label={t('Content modal to update the team')}>
|
||||
<Text as="p" className="mb-b">
|
||||
<Box
|
||||
$margin={{ bottom: 'xl' }}
|
||||
aria-label={t('Content modal to update the team')}
|
||||
>
|
||||
<Text as="p" $margin={{ bottom: 'big' }}>
|
||||
{t('Enter the new name of the selected team')}
|
||||
</Text>
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ export const Panel = () => {
|
||||
`}
|
||||
>
|
||||
<Box
|
||||
className="pr-l pl-s pt-s pb-s"
|
||||
$padding={{ all: 'small', right: 'large' }}
|
||||
$direction="row"
|
||||
$align="center"
|
||||
$justify="space-between"
|
||||
|
||||
@@ -54,7 +54,7 @@ export const TeamItem = ({ team }: TeamProps) => {
|
||||
|
||||
return (
|
||||
<Box
|
||||
className="m-0"
|
||||
$margin="none"
|
||||
as="li"
|
||||
$css={`
|
||||
transition: all 0.2s ease-in;
|
||||
|
||||
@@ -19,7 +19,7 @@ const TeamListState = ({ isLoading, isError, teams }: PanelTeamsStateProps) => {
|
||||
|
||||
if (isError) {
|
||||
return (
|
||||
<Box $justify="center" className="mb-b">
|
||||
<Box $justify="center" $margin={{ bottom: 'big' }}>
|
||||
<Text $theme="danger" $align="center" $textAlign="center">
|
||||
{t('Something bad happens, please refresh the page.')}
|
||||
</Text>
|
||||
@@ -29,7 +29,7 @@ const TeamListState = ({ isLoading, isError, teams }: PanelTeamsStateProps) => {
|
||||
|
||||
if (isLoading) {
|
||||
return (
|
||||
<Box $align="center" className="m-l">
|
||||
<Box $align="center" $margin="large">
|
||||
<Loader />
|
||||
</Box>
|
||||
);
|
||||
@@ -37,8 +37,13 @@ const TeamListState = ({ isLoading, isError, teams }: PanelTeamsStateProps) => {
|
||||
|
||||
if (!teams?.length) {
|
||||
return (
|
||||
<Box $justify="center" className="m-s">
|
||||
<Text as="p" className="mb-0 mt-0" $theme="greyscale" $variation="500">
|
||||
<Box $justify="center" $margin="small">
|
||||
<Text
|
||||
as="p"
|
||||
$margin={{ vertical: 'none' }}
|
||||
$theme="greyscale"
|
||||
$variation="500"
|
||||
>
|
||||
{t('0 group to display.')}
|
||||
</Text>
|
||||
<Text as="p" $theme="greyscale" $variation="500">
|
||||
@@ -82,7 +87,8 @@ export const TeamList = () => {
|
||||
}}
|
||||
scrollContainer={containerRef.current}
|
||||
as="ul"
|
||||
className="p-0 mt-0"
|
||||
$margin={{ top: 'none' }}
|
||||
$padding="none"
|
||||
role="listbox"
|
||||
>
|
||||
<TeamListState isLoading={isLoading} isError={isError} teams={teams} />
|
||||
|
||||
@@ -38,11 +38,11 @@ export const TeamInfo = ({ team, currentRole }: TeamInfoProps) => {
|
||||
|
||||
return (
|
||||
<>
|
||||
<Card className="m-b" style={{ paddingBottom: 0 }}>
|
||||
<Box $css="align-self: flex-end;" className="m-t" $position="absolute">
|
||||
<Card $margin="big" $padding={{ bottom: 'none' }}>
|
||||
<Box $css="align-self: flex-end;" $margin="tiny" $position="absolute">
|
||||
<TeamActions currentRole={currentRole} team={team} />
|
||||
</Box>
|
||||
<Box className="m-b" $direction="row" $align="center" $gap="1.5rem">
|
||||
<Box $margin="big" $direction="row" $align="center" $gap="1.5rem">
|
||||
<IconGroup
|
||||
width={44}
|
||||
color={colorsTokens()['primary-text']}
|
||||
@@ -53,7 +53,12 @@ export const TeamInfo = ({ team, currentRole }: TeamInfoProps) => {
|
||||
}}
|
||||
/>
|
||||
<Box>
|
||||
<Text as="h3" $weight="bold" $size="1.25rem" className="mt-0">
|
||||
<Text
|
||||
as="h3"
|
||||
$weight="bold"
|
||||
$size="1.25rem"
|
||||
$margin={{ top: 'none' }}
|
||||
>
|
||||
{t('Members of “{{teamName}}“', {
|
||||
teamName: team.name,
|
||||
})}
|
||||
@@ -66,13 +71,12 @@ export const TeamInfo = ({ team, currentRole }: TeamInfoProps) => {
|
||||
</Box>
|
||||
</Box>
|
||||
<Box
|
||||
className="p-s"
|
||||
$padding={{ all: 'small', left: '1.5rem' }}
|
||||
$gap="3rem"
|
||||
$direction="row"
|
||||
$justify="start"
|
||||
$css={`
|
||||
border-top: 1px solid ${colorsTokens()['card-border']};
|
||||
padding-left: 1.5rem;
|
||||
`}
|
||||
>
|
||||
<Text $size="s" as="p">
|
||||
|
||||
@@ -18,7 +18,7 @@ const Page: NextPageWithLayout = () => {
|
||||
const { t } = useTranslation();
|
||||
|
||||
return (
|
||||
<Box $align="center" className="m-auto" $height="70vh" $gap="2rem">
|
||||
<Box $align="center" $margin="auto" $height="70vh" $gap="2rem">
|
||||
<Icon404 aria-label="Image 404" role="img" />
|
||||
|
||||
<Text $size="h2" $weight="700" $theme="greyscale" $variation="900">
|
||||
@@ -31,7 +31,7 @@ const Page: NextPageWithLayout = () => {
|
||||
)}
|
||||
</Text>
|
||||
|
||||
<Box className="mt-l">
|
||||
<Box $margin={{ top: 'large' }}>
|
||||
<StyledLink href="/">
|
||||
<StyledButton>{t('Back to home page')}</StyledButton>
|
||||
</StyledLink>
|
||||
|
||||
@@ -6,7 +6,7 @@ import { NextPageWithLayout } from '@/types/next';
|
||||
|
||||
const Page: NextPageWithLayout = () => {
|
||||
return (
|
||||
<Box className="p-l" $justify="center" $align="start" $height="inherit">
|
||||
<Box $padding="large" $justify="center" $align="start" $height="inherit">
|
||||
<CardCreateTeam />
|
||||
</Box>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user