diff --git a/docs/pages/_app.js b/docs/pages/_app.js index b17a4b54351526..a9b1066aac2118 100644 --- a/docs/pages/_app.js +++ b/docs/pages/_app.js @@ -163,7 +163,7 @@ function AppWrapper(props) { if (productId === 'material-ui') { return { - metadata: 'MUI Core', + metadata: '', name: 'Material UI', versions: [ { text: `v${materialPkgJson.version}`, current: true }, @@ -182,7 +182,7 @@ function AppWrapper(props) { if (productId === 'joy-ui') { return { - metadata: 'MUI Core', + metadata: '', name: 'Joy UI', versions: [{ text: `v${joyPkgJson.version}`, current: true }], }; @@ -190,7 +190,7 @@ function AppWrapper(props) { if (productId === 'system') { return { - metadata: 'MUI Core', + metadata: '', name: 'MUI System', versions: [ { text: `v${systemPkgJson.version}`, current: true }, @@ -206,7 +206,7 @@ function AppWrapper(props) { if (productId === 'base-ui') { return { - metadata: 'MUI Core', + metadata: '', name: 'Base UI', versions: [{ text: `v${basePkgJson.version}`, current: true }], }; diff --git a/docs/pages/experiments/website/branding-theme-test.tsx b/docs/pages/experiments/website/branding-theme-test.tsx index 82e5393540bdbf..67140e15e00d5b 100644 --- a/docs/pages/experiments/website/branding-theme-test.tsx +++ b/docs/pages/experiments/website/branding-theme-test.tsx @@ -43,7 +43,7 @@ export default function BrandingThemeTest() { - diff --git a/docs/src/components/header/ThemeModeToggle.tsx b/docs/src/components/header/ThemeModeToggle.tsx index fda2d61676d99d..05bfa95bb8ea14 100644 --- a/docs/src/components/header/ThemeModeToggle.tsx +++ b/docs/src/components/header/ThemeModeToggle.tsx @@ -14,6 +14,7 @@ function CssVarsModeToggle(props: { onChange: (newMode: string) => void }) { { @@ -51,6 +52,7 @@ export default function ThemeModeToggle() { { setMode(calculatedMode === 'dark' ? 'light' : 'dark'); diff --git a/docs/src/icons/SvgHamburgerMenu.tsx b/docs/src/icons/SvgHamburgerMenu.tsx index e47c00f841f79b..834d16372b7b6a 100644 --- a/docs/src/icons/SvgHamburgerMenu.tsx +++ b/docs/src/icons/SvgHamburgerMenu.tsx @@ -5,8 +5,8 @@ export default function SvgHamburgerMenu(props: RootSvgProps) { return ( prop !== 'disablePermanent', })(({ disablePermanent, theme }) => { return { - padding: theme.spacing(1, 2), + padding: theme.spacing(1.5), transition: theme.transitions.create('width'), ...(disablePermanent && { boxShadow: 'none', @@ -112,25 +111,19 @@ const StyledAppBar = styled(AppBar, { width: 'calc(100% - var(--MuiDocs-navDrawer-width))', }, }), + justifyContent: 'center', boxShadow: 'none', backdropFilter: 'blur(8px)', - borderStyle: 'solid', - borderColor: (theme.vars || theme).palette.divider, - borderWidth: 0, - borderBottomWidth: 'thin', - backgroundColor: 'rgba(255,255,255,0.8)', + borderBottom: `1px solid ${(theme.vars || theme).palette.divider}`, + backgroundColor: 'hsla(0, 0%, 100%, 0.6)', color: (theme.vars || theme).palette.grey[800], ...theme.applyDarkStyles({ - backgroundColor: alpha(theme.palette.primaryDark[900], 0.8), + backgroundColor: alpha(theme.palette.primaryDark[900], 0.6), color: (theme.vars || theme).palette.grey[500], }), }; }); -const GrowingDiv = styled('div')({ - flex: '1 1 auto', -}); - const NavIconButton = styled(IconButton, { shouldForwardProp: (prop) => prop !== 'disablePermanent', })(({ disablePermanent, theme }) => { @@ -156,7 +149,7 @@ const StyledAppNavDrawer = styled(AppNavDrawer)(({ disablePermanent, theme }) => }; }); -export const HEIGHT = 64; +export const HEIGHT = 57; export default function AppFrame(props) { const { children, disableDrawer = false, className, BannerComponent = AppFrameBanner } = props; @@ -178,7 +171,10 @@ export default function AppFrame(props) { - + - + setMobileOpen(true)} @@ -206,14 +203,14 @@ export default function AppFrame(props) { - - + - setSettingsOpen(true)} sx={{ px: '8px' }}> + setSettingsOpen(true)}> - + ({ + pl: 1, + pr: '6px', + height: 26, + fontSize: theme.typography.pxToRem(13), + fontWeight: theme.typography.fontWeightMedium, + letterSpacing: '0.01rem', +}); + function ProductDrawerButton(props) { const [anchorEl, setAnchorEl] = React.useState(null); @@ -67,26 +76,14 @@ function ProductDrawerButton(props) { return ( @@ -121,8 +118,8 @@ function ProductIdentifier(props) { ({ - ml: 1, - fontSize: theme.typography.pxToRem(11), + ml: '6px', + fontSize: theme.typography.pxToRem(10), fontWeight: theme.typography.fontWeightBold, textTransform: 'uppercase', letterSpacing: '.1rem', @@ -184,7 +181,7 @@ PersistScroll.propTypes = { }; const ToolbarDiv = styled('div')(({ theme }) => ({ - padding: theme.spacing(1.6, 2), + padding: theme.spacing(1.5), paddingRight: 0, flexShrink: 0, height: 'var(--MuiDocs-header-height)', @@ -193,6 +190,8 @@ const ToolbarDiv = styled('div')(({ theme }) => ({ flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between', + borderBottom: '1px solid', + borderColor: (theme.vars || theme).palette.divider, })); const StyledDrawer = styled(Drawer)(({ theme }) => ({ @@ -323,7 +322,7 @@ export default function AppNavDrawer(props) { const drawer = React.useMemo(() => { const navItems = renderNavItems({ onClose, pages, activePageParents, depth: 0, t }); - const renderVersionSelector = (versions, sx) => { + const renderVersionSelector = (versions) => { if (!versions?.length) { return null; } @@ -332,6 +331,9 @@ export default function AppNavDrawer(props) { return ( @@ -371,7 +356,7 @@ export default function AppNavDrawer(props) { {versions.map((item) => { if (item.text === 'View all versions') { return [ - , + , {/* eslint-disable-next-line material-ui/no-hardcoded-labels -- version string is untranslatable */} {`View all versions`} @@ -392,7 +377,7 @@ export default function AppNavDrawer(props) { onClick: onClose, })} > - {item.text} {item.current && } + {item.text} {item.current && } ); })} @@ -405,17 +390,7 @@ export default function AppNavDrawer(props) { - + @@ -425,7 +400,6 @@ export default function AppNavDrawer(props) { versionSelector={renderVersionSelector(productIdentifier.versions)} /> - [ { - minHeight: 34, - minWidth: 34, + minHeight: 32, + minWidth: 32, + margin: 0, + paddingLeft: theme.spacing(1), display: 'flex', alignItems: 'center', - margin: 0, - paddingLeft: theme.spacing(0.6), + gap: '6px', [theme.breakpoints.only('xs')]: { backgroundColor: 'transparent', padding: 0, @@ -44,20 +45,21 @@ const SearchButton = styled('button')(({ theme }) => [ display: 'none', }, }, - fontFamily: theme.typography.fontFamily, position: 'relative', - backgroundColor: (theme.vars || theme).palette.grey[50], - color: (theme.vars || theme).palette.text.secondary, + backgroundColor: alpha(theme.palette.grey[50], 0.6), + fontFamily: theme.typography.fontFamily, fontSize: theme.typography.pxToRem(14), + color: (theme.vars || theme).palette.text.secondary, border: `1px solid ${(theme.vars || theme).palette.grey[200]}`, borderRadius: (theme.vars || theme).shape.borderRadius, cursor: 'pointer', transitionProperty: 'all', transitionDuration: '150ms', - boxShadow: `hsl(200, 0%, 100%) 0 2px 0 inset, ${alpha(theme.palette.grey[100], 0.5)} 0 -1.5px 0 inset, ${alpha(theme.palette.grey[200], 0.5)} 0 1px 2px 0`, + boxShadow: `hsl(200, 0%, 100%) 0 1px 0 inset, ${alpha(theme.palette.grey[100], 0.4)} 0 -1px 0 inset, ${alpha(theme.palette.grey[200], 0.5)} 0 1px 2px 0`, '&:hover': { - background: (theme.vars || theme).palette.grey[100], + background: alpha(theme.palette.grey[100], 0.5), borderColor: (theme.vars || theme).palette.grey[300], + boxShadow: 'none', }, '&:focus-visible': { outline: `3px solid ${alpha(theme.palette.primary[500], 0.5)}`, @@ -66,25 +68,29 @@ const SearchButton = styled('button')(({ theme }) => [ }, theme.applyDarkStyles({ backgroundColor: alpha(theme.palette.primaryDark[700], 0.4), - borderColor: (theme.vars || theme).palette.primaryDark[700], - boxShadow: `${alpha(theme.palette.primaryDark[600], 0.1)} 0 2px 0 inset, ${(theme.vars || theme).palette.common.black} 0 -2px 0 inset, ${(theme.vars || theme).palette.common.black} 0 1px 2px 0`, + borderColor: alpha(theme.palette.primaryDark[600], 0.4), + boxShadow: `${alpha(theme.palette.primaryDark[600], 0.1)} 0 1px 0 inset, ${(theme.vars || theme).palette.common.black} 0 -1px 0 inset, ${(theme.vars || theme).palette.common.black} 0 1px 2px 0`, '&:hover': { background: (theme.vars || theme).palette.primaryDark[700], borderColor: (theme.vars || theme).palette.primaryDark[600], + boxShadow: 'none', }, }), ]); const SearchLabel = styled('span')(({ theme }) => ({ - marginLeft: theme.spacing(1), marginRight: 'auto', + marginBottom: '1px', // optical alignment + color: (theme.vars || theme).palette.text.tertiary, + lineHeight: 1, })); -const Shortcut = styled('div')(({ theme }) => { +const Shortcut = styled('kbd')(({ theme }) => { return { + all: 'unset', fontSize: theme.typography.pxToRem(12), fontWeight: 'bold', - lineHeight: '20px', + lineHeight: '19px', marginLeft: theme.spacing(0.5), border: `1px solid ${(theme.vars || theme).palette.grey[200]}`, backgroundColor: '#FFF', @@ -427,15 +433,7 @@ export default function AppSearch(props) { aria-labelledby="app-search-label" {...props} > - ({ - color: 'primary.500', - ...theme.applyDarkStyles({ - color: 'primary.300', - }), - })} - /> + {t('searchButton')}