diff --git a/demo/src/app.jsx b/demo/src/app.jsx index df1eaa6b..c49e59df 100644 --- a/demo/src/app.jsx +++ b/demo/src/app.jsx @@ -16,6 +16,7 @@ import { FormGroup, Grid, IconButton, + styled, StyledEngineProvider, Tab, Tabs, @@ -24,30 +25,22 @@ import { Typography, } from '@mui/material'; import CommentIcon from '@mui/icons-material/Comment'; -import { styled } from '@mui/system'; import { useMatch } from 'react-router'; import { IntlProvider, useIntl } from 'react-intl'; import { BrowserRouter, useLocation, useNavigate } from 'react-router-dom'; import { useCallback, useEffect, useRef, useState } from 'react'; import translations from './demo_intl'; - -// eslint-disable-next-line import/no-unresolved -import PowsyblLogo from '../images/powsybl_logo.svg?react'; +import PowsyblLogo from '../images/powsybl_logo.svg?react'; // eslint-disable-line import/no-unresolved import AppPackage from '../../package.json'; - import TreeViewFinderConfig from './TreeViewFinderConfig'; - import { fetchInfiniteTestDataList, fetchInfiniteTestDataTree, testDataList, testDataTree, } from '../data/TreeViewFinder'; - import searchEquipments from '../data/EquipmentSearchBar'; - import FlatParametersTab from './FlatParametersTab'; - import InputsTab from './InputsTab'; import { EquipmentSearchDialog } from './equipment-search'; import { InlineSearch } from './inline-search'; diff --git a/demo/src/right-resizable-box.jsx b/demo/src/right-resizable-box.jsx index b29f0451..b56f7644 100644 --- a/demo/src/right-resizable-box.jsx +++ b/demo/src/right-resizable-box.jsx @@ -11,8 +11,7 @@ import { MoreVert as ResizePanelHandleIcon } from '@mui/icons-material'; import { ResizableBox } from 'react-resizable'; import { useWindowWidth } from '@react-hook/window-size'; import PropTypes from 'prop-types'; -import { Box } from '@mui/material'; -import { styled } from '@mui/system'; +import { Box, styled } from '@mui/material'; import { mergeSx } from '../../src/utils/styles'; const styles = { diff --git a/package-lock.json b/package-lock.json index 3ccf8b3a..e2dc8883 100644 --- a/package-lock.json +++ b/package-lock.json @@ -114,7 +114,6 @@ "@mui/icons-material": "^5.15.14", "@mui/lab": "5.0.0-alpha.169", "@mui/material": "^5.15.14", - "@mui/system": "^5.15.15", "@mui/x-tree-view": "^6.17.0", "ag-grid-community": "^33.0.3", "ag-grid-react": "^33.0.3", diff --git a/package.json b/package.json index 677d871d..77dbf6e9 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,6 @@ "@mui/icons-material": "^5.15.14", "@mui/lab": "5.0.0-alpha.169", "@mui/material": "^5.15.14", - "@mui/system": "^5.15.15", "@mui/x-tree-view": "^6.17.0", "ag-grid-community": "^33.0.3", "ag-grid-react": "^33.0.3", diff --git a/src/components/checkBoxList/checkBoxList.type.ts b/src/components/checkBoxList/checkBoxList.type.ts index 46b4d25d..d0132f76 100644 --- a/src/components/checkBoxList/checkBoxList.type.ts +++ b/src/components/checkBoxList/checkBoxList.type.ts @@ -5,10 +5,9 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -import React from 'react'; -import { DraggableProvided, DragStart, DropResult } from 'react-beautiful-dnd'; -import { SxProps } from '@mui/system'; -import { Theme } from '@mui/material'; +import type { ReactElement } from 'react'; +import type { DraggableProvided, DragStart, DropResult } from 'react-beautiful-dnd'; +import type { SxProps, Theme } from '@mui/material'; export type CheckBoxListItemSx = { checkBoxIcon?: SxProps; @@ -34,7 +33,7 @@ export interface CheckBoxListItemProps { sx?: CheckBoxListItemSx; label: string; onClick: () => void; - secondaryAction?: (item: T, hover: string) => React.ReactElement | null; + secondaryAction?: (item: T, hover: string) => ReactElement | null; getItemId: (item: T) => string; disabled?: boolean; divider?: boolean; @@ -54,7 +53,7 @@ export interface CheckBoxListItemsProps { onSelectionChange?: (selectedItems: T[]) => void; getItemId: (item: T) => string; getItemLabel?: (item: T) => string; - secondaryAction?: (item: T, hover: boolean) => React.ReactElement | null; + secondaryAction?: (item: T, hover: boolean) => ReactElement | null; isDisabled?: (item: T) => boolean; addSelectAllCheckbox?: boolean; selectAllCheckBoxLabel?: string; diff --git a/src/components/customAGGrid/customAggrid.style.ts b/src/components/customAGGrid/customAggrid.style.ts index 9ad9c15d..781702c8 100644 --- a/src/components/customAGGrid/customAggrid.style.ts +++ b/src/components/customAGGrid/customAggrid.style.ts @@ -4,8 +4,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -import { Theme } from '@mui/material/styles/createTheme'; -import { SystemStyleObject } from '@mui/system/styleFunctionSx/styleFunctionSx'; +import type { Theme } from '@mui/material'; +import type { SystemStyleObject } from '@mui/system'; export const CUSTOM_AGGRID_THEME = 'custom-aggrid-theme'; diff --git a/src/components/customAGGrid/customAggrid.tsx b/src/components/customAGGrid/customAggrid.tsx index 28f138f6..1cfb087e 100644 --- a/src/components/customAGGrid/customAggrid.tsx +++ b/src/components/customAGGrid/customAggrid.tsx @@ -12,10 +12,9 @@ import { useIntl } from 'react-intl'; import 'ag-grid-community/styles/ag-grid.css'; import 'ag-grid-community/styles/ag-theme-alpine.css'; import { ColumnResizedEvent, GetLocaleTextParams } from 'ag-grid-community'; -import { Box } from '@mui/system'; -import { SxProps, useTheme } from '@mui/material'; +import { Box, type SxProps, useTheme } from '@mui/material'; import { mergeSx } from '../../utils/styles'; -import { styles, CUSTOM_AGGRID_THEME } from './customAggrid.style'; +import { CUSTOM_AGGRID_THEME, styles } from './customAggrid.style'; interface CustomAGGGridStyleProps { shouldHidePinnedHeaderRightBorder?: boolean; diff --git a/src/components/inputs/reactHookForm/numbers/RangeInput.tsx b/src/components/inputs/reactHookForm/numbers/RangeInput.tsx index 248d4678..13af7956 100644 --- a/src/components/inputs/reactHookForm/numbers/RangeInput.tsx +++ b/src/components/inputs/reactHookForm/numbers/RangeInput.tsx @@ -8,8 +8,7 @@ import { useWatch } from 'react-hook-form'; import { FormattedMessage } from 'react-intl'; import { useMemo } from 'react'; import { type ObjectSchema } from 'yup'; -import { FormControl, Grid, InputLabel } from '@mui/material'; -import { Theme } from '@mui/system'; +import { FormControl, Grid, InputLabel, type Theme } from '@mui/material'; import { FloatInput } from './FloatInput'; import yup from '../../../../utils/yupConfig'; import { MuiSelectInput } from '../selectInputs/MuiSelectInput'; diff --git a/src/components/topBar/MessageBanner.tsx b/src/components/topBar/MessageBanner.tsx index dcb81d6c..38e3d71f 100644 --- a/src/components/topBar/MessageBanner.tsx +++ b/src/components/topBar/MessageBanner.tsx @@ -5,10 +5,10 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ import { ReactNode, useState } from 'react'; -import { Box, Theme } from '@mui/material'; +import { Box, type Theme } from '@mui/material'; import CloseIcon from '@mui/icons-material/Close'; import WarningAmberIcon from '@mui/icons-material/WarningAmber'; -import { SystemStyleObject } from '@mui/system/styleFunctionSx/styleFunctionSx'; +import type { SystemStyleObject } from '@mui/system'; const styles = { banner: (theme: Theme): SystemStyleObject => ({ diff --git a/src/components/topBar/TopBar.tsx b/src/components/topBar/TopBar.tsx index 9cd2e8e2..f23fc055 100644 --- a/src/components/topBar/TopBar.tsx +++ b/src/components/topBar/TopBar.tsx @@ -19,10 +19,11 @@ import { Menu, MenuItem, MenuList, - MenuProps, + type MenuProps, Paper, Popper, - Theme, + styled, + type Theme, ToggleButton, ToggleButtonGroup, Toolbar, @@ -41,8 +42,6 @@ import { Person as PersonIcon, WbSunny as WbSunnyIcon, } from '@mui/icons-material'; -import { styled } from '@mui/system'; - import type { User } from 'oidc-client'; import { GridLogo, GridLogoProps } from './GridLogo'; import { AboutDialog, AboutDialogProps } from './AboutDialog'; diff --git a/src/components/topBar/UserInformationDialog.tsx b/src/components/topBar/UserInformationDialog.tsx index ece8e948..e2e28799 100644 --- a/src/components/topBar/UserInformationDialog.tsx +++ b/src/components/topBar/UserInformationDialog.tsx @@ -5,8 +5,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -import { Dialog, DialogActions, DialogContent, DialogTitle, Grid, Typography } from '@mui/material'; -import { Box } from '@mui/system'; +import { Box, Dialog, DialogActions, DialogContent, DialogTitle, Grid, Typography } from '@mui/material'; import { FormattedMessage } from 'react-intl'; import type { User } from 'oidc-client'; import { useEffect, useState } from 'react'; diff --git a/src/components/treeViewFinder/TreeViewFinder.tsx b/src/components/treeViewFinder/TreeViewFinder.tsx index 7117d188..bad703e1 100644 --- a/src/components/treeViewFinder/TreeViewFinder.tsx +++ b/src/components/treeViewFinder/TreeViewFinder.tsx @@ -7,21 +7,18 @@ import React, { ReactElement, useCallback, useEffect, useRef, useState } from 'react'; import { useIntl } from 'react-intl'; - -import { styled } from '@mui/system'; - import { Button, - ButtonProps, + type ButtonProps, Dialog, DialogActions, DialogContent, DialogContentText, DialogTitle, + type ModalProps, + styled, Typography, - ModalProps, } from '@mui/material'; - import { TreeItem, TreeView, TreeViewClasses } from '@mui/x-tree-view'; import { Check as CheckIcon,