Skip to content
Open
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
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

### Changed

- _LinearProgress_ and _CircularProgress_ now default to `color="info"`. Set `color="primary"` to keep the previous look.
- _Dialog_ now defaults to elevation 16 (`surface.strong`'s tone) instead of MUI's 24, and temporary _Drawer_ to elevation 4 instead of 16, so floating surfaces order Drawer < Menu < Dialog and dialog text keeps more contrast.
- **Breaking** _Dialog_'s deprecated `PaperProps` is now ignored. Move it to `slotProps.paper`, e.g. with `npx @mui/codemod@latest deprecations/dialog-props <path>`. If you use MRT, also check `muiEditRowDialogProps` and `muiCreateRowModalProps` by hand, as the codemod won't reach them.

Expand Down
2 changes: 1 addition & 1 deletion src/components/MUI/Feedback/CircularProgress.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const meta: Meta<typeof CircularProgress> = {
thickness: { control: { type: "number", min: 1, max: 10, step: 0.5 } },
},
args: {
color: "primary",
color: "info",
variant: "indeterminate",
value: 75,
size: 40,
Expand Down
2 changes: 1 addition & 1 deletion src/components/MUI/Feedback/LinearProgress.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const meta: Meta<typeof LinearProgress> = {
valueBuffer: { control: { type: "number", min: 0, max: 100, step: 1 } },
},
args: {
color: "primary",
color: "info",
variant: "indeterminate",
value: 40,
valueBuffer: 60,
Expand Down
13 changes: 13 additions & 0 deletions src/themes/DiamondDSTheme.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1255,7 +1255,20 @@ describe("DiamondDS component overrides", () => {
});

expectTokenFallback(linearStyles.backgroundColor, "--ds-success");
expect(
DiamondDSTheme.components?.MuiLinearProgress?.defaultProps?.color,
).toBe("info");
expectTokenFallback(
getStyleOverride(linearBar, {
ownerState: { color: "info" },
theme: DiamondDSTheme,
}).backgroundColor,
"--ds-info",
);
expectTokenFallback(circularStyles.color, "--ds-warning");
expect(
DiamondDSTheme.components?.MuiCircularProgress?.defaultProps?.color,
).toBe("info");
});

it("uses semantic loading surface roles for skeletons", () => {
Expand Down
6 changes: 6 additions & 0 deletions src/themes/DiamondDSTheme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1801,6 +1801,9 @@ const DiamondDSTheme = extendTheme({
* surface. This keeps them visually lighter than buttons or alerts.
*/
MuiLinearProgress: {
defaultProps: {
color: "info",
},
styleOverrides: {
root: {
height: 6,
Expand All @@ -1821,6 +1824,9 @@ const DiamondDSTheme = extendTheme({
},

MuiCircularProgress: {
defaultProps: {
color: "info",
},
styleOverrides: {
root: ({
ownerState,
Expand Down
Loading