Skip to content

Commit

Permalink
Update imports from MuiBox to ProxyBox component
Browse files Browse the repository at this point in the history
  • Loading branch information
Viktor Riabkov committed Apr 9, 2024
1 parent 0f59bd1 commit ae037db
Show file tree
Hide file tree
Showing 101 changed files with 120 additions and 161 deletions.
3 changes: 1 addition & 2 deletions src/entities/activity/ui/ItemCardButtons.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import Box from '@mui/material/Box';

import { Theme } from '~/shared/constants';
import { Box } from '~/shared/ui';
import { BaseButton } from '~/shared/ui';
import { useCustomMediaQuery } from '~/shared/utils';

Expand Down
3 changes: 1 addition & 2 deletions src/entities/activity/ui/items/AudioPlayerItem.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { useCallback } from 'react';

import Box from '@mui/material/Box';

import { AudioPlayerItem as AudioPlayerItemType } from '../../lib/types/item';

import { Box } from '~/shared/ui';
import { AudioPlayerItemBase } from '~/shared/ui';
import { AudioPlayerFinished } from '~/shared/ui/Items/AudioPlayer/lib';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { useMemo } from 'react';

import Box from '@mui/material/Box';

import { Box } from '~/shared/ui';
import {
CheckboxItem,
CustomTooltip,
Expand Down
3 changes: 1 addition & 2 deletions src/entities/activity/ui/items/CheckboxItem/index.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import { useMemo } from 'react';

import Box from '@mui/material/Box';

import { CheckboxItemOption } from './CheckboxItemOption';
import { CheckboxItem as CheckboxItemType } from '../../../lib/types/item';

import { Box } from '~/shared/ui';
import { randomizeArray, splitList, useCustomMediaQuery } from '~/shared/utils';

type Props = {
Expand Down
3 changes: 1 addition & 2 deletions src/entities/activity/ui/items/DateItem.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Box from '@mui/material/Box';

import { Box } from '~/shared/ui';
import { DateItemBase } from '~/shared/ui';

type Props = {
Expand Down
3 changes: 1 addition & 2 deletions src/entities/activity/ui/items/Matrix/AxisListItem.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Box from '@mui/material/Box';

import { Box } from '~/shared/ui';
import { AvatarBase, CustomTooltip, Text } from '~/shared/ui';
import { useCustomMediaQuery } from '~/shared/utils';

Expand Down
3 changes: 1 addition & 2 deletions src/entities/activity/ui/items/Matrix/MatrixCell.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { PropsWithChildren } from 'react';

import Box from '@mui/material/Box';

import { Box } from '~/shared/ui';
import { useCustomMediaQuery } from '~/shared/utils';

type Props = PropsWithChildren<{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import Box from '@mui/material/Box';

import { MatrixCell } from '../MatrixCell';

import { Box } from '~/shared/ui';
import { CheckboxItem, SelectBaseBox } from '~/shared/ui';
import { useCustomMediaQuery } from '~/shared/utils';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import Box from '@mui/material/Box';

import { CheckboxButton } from './CheckboxButton';
import { MatrixMultiSelectAnswer, MatrixSelectOption, MatrixSelectRow } from '../../../../lib';
import { MatrixHeader } from '../MatrixHeader';
import { MatrixRow } from '../MatrixRow';

import { Box } from '~/shared/ui';

type Props = {
options: Array<MatrixSelectOption>;
rows: Array<MatrixSelectRow>;
Expand Down
3 changes: 1 addition & 2 deletions src/entities/activity/ui/items/Matrix/MatrixRow.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import { PropsWithChildren } from 'react';

import Box from '@mui/material/Box';

import { AxisItem, AxisListItem } from './AxisListItem';
import { MatrixCell } from './MatrixCell';

import { Theme } from '~/shared/constants';
import { Box } from '~/shared/ui';

type Props = PropsWithChildren<{
isEven: boolean;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import Box from '@mui/material/Box';

import { MatrixCell } from '../MatrixCell';

import { Box } from '~/shared/ui';
import { RadioOption, SelectBaseBox } from '~/shared/ui';

type Props = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import Box from '@mui/material/Box';

import { RadioButton } from './RadioButton';
import { MatrixSelectOption, MatrixSelectRow, SingleMultiSelectAnswer } from '../../../../lib';
import { MatrixHeader } from '../MatrixHeader';
import { MatrixRow } from '../MatrixRow';

import { Box } from '~/shared/ui';

type Props = {
options: Array<MatrixSelectOption>;
rows: Array<MatrixSelectRow>;
Expand Down
3 changes: 1 addition & 2 deletions src/entities/activity/ui/items/Matrix/Slider/SliderRow.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import Box from '@mui/material/Box';

import { Theme } from '~/shared/constants';
import { Box } from '~/shared/ui';
import { SliderItemBase, Text } from '~/shared/ui';

type Props = {
Expand Down
4 changes: 2 additions & 2 deletions src/entities/activity/ui/items/Matrix/Slider/index.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { useCallback } from 'react';

import Box from '@mui/material/Box';

import { SliderRow } from './SliderRow';
import { SliderRowsAnswer, SliderRowsItem } from '../../../../lib';

import { Box } from '~/shared/ui';

type Props = {
item: SliderRowsItem;
values: SliderRowsAnswer;
Expand Down
3 changes: 1 addition & 2 deletions src/entities/activity/ui/items/RadioItem/RadioItemOption.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { useMemo } from 'react';

import Box from '@mui/material/Box';

import { Box } from '~/shared/ui';
import {
CustomTooltip,
RadioOption,
Expand Down
2 changes: 1 addition & 1 deletion src/entities/activity/ui/items/RadioItem/index.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { useMemo } from 'react';

import Box from '@mui/material/Box';
import RadioGroup from '@mui/material/RadioGroup';

import { RadioItemOption } from './RadioItemOption';
import { RadioItem as RadioItemType } from '../../../lib';

import { Box } from '~/shared/ui';
import { randomizeArray, splitList, useCustomMediaQuery } from '~/shared/utils';

type RadioItemProps = {
Expand Down
3 changes: 1 addition & 2 deletions src/entities/activity/ui/items/SliderItem.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import Box from '@mui/material/Box';

import { SliderItem as SliderItemType } from '../../lib';

import { Box } from '~/shared/ui';
import { SliderItemBase } from '~/shared/ui';

type SliderItemProps = {
Expand Down
3 changes: 1 addition & 2 deletions src/entities/activity/ui/items/TimeItem.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Box from '@mui/material/Box';

import { Box } from '~/shared/ui';
import { TimeItemBase } from '~/shared/ui';

type Props = {
Expand Down
2 changes: 1 addition & 1 deletion src/entities/activity/ui/items/TimeRangeItem.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Box from '@mui/material/Box';
import { useTheme } from '@mui/material/styles';
import useMediaQuery from '@mui/material/useMediaQuery';

import { Box } from '~/shared/ui';
import { TimeItemBase } from '~/shared/ui';

type Props = {
Expand Down
3 changes: 1 addition & 2 deletions src/entities/applet/ui/AppletCard.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import Box from '@mui/material/Box';

import { AppletListItem } from '../lib';

import { ROUTES } from '~/shared/constants';
import { Box } from '~/shared/ui';
import { CustomCard } from '~/shared/ui';
import { MixEvents, MixProperties, Mixpanel, useCustomNavigation } from '~/shared/utils';

Expand Down
4 changes: 2 additions & 2 deletions src/entities/applet/ui/AppletList.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import Box from '@mui/material/Box';

import { AppletCard } from './AppletCard';
import { AppletListItem } from '../lib';

import { Box } from '~/shared/ui';

type Props = {
applets: AppletListItem[];
};
Expand Down
3 changes: 1 addition & 2 deletions src/entities/invitation/ui/Invitation.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import Box from '@mui/material/Box';

import { InvitationContent } from './InvitationContent';
import { InvitationHeader } from './InvitationHeader';
import { InvitationDetails, useInvitationTranslation } from '../lib';

import { Theme } from '~/shared/constants';
import { Box } from '~/shared/ui';
import { PageMessage } from '~/shared/ui';
import Logo from '~/shared/ui/Logo';

Expand Down
8 changes: 4 additions & 4 deletions src/entities/invitation/ui/InvitationContent.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Box from '@mui/material/Box';

import { useInvitationTranslation } from '../lib';

import { Box } from '~/shared/ui';

interface InvitationContentProps {
appletName: string;
isUserAuthenticated: boolean;
Expand All @@ -15,7 +15,7 @@ export const InvitationContent = ({ appletName, isUserAuthenticated }: Invitatio
<Box
className="invitationBody"
dangerouslySetInnerHTML={{
__html: t('inviteContent.description', { displayName: appletName }),
__html: t('inviteContent.description', { displayName: appletName }) ?? '',
}}
/>
<Box margin="24px 0px">
Expand All @@ -28,7 +28,7 @@ export const InvitationContent = ({ appletName, isUserAuthenticated }: Invitatio
<li>
<Box
dangerouslySetInnerHTML={{
__html: t('inviteContent.step3', { displayName: appletName }),
__html: t('inviteContent.step3', { displayName: appletName }) ?? '',
}}
/>
</li>
Expand Down
3 changes: 1 addition & 2 deletions src/entities/invitation/ui/InvitationHeader.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import Box from '@mui/material/Box';

import { useInvitationTranslation } from '../lib';

import { Box } from '~/shared/ui';
import { Text } from '~/shared/ui';

interface InvitationHeaderProps {
Expand Down
3 changes: 1 addition & 2 deletions src/features/ChangePassword/ui/ChangePasswordForm.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import Box from '@mui/material/Box';

import { useChangePasswordTranslation } from '../lib/useChangePasswordTranslation';
import { ChangePasswordSchema, TChangePassword } from '../model/schema';

import { useUpdatePasswordMutation } from '~/entities/user';
import { Box } from '~/shared/ui';
import {
BaseButton,
BasicFormProvider,
Expand Down
3 changes: 1 addition & 2 deletions src/features/InvitationAccept/ui/InvitationAcceptButton.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import Box from '@mui/material/Box';

import { useAcceptInviteMutation, useInvitationTranslation } from '~/entities/invitation';
import { ROUTES } from '~/shared/constants';
import { Box } from '~/shared/ui';
import { BaseButton, useNotification } from '~/shared/ui';
import { Mixpanel, useCustomNavigation } from '~/shared/utils';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import Box from '@mui/material/Box';

import { useDeclineInviteMutation, useInvitationTranslation } from '~/entities/invitation';
import { ROUTES } from '~/shared/constants';
import { Box } from '~/shared/ui';
import { BaseButton, useNotification } from '~/shared/ui';
import { useCustomNavigation } from '~/shared/utils';

Expand Down
2 changes: 1 addition & 1 deletion src/features/Login/ui/LoginForm.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import Box from '@mui/material/Box';
import Typography from '@mui/material/Typography';
import { Link } from 'react-router-dom';

Expand All @@ -7,6 +6,7 @@ import { LoginSchema, TLoginForm } from '../model/login.schema';

import { ILoginPayload, useLoginMutation, userModel } from '~/entities/user';
import { ROUTES, Theme } from '~/shared/constants';
import { Box } from '~/shared/ui';
import { BaseButton, BasicFormProvider, Input, PasswordIcon, useNotification } from '~/shared/ui';
import { Mixpanel, useCustomForm, usePasswordType } from '~/shared/utils';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import Box from '@mui/material/Box';
import { useNavigate } from 'react-router-dom';

import { useAcceptPrivateInviteMutation, useInvitationTranslation } from '~/entities/invitation';
import { ROUTES } from '~/shared/constants';
import { Box } from '~/shared/ui';
import { BaseButton, useNotification } from '~/shared/ui';
import { MixEvents, MixProperties, Mixpanel } from '~/shared/utils';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import Box from '@mui/material/Box';
import { useNavigate } from 'react-router-dom';

import { useInvitationTranslation } from '~/entities/invitation';
import { ROUTES } from '~/shared/constants';
import { Box } from '~/shared/ui';
import { BaseButton, useNotification } from '~/shared/ui';

export const PrivateJoinDeclineButton = () => {
Expand Down
2 changes: 1 addition & 1 deletion src/features/RecoveryPassword/ui/RecoveryPasswordForm.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import Box from '@mui/material/Box';
import { useNavigate } from 'react-router-dom';

import { useRecoveryPasswordTranslation } from '../lib/useRecoveryPasswordTranslation';
import { RecoveryPassword, RecoveryPasswordSchema } from '../model/schema';

import { useApproveRecoveryPasswordMutation } from '~/entities/user';
import { ROUTES } from '~/shared/constants';
import { Box } from '~/shared/ui';
import {
BaseButton,
BasicFormProvider,
Expand Down
3 changes: 1 addition & 2 deletions src/features/Signup/ui/SignupForm.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import { useState } from 'react';

import Box from '@mui/material/Box';

import { TERMS_URL } from '../lib/constants';
import { useSignupTranslation } from '../lib/useSignupTranslation';
import { SignupFormSchema, TSignupForm } from '../model/signup.schema';

import { useLoginMutation, userModel, useSignupMutation } from '~/entities/user';
import { Box } from '~/shared/ui';
import {
Input,
CheckboxWithLabel,
Expand Down
3 changes: 1 addition & 2 deletions src/features/StartAssessment/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Box from '@mui/material/Box';

import { Box } from '~/shared/ui';
import { BaseButton } from '~/shared/ui';
import { useCustomTranslation } from '~/shared/utils';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import Box from '@mui/material/Box';
import Typography from '@mui/material/Typography';

import { useAcceptTransferOwnershipQuery } from '../api';

import { Box } from '~/shared/ui';
import { PageMessage } from '~/shared/ui';
import Loader from '~/shared/ui/Loader';
import { MixEvents, MixProperties, Mixpanel, useCustomTranslation } from '~/shared/utils';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import Box from '@mui/material/Box';
import Typography from '@mui/material/Typography';

import { useDeclineTransferOwnershipQuery } from '../api';

import { Box } from '~/shared/ui';
import { PageMessage } from '~/shared/ui';
import Loader from '~/shared/ui/Loader';
import { Mixpanel, useCustomTranslation } from '~/shared/utils';
Expand Down
2 changes: 1 addition & 1 deletion src/pages/ActivityDetails/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Box from '@mui/material/Box';
import { useParams } from 'react-router-dom';

import { Box } from '~/shared/ui';
import { useCustomTranslation } from '~/shared/utils';
import { ActivityDetailsContext, ActivityDetailsWidget } from '~/widgets/ActivityDetails';

Expand Down
3 changes: 1 addition & 2 deletions src/pages/ForgotPassword/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import Box from '@mui/material/Box';

import { ForgotPasswordForm } from '~/features/ForgotPassword';
import { Theme } from '~/shared/constants';
import { Box } from '~/shared/ui';
import { Text } from '~/shared/ui';
import { useCustomTranslation } from '~/shared/utils';

Expand Down
2 changes: 1 addition & 1 deletion src/pages/Invitation/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Box from '@mui/material/Box';
import { useLocation, useParams } from 'react-router-dom';

import { Box } from '~/shared/ui';
import { AuthorizationGuard } from '~/widgets/AuthorizationGuard';
import { AuthorizationButtons } from '~/widgets/AuthorizationNavigateButtons';
import { FetchInvitation } from '~/widgets/FetchInvitation';
Expand Down
Loading

0 comments on commit ae037db

Please sign in to comment.