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

[joy] Refine the default theme #36843

Merged
merged 333 commits into from
Jul 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
333 commits
Select commit Hold shift + click to select a range
54b41ae
update Card demos
siriwatknp Jun 28, 2023
91d118a
fix checkbox radius
siriwatknp Jun 28, 2023
6b1b37a
remove comment
siriwatknp Jun 28, 2023
be2d069
fix button group and demos
siriwatknp Jun 28, 2023
bfbf5d4
adjust checkbox size and margin to be the same as radio
siriwatknp Jun 28, 2023
fd0176f
remove unnecessary custom bgcolor
siriwatknp Jun 28, 2023
90762d3
remove unnecessary customization
siriwatknp Jun 28, 2023
598fbf6
revert soft bg
siriwatknp Jun 28, 2023
ad62718
add size prop to SvgIcon
siriwatknp Jun 28, 2023
f9e923c
fix demos
siriwatknp Jun 28, 2023
bf5d190
use theme.typography
siriwatknp Jun 28, 2023
ff10ec5
use theme.typography in List
siriwatknp Jun 28, 2023
10d305c
fix slider focus thumb
siriwatknp Jun 28, 2023
9dd46bd
add theme typography to AspectRatio Avatar and Badge
siriwatknp Jun 28, 2023
785350b
use theme.typography
siriwatknp Jun 29, 2023
8723a7c
update demo
siriwatknp Jun 29, 2023
8e87f72
fix Typography
siriwatknp Jun 29, 2023
5e536cc
simplify Alert typography
siriwatknp Jun 29, 2023
128e7bb
fix modal dialog typography and demos
siriwatknp Jun 29, 2023
8252f8e
fix Card typography
siriwatknp Jun 29, 2023
1e83e19
fix Breadcrumbs
siriwatknp Jun 29, 2023
cde1485
fix Link related
siriwatknp Jun 29, 2023
0b9a08e
fix ListItemButton icon color
siriwatknp Jun 29, 2023
dc150e8
fix typography level usage
siriwatknp Jun 29, 2023
25d1768
remove ListItemDecorator-color
siriwatknp Jun 29, 2023
4b8fda4
minor adjustment
siriwatknp Jun 29, 2023
7a6077b
fix styles
siriwatknp Jun 29, 2023
b656085
Merge branch 'master' of https://github.com/mui/material-ui into joy/…
siriwatknp Jun 29, 2023
de57d2d
fix demos
siriwatknp Jun 29, 2023
e17ff51
update TypographyUsage
siriwatknp Jun 29, 2023
2087905
run proptypes
siriwatknp Jun 29, 2023
5c97f99
run docs:api
siriwatknp Jun 29, 2023
58cdee9
run docs:ts
siriwatknp Jun 29, 2023
a569a3f
fix tests
siriwatknp Jun 29, 2023
e5023e8
fix test
siriwatknp Jun 29, 2023
f9f6365
fix typography usage
siriwatknp Jun 29, 2023
186f095
fix docs
siriwatknp Jun 29, 2023
0a47418
run docs:ts
siriwatknp Jun 29, 2023
acafccf
fix tests
siriwatknp Jun 29, 2023
87c6854
fix lint
siriwatknp Jun 29, 2023
0c0ccf1
fix test
siriwatknp Jun 29, 2023
352706a
remove experiments
siriwatknp Jun 29, 2023
e38ce27
fix typography usage
siriwatknp Jun 29, 2023
19ae334
fix lint
siriwatknp Jun 29, 2023
d3562b5
soften tooltip a bit
zanivan Jun 29, 2023
9768c63
Merge remote-tracking branch 'upstream/joy-color-inversion-docs-tweak…
zanivan Jun 29, 2023
83fecc5
tweaks on demos of color inversion page
zanivan Jun 29, 2023
6e768ae
run yarn docs:typescript:formatted
zanivan Jun 29, 2023
184193b
tweaks on radio demos
zanivan Jun 29, 2023
17ae0c1
make the Button primary on ControlledOpenSelect
zanivan Jun 29, 2023
21197ad
tweaked on badge demo
zanivan Jun 29, 2023
2807de4
tweaks on List demo
zanivan Jun 29, 2023
b215cae
tweaks on Alert demos
zanivan Jun 29, 2023
2fe3baf
tweak on Circular Progress demo
zanivan Jun 29, 2023
1708626
tweaks on Card demos
zanivan Jun 29, 2023
58d840d
tweak on Link demo
zanivan Jun 29, 2023
274ed8b
tweak on Approaches SX demo
zanivan Jun 29, 2023
08dc2bd
run yarn docs:typescript:formatted
zanivan Jun 29, 2023
f26140c
Merge branch 'master' of https://github.com/mui/material-ui into joy/…
siriwatknp Jun 30, 2023
ba775e6
update color inversion
siriwatknp Jun 30, 2023
5d50ce1
increase placeholder opacity for Input, Select, and Textarea.
siriwatknp Jun 30, 2023
7562f55
add default surface background to Chip
siriwatknp Jun 30, 2023
e1bb64e
add default surface background to Switch
siriwatknp Jun 30, 2023
81a2c45
improve Switch usage
siriwatknp Jun 30, 2023
d07d0b0
fix Breadcrumbs
siriwatknp Jun 30, 2023
535ffbb
update global variant and active styles
siriwatknp Jun 30, 2023
dfc260c
fix docs
siriwatknp Jun 30, 2023
ee0e0d1
add key
siriwatknp Jun 30, 2023
52311b3
fix templates
siriwatknp Jun 30, 2023
ed79f37
remove icon opacity variable
siriwatknp Jun 30, 2023
00fdbe8
update icon color in dark mode
siriwatknp Jun 30, 2023
3113f04
check variant solid
siriwatknp Jun 30, 2023
3eb8b88
fix lint
siriwatknp Jun 30, 2023
38caa79
run docs scripts
siriwatknp Jun 30, 2023
5639e81
improve resolve sx
siriwatknp Jun 30, 2023
7c32c6d
remove customized radius
siriwatknp Jun 30, 2023
bd2dd3c
update radius to use fallback
siriwatknp Jun 30, 2023
4e8721e
wip on Tabs
siriwatknp Jun 30, 2023
e6100e6
tweaks on order dashboard template
zanivan Jun 30, 2023
1f8452e
wip
siriwatknp Jun 30, 2023
18efaa4
remove sx customization
siriwatknp Jul 1, 2023
c6dfe34
finalize the Tabs implementation
siriwatknp Jul 1, 2023
cc51d1d
fix Tabs usage demo
siriwatknp Jul 1, 2023
bfab530
fix Tabs styles
siriwatknp Jul 1, 2023
a1aa864
fix Tabs demos
siriwatknp Jul 1, 2023
399091c
update tabs docs
siriwatknp Jul 3, 2023
e14b235
fix docs
siriwatknp Jul 3, 2023
f963758
run scripts
siriwatknp Jul 3, 2023
48bbc19
Merge branch 'master' of https://github.com/mui/material-ui into joy/…
siriwatknp Jul 3, 2023
18fc779
fix examples and tempaltes
siriwatknp Jul 3, 2023
c25ad47
run scripts
siriwatknp Jul 3, 2023
19d947e
update TabsUsage
siriwatknp Jul 3, 2023
3917253
update examples
siriwatknp Jul 3, 2023
4eb6f7b
add underlinePlacement prop
siriwatknp Jul 4, 2023
e1afdca
add sticky top, bottom
siriwatknp Jul 4, 2023
aa73af4
run script
siriwatknp Jul 4, 2023
7fe0bdc
add component name for better debugging
siriwatknp Jul 4, 2023
425c687
change background demo to solid for Joy UI
siriwatknp Jul 4, 2023
9d146f1
adjust slider thumb size
siriwatknp Jul 4, 2023
0be0e5f
remove letter spacing
siriwatknp Jul 4, 2023
8f76bcc
Merge branch 'master' of https://github.com/mui/material-ui into joy/…
siriwatknp Jul 4, 2023
380eded
switch to background.body
siriwatknp Jul 4, 2023
df01692
Merge branch 'master' of https://github.com/mui/material-ui into joy/…
siriwatknp Jul 4, 2023
4d6843a
adjust light shadow
siriwatknp Jul 4, 2023
2907872
simplify demos
siriwatknp Jul 4, 2023
e1c5577
remove unwanted changes
siriwatknp Jul 4, 2023
902b8a9
use font-size vars for controlling icon size
siriwatknp Jul 4, 2023
574827d
fix template and regenerate screenshots
siriwatknp Jul 4, 2023
2fe2b34
Merge branch 'joy/fix-default-theme' of https://github.com/siriwatknp…
zanivan Jul 4, 2023
fba4753
add border placeholder
siriwatknp Jul 5, 2023
8cd0911
fix Tabs and related demos
siriwatknp Jul 5, 2023
878a3c3
remove custom variant on selected
siriwatknp Jul 5, 2023
f67db05
add Inter font to joy-ui pages
siriwatknp Jul 5, 2023
de06745
update fontWeight and update card demos
siriwatknp Jul 5, 2023
bf5962f
remove extra customization
siriwatknp Jul 5, 2023
d5eeade
remove custom background for solid buttons
siriwatknp Jul 5, 2023
0c3d3d9
fix typo
siriwatknp Jul 5, 2023
54b6f15
add more docs to the card page
siriwatknp Jul 5, 2023
911d249
Merge branch 'master' of https://github.com/mui/material-ui into joy/…
siriwatknp Jul 5, 2023
de0c912
fix typo
siriwatknp Jul 5, 2023
4022a2a
fix font weights
siriwatknp Jul 5, 2023
2496d75
Merge branch 'joy/fix-default-theme' of https://github.com/siriwatknp…
zanivan Jul 5, 2023
2426f12
change the way underline works
siriwatknp Jul 6, 2023
463fce3
rename variable to --Tabs-spacing
siriwatknp Jul 6, 2023
6ac92a4
Add --Tabs-indicatorSize
siriwatknp Jul 6, 2023
641ba18
update demos
siriwatknp Jul 6, 2023
d0ba87d
Merge branch 'master' of https://github.com/mui/material-ui into joy/…
siriwatknp Jul 6, 2023
371f53c
run scripts
siriwatknp Jul 6, 2023
cfe26a9
outline migration page
siriwatknp Jul 7, 2023
e76f083
remove leftover `info` palette
siriwatknp Jul 7, 2023
956be1e
add color info migration
siriwatknp Jul 7, 2023
e82e776
add typography level doc
siriwatknp Jul 7, 2023
dcb1264
remove PaletteInfo export
siriwatknp Jul 7, 2023
0efa3f9
add migration doc
siriwatknp Jul 7, 2023
5196f38
refine migration doc
siriwatknp Jul 7, 2023
d0744ba
update diff
siriwatknp Jul 7, 2023
d345f63
run scripts
siriwatknp Jul 7, 2023
6b95f9e
Merge branch 'master' of https://github.com/mui/material-ui into joy/…
siriwatknp Jul 7, 2023
798b9a9
Softened the common black
zanivan Jul 10, 2023
9666c07
Created a separated demo for underlinePlacement
zanivan Jul 10, 2023
49efc31
Created a separated demo for indicatorPlacement
zanivan Jul 10, 2023
1447e60
Created a separated demo for flex direction
zanivan Jul 10, 2023
d959957
Added the new demos to the docs
zanivan Jul 10, 2023
f5a4e09
run yarn docs:typescript:formatted
zanivan Jul 10, 2023
390c46f
Tweaked the design of TabsVariants demo
zanivan Jul 10, 2023
64192d4
Text polishing and reorder
zanivan Jul 10, 2023
fa5adb6
Merge branch 'master' of https://github.com/mui/material-ui into joy/…
siriwatknp Jul 11, 2023
a38564f
run docs:i18n
siriwatknp Jul 11, 2023
a7effb9
update docs
siriwatknp Jul 11, 2023
d03fa94
Merge branch 'master' of https://github.com/mui/material-ui into joy/…
siriwatknp Jul 12, 2023
480a5be
fix font-family to use body
siriwatknp Jul 12, 2023
3ef8e20
set flex initial to Tab
siriwatknp Jul 12, 2023
72ee460
update migration content
siriwatknp Jul 12, 2023
013f56b
rename page and add palette changes
siriwatknp Jul 12, 2023
587882e
Made the light shadows a bit brighter
zanivan Jul 17, 2023
4cd1145
Fine tuning the neutral palette
zanivan Jul 17, 2023
9ec6b7a
Changed color Button Group demo
zanivan Jul 17, 2023
92e8296
Tweaked the OverlayCheckbox demo
zanivan Jul 17, 2023
b2ebf71
tweak formatting and copy on the migration docs a bit
danilo-leal Jul 17, 2023
38a488f
Merge remote-tracking branch 'origin/master' into pr/36843
danilo-leal Jul 17, 2023
bcca390
Tweaked the SegmentedControls demo
zanivan Jul 17, 2023
ff80b94
Merge branch 'joy/fix-default-theme' of https://github.com/siriwatknp…
zanivan Jul 17, 2023
c394f89
Tweaked the List demos
zanivan Jul 17, 2023
b7359c1
Merge branch 'master' of https://github.com/mui/material-ui into joy/…
siriwatknp Jul 18, 2023
3da023c
fix Skeleton typography usage
siriwatknp Jul 18, 2023
4b98588
update Typgoraphy content
siriwatknp Jul 18, 2023
d860009
update demos
siriwatknp Jul 18, 2023
b925e1d
fix SvgIcon color prop
siriwatknp Jul 18, 2023
2778dbe
fix buttons related styles
siriwatknp Jul 18, 2023
0e0ae3a
update demos
siriwatknp Jul 18, 2023
1c4356d
move Figma example to ToggleButtonGroup page
siriwatknp Jul 18, 2023
21c1e50
remove unnecessary styles
siriwatknp Jul 18, 2023
be4d3b9
run docs:i18:n
siriwatknp Jul 18, 2023
6c3c194
remove unnecessary changes
siriwatknp Jul 18, 2023
f9dff1e
update demo
siriwatknp Jul 18, 2023
f92bb8c
remove inherit color test
siriwatknp Jul 18, 2023
dc5873f
fix minor checks
siriwatknp Jul 18, 2023
990f967
fix Card radius
siriwatknp Jul 18, 2023
e0d481b
Fine tuning templates
zanivan Jul 18, 2023
620d6e0
Added flexGrow to pricing tabs demo
zanivan Jul 18, 2023
5f61d6c
Visual tweaks to global-variants demo
zanivan Jul 18, 2023
daef5a2
Changed Tabs to ToggleButton on ThemeBuilder
zanivan Jul 18, 2023
4427425
Polished out the tabs on JoyThemeBuilder
zanivan Jul 18, 2023
0b96ea6
Fixed borderColor approaches/theming demo
zanivan Jul 18, 2023
d23213e
add comment
siriwatknp Jul 18, 2023
66c579d
run docs:api
siriwatknp Jul 18, 2023
56353bb
Fixed the consistency across templates
zanivan Jul 18, 2023
4aae8fa
fix Autocomplete and Select listbox to use the same variant and color
siriwatknp Jul 19, 2023
47a21ff
fix as suggested
siriwatknp Jul 19, 2023
28ddeb5
Merge branch 'joy/fix-default-theme' of github.com:siriwatknp/materia…
siriwatknp Jul 19, 2023
c611cfd
fix ToggleGroup variant
siriwatknp Jul 19, 2023
ddadb74
fix color inversion
siriwatknp Jul 19, 2023
5fc6265
add tabFlex prop
siriwatknp Jul 19, 2023
13f2202
update content
siriwatknp Jul 19, 2023
2de96b3
adjust Typography and Link
siriwatknp Jul 20, 2023
4c23f86
use channel color for SvgIcon
siriwatknp Jul 20, 2023
f2eda26
fix CardActions buttonFlex prop
siriwatknp Jul 20, 2023
ea70f7c
add option color to Select usage
siriwatknp Jul 20, 2023
5c20c17
Merge branch 'master' of https://github.com/mui/material-ui into joy/…
siriwatknp Jul 20, 2023
14aef8e
run scripts
siriwatknp Jul 20, 2023
c0edd26
run template:screenshot
siriwatknp Jul 20, 2023
0a02d86
add TabsFlex demo
siriwatknp Jul 20, 2023
dc72a5a
move Inter font to head
siriwatknp Jul 20, 2023
648dbec
Bumped neutral 200 to be bit darker
zanivan Jul 20, 2023
cef8c7f
Make Option inherit variant and color from Select
siriwatknp Jul 21, 2023
c1c9f76
Autocomplete match children variant and color with the parent
siriwatknp Jul 21, 2023
10f06bf
fix decorator and indicator
siriwatknp Jul 21, 2023
0c925a8
instance variant and color should work
siriwatknp Jul 21, 2023
170797a
add zIndex to Tab
siriwatknp Jul 21, 2023
cdf80df
run docs:ts
siriwatknp Jul 21, 2023
a70e357
Merge branch 'joy/fix-default-theme' of github.com:siriwatknp/materia…
siriwatknp Jul 21, 2023
9149cdb
make neutral[300] lighter
siriwatknp Jul 21, 2023
2cb4a81
run template screenshot
siriwatknp Jul 21, 2023
09ba057
run rsc:build
siriwatknp Jul 21, 2023
67ff6aa
fix typography level usage
siriwatknp Jul 21, 2023
3c5bee6
remove color 'info'
siriwatknp Jul 21, 2023
e8c5163
rename files
siriwatknp Jul 21, 2023
945e4a0
run docs:ts
siriwatknp Jul 21, 2023
3dc7782
revert change
siriwatknp Jul 24, 2023
2572b2c
Merge branch 'master' of https://github.com/mui/material-ui into joy/…
siriwatknp Jul 24, 2023
ffaac6f
fix typography level usage
siriwatknp Jul 24, 2023
745273e
change the default variant and color of IconButton
siriwatknp Jul 24, 2023
dfbd3a4
update default variant and color
siriwatknp Jul 24, 2023
fa8b8ea
adjust color
siriwatknp Jul 24, 2023
d27a707
adjust inverted solid variant
siriwatknp Jul 24, 2023
2fd28c8
fix tests
siriwatknp Jul 24, 2023
97bce26
run template collection
siriwatknp Jul 24, 2023
bffe84b
Merge branch 'master' of https://github.com/mui/material-ui into joy/…
siriwatknp Jul 24, 2023
196eb82
fix Chip
siriwatknp Jul 25, 2023
4a0add9
Fixed codeblock on isntallation page
zanivan Jul 26, 2023
0fd447f
Changed button from outlined to soft
zanivan Jul 26, 2023
894d49a
Changed chips to primary
zanivan Jul 26, 2023
2711a14
Fix Typography level
zanivan Jul 26, 2023
1d5adef
Changed borderRadius
zanivan Jul 26, 2023
dc5840d
Small tweaks to card size and margin
zanivan Jul 26, 2023
fcc6196
Changed variant from outlined to soft
zanivan Jul 26, 2023
923e97b
run ts:format
siriwatknp Jul 27, 2023
2c04ead
Merge branch 'master' of https://github.com/mui/material-ui into joy/…
siriwatknp Jul 27, 2023
54caaea
reexport types
siriwatknp Jul 27, 2023
ac7903a
update migration guide
siriwatknp Jul 27, 2023
ed5c731
add shadow xs to Alert
siriwatknp Jul 27, 2023
ffb2f82
adjust color
siriwatknp Jul 27, 2023
5d0d06b
remove shadow channel override
siriwatknp Jul 27, 2023
cbce952
set icon color to currentColor when selected
siriwatknp Jul 27, 2023
6b19170
set icon color
siriwatknp Jul 28, 2023
a6ab606
simplify placeholder opacity
siriwatknp Jul 28, 2023
e008127
fix the default radio usage
siriwatknp Jul 28, 2023
fe3b2fc
minor fixes
siriwatknp Jul 28, 2023
2d60251
Final tuning background levels and colors
zanivan Jul 28, 2023
44712e9
Merge branch 'joy/fix-default-theme' of https://github.com/siriwatknp…
zanivan Jul 28, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 1 addition & 4 deletions docs/data/joy/components/alert/AlertColors.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ export default function AlertColors() {
<Alert variant={variant} color="danger">
Danger
</Alert>
<Alert variant={variant} color="info">
Info
</Alert>
<Alert variant={variant} color="success">
Success
</Alert>
Expand All @@ -41,7 +38,7 @@ export default function AlertColors() {
</Stack>
<Sheet sx={{ pl: 4, ml: 3, borderLeft: '1px solid', borderColor: 'divider' }}>
<Typography
level="body2"
level="body-sm"
fontWeight="xl"
id="variant-label"
textColor="text.primary"
Expand Down
5 changes: 1 addition & 4 deletions docs/data/joy/components/alert/AlertColors.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ export default function AlertColors() {
<Alert variant={variant} color="danger">
Danger
</Alert>
<Alert variant={variant} color="info">
Info
</Alert>
<Alert variant={variant} color="success">
Success
</Alert>
Expand All @@ -41,7 +38,7 @@ export default function AlertColors() {
</Stack>
<Sheet sx={{ pl: 4, ml: 3, borderLeft: '1px solid', borderColor: 'divider' }}>
<Typography
level="body2"
level="body-sm"
fontWeight="xl"
id="variant-label"
textColor="text.primary"
Expand Down
24 changes: 11 additions & 13 deletions docs/data/joy/components/alert/AlertInvertedColors.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,12 @@ export default function AlertInvertedColors() {
}
sx={{ alignItems: 'flex-start', overflow: 'hidden' }}
>
<Box>
<Typography level="body1" fontWeight="lg">
Success
</Typography>
<Typography level="body3">
<div>
<Typography level="title-lg">Success</Typography>
<Typography level="body-sm">
Success is walking from failure to failure with no loss of enthusiam.
</Typography>
</Box>
</div>
<LinearProgress
variant="soft"
value={40}
Expand All @@ -69,7 +67,6 @@ export default function AlertInvertedColors() {
})}
/>
</Alert>

<Alert
variant="soft"
color="danger"
Expand All @@ -79,18 +76,19 @@ export default function AlertInvertedColors() {
<Warning />
</CircularProgress>
}
sx={{ alignItems: 'flex-start', '--Alert-gap': '1rem' }}
sx={{ alignItems: 'flex-start', gap: '1rem' }}
>
<Box sx={{ flex: 1 }}>
<Typography sx={{ mt: 1 }}>
Network loss, please recheck your connection.
<Typography level="title-md">Lost connection</Typography>
<Typography level="body-md">
Please verify your network connection and try again.
</Typography>
<Box sx={{ mt: 2, display: 'flex', justifyContent: 'flex-end', gap: 1 }}>
<Button variant="outlined" size="sm">
Open network setting
Open network settings
</Button>
<Button variant="soft" size="sm">
Okay
<Button variant="solid" size="sm">
Try again
</Button>
</Box>
</Box>
Expand Down
24 changes: 11 additions & 13 deletions docs/data/joy/components/alert/AlertInvertedColors.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,12 @@ export default function AlertInvertedColors() {
}
sx={{ alignItems: 'flex-start', overflow: 'hidden' }}
>
<Box>
<Typography level="body1" fontWeight="lg">
Success
</Typography>
<Typography level="body3">
<div>
<Typography level="title-lg">Success</Typography>
<Typography level="body-sm">
Success is walking from failure to failure with no loss of enthusiam.
</Typography>
</Box>
</div>
<LinearProgress
variant="soft"
value={40}
Expand All @@ -69,7 +67,6 @@ export default function AlertInvertedColors() {
})}
/>
</Alert>

<Alert
variant="soft"
color="danger"
Expand All @@ -79,18 +76,19 @@ export default function AlertInvertedColors() {
<Warning />
</CircularProgress>
}
sx={{ alignItems: 'flex-start', '--Alert-gap': '1rem' }}
sx={{ alignItems: 'flex-start', gap: '1rem' }}
>
<Box sx={{ flex: 1 }}>
<Typography sx={{ mt: 1 }}>
Network loss, please recheck your connection.
<Typography level="title-md">Lost connection</Typography>
<Typography level="body-md">
Please verify your network connection and try again.
</Typography>
<Box sx={{ mt: 2, display: 'flex', justifyContent: 'flex-end', gap: 1 }}>
<Button variant="outlined" size="sm">
Open network setting
Open network settings
</Button>
<Button variant="soft" size="sm">
Okay
<Button variant="solid" size="sm">
Try again
</Button>
</Box>
</Box>
Expand Down
4 changes: 2 additions & 2 deletions docs/data/joy/components/alert/AlertUsage.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ export default function AlertUsage() {
{
propName: 'variant',
knob: 'radio',
defaultValue: 'soft',
defaultValue: 'outlined',
options: ['plain', 'outlined', 'soft', 'solid'],
},
{
propName: 'color',
knob: 'color',
defaultValue: 'primary',
defaultValue: 'neutral',
},
{
propName: 'size',
Expand Down
15 changes: 5 additions & 10 deletions docs/data/joy/components/alert/AlertVariousStates.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default function AlertVariousStates() {
{ title: 'Success', color: 'success', icon: <CheckCircleIcon /> },
{ title: 'Warning', color: 'warning', icon: <WarningIcon /> },
{ title: 'Error', color: 'danger', icon: <ReportIcon /> },
{ title: 'Info', color: 'info', icon: <InfoIcon /> },
{ title: 'Neutral', color: 'neutral', icon: <InfoIcon /> },
];

return (
Expand All @@ -23,23 +23,18 @@ export default function AlertVariousStates() {
<Alert
key={title}
sx={{ alignItems: 'flex-start' }}
startDecorator={React.cloneElement(icon, {
sx: { mt: '2px', mx: '4px' },
fontSize: 'xl2',
})}
startDecorator={icon}
variant="soft"
color={color}
endDecorator={
<IconButton variant="soft" size="sm" color={color}>
<IconButton variant="soft" color={color}>
<CloseRoundedIcon />
</IconButton>
}
>
<div>
<Typography fontWeight="lg" mt={0.25}>
{title}
</Typography>
<Typography fontSize="sm" sx={{ opacity: 0.8 }}>
<div>{title}</div>
<Typography level="body-sm" color={color}>
This is a time-sensitive {title} Alert.
</Typography>
</div>
Expand Down
15 changes: 5 additions & 10 deletions docs/data/joy/components/alert/AlertVariousStates.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,31 +19,26 @@ export default function AlertVariousStates() {
{ title: 'Success', color: 'success', icon: <CheckCircleIcon /> },
{ title: 'Warning', color: 'warning', icon: <WarningIcon /> },
{ title: 'Error', color: 'danger', icon: <ReportIcon /> },
{ title: 'Info', color: 'info', icon: <InfoIcon /> },
{ title: 'Neutral', color: 'neutral', icon: <InfoIcon /> },
];
return (
<Box sx={{ display: 'flex', gap: 2, width: '100%', flexDirection: 'column' }}>
{items.map(({ title, color, icon }) => (
<Alert
key={title}
sx={{ alignItems: 'flex-start' }}
startDecorator={React.cloneElement(icon, {
sx: { mt: '2px', mx: '4px' },
fontSize: 'xl2',
})}
startDecorator={icon}
variant="soft"
color={color}
endDecorator={
<IconButton variant="soft" size="sm" color={color}>
<IconButton variant="soft" color={color}>
<CloseRoundedIcon />
</IconButton>
}
>
<div>
<Typography fontWeight="lg" mt={0.25}>
{title}
</Typography>
<Typography fontSize="sm" sx={{ opacity: 0.8 }}>
<div>{title}</div>
<Typography level="body-sm" color={color}>
This is a time-sensitive {title} Alert.
</Typography>
</div>
Expand Down
19 changes: 6 additions & 13 deletions docs/data/joy/components/alert/AlertWithDangerState.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@ import * as React from 'react';
import Box from '@mui/joy/Box';
import Alert from '@mui/joy/Alert';
import IconButton from '@mui/joy/IconButton';
import Typography from '@mui/joy/Typography';
import Button from '@mui/joy/Button';

export default function AlertWithDangerState() {
return (
<Box sx={{ display: 'flex', gap: 2, width: '100%', flexDirection: 'column' }}>
<Alert
startDecorator={<WarningIcon sx={{ mx: 0.5 }} />}
startDecorator={<WarningIcon />}
variant="soft"
color="danger"
endDecorator={
Expand All @@ -25,12 +24,10 @@ export default function AlertWithDangerState() {
</React.Fragment>
}
>
<Typography color="danger" fontWeight="md">
This file was successfully deleted
</Typography>
This file was successfully deleted
</Alert>
<Alert
startDecorator={<WarningIcon sx={{ mx: 0.5 }} />}
startDecorator={<WarningIcon />}
variant="solid"
color="danger"
endDecorator={
Expand All @@ -44,13 +41,11 @@ export default function AlertWithDangerState() {
</React.Fragment>
}
>
<Typography sx={{ color: 'white' }} fontWeight="md">
This file was successfully deleted
</Typography>
This file was successfully deleted
</Alert>

<Alert
startDecorator={<WarningIcon sx={{ mx: 0.5 }} />}
startDecorator={<WarningIcon />}
variant="outlined"
color="danger"
endDecorator={
Expand All @@ -64,9 +59,7 @@ export default function AlertWithDangerState() {
</React.Fragment>
}
>
<Typography color="danger" fontWeight="md">
This file was successfully deleted
</Typography>
This file was successfully deleted
</Alert>
</Box>
);
Expand Down
19 changes: 6 additions & 13 deletions docs/data/joy/components/alert/AlertWithDangerState.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@ import * as React from 'react';
import Box from '@mui/joy/Box';
import Alert from '@mui/joy/Alert';
import IconButton from '@mui/joy/IconButton';
import Typography from '@mui/joy/Typography';
import Button from '@mui/joy/Button';

export default function AlertWithDangerState() {
return (
<Box sx={{ display: 'flex', gap: 2, width: '100%', flexDirection: 'column' }}>
<Alert
startDecorator={<WarningIcon sx={{ mx: 0.5 }} />}
startDecorator={<WarningIcon />}
variant="soft"
color="danger"
endDecorator={
Expand All @@ -25,12 +24,10 @@ export default function AlertWithDangerState() {
</React.Fragment>
}
>
<Typography color="danger" fontWeight="md">
This file was successfully deleted
</Typography>
This file was successfully deleted
</Alert>
<Alert
startDecorator={<WarningIcon sx={{ mx: 0.5 }} />}
startDecorator={<WarningIcon />}
variant="solid"
color="danger"
endDecorator={
Expand All @@ -44,13 +41,11 @@ export default function AlertWithDangerState() {
</React.Fragment>
}
>
<Typography sx={{ color: 'white' }} fontWeight="md">
This file was successfully deleted
</Typography>
This file was successfully deleted
</Alert>

<Alert
startDecorator={<WarningIcon sx={{ mx: 0.5 }} />}
startDecorator={<WarningIcon />}
variant="outlined"
color="danger"
endDecorator={
Expand All @@ -64,9 +59,7 @@ export default function AlertWithDangerState() {
</React.Fragment>
}
>
<Typography color="danger" fontWeight="md">
This file was successfully deleted
</Typography>
This file was successfully deleted
</Alert>
</Box>
);
Expand Down
11 changes: 1 addition & 10 deletions docs/data/joy/components/alert/AlertWithDecorators.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,7 @@ export default function AlertWithDecorators() {
color="success"
startDecorator={<PlaylistAddCheckCircleRoundedIcon />}
endDecorator={
<Button
size="sm"
variant="outlined"
color="success"
sx={{
textTransform: 'uppercase',
fontSize: 'xs',
fontWeight: 'xl',
}}
>
<Button size="sm" variant="solid" color="success">
Close
</Button>
}
Expand Down
11 changes: 1 addition & 10 deletions docs/data/joy/components/alert/AlertWithDecorators.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,7 @@ export default function AlertWithDecorators() {
color="success"
startDecorator={<PlaylistAddCheckCircleRoundedIcon />}
endDecorator={
<Button
size="sm"
variant="outlined"
color="success"
sx={{
textTransform: 'uppercase',
fontSize: 'xs',
fontWeight: 'xl',
}}
>
<Button size="sm" variant="solid" color="success">
Close
</Button>
}
Expand Down
Loading