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 the Joy UI marketing page #36829

Closed
wants to merge 161 commits into from
Closed
Show file tree
Hide file tree
Changes from 158 commits
Commits
Show all changes
161 commits
Select commit Hold shift + click to select a range
d72bb1e
wip: init marketing page structure
siriwatknp Apr 10, 2023
38d4674
Merge remote-tracking branch 'origin/master' into pr/36829
danilo-leal Aug 1, 2023
47af59d
basic fixes and structure
danilo-leal Aug 1, 2023
71f3e4f
Merge branch 'master' of https://github.com/mui/material-ui into joy/…
siriwatknp Aug 7, 2023
df3bf98
wip
siriwatknp Aug 8, 2023
3bf10d2
Merge branch 'master' of https://github.com/mui/material-ui into joy/…
siriwatknp Aug 24, 2023
89da880
fix JoyUI Hero get start buttons
siriwatknp Aug 24, 2023
5ea921f
add Material UI to summary
siriwatknp Aug 24, 2023
0253676
finish testimonial section
siriwatknp Aug 24, 2023
2149375
use data-mui attributes
siriwatknp Aug 24, 2023
2e027d3
Merge branch 'master' of https://github.com/mui/material-ui into joy/…
siriwatknp Aug 24, 2023
d483623
add color inversion feature demo
siriwatknp Aug 25, 2023
f2fbde8
finish automatic adjustment section
siriwatknp Aug 25, 2023
3493eec
Merge branch 'master' of https://github.com/mui/material-ui into joy/…
siriwatknp Aug 29, 2023
f51974b
update automatic adjustment
siriwatknp Aug 29, 2023
40275f3
add templates section
siriwatknp Aug 30, 2023
246f3de
fix layout and override variables
siriwatknp Aug 30, 2023
6b0bf31
wip templates
siriwatknp Aug 31, 2023
2896923
use theme.vars
siriwatknp Aug 31, 2023
c62ca5d
fix GlobalStyles import
siriwatknp Aug 31, 2023
81ed44d
wip
siriwatknp Aug 31, 2023
bdcda4c
add more controls
siriwatknp Aug 31, 2023
ee3c0d9
switch to more popular templates
siriwatknp Aug 31, 2023
9b8f458
sync modes
siriwatknp Sep 1, 2023
21e8fbf
refactor controls
siriwatknp Sep 1, 2023
2707856
fix order-dashboard layout
siriwatknp Sep 1, 2023
72a1c4e
add --screen-height to templates
siriwatknp Sep 1, 2023
89e2faa
add magic button
siriwatknp Sep 1, 2023
5d174bb
add OrderDashboard to hero section
siriwatknp Sep 4, 2023
fb39f99
serveral fixes
siriwatknp Sep 4, 2023
d834370
summary section consistency with Base UI and tweaks
danilo-leal Sep 5, 2023
f877783
Merge branch 'master' of https://github.com/mui/material-ui into joy/…
siriwatknp Sep 11, 2023
46845e1
Merge branch 'master' into joy/mkt-page
danilo-leal Sep 11, 2023
b3c4e6c
swap out values links for the feature sections
danilo-leal Sep 11, 2023
57354e9
continue to customize and polish
danilo-leal Sep 12, 2023
383b1ff
Merge branch 'master' into joy/mkt-page
danilo-leal Sep 12, 2023
a69b719
fix bgSwap light color
siriwatknp Sep 12, 2023
48f7a3d
fix hero and remove background
siriwatknp Sep 12, 2023
7a24d77
finish animation
siriwatknp Sep 12, 2023
91dee83
lazy loading hero section
siriwatknp Sep 12, 2023
31bae3b
Merge branch 'joy/mkt-page' of github.com:siriwatknp/material-ui into…
siriwatknp Sep 12, 2023
f3d1225
fix merge conflict
siriwatknp Sep 12, 2023
50eba6c
add animation delay
siriwatknp Sep 12, 2023
f94a4d3
lozy load template
siriwatknp Sep 12, 2023
ec9f35f
improve perf
siriwatknp Sep 12, 2023
f25d289
Fix padding issue on Profile template
zanivan Sep 13, 2023
6508049
iterate on the templates section
danilo-leal Sep 14, 2023
a34c17c
templates section adjusting
danilo-leal Sep 14, 2023
44acb0a
more slight adjustments
danilo-leal Sep 14, 2023
a7151e7
Merge branch 'master' into joy/mkt-page
danilo-leal Sep 14, 2023
89d08a3
Merge branch 'master' of https://github.com/mui/material-ui into joy/…
siriwatknp Sep 15, 2023
45462f7
fix error
siriwatknp Sep 15, 2023
6251f1d
fix code block color inversion feature
siriwatknp Sep 15, 2023
dbb09be
update link and usage demo
siriwatknp Sep 15, 2023
33e3c1b
add links
siriwatknp Sep 15, 2023
eec317e
[zero][next] Setup nextjs plugin package (#38852)
brijeshb42 Sep 15, 2023
769555f
[Chip][material] Add cursor CSS property reset (#38984)
DiegoAndai Sep 15, 2023
e8e98dc
[website] Create the `InfoCard` component (#38987)
danilo-leal Sep 15, 2023
a45e966
[docs][joy-ui] Revise the Overview page (#38842)
danilo-leal Sep 15, 2023
44f0995
[docs][base] Add Tailwind CSS + plain CSS demo on the NumberInput pag…
alisasanib Sep 16, 2023
19821fb
[core] Allow deeper import of @mui/utils (#38806)
oliviertassinari Sep 16, 2023
904673b
[website] Fix lighthouse issues
oliviertassinari Sep 11, 2023
e3cb008
[core] Add more context about useEventCallback
oliviertassinari Sep 16, 2023
850de55
[website] Improve lighthouse score (#39011)
oliviertassinari Sep 17, 2023
53012b2
[docs] Fix number input wrong demo
oliviertassinari Sep 17, 2023
84a1d0d
[joy-ui][AccordionGroup] Fix console warning when using custom color …
sai6855 Sep 18, 2023
5770acd
[docs][Dialog] Add non-modal dialog docs & demo (#38684)
mnajdova Sep 18, 2023
cc1f1fc
[docs][material-ui][Pagination] Add `TablePagination` to the API comp…
MonstraG Sep 18, 2023
ff2bd78
[utils] Move @types/prop-types back to dependencies (#39030)
Methuselah96 Sep 18, 2023
3630288
[core] Move eslint to peer dependencies of eslint-plugin-material-ui …
michaldudak Sep 18, 2023
4e46478
[release] v5.14.10 (#39034)
mnajdova Sep 18, 2023
1faea19
[docs][joy-ui] Add `use-count-up` integration with the Circular Progr…
xcode-it Sep 18, 2023
6e90336
[docs-infra] Open demo crash in the right repository (#39006)
oliviertassinari Sep 18, 2023
8663210
[core] Add a comment to explain `useEnhancedEffect` (#39035)
Janpot Sep 18, 2023
cfba783
use the InfoCard
danilo-leal Sep 18, 2023
411ee44
use icon from Material Icons
danilo-leal Sep 18, 2023
c7d31d4
explore the global variants demo
danilo-leal Sep 18, 2023
8bc653a
Merge branch 'master' into pr/36829
danilo-leal Sep 18, 2023
0025f7e
Merge branch 'master' into joy/mkt-page
danilo-leal Sep 21, 2023
5db4c6c
arrange the features section
danilo-leal Sep 21, 2023
be0c265
add variant and color controls
danilo-leal Sep 21, 2023
a147034
space for more testimonials
danilo-leal Sep 21, 2023
688f1dc
Merge branch 'master' of https://github.com/mui/material-ui into joy/…
siriwatknp Sep 21, 2023
872b78e
add more testimonials
danilo-leal Sep 21, 2023
ca6103f
change prop name to avoid confusion
danilo-leal Sep 21, 2023
67b59c1
fix lint
danilo-leal Sep 22, 2023
f8e1e85
fix all playground
siriwatknp Sep 22, 2023
7fab639
Merge branch 'joy/mkt-page' of github.com:siriwatknp/material-ui into…
siriwatknp Sep 22, 2023
459a976
update testimonial
siriwatknp Sep 22, 2023
988f1b0
fix rental dashboard
siriwatknp Sep 22, 2023
524c4aa
experimenting with the testimonials section
danilo-leal Sep 22, 2023
4add503
components section icons
danilo-leal Sep 22, 2023
8ceba73
tiny adjustments
danilo-leal Sep 22, 2023
29ba765
small clean up
danilo-leal Sep 22, 2023
a1e1e25
adjust template placeholder styles
siriwatknp Sep 24, 2023
0e66d30
disable CSS reset from the templates and remove unused feather icons
siriwatknp Sep 24, 2023
196c7d6
fix tutorial link
siriwatknp Sep 24, 2023
944a1ec
Merge branch 'master' of https://github.com/mui/material-ui into joy/…
siriwatknp Sep 25, 2023
f60539c
Merge branch 'master' into joy/mkt-page
danilo-leal Sep 25, 2023
c43088f
Merge branch 'master' of https://github.com/mui/material-ui into joy/…
siriwatknp Oct 2, 2023
bfe5f8b
trigger build
siriwatknp Oct 2, 2023
822d160
fix rental variables
siriwatknp Oct 2, 2023
439897d
use multiple of 4 for radius options
danilo-leal Oct 2, 2023
549192a
cleaning up
danilo-leal Oct 2, 2023
60b1048
overall clean up and polish of the Features and Components section
danilo-leal Oct 2, 2023
b7ac73e
iterate on the testimonial section
danilo-leal Oct 2, 2023
3d8a50a
simplify code snipper on the Global Variants section
danilo-leal Oct 2, 2023
6df8372
color inversion features section tweaks
danilo-leal Oct 2, 2023
af3d831
some mobile fixes
danilo-leal Oct 2, 2023
cc86b63
trim down the testimonials a bit
danilo-leal Oct 2, 2023
321294c
experiment with removing the featured testimonial
danilo-leal Oct 3, 2023
eafbbf5
fix Global Variants varying Frame height
danilo-leal Oct 3, 2023
8d3e6c3
Olivier's suggestion on the Switch demo
danilo-leal Oct 3, 2023
2b5027f
general tweaks here and there
danilo-leal Oct 3, 2023
f713634
more general tweaks throughout the page
danilo-leal Oct 3, 2023
9ba8f36
update testimonial data
siriwatknp Oct 3, 2023
e40aaa4
polish the features section with a more fleshed out demo
danilo-leal Oct 3, 2023
1f6cd6b
some mobile adjustments
danilo-leal Oct 3, 2023
67d5d04
use new testimonial picture & role
danilo-leal Oct 3, 2023
93ac633
experimenting with the Testimonials section
danilo-leal Oct 3, 2023
e0986ad
add a proper automatic adjustment entry
danilo-leal Oct 3, 2023
e704eb3
more tweaks to the Testimonials section
danilo-leal Oct 3, 2023
55fe8ea
experiment with swapping the order on the Templates section
danilo-leal Oct 3, 2023
deb0972
Merge branch 'master' into pr/36829
danilo-leal Oct 4, 2023
c81580b
polish the hero section
danilo-leal Oct 4, 2023
7d24afe
Merge branch 'master' into pr/36829
danilo-leal Oct 4, 2023
9092d96
template session polish
danilo-leal Oct 4, 2023
270d10a
playing around with the random switch button
danilo-leal Oct 4, 2023
30c4038
play around with another description for the testimonial section
danilo-leal Oct 4, 2023
5ff373f
additional overall coat of polish
danilo-leal Oct 4, 2023
9329e93
refining the end hero section
danilo-leal Oct 4, 2023
8a29086
add the More Info section on the features code blocks
danilo-leal Oct 4, 2023
70933cf
add in the logo capacity to the testimonials
danilo-leal Oct 4, 2023
10ca662
sort similar projects by popularity
danilo-leal Oct 4, 2023
e37237e
copy sugesstions
danilo-leal Oct 4, 2023
b0d9674
fix code block background color on the features section
danilo-leal Oct 4, 2023
56ded58
Merge branch 'joy/mkt-page' of github.com:siriwatknp/material-ui into…
siriwatknp Oct 9, 2023
4e7f6f1
adjust usage demo
siriwatknp Oct 9, 2023
dcdb372
disable lint
siriwatknp Oct 9, 2023
27dc774
use shorthand variables
siriwatknp Oct 9, 2023
927b65a
fix lint
danilo-leal Oct 9, 2023
6c02c5f
fix lint again
danilo-leal Oct 9, 2023
33675b7
add testimonial folks github link
danilo-leal Oct 10, 2023
d87c4ed
small adjustments on the features section
danilo-leal Oct 10, 2023
1b50238
hero border color adjustment
danilo-leal Oct 10, 2023
565b7ff
trigger build process
danilo-leal Oct 10, 2023
dc0579c
Merge branch 'master' of https://github.com/mui/material-ui into joy/…
siriwatknp Oct 11, 2023
7b44530
fix AlertUsage error
siriwatknp Oct 11, 2023
12a8d82
fix templates section layout shift after loaded
siriwatknp Oct 11, 2023
1273aff
fix global variants feature preview to work with solid variant
siriwatknp Oct 11, 2023
fbfef9d
fix thumb size
siriwatknp Oct 11, 2023
b3e7e79
Add automatic adjustment demo
siriwatknp Oct 11, 2023
029e535
change knob to radio for consistency
siriwatknp Oct 11, 2023
95d0d77
refine dummy copy
danilo-leal Oct 11, 2023
084c07b
adjustments to the css vars demo
danilo-leal Oct 11, 2023
6ac32a3
polish the automatic adjustment demo
danilo-leal Oct 11, 2023
2a094f3
more automatic adjustment fine-tune
danilo-leal Oct 11, 2023
2c395af
color inversion demo tweaks
danilo-leal Oct 11, 2023
ccae8ec
stray adjustements
danilo-leal Oct 17, 2023
56d4f90
adding the design kit section and iterating on the images
danilo-leal Oct 17, 2023
14c6199
iterating on the testimonials section
danilo-leal Oct 17, 2023
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
8 changes: 6 additions & 2 deletions docs/data/joy/components/alert/AlertUsage.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import * as React from 'react';
import Alert from '@mui/joy/Alert';
import JoyUsageDemo from 'docs/src/modules/components/JoyUsageDemo';
import Diamond from '@mui/icons-material/Diamond';

export default function AlertUsage() {
export default function AlertUsage(inProps) {
danilo-leal marked this conversation as resolved.
Show resolved Hide resolved
return (
<JoyUsageDemo
{...inProps}
componentName="Alert"
data={[
{
Expand All @@ -26,7 +28,9 @@ export default function AlertUsage() {
},
]}
renderDemo={(props) => (
<Alert {...props}>This is a Joy UI Alert — check it out!</Alert>
<Alert {...props} startDecorator={<Diamond />}>
This is a Joy UI Alert — check it out!
</Alert>
)}
/>
);
Expand Down
10 changes: 8 additions & 2 deletions docs/data/joy/components/button/ButtonUsage.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ import IconButton from '@mui/joy/IconButton';
import FavoriteBorder from '@mui/icons-material/FavoriteBorder';
import JoyUsageDemo from 'docs/src/modules/components/JoyUsageDemo';

export default function ButtonUsage() {
export default function ButtonUsage(inProps) {
return (
<JoyUsageDemo
{...inProps}
componentName="Button"
data={[
{
Expand All @@ -32,10 +33,15 @@ export default function ButtonUsage() {
knob: 'switch',
defaultValue: false,
},
{
propName: 'loading',
knob: 'switch',
defaultValue: false,
},
{ propName: 'onClick', defaultValue: () => {} },
]}
renderDemo={(props) => (
<Box sx={{ display: 'flex', gap: 2 }}>
<Box sx={{ display: 'flex', gap: 1 }}>
<Button startDecorator={<FavoriteBorder />} {...props}>
Hello world
</Button>
Expand Down
3 changes: 2 additions & 1 deletion docs/data/joy/components/input/InputUsage.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ import * as React from 'react';
import Input from '@mui/joy/Input';
import JoyUsageDemo from 'docs/src/modules/components/JoyUsageDemo';

export default function InputUsage() {
export default function InputUsage(inProps) {
return (
<JoyUsageDemo
{...inProps}
componentName="Input"
data={[
{
Expand Down
7 changes: 4 additions & 3 deletions docs/data/joy/components/menu/MenuUsage.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,21 @@ import ListDivider from '@mui/joy/ListDivider';
import Dropdown from '@mui/joy/Dropdown';
import JoyUsageDemo from 'docs/src/modules/components/JoyUsageDemo';

export default function MenuUsage() {
export default function MenuUsage(inProps) {
return (
<JoyUsageDemo
{...inProps}
componentName="Menu"
data={[
{
propName: 'menuButtonVariant',
knob: 'select',
knob: 'radio',
defaultValue: 'outlined',
options: ['plain', 'outlined', 'soft', 'solid'],
},
{
propName: 'menuVariant',
knob: 'select',
knob: 'radio',
defaultValue: 'outlined',
options: ['plain', 'outlined', 'soft', 'solid'],
},
Expand Down
3 changes: 2 additions & 1 deletion docs/data/joy/components/radio-button/RadioUsage.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ import RadioGroup from '@mui/joy/RadioGroup';
import Radio from '@mui/joy/Radio';
import JoyUsageDemo from 'docs/src/modules/components/JoyUsageDemo';

export default function RadioUsage() {
export default function RadioUsage(inProps) {
return (
<JoyUsageDemo
{...inProps}
componentName="Radio"
data={[
{
Expand Down
3 changes: 2 additions & 1 deletion docs/data/joy/components/select/SelectUsage.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ import Select from '@mui/joy/Select';
import Option from '@mui/joy/Option';
import JoyUsageDemo from 'docs/src/modules/components/JoyUsageDemo';

export default function SelectUsage() {
export default function SelectUsage(inProps) {
const [value, setValue] = React.useState(null);
const action = React.useRef(null);
return (
<JoyUsageDemo
{...inProps}
componentName="Select"
data={[
{
Expand Down
3 changes: 2 additions & 1 deletion docs/data/joy/components/slider/SliderUsage.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ import Box from '@mui/joy/Box';
import Slider from '@mui/joy/Slider';
import JoyUsageDemo from 'docs/src/modules/components/JoyUsageDemo';

export default function SliderUsage() {
export default function SliderUsage(inProps) {
return (
<JoyUsageDemo
{...inProps}
componentName="Slider"
data={[
{
Expand Down
13 changes: 6 additions & 7 deletions docs/data/joy/components/tabs/TabsUsage.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import TabList from '@mui/joy/TabList';
import Tab from '@mui/joy/Tab';
import TabPanel from '@mui/joy/TabPanel';
import JoyUsageDemo from 'docs/src/modules/components/JoyUsageDemo';
import Apps from '@mui/icons-material/Apps';

export default function TabsUsage() {
export default function TabsUsage(inProps) {
const [index, setIndex] = React.useState(0);
return (
<JoyUsageDemo
{...inProps}
componentName="Tabs"
data={[
{
Expand Down Expand Up @@ -40,7 +40,7 @@ export default function TabsUsage() {
defaultValue: 'horizontal',
},
{
formLabel: 'Disable TabList underline',
formLabel: 'Disable Tab List underline',
propName: 'disableUnderline',
knob: 'switch',
defaultValue: false,
Expand Down Expand Up @@ -109,7 +109,6 @@ export default function TabsUsage() {
disableIndicator={disableIndicator}
{...(index === 0 && { color, variant })}
>
<Apps />
Tab A
</Tab>
<Tab
Expand All @@ -127,9 +126,9 @@ export default function TabsUsage() {
Tab C
</Tab>
</TabList>
<TabPanel value={0}>Content of Tab A</TabPanel>
<TabPanel value={1}>Content of Tab B</TabPanel>
<TabPanel value={2}>Content of Tab C</TabPanel>
<TabPanel value={0}>Tab A</TabPanel>
<TabPanel value={1}>Tab B</TabPanel>
<TabPanel value={2}>Tab C</TabPanel>
</Tabs>
)}
/>
Expand Down
4 changes: 2 additions & 2 deletions docs/data/joy/getting-started/templates/email/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ function ColorSchemeToggle() {
);
}

export default function EmailExample() {
export default function EmailExample(props: any) {
const [drawerOpen, setDrawerOpen] = React.useState(false);
return (
<CssVarsProvider disableTransitionOnChange>
<CssVarsProvider disableTransitionOnChange {...props}>
<CssBaseline />
{drawerOpen && (
<Layout.SideDrawer onClose={() => setDrawerOpen(false)}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ function Root(props: BoxProps) {
display: 'grid',
gridTemplateColumns: {
xs: '1fr',
sm: 'minmax(64px, 200px) minmax(450px, 1fr)',
md: 'minmax(160px, 300px) minmax(300px, 500px) minmax(500px, 1fr)',
sm: 'minmax(192px, 240px) minmax(450px, 1fr)',
md: 'minmax(200px, 300px) minmax(300px, 500px) minmax(500px, 1fr)',
},
gridTemplateRows: '64px 1fr',
minHeight: '100vh',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import KeyboardArrowDownRoundedIcon from '@mui/icons-material/KeyboardArrowDownR

export default function EmailNav() {
return (
<List size="sm" sx={{ '--ListItem-radius': '8px' }}>
<List size="sm" sx={(theme) => ({ '--ListItem-radius': theme.vars.radius.md })}>
<ListItem nested>
<ListSubheader>
Browse
Expand Down
17 changes: 6 additions & 11 deletions docs/data/joy/getting-started/templates/files/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@ function ColorSchemeToggle() {
);
}

export default function FilesExample() {
export default function FilesExample(props: any) {
const [drawerOpen, setDrawerOpen] = React.useState(false);
return (
<CssVarsProvider disableTransitionOnChange>
<CssVarsProvider disableTransitionOnChange {...props}>
<CssBaseline />
{drawerOpen && (
<Layout.SideDrawer onClose={() => setDrawerOpen(false)}>
Expand All @@ -81,11 +81,6 @@ export default function FilesExample() {
)}
<Layout.Root
sx={{
gridTemplateColumns: {
xs: '1fr',
sm: 'minmax(64px, 200px) minmax(450px, 1fr)',
md: 'minmax(160px, 300px) minmax(600px, 1fr) minmax(300px, 420px)',
},
...(drawerOpen && {
height: '100vh',
overflow: 'hidden',
Expand Down Expand Up @@ -205,7 +200,7 @@ export default function FilesExample() {
>
<Sheet
variant="outlined"
sx={{ borderRadius: 'sm', gridColumn: '1/-1' }}
sx={{ borderRadius: 'sm', gridColumn: '1/-1', overflow: 'auto' }}
>
<Table
sx={{
Expand Down Expand Up @@ -460,7 +455,7 @@ export default function FilesExample() {
borderColor: 'neutral.outlinedBorder',
}}
>
<AspectRatio ratio="16/9" color="primary">
<AspectRatio ratio="16/9" color="primary" maxHeight={160}>
<Typography
sx={{
display: 'flex',
Expand Down Expand Up @@ -537,7 +532,7 @@ export default function FilesExample() {
borderColor: 'neutral.outlinedBorder',
}}
>
<AspectRatio ratio="16/9" color="primary">
<AspectRatio ratio="16/9" color="primary" maxHeight={160}>
<Typography
sx={{
display: 'flex',
Expand Down Expand Up @@ -566,7 +561,7 @@ export default function FilesExample() {
</Layout.Main>
<Sheet
sx={{
display: { xs: 'none', sm: 'initial' },
display: { xs: 'none', md: 'initial' },
borderLeft: '1px solid',
borderColor: 'neutral.outlinedBorder',
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ function Root(props: BoxProps) {
display: 'grid',
gridTemplateColumns: {
xs: '1fr',
sm: 'minmax(64px, 200px) minmax(450px, 1fr)',
md: 'minmax(160px, 300px) minmax(300px, 500px) minmax(500px, 1fr)',
sm: 'minmax(192px, 240px) minmax(450px, 1fr)',
md: 'minmax(200px, 300px) minmax(600px, 1fr) minmax(300px, 420px)',
},
gridTemplateRows: '64px 1fr',
minHeight: '100vh',
Expand Down Expand Up @@ -114,7 +114,14 @@ function SideDrawer({
<Box
{...props}
sx={[
{ position: 'fixed', zIndex: 1200, width: '100%', height: '100%' },
{
position: 'fixed',
zIndex: 1200,
width: '100%',
height: '100%',
top: 0,
left: 0,
},
...(Array.isArray(props.sx) ? props.sx : [props.sx]),
]}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,13 @@ import DeleteRoundedIcon from '@mui/icons-material/DeleteRounded';

export default function Navigation() {
return (
<List size="sm" sx={{ '--ListItem-radius': '8px', '--List-gap': '4px' }}>
<List
size="sm"
sx={(theme) => ({
'--ListItem-radius': theme.vars.radius.md,
'--List-gap': '4px',
})}
>
<ListItem nested>
<ListSubheader>
Browse
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ function ColorSchemeToggle() {
);
}

export default function TeamExample() {
export default function TeamExample(props: any) {
return (
<CssVarsProvider disableTransitionOnChange theme={framesxTheme}>
<CssVarsProvider disableTransitionOnChange theme={framesxTheme} {...props}>
<CssBaseline />
<ColorSchemeToggle />
<Box
Expand Down
23 changes: 18 additions & 5 deletions docs/data/joy/getting-started/templates/messages/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,26 @@ import Sidebar from './components/Sidebar';
import Header from './components/Header';
import MyMessages from './components/MyMessages';

export default function JoyMessagesTemplate() {
type PropsOf<T> = T extends React.ComponentType<infer P> ? P : never;

export default function JoyMessagesTemplate({
disableCssReset = false,
...props
}: {
disableCssReset?: boolean;
} & PropsOf<typeof CssVarsProvider>) {
return (
<CssVarsProvider disableTransitionOnChange>
<CssBaseline />
<Box sx={{ display: 'flex', minHeight: '100dvh' }}>
<Sidebar />
<CssVarsProvider disableTransitionOnChange {...props}>
{!disableCssReset && <CssBaseline />}
<Box
sx={{
'--screen-height': '100dvh',
display: 'flex',
height: 'var(--screen-height)',
}}
>
<Header />
<Sidebar />
<Box component="main" className="MainContent" sx={{ flex: 1 }}>
<MyMessages />
</Box>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,17 +73,13 @@ export default function ChatBubble({
borderRadius: 'lg',
borderTopRightRadius: isSent ? 0 : 'lg',
borderTopLeftRadius: isSent ? 'lg' : 0,
backgroundColor: isSent
? 'var(--joy-palette-primary-solidBg)'
: 'background.body',
backgroundColor: isSent ? 'primary.solidBg' : 'background.body',
}}
>
<Typography
level="body-sm"
sx={{
color: isSent
? 'var(--joy-palette-common-white)'
: 'var(--joy-palette-text-primary)',
color: isSent ? 'common.white' : 'text.primary',
}}
>
{content}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ export default function MessagesPane({ chat }: MessagesPaneProps) {
return (
<Sheet
sx={{
height: { xs: 'calc(100dvh - var(--Header-height))', lg: '100dvh' },
height: {
xs: 'calc(var(--screen-height) - var(--Header-height))',
lg: 'var(--screen-height)',
},
display: 'flex',
flexDirection: 'column',
backgroundColor: 'background.level1',
Expand Down
Loading