Skip to content

Commit

Permalink
Merge branch 'master' into alert-v6-deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
DiegoAndai committed Feb 15, 2024
2 parents f8663dc + f9b141f commit 8e41e7f
Show file tree
Hide file tree
Showing 411 changed files with 4,378 additions and 1,778 deletions.
2 changes: 0 additions & 2 deletions .codesandbox/ci.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@
"@mui-internal/typescript-to-proptypes": "packages/typescript-to-proptypes"
},
"sandboxes": [
"material-ui-issue-latest-s2dsx",
"/examples/material-ui-cra",
"/examples/material-ui-cra-ts",
"/examples/joy-ui-cra-ts",
"/examples/base-ui-cra-ts"
Expand Down
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
/packages/zero-runtime/processors/
/packages/zero-runtime/exports/
/packages/zero-runtime/theme/
/packages/zero-runtime/tests/fixtures/
/packages/zero-next-plugin/loader.js
# Ignore fixtures
/packages/typescript-to-proptypes/test/*/*
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- name: Set up pnpm
uses: pnpm/action-setup@d882d12c64e032187b2edb46d3a0d003b7a43598 # v2.4.0
- name: Use Node.js 18.x
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: 18
cache: 'pnpm' # https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md#caching-packages-dependencies
Expand Down
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@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@b7bf0a3ed3ecfa44160715d7c442788f65f0f923 # v3.23.2
uses: github/codeql-action/init@e8893c57a1f3a2b659b6b55564fdfdbbd2982911 # v3.24.0
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@b7bf0a3ed3ecfa44160715d7c442788f65f0f923 # v3.23.2
uses: github/codeql-action/analyze@e8893c57a1f3a2b659b6b55564fdfdbbd2982911 # v3.24.0
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@b7bf0a3ed3ecfa44160715d7c442788f65f0f923 # v3.23.2
uses: github/codeql-action/upload-sarif@e8893c57a1f3a2b659b6b55564fdfdbbd2982911 # v3.24.0
with:
sarif_file: results.sarif
2 changes: 1 addition & 1 deletion .github/workflows/vale-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
pull-requests: write
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: errata-ai/vale-action@c4213d4de3d5f718b8497bd86161531c78992084 # v2.0.1
- uses: errata-ai/vale-action@38bf078c328061f59879b347ca344a718a736018 # v2.1.0
continue-on-error: true
with:
reporter: github-pr-review
Expand Down
48 changes: 48 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,53 @@
# [Versions](https://mui.com/versions/)

## v5.15.10

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

_Feb 12, 2024_

A big thanks to the 8 contributors who made this release possible.
This release was mostly about 🐛 bug fixes and 📚 documentation improvements.

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

- [Avatar] Add props deprecation with a codemod (#40853) @siriwatknp

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

- [Button] Fix `disabled` prop priority when inside button group (#41000) @Smileek
- [IconButton] Support loading prop (#40949) @Smileek

### Docs

- [Button][material-ui] Fix 'File upload' demo a11y (#40943) @oliviertassinari
- [TableRow][material-ui] Escape markup in `children` prop so docgen tools don't parse it as HTML (#40992) @millerized
- [material-ui] Remove outdated example projects link (it uses Joy UI now) (#40913) @oliviertassinari
- [material-ui] Fix the "Intro to the MUI ecosystem" link placement (#40988) @danilo-leal
- Fix 301 redirection to StackBlitz @oliviertassinari
- Fix h1 on Joy UI templates @oliviertassinari
- Have MUI workspace own the CodeSandbox @oliviertassinari
- Add notification for mui x v7 beta (#41001) @joserodolfofreitas
- Fix 301 links @oliviertassinari
- Fix Next.js v13.5.1 <title> SEO regression (#40302) @oliviertassinari
- Add a 404 page (#40884) @danilo-leal
- Fix missing GitHub label when opening new issue @oliviertassinari
- [Stack] Update import statement for Stack component (#41032) @sai6855

### Core

- [blog] Add post about upcoming plans for Base UI (#40882) @danilo-leal
- [core] Simplify CodeSandbox reproduction @oliviertassinari
- [core] Missing redirection @oliviertassinari
- [core] Export functions from `copyFiles` script to reuse in MUI X repo (#40970) @cherniavskii
- [core] Avoid variable shorthands @oliviertassinari
- [docs-infra] Fix search icon issue (#40957) @oliviertassinari
- [docs-infra] Ignore classes tagged with `@ignore` (#41009) @cherniavskii
- [docs-infra] Fix selected tab on codeblocks (#41036) @danilo-leal
- [website] Polish Customer Support Agent role @oliviertassinari

All contributors of this release in alphabetical order: @cherniavskii, @danilo-leal, @joserodolfofreitas, @millerized, @oliviertassinari, @sai6855, @siriwatknp, @Smileek

## v5.15.9<!-- generated comparing v5.15.8..master -->

_Feb 8, 2024_
Expand Down
87 changes: 76 additions & 11 deletions apps/zero-runtime-next-app/next.config.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,89 @@
/* eslint-env node */
// eslint-ignore-next-line import/no-unresolved
const { withZeroPlugin } = require('@mui/zero-next-plugin');
const { experimental_extendTheme: extendTheme } = require('@mui/material/styles');
const { extendTheme } = require('@mui/zero-runtime');

/**
* @typedef {import('@mui/zero-next-plugin').ZeroPluginConfig} ZeroPluginConfig
*/

const theme = extendTheme({
cssVarPrefix: 'app',
components: {
MuiBadge: {
defaultProps: {
color: 'error',
'max-width': '1100px',
'border-radius': '12px',
'font-mono': `ui-monospace, Menlo, Monaco, 'Cascadia Mono', 'Segoe UI Mono', 'Roboto Mono', 'Oxygen Mono', 'Ubuntu Monospace', 'Source Code Pro', 'Fira Mono', 'Droid Sans Mono', 'Courier New', monospace`,
colorSchemes: {
light: {
'foreground-rgb': '0, 0, 0',
'background-start-rgb': '214, 219, 220',
'background-end-rgb': '255, 255, 255',
'primary-glow': `conic-gradient(
from 180deg at 50% 50%,
#16abff33 0deg,
#0885ff33 55deg,
#54d6ff33 120deg,
#0071ff33 160deg,
transparent 360deg
)`,
'secondary-glow': `radial-gradient(rgba(255, 255, 255, 1), rgba(255, 255, 255, 0))`,
title: {
'start-rbg': '239, 245, 249',
'end-rgb': '228, 232, 233',
border: `conic-gradient(
#00000080,
#00000040,
#00000030,
#00000020,
#00000010,
#00000010,
#00000080
)`,
},
callout: {
rgb: '238, 240, 241',
'border-rgb': '172, 175, 176',
},
card: {
rgb: '180, 185, 188',
'border-rgb': '131, 134, 135',
},
},
dark: {
'foreground-rgb': '255, 255, 255',
'background-start-rgb': '0, 0, 0',
'background-end-rgb': '0, 0, 0',
'primary-glow': `radial-gradient(rgba(1, 65, 255, 0.4), rgba(1, 65, 255, 0))`,
'secondary-glow': `linear-gradient(
to bottom right,
rgba(1, 65, 255, 0),
rgba(1, 65, 255, 0),
rgba(1, 65, 255, 0.3)
)`,
title: {
'start-rbg': '2, 13, 46',
'end-rgb': '2, 5, 19',
border: `conic-gradient(
#ffffff80,
#ffffff40,
#ffffff30,
#ffffff20,
#ffffff10,
#ffffff10,
#ffffff80
)`,
},
callout: {
rgb: '20, 20, 20',
'border-rgb': '108, 108, 108',
},
card: {
rgb: '100, 100, 100',
'border-rgb': '200, 200, 200',
},
},
},
});
theme.getColorSchemeSelector = (targetColorScheme) =>
`[data-mui-color-scheme="${targetColorScheme}"] &`;

/**
* @typedef {import('@mui/zero-next-plugin').ZeroPluginConfig} ZeroPluginConfig
*/
// { [theme.getColorSchemeSelector('dark')]: { color: 'black' } }

/**
* @type {ZeroPluginConfig}
Expand Down
2 changes: 1 addition & 1 deletion apps/zero-runtime-next-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@mui/zero-next-plugin": "workspace:^",
"@types/node": "^20.5.7",
"@types/react": "^18.2.55",
"@types/react-dom": "^18.2.18",
"@types/react-dom": "^18.2.19",
"eslint": "^8.56.0",
"typescript": "^5.3.3"
}
Expand Down
72 changes: 0 additions & 72 deletions apps/zero-runtime-next-app/src/app/globals.css
Original file line number Diff line number Diff line change
@@ -1,75 +1,3 @@
:root {
--max-width: 1100px;
--border-radius: 12px;
--font-mono: ui-monospace, Menlo, Monaco, 'Cascadia Mono', 'Segoe UI Mono', 'Roboto Mono',
'Oxygen Mono', 'Ubuntu Monospace', 'Source Code Pro', 'Fira Mono', 'Droid Sans Mono',
'Courier New', monospace;

--foreground-rgb: 0, 0, 0;
--background-start-rgb: 214, 219, 220;
--background-end-rgb: 255, 255, 255;

--primary-glow: conic-gradient(
from 180deg at 50% 50%,
#16abff33 0deg,
#0885ff33 55deg,
#54d6ff33 120deg,
#0071ff33 160deg,
transparent 360deg
);
--secondary-glow: radial-gradient(rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));

--tile-start-rgb: 239, 245, 249;
--tile-end-rgb: 228, 232, 233;
--tile-border: conic-gradient(
#00000080,
#00000040,
#00000030,
#00000020,
#00000010,
#00000010,
#00000080
);

--callout-rgb: 238, 240, 241;
--callout-border-rgb: 172, 175, 176;
--card-rgb: 180, 185, 188;
--card-border-rgb: 131, 134, 135;
}

@media (prefers-color-scheme: dark) {
:root {
--foreground-rgb: 255, 255, 255;
--background-start-rgb: 0, 0, 0;
--background-end-rgb: 0, 0, 0;

--primary-glow: radial-gradient(rgba(1, 65, 255, 0.4), rgba(1, 65, 255, 0));
--secondary-glow: linear-gradient(
to bottom right,
rgba(1, 65, 255, 0),
rgba(1, 65, 255, 0),
rgba(1, 65, 255, 0.3)
);

--tile-start-rgb: 2, 13, 46;
--tile-end-rgb: 2, 5, 19;
--tile-border: conic-gradient(
#ffffff80,
#ffffff40,
#ffffff30,
#ffffff20,
#ffffff10,
#ffffff10,
#ffffff80
);

--callout-rgb: 20, 20, 20;
--callout-border-rgb: 108, 108, 108;
--card-rgb: 100, 100, 100;
--card-border-rgb: 200, 200, 200;
}
}

* {
box-sizing: border-box;
padding: 0;
Expand Down
28 changes: 20 additions & 8 deletions apps/zero-runtime-next-app/src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,32 @@
import Image from 'next/image';
import { styled } from '@mui/zero-runtime';
import Badge from '@mui/material/Badge';
import { styled, css } from '@mui/zero-runtime';
import styles from './page.module.css';

const Main = styled.main({
color: 'rgb(var(--foreground-rgb))',
const visuallyHidden = css({
border: 0,
clip: 'rect(0 0 0 0)',
height: '1px',
margin: -1,
overflow: 'hidden',
padding: 0,
position: 'absolute',
whiteSpace: 'nowrap',
width: '1px',
});

const Main = styled.main(({ theme }) => ({
color: theme.vars['foreground-rgb'],
background: `linear-gradient(to bottom, transparent, rgb(var(--background-end-rgb))) rgb(var(--background-start-rgb))`,
display: 'flex',
flexDirection: 'column',
justifyContent: 'space-between',
alignItems: 'center',
padding: '6rem',
minHeight: '100vh',
});
...theme.applyStyles('dark', {
color: 'yellow',
}),
}));

const Description = styled.div({
display: 'inherit',
Expand Down Expand Up @@ -78,9 +92,7 @@ const Description = styled.div({
export default function Home() {
return (
<Main>
<Badge variant="dot">
<div>Hey</div>
</Badge>
<div className={visuallyHidden}>I am invisible</div>
<Description>
<p>
Get started by editing&nbsp;
Expand Down
38 changes: 29 additions & 9 deletions apps/zero-runtime-next-app/src/augment.d.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,34 @@
import type { Theme } from '@mui/material/styles';
import type {} from '@mui/material/themeCssVarsAugmentation';
import '@mui/zero-runtime/theme';
import type { ExtendTheme } from '@mui/zero-runtime';

declare module '@mui/zero-runtime/theme' {
export interface ThemeArgs {
theme: Omit<Theme, 'applyStyles'> & {
applyStyles: (
colorScheme: 'light' | 'dark',
styles: Record<string, any>,
) => Record<string, any>;
interface ThemeTokens {
'max-width': string;
'border-radius': string;
'font-mono': string;
'foreground-rgb': string;
'background-start-rgb': string;
'background-end-rgb': string;
'primary-glow': string;
'secondary-glow': string;
title: {
'start-rgb': string;
'end-rgb': string;
border: string;
};
callout: {
rgb: string;
'border-rgb': string;
};
card: {
rgb: string;
'border-rgb': string;
};
}

interface ThemeArgs {
theme: ExtendTheme<{
colorScheme: 'light' | 'dark';
tokens: ThemeTokens;
}>;
}
}
Loading

0 comments on commit 8e41e7f

Please sign in to comment.