Skip to content

Commit

Permalink
Merge branch 'master' into fix/scroll-buttons-tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
ZeeshanTamboli committed Jul 21, 2023
2 parents ada70ec + 9ffd558 commit 18c81f2
Show file tree
Hide file tree
Showing 569 changed files with 10,232 additions and 4,463 deletions.
91 changes: 91 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,96 @@
# [Versions](https://mui.com/versions/)

## 5.14.1

<!-- generated comparing v5.14.0..master -->

_Jul 19, 2023_

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

- 💫 Introducing some new components for Joy UI:
- [Skeleton](https://mui.com/joy-ui/react-skeleton/) component (#37893) @siriwatknp
- [ToggleButton](https://mui.com/joy-ui/react-toggle-button-group/) (#37716) @siriwatknp
- 🎉 Base UI has its own [landing page](https://www.mui.com/base-ui)!
- 🐛 bug fixes, 📚 documentation, and ⚙️ infrastructure improvements.

### `@mui/material@5.14.1`

- &#8203;<!-- 14 -->[FormControlLabel] Fix misplaced asterisk when `labelPlacement` is provided (#37831) @ZeeshanTamboli
- &#8203;<!-- 11 -->[Slider][material] Fix type dependency on @types/prop-types (#37853) @Methuselah96
- &#8203;<!-- 10 -->[Menu] Add MuiMenuList to createTheme components key (#37956) @mj12albert
- &#8203;<!-- 09 -->[Modal] Remove deprecated `BackdropComponent` and `BackdropProps` from tests (#38018) @sai6855

### `@mui/material-next@6.0.0-alpha.93`

- &#8203;<!-- 54 -->[Slider][material-next] Add use client directive to useSliderElementsOverlap (#37955) @mj12albert
- &#8203;<!-- 47 -->[Button][material-next] Fix some event handlers being ignored (#37647) @DiegoAndai

### `@mui/base@5.0.0-beta.8`

- &#8203;<!-- 53 -->[Autocomplete] Make touch and click behavior on an option consistent (#37972) @divyammadhok

### `@mui/joy@5.0.0-alpha.88`

- &#8203;<!-- 13 -->[Joy][Select] Fix type error caused by custom variant (#37996) @OmPr366
- &#8203;<!-- 12 -->[ToggleButton][Joy] Add `ToggleButton` component (#37716) @siriwatknp
- &#8203;<!-- 07 -->[Skeleton] Add Joy UI `Skeleton` component (#37893) @siriwatknp

### `@mui/utils@5.14.1`

- &#8203;<!-- 06 -->[utils] Add function overload for `useEventCallback` (#37827) @cherniavskii

### Docs

- &#8203;<!-- 52 -->[docs][base] Add Tailwind CSS & plain CSS demo on the form control page (#37914) @mnajdova
- &#8203;<!-- 51 -->[docs][base] Make Base UI Select demos denser (#37836) @zanivan
- &#8203;<!-- 38 -->[docs] Link Material UI from the landing page (#37971) @oliviertassinari
- &#8203;<!-- 37 -->[docs] Fix the empty /components page (#38010) @brijeshb42
- &#8203;<!-- 36 -->[docs] Checkout template follows user's color scheme preference (#37928) @OndrejHj04
- &#8203;<!-- 35 -->[docs] Disable ad for onboarding pages (#37998) @oliviertassinari
- &#8203;<!-- 34 -->[docs] Fix broken link to Base UI Next.js App Router (#37973) @oliviertassinari
- &#8203;<!-- 33 -->[docs] Fix typo in next-js-app-router.md (#37974) @ericbrian
- &#8203;<!-- 32 -->[docs] Add pnpm commands to Material UI Installation page (#36650) @officialrajdeepsingh
- &#8203;<!-- 31 -->[docs] Link charts in the roadmap (#37944) @oliviertassinari
- &#8203;<!-- 30 -->[docs] Improve changelog @oliviertassinari
- &#8203;<!-- 29 -->[docs] Improve the Select docs (#37279) @michaldudak
- &#8203;<!-- 16 -->[docs][menu] Add Tailwind CSS & plain CSS demo on the Menu page (#37856) @mnajdova
- &#8203;<!-- 15 -->[example] Update EmotionCacheProvider to work with GlobalStyles (#37962) @siriwatknp

### Core

- &#8203;<!-- 50 -->[blog] Add blog post about support for Next.js App Router (#37929) @samuelsycamore
- &#8203;<!-- 49 -->[blog] Blog MUI X pro statement removed (#38015) @prakhargupta1
- &#8203;<!-- 48 -->[blog] Add Toolpad beta announcement blog (#37799) @prakhargupta1
- &#8203;<!-- 46 -->[core] Increase space available for sidenav @oliviertassinari
- &#8203;<!-- 45 -->[core] Adds `component` prop to `OverrideProps` type (#35924) @sai6855
- &#8203;<!-- 44 -->[core] Fix rsc build step in CI (#38019) @mj12albert
- &#8203;<!-- 43 -->[core] Remove nx dependency (#37964) @Janpot
- &#8203;<!-- 42 -->[core] Lock `@types/node` to v18 (#37965) @ZeeshanTamboli
- &#8203;<!-- 41 -->[core] Update priority support issue template and prompt (#37824) @DanailH
- &#8203;<!-- 40 -->[core] Remove warnings in docs:api (#37858) @alexfauquette
- &#8203;<!-- 39 -->[core] Make rimraf work after a major update (#37930) @michaldudak
- &#8203;<!-- 28 -->[docs-infra] Change the Diamond Sponsor block positioning on the side nav (#37933) @danilo-leal
- &#8203;<!-- 27 -->[docs-infra] Support backticks in the codeblocks (#37950) @cherniavskii
- &#8203;<!-- 26 -->[docs-infra] Improve performance hideToolbar: true (#37969) @oliviertassinari
- &#8203;<!-- 25 -->[docs-infra] Fix button label on mobile (#37997) @oliviertassinari
- &#8203;<!-- 24 -->[docs-infra] Square drawer corners (#37970) @oliviertassinari
- &#8203;<!-- 23 -->[docs-infra] Improve tab contrast in codeblock (#38000) @oliviertassinari
- &#8203;<!-- 22 -->[docs-infra] Fix API generation for Base UI (#37941) @oliviertassinari
- &#8203;<!-- 21 -->[docs-infra] Fix layout shift on xGrid (#37954) @oliviertassinari
- &#8203;<!-- 20 -->[docs-infra] Update installation commands to use the new tabs code component (#37927) @danilo-leal
- &#8203;<!-- 19 -->[docs-infra] Improve disableToc={true} support (#37931) @oliviertassinari
- &#8203;<!-- 18 -->[docs-infra] Remove icons and tweak the design of the side nav (#37860) @danilo-leal
- &#8203;<!-- 17 -->[docs-infra] Fix TypeScrit error in demo export (#37830) @oliviertassinari
- &#8203;<!-- 08 -->[notifications] Add notification for first Charts release (#37679) @joserodolfofreitas
- &#8203;<!-- 05 -->[website] Add Base UI marketing page (#36622) @siriwatknp
- &#8203;<!-- 04 -->[website] Update MUI X landing page (#37966) @cherniavskii
- &#8203;<!-- 03 -->[website] Fix a11y issues (#37999) @oliviertassinari
- &#8203;<!-- 02 -->[website] Make the Core page refer to group of products (#37608) @danilo-leal
- &#8203;<!-- 01 -->[website] Add perpetual option to pricing page (#35504) @joserodolfofreitas

All contributors of this release in alphabetical order: @alexfauquette, @brijeshb42, @cherniavskii, @DanailH, @danilo-leal, @DiegoAndai, @divyammadhok, @ericbrian, @Janpot, @joserodolfofreitas, @Methuselah96, @michaldudak, @mj12albert, @mnajdova, @officialrajdeepsingh, @oliviertassinari, @OmPr366, @OndrejHj04, @prakhargupta1, @sai6855, @samuelsycamore, @siriwatknp, @zanivan, @ZeeshanTamboli

## 5.14.0

<!-- generated comparing v5.13.7..master -->
Expand Down
6 changes: 3 additions & 3 deletions benchmark/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
"@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0",
"@mdx-js/react": "^2.3.0",
"@mui/material": "^5.14.0",
"@mui/styles": "^5.14.0",
"@mui/system": "^5.14.0",
"@mui/material": "^5.14.1",
"@mui/styles": "^5.14.1",
"@mui/system": "^5.14.1",
"@styled-system/css": "^5.1.5",
"benchmark": "^2.1.4",
"playwright": "^1.36.1",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,234 @@
import * as React from 'react';
import { useTheme } from '@mui/system';
import TablePagination, {
tablePaginationClasses as classes,
} from '@mui/base/TablePagination';

export default function TableCustomized() {
const [page, setPage] = React.useState(0);
const [rowsPerPage, setRowsPerPage] = React.useState(5);

// Avoid a layout jump when reaching the last page with empty rows.
const emptyRows =
page > 0 ? Math.max(0, (1 + page) * rowsPerPage - rows.length) : 0;

const handleChangePage = (event, newPage) => {
setPage(newPage);
};

const handleChangeRowsPerPage = (event) => {
setRowsPerPage(parseInt(event.target.value, 10));
setPage(0);
};

return (
<React.Fragment>
<div className="TablePaginationDemo">
<table aria-label="custom pagination table">
<thead>
<tr>
<th>Dessert</th>
<th>Calories</th>
<th>Fat</th>
</tr>
</thead>
<tbody>
{(rowsPerPage > 0
? rows.slice(page * rowsPerPage, page * rowsPerPage + rowsPerPage)
: rows
).map((row) => (
<tr key={row.name}>
<td>{row.name}</td>
<td style={{ width: 120 }} align="right">
{row.calories}
</td>
<td style={{ width: 120 }} align="right">
{row.fat}
</td>
</tr>
))}

{emptyRows > 0 && (
<tr style={{ height: 34 * emptyRows }}>
<td colSpan={3} />
</tr>
)}
</tbody>
<tfoot>
<tr>
<TablePagination
className="CustomTablePagination"
rowsPerPageOptions={[5, 10, 25, { label: 'All', value: -1 }]}
colSpan={3}
count={rows.length}
rowsPerPage={rowsPerPage}
page={page}
slotProps={{
select: {
'aria-label': 'rows per page',
},
actions: {
showFirstButton: true,
showLastButton: true,
},
}}
onPageChange={handleChangePage}
onRowsPerPageChange={handleChangeRowsPerPage}
/>
</tr>
</tfoot>
</table>
</div>
<Styles />
</React.Fragment>
);
}

function createData(name, calories, fat) {
return { name, calories, fat };
}

const rows = [
createData('Cupcake', 305, 3.7),
createData('Donut', 452, 25.0),
createData('Eclair', 262, 16.0),
createData('Frozen yoghurt', 159, 6.0),
createData('Gingerbread', 356, 16.0),
createData('Honeycomb', 408, 3.2),
createData('Ice cream sandwich', 237, 9.0),
createData('Jelly Bean', 375, 0.0),
createData('KitKat', 518, 26.0),
createData('Lollipop', 392, 0.2),
createData('Marshmallow', 318, 0),
createData('Nougat', 360, 19.0),
createData('Oreo', 437, 18.0),
].sort((a, b) => (a.calories < b.calories ? -1 : 1));

const cyan = {
50: '#E9F8FC',
100: '#BDEBF4',
200: '#99D8E5',
300: '#66BACC',
400: '#1F94AD',
500: '#0D5463',
600: '#094855',
700: '#063C47',
800: '#043039',
900: '#022127',
};

const grey = {
50: '#F3F6F9',
100: '#E7EBF0',
200: '#E0E3E7',
300: '#CDD2D7',
400: '#B2BAC2',
500: '#A0AAB4',
600: '#6F7E8C',
700: '#3E5060',
800: '#2D3843',
900: '#1A2027',
};

function useIsDarkMode() {
const theme = useTheme();
return theme.palette.mode === 'dark';
}

function Styles() {
// Replace this with your app logic for determining dark mode
const isDarkMode = useIsDarkMode();

return (
<style>
{`
.TablePaginationDemo {
width: 500px;
max-width: 100%;
}
.TablePaginationDemo table {
font-family: IBM Plex Sans, sans-serif;
font-size: 0.875rem;
border-collapse: collapse;
width: 100%;
}
.TablePaginationDemo td,
.TablePaginationDemo th {
border: 1px solid ${isDarkMode ? grey[800] : grey[200]};
text-align: left;
padding: 6px;
}
.TablePaginationDemo th {
background-color: ${isDarkMode ? cyan[800] : cyan[50]};
}
.CustomTablePagination .${classes.spacer} {
display: none;
}
.CustomTablePagination .${classes.toolbar} {
display: flex;
flex-direction: column;
align-items: flex-start;
gap: 10px;
@media (min-width: 768px) {
flex-direction: row;
align-items: center;
}
}
.CustomTablePagination .${classes.selectLabel} {
margin: 0;
}
.CustomTablePagination .${classes.select} {
padding: 2px;
border: 1px solid ${isDarkMode ? grey[800] : grey[200]};
border-radius: 50px;
background-color: transparent;
}
.CustomTablePagination .${classes.select}:hover {
background-color: ${isDarkMode ? grey[800] : grey[50]};
}
.CustomTablePagination .${classes.select}:focus {
outline: 1px solid ${isDarkMode ? cyan[400] : cyan[200]};
}
.CustomTablePagination .${classes.displayedRows} {
margin: 0;
@media (min-width: 768px) {
margin-left: auto;
}
}
.CustomTablePagination .${classes.actions} {
padding: 2px;
border: 1px solid ${isDarkMode ? grey[800] : grey[200]};
border-radius: 50px;
text-align: center;
}
.CustomTablePagination .${classes.actions} > button {
margin: 0 8px;
border: transparent;
border-radius: 2px;
background-color: transparent;
}
.CustomTablePagination .${classes.actions} > button:hover {
background-color: ${isDarkMode ? grey[800] : grey[50]};
}
.CustomTablePagination .${classes.actions} > button:focus {
outline: 1px solid ${isDarkMode ? cyan[400] : cyan[200]};
}
`}
</style>
);
}
Loading

0 comments on commit 18c81f2

Please sign in to comment.