Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[core] Fix class name composition order #14775

Merged
merged 1 commit into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/x-data-grid/src/components/cell/GridCell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ const GridCell = React.forwardRef<HTMLDivElement, GridCellProps>(function GridCe
return (
<div
ref={handleRef}
className={clsx(className, classNames, classes.root)}
className={clsx(classes.root, classNames, className)}
role="gridcell"
data-field={field}
data-colindex={colIndex}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export const GridBaseColumnHeaders = React.forwardRef<HTMLDivElement, GridBaseCo
return (
<GridColumnHeadersRoot
ref={ref}
className={clsx(className, classes.root)}
className={clsx(classes.root, className)}
ownerState={rootProps}
{...other}
role="presentation"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ const GridRoot = React.forwardRef<HTMLDivElement, GridRootProps>(function GridRo
return (
<GridRootStyles
ref={handleRef}
className={clsx(className, classes.root)}
className={clsx(classes.root, className)}
ownerState={ownerState}
{...other}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const GridToolbarContainer = React.forwardRef<HTMLDivElement, GridToolbarContain
return (
<GridToolbarContainerRoot
ref={ref}
className={clsx(className, classes.root)}
className={clsx(classes.root, className)}
ownerState={rootProps}
{...other}
>
Expand Down
2 changes: 1 addition & 1 deletion packages/x-data-grid/src/components/menu/GridMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ function GridMenu(props: GridMenuProps) {
return (
<GridMenuRoot
as={rootProps.slots.basePopper}
className={clsx(className, classes.root)}
className={clsx(classes.root, className)}
ownerState={rootProps}
open={open}
anchorEl={target as any}
Expand Down
2 changes: 1 addition & 1 deletion packages/x-data-grid/src/components/panel/GridPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ const GridPanel = React.forwardRef<HTMLDivElement, GridPanelProps>((props, ref)
<GridPanelRoot
ref={ref}
placement="bottom-start"
className={clsx(className, classes.panel)}
className={clsx(classes.panel, className)}
ownerState={rootProps}
anchorEl={anchorEl}
modifiers={modifiers}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function GridPanelContent(props: React.HTMLAttributes<HTMLDivElement> & { sx?: S

return (
<GridPanelContentRoot
className={clsx(className, classes.root)}
className={clsx(classes.root, className)}
ownerState={rootProps}
{...other}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function GridPanelFooter(props: React.HTMLAttributes<HTMLDivElement> & { sx?: Sx

return (
<GridPanelFooterRoot
className={clsx(className, classes.root)}
className={clsx(classes.root, className)}
ownerState={rootProps}
{...other}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function GridPanelHeader(props: React.HTMLAttributes<HTMLDivElement> & { sx?: Sx

return (
<GridPanelHeaderRoot
className={clsx(className, classes.root)}
className={clsx(classes.root, className)}
ownerState={rootProps}
{...other}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const GridPanelWrapper = React.forwardRef<HTMLDivElement, GridPanelWrapperProps>
<GridPanelWrapperRoot
ref={ref}
tabIndex={-1}
className={clsx(className, classes.root)}
className={clsx(classes.root, className)}
ownerState={rootProps}
{...other}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ function GridToolbarQuickFilter(props: GridToolbarQuickFilterProps) {
variant="standard"
value={searchValue}
onChange={handleSearchValueChange}
className={clsx(className, classes.root)}
className={clsx(classes.root, className)}
placeholder={apiRef.current.getLocaleText('toolbarQuickFilterPlaceholder')}
aria-label={apiRef.current.getLocaleText('toolbarQuickFilterLabel')}
type="search"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ const DateRangeCalendar = React.forwardRef(function DateRangeCalendar<
return (
<DateRangeCalendarRoot
ref={ref}
className={clsx(className, classes.root)}
className={clsx(classes.root, className)}
ownerState={ownerState}
{...other}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ const DateRangePickerToolbar = React.forwardRef(function DateRangePickerToolbar<
{...other}
toolbarTitle={translations.dateRangePickerToolbarTitle}
isLandscape={false}
className={clsx(className, classes.root)}
className={clsx(classes.root, className)}
ownerState={ownerState}
ref={ref}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ const DateTimeRangePickerToolbar = React.forwardRef(function DateTimeRangePicker

return (
<DateTimeRangePickerToolbarRoot
className={clsx(className, classes.root)}
className={clsx(classes.root, className)}
ownerState={ownerState}
ref={ref}
sx={sx}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ const DateTimePickerTabs = function DateTimePickerTabs<TDate extends PickerValid
variant="fullWidth"
value={viewToTab(view)}
onChange={handleChange}
className={clsx(className, classes.root)}
className={clsx(classes.root, className)}
sx={sx}
>
<Tab
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const DesktopDateTimePickerLayout = React.forwardRef(function DesktopDateTimePic
return (
<PickersLayoutRoot
ref={ref}
className={clsx(className, pickersLayoutClasses.root, classes?.root)}
className={clsx(pickersLayoutClasses.root, classes?.root, className)}
sx={[
{
[`& .${pickersLayoutClasses.tabs}`]: { gridRow: 4, gridColumn: '1 / 4' },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ const PickersCalendarHeader = React.forwardRef(function PickersCalendarHeader<
<PickersCalendarHeaderRoot
{...other}
ownerState={ownerState}
className={clsx(className, classes.root)}
className={clsx(classes.root, className)}
ref={ref}
>
<PickersCalendarHeaderLabelContainer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ const PickersLayout = React.forwardRef(function PickersLayout<
<PickersLayoutRoot
ref={ref}
sx={sx}
className={clsx(className, classes.root)}
className={clsx(classes.root, className)}
ownerState={props}
>
{isLandscape ? shortcuts : toolbar}
Expand Down
2 changes: 1 addition & 1 deletion packages/x-date-pickers/src/TimeClock/Clock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ export function Clock<TDate extends PickerValidDate>(inProps: ClockProps<TDate>)
};

return (
<ClockRoot className={clsx(className, classes.root)}>
<ClockRoot className={clsx(classes.root, className)}>
<ClockClock className={classes.clock}>
<ClockSquareMask
data-mui-test="clock"
Expand Down
2 changes: 1 addition & 1 deletion packages/x-date-pickers/src/TimeClock/ClockNumber.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export function ClockNumber(inProps: ClockNumberProps) {

return (
<ClockNumberRoot
className={clsx(className, classes.root)}
className={clsx(classes.root, className)}
aria-disabled={disabled ? true : undefined}
aria-selected={selected ? true : undefined}
role="option"
Expand Down
2 changes: 1 addition & 1 deletion packages/x-date-pickers/src/TimeClock/ClockPointer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export function ClockPointer(inProps: ClockPointerProps) {
return (
<ClockPointerRoot
style={getAngleStyle()}
className={clsx(className, classes.root)}
className={clsx(classes.root, className)}
ownerState={ownerState}
{...other}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export const PickersToolbarButton = React.forwardRef(function PickersToolbarButt
data-mui-test="toolbar-button"
variant="text"
ref={ref}
className={clsx(className, classes.root)}
className={clsx(classes.root, className)}
{...(width ? { sx: { width } } : {})}
{...other}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export const PickersToolbarText = React.forwardRef<HTMLSpanElement, PickersToolb
return (
<PickersToolbarTextRoot
ref={ref}
className={clsx(className, classes.root)}
className={clsx(classes.root, className)}
component="span"
{...other}
>
Expand Down
20 changes: 12 additions & 8 deletions packages/x-tree-view/src/TreeItem/TreeItemContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,14 +147,18 @@ const TreeItemContent = React.forwardRef(function TreeItemContent(
/* eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions -- Key event is handled by the TreeView */
<div
{...other}
className={clsx(className, classes.root, {
[classes.expanded]: expanded,
[classes.selected]: selected,
[classes.focused]: focused,
[classes.disabled]: disabled,
[classes.editing]: editing,
[classes.editable]: editable,
})}
className={clsx(
classes.root,
{
[classes.expanded]: expanded,
[classes.selected]: selected,
[classes.focused]: focused,
[classes.disabled]: disabled,
[classes.editing]: editing,
[classes.editable]: editable,
},
className,
)}
onClick={handleClick}
onMouseDown={handleMouseDown}
ref={ref}
Expand Down
Loading