Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[website] Add product core page #27952

Merged
merged 226 commits into from
Sep 1, 2021
Merged
Show file tree
Hide file tree
Changes from 202 commits
Commits
Show all changes
226 commits
Select commit Hold shift + click to select a range
2e410e2
fix relative imports
siriwatknp Aug 9, 2021
1c9e1f6
remove scaling
siriwatknp Aug 9, 2021
6c1748f
fix references mobile columns
siriwatknp Aug 9, 2021
431c7e8
update ThemeToggle to new design
siriwatknp Aug 9, 2021
d7c088d
fix semantic issue
siriwatknp Aug 9, 2021
906648b
add meta tag
siriwatknp Aug 9, 2021
50032cd
fix heading descending order
siriwatknp Aug 9, 2021
2ed9431
wrap code demo with NoSsr to reduce DOM size
siriwatknp Aug 9, 2021
f3e331d
fix a11y issues
siriwatknp Aug 9, 2021
32e1e41
Add more sponsors and adjust img sizes
siriwatknp Aug 10, 2021
b62e48c
fix imports
siriwatknp Aug 10, 2021
ed82e20
fix lowercase and increase maxwidth
siriwatknp Aug 10, 2021
42246f3
add hidden store template images to load before hand
siriwatknp Aug 10, 2021
40717e3
load DesignKitBg before hand
siriwatknp Aug 10, 2021
c3c8d4d
change maxHeight to prevent layout shift
siriwatknp Aug 10, 2021
27de448
remove hardcoded year at Footer
siriwatknp Aug 10, 2021
bec25ef
add social links to Footer
siriwatknp Aug 10, 2021
5f5dbd0
switch to MUI send in blue
siriwatknp Aug 10, 2021
bd10fa8
Merge branch 'next' of https://github.com/mui-org/material-ui into re…
siriwatknp Aug 11, 2021
deef192
add store routes
siriwatknp Aug 11, 2021
dcd604a
rework design kits section
siriwatknp Aug 11, 2021
7a45e73
add links to store for template section
siriwatknp Aug 11, 2021
0bbfe91
fix themed components
siriwatknp Aug 11, 2021
f7b9108
add new themed components
siriwatknp Aug 11, 2021
2310e39
refactor hero section
siriwatknp Aug 11, 2021
de61baf
add focus styles
siriwatknp Aug 11, 2021
167fad7
complete advanced showcase
siriwatknp Aug 12, 2021
924ebab
refactor images
siriwatknp Aug 12, 2021
3c531d0
rename compoents
siriwatknp Aug 12, 2021
0229769
fix references section
siriwatknp Aug 12, 2021
bd20641
adjust color
siriwatknp Aug 12, 2021
b4460d1
minor fixes
siriwatknp Aug 12, 2021
9fd022f
fix a11y
siriwatknp Aug 12, 2021
7cf0e13
fix a11y issues
siriwatknp Aug 12, 2021
6972016
add main section
siriwatknp Aug 12, 2021
600ada5
fix semantic and font
siriwatknp Aug 12, 2021
46f4dd0
add designkits branding prefetch
siriwatknp Aug 12, 2021
c04e34c
remove tabs to reduce motion
siriwatknp Aug 12, 2021
40a09ad
fix aria-label
siriwatknp Aug 12, 2021
3300fa3
fix wording
siriwatknp Aug 12, 2021
14fcff9
prevent focus on Hero components
siriwatknp Aug 12, 2021
164e61d
typo, missing space
oliviertassinari Aug 12, 2021
ac918e4
some overall design adjustments
danilo-leal Aug 12, 2021
66c3a67
success alert styling
danilo-leal Aug 12, 2021
94762bf
wording
danilo-leal Aug 12, 2021
0e1e703
Material-UI -> MUI
danilo-leal Aug 12, 2021
b8fbbe3
sponsors spacing tweak
danilo-leal Aug 12, 2021
e59073a
small adjustments
danilo-leal Aug 12, 2021
d79d749
more small tweaks and copywriting corrections
danilo-leal Aug 12, 2021
ab3006e
sponsors grid refinement
danilo-leal Aug 12, 2021
b0a6f90
minor fixes
siriwatknp Aug 13, 2021
5be2575
remove static images
siriwatknp Aug 13, 2021
b62e5c4
Merge branch 'rebranding/homepage2' of github.com:siriwatknp/material…
siriwatknp Aug 13, 2021
2934d70
fix margin and spacing
siriwatknp Aug 13, 2021
f12c03f
test new ux on the core showcase
siriwatknp Aug 13, 2021
12e85a5
fix layout
siriwatknp Aug 13, 2021
0669545
add transition
siriwatknp Aug 13, 2021
28f421c
support dark on core showcase
siriwatknp Aug 13, 2021
5bad676
run prettier and docs:formatted
siriwatknp Aug 13, 2021
37d79ab
move tooltip to local styling
siriwatknp Aug 13, 2021
2282a98
remove unused code
siriwatknp Aug 13, 2021
1a7f8fd
Update docs/src/components/home/Sponsors.tsx
siriwatknp Aug 14, 2021
052c524
Merge branch 'rebranding/homepage2' of github.com:siriwatknp/material…
siriwatknp Aug 14, 2021
86a871a
Merge branch 'next' of https://github.com/mui-org/material-ui into re…
siriwatknp Aug 14, 2021
33d604b
use xGrid in advanced showcase
siriwatknp Aug 14, 2021
68a3d65
skip tab in hero
siriwatknp Aug 14, 2021
cdf3dfb
minor adjustments
siriwatknp Aug 14, 2021
eed2696
fix types
siriwatknp Aug 14, 2021
3057944
fix switch thumb styles
siriwatknp Aug 14, 2021
38bc73c
add @media (prefers-reduced-motion)
oliviertassinari Aug 14, 2021
55d653c
capitalization convention
oliviertassinari Aug 14, 2021
11c27ee
use the full legal name
oliviertassinari Aug 14, 2021
92eef1b
We will have a third repository for the low-code effort
oliviertassinari Aug 14, 2021
6ab9e8c
add h3 section
oliviertassinari Aug 14, 2021
f06c93d
no jargon
oliviertassinari Aug 14, 2021
caf13be
English format
oliviertassinari Aug 14, 2021
07d0724
fix icons on ValueProposition
siriwatknp Aug 15, 2021
545009c
fix icons in WhatToExpect
siriwatknp Aug 15, 2021
d0174a6
fix icons on about
siriwatknp Aug 15, 2021
1458d93
fix icon color
siriwatknp Aug 15, 2021
1fad0fc
Merge branch 'rebranding/homepage2' of github.com:siriwatknp/material…
siriwatknp Aug 15, 2021
99ee152
add custom theme suggestion
siriwatknp Aug 15, 2021
7d160c5
design details
danilo-leal Aug 16, 2021
ff49213
tweaks on the hamburguer menu and other minor stuff
danilo-leal Aug 16, 2021
9e6a090
Merge branch 'next' into rebranding/homepage2
siriwatknp Aug 17, 2021
adccc60
fix colors
siriwatknp Aug 17, 2021
adca51b
cleanup outdated core showcase
siriwatknp Aug 17, 2021
d68fee9
run docs formatted
siriwatknp Aug 17, 2021
27a2fe7
fix stat number
siriwatknp Aug 17, 2021
fe448cc
add wip core page
siriwatknp Aug 17, 2021
1d40914
wip product advanced x
siriwatknp Aug 17, 2021
f82f5a8
add icons to XDataGrid
siriwatknp Aug 17, 2021
85235ab
add icons to XComponents
siriwatknp Aug 17, 2021
0688b9d
add icons to XRoadmap
siriwatknp Aug 17, 2021
c8e3a4a
wrap icons with RootSvg
siriwatknp Aug 17, 2021
d165bfc
add overline to CoreHero
siriwatknp Aug 17, 2021
f916a8d
fix missin id
siriwatknp Aug 17, 2021
f66c283
add empty id
siriwatknp Aug 17, 2021
d71141d
add wip templates page
siriwatknp Aug 17, 2021
32654e7
add wip design-kits page
siriwatknp Aug 17, 2021
cf4609f
add designkit components images
siriwatknp Aug 16, 2021
e558c5f
complete design-kits page
siriwatknp Aug 16, 2021
9abbed6
refactor Hero
siriwatknp Aug 16, 2021
4e00409
add template banners to product template page
siriwatknp Aug 16, 2021
468fdcf
fix shadow
siriwatknp Aug 16, 2021
909f186
complete product template page
siriwatknp Aug 16, 2021
55fe3ae
add link to store
siriwatknp Aug 16, 2021
ef399aa
add wip XHero
siriwatknp Aug 17, 2021
227caae
add FolderTreeView customization
siriwatknp Aug 18, 2021
f889689
add components to XHero
siriwatknp Aug 18, 2021
8baa7e9
Merge branch 'next' of https://github.com/mui-org/material-ui into re…
siriwatknp Aug 18, 2021
ad714b1
remove x-grid related
siriwatknp Aug 21, 2021
a2582e7
Merge branch 'next' of https://github.com/mui-org/material-ui into re…
siriwatknp Aug 21, 2021
bf07580
fix merge conflict
siriwatknp Aug 21, 2021
4d296e5
replace custom icons
siriwatknp Aug 21, 2021
8403de9
add default styling
siriwatknp Aug 21, 2021
f19c5e1
add demo to CoreComponents
siriwatknp Aug 21, 2021
ac59b60
add Demo to CoreTheming
siriwatknp Aug 21, 2021
ae3c127
add RealEstateCard to CoreStyling
siriwatknp Aug 21, 2021
de68918
add spacing
siriwatknp Aug 22, 2021
f203ec5
fix theming button bg
siriwatknp Aug 22, 2021
87ee17e
add material design components to hero
siriwatknp Aug 23, 2021
0382a1b
add scroll to highlight area
siriwatknp Aug 23, 2021
aa48c67
init refinement
siriwatknp Aug 23, 2021
3c9b982
colors refinement
danilo-leal Aug 23, 2021
f02c8f7
"not available" icon
danilo-leal Aug 23, 2021
c641e64
profile role text color
danilo-leal Aug 23, 2021
f87065d
pricing table adjustment
danilo-leal Aug 23, 2021
af6f042
early bird container tweaks
danilo-leal Aug 23, 2021
8ac1dc5
pricing table labels
danilo-leal Aug 23, 2021
b2d2b97
home page details
danilo-leal Aug 23, 2021
684f0fd
removing custom icons
danilo-leal Aug 23, 2021
bc81b97
minor stuff on the about page
danilo-leal Aug 23, 2021
a4b4240
standardize tooltip styles between pricing table and about
danilo-leal Aug 23, 2021
7bed031
about icon colors
danilo-leal Aug 23, 2021
b683b51
remove custom icons from about page
danilo-leal Aug 23, 2021
6f75e5a
minor details
danilo-leal Aug 23, 2021
df48355
link font weight
danilo-leal Aug 23, 2021
d9beee7
minor details
danilo-leal Aug 23, 2021
4cf5ac2
improve keyboard handling in nav
siriwatknp Aug 24, 2021
1fb1ee8
use primary.400 as main in darkmode
siriwatknp Aug 24, 2021
4d2dc2a
Merge branch 'rebranding/refinement' of github.com:siriwatknp/materia…
siriwatknp Aug 24, 2021
5c09616
make menu dropdown scrollable
siriwatknp Aug 24, 2021
f3e6033
add feature toggle for products menu
siriwatknp Aug 24, 2021
7800b21
add rich result structure to home
siriwatknp Aug 24, 2021
5b3fcf4
force html font-size
siriwatknp Aug 24, 2021
556f794
fix width
siriwatknp Aug 24, 2021
590db09
fix transparent issue
siriwatknp Aug 24, 2021
f470fb1
fix own styling toggle ui
siriwatknp Aug 24, 2021
beeb67d
run prettier
siriwatknp Aug 24, 2021
c972a97
fix pricing styling
siriwatknp Aug 24, 2021
95fea19
fix links
siriwatknp Aug 24, 2021
18ecde8
adjust chip
siriwatknp Aug 24, 2021
501d0ce
add tooltip to mode toggle
siriwatknp Aug 24, 2021
0920d6f
pass href to button
siriwatknp Aug 24, 2021
321af83
remove transition in sponsor
siriwatknp Aug 24, 2021
c5e3390
iterating with centering the icons
danilo-leal Aug 24, 2021
e7cc4f6
iterating with row hover bg
danilo-leal Aug 24, 2021
8e50365
iterating with the code flash margin
danilo-leal Aug 24, 2021
92b87bd
copywriting corrections
danilo-leal Aug 24, 2021
9209486
fix "buy now" link
danilo-leal Aug 24, 2021
732a66b
fix "buy now" link on mobile
danilo-leal Aug 24, 2021
e7aeed3
early bird icon spacing
danilo-leal Aug 24, 2021
bde4471
logo baseline alignment
danilo-leal Aug 24, 2021
686e55b
email subscription small tweak
danilo-leal Aug 24, 2021
a0d2a01
copywriting corrections
danilo-leal Aug 24, 2021
bf83374
add non breaking space on the hero copy
danilo-leal Aug 24, 2021
9d2a8e0
iteration on the sponsors section
danilo-leal Aug 24, 2021
2dcbfb4
small adjustments
danilo-leal Aug 24, 2021
c3e2a04
data grid accordion icon transition velocity
danilo-leal Aug 24, 2021
3e219de
data grid accordion row height
danilo-leal Aug 24, 2021
95aff16
iteration on the copywriting of value proposition and component demo …
danilo-leal Aug 24, 2021
4f9d194
Merge branch 'rebranding/refinement' of github.com:siriwatknp/materia…
siriwatknp Aug 25, 2021
25a90c8
increase logo size for diamond sponsor
siriwatknp Aug 25, 2021
0dfc6e4
fix pricing overflow
siriwatknp Aug 25, 2021
810d1fc
update pricing sticky head
siriwatknp Aug 25, 2021
92c600c
fix typo
siriwatknp Aug 25, 2021
bf1ff33
no bg for touch device
siriwatknp Aug 25, 2021
3898258
use the same ThemeContext between rebranding and docs
siriwatknp Aug 25, 2021
aaa26b7
update meta theme color
siriwatknp Aug 25, 2021
7cf21d8
Merge branch 'next' of https://github.com/mui-org/material-ui into re…
siriwatknp Aug 25, 2021
5fdcf4f
fix anchor underline
siriwatknp Aug 25, 2021
99c5271
cleanup deprecated ThemeProvider
siriwatknp Aug 25, 2021
011ea80
remove `passHref`
siriwatknp Aug 25, 2021
e5b21ce
run prettier
siriwatknp Aug 25, 2021
9d8aeec
change social preview
siriwatknp Aug 25, 2021
3b60598
fix lint
siriwatknp Aug 25, 2021
0a5bc26
remove minWidth
siriwatknp Aug 25, 2021
c3a81c6
adjust table of content color
siriwatknp Aug 25, 2021
a62661d
move CssBaseline to BrandingProvider
siriwatknp Aug 25, 2021
01f8cbb
Merge commit 'a62661ded4b9d12c4180f0d473be8d5d9861d824' into rebrandi…
siriwatknp Aug 25, 2021
54161ad
fix merge conflict
siriwatknp Aug 25, 2021
159a8ee
Merge branch 'next' of https://github.com/mui-org/material-ui into re…
siriwatknp Aug 30, 2021
974b8d9
minor adjustment
siriwatknp Aug 30, 2021
5eccdf3
remove last line
siriwatknp Aug 30, 2021
7c14c97
remove unused files
siriwatknp Aug 30, 2021
57c4697
set min-height
siriwatknp Aug 30, 2021
92d78be
revert code
siriwatknp Aug 30, 2021
d78f573
revert code
siriwatknp Aug 30, 2021
40c23ed
revert code
siriwatknp Aug 30, 2021
2812b8c
bring back some code (remove later)
siriwatknp Aug 30, 2021
15c0472
fix lint
siriwatknp Aug 30, 2021
704a2bf
improve forward ref debug
siriwatknp Aug 31, 2021
fb7103e
fix as suggested
siriwatknp Aug 31, 2021
6e5c5bd
add dragable UX
siriwatknp Aug 31, 2021
ace6cf8
fix typo
siriwatknp Aug 31, 2021
753a75d
fix lint
siriwatknp Aug 31, 2021
f6c1e33
adjust copy writing
siriwatknp Aug 31, 2021
4a57247
removing data picker from hero and several other tweaks and component…
danilo-leal Aug 31, 2021
04f53db
adjustments to the CoreComponents section
danilo-leal Aug 31, 2021
1cc08b0
adjustments on the CoreTheming section
danilo-leal Aug 31, 2021
f21a0be
copywriting iteration
danilo-leal Aug 31, 2021
96b30b4
copywriting iteration for the CoreStyling section
danilo-leal Aug 31, 2021
3bbce56
small tweaks to the SectionHeadline component
danilo-leal Aug 31, 2021
1224ca3
button demo responsive tweak
danilo-leal Aug 31, 2021
20a3657
swapping icons for material ones
danilo-leal Aug 31, 2021
423169d
player card responsive adjustment
danilo-leal Aug 31, 2021
5d475b5
minor adjustment on the core theming demo code
danilo-leal Aug 31, 2021
22c5043
prettier and fix lint
siriwatknp Sep 1, 2021
d6782a0
refactor
siriwatknp Sep 1, 2021
b920bd2
fix lint
siriwatknp Sep 1, 2021
bf901ee
remove tooltip
siriwatknp Sep 1, 2021
9736e95
adjust alignment
siriwatknp Sep 1, 2021
d6e01d1
Merge branch 'next' into rebranding/product-core
siriwatknp Sep 1, 2021
c1f4f98
transform docs/src
siriwatknp Sep 1, 2021
e9be319
transform docs/pages
siriwatknp Sep 1, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions docs/pages/branding/core.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import * as React from 'react';
import Head from 'docs/src/modules/components/Head';
import BrandingProvider from 'docs/src/BrandingProvider';
import CssBaseline from '@material-ui/core/CssBaseline';
import AppHeader from 'docs/src/layouts/AppHeader';
import CoreHero from 'docs/src/components/productCore/CoreHero';
import CoreComponents from 'docs/src/components/productCore/CoreComponents';
import CoreTheming from 'docs/src/components/productCore/CoreTheming';
import CoreStyling from 'docs/src/components/productCore/CoreStyling';
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';

export default function Home() {
return (
<BrandingProvider>
<Head
title="MUI: A popular React UI framework"
description="The ultimate solution for your UI. MUI provides a robust, customizible and accessible library of foundational and advanced components, enabling you to build your own design system and develop React applications faster."
/>
<CssBaseline />
<AppHeader />
<main>
<CoreHero />
<References companies={CORE_CUSTOMERS} />
<CoreComponents />
<CoreTheming />
<CoreStyling />
<CoreHeroEnd />
</main>
<AppFooter />
</BrandingProvider>
);
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/public/static/images/cards/yosemite.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
39 changes: 20 additions & 19 deletions docs/src/components/action/Frame.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import * as React from 'react';
import { ThemeProvider } from '@material-ui/core/styles';
import Box, { BoxProps } from '@material-ui/core/Box';
import { brandingDarkTheme } from 'docs/src/modules/brandingTheme';

const Demo = (props: BoxProps) => {
const Demo = React.forwardRef<HTMLDivElement, BoxProps>((props, ref) => {
siriwatknp marked this conversation as resolved.
Show resolved Hide resolved
return (
<Box
ref={ref}
{...props}
sx={{
position: 'relative',
Expand All @@ -16,31 +15,32 @@ const Demo = (props: BoxProps) => {
}}
/>
);
};
});

const Info = (props: BoxProps) => {
const Info = React.forwardRef<HTMLDivElement, BoxProps>((props, ref) => {
return (
<ThemeProvider theme={brandingDarkTheme}>
<Box
{...props}
sx={{
color: '#fff',
p: 2,
bgcolor: 'primaryDark.800',
border: '1px solid',
borderColor: 'primaryDark.700',
...props.sx,
}}
/>
</ThemeProvider>
<Box
ref={ref}
{...props}
sx={{
color: '#fff',
p: 2,
bgcolor: 'primaryDark.800',
border: '1px solid',
borderColor: 'primaryDark.700',
...props.sx,
}}
/>
);
};
});

const Frame = (props: BoxProps) => {
return (
<Box
{...props}
sx={{
display: 'flex',
flexDirection: 'column',
'& > div:first-of-type': {
borderTopLeftRadius: '10px',
borderTopRightRadius: '10px',
Expand All @@ -49,6 +49,7 @@ const Frame = (props: BoxProps) => {
borderBottomLeftRadius: '10px',
borderBottomRightRadius: '10px',
},
...props.sx,
}}
/>
);
Expand Down
33 changes: 23 additions & 10 deletions docs/src/components/action/Item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,16 +84,29 @@ export default function Item({
...props.sx,
}}
>
{icon}
<Typography
component="span"
color="text.primary"
sx={{ ml: 2 }}
variant="body2"
fontWeight="bold"
>
{title}
</Typography>
<Box sx={{ mr: 2, lineHeight: 0 }}>{icon}</Box>
<div>
<Typography
component="span"
color="text.primary"
variant="body2"
fontWeight="bold"
sx={{ display: 'block' }}
>
{title}
</Typography>
{description && (
<Typography
component="span"
color="text.secondary"
variant="body2"
fontWeight="regular"
sx={{ mt: 0.5 }}
>
{description}
</Typography>
)}
</div>
</Box>
);
}
74 changes: 74 additions & 0 deletions docs/src/components/action/StylingInfo.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
import * as React from 'react';
import { ThemeProvider, alpha } from '@material-ui/core/styles';
import Box, { BoxProps } from '@material-ui/core/Box';
import IconButton from '@material-ui/core/IconButton';
import Typography from '@material-ui/core/Typography';
import Tooltip from '@material-ui/core/Tooltip';
import KeyboardArrowUpRounded from '@material-ui/icons/KeyboardArrowUpRounded';
import KeyboardArrowDownRounded from '@material-ui/icons/KeyboardArrowDownRounded';
import Link from 'docs/src/modules/components/Link';
import { brandingDarkTheme } from 'docs/src/modules/brandingTheme';
import ROUTES from 'docs/src/route';

export default function StylingInfo({ appeared, ...props }: { appeared: boolean } & BoxProps) {
const [hidden, setHidden] = React.useState(false);
return (
<ThemeProvider theme={brandingDarkTheme}>
<Box
{...props}
sx={{
position: 'absolute',
bottom: 0,
transform: hidden || !appeared ? 'translateY(100%)' : 'translateY(0)',
transition: '0.3s',
left: 0,
right: 0,
px: 2,
pt: 1,
pb: 2,
bgcolor: ({ palette }) => alpha(palette.primaryDark[700], 0.5),
backdropFilter: 'blur(8px)',
zIndex: 1,
borderTop: '1px solid',
borderColor: 'divider',
borderRadius: '0 0 10px 10px',
...props.sx,
}}
>
<Tooltip title={hidden ? 'Show' : 'Hide'} placement="left">
<IconButton
disabled={!appeared}
onClick={() => setHidden((bool) => !bool)}
sx={{
position: 'absolute',
zIndex: 2,
transition: '0.3s',
right: 10,
bottom: '100%',
transform: hidden || !appeared ? 'translateY(-10px)' : 'translateY(50%)',
opacity: appeared ? 1 : 0,
bgcolor: 'primaryDark.500',
'&:hover, &.Mui-focused': {
bgcolor: 'primaryDark.600',
},
}}
>
{hidden ? (
<KeyboardArrowUpRounded fontSize="small" />
) : (
<KeyboardArrowDownRounded fontSize="small" />
)}
</IconButton>
</Tooltip>
<Typography fontWeight="bold" color="#fff" variant="body2">
Own the styling!
</Typography>
<Typography color="grey.400" variant="body2">
Build your own design system using the{' '}
<Link href={ROUTES.theming}>sophisticated theming features</Link>. You can also start by
using Google&apos;s Material Design.
</Typography>
</Box>
</ThemeProvider>
);
}
61 changes: 2 additions & 59 deletions docs/src/components/home/CoreShowcase.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,15 @@ import { ThemeProvider, createTheme, useTheme, styled, alpha } from '@material-u
import { shouldForwardProp } from '@material-ui/system';
import Box from '@material-ui/core/Box';
import Button from '@material-ui/core/Button';
import IconButton from '@material-ui/core/IconButton';
import Typography from '@material-ui/core/Typography';
import Tooltip from '@material-ui/core/Tooltip';
import HighlightedCode from 'docs/src/modules/components/HighlightedCode';
import { getDesignTokens, getThemedComponents } from 'docs/src/modules/brandingTheme';
import MarkdownElement from 'docs/src/components/markdown/MarkdownElement';
import MaterialDesignDemo, { componentCode } from 'docs/src/components/home/MaterialDesignDemo';
import ShowcaseContainer from 'docs/src/components/home/ShowcaseContainer';
import PointerContainer, { Data } from 'docs/src/components/home/ElementPointer';
import KeyboardArrowDownRounded from '@material-ui/icons/KeyboardArrowDownRounded';
import KeyboardArrowUpRounded from '@material-ui/icons/KeyboardArrowUpRounded';
import TouchAppRounded from '@material-ui/icons/TouchAppRounded';
import StylingInfo from 'docs/src/components/action/StylingInfo';

const darkDesignTokens = getDesignTokens('dark');

Expand Down Expand Up @@ -95,7 +92,6 @@ export default function CoreShowcase() {
const mode = globalTheme.palette.mode;
const [element, setElement] = React.useState<Data>({ id: null, name: null, target: null });
const [customized, setCustomized] = React.useState(false);
const [hidden, setHidden] = React.useState(false); // for custom theme suggestion
const theme = React.useMemo(
() =>
customized
Expand Down Expand Up @@ -295,60 +291,7 @@ export default function CoreShowcase() {
<FlashCode startLine={startLine} endLine={endLine} sx={{ mx: -2 }} />
)}
<HighlightedCode component={MarkdownElement} code={componentCode} language="jsx" />
<Box
sx={{
position: 'absolute',
bottom: 0,
transform: hidden || !customized ? 'translateY(100%)' : 'translateY(0)',
transition: '0.3s',
left: 0,
right: 0,
px: 2,
pt: 1,
pb: 2,
mb: -2,
mx: -2,
bgcolor: ({ palette }) => alpha(palette.primaryDark[700], 0.5),
backdropFilter: 'blur(8px)',
zIndex: 1,
borderTop: '1px solid',
borderColor: 'divider',
borderRadius: '0 0 10px 10px',
}}
>
<Tooltip title={hidden ? 'Show' : 'Hide'} placement="left">
<IconButton
disabled={!customized}
onClick={() => setHidden((bool) => !bool)}
sx={{
position: 'absolute',
zIndex: 2,
transition: '0.3s',
right: 10,
bottom: '100%',
transform: hidden || !customized ? 'translateY(-10px)' : 'translateY(50%)',
opacity: customized ? 1 : 0,
bgcolor: 'primaryDark.500',
'&:hover, &.Mui-focused': {
bgcolor: 'primaryDark.600',
},
}}
>
{hidden ? (
<KeyboardArrowUpRounded fontSize="small" />
) : (
<KeyboardArrowDownRounded fontSize="small" />
)}
</IconButton>
</Tooltip>
<Typography fontWeight="bold" color="#fff" variant="body2">
Own the styling!
</Typography>
<Typography color="grey.400" variant="body2">
Build your own design system using the sophisticated theming features. You can
also start by using Google&apos;s Material Design.
</Typography>
</Box>
<StylingInfo appeared={customized} sx={{ mb: -2, mx: -2 }} />
</Box>
</Box>
</ThemeProvider>
Expand Down
17 changes: 14 additions & 3 deletions docs/src/components/home/MaterialDesignComponents.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import * as React from 'react';
import { deepmerge } from '@material-ui/utils';
import {
styled,
createTheme,
Expand Down Expand Up @@ -200,7 +201,7 @@ const StyledChip = styled(Chip)(({ theme }) => ({
},
}));

function buildTheme(theme: Theme): ThemeOptions {
export function buildTheme(theme: Theme): ThemeOptions {
return {
palette: {
...theme.palette,
Expand Down Expand Up @@ -298,7 +299,7 @@ function buildTheme(theme: Theme): ThemeOptions {
icon: {
paddingTop: 1,
paddingBottom: 0,
'& > *': {
'& > svg': {
fontSize: 18,
},
},
Expand Down Expand Up @@ -362,7 +363,17 @@ function buildTheme(theme: Theme): ThemeOptions {
},
},
},
MuiTableCell: theme.components?.MuiTableCell,
MuiPaper: theme.components?.MuiPaper,
MuiTableCell: deepmerge(theme.components?.MuiTableCell, {
styleOverrides: {
root: {
borderColor:
theme.palette.mode === 'dark'
? theme.palette.primaryDark[400]
: theme.palette.divider,
},
},
}),
MuiPopover: {
styleOverrides: {
paper: {
Expand Down
Loading