From 0492cf2160ed00034a93f3e44e9fad8d4375e7ca Mon Sep 17 00:00:00 2001 From: Danilo Leal <67129314+danilo-leal@users.noreply.github.com> Date: Mon, 29 Jan 2024 15:42:51 -0300 Subject: [PATCH] [website] Polish some pages and stray components (#40797) --- docs/data/material/getting-started/faq/faq.md | 2 +- docs/pages/core.tsx | 7 +- docs/pages/material-ui.tsx | 4 +- docs/src/components/action/Frame.tsx | 1 + docs/src/components/action/StylingInfo.tsx | 3 +- docs/src/components/animation/FlashCode.tsx | 2 +- docs/src/components/home/AdvancedShowcase.tsx | 5 - docs/src/components/home/CoreShowcase.tsx | 110 ++++++------------ .../home/DesignSystemComponents.tsx | 1 + .../home/MaterialDesignComponents.tsx | 4 +- .../components/home/MaterialDesignDemo.tsx | 110 ++++++------------ docs/src/components/home/References.tsx | 2 +- .../src/components/home/ShowcaseContainer.tsx | 70 ++++------- docs/src/components/home/StartToday.tsx | 100 ++++------------ docs/src/components/home/Testimonials.tsx | 9 +- .../src/components/home/XGridGlobalStyles.tsx | 6 +- docs/src/components/productCore/CoreHero.tsx | 64 ++++------ .../components/productCore/CoreHeroEnd.tsx | 58 --------- .../productMaterial/MaterialEnd.tsx | 91 +++++++++++++++ docs/src/components/productX/XDataGrid.tsx | 4 +- docs/src/components/productX/XHero.tsx | 10 +- docs/src/components/productX/XTheming.tsx | 8 +- .../components/typography/SectionHeadline.tsx | 7 +- docs/src/layouts/Section.tsx | 8 +- docs/src/modules/brandingTheme.ts | 2 +- 25 files changed, 272 insertions(+), 416 deletions(-) delete mode 100644 docs/src/components/productCore/CoreHeroEnd.tsx create mode 100644 docs/src/components/productMaterial/MaterialEnd.tsx diff --git a/docs/data/material/getting-started/faq/faq.md b/docs/data/material/getting-started/faq/faq.md index 8e2904b16420b3..612add813f580e 100644 --- a/docs/data/material/getting-started/faq/faq.md +++ b/docs/data/material/getting-started/faq/faq.md @@ -14,7 +14,7 @@ There are many ways to support us: - **Help new users**. You can answer questions on [Stack Overflow](https://stackoverflow.com/questions/tagged/material-ui). - **Make changes happen**. - - Edit the documentation. Every page has an "Edit this page" link in the top right. + - Edit the documentation. At the bottom of every page, you can find an "Edit this page" button. - Report bugs or missing features by [creating an issue](https://github.com/mui/material-ui/issues/new). - Review and comment on existing [pull requests](https://github.com/mui/material-ui/pulls) and [issues](https://github.com/mui/material-ui/issues). - [Improve our documentation](https://github.com/mui/material-ui/tree/HEAD/docs), fix bugs, or add features by [submitting a pull request](https://github.com/mui/material-ui/pulls). diff --git a/docs/pages/core.tsx b/docs/pages/core.tsx index d17b5a4ce17249..222d8a90ffea71 100644 --- a/docs/pages/core.tsx +++ b/docs/pages/core.tsx @@ -5,10 +5,9 @@ import BrandingCssVarsProvider from 'docs/src/BrandingCssVarsProvider'; import AppHeader from 'docs/src/layouts/AppHeader'; import CoreHero from 'docs/src/components/productCore/CoreHero'; import CoreProducts from 'docs/src/components/productCore/CoreProducts'; -import CoreHeroEnd from 'docs/src/components/productCore/CoreHeroEnd'; -import References, { CORE_CUSTOMERS } from 'docs/src/components/home/References'; import AppFooter from 'docs/src/layouts/AppFooter'; import AppHeaderBanner from 'docs/src/components/banner/AppHeaderBanner'; +import Testimonials from 'docs/src/components/home/Testimonials'; export default function Core() { return ( @@ -24,9 +23,7 @@ export default function Core() { - - - + diff --git a/docs/pages/material-ui.tsx b/docs/pages/material-ui.tsx index d501671f39947d..db3487e275690d 100644 --- a/docs/pages/material-ui.tsx +++ b/docs/pages/material-ui.tsx @@ -9,7 +9,7 @@ import MaterialTheming from 'docs/src/components/productMaterial/MaterialTheming import MaterialStyling from 'docs/src/components/productMaterial/MaterialStyling'; import MaterialTemplates from 'docs/src/components/productMaterial/MaterialTemplates'; import MaterialDesignKits from 'docs/src/components/productMaterial/MaterialDesignKits'; -import CoreHeroEnd from 'docs/src/components/productCore/CoreHeroEnd'; +import MaterialEnd from 'docs/src/components/productMaterial/MaterialEnd'; import References, { CORE_CUSTOMERS } from 'docs/src/components/home/References'; import AppFooter from 'docs/src/layouts/AppFooter'; import AppHeaderBanner from 'docs/src/components/banner/AppHeaderBanner'; @@ -38,7 +38,7 @@ export default function Core() { - + diff --git a/docs/src/components/action/Frame.tsx b/docs/src/components/action/Frame.tsx index dbf83a57ae587e..64ecab7c500248 100644 --- a/docs/src/components/action/Frame.tsx +++ b/docs/src/components/action/Frame.tsx @@ -34,6 +34,7 @@ const FrameInfo = React.forwardRef(function FrameInfo( bgcolor: 'common.black', border: '1px solid', borderColor: 'primaryDark.700', + borderTop: 0, colorScheme: 'dark', '* pre, code': { bgcolor: 'common.black', diff --git a/docs/src/components/action/StylingInfo.tsx b/docs/src/components/action/StylingInfo.tsx index a421acf091bb9b..dddc6211e39589 100644 --- a/docs/src/components/action/StylingInfo.tsx +++ b/docs/src/components/action/StylingInfo.tsx @@ -41,7 +41,6 @@ export default function StylingInfo({ right: 0, px: 2, pt: 1, - pb: 2, background: ({ palette }) => alpha(palette.common.black, 0.5), backdropFilter: 'blur(8px)', zIndex: 1, @@ -58,7 +57,7 @@ export default function StylingInfo({ position: 'absolute', zIndex: 2, transition: '0.3s', - right: 10, + right: 16, bottom: '100%', transform: hidden || !appeared ? 'translateY(-10px)' : 'translateY(50%)', opacity: appeared ? 1 : 0, diff --git a/docs/src/components/animation/FlashCode.tsx b/docs/src/components/animation/FlashCode.tsx index c1319d639b3d4c..227b08b901c4fd 100644 --- a/docs/src/components/animation/FlashCode.tsx +++ b/docs/src/components/animation/FlashCode.tsx @@ -20,7 +20,7 @@ const FlashCode = styled('div', { : alpha(theme.palette.primary.main, 0.1), border: '1px solid', borderColor: (theme.vars || theme).palette.primary.dark, - zIndex: 1, + zIndex: 2, }), ); diff --git a/docs/src/components/home/AdvancedShowcase.tsx b/docs/src/components/home/AdvancedShowcase.tsx index 430e81e48ad908..59caeeccbc97ad 100644 --- a/docs/src/components/home/AdvancedShowcase.tsx +++ b/docs/src/components/home/AdvancedShowcase.tsx @@ -1681,10 +1681,6 @@ const rows = [ export default function DataTable() { return ( = { - avatar: 2, - divider: 13, - chip: 20, - stack: 3, - iconButton: 9, card: 0, - switch: 21, - editIcon: 10, - typography: 4, - typography2: 5, - locationOnIcon: 6, - stack2: [14, 19], + stack: [1, 17], + avatar: 2, + stack2: [4, 11], + chip: [6, 10], + typography: 5, + typography2: [12, 14], + switch: 16, }; export default function CoreShowcase() { @@ -45,7 +41,7 @@ export default function CoreShowcase() { }, }, shape: { - borderRadius: 10, + borderRadius: 12, }, shadows: ['none', '0px 4px 20px 0px hsla(210, 14%, 28%, 0.2)'], components: { @@ -54,14 +50,14 @@ export default function CoreShowcase() { root: { boxShadow: mode === 'dark' - ? '0px 4px 30px rgba(29, 29, 29, 0.6)' - : '0px 4px 20px rgba(61, 71, 82, 0.2)', + ? '0px 4px 12px rgba(0, 0, 0, 0.4)' + : '0px 4px 12px rgba(61, 71, 82, 0.1)', backgroundColor: mode === 'dark' ? globalTheme.palette.primaryDark[800] : '#fff', border: '1px solid', borderColor: mode === 'dark' - ? globalTheme.palette.primaryDark[600] + ? globalTheme.palette.primaryDark[700] : globalTheme.palette.grey[200], }, }, @@ -69,52 +65,32 @@ export default function CoreShowcase() { MuiAvatar: { styleOverrides: { root: { - width: 60, - height: 60, + width: 50, + height: 50, borderRadius: 99, }, }, }, - MuiIconButton: { - styleOverrides: { - root: { - border: '1px solid', - borderColor: - mode === 'dark' - ? globalTheme.palette.primaryDark[500] - : globalTheme.palette.grey[200], - color: - mode === 'dark' - ? globalTheme.palette.grey[200] - : globalTheme.palette.grey[800], - borderRadius: 10, - '&:hover, &.Mui-focusVisible': { - borderColor: globalTheme.palette.primary.main, - color: globalTheme.palette.primary.main, - }, - }, - }, - }, MuiSwich: globalTheme.components?.MuiSwitch, MuiChip: { styleOverrides: { filled: { - fontWeight: 700, + fontWeight: 'medium', '&.MuiChip-colorSuccess': { backgroundColor: mode === 'dark' - ? globalTheme.palette.success[800] + ? globalTheme.palette.success[900] : globalTheme.palette.success[100], color: mode === 'dark' ? globalTheme.palette.success[100] - : globalTheme.palette.success[800], + : globalTheme.palette.success[900], }, '&.MuiChip-colorDefault': { backgroundColor: mode === 'dark' - ? globalTheme.palette.primaryDark[600] - : globalTheme.palette.grey[200], + ? globalTheme.palette.primaryDark[700] + : globalTheme.palette.grey[100], color: mode === 'dark' ? globalTheme.palette.grey[200] @@ -137,11 +113,6 @@ export default function CoreShowcase() { } return ( - + Hover over the component to highlight the code. @@ -172,7 +145,7 @@ export default function CoreShowcase() { onElementChange={setElement} sx={{ minWidth: 300, width: '80%', maxWidth: '100%' }} > - + @@ -181,9 +154,10 @@ export default function CoreShowcase() {
diff --git a/docs/src/components/home/DesignSystemComponents.tsx b/docs/src/components/home/DesignSystemComponents.tsx index 30b1f2accefdd0..2132704fc30341 100644 --- a/docs/src/components/home/DesignSystemComponents.tsx +++ b/docs/src/components/home/DesignSystemComponents.tsx @@ -35,6 +35,7 @@ export default function DesignSystemComponents() { return (
diff --git a/docs/src/components/home/MaterialDesignComponents.tsx b/docs/src/components/home/MaterialDesignComponents.tsx index 0e3f27f8650b9a..ae4c7310621ab5 100644 --- a/docs/src/components/home/MaterialDesignComponents.tsx +++ b/docs/src/components/home/MaterialDesignComponents.tsx @@ -529,9 +529,9 @@ export default function MaterialDesignComponents() { - +export const componentCode = ` + - - Lucas Smith - - Scranton, PA, United States - - - - - - - - - - +
+ + Lucas Smith + + + + Scranton, PA, United States + +
+
`; -const Box = MuiBox; const Avatar = withPointer(MuiAvatar, { id: 'avatar', name: 'Avatar' }); -const Divider = withPointer(MuiBox, { id: 'divider', name: 'Divider' }); const Chip = withPointer(MuiChip, { id: 'chip', name: 'Chip' }); -const IconButton = withPointer(MuiIconButton, { id: 'iconButton', name: 'IconButton' }); const Card = withPointer(MuiCard, { id: 'card', name: 'Card' }); const Switch = withPointer(MuiSwitch, { id: 'switch', name: 'Switch' }); const Typography = withPointer(MuiTypography, { id: 'typography', name: 'Typography' }); const Typography2 = withPointer(MuiTypography, { id: 'typography2', name: 'Typography' }); const Stack = withPointer(MuiStack, { id: 'stack', name: 'Stack' }); const Stack2 = withPointer(MuiStack, { id: 'stack2', name: 'Stack' }); -const Edit = withPointer(MuiEdit, { id: 'editIcon', name: 'EditIcon' }); -const LocationOn = withPointer(MuiLocationOn, { id: 'locationOnIcon', name: 'LocationOnIcon' }); export default function MaterialDesignDemo(props: CardProps) { const [active, setActive] = React.useState(false); return ( - - + + - - Lucas Smith +
+ + Lucas Smith + + - Scranton, PA, United States - - - - - - - - - - +
setActive(event.target.checked)} sx={{ ml: 'auto' }} /> - +
); } diff --git a/docs/src/components/home/References.tsx b/docs/src/components/home/References.tsx index 76d5e08b001fb8..823d38b981552f 100644 --- a/docs/src/components/home/References.tsx +++ b/docs/src/components/home/References.tsx @@ -24,7 +24,7 @@ export default function References({ | typeof TEMPLATES_CUSTOMERS; }) { return ( -
+
diff --git a/docs/src/components/home/ShowcaseContainer.tsx b/docs/src/components/home/ShowcaseContainer.tsx index f9da7c6f9f7597..ee337eaa13a59c 100644 --- a/docs/src/components/home/ShowcaseContainer.tsx +++ b/docs/src/components/home/ShowcaseContainer.tsx @@ -1,21 +1,16 @@ import * as React from 'react'; -import { alpha } from '@mui/material/styles'; import Box, { BoxProps } from '@mui/material/Box'; import Fade from '@mui/material/Fade'; import NoSsr from '@mui/material/NoSsr'; -import Paper, { PaperProps } from '@mui/material/Paper'; +import Frame from 'docs/src/components/action/Frame'; export default function ShowcaseContainer({ preview, - previewSx, code, - codeSx, sx, }: { preview?: React.ReactNode; - previewSx?: PaperProps['sx']; code?: React.ReactNode; - codeSx?: BoxProps['sx']; sx?: BoxProps['sx']; }) { return ( @@ -25,55 +20,32 @@ export default function ShowcaseContainer({ display: 'flex', flexDirection: 'column', height: '100%', + '& > div:first-of-type': { + borderTopLeftRadius: '12px', + borderTopRightRadius: '12px', + }, + '& > div:last-of-type': { + borderBottomLeftRadius: '12px', + borderBottomRightRadius: '12px', + }, ...sx, }} > - - theme.applyDarkStyles({ - bgcolor: alpha(theme.palette.primaryDark[800], 0.5), - borderColor: 'divider', - }), - ...(Array.isArray(previewSx) ? previewSx : [previewSx]), - ]} + {preview} - - + + {code} - + ); diff --git a/docs/src/components/home/StartToday.tsx b/docs/src/components/home/StartToday.tsx index f4879b5adadb92..c0aa6a2bc39a22 100644 --- a/docs/src/components/home/StartToday.tsx +++ b/docs/src/components/home/StartToday.tsx @@ -1,89 +1,31 @@ import * as React from 'react'; -import Grid from '@mui/material/Grid'; +import Box from '@mui/material/Box'; import Typography from '@mui/material/Typography'; -import Paper from '@mui/material/Paper'; -import KeyboardArrowRightRounded from '@mui/icons-material/KeyboardArrowRightRounded'; -import Link from 'docs/src/modules/components/Link'; import GradientText from 'docs/src/components/typography/GradientText'; -import ROUTES from 'docs/src/route'; import GetStartedButtons from 'docs/src/components/home/GetStartedButtons'; import SectionHeadline from 'docs/src/components/typography/SectionHeadline'; export default function StartToday() { return ( - - - - Ship your next project -
- faster - - } - description="Find out why MUI's tools are trusted by thousands of open-source developers and teams around the world." - /> - -
- - - - - Showcase - - - Check out some great examples of MUI's products in action. - - svg': { transition: '0.2s' }, - '&:hover > svg': { transform: 'translateX(2px)' }, - }} - > - Learn more{' '} - - - - - - - - Blog - - - Read the latest updates about our company and products. - - svg': { transition: '0.2s' }, - '&:hover > svg': { transform: 'translateX(2px)' }, - }} - > - Learn more{' '} - - - - - -
+ + + Ship your next project faster + + } + description="Find out why MUI's tools are trusted by thousands of open-source developers and teams around the world." + /> + + ); } diff --git a/docs/src/components/home/Testimonials.tsx b/docs/src/components/home/Testimonials.tsx index c39ad3f19b151b..991c982b15927d 100644 --- a/docs/src/components/home/Testimonials.tsx +++ b/docs/src/components/home/Testimonials.tsx @@ -14,12 +14,9 @@ export default function Testimonials() { ({ - background: `linear-gradient(180deg, ${alpha( - theme.palette.primaryDark[800], - 0.8, - )}2%, ${alpha(theme.palette.primaryDark[900], 0.5)} 80%), - ${(theme.vars || theme).palette.common.black} - `, + background: `linear-gradient(180deg, ${alpha(theme.palette.primaryDark[800], 0.8)}2%, ${ + theme.palette.primaryDark[900] + } 80%), ${theme.palette.primaryDark[900]}`, })} >
diff --git a/docs/src/components/home/XGridGlobalStyles.tsx b/docs/src/components/home/XGridGlobalStyles.tsx index 3608b9155cd4b6..f0f7796bdddda7 100644 --- a/docs/src/components/home/XGridGlobalStyles.tsx +++ b/docs/src/components/home/XGridGlobalStyles.tsx @@ -27,7 +27,7 @@ export default function XGridGlobalStyles({ flexShrink: 0, border: '1px solid', padding: theme.spacing(0, 1), - borderColor: (theme.vars || theme).palette.grey[200], + borderColor: (theme.vars || theme).palette.divider, '& svg': { fontSize: '1.125rem', }, @@ -120,7 +120,7 @@ export default function XGridGlobalStyles({ '& .MuiDataGrid-root': { '& .MuiDataGrid-toolbarContainer': { '& > button': { - borderColor: (theme.vars || theme).palette.primaryDark[600], + borderColor: (theme.vars || theme).palette.divider, }, }, '& .MuiCheckbox-root': { @@ -130,7 +130,7 @@ export default function XGridGlobalStyles({ color: (theme.vars || theme).palette.primary[300], }, '& .MuiDataGrid-columnHeaders': { - borderColor: (theme.vars || theme).palette.primaryDark[500], + borderColor: (theme.vars || theme).palette.divider, }, '& .MuiDataGrid-columnSeparator': { color: (theme.vars || theme).palette.primaryDark[400], diff --git a/docs/src/components/productCore/CoreHero.tsx b/docs/src/components/productCore/CoreHero.tsx index d370dd80f81a12..efa0dd69ba55a8 100644 --- a/docs/src/components/productCore/CoreHero.tsx +++ b/docs/src/components/productCore/CoreHero.tsx @@ -1,51 +1,31 @@ import * as React from 'react'; -import Box from '@mui/material/Box'; -import Container from '@mui/material/Container'; +import Stack from '@mui/material/Stack'; import Typography from '@mui/material/Typography'; +import Section from 'docs/src/layouts/Section'; +import SectionHeadline from 'docs/src/components/typography/SectionHeadline'; import GradientText from 'docs/src/components/typography/GradientText'; + import IconImage from 'docs/src/components/icon/IconImage'; export default function CoreHero() { return ( - - - ({ - color: 'primary.600', - display: 'flex', - alignItems: 'center', - justifyContent: { xs: 'center', md: 'flex-start' }, - mb: { xs: 1, sm: 0 }, - '& > *': { mr: 1 }, - ...theme.applyDarkStyles({ - color: 'primary.400', - }), - })} - > - MUI Core - - - Ready to use components -
- free forever -
- - Get a growing list of React components and utilities, ready-to-use, free forever, and with - accessibility always in mind. We've built the foundational UI blocks for your design - system so you don't have to. - -
-
+
+ + {' '} + MUI Core + + } + title={ + + Ready to use components free forever + + } + description="Get a growing list of React components and utilities, ready-to-use, free forever, and with + accessibility always in mind. We've built the foundational UI blocks for your design system so you don't have to." + /> +
); } diff --git a/docs/src/components/productCore/CoreHeroEnd.tsx b/docs/src/components/productCore/CoreHeroEnd.tsx deleted file mode 100644 index 337ff521cffdfd..00000000000000 --- a/docs/src/components/productCore/CoreHeroEnd.tsx +++ /dev/null @@ -1,58 +0,0 @@ -import * as React from 'react'; -import Box from '@mui/material/Box'; -import Button from '@mui/material/Button'; -import Grid from '@mui/material/Grid'; -import Typography from '@mui/material/Typography'; -import KeyboardArrowRightRounded from '@mui/icons-material/KeyboardArrowRightRounded'; -import { alpha } from '@mui/material/styles'; -import Section from 'docs/src/layouts/Section'; -import SectionHeadline from 'docs/src/components/typography/SectionHeadline'; -import GradientText from 'docs/src/components/typography/GradientText'; -import Link from 'docs/src/modules/components/Link'; -import ROUTES from 'docs/src/route'; -import MuiStatistics from 'docs/src/components/home/MuiStatistics'; - -export default function CoreHeroEnd() { - return ( -
- `linear-gradient(180deg, ${(theme.vars || theme).palette.primaryDark[900]} 50%, - ${alpha(theme.palette.primary[800], 0.2)} 100%), ${ - (theme.vars || theme).palette.primaryDark[900] - }`, - }} - > - - - - - Join our global community - - } - description="The core components were crafted by many hands, all over the world. Join us today to get help when you need it, and lend a hand when you can." - /> - - - - - -
- ); -} diff --git a/docs/src/components/productMaterial/MaterialEnd.tsx b/docs/src/components/productMaterial/MaterialEnd.tsx new file mode 100644 index 00000000000000..22c69b1242ba58 --- /dev/null +++ b/docs/src/components/productMaterial/MaterialEnd.tsx @@ -0,0 +1,91 @@ +import * as React from 'react'; +import { alpha } from '@mui/material/styles'; +import Grid from '@mui/material/Unstable_Grid2'; +import List from '@mui/material/List'; +import ListItem from '@mui/material/ListItem'; +import Typography from '@mui/material/Typography'; +import CompareIcon from '@mui/icons-material/Compare'; +import StyleRoundedIcon from '@mui/icons-material/StyleRounded'; +import { GlowingIconContainer } from 'docs/src/components/action/InfoCard'; +import GetStartedButtons from 'docs/src/components/home/GetStartedButtons'; +import Section from 'docs/src/layouts/Section'; +import SectionHeadline from 'docs/src/components/typography/SectionHeadline'; +import GradientText from 'docs/src/components/typography/GradientText'; +import Link from 'docs/src/modules/components/Link'; +import ROUTES from 'docs/src/route'; + +export default function MaterialEnd() { + return ( +
+ `linear-gradient(180deg, ${(theme.vars || theme).palette.primaryDark[900]} 50%, + ${alpha(theme.palette.primary[800], 0.2)} 100%), ${ + (theme.vars || theme).palette.primaryDark[900] + }`, + }} + > + + + + Join our global community + + } + description={ + + Material UI wouldn't be possible without our global community of contributors. + Join us today to get help when you need it, and lend a hand when you can. + + } + /> + + + + li': { alignItems: 'flex-start' } }}> + + } /> +
+ + Material UI vs. Base UI + + + Material UI implements Google's Material Design whereas Base UI features many + of the same components, but without the Material Design implementation. + +
+
+ + } /> +
+ + Does it support Material 3? + + + The adoption of Material 3 is tentatively planned for Material UI v6. See the{' '} + + the release schedule + {' '} + and follow{' '} + + this GitHub issue + {' '} + for future updates. + +
+
+
+
+
+
+ ); +} diff --git a/docs/src/components/productX/XDataGrid.tsx b/docs/src/components/productX/XDataGrid.tsx index d6e8e0e2ca1d6f..bd61c9272e0be2 100644 --- a/docs/src/components/productX/XDataGrid.tsx +++ b/docs/src/components/productX/XDataGrid.tsx @@ -150,7 +150,7 @@ export default function XDataGrid() { zIndex: 1, height: 240, borderRadius: '10px 10px 0 0', - borderColor: 'grey.200', + borderColor: 'divider', '& .MuiDataGrid-root': { '& .MuiAvatar-root': { width: 24, height: 24, fontSize: 14, fontWeight: 'bold' }, '& .MuiDataGrid-footerContainer': { @@ -171,7 +171,7 @@ export default function XDataGrid() { }, (theme) => theme.applyDarkStyles({ - borderColor: 'primaryDark.600', + borderColor: 'divider', '& .MuiDataGrid-root': { '& .MuiDataGrid-footerContainer': { borderColor: 'primaryDark.600', diff --git a/docs/src/components/productX/XHero.tsx b/docs/src/components/productX/XHero.tsx index ed629ab539d745..8585a7a8ca1409 100644 --- a/docs/src/components/productX/XHero.tsx +++ b/docs/src/components/productX/XHero.tsx @@ -233,7 +233,7 @@ export default function XHero() { theme.applyDarkStyles({ '& .MuiDataGrid-root': { '& .MuiDataGrid-columnHeaders': { - borderColor: 'primaryDark.600', + borderColor: 'divider', }, '& .MuiDataGrid-cell': { borderColor: alpha(theme.palette.primaryDark[600], 0.5), @@ -258,6 +258,14 @@ export default function XHero() { backgroundColor: alpha(yellow[900], 0.2), borderColor: alpha(yellow[700], 0.2), }, + '& .MuiDataGrid-pinnedRows': { + backgroundColor: alpha(theme.palette.primaryDark[800], 1), + backgroundImage: 'none', + boxShadow: '0px -6px 12px rgba(0 0 0 / 0.5)', + '& .MuiDataGrid-footerCell': { + color: 'primary.light', + }, + }, }, }), ]} diff --git a/docs/src/components/productX/XTheming.tsx b/docs/src/components/productX/XTheming.tsx index 2038b5b30428f9..a2571519f4a0c1 100644 --- a/docs/src/components/productX/XTheming.tsx +++ b/docs/src/components/productX/XTheming.tsx @@ -127,13 +127,7 @@ export default function XTheming() { ({ - height: 418, - borderColor: 'grey.200', - ...theme.applyDarkStyles({ - borderColor: 'primaryDark.600', - }), - })} + sx={{ height: 418, borderColor: 'divider' }} > {dataGridStyleOverrides} + {overline && ( ({ + maxWidth: 500, ...(inverted ? { color: '#fff', @@ -51,6 +52,7 @@ export default function SectionHeadline(props: SectionHeadlineProps) { }), ...(alwaysCenter && { textAlign: 'center', + maxWidth: '100%', }), })} > @@ -59,7 +61,9 @@ export default function SectionHeadline(props: SectionHeadlineProps) { ) : ( React.cloneElement(title, { style: { + maxWidth: 500, ...(alwaysCenter && { + maxWidth: '100%', textAlign: 'center', }), ...(inverted && { @@ -72,6 +76,7 @@ export default function SectionHeadline(props: SectionHeadlineProps) { ({ mt: 1, + mb: 3, maxWidth: 500, ...(inverted ? { diff --git a/docs/src/layouts/Section.tsx b/docs/src/layouts/Section.tsx index b11f8a0dc97a84..e15d60292d7586 100644 --- a/docs/src/layouts/Section.tsx +++ b/docs/src/layouts/Section.tsx @@ -6,9 +6,10 @@ import { alpha } from '@mui/material/styles'; interface SelectionProps extends BoxProps { bg?: 'white' | 'comfort' | 'dim' | 'gradient' | 'transparent'; /** - * More spacing + * Less vertical spacing */ cozy?: boolean; + noPaddingBottom?: boolean; } const map = { @@ -31,7 +32,7 @@ const map = { }; const Section = React.forwardRef(function Section(props, ref) { - const { bg = 'white', children, sx, cozy = false, ...other } = props; + const { bg = 'white', children, sx, cozy = false, noPaddingBottom = false, ...other } = props; return ( (function Sectio bgcolor: map[bg].dark, }), }), - py: cozy ? { xs: 6, sm: 8, md: 10 } : { xs: 4, sm: 12, md: 14 }, + py: cozy ? { xs: 6, sm: 10, md: 12 } : { xs: 4, sm: 12, md: 14 }, + pb: noPaddingBottom ? '0 !important' : undefined, overflow: 'hidden', }), ...(Array.isArray(sx) ? sx : [sx]), diff --git a/docs/src/modules/brandingTheme.ts b/docs/src/modules/brandingTheme.ts index 606f60402ebcd8..9db10c1a3e22ed 100644 --- a/docs/src/modules/brandingTheme.ts +++ b/docs/src/modules/brandingTheme.ts @@ -837,7 +837,7 @@ export function getThemedComponents(): ThemeOptions { }, styleOverrides: { root: ({ theme }) => ({ - fontWeight: 700, + fontWeight: theme.typography.fontWeightSemiBold, display: 'inline-flex', alignItems: 'center', '&.MuiTypography-body1 > svg': {