Skip to content

Commit

Permalink
remove more duplicated code
Browse files Browse the repository at this point in the history
  • Loading branch information
mnajdova committed Jul 15, 2024
1 parent 800aee0 commit d0a634f
Show file tree
Hide file tree
Showing 9 changed files with 7 additions and 17 deletions.
2 changes: 1 addition & 1 deletion packages/mui-material/src/InputBase/InputBase.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import elementTypeAcceptingRef from '@mui/utils/elementTypeAcceptingRef';
import refType from '@mui/utils/refType';
import MuiError from '@mui/internal-babel-macros/MuiError.macro';
import composeClasses from '@mui/utils/composeClasses';
import isHostComponent from '@mui/utils/isHostComponent';
import TextareaAutosize from '../TextareaAutosize';
import isHostComponent from '../utils/isHostComponent';
import formControlState from '../FormControl/formControlState';
import FormControlContext from '../FormControl/FormControlContext';
import useFormControl from '../FormControl/useFormControl';
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/ListItem/ListItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import composeClasses from '@mui/utils/composeClasses';
import elementTypeAcceptingRef from '@mui/utils/elementTypeAcceptingRef';
import chainPropTypes from '@mui/utils/chainPropTypes';
import { alpha } from '@mui/system/colorManipulator';
import isHostComponent from '../utils/isHostComponent';
import isHostComponent from '@mui/utils/isHostComponent';
import styled from '../styles/styled';
import { useDefaultProps } from '../DefaultPropsProvider';
import ButtonBase from '../ButtonBase';
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/Popover/Popover.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import elementTypeAcceptingRef from '@mui/utils/elementTypeAcceptingRef';
import integerPropType from '@mui/utils/integerPropType';
import chainPropTypes from '@mui/utils/chainPropTypes';
import useSlotProps from '@mui/utils/useSlotProps';
import isHostComponent from '../utils/isHostComponent';
import isHostComponent from '@mui/utils/isHostComponent';
import styled from '../styles/styled';
import { useDefaultProps } from '../DefaultPropsProvider';
import debounce from '../utils/debounce';
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/Slider/Slider.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import composeClasses from '@mui/utils/composeClasses';
import { alpha, lighten, darken } from '@mui/system/colorManipulator';
import { useRtl } from '@mui/system/RtlProvider';
import useSlotProps from '@mui/utils/useSlotProps';
import isHostComponent from '@mui/utils/isHostComponent';
import { useSlider, valueToPercent } from './useSlider';
import isHostComponent from '../utils/isHostComponent';
import { styled } from '../zero-styled';
import { useDefaultProps } from '../DefaultPropsProvider';
import slotShouldForwardProp from '../styles/slotShouldForwardProp';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import clsx from 'clsx';
import integerPropType from '@mui/utils/integerPropType';
import chainPropTypes from '@mui/utils/chainPropTypes';
import composeClasses from '@mui/utils/composeClasses';
import isHostComponent from '../utils/isHostComponent';
import isHostComponent from '@mui/utils/isHostComponent';
import styled from '../styles/styled';
import { useDefaultProps } from '../DefaultPropsProvider';
import InputBase from '../InputBase';
Expand Down
1 change: 1 addition & 0 deletions packages/mui-material/src/utils/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ export { default as unsupportedProp } from './unsupportedProp';
export { default as useControlled } from './useControlled';
export { default as useEventCallback } from './useEventCallback';
export { default as useForkRef } from './useForkRef';
export { default as useIsFocusVisible } from './useIsFocusVisible';
export * from './types';
10 changes: 0 additions & 10 deletions packages/mui-material/src/utils/isHostComponent.ts

This file was deleted.

1 change: 0 additions & 1 deletion packages/mui-material/src/utils/omitEventHandlers.ts

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import isHostComponent from './isHostComponent';
import isHostComponent from '@mui/utils/isHostComponent';

const shouldSpreadAdditionalProps = (Slot) => {
return !Slot || !isHostComponent(Slot);
Expand Down

0 comments on commit d0a634f

Please sign in to comment.