Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/mui/material-ui into depr…
Browse files Browse the repository at this point in the history
…ecation/drawer
  • Loading branch information
siriwatknp committed Jan 15, 2025
2 parents 527908e + a6c44ba commit 39b0ef6
Show file tree
Hide file tree
Showing 159 changed files with 2,166 additions and 2,612 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@48ab28a6f5dbc2a99bf1e0131198dd8f1df78169 # v3.28.0
uses: github/codeql-action/init@b6a472f63d85b9c78a3ac5e89422239fc15e9b3c # v3.28.1
with:
languages: typescript
config-file: ./.github/codeql/codeql-config.yml
Expand All @@ -30,4 +30,4 @@ jobs:
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@48ab28a6f5dbc2a99bf1e0131198dd8f1df78169 # v3.28.0
uses: github/codeql-action/analyze@b6a472f63d85b9c78a3ac5e89422239fc15e9b3c # v3.28.1
2 changes: 1 addition & 1 deletion .github/workflows/maintenance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
steps:
- run: echo "${{ github.actor }}"
- name: check if prs are dirty
uses: eps1lon/actions-label-merge-conflict@1b1b1fcde06a9b3d089f3464c96417961dde1168 # v3.0.2
uses: eps1lon/actions-label-merge-conflict@1df065ebe6e3310545d4f4c4e862e43bdca146f0 # v3.0.3
with:
dirtyLabel: 'PR: out-of-date'
removeOnDirtyLabel: 'PR: ready to ship'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scorecards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ jobs:

# Upload the results to GitHub's code scanning dashboard.
- name: Upload to code-scanning
uses: github/codeql-action/upload-sarif@48ab28a6f5dbc2a99bf1e0131198dd8f1df78169 # v3.28.0
uses: github/codeql-action/upload-sarif@b6a472f63d85b9c78a3ac5e89422239fc15e9b3c # v3.28.1
with:
sarif_file: results.sarif
49 changes: 49 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,54 @@
# [Versions](https://mui.com/versions/)

## 6.4.0

<!-- generated comparing v6.3.1..master -->

_Jan 13, 2025_

A big thanks to the 16 contributors who made this release possible. Here are some highlights ✨:

- Added [`loading` prop](https://mui.com/material-ui/react-button/#loading-2) to the `Button` and `IconButton` components (#44637) @siriwatknp

### `@mui/[email protected]`

- [Alert] complete `slots` and `slotProps` (#44971) @siriwatknp
- [Autocomplete] Sync runtime and TS types for key in grouped options (#44862) @aarongarciah
- [Button] Add `loading` prop (#44637) @siriwatknp
- [CardHeader] Deprecate `*TypographyProps` and complete `slots`, `slotProps` (#44729) @siriwatknp
- [CircularProgress] Improve indeterminate animation to be symmetric and smooth (#44934) @yashdev16
- [LinearProgress] Deprecate composed classes (#44933) @headironc
- [Link] Fix error for using custom palette with underline (#44927) @siriwatknp
- [Select] Do not set `aria-controls` when closed (#44919) @siddhantantil39
- [Select] Add missing root class (#44928) @sai6855
- [Slider] Set onChangeCommitted to receive the last argument passed to onChange (#44795) @good-jinu
- Add `mergeSlotProps` for extending components (#44809) @siriwatknp
- Update `mergeSlotProps` to merge `style` (#44959) @siriwatknp
- Fix slots typing for Tooltip and StepLabel (#44985) @siriwatknp
- Remove unnecessary blank lines (#44980) @sai6855

### Docs

- [docs] Fix Dashboard sidenav sroll (#44876) @oliviertassinari
- [docs] Fix broken anchor link to w3.org (c51af8e) @oliviertassinari
- [docs] Add details on complementary Menu components (#44957) @samuelsycamore
- [docs] Remove misleading messaging on MD3 support (#44953) @mnajdova
- [docs] Fix code copy button obscuring on small screen sizes (#44861) @ZeeshanTamboli
- [docs] Remove more instances of Adobe XD (#44956) @samuelsycamore
- [docs] Remove Adobe XD chips, links, and mentions (#44909) @samuelsycamore
- [docs] Fix incorrect rendering in Typography docs (#44937) @iaziz11

### Core

- [core] Remove redundant screenshots (#44877) @oliviertassinari
- [core] Remove Suspense and clock mocking from regressions and e2e tests (#44935) @DiegoAndai
- [code-infra] Allow react@18 on `@mui/internal-test-utils` (#45023) @LukasTy
- [code-infra] Stabilize flaky pigment progressbar tests (#44969) @Janpot
- [example] Update the CDN example to adapt React 19. (#44979) @IceOfSummer
- [figma] Clarify that Material UI Sync plugin is experimental (#44975) @oliviertassinari

All contributors of this release in alphabetical order: @aarongarciah, @DiegoAndai, @good-jinu, @headironc, @iaziz11, @IceOfSummer, @Janpot, @LukasTy, @mnajdova, @oliviertassinari, @sai6855, @samuelsycamore, @siddhantantil39, @siriwatknp, @yashdev16, @ZeeshanTamboli

## 6.3.1

<!-- generated comparing v6.3.0..master -->
Expand Down
4 changes: 2 additions & 2 deletions apps/pigment-css-next-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
"devDependencies": {
"@pigment-css/nextjs-plugin": "0.0.29",
"@types/node": "^20.17.12",
"@types/react": "^19.0.2",
"@types/react": "^19.0.6",
"@types/react-dom": "^19.0.2",
"eslint": "^8.57.1",
"typescript": "^5.7.2"
"typescript": "^5.7.3"
},
"nx": {
"targets": {
Expand Down
2 changes: 1 addition & 1 deletion apps/pigment-css-vite-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"@babel/preset-react": "^7.26.3",
"@babel/preset-typescript": "^7.26.0",
"@pigment-css/vite-plugin": "0.0.29",
"@types/react": "^19.0.2",
"@types/react": "^19.0.6",
"@types/react-dom": "^19.0.2",
"@types/webfontloader": "^1.6.38",
"@vitejs/plugin-react": "^4.3.4",
Expand Down
2 changes: 1 addition & 1 deletion docs/data/base/components/button/button.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ Instead, `aria-disabled` is used, which makes the Button focusable.

This should be used whenever the disabled Button needs to be read by screen readers.

Base UI uses this prop internally in [menu items](/base-ui/react-menu/), making it possible to use the keyboard to navigate to disabled items (in compliance with [ARIA guidelines](https://www.w3.org/WAI/ARIA/apg/practices/keyboard-interface/#x6-7-focusability-of-disabled-controls)).
Base UI uses this prop internally in [menu items](/base-ui/react-menu/), making it possible to use the keyboard to navigate to disabled items (in compliance with [ARIA guidelines](https://www.w3.org/WAI/ARIA/apg/practices/keyboard-interface/#focusabilityofdisabledcontrols)).

The following demo shows how the `focusableWhenDisabled` prop works—use the <kbd class="key">Tab</kbd> key to navigate within this document to see that only the second Button accepts the focus:

Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
import * as React from 'react';
import ButtonGroup from '@mui/material/ButtonGroup';
import Button from '@mui/material/Button';
import LoadingButton from '@mui/lab/LoadingButton';
import SaveIcon from '@mui/icons-material/Save';

export default function LoadingButtonGroup() {
return (
<ButtonGroup variant="outlined" aria-label="Loading button group">
<Button>Submit</Button>
<LoadingButton>Fetch data</LoadingButton>
<LoadingButton loading loadingPosition="start" startIcon={<SaveIcon />}>
<Button>Fetch data</Button>
<Button loading loadingPosition="start" startIcon={<SaveIcon />}>
Save
</LoadingButton>
</Button>
</ButtonGroup>
);
}
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
import * as React from 'react';
import ButtonGroup from '@mui/material/ButtonGroup';
import Button from '@mui/material/Button';
import LoadingButton from '@mui/lab/LoadingButton';
import SaveIcon from '@mui/icons-material/Save';

export default function LoadingButtonGroup() {
return (
<ButtonGroup variant="outlined" aria-label="Loading button group">
<Button>Submit</Button>
<LoadingButton>Fetch data</LoadingButton>
<LoadingButton loading loadingPosition="start" startIcon={<SaveIcon />}>
<Button>Fetch data</Button>
<Button loading loadingPosition="start" startIcon={<SaveIcon />}>
Save
</LoadingButton>
</Button>
</ButtonGroup>
);
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<ButtonGroup variant="outlined" aria-label="Loading button group">
<Button>Submit</Button>
<LoadingButton>Fetch data</LoadingButton>
<LoadingButton loading loadingPosition="start" startIcon={<SaveIcon />}>
<Button>Fetch data</Button>
<Button loading loadingPosition="start" startIcon={<SaveIcon />}>
Save
</LoadingButton>
</Button>
</ButtonGroup>
8 changes: 3 additions & 5 deletions docs/data/material/components/button-group/button-group.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
productId: material-ui
title: React Button Group component
components: Button, ButtonGroup, LoadingButton
components: Button, ButtonGroup
githubLabel: 'component: ButtonGroup'
githubSource: packages/mui-material/src/ButtonGroup
---
Expand Down Expand Up @@ -49,10 +49,8 @@ You can remove the elevation with the `disableElevation` prop.

{{"demo": "DisableElevation.js"}}

## Experimental APIs
## Loading

### Loading button

You can use the [`<LoadingButton />`](/material-ui/react-button/#loading-button) from [`@mui/lab`](/material-ui/about-the-lab/) in the button group.
Use the `loading` prop from `Button` to set buttons in a loading state and disable interactions.

{{"demo": "LoadingButtonGroup.js"}}
21 changes: 21 additions & 0 deletions docs/data/material/components/buttons/IconButtonWithBadge.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import * as React from 'react';
import { styled } from '@mui/material/styles';
import IconButton from '@mui/material/IconButton';
import Badge, { badgeClasses } from '@mui/material/Badge';
import ShoppingCartIcon from '@mui/icons-material/ShoppingCartOutlined';

const CartBadge = styled(Badge)`
& .${badgeClasses.badge} {
top: -12px;
right: -6px;
}
`;

export default function IconButtonWithBadge() {
return (
<IconButton>
<ShoppingCartIcon fontSize="small" />
<CartBadge badgeContent={2} color="primary" overlap="circular" />
</IconButton>
);
}
21 changes: 21 additions & 0 deletions docs/data/material/components/buttons/IconButtonWithBadge.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import * as React from 'react';
import { styled } from '@mui/material/styles';
import IconButton from '@mui/material/IconButton';
import Badge, { badgeClasses } from '@mui/material/Badge';
import ShoppingCartIcon from '@mui/icons-material/ShoppingCartOutlined';

const CartBadge = styled(Badge)`
& .${badgeClasses.badge} {
top: -12px;
right: -6px;
}
`;

export default function IconButtonWithBadge() {
return (
<IconButton>
<ShoppingCartIcon fontSize="small" />
<CartBadge badgeContent={2} color="primary" overlap="circular" />
</IconButton>
);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<IconButton>
<ShoppingCartIcon fontSize="small" />
<CartBadge badgeContent={2} color="primary" overlap="circular" />
</IconButton>
58 changes: 47 additions & 11 deletions docs/data/material/components/buttons/LoadingButtons.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,61 @@
import * as React from 'react';
import LoadingButton from '@mui/lab/LoadingButton';
import Button from '@mui/material/Button';
import SaveIcon from '@mui/icons-material/Save';
import Stack from '@mui/material/Stack';

export default function LoadingButtons() {
return (
<Stack direction="row" spacing={2}>
<LoadingButton loading variant="outlined">
Submit
</LoadingButton>
<LoadingButton loading loadingIndicator="Loading…" variant="outlined">
Fetch data
</LoadingButton>
<LoadingButton
<Stack spacing={2}>
<Stack direction="row" spacing={2}>
<Button loading variant="outlined">
Submit
</Button>
<Button loading loadingIndicator="Loading…" variant="outlined">
Fetch data
</Button>
<Button
loading
loadingPosition="start"
startIcon={<SaveIcon />}
variant="outlined"
>
Save
</Button>
</Stack>
<Button
fullWidth
loading
loadingPosition="start"
startIcon={<SaveIcon />}
variant="outlined"
>
Save
</LoadingButton>
Full width
</Button>
<Button
fullWidth
loading
loadingPosition="end"
endIcon={<SaveIcon />}
variant="outlined"
>
Full width
</Button>
<Stack direction="row" spacing={2}>
<Button loading variant="outlined" loadingPosition="start">
Submit
</Button>
<Button loading variant="outlined" loadingPosition="end">
Submit
</Button>
<Button
loading
variant="outlined"
loadingPosition="end"
startIcon={<SaveIcon />}
>
Save
</Button>
</Stack>
</Stack>
);
}
58 changes: 47 additions & 11 deletions docs/data/material/components/buttons/LoadingButtons.tsx
Original file line number Diff line number Diff line change
@@ -1,25 +1,61 @@
import * as React from 'react';
import LoadingButton from '@mui/lab/LoadingButton';
import Button from '@mui/material/Button';
import SaveIcon from '@mui/icons-material/Save';
import Stack from '@mui/material/Stack';

export default function LoadingButtons() {
return (
<Stack direction="row" spacing={2}>
<LoadingButton loading variant="outlined">
Submit
</LoadingButton>
<LoadingButton loading loadingIndicator="Loading…" variant="outlined">
Fetch data
</LoadingButton>
<LoadingButton
<Stack spacing={2}>
<Stack direction="row" spacing={2}>
<Button loading variant="outlined">
Submit
</Button>
<Button loading loadingIndicator="Loading…" variant="outlined">
Fetch data
</Button>
<Button
loading
loadingPosition="start"
startIcon={<SaveIcon />}
variant="outlined"
>
Save
</Button>
</Stack>
<Button
fullWidth
loading
loadingPosition="start"
startIcon={<SaveIcon />}
variant="outlined"
>
Save
</LoadingButton>
Full width
</Button>
<Button
fullWidth
loading
loadingPosition="end"
endIcon={<SaveIcon />}
variant="outlined"
>
Full width
</Button>
<Stack direction="row" spacing={2}>
<Button loading variant="outlined" loadingPosition="start">
Submit
</Button>
<Button loading variant="outlined" loadingPosition="end">
Submit
</Button>
<Button
loading
variant="outlined"
loadingPosition="end"
startIcon={<SaveIcon />}
>
Save
</Button>
</Stack>
</Stack>
);
}
Loading

0 comments on commit 39b0ef6

Please sign in to comment.