Skip to content

Commit

Permalink
chore: replace all '@mui/utils' in 'mui-material' package
Browse files Browse the repository at this point in the history
  • Loading branch information
MonstraG committed Dec 22, 2023
1 parent 864d16e commit d169524
Show file tree
Hide file tree
Showing 94 changed files with 115 additions and 105 deletions.
2 changes: 1 addition & 1 deletion packages/mui-material/src/Accordion/Accordion.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import * as React from 'react';
import { isFragment } from 'react-is';
import PropTypes from 'prop-types';
import clsx from 'clsx';
import { chainPropTypes } from '@mui/utils';
import chainPropTypes from '@mui/utils/chainPropTypes';
import { unstable_composeClasses as composeClasses } from '@mui/base/composeClasses';
import styled from '../styles/styled';
import useThemeProps from '../styles/useThemeProps';
Expand Down
3 changes: 2 additions & 1 deletion packages/mui-material/src/Autocomplete/Autocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
import * as React from 'react';
import PropTypes from 'prop-types';
import clsx from 'clsx';
import { chainPropTypes, integerPropType } from '@mui/utils';
import chainPropTypes from '@mui/utils/chainPropTypes';
import integerPropType from '@mui/utils/integerPropType';
import {
unstable_composeClasses as composeClasses,
useAutocomplete,
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/AvatarGroup/AvatarGroup.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import * as React from 'react';
import PropTypes from 'prop-types';
import { isFragment } from 'react-is';
import clsx from 'clsx';
import { chainPropTypes } from '@mui/utils';
import chainPropTypes from '@mui/utils/chainPropTypes';
import { unstable_composeClasses as composeClasses } from '@mui/base/composeClasses';
import styled from '../styles/styled';
import useThemeProps from '../styles/useThemeProps';
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/Badge/Badge.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import * as React from 'react';
import PropTypes from 'prop-types';
import clsx from 'clsx';
import { usePreviousProps } from '@mui/utils';
import usePreviousProps from '@mui/utils/usePreviousProps';
import { unstable_composeClasses as composeClasses } from '@mui/base/composeClasses';
import { useBadge } from '@mui/base/useBadge';
import { useSlotProps } from '@mui/base';
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/Breadcrumbs/Breadcrumbs.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import * as React from 'react';
import { isFragment } from 'react-is';
import PropTypes from 'prop-types';
import clsx from 'clsx';
import { integerPropType } from '@mui/utils';
import integerPropType from '@mui/utils/integerPropType';
import { unstable_composeClasses as composeClasses, useSlotProps } from '@mui/base';
import styled from '../styles/styled';
import useThemeProps from '../styles/useThemeProps';
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/Button/Button.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import * as React from 'react';
import PropTypes from 'prop-types';
import clsx from 'clsx';
import { internal_resolveProps as resolveProps } from '@mui/utils';
import resolveProps from '@mui/utils/resolveProps';
import { unstable_composeClasses as composeClasses } from '@mui/base/composeClasses';
import { alpha } from '@mui/system';
import styled, { rootShouldForwardProp } from '../styles/styled';
Expand Down
3 changes: 2 additions & 1 deletion packages/mui-material/src/ButtonBase/ButtonBase.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
import * as React from 'react';
import PropTypes from 'prop-types';
import clsx from 'clsx';
import { elementTypeAcceptingRef, refType } from '@mui/utils';
import elementTypeAcceptingRef from '@mui/utils/elementTypeAcceptingRef';
import refType from '@mui/utils/refType';
import { unstable_composeClasses as composeClasses } from '@mui/base/composeClasses';
import styled from '../styles/styled';
import useThemeProps from '../styles/useThemeProps';
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/ButtonGroup/ButtonGroup.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import PropTypes from 'prop-types';
import clsx from 'clsx';
import { unstable_composeClasses as composeClasses } from '@mui/base/composeClasses';
import { alpha } from '@mui/system';
import { getValidReactChildren } from '@mui/utils';
import getValidReactChildren from '@mui/utils/getValidReactChildren';
import capitalize from '../utils/capitalize';
import styled from '../styles/styled';
import useThemeProps from '../styles/useThemeProps';
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/Card/Card.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import * as React from 'react';
import PropTypes from 'prop-types';
import clsx from 'clsx';
import { chainPropTypes } from '@mui/utils';
import chainPropTypes from '@mui/utils/chainPropTypes';
import { unstable_composeClasses as composeClasses } from '@mui/base/composeClasses';
import styled from '../styles/styled';
import useThemeProps from '../styles/useThemeProps';
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/CardMedia/CardMedia.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import * as React from 'react';
import PropTypes from 'prop-types';
import clsx from 'clsx';
import { chainPropTypes } from '@mui/utils';
import chainPropTypes from '@mui/utils/chainPropTypes';
import { unstable_composeClasses as composeClasses } from '@mui/base/composeClasses';
import useThemeProps from '../styles/useThemeProps';
import styled from '../styles/styled';
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/Checkbox/Checkbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import * as React from 'react';
import PropTypes from 'prop-types';
import clsx from 'clsx';
import { refType } from '@mui/utils';
import refType from '@mui/utils/refType';
import { unstable_composeClasses as composeClasses } from '@mui/base/composeClasses';
import { alpha } from '@mui/system';
import SwitchBase from '../internal/SwitchBase';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import * as React from 'react';
import PropTypes from 'prop-types';
import clsx from 'clsx';
import { chainPropTypes } from '@mui/utils';
import chainPropTypes from '@mui/utils/chainPropTypes';
import { unstable_composeClasses as composeClasses } from '@mui/base/composeClasses';
import { keyframes, css } from '@mui/system';
import capitalize from '../utils/capitalize';
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/Collapse/Collapse.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import * as React from 'react';
import clsx from 'clsx';
import PropTypes from 'prop-types';
import { Transition } from 'react-transition-group';
import { elementTypeAcceptingRef } from '@mui/utils';
import elementTypeAcceptingRef from '@mui/utils/elementTypeAcceptingRef';
import { unstable_composeClasses as composeClasses } from '@mui/base/composeClasses';
import styled from '../styles/styled';
import useThemeProps from '../styles/useThemeProps';
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/Dialog/Dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import * as React from 'react';
import PropTypes from 'prop-types';
import clsx from 'clsx';
import { unstable_composeClasses as composeClasses } from '@mui/base/composeClasses';
import { unstable_useId as useId } from '@mui/utils';
import useId from '@mui/utils/useId';
import capitalize from '../utils/capitalize';
import Modal from '../Modal';
import Fade from '../Fade';
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/Drawer/Drawer.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import * as React from 'react';
import PropTypes from 'prop-types';
import clsx from 'clsx';
import { integerPropType } from '@mui/utils';
import integerPropType from '@mui/utils/integerPropType';
import { unstable_composeClasses as composeClasses } from '@mui/base/composeClasses';
import Modal from '../Modal';
import Slide from '../Slide';
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/Fade/Fade.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import * as React from 'react';
import PropTypes from 'prop-types';
import { Transition } from 'react-transition-group';
import { elementAcceptingRef } from '@mui/utils';
import elementAcceptingRef from '@mui/utils/elementAcceptingRef';
import useTheme from '../styles/useTheme';
import { reflow, getTransitionProps } from '../transitions/utils';
import useForkRef from '../utils/useForkRef';
Expand Down
3 changes: 2 additions & 1 deletion packages/mui-material/src/FilledInput/FilledInput.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use client';
import * as React from 'react';
import { refType, deepmerge } from '@mui/utils';
import refType from '@mui/utils/refType';
import deepmerge from '@mui/utils/deepmerge';
import PropTypes from 'prop-types';
import { unstable_composeClasses as composeClasses } from '@mui/base/composeClasses';
import InputBase from '../InputBase';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import * as React from 'react';
import PropTypes from 'prop-types';
import clsx from 'clsx';
import { refType } from '@mui/utils';
import refType from '@mui/utils/refType';
import { unstable_composeClasses as composeClasses } from '@mui/base/composeClasses';
import { useFormControl } from '../FormControl';
import Stack from '../Stack';
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/Grow/Grow.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use client';
import * as React from 'react';
import PropTypes from 'prop-types';
import { elementAcceptingRef } from '@mui/utils';
import elementAcceptingRef from '@mui/utils/elementAcceptingRef';
import { Transition } from 'react-transition-group';
import useTheme from '../styles/useTheme';
import { getTransitionProps, reflow } from '../transitions/utils';
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/Hidden/HiddenJs.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use client';
import * as React from 'react';
import PropTypes from 'prop-types';
import { exactProp } from '@mui/utils';
import exactProp from '@mui/utils/exactProp';
import withWidth, { isWidthDown, isWidthUp } from './withWidth';
import useTheme from '../styles/useTheme';

Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/Hidden/withWidth.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import PropTypes from 'prop-types';
import { getDisplayName } from '@mui/utils';
import getDisplayName from '@mui/utils/getDisplayName';
import { getThemeProps } from '@mui/system';
import useTheme from '../styles/useTheme';
import useEnhancedEffect from '../utils/useEnhancedEffect';
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/IconButton/IconButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import * as React from 'react';
import PropTypes from 'prop-types';
import clsx from 'clsx';
import { chainPropTypes } from '@mui/utils';
import chainPropTypes from '@mui/utils/chainPropTypes';
import { unstable_composeClasses as composeClasses } from '@mui/base/composeClasses';
import { alpha } from '@mui/system';
import styled from '../styles/styled';
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/IconButton/IconButton.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as React from 'react';
import { expect } from 'chai';
import PropTypes from 'prop-types';
import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import { unstable_capitalize as capitalize } from '@mui/utils';
import capitalize from '@mui/utils/capitalize';
import { ThemeProvider, createTheme } from '@mui/material/styles';
import IconButton, { iconButtonClasses as classes } from '@mui/material/IconButton';
import Icon from '@mui/material/Icon';
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/ImageList/ImageList.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use client';
import { unstable_composeClasses as composeClasses } from '@mui/base/composeClasses';
import { integerPropType } from '@mui/utils';
import integerPropType from '@mui/utils/integerPropType';
import clsx from 'clsx';
import PropTypes from 'prop-types';
import * as React from 'react';
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/ImageListItem/ImageListItem.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use client';
import { unstable_composeClasses as composeClasses } from '@mui/base/composeClasses';
import { integerPropType } from '@mui/utils';
import integerPropType from '@mui/utils/integerPropType';
import clsx from 'clsx';
import PropTypes from 'prop-types';
import * as React from 'react';
Expand Down
3 changes: 2 additions & 1 deletion packages/mui-material/src/Input/Input.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
import * as React from 'react';
import PropTypes from 'prop-types';
import { unstable_composeClasses as composeClasses } from '@mui/base/composeClasses';
import { refType, deepmerge } from '@mui/utils';
import refType from '@mui/utils/refType';
import deepmerge from '@mui/utils/deepmerge';
import InputBase from '../InputBase';
import styled, { rootShouldForwardProp } from '../styles/styled';
import useThemeProps from '../styles/useThemeProps';
Expand Down
3 changes: 2 additions & 1 deletion packages/mui-material/src/InputBase/InputBase.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
import * as React from 'react';
import PropTypes from 'prop-types';
import clsx from 'clsx';
import { refType, elementTypeAcceptingRef } from '@mui/utils';
import refType from '@mui/utils/refType';
import elementTypeAcceptingRef from '@mui/utils/elementTypeAcceptingRef';
import MuiError from '@mui-internal/babel-macros/MuiError.macro';
import {
unstable_composeClasses as composeClasses,
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/Link/Link.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import * as React from 'react';
import PropTypes from 'prop-types';
import clsx from 'clsx';
import { elementTypeAcceptingRef } from '@mui/utils';
import elementTypeAcceptingRef from '@mui/utils/elementTypeAcceptingRef';
import { unstable_composeClasses as composeClasses } from '@mui/base/composeClasses';
import capitalize from '../utils/capitalize';
import styled from '../styles/styled';
Expand Down
3 changes: 2 additions & 1 deletion packages/mui-material/src/ListItem/ListItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import * as React from 'react';
import PropTypes from 'prop-types';
import clsx from 'clsx';
import { unstable_composeClasses as composeClasses, isHostComponent } from '@mui/base';
import { chainPropTypes, elementTypeAcceptingRef } from '@mui/utils';
import chainPropTypes from '@mui/utils/chainPropTypes';
import elementTypeAcceptingRef from '@mui/utils/elementTypeAcceptingRef';
import { alpha } from '@mui/system';
import styled from '../styles/styled';
import useThemeProps from '../styles/useThemeProps';
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/Menu/Menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import PropTypes from 'prop-types';
import clsx from 'clsx';
import { unstable_composeClasses as composeClasses } from '@mui/base/composeClasses';
import { useSlotProps } from '@mui/base/utils';
import { HTMLElementType } from '@mui/utils';
import HTMLElementType from '@mui/utils/HTMLElementType';
import MenuList from '../MenuList';
import Popover, { PopoverPaper } from '../Popover';
import styled, { rootShouldForwardProp } from '../styles/styled';
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/MobileStepper/MobileStepper.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import * as React from 'react';
import PropTypes from 'prop-types';
import clsx from 'clsx';
import { integerPropType } from '@mui/utils';
import integerPropType from '@mui/utils/integerPropType';
import { unstable_composeClasses as composeClasses } from '@mui/base/composeClasses';
import Paper from '../Paper';
import capitalize from '../utils/capitalize';
Expand Down
3 changes: 2 additions & 1 deletion packages/mui-material/src/Modal/Modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
import * as React from 'react';
import PropTypes from 'prop-types';
import clsx from 'clsx';
import { elementAcceptingRef, HTMLElementType } from '@mui/utils';
import elementAcceptingRef from '@mui/utils/elementAcceptingRef';
import HTMLElementType from '@mui/utils/HTMLElementType';
import { useSlotProps } from '@mui/base';
import { unstable_useModal as useModal } from '@mui/base/unstable_useModal';
import { unstable_composeClasses as composeClasses } from '@mui/base/composeClasses';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import * as React from 'react';
import PropTypes from 'prop-types';
import clsx from 'clsx';
import { refType } from '@mui/utils';
import refType from '@mui/utils/refType';
import { unstable_composeClasses as composeClasses } from '@mui/base/composeClasses';
import capitalize from '../utils/capitalize';
import nativeSelectClasses, { getNativeSelectUtilityClasses } from './nativeSelectClasses';
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/OutlinedInput/OutlinedInput.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use client';
import * as React from 'react';
import PropTypes from 'prop-types';
import { refType } from '@mui/utils';
import refType from '@mui/utils/refType';
import { unstable_composeClasses as composeClasses } from '@mui/base/composeClasses';
import NotchedOutline from './NotchedOutline';
import useFormControl from '../FormControl/useFormControl';
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/Pagination/Pagination.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import * as React from 'react';
import PropTypes from 'prop-types';
import clsx from 'clsx';
import { unstable_composeClasses as composeClasses } from '@mui/base/composeClasses';
import { integerPropType } from '@mui/utils';
import integerPropType from '@mui/utils/integerPropType';
import useThemeProps from '../styles/useThemeProps';
import { getPaginationUtilityClass } from './paginationClasses';
import usePagination from '../usePagination';
Expand Down
3 changes: 2 additions & 1 deletion packages/mui-material/src/Paper/Paper.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
import * as React from 'react';
import PropTypes from 'prop-types';
import clsx from 'clsx';
import { chainPropTypes, integerPropType } from '@mui/utils';
import chainPropTypes from '@mui/utils/chainPropTypes';
import integerPropType from '@mui/utils/integerPropType';
import { unstable_composeClasses as composeClasses } from '@mui/base/composeClasses';
import { alpha } from '@mui/system';
import styled from '../styles/styled';
Expand Down
12 changes: 5 additions & 7 deletions packages/mui-material/src/Popover/Popover.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,11 @@ import {
useSlotProps,
isHostComponent,
} from '@mui/base';
import {
chainPropTypes,
integerPropType,
elementTypeAcceptingRef,
refType,
HTMLElementType,
} from '@mui/utils';
import chainPropTypes from '@mui/utils/chainPropTypes';
import integerPropType from '@mui/utils/integerPropType';
import elementTypeAcceptingRef from '@mui/utils/elementTypeAcceptingRef';
import refType from '@mui/utils/refType';
import HTMLElementType from '@mui/utils/HTMLElementType';
import styled from '../styles/styled';
import useThemeProps from '../styles/useThemeProps';
import debounce from '../utils/debounce';
Expand Down
3 changes: 2 additions & 1 deletion packages/mui-material/src/Popper/Popper.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
'use client';
import { Popper as BasePopper, PopperProps as BasePopperProps } from '@mui/base/Popper';
import { Direction, SxProps, useThemeWithoutDefault as useTheme } from '@mui/system';
import { HTMLElementType, refType } from '@mui/utils';
import HTMLElementType from '@mui/utils/HTMLElementType';
import refType from '@mui/utils/refType';
import PropTypes from 'prop-types';
import * as React from 'react';
import { styled, Theme, useThemeProps } from '../styles';
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/Radio/Radio.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import * as React from 'react';
import PropTypes from 'prop-types';
import clsx from 'clsx';
import { refType } from '@mui/utils';
import refType from '@mui/utils/refType';
import { unstable_composeClasses as composeClasses } from '@mui/base/composeClasses';
import { alpha } from '@mui/system';
import SwitchBase from '../internal/SwitchBase';
Expand Down
3 changes: 2 additions & 1 deletion packages/mui-material/src/Rating/Rating.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
import * as React from 'react';
import PropTypes from 'prop-types';
import clsx from 'clsx';
import { chainPropTypes, visuallyHidden } from '@mui/utils';
import chainPropTypes from '@mui/utils/chainPropTypes';
import visuallyHidden from '@mui/utils/visuallyHidden';
import { unstable_composeClasses as composeClasses } from '@mui/base/composeClasses';
import useTheme from '../styles/useTheme';
import {
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/Select/Select.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import * as React from 'react';
import PropTypes from 'prop-types';
import clsx from 'clsx';
import { deepmerge } from '@mui/utils';
import deepmerge from '@mui/utils/deepmerge';
import SelectInput from './SelectInput';
import formControlState from '../FormControl/formControlState';
import useFormControl from '../FormControl/useFormControl';
Expand Down
3 changes: 2 additions & 1 deletion packages/mui-material/src/Select/SelectInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import PropTypes from 'prop-types';
import clsx from 'clsx';
import MuiError from '@mui-internal/babel-macros/MuiError.macro';
import { unstable_composeClasses as composeClasses } from '@mui/base/composeClasses';
import { refType, unstable_useId as useId } from '@mui/utils';
import refType from '@mui/utils/refType';
import useId from '@mui/utils/useId';
import ownerDocument from '../utils/ownerDocument';
import capitalize from '../utils/capitalize';
import Menu from '../Menu/Menu';
Expand Down
Loading

0 comments on commit d169524

Please sign in to comment.