From d169524f97f1782436730302468cb4692fc9b49b Mon Sep 17 00:00:00 2001 From: Arseny Garelyshev Date: Fri, 22 Dec 2023 19:14:36 +0100 Subject: [PATCH] chore: replace all '@mui/utils' in 'mui-material' package --- packages/mui-material/src/Accordion/Accordion.js | 2 +- .../mui-material/src/Autocomplete/Autocomplete.js | 3 ++- packages/mui-material/src/AvatarGroup/AvatarGroup.js | 2 +- packages/mui-material/src/Badge/Badge.js | 2 +- packages/mui-material/src/Breadcrumbs/Breadcrumbs.js | 2 +- packages/mui-material/src/Button/Button.js | 2 +- packages/mui-material/src/ButtonBase/ButtonBase.js | 3 ++- packages/mui-material/src/ButtonGroup/ButtonGroup.js | 2 +- packages/mui-material/src/Card/Card.js | 2 +- packages/mui-material/src/CardMedia/CardMedia.js | 2 +- packages/mui-material/src/Checkbox/Checkbox.js | 2 +- .../src/CircularProgress/CircularProgress.js | 2 +- packages/mui-material/src/Collapse/Collapse.js | 2 +- packages/mui-material/src/Dialog/Dialog.js | 2 +- packages/mui-material/src/Drawer/Drawer.js | 2 +- packages/mui-material/src/Fade/Fade.js | 2 +- packages/mui-material/src/FilledInput/FilledInput.js | 3 ++- .../src/FormControlLabel/FormControlLabel.js | 2 +- packages/mui-material/src/Grow/Grow.js | 2 +- packages/mui-material/src/Hidden/HiddenJs.js | 2 +- packages/mui-material/src/Hidden/withWidth.js | 2 +- packages/mui-material/src/IconButton/IconButton.js | 2 +- .../mui-material/src/IconButton/IconButton.test.js | 2 +- packages/mui-material/src/ImageList/ImageList.js | 2 +- .../mui-material/src/ImageListItem/ImageListItem.js | 2 +- packages/mui-material/src/Input/Input.js | 3 ++- packages/mui-material/src/InputBase/InputBase.js | 3 ++- packages/mui-material/src/Link/Link.js | 2 +- packages/mui-material/src/ListItem/ListItem.js | 3 ++- packages/mui-material/src/Menu/Menu.js | 2 +- .../mui-material/src/MobileStepper/MobileStepper.js | 2 +- packages/mui-material/src/Modal/Modal.js | 3 ++- .../src/NativeSelect/NativeSelectInput.js | 2 +- .../mui-material/src/OutlinedInput/OutlinedInput.js | 2 +- packages/mui-material/src/Pagination/Pagination.js | 2 +- packages/mui-material/src/Paper/Paper.js | 3 ++- packages/mui-material/src/Popover/Popover.js | 12 +++++------- packages/mui-material/src/Popper/Popper.tsx | 3 ++- packages/mui-material/src/Radio/Radio.js | 2 +- packages/mui-material/src/Rating/Rating.js | 3 ++- packages/mui-material/src/Select/Select.js | 2 +- packages/mui-material/src/Select/SelectInput.js | 3 ++- packages/mui-material/src/Slide/Slide.js | 4 +++- packages/mui-material/src/Slider/Slider.js | 2 +- packages/mui-material/src/Step/Step.js | 2 +- packages/mui-material/src/Stepper/Stepper.js | 2 +- .../src/SwipeableDrawer/SwipeableDrawer.js | 2 +- packages/mui-material/src/Switch/Switch.js | 2 +- .../src/TablePagination/TablePagination.js | 3 ++- packages/mui-material/src/Tabs/Tabs.js | 2 +- packages/mui-material/src/TextField/TextField.js | 3 ++- packages/mui-material/src/Tooltip/Tooltip.js | 2 +- packages/mui-material/src/Zoom/Zoom.js | 2 +- packages/mui-material/src/className/index.ts | 3 +-- .../mui-material/src/generateUtilityClass/index.ts | 4 ++-- .../mui-material/src/generateUtilityClasses/index.ts | 2 +- packages/mui-material/src/internal/SwitchBase.js | 2 +- .../src/styles/createMuiStrictModeTheme.js | 2 +- packages/mui-material/src/styles/createPalette.js | 2 +- packages/mui-material/src/styles/createTheme.js | 2 +- packages/mui-material/src/styles/createTypography.js | 2 +- .../src/styles/experimental_extendTheme.js | 2 +- .../mui-material/src/usePagination/usePagination.js | 2 +- packages/mui-material/src/utils/capitalize.d.ts | 2 +- packages/mui-material/src/utils/capitalize.js | 2 +- .../src/utils/createChainedFunction.d.ts | 2 +- .../mui-material/src/utils/createChainedFunction.js | 2 +- packages/mui-material/src/utils/debounce.d.ts | 2 +- packages/mui-material/src/utils/debounce.js | 2 +- .../mui-material/src/utils/deprecatedPropType.d.ts | 2 +- .../mui-material/src/utils/deprecatedPropType.js | 2 +- packages/mui-material/src/utils/getScrollbarSize.ts | 2 +- packages/mui-material/src/utils/isMuiElement.d.ts | 2 +- packages/mui-material/src/utils/isMuiElement.js | 2 +- packages/mui-material/src/utils/ownerDocument.ts | 2 +- packages/mui-material/src/utils/ownerWindow.ts | 2 +- .../mui-material/src/utils/requirePropFactory.d.ts | 2 +- .../mui-material/src/utils/requirePropFactory.js | 2 +- packages/mui-material/src/utils/scrollLeft.js | 6 ++---- packages/mui-material/src/utils/setRef.ts | 2 +- packages/mui-material/src/utils/unsupportedProp.d.ts | 2 +- packages/mui-material/src/utils/unsupportedProp.js | 2 +- packages/mui-material/src/utils/useControlled.d.ts | 2 +- packages/mui-material/src/utils/useControlled.js | 2 +- .../mui-material/src/utils/useEnhancedEffect.d.ts | 2 +- packages/mui-material/src/utils/useEnhancedEffect.js | 2 +- .../mui-material/src/utils/useEventCallback.d.ts | 2 +- packages/mui-material/src/utils/useEventCallback.js | 2 +- packages/mui-material/src/utils/useForkRef.d.ts | 2 +- packages/mui-material/src/utils/useForkRef.js | 2 +- packages/mui-material/src/utils/useId.d.ts | 2 +- packages/mui-material/src/utils/useId.js | 2 +- .../mui-material/src/utils/useIsFocusVisible.d.ts | 2 +- packages/mui-material/src/utils/useIsFocusVisible.js | 2 +- 94 files changed, 115 insertions(+), 105 deletions(-) diff --git a/packages/mui-material/src/Accordion/Accordion.js b/packages/mui-material/src/Accordion/Accordion.js index ca4b6a2d88e894..2cb312c2e62921 100644 --- a/packages/mui-material/src/Accordion/Accordion.js +++ b/packages/mui-material/src/Accordion/Accordion.js @@ -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'; diff --git a/packages/mui-material/src/Autocomplete/Autocomplete.js b/packages/mui-material/src/Autocomplete/Autocomplete.js index 10d1140ae01467..54d1b067a960be 100644 --- a/packages/mui-material/src/Autocomplete/Autocomplete.js +++ b/packages/mui-material/src/Autocomplete/Autocomplete.js @@ -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, diff --git a/packages/mui-material/src/AvatarGroup/AvatarGroup.js b/packages/mui-material/src/AvatarGroup/AvatarGroup.js index 4cd5193787cc3e..ba916ab3ea0f4b 100644 --- a/packages/mui-material/src/AvatarGroup/AvatarGroup.js +++ b/packages/mui-material/src/AvatarGroup/AvatarGroup.js @@ -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'; diff --git a/packages/mui-material/src/Badge/Badge.js b/packages/mui-material/src/Badge/Badge.js index eecbce2c31d50e..2c2d144de219a9 100644 --- a/packages/mui-material/src/Badge/Badge.js +++ b/packages/mui-material/src/Badge/Badge.js @@ -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'; diff --git a/packages/mui-material/src/Breadcrumbs/Breadcrumbs.js b/packages/mui-material/src/Breadcrumbs/Breadcrumbs.js index 8e2db08de8be01..fccb8fb381a2cc 100644 --- a/packages/mui-material/src/Breadcrumbs/Breadcrumbs.js +++ b/packages/mui-material/src/Breadcrumbs/Breadcrumbs.js @@ -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'; diff --git a/packages/mui-material/src/Button/Button.js b/packages/mui-material/src/Button/Button.js index e65a372712375d..9e4087f79f4d76 100644 --- a/packages/mui-material/src/Button/Button.js +++ b/packages/mui-material/src/Button/Button.js @@ -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'; diff --git a/packages/mui-material/src/ButtonBase/ButtonBase.js b/packages/mui-material/src/ButtonBase/ButtonBase.js index 28f380679c31db..3bc9bb7a6d31d8 100644 --- a/packages/mui-material/src/ButtonBase/ButtonBase.js +++ b/packages/mui-material/src/ButtonBase/ButtonBase.js @@ -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'; diff --git a/packages/mui-material/src/ButtonGroup/ButtonGroup.js b/packages/mui-material/src/ButtonGroup/ButtonGroup.js index 697ed7e2590f2e..73e5010474a3e8 100644 --- a/packages/mui-material/src/ButtonGroup/ButtonGroup.js +++ b/packages/mui-material/src/ButtonGroup/ButtonGroup.js @@ -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'; diff --git a/packages/mui-material/src/Card/Card.js b/packages/mui-material/src/Card/Card.js index c670facf098484..2bba0f45c939ba 100644 --- a/packages/mui-material/src/Card/Card.js +++ b/packages/mui-material/src/Card/Card.js @@ -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'; diff --git a/packages/mui-material/src/CardMedia/CardMedia.js b/packages/mui-material/src/CardMedia/CardMedia.js index 705fdc87fad36f..25382716e67bed 100644 --- a/packages/mui-material/src/CardMedia/CardMedia.js +++ b/packages/mui-material/src/CardMedia/CardMedia.js @@ -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'; diff --git a/packages/mui-material/src/Checkbox/Checkbox.js b/packages/mui-material/src/Checkbox/Checkbox.js index e4fee8b2b82a37..5fb3e6e6ed383e 100644 --- a/packages/mui-material/src/Checkbox/Checkbox.js +++ b/packages/mui-material/src/Checkbox/Checkbox.js @@ -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'; diff --git a/packages/mui-material/src/CircularProgress/CircularProgress.js b/packages/mui-material/src/CircularProgress/CircularProgress.js index 3d9e7201d00fb3..cdb89629f3544f 100644 --- a/packages/mui-material/src/CircularProgress/CircularProgress.js +++ b/packages/mui-material/src/CircularProgress/CircularProgress.js @@ -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'; diff --git a/packages/mui-material/src/Collapse/Collapse.js b/packages/mui-material/src/Collapse/Collapse.js index 1ec78ba56bebdb..012e5cd919b4e5 100644 --- a/packages/mui-material/src/Collapse/Collapse.js +++ b/packages/mui-material/src/Collapse/Collapse.js @@ -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'; diff --git a/packages/mui-material/src/Dialog/Dialog.js b/packages/mui-material/src/Dialog/Dialog.js index 05c6e1ff520d22..45f49e924b0c70 100644 --- a/packages/mui-material/src/Dialog/Dialog.js +++ b/packages/mui-material/src/Dialog/Dialog.js @@ -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'; diff --git a/packages/mui-material/src/Drawer/Drawer.js b/packages/mui-material/src/Drawer/Drawer.js index 3b9491de5c4753..fb99c02645e5c8 100644 --- a/packages/mui-material/src/Drawer/Drawer.js +++ b/packages/mui-material/src/Drawer/Drawer.js @@ -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'; diff --git a/packages/mui-material/src/Fade/Fade.js b/packages/mui-material/src/Fade/Fade.js index 57df4cd5011747..e3964edd4b6cf9 100644 --- a/packages/mui-material/src/Fade/Fade.js +++ b/packages/mui-material/src/Fade/Fade.js @@ -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'; diff --git a/packages/mui-material/src/FilledInput/FilledInput.js b/packages/mui-material/src/FilledInput/FilledInput.js index 8d2a6b1aa4588c..749b508e341e02 100644 --- a/packages/mui-material/src/FilledInput/FilledInput.js +++ b/packages/mui-material/src/FilledInput/FilledInput.js @@ -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'; diff --git a/packages/mui-material/src/FormControlLabel/FormControlLabel.js b/packages/mui-material/src/FormControlLabel/FormControlLabel.js index 987309878c3c3b..a8239d30417259 100644 --- a/packages/mui-material/src/FormControlLabel/FormControlLabel.js +++ b/packages/mui-material/src/FormControlLabel/FormControlLabel.js @@ -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'; diff --git a/packages/mui-material/src/Grow/Grow.js b/packages/mui-material/src/Grow/Grow.js index 1eab0e0dad32ef..da619b92cf19cc 100644 --- a/packages/mui-material/src/Grow/Grow.js +++ b/packages/mui-material/src/Grow/Grow.js @@ -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'; diff --git a/packages/mui-material/src/Hidden/HiddenJs.js b/packages/mui-material/src/Hidden/HiddenJs.js index 5b718c09c008e8..b591452cef6299 100644 --- a/packages/mui-material/src/Hidden/HiddenJs.js +++ b/packages/mui-material/src/Hidden/HiddenJs.js @@ -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'; diff --git a/packages/mui-material/src/Hidden/withWidth.js b/packages/mui-material/src/Hidden/withWidth.js index 276ba00f470684..33e6407158c536 100644 --- a/packages/mui-material/src/Hidden/withWidth.js +++ b/packages/mui-material/src/Hidden/withWidth.js @@ -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'; diff --git a/packages/mui-material/src/IconButton/IconButton.js b/packages/mui-material/src/IconButton/IconButton.js index d2d608d06efdbe..1c014c35945feb 100644 --- a/packages/mui-material/src/IconButton/IconButton.js +++ b/packages/mui-material/src/IconButton/IconButton.js @@ -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'; diff --git a/packages/mui-material/src/IconButton/IconButton.test.js b/packages/mui-material/src/IconButton/IconButton.test.js index 7c744f92a59c47..f282aed1da1b08 100644 --- a/packages/mui-material/src/IconButton/IconButton.test.js +++ b/packages/mui-material/src/IconButton/IconButton.test.js @@ -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'; diff --git a/packages/mui-material/src/ImageList/ImageList.js b/packages/mui-material/src/ImageList/ImageList.js index fe42660b09f95e..fa2149a5cfee1c 100644 --- a/packages/mui-material/src/ImageList/ImageList.js +++ b/packages/mui-material/src/ImageList/ImageList.js @@ -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'; diff --git a/packages/mui-material/src/ImageListItem/ImageListItem.js b/packages/mui-material/src/ImageListItem/ImageListItem.js index 3b6345586d0a83..c310bdc2e0bbc3 100644 --- a/packages/mui-material/src/ImageListItem/ImageListItem.js +++ b/packages/mui-material/src/ImageListItem/ImageListItem.js @@ -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'; diff --git a/packages/mui-material/src/Input/Input.js b/packages/mui-material/src/Input/Input.js index a2f00732098cfb..91ea256b826b50 100644 --- a/packages/mui-material/src/Input/Input.js +++ b/packages/mui-material/src/Input/Input.js @@ -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'; diff --git a/packages/mui-material/src/InputBase/InputBase.js b/packages/mui-material/src/InputBase/InputBase.js index c2228911f0cf7a..bd54296e2b7148 100644 --- a/packages/mui-material/src/InputBase/InputBase.js +++ b/packages/mui-material/src/InputBase/InputBase.js @@ -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, diff --git a/packages/mui-material/src/Link/Link.js b/packages/mui-material/src/Link/Link.js index b82aa6d5450efb..8aac3115bfad1b 100644 --- a/packages/mui-material/src/Link/Link.js +++ b/packages/mui-material/src/Link/Link.js @@ -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'; diff --git a/packages/mui-material/src/ListItem/ListItem.js b/packages/mui-material/src/ListItem/ListItem.js index 8b00bb27e7f3ed..0be2204721fd98 100644 --- a/packages/mui-material/src/ListItem/ListItem.js +++ b/packages/mui-material/src/ListItem/ListItem.js @@ -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'; diff --git a/packages/mui-material/src/Menu/Menu.js b/packages/mui-material/src/Menu/Menu.js index 0643211bd3b3cb..aa4d34bfb105e1 100644 --- a/packages/mui-material/src/Menu/Menu.js +++ b/packages/mui-material/src/Menu/Menu.js @@ -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'; diff --git a/packages/mui-material/src/MobileStepper/MobileStepper.js b/packages/mui-material/src/MobileStepper/MobileStepper.js index a676fd4670f09d..1ad8b5f4d44b7f 100644 --- a/packages/mui-material/src/MobileStepper/MobileStepper.js +++ b/packages/mui-material/src/MobileStepper/MobileStepper.js @@ -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'; diff --git a/packages/mui-material/src/Modal/Modal.js b/packages/mui-material/src/Modal/Modal.js index eb7e2ee8c80d17..5a80d9532991aa 100644 --- a/packages/mui-material/src/Modal/Modal.js +++ b/packages/mui-material/src/Modal/Modal.js @@ -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'; diff --git a/packages/mui-material/src/NativeSelect/NativeSelectInput.js b/packages/mui-material/src/NativeSelect/NativeSelectInput.js index d0c88089f1ff3e..5f5bb723ec5476 100644 --- a/packages/mui-material/src/NativeSelect/NativeSelectInput.js +++ b/packages/mui-material/src/NativeSelect/NativeSelectInput.js @@ -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'; diff --git a/packages/mui-material/src/OutlinedInput/OutlinedInput.js b/packages/mui-material/src/OutlinedInput/OutlinedInput.js index 4a73e2720cb809..6f98b28ff0b4e1 100644 --- a/packages/mui-material/src/OutlinedInput/OutlinedInput.js +++ b/packages/mui-material/src/OutlinedInput/OutlinedInput.js @@ -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'; diff --git a/packages/mui-material/src/Pagination/Pagination.js b/packages/mui-material/src/Pagination/Pagination.js index 03bfa1cf2ec6e1..4a178f3e70d20d 100644 --- a/packages/mui-material/src/Pagination/Pagination.js +++ b/packages/mui-material/src/Pagination/Pagination.js @@ -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'; diff --git a/packages/mui-material/src/Paper/Paper.js b/packages/mui-material/src/Paper/Paper.js index 867bcad6cf0b00..6262e4af5573f6 100644 --- a/packages/mui-material/src/Paper/Paper.js +++ b/packages/mui-material/src/Paper/Paper.js @@ -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'; diff --git a/packages/mui-material/src/Popover/Popover.js b/packages/mui-material/src/Popover/Popover.js index 5059c4f7fbc229..3e3c9926f1fbfe 100644 --- a/packages/mui-material/src/Popover/Popover.js +++ b/packages/mui-material/src/Popover/Popover.js @@ -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'; diff --git a/packages/mui-material/src/Popper/Popper.tsx b/packages/mui-material/src/Popper/Popper.tsx index 6d9cabfd721a25..68fbde65f46372 100644 --- a/packages/mui-material/src/Popper/Popper.tsx +++ b/packages/mui-material/src/Popper/Popper.tsx @@ -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'; diff --git a/packages/mui-material/src/Radio/Radio.js b/packages/mui-material/src/Radio/Radio.js index cc55b42392b224..ae98b2812abbe5 100644 --- a/packages/mui-material/src/Radio/Radio.js +++ b/packages/mui-material/src/Radio/Radio.js @@ -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'; diff --git a/packages/mui-material/src/Rating/Rating.js b/packages/mui-material/src/Rating/Rating.js index dd171574b0322f..0c884a744dd477 100644 --- a/packages/mui-material/src/Rating/Rating.js +++ b/packages/mui-material/src/Rating/Rating.js @@ -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 { diff --git a/packages/mui-material/src/Select/Select.js b/packages/mui-material/src/Select/Select.js index 97fcc1c6817d9c..59f84fb5cddcd2 100644 --- a/packages/mui-material/src/Select/Select.js +++ b/packages/mui-material/src/Select/Select.js @@ -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'; diff --git a/packages/mui-material/src/Select/SelectInput.js b/packages/mui-material/src/Select/SelectInput.js index 6a361ae35e5a1a..2e946a1e31f43b 100644 --- a/packages/mui-material/src/Select/SelectInput.js +++ b/packages/mui-material/src/Select/SelectInput.js @@ -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'; diff --git a/packages/mui-material/src/Slide/Slide.js b/packages/mui-material/src/Slide/Slide.js index 0f9f7ee7a4b19b..3c3e945e3bcbbf 100644 --- a/packages/mui-material/src/Slide/Slide.js +++ b/packages/mui-material/src/Slide/Slide.js @@ -2,7 +2,9 @@ import * as React from 'react'; import PropTypes from 'prop-types'; import { Transition } from 'react-transition-group'; -import { elementAcceptingRef, HTMLElementType, chainPropTypes } from '@mui/utils'; +import elementAcceptingRef from '@mui/utils/elementAcceptingRef'; +import HTMLElementType from '@mui/utils/HTMLElementType'; +import chainPropTypes from '@mui/utils/chainPropTypes'; import debounce from '../utils/debounce'; import useForkRef from '../utils/useForkRef'; import useTheme from '../styles/useTheme'; diff --git a/packages/mui-material/src/Slider/Slider.js b/packages/mui-material/src/Slider/Slider.js index 704f90a398acb5..a65eaee4f22e80 100644 --- a/packages/mui-material/src/Slider/Slider.js +++ b/packages/mui-material/src/Slider/Slider.js @@ -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 { isHostComponent, useSlotProps, diff --git a/packages/mui-material/src/Step/Step.js b/packages/mui-material/src/Step/Step.js index 67ff8ccd40fcb8..d08daf07c1e747 100644 --- a/packages/mui-material/src/Step/Step.js +++ b/packages/mui-material/src/Step/Step.js @@ -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 StepperContext from '../Stepper/StepperContext'; import StepContext from './StepContext'; diff --git a/packages/mui-material/src/Stepper/Stepper.js b/packages/mui-material/src/Stepper/Stepper.js index 6fbfe92df6ffdd..760c29b6152340 100644 --- a/packages/mui-material/src/Stepper/Stepper.js +++ b/packages/mui-material/src/Stepper/Stepper.js @@ -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 useThemeProps from '../styles/useThemeProps'; import styled from '../styles/styled'; diff --git a/packages/mui-material/src/SwipeableDrawer/SwipeableDrawer.js b/packages/mui-material/src/SwipeableDrawer/SwipeableDrawer.js index 524d5afba37809..e842ea20a1e142 100644 --- a/packages/mui-material/src/SwipeableDrawer/SwipeableDrawer.js +++ b/packages/mui-material/src/SwipeableDrawer/SwipeableDrawer.js @@ -2,7 +2,7 @@ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import PropTypes from 'prop-types'; -import { elementTypeAcceptingRef } from '@mui/utils'; +import elementTypeAcceptingRef from '@mui/utils/elementTypeAcceptingRef'; import { useThemeProps } from '@mui/system'; import { NoSsr } from '@mui/base'; import Drawer, { getAnchor, isHorizontal } from '../Drawer/Drawer'; diff --git a/packages/mui-material/src/Switch/Switch.js b/packages/mui-material/src/Switch/Switch.js index cb3ab5edb0c47b..bb4a7cefef5838 100644 --- a/packages/mui-material/src/Switch/Switch.js +++ b/packages/mui-material/src/Switch/Switch.js @@ -3,7 +3,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, darken, lighten } from '@mui/system'; import capitalize from '../utils/capitalize'; diff --git a/packages/mui-material/src/TablePagination/TablePagination.js b/packages/mui-material/src/TablePagination/TablePagination.js index 338844d072d02d..db4d895016ef04 100644 --- a/packages/mui-material/src/TablePagination/TablePagination.js +++ b/packages/mui-material/src/TablePagination/TablePagination.js @@ -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, isHostComponent } from '@mui/base'; import styled from '../styles/styled'; import useThemeProps from '../styles/useThemeProps'; diff --git a/packages/mui-material/src/Tabs/Tabs.js b/packages/mui-material/src/Tabs/Tabs.js index 09b955cb310e03..598b98d9f6d105 100644 --- a/packages/mui-material/src/Tabs/Tabs.js +++ b/packages/mui-material/src/Tabs/Tabs.js @@ -3,7 +3,7 @@ import * as React from 'react'; import { isFragment } from 'react-is'; 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, useSlotProps } from '@mui/base'; import styled from '../styles/styled'; import useThemeProps from '../styles/useThemeProps'; diff --git a/packages/mui-material/src/TextField/TextField.js b/packages/mui-material/src/TextField/TextField.js index 4378cdd02b89c2..058d6e93566789 100644 --- a/packages/mui-material/src/TextField/TextField.js +++ b/packages/mui-material/src/TextField/TextField.js @@ -3,7 +3,8 @@ import * as React from 'react'; import PropTypes from 'prop-types'; import clsx from 'clsx'; 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 styled from '../styles/styled'; import useThemeProps from '../styles/useThemeProps'; import Input from '../Input'; diff --git a/packages/mui-material/src/Tooltip/Tooltip.js b/packages/mui-material/src/Tooltip/Tooltip.js index 7890a09ae44051..af2d152cdd7458 100644 --- a/packages/mui-material/src/Tooltip/Tooltip.js +++ b/packages/mui-material/src/Tooltip/Tooltip.js @@ -2,7 +2,7 @@ import * as React from 'react'; import PropTypes from 'prop-types'; import clsx from 'clsx'; -import { elementAcceptingRef } from '@mui/utils'; +import elementAcceptingRef from '@mui/utils/elementAcceptingRef'; import { unstable_composeClasses as composeClasses, appendOwnerState } from '@mui/base'; import { alpha } from '@mui/system'; import styled from '../styles/styled'; diff --git a/packages/mui-material/src/Zoom/Zoom.js b/packages/mui-material/src/Zoom/Zoom.js index b2bc920fce5d07..66ac83d6de974b 100644 --- a/packages/mui-material/src/Zoom/Zoom.js +++ b/packages/mui-material/src/Zoom/Zoom.js @@ -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'; diff --git a/packages/mui-material/src/className/index.ts b/packages/mui-material/src/className/index.ts index 30ab5fea27cdef..0d146a018bc76f 100644 --- a/packages/mui-material/src/className/index.ts +++ b/packages/mui-material/src/className/index.ts @@ -1,2 +1 @@ -// eslint-disable-next-line import/prefer-default-export -export { unstable_ClassNameGenerator } from '@mui/utils'; +export { default as unstable_ClassNameGenerator } from '@mui/utils/ClassNameGenerator'; diff --git a/packages/mui-material/src/generateUtilityClass/index.ts b/packages/mui-material/src/generateUtilityClass/index.ts index 19bb1127412e87..3540b46162c563 100644 --- a/packages/mui-material/src/generateUtilityClass/index.ts +++ b/packages/mui-material/src/generateUtilityClass/index.ts @@ -1,2 +1,2 @@ -export { unstable_generateUtilityClass as default } from '@mui/utils'; -export type { GlobalStateSlot } from '@mui/utils'; +export { default } from '@mui/utils/generateUtilityClass'; +export type { GlobalStateSlot } from '@mui/utils/generateUtilityClass'; diff --git a/packages/mui-material/src/generateUtilityClasses/index.ts b/packages/mui-material/src/generateUtilityClasses/index.ts index cc94914f4095da..88e9f3eae60463 100644 --- a/packages/mui-material/src/generateUtilityClasses/index.ts +++ b/packages/mui-material/src/generateUtilityClasses/index.ts @@ -1 +1 @@ -export { unstable_generateUtilityClasses as default } from '@mui/utils'; +export { default } from '@mui/utils/generateUtilityClasses'; diff --git a/packages/mui-material/src/internal/SwitchBase.js b/packages/mui-material/src/internal/SwitchBase.js index ecc2d7735edb23..c57c3b6c8b2dd2 100644 --- a/packages/mui-material/src/internal/SwitchBase.js +++ b/packages/mui-material/src/internal/SwitchBase.js @@ -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 styled, { rootShouldForwardProp } from '../styles/styled'; diff --git a/packages/mui-material/src/styles/createMuiStrictModeTheme.js b/packages/mui-material/src/styles/createMuiStrictModeTheme.js index 73a29c693390ab..6974e0013b72f9 100644 --- a/packages/mui-material/src/styles/createMuiStrictModeTheme.js +++ b/packages/mui-material/src/styles/createMuiStrictModeTheme.js @@ -1,4 +1,4 @@ -import { deepmerge } from '@mui/utils'; +import deepmerge from '@mui/utils/deepmerge'; import createTheme from './createTheme'; export default function createMuiStrictModeTheme(options, ...args) { diff --git a/packages/mui-material/src/styles/createPalette.js b/packages/mui-material/src/styles/createPalette.js index cd984c8e30f39e..006126f3ff5e43 100644 --- a/packages/mui-material/src/styles/createPalette.js +++ b/packages/mui-material/src/styles/createPalette.js @@ -1,4 +1,4 @@ -import { deepmerge } from '@mui/utils'; +import deepmerge from '@mui/utils/deepmerge'; import MuiError from '@mui-internal/babel-macros/MuiError.macro'; import { darken, getContrastRatio, lighten } from '@mui/system'; import common from '../colors/common'; diff --git a/packages/mui-material/src/styles/createTheme.js b/packages/mui-material/src/styles/createTheme.js index 39cba1f2731a1f..6c57e225467e9d 100644 --- a/packages/mui-material/src/styles/createTheme.js +++ b/packages/mui-material/src/styles/createTheme.js @@ -1,4 +1,4 @@ -import { deepmerge } from '@mui/utils'; +import deepmerge from '@mui/utils/deepmerge'; import { createTheme as systemCreateTheme, unstable_defaultSxConfig as defaultSxConfig, diff --git a/packages/mui-material/src/styles/createTypography.js b/packages/mui-material/src/styles/createTypography.js index 8d2c6ed73e8c46..277808d2a7ec0c 100644 --- a/packages/mui-material/src/styles/createTypography.js +++ b/packages/mui-material/src/styles/createTypography.js @@ -1,4 +1,4 @@ -import { deepmerge } from '@mui/utils'; +import deepmerge from '@mui/utils/deepmerge'; function round(value) { return Math.round(value * 1e5) / 1e5; diff --git a/packages/mui-material/src/styles/experimental_extendTheme.js b/packages/mui-material/src/styles/experimental_extendTheme.js index 6d4c61b5a45b9c..f445ba382fffc2 100644 --- a/packages/mui-material/src/styles/experimental_extendTheme.js +++ b/packages/mui-material/src/styles/experimental_extendTheme.js @@ -1,4 +1,4 @@ -import { deepmerge } from '@mui/utils'; +import deepmerge from '@mui/utils/deepmerge'; import { private_safeColorChannel as safeColorChannel, private_safeAlpha as safeAlpha, diff --git a/packages/mui-material/src/usePagination/usePagination.js b/packages/mui-material/src/usePagination/usePagination.js index 42eefce2c24998..6125f1b03e3805 100644 --- a/packages/mui-material/src/usePagination/usePagination.js +++ b/packages/mui-material/src/usePagination/usePagination.js @@ -1,5 +1,5 @@ 'use client'; -import { unstable_useControlled as useControlled } from '@mui/utils'; +import useControlled from '@mui/utils/useControlled'; export default function usePagination(props = {}) { // keep default values in sync with @default tags in Pagination.propTypes diff --git a/packages/mui-material/src/utils/capitalize.d.ts b/packages/mui-material/src/utils/capitalize.d.ts index 4f0850098ea2dc..01718f07f09ff2 100644 --- a/packages/mui-material/src/utils/capitalize.d.ts +++ b/packages/mui-material/src/utils/capitalize.d.ts @@ -1,3 +1,3 @@ -import { unstable_capitalize as capitalize } from '@mui/utils'; +import capitalize from '@mui/utils/capitalize'; export default capitalize; diff --git a/packages/mui-material/src/utils/capitalize.js b/packages/mui-material/src/utils/capitalize.js index 4f0850098ea2dc..01718f07f09ff2 100644 --- a/packages/mui-material/src/utils/capitalize.js +++ b/packages/mui-material/src/utils/capitalize.js @@ -1,3 +1,3 @@ -import { unstable_capitalize as capitalize } from '@mui/utils'; +import capitalize from '@mui/utils/capitalize'; export default capitalize; diff --git a/packages/mui-material/src/utils/createChainedFunction.d.ts b/packages/mui-material/src/utils/createChainedFunction.d.ts index a84cf559319c84..59818e8c187bc1 100644 --- a/packages/mui-material/src/utils/createChainedFunction.d.ts +++ b/packages/mui-material/src/utils/createChainedFunction.d.ts @@ -1,3 +1,3 @@ -import { unstable_createChainedFunction as createChainedFunction } from '@mui/utils'; +import createChainedFunction from '@mui/utils/createChainedFunction'; export default createChainedFunction; diff --git a/packages/mui-material/src/utils/createChainedFunction.js b/packages/mui-material/src/utils/createChainedFunction.js index a84cf559319c84..59818e8c187bc1 100644 --- a/packages/mui-material/src/utils/createChainedFunction.js +++ b/packages/mui-material/src/utils/createChainedFunction.js @@ -1,3 +1,3 @@ -import { unstable_createChainedFunction as createChainedFunction } from '@mui/utils'; +import createChainedFunction from '@mui/utils/createChainedFunction'; export default createChainedFunction; diff --git a/packages/mui-material/src/utils/debounce.d.ts b/packages/mui-material/src/utils/debounce.d.ts index fe7cea1db2834a..5d8a1c9fdc408b 100644 --- a/packages/mui-material/src/utils/debounce.d.ts +++ b/packages/mui-material/src/utils/debounce.d.ts @@ -1,3 +1,3 @@ -import { unstable_debounce as debounce } from '@mui/utils'; +import debounce from '@mui/utils/debounce'; export default debounce; diff --git a/packages/mui-material/src/utils/debounce.js b/packages/mui-material/src/utils/debounce.js index fe7cea1db2834a..5d8a1c9fdc408b 100644 --- a/packages/mui-material/src/utils/debounce.js +++ b/packages/mui-material/src/utils/debounce.js @@ -1,3 +1,3 @@ -import { unstable_debounce as debounce } from '@mui/utils'; +import debounce from '@mui/utils/debounce'; export default debounce; diff --git a/packages/mui-material/src/utils/deprecatedPropType.d.ts b/packages/mui-material/src/utils/deprecatedPropType.d.ts index fbb605c0bbac97..67e8da82050a76 100644 --- a/packages/mui-material/src/utils/deprecatedPropType.d.ts +++ b/packages/mui-material/src/utils/deprecatedPropType.d.ts @@ -1,3 +1,3 @@ -import { unstable_deprecatedPropType as deprecatedPropType } from '@mui/utils'; +import deprecatedPropType from '@mui/utils/deprecatedPropType'; export default deprecatedPropType; diff --git a/packages/mui-material/src/utils/deprecatedPropType.js b/packages/mui-material/src/utils/deprecatedPropType.js index fbb605c0bbac97..67e8da82050a76 100644 --- a/packages/mui-material/src/utils/deprecatedPropType.js +++ b/packages/mui-material/src/utils/deprecatedPropType.js @@ -1,3 +1,3 @@ -import { unstable_deprecatedPropType as deprecatedPropType } from '@mui/utils'; +import deprecatedPropType from '@mui/utils/deprecatedPropType'; export default deprecatedPropType; diff --git a/packages/mui-material/src/utils/getScrollbarSize.ts b/packages/mui-material/src/utils/getScrollbarSize.ts index e3dcf3ea57a1e0..62dd95cc8f1e33 100644 --- a/packages/mui-material/src/utils/getScrollbarSize.ts +++ b/packages/mui-material/src/utils/getScrollbarSize.ts @@ -1,3 +1,3 @@ -import { unstable_getScrollbarSize as getScrollbarSize } from '@mui/utils'; +import getScrollbarSize from '@mui/utils/getScrollbarSize'; export default getScrollbarSize; diff --git a/packages/mui-material/src/utils/isMuiElement.d.ts b/packages/mui-material/src/utils/isMuiElement.d.ts index c3784104b24753..f886833aff8c85 100644 --- a/packages/mui-material/src/utils/isMuiElement.d.ts +++ b/packages/mui-material/src/utils/isMuiElement.d.ts @@ -1,3 +1,3 @@ -import { unstable_isMuiElement as isMuiElement } from '@mui/utils'; +import isMuiElement from '@mui/utils/isMuiElement'; export default isMuiElement; diff --git a/packages/mui-material/src/utils/isMuiElement.js b/packages/mui-material/src/utils/isMuiElement.js index c3784104b24753..f886833aff8c85 100644 --- a/packages/mui-material/src/utils/isMuiElement.js +++ b/packages/mui-material/src/utils/isMuiElement.js @@ -1,3 +1,3 @@ -import { unstable_isMuiElement as isMuiElement } from '@mui/utils'; +import isMuiElement from '@mui/utils/isMuiElement'; export default isMuiElement; diff --git a/packages/mui-material/src/utils/ownerDocument.ts b/packages/mui-material/src/utils/ownerDocument.ts index fd042ac6edcd51..155fa3528eda81 100644 --- a/packages/mui-material/src/utils/ownerDocument.ts +++ b/packages/mui-material/src/utils/ownerDocument.ts @@ -1,3 +1,3 @@ -import { unstable_ownerDocument as ownerDocument } from '@mui/utils'; +import ownerDocument from '@mui/utils/ownerDocument'; export default ownerDocument; diff --git a/packages/mui-material/src/utils/ownerWindow.ts b/packages/mui-material/src/utils/ownerWindow.ts index 47a847d5feba9a..9af3de65cb6989 100644 --- a/packages/mui-material/src/utils/ownerWindow.ts +++ b/packages/mui-material/src/utils/ownerWindow.ts @@ -1,3 +1,3 @@ -import { unstable_ownerWindow as ownerWindow } from '@mui/utils'; +import ownerWindow from '@mui/utils/ownerWindow'; export default ownerWindow; diff --git a/packages/mui-material/src/utils/requirePropFactory.d.ts b/packages/mui-material/src/utils/requirePropFactory.d.ts index eb2c8e65787d91..1074ad5c85a976 100644 --- a/packages/mui-material/src/utils/requirePropFactory.d.ts +++ b/packages/mui-material/src/utils/requirePropFactory.d.ts @@ -1,3 +1,3 @@ -import { unstable_requirePropFactory as requirePropFactory } from '@mui/utils'; +import requirePropFactory from '@mui/utils/requirePropFactory'; export default requirePropFactory; diff --git a/packages/mui-material/src/utils/requirePropFactory.js b/packages/mui-material/src/utils/requirePropFactory.js index eb2c8e65787d91..1074ad5c85a976 100644 --- a/packages/mui-material/src/utils/requirePropFactory.js +++ b/packages/mui-material/src/utils/requirePropFactory.js @@ -1,3 +1,3 @@ -import { unstable_requirePropFactory as requirePropFactory } from '@mui/utils'; +import requirePropFactory from '@mui/utils/requirePropFactory'; export default requirePropFactory; diff --git a/packages/mui-material/src/utils/scrollLeft.js b/packages/mui-material/src/utils/scrollLeft.js index deb38e11766c69..debf6dee8f7c26 100644 --- a/packages/mui-material/src/utils/scrollLeft.js +++ b/packages/mui-material/src/utils/scrollLeft.js @@ -1,4 +1,2 @@ -export { - unstable_detectScrollType as detectScrollType, - unstable_getNormalizedScrollLeft as getNormalizedScrollLeft, -} from '@mui/utils'; +export { detectScrollType } from '@mui/utils/scrollLeft'; +export { getNormalizedScrollLeft } from '@mui/utils/scrollLeft'; diff --git a/packages/mui-material/src/utils/setRef.ts b/packages/mui-material/src/utils/setRef.ts index c1d1eddf231690..6cee7e00bffe43 100644 --- a/packages/mui-material/src/utils/setRef.ts +++ b/packages/mui-material/src/utils/setRef.ts @@ -1,3 +1,3 @@ -import { unstable_setRef as setRef } from '@mui/utils'; +import setRef from '@mui/utils/setRef'; export default setRef; diff --git a/packages/mui-material/src/utils/unsupportedProp.d.ts b/packages/mui-material/src/utils/unsupportedProp.d.ts index a7ac2dbd955df4..80104143560b59 100644 --- a/packages/mui-material/src/utils/unsupportedProp.d.ts +++ b/packages/mui-material/src/utils/unsupportedProp.d.ts @@ -1,3 +1,3 @@ -import { unstable_unsupportedProp as unsupportedProp } from '@mui/utils'; +import unsupportedProp from '@mui/utils/unsupportedProp'; export default unsupportedProp; diff --git a/packages/mui-material/src/utils/unsupportedProp.js b/packages/mui-material/src/utils/unsupportedProp.js index a7ac2dbd955df4..80104143560b59 100644 --- a/packages/mui-material/src/utils/unsupportedProp.js +++ b/packages/mui-material/src/utils/unsupportedProp.js @@ -1,3 +1,3 @@ -import { unstable_unsupportedProp as unsupportedProp } from '@mui/utils'; +import unsupportedProp from '@mui/utils/unsupportedProp'; export default unsupportedProp; diff --git a/packages/mui-material/src/utils/useControlled.d.ts b/packages/mui-material/src/utils/useControlled.d.ts index 1e05d42f2be58f..ae268b214180de 100644 --- a/packages/mui-material/src/utils/useControlled.d.ts +++ b/packages/mui-material/src/utils/useControlled.d.ts @@ -1,3 +1,3 @@ -import { unstable_useControlled as useControlled } from '@mui/utils'; +import useControlled from '@mui/utils/useControlled'; export default useControlled; diff --git a/packages/mui-material/src/utils/useControlled.js b/packages/mui-material/src/utils/useControlled.js index 098ebf75c4e83d..33aefe699f5974 100644 --- a/packages/mui-material/src/utils/useControlled.js +++ b/packages/mui-material/src/utils/useControlled.js @@ -1,4 +1,4 @@ 'use client'; -import { unstable_useControlled as useControlled } from '@mui/utils'; +import useControlled from '@mui/utils/useControlled'; export default useControlled; diff --git a/packages/mui-material/src/utils/useEnhancedEffect.d.ts b/packages/mui-material/src/utils/useEnhancedEffect.d.ts index 2ec3b89a86d8ba..52622565d8fa3e 100644 --- a/packages/mui-material/src/utils/useEnhancedEffect.d.ts +++ b/packages/mui-material/src/utils/useEnhancedEffect.d.ts @@ -1,3 +1,3 @@ -import { unstable_useEnhancedEffect as useEnhancedEffect } from '@mui/utils'; +import useEnhancedEffect from '@mui/utils/useEnhancedEffect'; export default useEnhancedEffect; diff --git a/packages/mui-material/src/utils/useEnhancedEffect.js b/packages/mui-material/src/utils/useEnhancedEffect.js index 2695c89b614494..d4e273740fb956 100644 --- a/packages/mui-material/src/utils/useEnhancedEffect.js +++ b/packages/mui-material/src/utils/useEnhancedEffect.js @@ -1,4 +1,4 @@ 'use client'; -import { unstable_useEnhancedEffect as useEnhancedEffect } from '@mui/utils'; +import useEnhancedEffect from '@mui/utils/useEnhancedEffect'; export default useEnhancedEffect; diff --git a/packages/mui-material/src/utils/useEventCallback.d.ts b/packages/mui-material/src/utils/useEventCallback.d.ts index ff3ee70183388b..69ed51700c8348 100644 --- a/packages/mui-material/src/utils/useEventCallback.d.ts +++ b/packages/mui-material/src/utils/useEventCallback.d.ts @@ -1,3 +1,3 @@ -import { unstable_useEventCallback as useEventCallback } from '@mui/utils'; +import useEventCallback from '@mui/utils/useEventCallback'; export default useEventCallback; diff --git a/packages/mui-material/src/utils/useEventCallback.js b/packages/mui-material/src/utils/useEventCallback.js index 03b624ad3749d2..4ebbd890c36689 100644 --- a/packages/mui-material/src/utils/useEventCallback.js +++ b/packages/mui-material/src/utils/useEventCallback.js @@ -1,4 +1,4 @@ 'use client'; -import { unstable_useEventCallback as useEventCallback } from '@mui/utils'; +import useEventCallback from '@mui/utils/useEventCallback'; export default useEventCallback; diff --git a/packages/mui-material/src/utils/useForkRef.d.ts b/packages/mui-material/src/utils/useForkRef.d.ts index b80dfcccfaacfb..5c0ce6f3608d8a 100644 --- a/packages/mui-material/src/utils/useForkRef.d.ts +++ b/packages/mui-material/src/utils/useForkRef.d.ts @@ -1,3 +1,3 @@ -import { unstable_useForkRef as useForkRef } from '@mui/utils'; +import useForkRef from '@mui/utils/useForkRef'; export default useForkRef; diff --git a/packages/mui-material/src/utils/useForkRef.js b/packages/mui-material/src/utils/useForkRef.js index 38b967df8e7a75..bdcb95552910c4 100644 --- a/packages/mui-material/src/utils/useForkRef.js +++ b/packages/mui-material/src/utils/useForkRef.js @@ -1,4 +1,4 @@ 'use client'; -import { unstable_useForkRef as useForkRef } from '@mui/utils'; +import useForkRef from '@mui/utils/useForkRef'; export default useForkRef; diff --git a/packages/mui-material/src/utils/useId.d.ts b/packages/mui-material/src/utils/useId.d.ts index 51a0cf8c6d03f9..8f3624cea3c0c7 100644 --- a/packages/mui-material/src/utils/useId.d.ts +++ b/packages/mui-material/src/utils/useId.d.ts @@ -1,3 +1,3 @@ -import { unstable_useId as useId } from '@mui/utils'; +import useId from '@mui/utils/useId'; export default useId; diff --git a/packages/mui-material/src/utils/useId.js b/packages/mui-material/src/utils/useId.js index fbd108d5635dad..d99075f6377825 100644 --- a/packages/mui-material/src/utils/useId.js +++ b/packages/mui-material/src/utils/useId.js @@ -1,4 +1,4 @@ 'use client'; -import { unstable_useId as useId } from '@mui/utils'; +import useId from '@mui/utils/useId'; export default useId; diff --git a/packages/mui-material/src/utils/useIsFocusVisible.d.ts b/packages/mui-material/src/utils/useIsFocusVisible.d.ts index e640db0f81d031..b1d9d514e158b6 100644 --- a/packages/mui-material/src/utils/useIsFocusVisible.d.ts +++ b/packages/mui-material/src/utils/useIsFocusVisible.d.ts @@ -1,3 +1,3 @@ -import { unstable_useIsFocusVisible as useIsFocusVisible } from '@mui/utils'; +import useIsFocusVisible from '@mui/utils/useIsFocusVisible'; export default useIsFocusVisible; diff --git a/packages/mui-material/src/utils/useIsFocusVisible.js b/packages/mui-material/src/utils/useIsFocusVisible.js index 14e2ca9248573d..9cfe9a7a1cb64c 100644 --- a/packages/mui-material/src/utils/useIsFocusVisible.js +++ b/packages/mui-material/src/utils/useIsFocusVisible.js @@ -1,4 +1,4 @@ 'use client'; -import { unstable_useIsFocusVisible as useIsFocusVisible } from '@mui/utils'; +import useIsFocusVisible from '@mui/utils/useIsFocusVisible'; export default useIsFocusVisible;