diff --git a/docs/data/joy/getting-started/templates/email/App.tsx b/docs/data/joy/getting-started/templates/email/App.tsx index 16c65b8be57b52..22808d8f99145d 100644 --- a/docs/data/joy/getting-started/templates/email/App.tsx +++ b/docs/data/joy/getting-started/templates/email/App.tsx @@ -1,10 +1,9 @@ import * as React from 'react'; -import { GlobalStyles } from '@mui/system'; import { CssVarsProvider, useColorScheme } from '@mui/joy/styles'; -import type { Theme } from '@mui/joy/styles'; +import CssBaseline from '@mui/joy/CssBaseline'; import Box from '@mui/joy/Box'; import Typography from '@mui/joy/Typography'; -import TextField from '@mui/joy/TextField'; +import Input from '@mui/joy/Input'; import IconButton from '@mui/joy/IconButton'; // Icons import @@ -57,14 +56,7 @@ export default function EmailExample() { const [drawerOpen, setDrawerOpen] = React.useState(false); return ( - - styles={(theme) => ({ - body: { - margin: 0, - fontFamily: theme.vars.fontFamily.body, - }, - })} - /> + {drawerOpen && ( setDrawerOpen(false)}> @@ -106,7 +98,7 @@ export default function EmailExample() { Email - } diff --git a/docs/data/joy/getting-started/templates/email/components/EmailContent.tsx b/docs/data/joy/getting-started/templates/email/components/EmailContent.tsx index a817fe8385e857..0ecf94ad99e5fc 100644 --- a/docs/data/joy/getting-started/templates/email/components/EmailContent.tsx +++ b/docs/data/joy/getting-started/templates/email/components/EmailContent.tsx @@ -8,7 +8,7 @@ import Typography from '@mui/joy/Typography'; import Button from '@mui/joy/Button'; import IconButton from '@mui/joy/IconButton'; import AspectRatio from '@mui/joy/AspectRatio'; -import ListDivider from '@mui/joy/ListDivider'; +import Divider from '@mui/joy/Divider'; import Avatar from '@mui/joy/Avatar'; // Icons import @@ -25,7 +25,6 @@ export default function EmailContent() { borderRadius: 'sm', p: 2, mb: 3, - bgcolor: 'background.componentBg', }} > - + @@ -86,7 +85,6 @@ export default function EmailContent() { From @@ -99,7 +97,6 @@ export default function EmailContent() { to @@ -110,8 +107,8 @@ export default function EmailContent() { - - + + Hello, my friend!

@@ -135,14 +132,8 @@ export default function EmailContent() {
See you soon, Alex Jonnold
- - + + Attachments - + diff --git a/docs/data/joy/getting-started/templates/email/components/Layout.tsx b/docs/data/joy/getting-started/templates/email/components/Layout.tsx index dfa5dd421796c1..505bf26d71c71c 100644 --- a/docs/data/joy/getting-started/templates/email/components/Layout.tsx +++ b/docs/data/joy/getting-started/templates/email/components/Layout.tsx @@ -8,7 +8,6 @@ function Root(props: BoxProps) { {...props} sx={[ { - bgcolor: 'background.appBody', display: 'grid', gridTemplateColumns: { xs: '1fr', @@ -34,7 +33,7 @@ function Header(props: BoxProps) { { p: 2, gap: 2, - bgcolor: 'background.componentBg', + bgcolor: 'background.surface', display: 'flex', flexDirection: 'row', justifyContent: 'space-between', @@ -61,7 +60,7 @@ function SideNav(props: BoxProps) { sx={[ { p: 2, - bgcolor: 'background.componentBg', + bgcolor: 'background.surface', borderRight: '1px solid', borderColor: 'divider', display: { @@ -82,7 +81,7 @@ function SidePane(props: BoxProps) { {...props} sx={[ { - bgcolor: 'background.componentBg', + bgcolor: 'background.surface', borderRight: '1px solid', borderColor: 'divider', display: { @@ -136,7 +135,7 @@ function SideDrawer({ height: '100%', p: 2, boxShadow: 'lg', - bgcolor: 'background.componentBg', + bgcolor: 'background.surface', }} > {props.children} diff --git a/docs/data/joy/getting-started/templates/email/components/Menu.tsx b/docs/data/joy/getting-started/templates/email/components/Menu.tsx index ca79d04e8080b1..8b0ada4a62577b 100644 --- a/docs/data/joy/getting-started/templates/email/components/Menu.tsx +++ b/docs/data/joy/getting-started/templates/email/components/Menu.tsx @@ -1,52 +1,6 @@ import * as React from 'react'; -import { styled } from '@mui/joy/styles'; -import MenuUnstyled, { MenuUnstyledActions } from '@mui/base/MenuUnstyled'; -import MenuItemUnstyled from '@mui/base/MenuItemUnstyled'; -import PopperUnstyled from '@mui/base/PopperUnstyled'; - -const Popper = styled(PopperUnstyled)({ - zIndex: 1500, -}); - -const Listbox = styled('ul')(({ theme }) => ({ - ...theme.variants.outlined.neutral, - marginBlock: '0.25rem', - padding: '0.45rem', - borderRadius: theme.vars.radius.sm, - boxShadow: theme.vars.shadow.md, - backgroundColor: theme.vars.palette.background.componentBg, - gap: theme.spacing(1), - display: 'flex', - flexDirection: 'column', - listStyle: 'none', -})); - -const MenuItem = styled(MenuItemUnstyled, { - shouldForwardProp: (prop) => prop !== 'active', -})<{ active?: boolean }>(({ theme, active }) => ({ - listStyle: 'none', - fontFamily: theme.vars.fontFamily.body, - fontSize: theme.vars.fontSize.sm, - padding: '0.45rem 0.75rem', - borderRadius: theme.vars.radius.xs, - minWidth: 120, - textDecoration: 'none', - display: 'flex', - ...theme.variants.plain.neutral, - ...(active - ? { - ...theme.variants.soft.primary, - cursor: 'default', - } - : { - '&:hover': { - ...theme.variants.softHover.neutral, - cursor: 'pointer', - }, - '&:active': theme.variants.outlinedHover.neutral, - }), - [theme.focus.selector]: theme.focus.default, -})); +import JoyMenu, { MenuUnstyledActions } from '@mui/joy/Menu'; +import MenuItem from '@mui/joy/MenuItem'; function Menu({ control, @@ -96,17 +50,23 @@ function Menu({ 'aria-expanded': isOpen || undefined, 'aria-haspopup': 'menu', })} - {menus.map(({ label, active, ...item }) => { const menuItem = ( - + {label} ); @@ -119,7 +79,7 @@ function Menu({ } return React.cloneElement(menuItem, { key: label }); })} - + ); } diff --git a/docs/data/joy/getting-started/templates/email/components/Navigation.tsx b/docs/data/joy/getting-started/templates/email/components/Navigation.tsx index eeb03876d6ae7b..d0f3b7567e9d74 100644 --- a/docs/data/joy/getting-started/templates/email/components/Navigation.tsx +++ b/docs/data/joy/getting-started/templates/email/components/Navigation.tsx @@ -1,8 +1,8 @@ import * as React from 'react'; import Box from '@mui/joy/Box'; -import Typography from '@mui/joy/Typography'; import IconButton from '@mui/joy/IconButton'; import List from '@mui/joy/List'; +import ListSubheader from '@mui/joy/ListSubheader'; import ListItem from '@mui/joy/ListItem'; import ListItemButton from '@mui/joy/ListItemButton'; import ListItemDecorator from '@mui/joy/ListItemDecorator'; @@ -19,36 +19,18 @@ import KeyboardArrowDownRoundedIcon from '@mui/icons-material/KeyboardArrowDownR export default function EmailNav() { return ( - - - - Browse - + + + Browse - + - - - - Tags - + + + Tags - + - - styles={(theme) => ({ - body: { - margin: 0, - fontFamily: theme.vars.fontFamily.body, - }, - })} - /> + {drawerOpen && ( setDrawerOpen(false)}> @@ -125,7 +117,7 @@ export default function FilesExample() { Files - } @@ -210,7 +202,6 @@ export default function FilesExample() { sx={{ borderRadius: 'sm', gridColumn: '1/-1', - bgcolor: 'background.componentBg', display: { xs: 'none', sm: 'grid' }, gridTemplateColumns: '1fr 1fr 1fr 1fr', '& > *': { @@ -309,7 +300,6 @@ export default function FilesExample() { sx={{ display: { xs: 'inherit', sm: 'none' }, borderRadius: 'sm', - bgcolor: 'background.componentBg', overflow: 'auto', '& > *': { '&:nth-child(n):not(:nth-last-child(-n+4))': { @@ -384,7 +374,7 @@ export default function FilesExample() { - + @@ -450,7 +440,6 @@ export default function FilesExample() { variant="outlined" sx={{ '--Card-radius': (theme) => theme.vars.radius.sm, - bgcolor: 'background.componentBg', boxShadow: 'none', }} > @@ -530,7 +519,6 @@ export default function FilesExample() { variant="outlined" sx={{ '--Card-radius': (theme) => theme.vars.radius.sm, - bgcolor: 'background.componentBg', boxShadow: 'none', }} > @@ -572,7 +560,6 @@ export default function FilesExample() { display: { xs: 'none', sm: 'initial' }, borderLeft: '1px solid', borderColor: 'neutral.outlinedBorder', - bgcolor: 'background.componentBg', }} > @@ -581,7 +568,7 @@ export default function FilesExample() { - + - + Skills tags: {props.children} diff --git a/docs/data/joy/getting-started/templates/team/components/Menu.tsx b/docs/data/joy/getting-started/templates/team/components/Menu.tsx index ca79d04e8080b1..8b0ada4a62577b 100644 --- a/docs/data/joy/getting-started/templates/team/components/Menu.tsx +++ b/docs/data/joy/getting-started/templates/team/components/Menu.tsx @@ -1,52 +1,6 @@ import * as React from 'react'; -import { styled } from '@mui/joy/styles'; -import MenuUnstyled, { MenuUnstyledActions } from '@mui/base/MenuUnstyled'; -import MenuItemUnstyled from '@mui/base/MenuItemUnstyled'; -import PopperUnstyled from '@mui/base/PopperUnstyled'; - -const Popper = styled(PopperUnstyled)({ - zIndex: 1500, -}); - -const Listbox = styled('ul')(({ theme }) => ({ - ...theme.variants.outlined.neutral, - marginBlock: '0.25rem', - padding: '0.45rem', - borderRadius: theme.vars.radius.sm, - boxShadow: theme.vars.shadow.md, - backgroundColor: theme.vars.palette.background.componentBg, - gap: theme.spacing(1), - display: 'flex', - flexDirection: 'column', - listStyle: 'none', -})); - -const MenuItem = styled(MenuItemUnstyled, { - shouldForwardProp: (prop) => prop !== 'active', -})<{ active?: boolean }>(({ theme, active }) => ({ - listStyle: 'none', - fontFamily: theme.vars.fontFamily.body, - fontSize: theme.vars.fontSize.sm, - padding: '0.45rem 0.75rem', - borderRadius: theme.vars.radius.xs, - minWidth: 120, - textDecoration: 'none', - display: 'flex', - ...theme.variants.plain.neutral, - ...(active - ? { - ...theme.variants.soft.primary, - cursor: 'default', - } - : { - '&:hover': { - ...theme.variants.softHover.neutral, - cursor: 'pointer', - }, - '&:active': theme.variants.outlinedHover.neutral, - }), - [theme.focus.selector]: theme.focus.default, -})); +import JoyMenu, { MenuUnstyledActions } from '@mui/joy/Menu'; +import MenuItem from '@mui/joy/MenuItem'; function Menu({ control, @@ -96,17 +50,23 @@ function Menu({ 'aria-expanded': isOpen || undefined, 'aria-haspopup': 'menu', })} - {menus.map(({ label, active, ...item }) => { const menuItem = ( - + {label} ); @@ -119,7 +79,7 @@ function Menu({ } return React.cloneElement(menuItem, { key: label }); })} - + ); } diff --git a/docs/data/joy/getting-started/templates/team/theme.tsx b/docs/data/joy/getting-started/templates/team/theme.tsx index 827bbb3f107a96..02de5b0186517d 100644 --- a/docs/data/joy/getting-started/templates/team/theme.tsx +++ b/docs/data/joy/getting-started/templates/team/theme.tsx @@ -1,33 +1,25 @@ import { extendTheme } from '@mui/joy/styles'; -declare module '@mui/joy/styles' { - interface PaletteBackground { - appBody: string; - componentBg: string; - } -} - export default extendTheme({ colorSchemes: { light: { palette: { background: { - appBody: 'var(--joy-palette-neutral-50)', - componentBg: 'var(--joy-palette-common-white)', + body: 'var(--joy-palette-neutral-50)', }, }, }, dark: { palette: { background: { - appBody: 'var(--joy-palette-common-black)', - componentBg: 'var(--joy-palette-neutral-900)', + body: 'var(--joy-palette-common-black)', + surface: 'var(--joy-palette-neutral-900)', }, }, }, }, fontFamily: { - // display: "'Roboto Flex', var(--joy-fontFamily-fallback)", - // body: "'Roboto Flex', var(--joy-fontFamily-fallback)", + // display: "'Inter', var(--joy-fontFamily-fallback)", + // body: "'Inter', var(--joy-fontFamily-fallback)", }, }); diff --git a/docs/public/static/screenshots/joy-ui/getting-started/templates/email-dark.jpg b/docs/public/static/screenshots/joy-ui/getting-started/templates/email-dark.jpg index a73176da18091f..fba75fcf7fdbef 100644 Binary files a/docs/public/static/screenshots/joy-ui/getting-started/templates/email-dark.jpg and b/docs/public/static/screenshots/joy-ui/getting-started/templates/email-dark.jpg differ diff --git a/docs/public/static/screenshots/joy-ui/getting-started/templates/email.jpg b/docs/public/static/screenshots/joy-ui/getting-started/templates/email.jpg index 349edac8a31bc7..b7f37a1749c63d 100644 Binary files a/docs/public/static/screenshots/joy-ui/getting-started/templates/email.jpg and b/docs/public/static/screenshots/joy-ui/getting-started/templates/email.jpg differ diff --git a/docs/public/static/screenshots/joy-ui/getting-started/templates/files-dark.jpg b/docs/public/static/screenshots/joy-ui/getting-started/templates/files-dark.jpg index 4db8c45ff63188..4c6463bd121e50 100644 Binary files a/docs/public/static/screenshots/joy-ui/getting-started/templates/files-dark.jpg and b/docs/public/static/screenshots/joy-ui/getting-started/templates/files-dark.jpg differ diff --git a/docs/public/static/screenshots/joy-ui/getting-started/templates/files.jpg b/docs/public/static/screenshots/joy-ui/getting-started/templates/files.jpg index e553aabb38a90a..f80e749a2f1ca1 100644 Binary files a/docs/public/static/screenshots/joy-ui/getting-started/templates/files.jpg and b/docs/public/static/screenshots/joy-ui/getting-started/templates/files.jpg differ diff --git a/docs/public/static/screenshots/joy-ui/getting-started/templates/team-dark.jpg b/docs/public/static/screenshots/joy-ui/getting-started/templates/team-dark.jpg index ac82737ed34f89..5ad08bde8d8d10 100644 Binary files a/docs/public/static/screenshots/joy-ui/getting-started/templates/team-dark.jpg and b/docs/public/static/screenshots/joy-ui/getting-started/templates/team-dark.jpg differ diff --git a/docs/public/static/screenshots/joy-ui/getting-started/templates/team.jpg b/docs/public/static/screenshots/joy-ui/getting-started/templates/team.jpg index ed729274b3de0c..e7fbb05cfb2565 100644 Binary files a/docs/public/static/screenshots/joy-ui/getting-started/templates/team.jpg and b/docs/public/static/screenshots/joy-ui/getting-started/templates/team.jpg differ