-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master' into template-polishin…
…g-checkout
- Loading branch information
Showing
99 changed files
with
1,734 additions
and
248 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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]` | ||
|
||
- ​<!-- 52 -->Support props callback type in theme variants (#40946) @ZeeshanTamboli | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
13
docs/data/joy/integrations/icon-libraries/IconFontSizes.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> | ||
); | ||
} |
11 changes: 8 additions & 3 deletions
11
docs/data/joy/integrations/icon-libraries/IconFontSizes.tsx.preview
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
const { withPigment, extendTheme } = require('@pigment-css/nextjs-plugin'); | ||
|
||
// To learn more about theming, visit https://github.com/mui/material-ui/blob/master/packages/zero-runtime/README.md#theming | ||
const theme = extendTheme({ | ||
colorSchemes: { | ||
light: { | ||
palette: { | ||
background: '0 0% 100%', | ||
foreground: '240 10% 3.9%', | ||
primary: '240 5.9% 10%', | ||
border: '240 5.9% 90%', | ||
}, | ||
}, | ||
dark: { | ||
palette: { | ||
background: '240 10% 3.9%', | ||
foreground: '0 0% 80%', | ||
primary: '0 0% 98%', | ||
border: '240 3.7% 15.9%', | ||
}, | ||
}, | ||
}, | ||
}); | ||
|
||
/** @type {import('next').NextConfig} */ | ||
const nextConfig = {}; | ||
|
||
module.exports = withPigment(nextConfig, { theme }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"name": "pigment-css-nextjs-ts", | ||
"version": "5.0.0", | ||
"private": true, | ||
"scripts": { | ||
"dev": "next dev", | ||
"build": "next build", | ||
"start": "next start", | ||
"lint": "next lint", | ||
"post-update": "echo \"codesandbox preview only, need an update\" && pnpm update --latest" | ||
}, | ||
"dependencies": { | ||
"@pigment-css/react": "latest", | ||
"react": "latest", | ||
"react-dom": "latest", | ||
"next": "latest" | ||
}, | ||
"devDependencies": { | ||
"@pigment-css/nextjs-plugin": "latest", | ||
"@types/node": "latest", | ||
"@types/react": "latest", | ||
"@types/react-dom": "latest", | ||
"eslint": "latest", | ||
"eslint-config-next": "latest", | ||
"typescript": "latest" | ||
} | ||
} |
Empty file.
Binary file not shown.
Oops, something went wrong.