Skip to content

Commit

Permalink
Merge branch 'mui:next' into deprecate-speed-dial-transition
Browse files Browse the repository at this point in the history
  • Loading branch information
harry-whorlow authored and Harry Whorlow committed Apr 16, 2024
2 parents 39dc8fd + 36e95e2 commit c4c8f24
Show file tree
Hide file tree
Showing 127 changed files with 1,511 additions and 1,099 deletions.
60 changes: 0 additions & 60 deletions .browserslistrc
Original file line number Diff line number Diff line change
Expand Up @@ -72,66 +72,6 @@ safari 15.4
samsung 23
samsung 22

[legacy]
ie 11
and_chr 122
and_chr 121
and_ff 123
and_ff 122
and_qq 14.9
and_uc 15.5
android 122
android 121
chrome 122
chrome 121
chrome 120
chrome 119
chrome 109
edge 122
edge 121
firefox 123
firefox 122
firefox 115
ios_saf 17.4
ios_saf 17.3
ios_saf 17.2
ios_saf 17.1
ios_saf 17.0
ios_saf 16.6-16.7
ios_saf 16.5
ios_saf 16.4
ios_saf 16.3
ios_saf 16.2
ios_saf 16.1
ios_saf 16.0
ios_saf 15.6-15.8
ios_saf 15.5
ios_saf 15.4
kaios 3.0-3.1
kaios 2.5
op_mini all
op_mob 80
opera 108
opera 107
opera 106
safari 17.4
safari 17.3
safari 17.2
safari 17.1
safari 17.0
safari 16.6
safari 16.5
safari 16.4
safari 16.3
safari 16.2
safari 16.1
safari 16.0
safari 15.6
safari 15.5
safari 15.4
samsung 23
samsung 22

# snapshot of `npx browserslist "maintained node versions"`
# On update check all #stable-snapshot markers
[node]
Expand Down
28 changes: 14 additions & 14 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ jobs:
name: Lint writing style
command: |
vale sync
pnpm run valelint
pnpm valelint
test_static:
<<: *default-job
steps:
Expand Down Expand Up @@ -380,7 +380,7 @@ jobs:
<<: *default-job
resource_class: 'medium+'
docker:
- image: mcr.microsoft.com/playwright:v1.43.0-focal
- image: mcr.microsoft.com/playwright:v1.43.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand Down Expand Up @@ -410,7 +410,7 @@ jobs:
test_e2e:
<<: *default-job
docker:
- image: mcr.microsoft.com/playwright:v1.43.0-focal
- image: mcr.microsoft.com/playwright:v1.43.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand All @@ -430,7 +430,7 @@ jobs:
# NOTE: This workflow runs after successful docs deploy. See /test/e2e-website/README.md#ci
<<: *default-job
docker:
- image: mcr.microsoft.com/playwright:v1.43.0-focal
- image: mcr.microsoft.com/playwright:v1.43.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand All @@ -445,7 +445,7 @@ jobs:
test_profile:
<<: *default-job
docker:
- image: mcr.microsoft.com/playwright:v1.43.0-focal
- image: mcr.microsoft.com/playwright:v1.43.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand All @@ -472,7 +472,7 @@ jobs:
test_regressions:
<<: *default-job
docker:
- image: mcr.microsoft.com/playwright:v1.43.0-focal
- image: mcr.microsoft.com/playwright:v1.43.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand Down Expand Up @@ -526,7 +526,7 @@ jobs:
<<: *default-job
working_directory: /tmp/material-ui/test/bundling/fixtures/next-webpack4/
docker:
- image: mcr.microsoft.com/playwright:v1.43.0-focal
- image: mcr.microsoft.com/playwright:v1.43.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand All @@ -550,7 +550,7 @@ jobs:
<<: *default-job
working_directory: /tmp/material-ui/test/bundling/fixtures/next-webpack5/
docker:
- image: mcr.microsoft.com/playwright:v1.43.0-focal
- image: mcr.microsoft.com/playwright:v1.43.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand All @@ -574,7 +574,7 @@ jobs:
<<: *default-job
working_directory: /tmp/material-ui/test/bundling/fixtures/create-react-app/
docker:
- image: mcr.microsoft.com/playwright:v1.43.0-focal
- image: mcr.microsoft.com/playwright:v1.43.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand All @@ -598,7 +598,7 @@ jobs:
<<: *default-job
working_directory: /tmp/material-ui/test/bundling/fixtures/snowpack/
docker:
- image: mcr.microsoft.com/playwright:v1.43.0-focal
- image: mcr.microsoft.com/playwright:v1.43.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand All @@ -622,7 +622,7 @@ jobs:
<<: *default-job
working_directory: /tmp/material-ui/test/bundling/fixtures/vite/
docker:
- image: mcr.microsoft.com/playwright:v1.43.0-focal
- image: mcr.microsoft.com/playwright:v1.43.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand All @@ -646,7 +646,7 @@ jobs:
<<: *default-job
working_directory: /tmp/material-ui/test/bundling/fixtures/esbuild/
docker:
- image: mcr.microsoft.com/playwright:v1.43.0-focal
- image: mcr.microsoft.com/playwright:v1.43.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand Down Expand Up @@ -674,7 +674,7 @@ jobs:
<<: *default-job
working_directory: /tmp/material-ui/test/bundling/fixtures/gatsby/
docker:
- image: mcr.microsoft.com/playwright:v1.43.0-focal
- image: mcr.microsoft.com/playwright:v1.43.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand Down Expand Up @@ -775,7 +775,7 @@ jobs:
test_benchmark:
<<: *default-job
docker:
- image: mcr.microsoft.com/playwright:v1.43.0-focal
- image: mcr.microsoft.com/playwright:v1.43.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand Down
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ module.exports = {
'react/state-in-constructor': 'off',
// stylistic opinion. For conditional assignment we want it outside, otherwise as static
'react/static-property-placement': 'off',
// noopener is enough, no IE 11 support
// noopener is enough
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-target-blank.md#rule-options
'react/jsx-no-target-blank': ['error', { allowReferrer: true }],

Expand Down
2 changes: 1 addition & 1 deletion apps/pigment-css-next-app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This is a Pigment CSS and [Next.js](https://nextjs.org/) project bootstrapped w

## Getting started

First, build all the packages in the workspace atleast once. Run
First, build all the packages in the workspace at least once. Run

```bash
pnpm build:zero
Expand Down
2 changes: 1 addition & 1 deletion apps/pigment-css-next-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"@types/react": "^18.2.55",
"@types/react-dom": "^18.2.19",
"eslint": "^8.57.0",
"typescript": "^5.4.4"
"typescript": "^5.4.5"
},
"nx": {
"targets": {
Expand Down
2 changes: 1 addition & 1 deletion apps/pigment-css-vite-app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This project is not part of the workspace yet.

## How to run

You can either run `pnpm build` to build all packages, or else build the two most important ones:
You can either run `pnpm build` to build all packages or else build the two most important ones:

1. `@pigment-css/react`
2. `@pigment-css/vite-plugin`
Expand Down
8 changes: 1 addition & 7 deletions babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const productionPlugins = [
];

module.exports = function getBabelConfig(api) {
const useESModules = api.env(['regressions', 'legacy', 'modern', 'stable', 'rollup']);
const useESModules = api.env(['regressions', 'modern', 'stable', 'rollup']);

const defaultAlias = {
'@mui/material': resolveAliasPath('./packages/mui-material/src'),
Expand Down Expand Up @@ -153,12 +153,6 @@ module.exports = function getBabelConfig(api) {
],
],
},
legacy: {
plugins: [
// IE11 support
'@babel/plugin-transform-object-assign',
],
},
test: {
sourceMaps: 'both',
plugins: [
Expand Down
2 changes: 1 addition & 1 deletion benchmark/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"express": "^4.19.2",
"fs-extra": "^11.2.0",
"jss": "^10.10.0",
"playwright": "^1.43.0",
"playwright": "^1.43.1",
"prop-types": "^15.8.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
Expand Down
2 changes: 0 additions & 2 deletions docs/babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ module.exports = {
},
],
'babel-plugin-optimize-clsx',
// for IE11 support
'@babel/plugin-transform-object-assign',
],
ignore: [/@babel[\\|/]runtime/], // Fix a Windows issue.
env: {
Expand Down
19 changes: 2 additions & 17 deletions docs/data/joy/components/table/TableSortAndSelection.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,22 +65,6 @@ function getComparator(order, orderBy) {
: (a, b) => -descendingComparator(a, b, orderBy);
}

// Since 2020 all major browsers ensure sort stability with Array.prototype.sort().
// stableSort() brings sort stability to non-modern browsers (notably IE11). If you
// only support modern browsers you can replace stableSort(exampleArray, exampleComparator)
// with exampleArray.slice().sort(exampleComparator)
function stableSort(array, comparator) {
const stabilizedThis = array.map((el, index) => [el, index]);
stabilizedThis.sort((a, b) => {
const order = comparator(a[0], b[0]);
if (order !== 0) {
return order;
}
return a[1] - b[1];
});
return stabilizedThis.map((el) => el[0]);
}

const headCells = [
{
id: 'name',
Expand Down Expand Up @@ -348,7 +332,8 @@ export default function TableSortAndSelection() {
rowCount={rows.length}
/>
<tbody>
{stableSort(rows, getComparator(order, orderBy))
{[...rows]
.sort(getComparator(order, orderBy))
.slice(page * rowsPerPage, page * rowsPerPage + rowsPerPage)
.map((row, index) => {
const isItemSelected = isSelected(row.name);
Expand Down
19 changes: 2 additions & 17 deletions docs/data/joy/components/table/TableSortAndSelection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,22 +94,6 @@ function getComparator<Key extends keyof any>(
: (a, b) => -descendingComparator(a, b, orderBy);
}

// Since 2020 all major browsers ensure sort stability with Array.prototype.sort().
// stableSort() brings sort stability to non-modern browsers (notably IE11). If you
// only support modern browsers you can replace stableSort(exampleArray, exampleComparator)
// with exampleArray.slice().sort(exampleComparator)
function stableSort<T>(array: readonly T[], comparator: (a: T, b: T) => number) {
const stabilizedThis = array.map((el, index) => [el, index] as [T, number]);
stabilizedThis.sort((a, b) => {
const order = comparator(a[0], b[0]);
if (order !== 0) {
return order;
}
return a[1] - b[1];
});
return stabilizedThis.map((el) => el[0]);
}

interface HeadCell {
disablePadding: boolean;
id: keyof Data;
Expand Down Expand Up @@ -390,7 +374,8 @@ export default function TableSortAndSelection() {
rowCount={rows.length}
/>
<tbody>
{stableSort(rows, getComparator(order, orderBy))
{[...rows]
.sort(getComparator(order, orderBy))
.slice(page * rowsPerPage, page * rowsPerPage + rowsPerPage)
.map((row, index) => {
const isItemSelected = isSelected(row.name);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ const templates = [
author: authors.MUI,
design: {
name: 'Frames X',
link: 'https://framesxdesign.com/',
link: 'https://framesxdesign.com/product',
},
},
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,22 +242,6 @@ function getComparator<Key extends keyof any>(
: (a, b) => -descendingComparator(a, b, orderBy);
}

// Since 2020 all major browsers ensure sort stability with Array.prototype.sort().
// stableSort() brings sort stability to non-modern browsers (notably IE11). If you
// only support modern browsers you can replace stableSort(exampleArray, exampleComparator)
// with exampleArray.slice().sort(exampleComparator)
function stableSort<T>(array: readonly T[], comparator: (a: T, b: T) => number) {
const stabilizedThis = array.map((el, index) => [el, index] as [T, number]);
stabilizedThis.sort((a, b) => {
const order = comparator(a[0], b[0]);
if (order !== 0) {
return order;
}
return a[1] - b[1];
});
return stabilizedThis.map((el) => el[0]);
}

function RowMenu() {
return (
<Dropdown>
Expand Down Expand Up @@ -451,7 +435,7 @@ export default function OrderTable() {
</tr>
</thead>
<tbody>
{stableSort(rows, getComparator(order, 'id')).map((row) => (
{[...rows].sort(getComparator(order, 'id')).map((row) => (
<tr key={row.id}>
<td style={{ textAlign: 'center', width: 120 }}>
<Checkbox
Expand Down
8 changes: 6 additions & 2 deletions docs/data/material/components/buttons/InputFileUpload.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,12 @@ export default function InputFileUpload() {
tabIndex={-1}
startIcon={<CloudUploadIcon />}
>
Upload file
<VisuallyHiddenInput type="file" />
Upload files
<VisuallyHiddenInput
type="file"
onChange={(event) => console.log(event.target.files)}
multiple
/>
</Button>
);
}
Loading

0 comments on commit c4c8f24

Please sign in to comment.