Skip to content

Commit

Permalink
Merge branch 'master' into fix/snackbar-proptypes
Browse files Browse the repository at this point in the history
  • Loading branch information
siriwatknp authored Feb 3, 2025
2 parents 4d480ce + d580b43 commit 590a726
Show file tree
Hide file tree
Showing 27 changed files with 358 additions and 305 deletions.
5 changes: 5 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ commands:
default: false
description: 'Set to true if you intend to any browser (for example with playwright).'
steps:
- run:
name: Set npm registry public signing keys
command: |
echo "export COREPACK_INTEGRITY_KEYS='$(curl https://registry.npmjs.org/-/npm/v1/keys | jq -c '{npm: .keys}')'" >> $BASH_ENV
- when:
condition: << parameters.browsers >>
steps:
Expand Down
9 changes: 6 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

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

_Jan 29, 2025_
_Jan 31, 2025_

A big thanks to the 8 contributors who made this release possible.
A big thanks to the 9 contributors who made this release possible.
This is the first alpha release of Material UI v7 🎉.

### `@mui/[email protected]`
Expand All @@ -17,6 +17,7 @@ This is the first alpha release of Material UI v7 🎉.
- [SwitchBase] Deprecate `inputProps` and complete slots, slotProps (#45076) @siriwatknp
- [TextareaAutosize] Temporarily disconnect ResizeObserver to avoid loop error (#44540) @mj12albert
- [Slider] Narrow onChange value type (#44777) @good-jinu
- [Snackbar] Add Slots and SlotProps (#45103) @harry-whorlow

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

Expand All @@ -30,14 +31,16 @@ This is the first alpha release of Material UI v7 🎉.
- [docs-infra] Move Ukraine banner to the bottom (#45135) @oliviertassinari
- Fix MUI Base vale rule (#45140) @oliviertassinari
- Fix missing store contributor renaming (b3d1be0) @oliviertassinari
- Fix 404 errors (#45137) @oliviertassinari
- Prepare libraries for first v7 alpha release (#45132) @DiegoAndai
- Fix CHANGELOG vale failure (#45151) @DiegoAndai

### Docs

- Fix `/base-ui` redirect and prune links (#45083) @mj12albert
- Add v6 to v7 migration guide (#45143) @DiegoAndai

All contributors of this release in alphabetical order: @DiegoAndai, @good-jinu, @Janpot, @joshkel, @mj12albert, @oliviertassinari, @siriwatknp, @ZeeshanTamboli
All contributors of this release in alphabetical order: @DiegoAndai, @good-jinu, @harry-whorlow, @Janpot, @joshkel, @mj12albert, @oliviertassinari, @siriwatknp, @ZeeshanTamboli

## Older versions

Expand Down
4 changes: 2 additions & 2 deletions apps/pigment-css-vite-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"react": "^19.0.0",
"react-dom": "^19.0.0",
"react-error-boundary": "^5.0.0",
"react-router-dom": "^6.28.2",
"react-router-dom": "^6.29.0",
"webfontloader": "^1.6.28"
},
"devDependencies": {
Expand All @@ -34,7 +34,7 @@
"@vitejs/plugin-react": "^4.3.4",
"postcss": "^8.4.49",
"postcss-combine-media-query": "^1.0.1",
"vite": "5.4.12",
"vite": "5.4.14",
"vite-plugin-node-polyfills": "0.22.0",
"vite-plugin-pages": "^0.32.4"
},
Expand Down
2 changes: 1 addition & 1 deletion benchmark/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"benchmark": "^2.1.4",
"docs": "workspace:^",
"express": "^4.21.2",
"fs-extra": "^11.2.0",
"fs-extra": "^11.3.0",
"jss": "^10.10.0",
"playwright": "^1.48.2",
"prop-types": "^15.8.1",
Expand Down
20 changes: 10 additions & 10 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@
"@mui/system": "workspace:*",
"@mui/types": "workspace:^",
"@mui/utils": "workspace:*",
"@mui/x-charts": "7.23.6",
"@mui/x-data-grid": "7.23.6",
"@mui/x-data-grid-generator": "7.23.6",
"@mui/x-data-grid-premium": "7.23.6",
"@mui/x-data-grid-pro": "7.23.6",
"@mui/x-date-pickers": "7.23.6",
"@mui/x-date-pickers-pro": "7.23.6",
"@mui/x-license": "7.23.6",
"@mui/x-tree-view": "7.23.6",
"@mui/x-charts": "7.25.0",
"@mui/x-data-grid": "7.25.0",
"@mui/x-data-grid-generator": "7.25.0",
"@mui/x-data-grid-premium": "7.25.0",
"@mui/x-data-grid-pro": "7.25.0",
"@mui/x-date-pickers": "7.25.0",
"@mui/x-date-pickers-pro": "7.25.0",
"@mui/x-license": "7.25.0",
"@mui/x-tree-view": "7.25.0",
"@popperjs/core": "^2.11.8",
"@react-spring/web": "^9.7.5",
"@toolpad/core": "^0.12.0",
Expand All @@ -73,7 +73,7 @@
"fg-loadcss": "^3.1.0",
"final-form": "^4.20.10",
"flexsearch": "^0.7.43",
"fs-extra": "^11.2.0",
"fs-extra": "^11.3.0",
"json2mq": "^0.2.0",
"jss": "^10.10.0",
"jss-plugin-template": "^10.10.0",
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
"@playwright/test": "1.48.2",
"@types/babel__core": "^7.20.5",
"@types/fs-extra": "^11.0.4",
"@types/lodash": "^4.17.14",
"@types/lodash": "^4.17.15",
"@types/mocha": "^10.0.10",
"@types/node": "^20.17.16",
"@types/react": "^19.0.8",
Expand Down Expand Up @@ -165,7 +165,7 @@
"eslint-plugin-react-compiler": "0.0.0-experimental-75b9fd4-20240912",
"eslint-plugin-react-hooks": "^5.0.0",
"fast-glob": "^3.3.3",
"fs-extra": "^11.2.0",
"fs-extra": "^11.3.0",
"globby": "^14.0.2",
"karma": "^6.4.4",
"karma-browserstack-launcher": "~1.6.0",
Expand All @@ -178,7 +178,7 @@
"lerna": "^8.1.9",
"lodash": "^4.17.21",
"markdownlint-cli2": "^0.17.2",
"mocha": "^11.0.1",
"mocha": "^11.1.0",
"nx": "^20.3.3",
"nyc": "^17.1.0",
"piscina": "^4.8.0",
Expand All @@ -188,7 +188,7 @@
"process": "^0.11.10",
"rimraf": "^6.0.1",
"serve": "^14.2.4",
"stylelint": "^16.12.0",
"stylelint": "^16.14.1",
"stylelint-config-standard": "^36.0.1",
"terser-webpack-plugin": "^5.3.11",
"tsx": "^4.19.2",
Expand Down
2 changes: 1 addition & 1 deletion packages-internal/babel-plugin-minify-errors/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mui/internal-babel-plugin-minify-errors",
"version": "1.0.13",
"version": "2.0.0",
"author": "MUI Team",
"description": "This is an internal package not meant for general use.",
"repository": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mui/internal-babel-plugin-resolve-imports",
"version": "1.0.21",
"version": "2.0.0",
"author": "MUI Team",
"description": "babel plugin that resolves import specifiers to their actual output file.",
"main": "./index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages-internal/docs-utils/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mui/internal-docs-utils",
"version": "1.0.16",
"version": "2.0.0",
"author": "MUI Team",
"description": "Utilities for MUI docs. This is an internal package not meant for general use.",
"main": "./build/index.js",
Expand Down
4 changes: 2 additions & 2 deletions packages-internal/scripts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mui/internal-scripts",
"version": "1.0.34",
"version": "2.0.0",
"author": "MUI Team",
"description": "Utilities supporting MUI libraries build and docs generation. This is an internal package not meant for general use.",
"main": "build/index.js",
Expand Down Expand Up @@ -41,7 +41,7 @@
"@types/babel__core": "^7.20.5",
"@types/chai": "^4.3.20",
"@types/doctrine": "^0.0.9",
"@types/lodash": "^4.17.14",
"@types/lodash": "^4.17.15",
"@types/node": "^20.17.16",
"@types/react": "^19.0.8",
"@types/uuid": "^10.0.0",
Expand Down
6 changes: 3 additions & 3 deletions packages-internal/test-utils/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mui/internal-test-utils",
"version": "1.0.27",
"version": "2.0.0",
"author": "MUI Team",
"description": "Utilities for MUI tests. This is an internal package not meant for general use.",
"main": "./build/index.js",
Expand Down Expand Up @@ -46,10 +46,10 @@
"chai-dom": "^1.12.1",
"dom-accessibility-api": "^0.7.0",
"format-util": "^1.0.5",
"fs-extra": "^11.2.0",
"fs-extra": "^11.3.0",
"jsdom": "^25.0.1",
"lodash": "^4.17.21",
"mocha": "^11.0.1",
"mocha": "^11.1.0",
"playwright": "^1.48.2",
"prop-types": "^15.8.1",
"sinon": "^19.0.2"
Expand Down
2 changes: 1 addition & 1 deletion packages/api-docs-builder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"ast-types": "^0.14.2",
"doctrine": "^3.0.0",
"fast-glob": "^3.3.3",
"fs-extra": "^11.2.0",
"fs-extra": "^11.3.0",
"lodash": "^4.17.21",
"prettier": "^3.4.2",
"react-docgen": "^5.4.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/markdown/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mui/internal-markdown",
"version": "1.0.26",
"version": "2.0.0",
"author": "MUI Team",
"description": "MUI markdown parser. This is an internal package not meant for general use.",
"main": "./index.mjs",
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-envinfo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"devDependencies": {
"@types/chai": "^4.3.20",
"chai": "^4.5.0",
"fs-extra": "^11.2.0"
"fs-extra": "^11.3.0"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-icons-material/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"chalk": "^5.4.1",
"cross-fetch": "^4.1.0",
"fast-glob": "^3.3.3",
"fs-extra": "^11.2.0",
"fs-extra": "^11.3.0",
"lodash": "^4.17.21",
"mustache": "^4.2.0",
"react": "^19.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"chai": "^4.5.0",
"css-mediaquery": "^0.1.2",
"fast-glob": "^3.3.3",
"fs-extra": "^11.2.0",
"fs-extra": "^11.3.0",
"lodash": "^4.17.21",
"playwright": "^1.48.2",
"react": "^19.0.0",
Expand Down
8 changes: 4 additions & 4 deletions packages/mui-material/src/Autocomplete/Autocomplete.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2898,10 +2898,10 @@ describe('<Autocomplete />', () => {
);
expect(handleHighlightChange.callCount).to.equal(
// FIXME: highlighted index implementation should be implemented using React not the DOM.
reactMajor >= 18 ? 2 : 1,
reactMajor > 18 ? 2 : 1,
);
expect(handleHighlightChange.args[0]).to.deep.equal([undefined, options[0], 'auto']);
if (reactMajor >= 18) {
if (reactMajor > 18) {
expect(handleHighlightChange.args[1]).to.deep.equal([undefined, options[0], 'auto']);
}
});
Expand All @@ -2921,10 +2921,10 @@ describe('<Autocomplete />', () => {
);
expect(handleHighlightChange.callCount).to.equal(
// FIXME: highlighted index implementation should be implemented using React not the DOM.
reactMajor >= 18 ? 2 : 1,
reactMajor > 18 ? 2 : 1,
);
expect(handleHighlightChange.args[0]).to.deep.equal([undefined, options[0], 'auto']);
if (reactMajor >= 18) {
if (reactMajor > 18) {
expect(handleHighlightChange.args[1]).to.deep.equal([undefined, options[0], 'auto']);
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { InternalStandardProps as StandardProps, Theme } from '..';
import { CircularProgressClasses } from './circularProgressClasses';

export interface CircularProgressPropsColorOverrides {}
export interface CircularProgressPropsVariantOverrides {}

export interface CircularProgressProps
extends StandardProps<React.HTMLAttributes<HTMLSpanElement>, 'children'> {
Expand Down Expand Up @@ -55,7 +56,10 @@ export interface CircularProgressProps
* Use indeterminate when there is no progress value.
* @default 'indeterminate'
*/
variant?: 'determinate' | 'indeterminate';
variant?: OverridableStringUnion<
'determinate' | 'indeterminate',
CircularProgressPropsVariantOverrides
>;
}

/**
Expand Down
6 changes: 5 additions & 1 deletion packages/mui-material/src/LinearProgress/LinearProgress.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { InternalStandardProps as StandardProps, Theme } from '..';
import { LinearProgressClasses } from './linearProgressClasses';

export interface LinearProgressPropsColorOverrides {}
export interface LinearProgressPropsVariantOverrides {}

export interface LinearProgressProps
extends StandardProps<React.HTMLAttributes<HTMLSpanElement>, 'children'> {
Expand Down Expand Up @@ -41,7 +42,10 @@ export interface LinearProgressProps
* Use indeterminate or query when there is no progress value.
* @default 'indeterminate'
*/
variant?: 'determinate' | 'indeterminate' | 'buffer' | 'query';
variant?: OverridableStringUnion<
'determinate' | 'indeterminate' | 'buffer' | 'query',
LinearProgressPropsVariantOverrides
>;
}

/**
Expand Down
17 changes: 6 additions & 11 deletions packages/mui-material/src/Popover/Popover.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,12 @@ const ReplacementPaper = styled(Paper, {
backgroundColor: 'red',
});

function CustomTransition({
in: inProp,
appear,
onEnter,
onEntering,
onExited,
ownerState,
...props
}) {
return <div data-testid="custom" {...props} />;
}
const CustomTransition = React.forwardRef(function CustomTransition(
{ in: inProp, appear, onEnter, onEntering, onExited, ownerState, ...props },
ref,
) {
return <div data-testid="custom" ref={ref} {...props} />;
});

describe('<Popover />', () => {
const { clock, render } = createRenderer({ clock: 'fake' });
Expand Down
1 change: 0 additions & 1 deletion packages/mui-material/src/Radio/Radio.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import rootShouldForwardProp from '../styles/rootShouldForwardProp';
import { styled } from '../zero-styled';
import memoTheme from '../utils/memoTheme';
import createSimplePaletteValueFilter from '../utils/createSimplePaletteValueFilter';

import { useDefaultProps } from '../DefaultPropsProvider';

const useUtilityClasses = (ownerState) => {
Expand Down
28 changes: 16 additions & 12 deletions packages/mui-material/src/Snackbar/Snackbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,17 +182,18 @@ const Snackbar = React.forwardRef(function Snackbar(inProps, ref) {
ownerState,
});

const [ClickAwaySlot, clickAwayListenerProps] = useSlot('clickAwayListener', {
elementType: ClickAwayListener,
externalForwardedProps,
getSlotProps: (handlers) => ({
onClickAway: (...params) => {
handlers.onClickAway?.(...params);
onClickAway(...params);
},
}),
ownerState,
});
const [ClickAwaySlot, { ownerState: clickAwayOwnerStateProp, ...clickAwayListenerProps }] =
useSlot('clickAwayListener', {
elementType: ClickAwayListener,
externalForwardedProps,
getSlotProps: (handlers) => ({
onClickAway: (...params) => {
handlers.onClickAway?.(...params);
onClickAway(...params);
},
}),
ownerState,
});

const [ContentSlot, contentSlotProps] = useSlot('content', {
elementType: SnackbarContent,
Expand Down Expand Up @@ -233,7 +234,10 @@ const Snackbar = React.forwardRef(function Snackbar(inProps, ref) {
}

return (
<ClickAwaySlot {...clickAwayListenerProps}>
<ClickAwaySlot
{...clickAwayListenerProps}
{...(slots.clickAwayListener && { ownerState: clickAwayOwnerStateProp })}
>
<Root {...rootProps}>
<TransitionSlot {...transitionProps}>
{children || <ContentSlot {...contentSlotProps} />}
Expand Down
Loading

0 comments on commit 590a726

Please sign in to comment.