Skip to content

Commit

Permalink
Merge branch 'next' of https://github.com/mui/material-ui into fix-sp…
Browse files Browse the repository at this point in the history
…eedDial-tooltip-mui#41067
  • Loading branch information
jjisabi committed Apr 26, 2024
2 parents 2690f86 + 341a6d2 commit d2b063c
Show file tree
Hide file tree
Showing 206 changed files with 661 additions and 8,403 deletions.
6 changes: 0 additions & 6 deletions .eslintignore
Expand Up @@ -19,12 +19,6 @@
/packages/mui-icons-material/src/*.js
/packages/mui-icons-material/templateSvgIcon.js
/packages/mui-utils/macros/__fixtures__/
/packages/pigment-css-react/utils/
/packages/pigment-css-react/processors/
/packages/pigment-css-react/exports/
/packages/pigment-css-react/theme/
/packages/pigment-css-react/tests/**/fixtures
/packages/pigment-css-nextjs-plugin/loader.js
# Ignore fixtures
/packages-internal/scripts/typescript-to-proptypes/test/*/*
/test/bundling/fixtures/**/*.fixture.js
Expand Down
55 changes: 55 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,60 @@
# [Versions](https://mui.com/versions/)

## v6.0.0-alpha.4

<!-- generated comparing v6.0.0-alpha.3..next -->

_Apr 24, 2024_

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

- 🔥 Converted 3 more Material UI components to use Pigment CSS.
- ℹ️ Pigment CSS now lives in [its own repository](https://github.com/mui/pigment-css)! From now on, all future development will happen there.

### `@mui/material@6.0.0-alpha.4`

- [Checkbox] Convert to support CSS extraction (#41957) @lhilgert9
- [IconButton] Convert to support CSS extraction (#41850) @gijsbotje
- [Radio] Convert to support CSS extraction (#41840) @lhilgert9
- [Typography] Fix ownerState prop placement (#41903) @sai6855
- Generate typography tokens (#41703) @siriwatknp
- Move typography CSS variables to `font` (#42003) @siriwatknp
- Fix getOverlayAlpha type (#41995) @oliviertassinari
- Support CSS Extraction using codemod (#41935) @siriwatknp

### `@mui/icons-material@6.0.0-alpha.4`

- &#8203;<!-- 08 -->[icons] Update the icons package (#41937) @danilo-leal

### Docs

- [material-ui] Remove react-swipeable-views from demos as it's no longer maintained (#41912) @soler1212
- [material-ui] Add dark theme thumbnails for templates (#41947) @zanivan
- [material-ui] Remove links and interdependencies from free templates (#41941) @zanivan
- [material-ui] Add missing backticks to HTML tag in the installation page (#41972) @Miguelrom
- Fix 301 Toolpad links @oliviertassinari
- Fix 301 image redirections @oliviertassinari

### Core

- pnpm docs:zipRules && vale sync @oliviertassinari
- Remove @pigment-css/\* packages (#41965) @mnajdova
- [code-infra] Move the HighlightedCode component to @mui/docs (#41859) @Janpot
- [code-infra] Move the HighlightedCode component to @mui/docs (#41859) @Janpot
- [code-infra] Make Babel config path configurable in API docs builder (#41999) @michaldudak
- [docs-infra] Fix flex-shrink pro-plan (#41990) @oliviertassinari
- [docs-infra] Allow more value uses of MUI (#41706) @oliviertassinari
- [docs-infra] Move CPU to shared config (#41901) @oliviertassinari
- [docs-infra] Improve Twitter OG:image (#41860) @oliviertassinari
- [docs-infra] Adapt docs infra to Base UI docs needs (#41963) @michaldudak
- [docs-infra] Add demo container design refinements (#41948) @danilo-leal
- [docs-infra] Use the `getLayout` on the material demo pages (#41936) @alexfauquette
- [test] Update browser versions in karma config (#42008) @ZeeshanTamboli
- [website] Remove customer support agent role from website (#41969) @rluzists1
- [website] Fix grid usage and add stray improvements (#41930) @danilo-leal

All contributors of this release in alphabetical order: @alexfauquette, @danilo-leal, @gijsbotje, @Janpot, @lhilgert9, @michaldudak, @Miguelrom, @mnajdova, @oliviertassinari, @rluzists1, @sai6855, @siriwatknp, @soler1212, @zanivan, @ZeeshanTamboli

## v6.0.0-alpha.3

<!-- generated comparing v6.0.0-alpha.2..next -->
Expand Down
2 changes: 1 addition & 1 deletion apps/local-ui-lib/package.json
Expand Up @@ -3,6 +3,6 @@
"version": "0.0.1",
"private": true,
"dependencies": {
"@pigment-css/react": "file:../../packages/pigment-css-react"
"@pigment-css/react": "^0.0.9"
}
}
7 changes: 1 addition & 6 deletions apps/local-ui-lib/tsconfig.json
@@ -1,8 +1,3 @@
{
"extends": "../../tsconfig.json",
"references": [
{
"path": "../../packages/pigment-css-react"
}
]
"extends": "../../tsconfig.json"
}
2 changes: 1 addition & 1 deletion apps/pigment-css-next-app/README.md
Expand Up @@ -7,7 +7,7 @@ This is a Pigment CSS and [Next.js](https://nextjs.org/) project bootstrapped w
First, build all the packages in the workspace at least once. Run

```bash
pnpm build:zero
pnpm build
```

Then start the Next.js development server:
Expand Down
4 changes: 2 additions & 2 deletions apps/pigment-css-next-app/package.json
Expand Up @@ -9,7 +9,7 @@
"clean": "rimraf .next"
},
"dependencies": {
"@pigment-css/react": "workspace:^",
"@pigment-css/react": "^0.0.9",
"@mui/utils": "workspace:^",
"@mui/base": "workspace:^",
"@mui/lab": "workspace:^",
Expand All @@ -24,7 +24,7 @@
"next": "latest"
},
"devDependencies": {
"@pigment-css/nextjs-plugin": "workspace:^",
"@pigment-css/nextjs-plugin": "^0.0.9",
"@types/node": "^20.5.7",
"@types/react": "^18.2.55",
"@types/react-dom": "^18.2.19",
Expand Down
72 changes: 72 additions & 0 deletions apps/pigment-css-next-app/src/app/material-ui/icons/page.tsx
@@ -0,0 +1,72 @@
'use client';
import * as React from 'react';
import CreateSvgIcon from '../../../../../../docs/data/material/components/icons/CreateSvgIcon';
import FontAwesomeIcon from '../../../../../../docs/data/material/components/icons/FontAwesomeIcon';
import FontAwesomeIconSize from '../../../../../../docs/data/material/components/icons/FontAwesomeIconSize';
import FontAwesomeSvgIconDemo from '../../../../../../docs/data/material/components/icons/FontAwesomeSvgIconDemo';
import Icons from '../../../../../../docs/data/material/components/icons/Icons';
import SvgIconChildren from '../../../../../../docs/data/material/components/icons/SvgIconChildren';
import SvgIconsColor from '../../../../../../docs/data/material/components/icons/SvgIconsColor';
import SvgIconsSize from '../../../../../../docs/data/material/components/icons/SvgIconsSize';
import SvgMaterialIcons from '../../../../../../docs/data/material/components/icons/SvgMaterialIcons';

export default function IconsPage() {
return (
<React.Fragment>
<section>
<h2> Create Svg Icon</h2>
<div className="demo-container">
<CreateSvgIcon />
</div>
</section>
<section>
<h2> Font Awesome Icon</h2>
<div className="demo-container">
<FontAwesomeIcon />
</div>
</section>
<section>
<h2> Font Awesome Icon Size</h2>
<div className="demo-container">
<FontAwesomeIconSize />
</div>
</section>
<section>
<h2> Font Awesome Svg Icon Demo</h2>
<div className="demo-container">
<FontAwesomeSvgIconDemo />
</div>
</section>
<section>
<h2> Icons</h2>
<div className="demo-container">
<Icons />
</div>
</section>
<section>
<h2> Svg Icon Children</h2>
<div className="demo-container">
<SvgIconChildren />
</div>
</section>
<section>
<h2> Svg Icons Color</h2>
<div className="demo-container">
<SvgIconsColor />
</div>
</section>
<section>
<h2> Svg Icons Size</h2>
<div className="demo-container">
<SvgIconsSize />
</div>
</section>
<section>
<h2> Svg Material Icons</h2>
<div className="demo-container">
<SvgMaterialIcons />
</div>
</section>
</React.Fragment>
);
}
3 changes: 0 additions & 3 deletions apps/pigment-css-next-app/tsconfig.json
Expand Up @@ -33,9 +33,6 @@
},
{
"path": "../../packages/mui-material/tsconfig.build.json"
},
{
"path": "../../packages/pigment-css-react/tsconfig.json"
}
]
}
7 changes: 1 addition & 6 deletions apps/pigment-css-vite-app/README.md
Expand Up @@ -5,12 +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:

1. `@pigment-css/react`
2. `@pigment-css/vite-plugin`

Make sure to run `pnpm release:build` at least once because the project uses the `@mui/material` and `@mui/system` packages. On subsequent runs, you can build only the above packages using:
First, build all the packages in the workspace at least once. Run

```bash
pnpm build
Expand Down
4 changes: 2 additions & 2 deletions apps/pigment-css-vite-app/package.json
Expand Up @@ -9,7 +9,7 @@
"build": "vite build"
},
"dependencies": {
"@pigment-css/react": "workspace:^",
"@pigment-css/react": "^0.0.9",
"@mui/utils": "workspace:^",
"@mui/base": "workspace:^",
"@mui/lab": "workspace:^",
Expand All @@ -27,7 +27,7 @@
"devDependencies": {
"@babel/preset-react": "^7.24.1",
"@babel/preset-typescript": "^7.24.1",
"@pigment-css/vite-plugin": "workspace:^",
"@pigment-css/vite-plugin": "^0.0.9",
"@types/react": "^18.2.55",
"@types/react-dom": "^18.2.19",
"@vitejs/plugin-react": "^4.2.1",
Expand Down
73 changes: 73 additions & 0 deletions apps/pigment-css-vite-app/src/pages/material-ui/icons.tsx
@@ -0,0 +1,73 @@
import * as React from 'react';
import MaterialUILayout from '../../Layout';
import CreateSvgIcon from '../../../../../docs/data/material/components/icons/CreateSvgIcon.tsx';
import FontAwesomeIcon from '../../../../../docs/data/material/components/icons/FontAwesomeIcon.tsx';
import FontAwesomeIconSize from '../../../../../docs/data/material/components/icons/FontAwesomeIconSize.tsx';
import FontAwesomeSvgIconDemo from '../../../../../docs/data/material/components/icons/FontAwesomeSvgIconDemo.tsx';
import Icons from '../../../../../docs/data/material/components/icons/Icons.tsx';
import SvgIconChildren from '../../../../../docs/data/material/components/icons/SvgIconChildren.tsx';
import SvgIconsColor from '../../../../../docs/data/material/components/icons/SvgIconsColor.tsx';
import SvgIconsSize from '../../../../../docs/data/material/components/icons/SvgIconsSize.tsx';
import SvgMaterialIcons from '../../../../../docs/data/material/components/icons/SvgMaterialIcons.tsx';

export default function IconsPage() {
return (
<MaterialUILayout>
<h1>Icons</h1>
<section>
<h2> Create Svg Icon</h2>
<div className="demo-container">
<CreateSvgIcon />
</div>
</section>
<section>
<h2> Font Awesome Icon</h2>
<div className="demo-container">
<FontAwesomeIcon />
</div>
</section>
<section>
<h2> Font Awesome Icon Size</h2>
<div className="demo-container">
<FontAwesomeIconSize />
</div>
</section>
<section>
<h2> Font Awesome Svg Icon Demo</h2>
<div className="demo-container">
<FontAwesomeSvgIconDemo />
</div>
</section>
<section>
<h2> Icons</h2>
<div className="demo-container">
<Icons />
</div>
</section>
<section>
<h2> Svg Icon Children</h2>
<div className="demo-container">
<SvgIconChildren />
</div>
</section>
<section>
<h2> Svg Icons Color</h2>
<div className="demo-container">
<SvgIconsColor />
</div>
</section>
<section>
<h2> Svg Icons Size</h2>
<div className="demo-container">
<SvgIconsSize />
</div>
</section>
<section>
<h2> Svg Material Icons</h2>
<div className="demo-container">
<SvgMaterialIcons />
</div>
</section>
</MaterialUILayout>
);
}
3 changes: 0 additions & 3 deletions apps/pigment-css-vite-app/tsconfig.json
Expand Up @@ -13,9 +13,6 @@
},
{
"path": "../../packages/mui-material/tsconfig.build.json"
},
{
"path": "../../packages/pigment-css-react/tsconfig.json"
}
]
}
1 change: 0 additions & 1 deletion babel.config.js
Expand Up @@ -31,7 +31,6 @@ module.exports = function getBabelConfig(api) {
'@mui/base': resolveAliasPath('./packages/mui-base/src'),
'@mui/utils': resolveAliasPath('./packages/mui-utils/src'),
'@mui/joy': resolveAliasPath('./packages/mui-joy/src'),
'@pigment-css/react': resolveAliasPath('./packages/pigment-css-react/src'),
'@mui/internal-docs-utils': resolveAliasPath('./packages-internal/docs-utils/src'),
docs: resolveAliasPath('./docs'),
test: resolveAliasPath('./test'),
Expand Down
Expand Up @@ -108,7 +108,7 @@ Fontsource can be configured to load specific subsets, weights and styles. Mater

### Google Web Fonts

To install Roboto through the Google Web Fonts CDN, add the following code inside your project's <head /> tag:
To install Roboto through the Google Web Fonts CDN, add the following code inside your project's `<head />` tag:

```html
<link rel="preconnect" href="https://fonts.googleapis.com" />
Expand Down
18 changes: 16 additions & 2 deletions docs/pages/_document.js
Expand Up @@ -119,15 +119,29 @@ export default class MyDocument extends Document {
// use https://cssminifier.com/ to minify
// eslint-disable-next-line react/no-danger
dangerouslySetInnerHTML={{
__html: `@font-face{font-family:'General Sans';src:url(/static/fonts/GeneralSans-Regular.woff2) format('woff2'),url(/static/fonts/GeneralSans-Regular.ttf) format('truetype');font-weight:400;font-style:normal;font-display:swap;}@font-face{font-family:'General Sans';src:url(/static/fonts/GeneralSans-Medium.woff2) format('woff2'),url(/static/fonts/GeneralSans-Medium.ttf) format('truetype');font-weight:500;font-style:normal;font-display:swap;}@font-face{font-family:'General Sans';src:url(/static/fonts/GeneralSans-SemiBold.woff2) format('woff2'),url(/static/fonts/GeneralSans-SemiBold.ttf) format('truetype');font-weight:600;font-style:normal;font-display:swap;}@font-face{font-family:'General Sans';src:url(/static/fonts/GeneralSans-Bold.woff2) format('woff2'),url(/static/fonts/GeneralSans-Bold.ttf) format('truetype');font-weight:700;font-style:normal;font-display:swap;}`,
__html: `
@font-face{font-family:'General Sans';src:url(/static/fonts/GeneralSans-Regular.woff2) format('woff2'),url(/static/fonts/GeneralSans-Regular.ttf) format('truetype');font-weight:400;font-style:normal;font-display:swap;}
@font-face{font-family:'General Sans';src:url(/static/fonts/GeneralSans-Medium.woff2) format('woff2'),url(/static/fonts/GeneralSans-Medium.ttf) format('truetype');font-weight:500;font-style:normal;font-display:swap;}
@font-face{font-family:'General Sans';src:url(/static/fonts/GeneralSans-SemiBold.woff2) format('woff2'),url(/static/fonts/GeneralSans-SemiBold.ttf) format('truetype');font-weight:600;font-style:normal;font-display:swap;}
@font-face{font-family:'General Sans';src:url(/static/fonts/GeneralSans-Bold.woff2) format('woff2'),url(/static/fonts/GeneralSans-Bold.ttf) format('truetype');font-weight:700;font-style:normal;font-display:swap;}`,
}}
/>
<style
// Loads IBM Plex Sans: 400,500,700 & IBM Plex Mono: 400, 600
// use https://cssminifier.com/ to minify
// eslint-disable-next-line react/no-danger
dangerouslySetInnerHTML={{
__html: `@font-face{font-family:'IBM Plex Sans';src:url(/static/fonts/IBMPlexSans-Regular.woff2) format('woff2'),url(/static/fonts/IBMPlexSans-Regular.woff) format('woff'),url(/static/fonts/IBMPlexSans-Regular.ttf) format('truetype');font-weight:400;font-style:normal;font-display:swap}@font-face{font-family:'IBM Plex Sans';src:url(/static/fonts/IBMPlexSans-Medium.woff2) format('woff2'),url(/static/fonts/IBMPlexSans-Medium.woff) format('woff'),url(/static/fonts/IBMPlexSans-Medium.ttf) format('truetype');font-weight:500;font-style:normal;font-display:swap}@font-face{font-family:'IBM Plex Sans';src:url(/static/fonts/IBMPlexSans-SemiBold.woff2) format('woff2'),url(/static/fonts/IBMPlexSans-SemiBold.woff) format('woff'),url(/static/fonts/IBMPlexSans-SemiBold.ttf) format('truetype');font-weight:600;font-style:normal;font-display:swap}@font-face{font-family:'IBM Plex Sans';src:url(/static/fonts/IBMPlexSans-Bold.woff2) format('woff2'),url(/static/fonts/IBMPlexSans-Bold.woff) format('woff'),url(/static/fonts/IBMPlexSans-Bold.ttf) format('truetype');font-weight:700;font-style:normal;font-display:swap}`,
__html: `
@font-face{font-family:'IBM Plex Sans';src:url(/static/fonts/IBMPlexSans-Regular.woff2) format('woff2'),url(/static/fonts/IBMPlexSans-Regular.woff) format('woff'),url(/static/fonts/IBMPlexSans-Regular.ttf) format('truetype');font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:'IBM Plex Sans';src:url(/static/fonts/IBMPlexSans-Medium.woff2) format('woff2'),url(/static/fonts/IBMPlexSans-Medium.woff) format('woff'),url(/static/fonts/IBMPlexSans-Medium.ttf) format('truetype');font-weight:500;font-style:normal;font-display:swap}
@font-face{font-family:'IBM Plex Sans';src:url(/static/fonts/IBMPlexSans-SemiBold.woff2) format('woff2'),url(/static/fonts/IBMPlexSans-SemiBold.woff) format('woff'),url(/static/fonts/IBMPlexSans-SemiBold.ttf) format('truetype');font-weight:600;font-style:normal;font-display:swap}
@font-face{font-family:'IBM Plex Sans';src:url(/static/fonts/IBMPlexSans-Bold.woff2) format('woff2'),url(/static/fonts/IBMPlexSans-Bold.woff) format('woff'),url(/static/fonts/IBMPlexSans-Bold.ttf) format('truetype');font-weight:700;font-style:normal;font-display:swap}`,
}}
/>
<GlobalStyles
Expand Down
2 changes: 0 additions & 2 deletions docs/pages/experiments/docs/DemoInDocs.js
Expand Up @@ -5,8 +5,6 @@ import Stack from '@mui/material/Stack';
export default function DemoInDocs() {
return (
<Stack sx={{ width: '100%' }} spacing={2}>
<Alert severity="error">This is an error alert — check it out!</Alert>
<Alert severity="warning">This is a warning alert — check it out!</Alert>
<Alert severity="info">This is an info alert — check it out!</Alert>
<Alert severity="success">This is a success alert — check it out!</Alert>
</Stack>
Expand Down
2 changes: 0 additions & 2 deletions docs/pages/experiments/docs/DemoInDocs.tsx.preview
@@ -1,4 +1,2 @@
<Alert severity="error">This is an error alert — check it out!</Alert>
<Alert severity="warning">This is a warning alert — check it out!</Alert>
<Alert severity="info">This is an info alert — check it out!</Alert>
<Alert severity="success">This is a success alert — check it out!</Alert>
12 changes: 12 additions & 0 deletions docs/pages/experiments/docs/DemoInDocsNotEditable.js
@@ -0,0 +1,12 @@
import * as React from 'react';
import Alert from '@mui/material/Alert';
import Stack from '@mui/material/Stack';

export default function DemoInDocs() {
return (
<Stack sx={{ width: '100%' }} spacing={2}>
<Alert severity="info">This is an info alert — check it out!</Alert>
<Alert severity="success">This is a success alert — check it out!</Alert>
</Stack>
);
}
2 changes: 2 additions & 0 deletions docs/pages/experiments/docs/DemoInDocsNotEditable.tsx.preview
@@ -0,0 +1,2 @@
<Alert severity="info">This is an info alert — check it out!</Alert>
<Alert severity="success">This is a success alert — check it out!</Alert>

0 comments on commit d2b063c

Please sign in to comment.