Skip to content

Commit

Permalink
Merge branch 'master' into revise-material-ui-breakpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
danilo-leal committed Mar 8, 2024
2 parents d9fa053 + faf4cb7 commit f86ccfb
Show file tree
Hide file tree
Showing 105 changed files with 1,829 additions and 331 deletions.
1 change: 1 addition & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,7 @@ jobs:
name: Test umd release
command: pnpm test:umd
test_e2e_website:
# NOTE: This workflow runs after successful docs deploy. See /test/e2e-website/README.md#ci
<<: *defaults
docker:
- image: mcr.microsoft.com/playwright:v1.42.1-focal
Expand Down
2 changes: 2 additions & 0 deletions .codesandbox/ci.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"packages/mui-base",
"packages/mui-codemod",
"packages/mui-core-downloads-tracker",
"packages/mui-docs",
"packages/mui-icons-material",
"packages/mui-joy",
"packages/mui-lab",
Expand All @@ -28,6 +29,7 @@
"@mui/base": "packages/mui-base/build",
"@mui/codemod": "packages/mui-codemod/build",
"@mui/core-downloads-tracker": "packages/mui-core-downloads-tracker/build",
"@mui/docs": "packages/mui-docs/build",
"@mui/icons-material": "packages/mui-icons-material/build",
"@mui/internal-babel-macros": "packages/mui-babel-macros",
"@mui/internal-markdown": "packages/markdown",
Expand Down
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
/packages/pigment-react/processors/
/packages/pigment-react/exports/
/packages/pigment-react/theme/
/packages/pigment-react/tests/fixtures/
/packages/pigment-react/tests/**/fixtures
/packages/pigment-nextjs-plugin/loader.js
# Ignore fixtures
/packages-internal/scripts/typescript-to-proptypes/test/*/*
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ _Mar 5, 2024_
A big thanks to the 21 contributors who made this release possible.
This release was mostly about 🐛 bug fixes and 📚 documentation improvements.

### `@pigment-css/[email protected]`, `@pigment-css/[email protected]`, `@pigment-css/[email protected]`, & `@pigment-css/[email protected]`

- This is the first public release of our new zero-runtime CSS-in-JS library, Pigment CSS.

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

- &#8203;<!-- 52 -->Support props callback type in theme variants (#40946) @ZeeshanTamboli
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default function TransitionComponentSnackbar() {
const [exited, setExited] = React.useState(true);
const nodeRef = React.useRef(null);

const handleClose = (_: any, reason: SnackbarCloseReason) => {
const handleClose = (_: any, reason?: SnackbarCloseReason) => {
if (reason === 'clickaway') {
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default function UnstyledSnackbarIntroduction() {
const [exited, setExited] = React.useState(true);
const nodeRef = React.useRef(null);

const handleClose = (_: any, reason: SnackbarCloseReason) => {
const handleClose = (_: any, reason?: SnackbarCloseReason) => {
if (reason === 'clickaway') {
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default function UnstyledSnackbarIntroduction() {
const [exited, setExited] = React.useState(true);
const nodeRef = React.useRef(null);

const handleClose = (_: any, reason: SnackbarCloseReason) => {
const handleClose = (_: any, reason?: SnackbarCloseReason) => {
if (reason === 'clickaway') {
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default function UnstyledSnackbarIntroduction() {
const [exited, setExited] = React.useState(true);
const nodeRef = React.useRef(null);

const handleClose = (_: any, reason: SnackbarCloseReason) => {
const handleClose = (_: any, reason?: SnackbarCloseReason) => {
if (reason === 'clickaway') {
return;
}
Expand Down
13 changes: 8 additions & 5 deletions docs/data/joy/integrations/icon-libraries/IconFontSizes.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
import * as React from 'react';
import { useTheme } from '@mui/joy/styles';
import Stack from '@mui/joy/Stack';
import Person from '@mui/icons-material/Person';

export default function IconFontSizes() {
const theme = useTheme();
return (
<Stack
spacing={2}
direction="row"
sx={{ gridColumn: '1 / -1', alignItems: 'center', justifyContent: 'center' }}
>
{Object.keys(theme.fontSize).map((size) => (
<Person key={size} fontSize={size} />
))}
<Person fontSize="xs" />
<Person fontSize="sm" />
<Person fontSize="md" />
<Person fontSize="lg" />
<Person fontSize="xl" />
<Person fontSize="xl2" />
<Person fontSize="xl3" />
<Person fontSize="xl4" />
</Stack>
);
}
13 changes: 8 additions & 5 deletions docs/data/joy/integrations/icon-libraries/IconFontSizes.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
import * as React from 'react';
import { useTheme } from '@mui/joy/styles';
import Stack from '@mui/joy/Stack';
import Person from '@mui/icons-material/Person';

export default function IconFontSizes() {
const theme = useTheme();
return (
<Stack
spacing={2}
direction="row"
sx={{ gridColumn: '1 / -1', alignItems: 'center', justifyContent: 'center' }}
>
{Object.keys(theme.fontSize).map((size) => (
<Person key={size} fontSize={size} />
))}
<Person fontSize="xs" />
<Person fontSize="sm" />
<Person fontSize="md" />
<Person fontSize="lg" />
<Person fontSize="xl" />
<Person fontSize="xl2" />
<Person fontSize="xl3" />
<Person fontSize="xl4" />
</Stack>
);
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
{Object.keys(theme.fontSize).map((size) => (
<Person key={size} fontSize={size} />
))}
<Person fontSize="xs" />
<Person fontSize="sm" />
<Person fontSize="md" />
<Person fontSize="lg" />
<Person fontSize="xl" />
<Person fontSize="xl2" />
<Person fontSize="xl3" />
<Person fontSize="xl4" />
8 changes: 4 additions & 4 deletions docs/notifications.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
[
{
"id": 68,
"title": "<b>Check out Base UI today</b> 💥",
"title": "Check out Base UI today 💥",
"text": "Love Material UI, but don't need Material Design? Try Base UI, the new \"unstyled\" alternative. <a style=\"color: inherit;\" data-ga-event-category=\"Blog\" data-ga-event-action=\"notification\" data-ga-event-label=\"introducing-base-ui\" href=\"/blog/introducing-base-ui/\">Read more in this announcement</a>."
},
{
"id": 78,
"title": "<b>MUI X v6.18.x and the latest improvements before the next major</b>",
"title": "MUI X v6.18.x and the latest improvements before the next major",
"text": "New stable components, polished features, better performance and more. Check out the details in our <a style=\"color: inherit;\" data-ga-event-category=\"Announcement\" data-ga-event-action=\"notification\" data-ga-event-label=\"mui-x-end-v6\" href=\"https://mui.com/blog/mui-x-end-v6-features/\">recent blog post</a>."
},
{
"id": 79,
"title": "<b>A new Developer Survey is open</b>",
"title": "A new Developer Survey is open",
"text": "Take a few minutes to share your feedback and expectations in the <a style=\"color: inherit;\" data-ga-event-category=\"Announcement\" data-ga-event-action=\"notification\" data-ga-event-label=\"mui-survey\" href=\"https://tally.so/r/3Ex4PN?source=docs-notification\">Developer Survey</a>."
},
{
"id": 80,
"title": "<b>MUI X v7.0.0-beta.0</b>",
"title": "MUI X v7.0.0-beta.0",
"text": "Featuring new components and multiple enhancements for both developers and end-users. Discover all the specifics in the <a style=\"color: inherit;\" data-ga-event-category=\"Announcement\" data-ga-event-action=\"notification\" data-ga-event-label=\"mui-x-v7-beta\" href=\"https://mui.com/blog/mui-x-v7-beta/\">announcement blog post</a>."
}
]
8 changes: 3 additions & 5 deletions docs/pages/blog/base-ui-2024-plans.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ card: true
The [story of Base UI](/blog/introducing-base-ui/) began several years ago—long before headless React component libraries skyrocketed in popularity—when we started to imagine a world in which Material UI could exist without Material Design.

We're super excited to share that this dream is becoming a reality!
This year will see a lot of investment in Base UI as we expand the team ([we're hiring!](/careers/staff-ui-engineer-base-ui/)) and focus hard on a stable release (tentatively planned for late 2024), which will come full of new components, features, and improvements.
This year will see a lot of investment in Base UI as we expand the team and focus hard on a stable release (tentatively planned for late 2024), which will come full of new components, features, and improvements.

Let's walk through some of the things we're cooking up.

Expand Down Expand Up @@ -97,11 +97,9 @@ To acknowledge that Base UI has the potential to outgrow Material UI, we plan
The new repository is live-[check it out on GitHub](https://github.com/mui/base-ui)!
:::

## Join us on the ride
## Help us on the ride

If you're passionate about extending the web platform with powerful, accessible, unstyled components, [we're hiring UI Engineers](/careers/staff-ui-engineer-base-ui/) to work on the Base UI team and help us accelerate its growth.

Lastly, we'd love to hear your feedback.
We'd love to hear your feedback.
The best place to share your ideas and requests is in [the GitHub repository](https://github.com/mui/base-ui/issues).
Check out the existing issues and add your thoughts, and feel free to open your own issue if you don't see your concerns addressed elsewhere.

Expand Down
6 changes: 0 additions & 6 deletions docs/pages/careers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,6 @@ const openRolesData = [
// 'You will strengthen the MUI X product, build ambitious and complex new features, work on strategic problems, and help grow adoption.',
// url: '/careers/react-engineer-x/',
// },
{
title: 'Staff UI Engineer — Base UI',
description:
'Research, build, document, and ship high-quality, unstyled UI components with a focus on a11y.',
url: '/careers/staff-ui-engineer-base-ui/',
},
],
},
{
Expand Down
4 changes: 2 additions & 2 deletions docs/pages/experiments/base/components-gallery.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ export default function ComponentsGallery() {
const [exited, setExited] = React.useState(true);
const nodeRef = React.useRef(null);

const handleClose = (_: any, reason: SnackbarCloseReason) => {
const handleClose = (_: any, reason?: SnackbarCloseReason) => {
if (reason === 'clickaway') {
return;
}
Expand Down Expand Up @@ -208,7 +208,7 @@ export default function ComponentsGallery() {
setCopySnackbarOpen(true);
}

const handleCopyClose = (_: any, reason: SnackbarCloseReason) => {
const handleCopyClose = (_: any, reason?: SnackbarCloseReason) => {
if (reason === 'clickaway') {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion docs/src/components/productBaseUI/BaseUIThemesDemo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,7 @@ export default function BaseUIThemesDemo() {
// Snackbar
const [openSnackbar, setOpenSnackbar] = React.useState(false);

const handleCloseSnackbar = (_: any, reason: SnackbarCloseReason) => {
const handleCloseSnackbar = (_: any, reason?: SnackbarCloseReason) => {
if (reason === 'clickaway') {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion docs/src/components/showcase/TaskCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default function TaskCard() {
</Typography>
</Box>
<Box sx={{ my: 'auto' }}>
<CodeRounded color="white" />
<CodeRounded />
<Typography fontSize={18} component="div" fontWeight="semiBold" sx={{ lineHeight: 1.4 }}>
Customize every button and chip instance primary color
</Typography>
Expand Down
16 changes: 16 additions & 0 deletions docs/src/modules/brandingTheme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,22 @@ declare module '@mui/material/Chip' {
}
}

declare module '@mui/material/SvgIcon' {
interface SvgIconPropsColorOverrides {
danger: true;
}
interface SvgIconPropsSizeOverrides {
xs: true;
sm: true;
md: true;
lg: true;
xl: true;
xl2: true;
xl3: true;
xl4: true;
}
}

// TODO: enable this once types conflict is fixed
// declare module '@mui/material/Button' {
// interface ButtonPropsVariantOverrides {
Expand Down
4 changes: 2 additions & 2 deletions docs/src/modules/components/ApiPage/table/ClassesTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,13 @@ export default function ClassesTable(props: ClassesTableProps) {

return (
<tr key={className} id={getHash({ componentName, className: key })}>
<td>
<td className="algolia-lvl3">
<span className="class-name">.{className}</span>
</td>
{displayClassKeys && (
<td>{!isGlobal && <span className="class-key">{key}</span>}</td>
)}
<td>
<td className="algolia-content">
<span
dangerouslySetInnerHTML={{
__html: description || '',
Expand Down
4 changes: 2 additions & 2 deletions docs/src/modules/components/ApiPage/table/PropertiesTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ export default function PropertiesTable(props: PropertiesTableProps) {
key={propName}
id={getHash({ componentName, propName, hooksParameters, hooksReturnValue })}
>
<td className="MuiApi-table-item-title">
<td className="MuiApi-table-item-title algolia-lvl3">
{propName}
{isRequired ? '*' : ''}
{isOptional ? '?' : ''}
Expand Down Expand Up @@ -200,7 +200,7 @@ export default function PropertiesTable(props: PropertiesTableProps) {
)}
</td>
)}
<td className="MuiPropTable-description-column">
<td className="MuiPropTable-description-column algolia-content">
{description && <PropDescription description={description} />}
{seeMoreDescription && (
<p
Expand Down
5 changes: 1 addition & 4 deletions docs/src/modules/components/Notifications.js
Original file line number Diff line number Diff line change
Expand Up @@ -231,10 +231,7 @@ export default function Notifications() {
<React.Fragment key={message.id}>
<ListItem alignItems="flex-start">
<Typography gutterBottom>
<span
// eslint-disable-next-line react/no-danger
dangerouslySetInnerHTML={{ __html: message.title }}
/>
<b>{message.title}</b>
</Typography>
<Typography gutterBottom variant="body2" color="text.secondary">
<span
Expand Down
36 changes: 36 additions & 0 deletions examples/pigment-css-nextjs-ts/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*

# local env files
.env*.local

# vercel
.vercel

# typescript
*.tsbuildinfo
# next-env.d.ts
38 changes: 38 additions & 0 deletions examples/pigment-css-nextjs-ts/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Pigment CSS - Next.js App Router with TypeScript example project

This is a [Next.js](https://nextjs.org/) project bootstrapped using [`create-next-app`](https://github.com/vercel/next.js/tree/HEAD/packages/create-next-app), with TypeScript and Pigment CSS, a zero-runtime CSS-in-JS library, installed.

## How to use

Download the example [or clone the repo](https://github.com/mui/material-ui):

<!-- #default-branch-switch -->

```bash
curl https://codeload.github.com/mui/material-ui/tar.gz/master | tar -xz --strip=2 material-ui-master/examples/pigment-css-nextjs-ts
cd pigment-css-nextjs-ts
```

Install it and run:

```bash
npm install
npm run dev
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

or:

<!-- #default-branch-switch -->

[![Edit on StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/mui/material-ui/tree/master/examples/pigment-css-nextjs-ts)

[![Edit on CodeSandbox](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/p/sandbox/github/mui/material-ui/tree/master/examples/pigment-css-nextjs-ts)

## Learn more

To learn more about this example:

- [Pigment CSS documentation](https://github.com/mui/material-ui/blob/master/packages/pigment-react/README.md) - learn more about Pigment CSS features and APIs.
- [Next.js documentation](https://nextjs.org/docs) - learn about Next.js features and APIs.
5 changes: 5 additions & 0 deletions examples/pigment-css-nextjs-ts/next-env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
Loading

0 comments on commit f86ccfb

Please sign in to comment.