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 @@ -14,6 +14,7 @@
- **Breaking** Full-width _Navbar_ (`containerWidth={false}`) now uses a 12px side gutter instead of 24px (16px on small screens), so a default-size menu `IconButton` at its left edge lines up with _SidebarNav_'s item icons. Centred Navbars keep the 24px gutter.
- **Breaking** _User_ no longer renders a `flexGrow` spacer before itself, which added an extra gap next to sibling controls in a `Navbar` slot. If you placed `User` directly in a flex container and relied on it pushing itself to the right, add your own spacer.
- `DiamondDSIntegrations.mrtOptions({ onRowReorder })` adds row reordering: drag with a drop line between rows, plus Move up/down in the row menu.
- _LinearProgress_ and _CircularProgress_ now default to `color="info"`. Set `color="primary"` to keep the previous look.

### Fixed

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
19 changes: 19 additions & 0 deletions src/themes/DiamondDSTheme.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1264,6 +1264,25 @@ describe("DiamondDS component overrides", () => {
expectTokenFallback(circularStyles.color, "--ds-warning");
});

it("defaults progress indicators to the info colour", () => {
const linearBar =
DiamondDSTheme.components?.MuiLinearProgress?.styleOverrides?.bar;

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

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

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