Skip to content

Commit

Permalink
Merge branch 'next' into deprecate-slider-components
Browse files Browse the repository at this point in the history
  • Loading branch information
sai6855 committed Mar 20, 2024
2 parents b8c4210 + f6a89c1 commit 656ac20
Show file tree
Hide file tree
Showing 62 changed files with 1,378 additions and 283 deletions.
10 changes: 5 additions & 5 deletions apps/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 9 additions & 3 deletions docs/data/base/getting-started/quickstart/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,24 @@ If you're using Next.js 13.4 or later, check out the [Next.js App Router guide](

`@mui/base` is completely standalone – run one of the following commands to add Base UI to your React project:

:::info
The `next` tag is used to download the latest <b>pre-release</b>, v6 version. Remove it to get the current stable version.
:::

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

<codeblock storageKey="package-manager">

```bash npm
npm install @mui/base
npm install @mui/base@next
```

```bash yarn
yarn add @mui/base
yarn add @mui/base@next
```

```bash pnpm
pnpm add @mui/base
pnpm add @mui/base@next
```

</codeblock>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,14 @@ We'll use [`create-react-app` with TypeScript](https://create-react-app.dev/docs
After you have created the project, follow the instructions given on the [Tailwind CSS installation page](https://tailwindcss.com/docs/guides/create-react-app) in order to configure `tailwind`.
Next, install `@mui/base` in the project:

:::info
The `next` tag is used to download the latest <b>pre-release</b>, v6 version. Remove it to get the current stable version.
:::

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

```bash
npm install @mui/base
npm install @mui/base@next
```

## Adding the player markup
Expand Down
12 changes: 9 additions & 3 deletions docs/data/joy/getting-started/installation/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,23 @@

Run one of the following commands to add Joy UI to your project:

:::info
The `next` tag is used to download the latest <b>pre-release</b>, v6 version. Remove it to get the current stable version.
:::

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

<codeblock storageKey="package-manager">
```bash npm
npm install @mui/joy @emotion/react @emotion/styled
npm install @mui/joy@next @emotion/react @emotion/styled
```

```bash yarn
yarn add @mui/joy @emotion/react @emotion/styled
yarn add @mui/joy@next @emotion/react @emotion/styled
```

```bash pnpm
pnpm add @mui/joy @emotion/react @emotion/styled
pnpm add @mui/joy@next @emotion/react @emotion/styled
```

</codeblock>
Expand Down
14 changes: 12 additions & 2 deletions docs/data/joy/integrations/icon-libraries/icon-libraries.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,12 @@ This section assumes that you've already installed Joy UI in your app—see [In

#### yarn

:::info
The `next` tag is used to download the latest <b>pre-release</b>, v6 version. Remove it to get the current stable version.
:::

```bash
yarn add @mui/icons-material @mui/material
yarn add @mui/icons-material@next @mui/material@next
```

:::warning
Expand All @@ -39,8 +43,14 @@ You can keep track of the progress in [this issue](https://github.com/mui/materi

#### npm

:::info
The `next` tag is used to download the latest <b>pre-release</b>, v6 version. Remove it to get the current stable version.
:::

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

```bash
npm install @mui/icons-material @mui/material
npm install @mui/icons-material@next @mui/material@next
```

:::warning
Expand Down
111 changes: 77 additions & 34 deletions docs/data/joy/main-features/color-inversion/ColorInversionMarketing.js
Original file line number Diff line number Diff line change
@@ -1,84 +1,127 @@
import * as React from 'react';

import { useTheme } from '@mui/joy/styles';
import Box from '@mui/joy/Box';
import Button from '@mui/joy/Button';
import IconButton from '@mui/joy/IconButton';
import Typography from '@mui/joy/Typography';
import Sheet from '@mui/joy/Sheet';
import ArrowForwardIcon from '@mui/icons-material/ArrowForward';
import ColorLensRoundedIcon from '@mui/icons-material/ColorLensRounded';
import InvertColorsIcon from '@mui/icons-material/InvertColors';

/**
* Design credit: https://flutter.dev/
*/

export default function ColorInversionMarketing() {
const [color, setColor] = React.useState('primary');
const [solid, setSolid] = React.useState(true);
const theme = useTheme();

const shade = (x) => theme.vars.palette[color][x];
const color1 = solid ? shade(800) : shade(600);
const color2 = solid ? shade(600) : shade(200);
const color3 = shade(900);
const gradient1 = `${color1}, ${color2} 65%`;
const gradient2 = `${color1} 65%, ${color3}`;
const textColor = { color: solid ? shade(50) : shade(700) };

const buttonStyles = {
borderRadius: 99,
'&:hover': {
'& .MuiButton-endDecorator': { transform: 'translate(4px, 0px)' },
},
'& span': { transition: '0.15s' },
};

return (
<Sheet
variant="solid"
variant={solid ? 'solid' : 'soft'}
color={color}
invertedColors
sx={{
flexGrow: 1,
position: 'relative',
display: 'flex',
bgcolor: color === 'primary' ? '#042449' : undefined,
p: { xs: '36px', md: '70px' },
pt: { xs: '24px', md: '60px' },
borderRadius: 'lg',
overflow: 'hidden',
'& button': { borderRadius: 'xl' },
bgcolor: solid ? shade(800) : shade(100),
p: '6rem 3rem',
borderRadius: 'md',
overflow: 'clip',
'&::after': {
content: `""`,
display: 'block',
width: '20rem',
height: '40rem',
background: `linear-gradient(to top, ${gradient1}, ${gradient2})`,
position: 'absolute',
transform: 'rotate(-45deg)',
top: { xs: '-80%', sm: '-95%', md: '-65%', lg: '-70%' },
right: { xs: '-70%', sm: '-15%' },
},
}}
>
<Box sx={{ zIndex: 1, position: 'relative' }}>
<Typography level="h2">Get started</Typography>
<Typography sx={{ mt: 0.5, mb: 2 }}>
<div>
<Typography level="h1" component="h2" sx={textColor}>
Get started
</Typography>
<Typography sx={{ mt: 1, mb: 2, ...textColor }}>
Instant access to the power of the Joy UI library.
</Typography>
<Box
sx={{
display: 'flex',
gap: 1,
flexWrap: 'wrap',
maxWidth: 'max-content',
'& > *': { flexGrow: 1, fontWeight: 'lg' },
gap: 1,
}}
>
<Button sx={{ minWidth: 120 }}>Install</Button>
<Button
endDecorator={<ArrowForwardIcon fontSize="md" />}
sx={{
...buttonStyles,
'&:active': { bgcolor: solid ? shade(200) : shade(700) },
}}
>
Install
</Button>
<Button
variant="plain"
endDecorator={<ArrowForwardIcon fontSize="md" />}
sx={{
'&:hover': { '--Button-gap': '0.625rem' },
'& span': { transition: '0.15s' },
...textColor,
...buttonStyles,
}}
>
See the docs
</Button>
</Box>
</Box>
<Box
component="img"
alt=""
src="https://storage.googleapis.com/cms-storage-bucket/72521e62275b24d3c37d.png"
sx={{ position: 'absolute', height: '100%', top: 0, right: 0 }}
/>
<IconButton
</div>
<Sheet
sx={{
zIndex: 1,
position: 'absolute',
bottom: '1.5rem',
right: '1.5rem',
borderRadius: '50%',
}}
onClick={() => {
const colors = ['primary', 'neutral', 'danger', 'success', 'warning'];

const nextColorIndex = colors.indexOf(color) + 1;
setColor(colors[nextColorIndex] ?? colors[0]);
bgcolor: 'transparent',
display: 'flex',
gap: 2,
'& button': { borderRadius: '50%' },
}}
>
<ColorLensRoundedIcon fontSize="small" />
</IconButton>
<IconButton variant="solid" onClick={() => setSolid((state) => !state)}>
<InvertColorsIcon fontSize="xl" />
</IconButton>
<IconButton
variant="soft"
onClick={() => {
const colors = ['primary', 'neutral', 'danger', 'success', 'warning'];

const nextColorIndex = colors.indexOf(color) + 1;
setColor(colors[nextColorIndex] ?? colors[0]);
}}
>
<ColorLensRoundedIcon fontSize="xl" />
</IconButton>
</Sheet>
</Sheet>
);
}
Loading

0 comments on commit 656ac20

Please sign in to comment.