-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
node scripts/migrateComponentClasses.mjs --grep "Autocomplete"
- Loading branch information
Showing
4 changed files
with
90 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 0 additions & 7 deletions
7
packages/material-ui/src/Autocomplete/autocompleteClasses.d.ts
This file was deleted.
Oops, something went wrong.
35 changes: 0 additions & 35 deletions
35
packages/material-ui/src/Autocomplete/autocompleteClasses.js
This file was deleted.
Oops, something went wrong.
88 changes: 88 additions & 0 deletions
88
packages/material-ui/src/Autocomplete/autocompleteClasses.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
import { generateUtilityClass, generateUtilityClasses } from '@material-ui/unstyled'; | ||
|
||
export interface AutocompleteClasses { | ||
/** Styles applied to the root element. */ | ||
root: string; | ||
/** Styles applied to the root element if `fullWidth={true}`. */ | ||
fullWidth: string; | ||
/** Pseudo-class applied to the root element if focused. */ | ||
focused: string; | ||
/** Styles applied to the tag elements, e.g. the chips. */ | ||
tag: string; | ||
/** Styles applied to the tag elements, e.g. the chips if `size="small"`. */ | ||
tagSizeSmall: string; | ||
/** Styles applied to the tag elements, e.g. the chips if `size="medium"`. */ | ||
tagSizeMedium: string; | ||
/** Styles applied when the popup icon is rendered. */ | ||
hasPopupIcon: string; | ||
/** Styles applied when the clear icon is rendered. */ | ||
hasClearIcon: string; | ||
/** Styles applied to the Input element. */ | ||
inputRoot: string; | ||
/** Styles applied to the input element. */ | ||
input: string; | ||
/** Styles applied to the input element if tag focused. */ | ||
inputFocused: string; | ||
/** Styles applied to the endAdornment element. */ | ||
endAdornment: string; | ||
/** Styles applied to the clear indicator. */ | ||
clearIndicator: string; | ||
/** Styles applied to the popup indicator. */ | ||
popupIndicator: string; | ||
/** Styles applied to the popup indicator if the popup is open. */ | ||
popupIndicatorOpen: string; | ||
/** Styles applied to the popper element. */ | ||
popper: string; | ||
/** Styles applied to the popper element if `disablePortal={true}`. */ | ||
popperDisablePortal: string; | ||
/** Styles applied to the Paper component. */ | ||
paper: string; | ||
/** Styles applied to the listbox component. */ | ||
listbox: string; | ||
/** Styles applied to the loading wrapper. */ | ||
loading: string; | ||
/** Styles applied to the no option wrapper. */ | ||
noOptions: string; | ||
/** Styles applied to the option elements. */ | ||
option: string; | ||
/** Styles applied to the group's label elements. */ | ||
groupLabel: string; | ||
/** Styles applied to the group's ul elements. */ | ||
groupUl: string; | ||
} | ||
|
||
export type AutocompleteClassKey = keyof AutocompleteClasses; | ||
|
||
export function getAutocompleteUtilityClass(slot: string): string { | ||
return generateUtilityClass('MuiAutocomplete', slot); | ||
} | ||
|
||
const autocompleteClasses: AutocompleteClasses = generateUtilityClasses('MuiAutocomplete', [ | ||
'root', | ||
'fullWidth', | ||
'focused', | ||
'focusVisible', | ||
'tag', | ||
'tagSizeSmall', | ||
'tagSizeMedium', | ||
'hasPopupIcon', | ||
'hasClearIcon', | ||
'inputRoot', | ||
'input', | ||
'inputFocused', | ||
'endAdornment', | ||
'clearIndicator', | ||
'popupIndicator', | ||
'popupIndicatorOpen', | ||
'popper', | ||
'popperDisablePortal', | ||
'paper', | ||
'listbox', | ||
'loading', | ||
'noOptions', | ||
'option', | ||
'groupLabel', | ||
'groupUl', | ||
]); | ||
|
||
export default autocompleteClasses; |