value:
@@ -20,7 +20,7 @@ export default function ControllableStates() {
inputValue:
diff --git a/docs/data/joy/components/autocomplete/ControllableStates.tsx b/docs/data/joy/components/autocomplete/ControllableStates.tsx
index 46e329a3114250..258d38b74d58db 100644
--- a/docs/data/joy/components/autocomplete/ControllableStates.tsx
+++ b/docs/data/joy/components/autocomplete/ControllableStates.tsx
@@ -12,7 +12,7 @@ export default function ControllableStates() {
return (
-
+
value:
@@ -20,7 +20,7 @@ export default function ControllableStates() {
-
+
inputValue:
diff --git a/docs/data/joy/components/autocomplete/CountrySelect.js b/docs/data/joy/components/autocomplete/CountrySelect.js
index 760bddbc201890..3d0d980b6f6b3b 100644
--- a/docs/data/joy/components/autocomplete/CountrySelect.js
+++ b/docs/data/joy/components/autocomplete/CountrySelect.js
@@ -32,7 +32,7 @@ export default function CountrySelect() {
{option.label}
-
+
({option.code}) +{option.phone}
diff --git a/docs/data/joy/components/autocomplete/CountrySelect.tsx b/docs/data/joy/components/autocomplete/CountrySelect.tsx
index 760bddbc201890..3d0d980b6f6b3b 100644
--- a/docs/data/joy/components/autocomplete/CountrySelect.tsx
+++ b/docs/data/joy/components/autocomplete/CountrySelect.tsx
@@ -32,7 +32,7 @@ export default function CountrySelect() {
{option.label}
-
+
({option.code}) +{option.phone}
diff --git a/docs/data/joy/components/autocomplete/GitHubLabel.js b/docs/data/joy/components/autocomplete/GitHubLabel.js
index 354b0cad797b69..f08b08889fd2be 100644
--- a/docs/data/joy/components/autocomplete/GitHubLabel.js
+++ b/docs/data/joy/components/autocomplete/GitHubLabel.js
@@ -59,7 +59,7 @@ export default function GitHubLabel() {
color="neutral"
component="button"
underline="none"
- level="body3"
+ level="body-xs"
aria-describedby={id}
onClick={handleClick}
sx={{
@@ -80,13 +80,12 @@ export default function GitHubLabel() {
{value.map((label) => (
@@ -179,10 +178,8 @@ export default function GitHubLabel() {
}}
/>
- {option.name}
-
- {option.description}
-
+ {option.name}
+ {option.description}
diff --git a/docs/data/joy/components/autocomplete/GitHubLabel.tsx b/docs/data/joy/components/autocomplete/GitHubLabel.tsx
index 549f4da73966a8..b0c519c67da805 100644
--- a/docs/data/joy/components/autocomplete/GitHubLabel.tsx
+++ b/docs/data/joy/components/autocomplete/GitHubLabel.tsx
@@ -59,7 +59,7 @@ export default function GitHubLabel() {
color="neutral"
component="button"
underline="none"
- level="body3"
+ level="body-xs"
aria-describedby={id}
onClick={handleClick}
sx={{
@@ -80,13 +80,12 @@ export default function GitHubLabel() {
{value.map((label) => (
@@ -179,10 +178,8 @@ export default function GitHubLabel() {
}}
/>
- {option.name}
-
- {option.description}
-
+ {option.name}
+ {option.description}
diff --git a/docs/data/joy/components/autocomplete/Highlights.js b/docs/data/joy/components/autocomplete/Highlights.js
index 97b43b929a90f6..f320f496d15a6e 100644
--- a/docs/data/joy/components/autocomplete/Highlights.js
+++ b/docs/data/joy/components/autocomplete/Highlights.js
@@ -30,7 +30,7 @@ export default function Highlights() {
key={index}
{...(part.highlight && {
variant: 'soft',
- color: 'info',
+ color: 'primary',
fontWeight: 'lg',
px: '2px',
})}
diff --git a/docs/data/joy/components/autocomplete/Highlights.tsx b/docs/data/joy/components/autocomplete/Highlights.tsx
index 97b43b929a90f6..f320f496d15a6e 100644
--- a/docs/data/joy/components/autocomplete/Highlights.tsx
+++ b/docs/data/joy/components/autocomplete/Highlights.tsx
@@ -30,7 +30,7 @@ export default function Highlights() {
key={index}
{...(part.highlight && {
variant: 'soft',
- color: 'info',
+ color: 'primary',
fontWeight: 'lg',
px: '2px',
})}
diff --git a/docs/data/joy/components/autocomplete/Playground.js b/docs/data/joy/components/autocomplete/Playground.js
index 7ddf59304b82c3..71cd6c843bf46f 100644
--- a/docs/data/joy/components/autocomplete/Playground.js
+++ b/docs/data/joy/components/autocomplete/Playground.js
@@ -33,16 +33,9 @@ export default function Playground() {
top: 'var(--MuiDocs-header-height)',
zIndex: 2,
border: '1px solid',
- borderColor: (theme) =>
- theme.palette.mode === 'dark'
- ? 'rgba(62, 80, 96, 0.3)'
- : theme.palette.neutral[100],
-
+ borderColor: 'divider',
borderRadius: 'xs',
- background: (theme) =>
- theme.palette.mode === 'dark'
- ? 'rgba(0,30,60, 0.95)'
- : theme.palette.primary[50],
+ bgcolor: 'background.surface',
}}
>
@@ -57,7 +50,7 @@ export default function Playground() {
setFlags([])}
- sx={{ ml: 'auto' }}
+ sx={{ ml: 'auto', mr: 2 }}
>
Clear all
diff --git a/docs/data/joy/components/autocomplete/autocomplete.md b/docs/data/joy/components/autocomplete/autocomplete.md
index 0126ee08748ffe..38ad1ba96c0aee 100644
--- a/docs/data/joy/components/autocomplete/autocomplete.md
+++ b/docs/data/joy/components/autocomplete/autocomplete.md
@@ -73,12 +73,27 @@ To customize the appearance of the options, use `renderOption` prop in combinati
The autocomplete component supports the four global variants: `outlined` (default), `soft`, `solid`, and `plain`.
-{{"demo": "InputAppearance.js"}}
+The variant and color values are propagated to the Autocomplete's `input` and `listbox` slots.
+
+{{"demo": "AutocompleteVariants.js"}}
:::info
To learn how to add more variants to the component, check out [Themed componentsβExtend variants](/joy-ui/customization/themed-components/#extend-variants).
:::
+To customize the variant and color for a specific slot, use `slotProps`:
+
+```js
+
+```
+
### Label
Put an `Autocomplete`, a `FormLabel` and a `FormHelperText` (optional) under a `FormControl` component to create an accessible autocomplete.
diff --git a/docs/data/joy/components/avatar/AvatarUsage.js b/docs/data/joy/components/avatar/AvatarUsage.js
index 1eb3bf7d5238e8..f89582500a3afd 100644
--- a/docs/data/joy/components/avatar/AvatarUsage.js
+++ b/docs/data/joy/components/avatar/AvatarUsage.js
@@ -19,6 +19,12 @@ export default function AvatarUsage() {
knob: 'color',
defaultValue: 'neutral',
},
+ {
+ propName: 'size',
+ knob: 'radio',
+ options: ['sm', 'md', 'lg'],
+ defaultValue: 'md',
+ },
]}
renderDemo={(props) => (
M
+
)}
/>
diff --git a/docs/data/joy/components/badge/BadgeColors.js b/docs/data/joy/components/badge/BadgeColors.js
index 73825541483b3b..386580e936f261 100644
--- a/docs/data/joy/components/badge/BadgeColors.js
+++ b/docs/data/joy/components/badge/BadgeColors.js
@@ -15,9 +15,6 @@ export default function BadgeColors() {
π
-
- π
-
π
diff --git a/docs/data/joy/components/badge/BadgeColors.tsx b/docs/data/joy/components/badge/BadgeColors.tsx
index 73825541483b3b..386580e936f261 100644
--- a/docs/data/joy/components/badge/BadgeColors.tsx
+++ b/docs/data/joy/components/badge/BadgeColors.tsx
@@ -15,9 +15,6 @@ export default function BadgeColors() {
π
-
- π
-
π
diff --git a/docs/data/joy/components/badge/BadgeColors.tsx.preview b/docs/data/joy/components/badge/BadgeColors.tsx.preview
new file mode 100644
index 00000000000000..23c6a001ca8d15
--- /dev/null
+++ b/docs/data/joy/components/badge/BadgeColors.tsx.preview
@@ -0,0 +1,15 @@
+
+ π
+
+
+ π
+
+
+ π
+
+
+ π
+
+
+ π
+
\ No newline at end of file
diff --git a/docs/data/joy/components/badge/ContentBadge.js b/docs/data/joy/components/badge/ContentBadge.js
index 2df6bf4cbd0fb2..36ff4117e6b14b 100644
--- a/docs/data/joy/components/badge/ContentBadge.js
+++ b/docs/data/joy/components/badge/ContentBadge.js
@@ -2,6 +2,7 @@ import * as React from 'react';
import Box from '@mui/joy/Box';
import Badge from '@mui/joy/Badge';
import Typography from '@mui/joy/Typography';
+import Warning from '@mui/icons-material/Warning';
export default function ContentBadge() {
return (
@@ -12,6 +13,9 @@ export default function ContentBadge() {
π
+ }>
+ πͺ«
+
);
}
diff --git a/docs/data/joy/components/badge/ContentBadge.tsx b/docs/data/joy/components/badge/ContentBadge.tsx
index 2df6bf4cbd0fb2..36ff4117e6b14b 100644
--- a/docs/data/joy/components/badge/ContentBadge.tsx
+++ b/docs/data/joy/components/badge/ContentBadge.tsx
@@ -2,6 +2,7 @@ import * as React from 'react';
import Box from '@mui/joy/Box';
import Badge from '@mui/joy/Badge';
import Typography from '@mui/joy/Typography';
+import Warning from '@mui/icons-material/Warning';
export default function ContentBadge() {
return (
@@ -12,6 +13,9 @@ export default function ContentBadge() {
π
+ }>
+ πͺ«
+
);
}
diff --git a/docs/data/joy/components/badge/ContentBadge.tsx.preview b/docs/data/joy/components/badge/ContentBadge.tsx.preview
index 66a68b23400576..b9fc148b83b609 100644
--- a/docs/data/joy/components/badge/ContentBadge.tsx.preview
+++ b/docs/data/joy/components/badge/ContentBadge.tsx.preview
@@ -3,4 +3,7 @@
π
+
+ }>
+ πͺ«
\ No newline at end of file
diff --git a/docs/data/joy/components/badge/NumberBadge.js b/docs/data/joy/components/badge/NumberBadge.js
index acb6a27ae0cc05..c34814ddbc80ae 100644
--- a/docs/data/joy/components/badge/NumberBadge.js
+++ b/docs/data/joy/components/badge/NumberBadge.js
@@ -12,10 +12,16 @@ export default function NumberBadge() {
const [showZero, setShowZero] = React.useState(false);
return (
- π
+ π
- setShowZero(event.target.checked)}
- checked={showZero}
- label="show zero"
- />
+ setShowZero(event.target.checked)}
+ checked={showZero}
+ label="show zero"
+ />
);
}
diff --git a/docs/data/joy/components/badge/NumberBadge.tsx b/docs/data/joy/components/badge/NumberBadge.tsx
index acb6a27ae0cc05..c34814ddbc80ae 100644
--- a/docs/data/joy/components/badge/NumberBadge.tsx
+++ b/docs/data/joy/components/badge/NumberBadge.tsx
@@ -12,10 +12,16 @@ export default function NumberBadge() {
const [showZero, setShowZero] = React.useState(false);
return (
- π
+ π
- setShowZero(event.target.checked)}
- checked={showZero}
- label="show zero"
- />
+ setShowZero(event.target.checked)}
+ checked={showZero}
+ label="show zero"
+ />
);
}
diff --git a/docs/data/joy/components/breadcrumbs/BasicBreadcrumbs.js b/docs/data/joy/components/breadcrumbs/BasicBreadcrumbs.js
index d2a24139ffb239..1cbb03cc5fa266 100644
--- a/docs/data/joy/components/breadcrumbs/BasicBreadcrumbs.js
+++ b/docs/data/joy/components/breadcrumbs/BasicBreadcrumbs.js
@@ -7,20 +7,11 @@ export default function BasicBreadcrumbs() {
return (
{['Home', 'TV Shows', 'Futurama', 'Characters'].map((item) => (
- event.preventDefault()}
- key={item}
- underline="hover"
- color="neutral"
- fontSize="inherit"
- href="/"
- >
+
{item}
))}
- Dr. Zoidberg
+ Dr. Zoidberg
);
}
diff --git a/docs/data/joy/components/breadcrumbs/BasicBreadcrumbs.tsx b/docs/data/joy/components/breadcrumbs/BasicBreadcrumbs.tsx
index 8b37d5f3bc2a9c..71d757c4f326cb 100644
--- a/docs/data/joy/components/breadcrumbs/BasicBreadcrumbs.tsx
+++ b/docs/data/joy/components/breadcrumbs/BasicBreadcrumbs.tsx
@@ -7,20 +7,11 @@ export default function BasicBreadcrumbs() {
return (
{['Home', 'TV Shows', 'Futurama', 'Characters'].map((item: string) => (
- event.preventDefault()}
- key={item}
- underline="hover"
- color="neutral"
- fontSize="inherit"
- href="/"
- >
+
{item}
))}
- Dr. Zoidberg
+ Dr. Zoidberg
);
}
diff --git a/docs/data/joy/components/breadcrumbs/BasicBreadcrumbs.tsx.preview b/docs/data/joy/components/breadcrumbs/BasicBreadcrumbs.tsx.preview
new file mode 100644
index 00000000000000..1d8959f2cf45ef
--- /dev/null
+++ b/docs/data/joy/components/breadcrumbs/BasicBreadcrumbs.tsx.preview
@@ -0,0 +1,8 @@
+
+ {['Home', 'TV Shows', 'Futurama', 'Characters'].map((item: string) => (
+
+ {item}
+
+ ))}
+ Dr. Zoidberg
+
\ No newline at end of file
diff --git a/docs/data/joy/components/breadcrumbs/BreadcrumbsSizes.js b/docs/data/joy/components/breadcrumbs/BreadcrumbsSizes.js
index 2385d08caeb03b..0ac91d803114ee 100644
--- a/docs/data/joy/components/breadcrumbs/BreadcrumbsSizes.js
+++ b/docs/data/joy/components/breadcrumbs/BreadcrumbsSizes.js
@@ -9,54 +9,30 @@ export default function BreadcrumbsSizes() {
{['Home', 'TV Shows', 'Futurama', 'Characters'].map((item) => (
- event.preventDefault()}
- key={item}
- underline="hover"
- color="neutral"
- fontSize="inherit"
- href="/"
- >
+
{item}
))}
- Dr. Zoidberg
+
+ Dr. Zoidberg
{['Home', 'TV Shows', 'Futurama', 'Characters'].map((item) => (
- event.preventDefault()}
- key={item}
- underline="hover"
- color="neutral"
- fontSize="inherit"
- href="/"
- >
+
{item}
))}
- Dr. Zoidberg
+
+ Dr. Zoidberg
{['Home', 'TV Shows', 'Futurama', 'Characters'].map((item) => (
- event.preventDefault()}
- key={item}
- underline="hover"
- color="neutral"
- fontSize="inherit"
- href="/"
- >
+
{item}
))}
- Dr. Zoidberg
+
+ Dr. Zoidberg
);
diff --git a/docs/data/joy/components/breadcrumbs/BreadcrumbsSizes.tsx b/docs/data/joy/components/breadcrumbs/BreadcrumbsSizes.tsx
index 0ecf6686bbc6ac..0ac91d803114ee 100644
--- a/docs/data/joy/components/breadcrumbs/BreadcrumbsSizes.tsx
+++ b/docs/data/joy/components/breadcrumbs/BreadcrumbsSizes.tsx
@@ -8,55 +8,31 @@ export default function BreadcrumbsSizes() {
return (
- {['Home', 'TV Shows', 'Futurama', 'Characters'].map((item: string) => (
- event.preventDefault()}
- key={item}
- underline="hover"
- color="neutral"
- fontSize="inherit"
- href="/"
- >
+ {['Home', 'TV Shows', 'Futurama', 'Characters'].map((item) => (
+
{item}
))}
- Dr. Zoidberg
+
+ Dr. Zoidberg
- {['Home', 'TV Shows', 'Futurama', 'Characters'].map((item: string) => (
- event.preventDefault()}
- key={item}
- underline="hover"
- color="neutral"
- fontSize="inherit"
- href="/"
- >
+ {['Home', 'TV Shows', 'Futurama', 'Characters'].map((item) => (
+
{item}
))}
- Dr. Zoidberg
+
+ Dr. Zoidberg
- {['Home', 'TV Shows', 'Futurama', 'Characters'].map((item: string) => (
- event.preventDefault()}
- key={item}
- underline="hover"
- color="neutral"
- fontSize="inherit"
- href="/"
- >
+ {['Home', 'TV Shows', 'Futurama', 'Characters'].map((item) => (
+
{item}
))}
- Dr. Zoidberg
+
+ Dr. Zoidberg
);
diff --git a/docs/data/joy/components/breadcrumbs/BreadcrumbsUsage.js b/docs/data/joy/components/breadcrumbs/BreadcrumbsUsage.js
index 1b8aa125cb06e1..320ed9c3b0d7e2 100644
--- a/docs/data/joy/components/breadcrumbs/BreadcrumbsUsage.js
+++ b/docs/data/joy/components/breadcrumbs/BreadcrumbsUsage.js
@@ -30,24 +30,20 @@ export default function BreadcrumbsUsage() {
event.preventDefault()}
- underline="hover"
color="neutral"
href="/"
- fontSize="inherit"
>
MUI
event.preventDefault()}
- underline="hover"
color="neutral"
href="/joy-ui/getting-started/installation/"
- fontSize="inherit"
>
Joy
- Breadcrumbs
+ Breadcrumbs
)}
/>
diff --git a/docs/data/joy/components/breadcrumbs/BreadcrumbsVariables.js b/docs/data/joy/components/breadcrumbs/BreadcrumbsVariables.js
index dc9a1f8c728eaa..920860fd76bc3f 100644
--- a/docs/data/joy/components/breadcrumbs/BreadcrumbsVariables.js
+++ b/docs/data/joy/components/breadcrumbs/BreadcrumbsVariables.js
@@ -17,20 +17,12 @@ export default function BreadcrumbsVariables() {
renderDemo={(sx) => (
{['Menu 1', 'Menu 2'].map((item) => (
- event.preventDefault()}
- key={item}
- underline="hover"
- color="neutral"
- fontSize="inherit"
- href="/"
- >
+
{item}
))}
- Menu 3
+
+ Menu 3
)}
/>
diff --git a/docs/data/joy/components/breadcrumbs/BreadcrumbsVariables.tsx b/docs/data/joy/components/breadcrumbs/BreadcrumbsVariables.tsx
index 26f69ed2b0f0ca..920860fd76bc3f 100644
--- a/docs/data/joy/components/breadcrumbs/BreadcrumbsVariables.tsx
+++ b/docs/data/joy/components/breadcrumbs/BreadcrumbsVariables.tsx
@@ -16,21 +16,13 @@ export default function BreadcrumbsVariables() {
]}
renderDemo={(sx) => (
- {['Menu 1', 'Menu 2'].map((item: string) => (
- event.preventDefault()}
- key={item}
- underline="hover"
- color="neutral"
- fontSize="inherit"
- href="/"
- >
+ {['Menu 1', 'Menu 2'].map((item) => (
+
{item}
))}
- Menu 3
+
+ Menu 3
)}
/>
diff --git a/docs/data/joy/components/breadcrumbs/BreadcrumbsWithIcon.js b/docs/data/joy/components/breadcrumbs/BreadcrumbsWithIcon.js
index c83cd7e63300b4..98983f078764fa 100644
--- a/docs/data/joy/components/breadcrumbs/BreadcrumbsWithIcon.js
+++ b/docs/data/joy/components/breadcrumbs/BreadcrumbsWithIcon.js
@@ -7,33 +7,17 @@ import Typography from '@mui/joy/Typography';
export default function BreadcrumbsWithIcon() {
return (
- event.preventDefault()}
- underline="hover"
- color="primary"
- fontSize="inherit"
- href="/"
- >
-
+
+
United States
{['Springfield', 'Simpson'].map((item) => (
- event.preventDefault()}
- key={item}
- underline="hover"
- color="success"
- fontSize="inherit"
- href="/"
- >
+
{item}
))}
- Homer
+
+ Homer
);
}
diff --git a/docs/data/joy/components/breadcrumbs/BreadcrumbsWithIcon.tsx b/docs/data/joy/components/breadcrumbs/BreadcrumbsWithIcon.tsx
index e3f30314190f18..98983f078764fa 100644
--- a/docs/data/joy/components/breadcrumbs/BreadcrumbsWithIcon.tsx
+++ b/docs/data/joy/components/breadcrumbs/BreadcrumbsWithIcon.tsx
@@ -7,33 +7,17 @@ import Typography from '@mui/joy/Typography';
export default function BreadcrumbsWithIcon() {
return (
- event.preventDefault()}
- underline="hover"
- color="primary"
- fontSize="inherit"
- href="/"
- >
-
+
+
United States
- {['Springfield', 'Simpson'].map((item: string) => (
- event.preventDefault()}
- key={item}
- underline="hover"
- color="success"
- fontSize="inherit"
- href="/"
- >
+ {['Springfield', 'Simpson'].map((item) => (
+
{item}
))}
- Homer
+
+ Homer
);
}
diff --git a/docs/data/joy/components/breadcrumbs/BreadcrumbsWithIcon.tsx.preview b/docs/data/joy/components/breadcrumbs/BreadcrumbsWithIcon.tsx.preview
new file mode 100644
index 00000000000000..3eed5aa3804e4b
--- /dev/null
+++ b/docs/data/joy/components/breadcrumbs/BreadcrumbsWithIcon.tsx.preview
@@ -0,0 +1,13 @@
+
+
+
+ United States
+
+ {['Springfield', 'Simpson'].map((item) => (
+
+ {item}
+
+ ))}
+
+ Homer
+
\ No newline at end of file
diff --git a/docs/data/joy/components/breadcrumbs/BreadcrumbsWithMenu.js b/docs/data/joy/components/breadcrumbs/BreadcrumbsWithMenu.js
index e1ce7864c4826f..5c2f89eace33d2 100644
--- a/docs/data/joy/components/breadcrumbs/BreadcrumbsWithMenu.js
+++ b/docs/data/joy/components/breadcrumbs/BreadcrumbsWithMenu.js
@@ -30,40 +30,16 @@ export default function BreadcrumbsWithMenu() {
- event.preventDefault()}
- underline="hover"
- color="primary"
- href="/"
- fontSize="inherit"
- >
+
Breadcrumb 1
β’β’β’
- event.preventDefault()}
- underline="hover"
- color="primary"
- href="/"
- fontSize="inherit"
- >
+
Breadcrumb 5
- event.preventDefault()}
- underline="hover"
- color="primary"
- href="/"
- fontSize="inherit"
- >
+
Breadcrumb 6
diff --git a/docs/data/joy/components/breadcrumbs/BreadcrumbsWithMenu.tsx b/docs/data/joy/components/breadcrumbs/BreadcrumbsWithMenu.tsx
index 1dcbacce99efbd..01111f7f9e3e65 100644
--- a/docs/data/joy/components/breadcrumbs/BreadcrumbsWithMenu.tsx
+++ b/docs/data/joy/components/breadcrumbs/BreadcrumbsWithMenu.tsx
@@ -30,40 +30,16 @@ export default function BreadcrumbsWithMenu() {
- event.preventDefault()}
- underline="hover"
- color="primary"
- href="/"
- fontSize="inherit"
- >
+
Breadcrumb 1
β’β’β’
- event.preventDefault()}
- underline="hover"
- color="primary"
- href="/"
- fontSize="inherit"
- >
+
Breadcrumb 5
- event.preventDefault()}
- underline="hover"
- color="primary"
- href="/"
- fontSize="inherit"
- >
+
Breadcrumb 6
diff --git a/docs/data/joy/components/breadcrumbs/CondensedBreadcrumbs.js b/docs/data/joy/components/breadcrumbs/CondensedBreadcrumbs.js
index d4024657319795..1aa441a0aebf30 100644
--- a/docs/data/joy/components/breadcrumbs/CondensedBreadcrumbs.js
+++ b/docs/data/joy/components/breadcrumbs/CondensedBreadcrumbs.js
@@ -23,26 +23,19 @@ export default function CondensedBreadcrumbs() {
setCondensed(false);
}}
variant="plain"
- color="info"
+ color="primary"
>
β’β’β’
) : null}
{navigationItems.map((item) => (
- event.preventDefault()}
- underline="hover"
- color="info"
- href="/"
- fontSize="inherit"
- >
-
+
+
{item}
))}
-
-
+
+
bablo.txt
diff --git a/docs/data/joy/components/breadcrumbs/CondensedBreadcrumbs.tsx b/docs/data/joy/components/breadcrumbs/CondensedBreadcrumbs.tsx
index 27aa8ef9fc1032..1e450e8468c53f 100644
--- a/docs/data/joy/components/breadcrumbs/CondensedBreadcrumbs.tsx
+++ b/docs/data/joy/components/breadcrumbs/CondensedBreadcrumbs.tsx
@@ -23,26 +23,19 @@ export default function CondensedBreadcrumbs() {
setCondensed(false);
}}
variant="plain"
- color="info"
+ color="primary"
>
β’β’β’
) : null}
{navigationItems.map((item: string) => (
- event.preventDefault()}
- underline="hover"
- color="info"
- href="/"
- fontSize="inherit"
- >
-
+
+
{item}
))}
-
-
+
+
bablo.txt
diff --git a/docs/data/joy/components/breadcrumbs/SeparatorBreadcrumbs.js b/docs/data/joy/components/breadcrumbs/SeparatorBreadcrumbs.js
index 778b740ba80d25..5584e7ae8ea938 100644
--- a/docs/data/joy/components/breadcrumbs/SeparatorBreadcrumbs.js
+++ b/docs/data/joy/components/breadcrumbs/SeparatorBreadcrumbs.js
@@ -7,18 +7,9 @@ import Typography from '@mui/joy/Typography';
export default function SeparatorBreadcrumbs() {
return (
} aria-label="breadcrumbs">
- Amy
+ Amy
{['Characters', 'Futurama', 'TV Shows', 'Home'].map((item) => (
- event.preventDefault()}
- key={item}
- underline="hover"
- color="neutral"
- fontSize="inherit"
- href="/"
- >
+
{item}
))}
diff --git a/docs/data/joy/components/breadcrumbs/SeparatorBreadcrumbs.tsx b/docs/data/joy/components/breadcrumbs/SeparatorBreadcrumbs.tsx
index 1a39bfd74da6b1..c7f402ccc503a9 100644
--- a/docs/data/joy/components/breadcrumbs/SeparatorBreadcrumbs.tsx
+++ b/docs/data/joy/components/breadcrumbs/SeparatorBreadcrumbs.tsx
@@ -7,18 +7,9 @@ import Typography from '@mui/joy/Typography';
export default function SeparatorBreadcrumbs() {
return (
} aria-label="breadcrumbs">
- Amy
+ Amy
{['Characters', 'Futurama', 'TV Shows', 'Home'].map((item: string) => (
- event.preventDefault()}
- key={item}
- underline="hover"
- color="neutral"
- fontSize="inherit"
- href="/"
- >
+
{item}
))}
diff --git a/docs/data/joy/components/breadcrumbs/SeparatorBreadcrumbs.tsx.preview b/docs/data/joy/components/breadcrumbs/SeparatorBreadcrumbs.tsx.preview
new file mode 100644
index 00000000000000..2339cbc66cd23b
--- /dev/null
+++ b/docs/data/joy/components/breadcrumbs/SeparatorBreadcrumbs.tsx.preview
@@ -0,0 +1,8 @@
+ } aria-label="breadcrumbs">
+ Amy
+ {['Characters', 'Futurama', 'TV Shows', 'Home'].map((item: string) => (
+
+ {item}
+
+ ))}
+
\ No newline at end of file
diff --git a/docs/data/joy/components/button-group/ButtonGroupColors.js b/docs/data/joy/components/button-group/ButtonGroupColors.js
index 53c6f939645923..fcbc77510d4f4c 100644
--- a/docs/data/joy/components/button-group/ButtonGroupColors.js
+++ b/docs/data/joy/components/button-group/ButtonGroupColors.js
@@ -28,17 +28,6 @@ export default function ButtonGroupColors() {
Soft
Solid
-
- Outlined
- Plain
- Soft
- Solid
-
Soft
Solid
-
- Outlined
- Plain
- Soft
- Solid
-
-
+
{options[selectedIndex]}
-
+
{options[selectedIndex]}
Danger
-
- Info
-
Success
@@ -51,7 +48,7 @@ export default function ButtonColors() {
}}
>
Danger
-
- Info
-
Success
@@ -52,7 +49,7 @@ export default function ButtonColors() {
}}
>
-
- Yosemite National Park
-
- April 24 to May 02, 2021
+ Yosemite National Park
+ April 24 to May 02, 2021
@@ -35,17 +33,17 @@ export default function BasicCard() {
- Total price:
+ Total price:
$2,900
Explore
diff --git a/docs/data/joy/components/card/BasicCard.tsx b/docs/data/joy/components/card/BasicCard.tsx
index cc6edb8bc0def1..a7ff812c6b4fbd 100644
--- a/docs/data/joy/components/card/BasicCard.tsx
+++ b/docs/data/joy/components/card/BasicCard.tsx
@@ -11,16 +11,14 @@ export default function BasicCard() {
return (
-
- Yosemite National Park
-
- April 24 to May 02, 2021
+ Yosemite National Park
+ April 24 to May 02, 2021
@@ -35,17 +33,17 @@ export default function BasicCard() {
- Total price:
+ Total price:
$2,900
Explore
diff --git a/docs/data/joy/components/card/BioCard.js b/docs/data/joy/components/card/BioCard.js
index 2438f7926d27d6..a14d71aac2c0c5 100644
--- a/docs/data/joy/components/card/BioCard.js
+++ b/docs/data/joy/components/card/BioCard.js
@@ -10,6 +10,7 @@ import CardOverflow from '@mui/joy/CardOverflow';
import CardActions from '@mui/joy/CardActions';
import IconButton from '@mui/joy/IconButton';
import Typography from '@mui/joy/Typography';
+import SvgIcon from '@mui/joy/SvgIcon';
export default function BioCard() {
return (
@@ -26,14 +27,17 @@ export default function BioCard() {
size="sm"
variant="soft"
color="primary"
- sx={{ mt: -1, border: '3px solid', borderColor: 'background.surface' }}
+ sx={{
+ mt: -1,
+ mb: 1,
+ border: '3px solid',
+ borderColor: 'background.surface',
+ }}
>
PRO
-
- Josephine Blanton
-
-
+ Josephine Blanton
+
Hello, this is my bio and I am a PRO member of MUI. I am a developer and I
love to code.
@@ -46,60 +50,68 @@ export default function BioCard() {
}}
>
-
+
+
+
-
+
+
+
-
+
+
+
-
+
+
+
diff --git a/docs/data/joy/components/card/BioCard.tsx b/docs/data/joy/components/card/BioCard.tsx
index 2438f7926d27d6..a14d71aac2c0c5 100644
--- a/docs/data/joy/components/card/BioCard.tsx
+++ b/docs/data/joy/components/card/BioCard.tsx
@@ -10,6 +10,7 @@ import CardOverflow from '@mui/joy/CardOverflow';
import CardActions from '@mui/joy/CardActions';
import IconButton from '@mui/joy/IconButton';
import Typography from '@mui/joy/Typography';
+import SvgIcon from '@mui/joy/SvgIcon';
export default function BioCard() {
return (
@@ -26,14 +27,17 @@ export default function BioCard() {
size="sm"
variant="soft"
color="primary"
- sx={{ mt: -1, border: '3px solid', borderColor: 'background.surface' }}
+ sx={{
+ mt: -1,
+ mb: 1,
+ border: '3px solid',
+ borderColor: 'background.surface',
+ }}
>
PRO
-
- Josephine Blanton
-
-
+ Josephine Blanton
+
Hello, this is my bio and I am a PRO member of MUI. I am a developer and I
love to code.
@@ -46,60 +50,68 @@ export default function BioCard() {
}}
>
-
+
+
+
-
+
+
+
-
+
+
+
-
+
+
+
diff --git a/docs/data/joy/components/card/BottomActionsCard.js b/docs/data/joy/components/card/BottomActionsCard.js
index f169e160828504..db7f1a4bfed566 100644
--- a/docs/data/joy/components/card/BottomActionsCard.js
+++ b/docs/data/joy/components/card/BottomActionsCard.js
@@ -37,10 +37,8 @@ export default function BottomActionsCard() {
-
- NYC Coders
-
-
+ NYC Coders
+
We are a community of developers prepping for coding interviews,
participate, chat with others and get better at interviewing.
diff --git a/docs/data/joy/components/card/BottomActionsCard.tsx b/docs/data/joy/components/card/BottomActionsCard.tsx
index f169e160828504..db7f1a4bfed566 100644
--- a/docs/data/joy/components/card/BottomActionsCard.tsx
+++ b/docs/data/joy/components/card/BottomActionsCard.tsx
@@ -37,10 +37,8 @@ export default function BottomActionsCard() {
-
- NYC Coders
-
-
+ NYC Coders
+
We are a community of developers prepping for coding interviews,
participate, chat with others and get better at interviewing.
diff --git a/docs/data/joy/components/card/CardColors.js b/docs/data/joy/components/card/CardColors.js
new file mode 100644
index 00000000000000..611c971ad7ff4b
--- /dev/null
+++ b/docs/data/joy/components/card/CardColors.js
@@ -0,0 +1,108 @@
+import * as React from 'react';
+import Box from '@mui/joy/Box';
+import Button from '@mui/joy/Button';
+import Card from '@mui/joy/Card';
+import FormControl from '@mui/joy/FormControl';
+import FormLabel from '@mui/joy/FormLabel';
+import Typography from '@mui/joy/Typography';
+import Stack from '@mui/joy/Stack';
+
+export default function CardColors() {
+ const [variant, setVariant] = React.useState('plain');
+ const [color, setColor] = React.useState('neutral');
+ return (
+
+
+
+ {color} {variant} card
+
+
+
+ Variant
+
+ setVariant('plain')}
+ >
+ plain
+
+ setVariant('outlined')}
+ >
+ outlined
+
+ setVariant('soft')}
+ >
+ soft
+
+ setVariant('solid')}
+ >
+ solid
+
+
+
+
+ Color
+
+ setColor('primary')}
+ >
+ primary
+
+ setColor('neutral')}
+ >
+ neutral
+
+ setColor('danger')}
+ >
+ danger
+
+ setColor('success')}
+ >
+ success
+
+ setColor('warning')}
+ >
+ warning
+
+
+
+
+ );
+}
diff --git a/docs/data/joy/components/card/CardColors.tsx b/docs/data/joy/components/card/CardColors.tsx
new file mode 100644
index 00000000000000..9c238d200c7b87
--- /dev/null
+++ b/docs/data/joy/components/card/CardColors.tsx
@@ -0,0 +1,109 @@
+import * as React from 'react';
+import Box from '@mui/joy/Box';
+import Button from '@mui/joy/Button';
+import Card from '@mui/joy/Card';
+import FormControl from '@mui/joy/FormControl';
+import FormLabel from '@mui/joy/FormLabel';
+import Typography from '@mui/joy/Typography';
+import Stack from '@mui/joy/Stack';
+import { VariantProp, ColorPaletteProp } from '@mui/joy/styles';
+
+export default function CardColors() {
+ const [variant, setVariant] = React.useState('plain');
+ const [color, setColor] = React.useState('neutral');
+ return (
+
+
+
+ {color} {variant} card
+
+
+
+ Variant
+
+ setVariant('plain')}
+ >
+ plain
+
+ setVariant('outlined')}
+ >
+ outlined
+
+ setVariant('soft')}
+ >
+ soft
+
+ setVariant('solid')}
+ >
+ solid
+
+
+
+
+ Color
+
+ setColor('primary')}
+ >
+ primary
+
+ setColor('neutral')}
+ >
+ neutral
+
+ setColor('danger')}
+ >
+ danger
+
+ setColor('success')}
+ >
+ success
+
+ setColor('warning')}
+ >
+ warning
+
+
+
+
+ );
+}
diff --git a/docs/data/joy/components/card/CardInvertedColors.js b/docs/data/joy/components/card/CardInvertedColors.js
new file mode 100644
index 00000000000000..41ed0eec028270
--- /dev/null
+++ b/docs/data/joy/components/card/CardInvertedColors.js
@@ -0,0 +1,46 @@
+import * as React from 'react';
+import Button from '@mui/joy/Button';
+import Card from '@mui/joy/Card';
+import CardContent from '@mui/joy/CardContent';
+import CardActions from '@mui/joy/CardActions';
+import CircularProgress from '@mui/joy/CircularProgress';
+import Typography from '@mui/joy/Typography';
+import SvgIcon from '@mui/joy/SvgIcon';
+
+export default function CardInvertedColors() {
+ return (
+
+
+
+
+
+
+
+
+ Gross profit
+ $ 432.6M
+
+
+
+
+ Add to Watchlist
+
+
+ See breakdown
+
+
+
+ );
+}
diff --git a/docs/data/joy/components/card/CardInvertedColors.tsx b/docs/data/joy/components/card/CardInvertedColors.tsx
new file mode 100644
index 00000000000000..41ed0eec028270
--- /dev/null
+++ b/docs/data/joy/components/card/CardInvertedColors.tsx
@@ -0,0 +1,46 @@
+import * as React from 'react';
+import Button from '@mui/joy/Button';
+import Card from '@mui/joy/Card';
+import CardContent from '@mui/joy/CardContent';
+import CardActions from '@mui/joy/CardActions';
+import CircularProgress from '@mui/joy/CircularProgress';
+import Typography from '@mui/joy/Typography';
+import SvgIcon from '@mui/joy/SvgIcon';
+
+export default function CardInvertedColors() {
+ return (
+
+
+
+
+
+
+
+
+ Gross profit
+ $ 432.6M
+
+
+
+
+ Add to Watchlist
+
+
+ See breakdown
+
+
+
+ );
+}
diff --git a/docs/data/joy/components/card/CardSizes.js b/docs/data/joy/components/card/CardSizes.js
new file mode 100644
index 00000000000000..211aa4d493fa26
--- /dev/null
+++ b/docs/data/joy/components/card/CardSizes.js
@@ -0,0 +1,13 @@
+import * as React from 'react';
+import Stack from '@mui/joy/Stack';
+import Card from '@mui/joy/Card';
+
+export default function CardSizes() {
+ return (
+
+ Small card
+ Medium card (default)
+ Large card
+
+ );
+}
diff --git a/docs/data/joy/components/card/CardSizes.tsx b/docs/data/joy/components/card/CardSizes.tsx
new file mode 100644
index 00000000000000..211aa4d493fa26
--- /dev/null
+++ b/docs/data/joy/components/card/CardSizes.tsx
@@ -0,0 +1,13 @@
+import * as React from 'react';
+import Stack from '@mui/joy/Stack';
+import Card from '@mui/joy/Card';
+
+export default function CardSizes() {
+ return (
+
+ Small card
+ Medium card (default)
+ Large card
+
+ );
+}
diff --git a/docs/data/joy/components/card/CardSizes.tsx.preview b/docs/data/joy/components/card/CardSizes.tsx.preview
new file mode 100644
index 00000000000000..ab63e5e3e6bb41
--- /dev/null
+++ b/docs/data/joy/components/card/CardSizes.tsx.preview
@@ -0,0 +1,3 @@
+Small card
+Medium card (default)
+Large card
\ No newline at end of file
diff --git a/docs/data/joy/components/card/CardUsage.js b/docs/data/joy/components/card/CardUsage.js
index 08cfb0ee1de3a0..ff23573eda755e 100644
--- a/docs/data/joy/components/card/CardUsage.js
+++ b/docs/data/joy/components/card/CardUsage.js
@@ -56,7 +56,7 @@ export default function CardUsage() {
Yosemite
- April 24 to May 02, 2021
+ April 24 to May 02, 2021
Explore
diff --git a/docs/data/joy/components/card/CardVariables.js b/docs/data/joy/components/card/CardVariables.js
index 2e88ede3237a92..0092a7a16f8c5f 100644
--- a/docs/data/joy/components/card/CardVariables.js
+++ b/docs/data/joy/components/card/CardVariables.js
@@ -111,7 +111,7 @@ export default function CardVariables() {
Card title
- A very very long description.
+ A very very long description.
@@ -159,7 +159,7 @@ export default function CardVariables() {
Card title
-
+
Long description.
@@ -180,7 +180,7 @@ export default function CardVariables() {
}}
>
-
+
CSS variables
{vars.map((data) => (
@@ -194,7 +194,7 @@ export default function CardVariables() {
defaultValue={
Number(data.defaultValue.replace('px', '')) || undefined
}
- endDecorator={px }
+ endDecorator={px }
type={data.type}
sx={{
maxWidth: 160,
diff --git a/docs/data/joy/components/card/CardVariants.js b/docs/data/joy/components/card/CardVariants.js
new file mode 100644
index 00000000000000..7c6ff6f75257bf
--- /dev/null
+++ b/docs/data/joy/components/card/CardVariants.js
@@ -0,0 +1,49 @@
+import * as React from 'react';
+import Box from '@mui/joy/Box';
+import Card from '@mui/joy/Card';
+import CardContent from '@mui/joy/CardContent';
+import Typography from '@mui/joy/Typography';
+
+export default function CardVariants() {
+ return (
+
+
+
+ Plain card (default)
+ Description of the card.
+
+
+
+
+
+ Outlined card
+ Description of the card.
+
+
+
+
+
+ Soft card
+ Description of the card.
+
+
+
+
+
+
+ Solid card
+
+ Description of the card.
+
+
+
+ );
+}
diff --git a/docs/data/joy/components/card/CardVariants.tsx b/docs/data/joy/components/card/CardVariants.tsx
new file mode 100644
index 00000000000000..7c6ff6f75257bf
--- /dev/null
+++ b/docs/data/joy/components/card/CardVariants.tsx
@@ -0,0 +1,49 @@
+import * as React from 'react';
+import Box from '@mui/joy/Box';
+import Card from '@mui/joy/Card';
+import CardContent from '@mui/joy/CardContent';
+import Typography from '@mui/joy/Typography';
+
+export default function CardVariants() {
+ return (
+
+
+
+ Plain card (default)
+ Description of the card.
+
+
+
+
+
+ Outlined card
+ Description of the card.
+
+
+
+
+
+ Soft card
+ Description of the card.
+
+
+
+
+
+
+ Solid card
+
+ Description of the card.
+
+
+
+ );
+}
diff --git a/docs/data/joy/components/card/CongratCard.js b/docs/data/joy/components/card/CongratCard.js
index 0d21e669967dee..a1e1eeafcdfacd 100644
--- a/docs/data/joy/components/card/CongratCard.js
+++ b/docs/data/joy/components/card/CongratCard.js
@@ -38,11 +38,11 @@ export default function CongratCard() {
}}
>
-
+
-
+
π Congrats Julia π
diff --git a/docs/data/joy/components/card/CongratCard.tsx b/docs/data/joy/components/card/CongratCard.tsx
index 0d21e669967dee..a1e1eeafcdfacd 100644
--- a/docs/data/joy/components/card/CongratCard.tsx
+++ b/docs/data/joy/components/card/CongratCard.tsx
@@ -38,11 +38,11 @@ export default function CongratCard() {
}}
>
-
+
-
+
π Congrats Julia π
diff --git a/docs/data/joy/components/card/ContainerResponsive.js b/docs/data/joy/components/card/ContainerResponsive.js
index 698f415b18b49f..2e34e65029cfc4 100644
--- a/docs/data/joy/components/card/ContainerResponsive.js
+++ b/docs/data/joy/components/card/ContainerResponsive.js
@@ -54,7 +54,7 @@ export default function ContainerResponsive() {
>
-
+
- California, USA
+ California, USA
- Designed by
-
- Nature itself
-
+ Designed by
+ Nature itself
diff --git a/docs/data/joy/components/card/ContainerResponsive.tsx b/docs/data/joy/components/card/ContainerResponsive.tsx
index 698f415b18b49f..2e34e65029cfc4 100644
--- a/docs/data/joy/components/card/ContainerResponsive.tsx
+++ b/docs/data/joy/components/card/ContainerResponsive.tsx
@@ -54,7 +54,7 @@ export default function ContainerResponsive() {
>
-
+
- California, USA
+ California, USA
- Designed by
-
- Nature itself
-
+ Designed by
+ Nature itself
diff --git a/docs/data/joy/components/card/CreditCardForm.js b/docs/data/joy/components/card/CreditCardForm.js
index 04fe92e533da99..2d852a511e45c0 100644
--- a/docs/data/joy/components/card/CreditCardForm.js
+++ b/docs/data/joy/components/card/CreditCardForm.js
@@ -25,7 +25,7 @@ export default function CreditCardForm() {
resize: 'horizontal',
}}
>
- }>
+ }>
Add new card
diff --git a/docs/data/joy/components/card/CreditCardForm.tsx b/docs/data/joy/components/card/CreditCardForm.tsx
index 04fe92e533da99..2d852a511e45c0 100644
--- a/docs/data/joy/components/card/CreditCardForm.tsx
+++ b/docs/data/joy/components/card/CreditCardForm.tsx
@@ -25,7 +25,7 @@ export default function CreditCardForm() {
resize: 'horizontal',
}}
>
- }>
+ }>
Add new card
diff --git a/docs/data/joy/components/card/DribbbleShot.js b/docs/data/joy/components/card/DribbbleShot.js
index 7bf5c5dfe0a02d..183c013ecb5c2e 100644
--- a/docs/data/joy/components/card/DribbbleShot.js
+++ b/docs/data/joy/components/card/DribbbleShot.js
@@ -105,7 +105,7 @@ export default function DribbbleShot() {
}
sx={{
@@ -119,7 +119,7 @@ export default function DribbbleShot() {
}
sx={{
diff --git a/docs/data/joy/components/card/DribbbleShot.tsx b/docs/data/joy/components/card/DribbbleShot.tsx
index 7bf5c5dfe0a02d..183c013ecb5c2e 100644
--- a/docs/data/joy/components/card/DribbbleShot.tsx
+++ b/docs/data/joy/components/card/DribbbleShot.tsx
@@ -105,7 +105,7 @@ export default function DribbbleShot() {
}
sx={{
@@ -119,7 +119,7 @@ export default function DribbbleShot() {
}
sx={{
diff --git a/docs/data/joy/components/card/FAQCard.js b/docs/data/joy/components/card/FAQCard.js
index e5098b3488e559..6b8273d6db6de6 100644
--- a/docs/data/joy/components/card/FAQCard.js
+++ b/docs/data/joy/components/card/FAQCard.js
@@ -32,7 +32,7 @@ export default function FAQCard() {
px: 'var(--Card-padding)',
}}
>
-
+
89
@@ -47,9 +47,7 @@ export default function FAQCard() {
/>
-
- Need Some Help?
-
+ Need Some Help?
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
tempor.
diff --git a/docs/data/joy/components/card/FAQCard.tsx b/docs/data/joy/components/card/FAQCard.tsx
index e5098b3488e559..6b8273d6db6de6 100644
--- a/docs/data/joy/components/card/FAQCard.tsx
+++ b/docs/data/joy/components/card/FAQCard.tsx
@@ -32,7 +32,7 @@ export default function FAQCard() {
px: 'var(--Card-padding)',
}}
>
-
+
89
@@ -47,9 +47,7 @@ export default function FAQCard() {
/>
-
- Need Some Help?
-
+ Need Some Help?
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
tempor.
diff --git a/docs/data/joy/components/card/GradientCover.js b/docs/data/joy/components/card/GradientCover.js
index 0ac96756482e3d..c053fe11476ebb 100644
--- a/docs/data/joy/components/card/GradientCover.js
+++ b/docs/data/joy/components/card/GradientCover.js
@@ -23,7 +23,7 @@ export default function GradientCover() {
}}
/>
-
+
Yosemite National Park
-
+
Yosemite National Park
-
+
Yosemite Park
-
+
-
+
Yosemite Park
-
+
- Individual License
-
- $58{' '}
-
- /month
+
+
+ Sketch 55+
+
+
+ Figma
+
+
+
+
+ $58{' '}
+
+ /month
+
+
+
+
+ Individual License
+
+ This license allows you to use the Symbol System Design with unlimited
+ amount of personal and commercial projects.
-
-
- This license allows you to use the Symbol System Design with unlimited amount
- of personal and commercial projects.
-
+
Purchase Now
-
- Compatible with Sketch 55+
-
);
}
diff --git a/docs/data/joy/components/card/LicenseCard.tsx b/docs/data/joy/components/card/LicenseCard.tsx
index c59cca8a28ccef..768fc3e65476d1 100644
--- a/docs/data/joy/components/card/LicenseCard.tsx
+++ b/docs/data/joy/components/card/LicenseCard.tsx
@@ -1,8 +1,10 @@
import * as React from 'react';
+import Box from '@mui/joy/Box';
+import Button from '@mui/joy/Button';
import Card from '@mui/joy/Card';
import CardActions from '@mui/joy/CardActions';
+import Chip from '@mui/joy/Chip';
import Typography from '@mui/joy/Typography';
-import Button from '@mui/joy/Button';
export default function LicenseCard() {
return (
@@ -11,30 +13,40 @@ export default function LicenseCard() {
color="primary"
invertedColors
sx={{
- width: 343,
+ boxShadow: 'lg',
+ width: 400,
maxWidth: '100%',
// to make the demo resizeable
overflow: 'auto',
resize: 'horizontal',
}}
>
- Individual License
-
- $58{' '}
-
- /month
+
+
+ Sketch 55+
+
+
+ Figma
+
+
+
+
+ $58{' '}
+
+ /month
+
+
+
+
+ Individual License
+
+ This license allows you to use the Symbol System Design with unlimited
+ amount of personal and commercial projects.
-
-
- This license allows you to use the Symbol System Design with unlimited amount
- of personal and commercial projects.
-
+
Purchase Now
-
- Compatible with Sketch 55+
-
);
}
diff --git a/docs/data/joy/components/card/MediaCover.js b/docs/data/joy/components/card/MediaCover.js
index 32a091ea6e3277..7361d473da19dc 100644
--- a/docs/data/joy/components/card/MediaCover.js
+++ b/docs/data/joy/components/card/MediaCover.js
@@ -22,7 +22,7 @@ export default function MediaCover() {
-
+
Yosemite National Park
-
+
California
@@ -52,14 +52,14 @@ export default function MultipleInteractionCard() {
6.3k views
1 hour ago
diff --git a/docs/data/joy/components/card/MultipleInteractionCard.tsx b/docs/data/joy/components/card/MultipleInteractionCard.tsx
index 9668b2ec40fb06..768d7a305b8706 100644
--- a/docs/data/joy/components/card/MultipleInteractionCard.tsx
+++ b/docs/data/joy/components/card/MultipleInteractionCard.tsx
@@ -39,12 +39,12 @@ export default function MultipleInteractionCard() {
-
+
Yosemite National Park
-
+
California
@@ -52,14 +52,14 @@ export default function MultipleInteractionCard() {
6.3k views
1 hour ago
diff --git a/docs/data/joy/components/card/OverflowCard.js b/docs/data/joy/components/card/OverflowCard.js
index 997160da063a9a..291c33dcedfdf2 100644
--- a/docs/data/joy/components/card/OverflowCard.js
+++ b/docs/data/joy/components/card/OverflowCard.js
@@ -20,21 +20,17 @@ export default function OverflowCard() {
-
- Yosemite National Park
-
-
- California
-
+ Yosemite National Park
+ California
-
+
6.3k views
-
+
1 hour ago
diff --git a/docs/data/joy/components/card/OverflowCard.tsx b/docs/data/joy/components/card/OverflowCard.tsx
index 997160da063a9a..291c33dcedfdf2 100644
--- a/docs/data/joy/components/card/OverflowCard.tsx
+++ b/docs/data/joy/components/card/OverflowCard.tsx
@@ -20,21 +20,17 @@ export default function OverflowCard() {
-
- Yosemite National Park
-
-
- California
-
+ Yosemite National Park
+ California
-
+
6.3k views
-
+
1 hour ago
diff --git a/docs/data/joy/components/card/PricingCards.js b/docs/data/joy/components/card/PricingCards.js
index 60962444cc6dc1..28ac8138f695df 100644
--- a/docs/data/joy/components/card/PricingCards.js
+++ b/docs/data/joy/components/card/PricingCards.js
@@ -26,9 +26,7 @@ export default function PricingCards() {
BASIC
-
- Professional
-
+ Professional
@@ -58,7 +56,7 @@ export default function PricingCards() {
-
+
3.990β¬{' '}
/ month
@@ -83,9 +81,7 @@ export default function PricingCards() {
MOST POPULAR
-
- Unlimited
-
+ Unlimited
-
+
5.990β¬{' '}
/ month
diff --git a/docs/data/joy/components/card/PricingCards.tsx b/docs/data/joy/components/card/PricingCards.tsx
index 60962444cc6dc1..28ac8138f695df 100644
--- a/docs/data/joy/components/card/PricingCards.tsx
+++ b/docs/data/joy/components/card/PricingCards.tsx
@@ -26,9 +26,7 @@ export default function PricingCards() {
BASIC
-
- Professional
-
+ Professional
@@ -58,7 +56,7 @@ export default function PricingCards() {
-
+
3.990β¬{' '}
/ month
@@ -83,9 +81,7 @@ export default function PricingCards() {
MOST POPULAR
-
- Unlimited
-
+ Unlimited
-
+
5.990β¬{' '}
/ month
diff --git a/docs/data/joy/components/card/ProductCard.js b/docs/data/joy/components/card/ProductCard.js
index 22e82ac431309f..44faf4dcc1846e 100644
--- a/docs/data/joy/components/card/ProductCard.js
+++ b/docs/data/joy/components/card/ProductCard.js
@@ -23,10 +23,10 @@ export default function ProductCard() {
- Bluetooth Headset
+ Bluetooth Headset
Lowest price
@@ -47,7 +46,7 @@ export default function ProductCard() {
>
2,900 THB
-
+
(Only 7 left in stock!)
diff --git a/docs/data/joy/components/card/ProductCard.tsx b/docs/data/joy/components/card/ProductCard.tsx
index 22e82ac431309f..44faf4dcc1846e 100644
--- a/docs/data/joy/components/card/ProductCard.tsx
+++ b/docs/data/joy/components/card/ProductCard.tsx
@@ -23,10 +23,10 @@ export default function ProductCard() {
- Bluetooth Headset
+ Bluetooth Headset
Lowest price
@@ -47,7 +46,7 @@ export default function ProductCard() {
>
2,900 THB
-
+
(Only 7 left in stock!)
diff --git a/docs/data/joy/components/card/RowCard.js b/docs/data/joy/components/card/RowCard.js
index adcd7bc45409c4..2c19ee4c1ae8c5 100644
--- a/docs/data/joy/components/card/RowCard.js
+++ b/docs/data/joy/components/card/RowCard.js
@@ -7,11 +7,7 @@ import Typography from '@mui/joy/Typography';
export default function RowCard() {
return (
-
+
Yosemite Park
- California, USA
+ California, USA
+
Yosemite Park
- California, USA
+ California, USA
Alex Morrison
-
+
Senior Journalist
-
+
Articles
34
-
+
Followers
980
-
+
Rating
8.9
diff --git a/docs/data/joy/components/card/UserCard.tsx b/docs/data/joy/components/card/UserCard.tsx
index f15e87554f5c05..27d4bf82ac6686 100644
--- a/docs/data/joy/components/card/UserCard.tsx
+++ b/docs/data/joy/components/card/UserCard.tsx
@@ -74,7 +74,7 @@ export default function UserCard() {
Alex Morrison
-
+
Senior Journalist
-
+
Articles
34
-
+
Followers
980
-
+
Rating
8.9
diff --git a/docs/data/joy/components/card/card.md b/docs/data/joy/components/card/card.md
index d5f58bd12cdfa0..d662e0537217d5 100644
--- a/docs/data/joy/components/card/card.md
+++ b/docs/data/joy/components/card/card.md
@@ -34,6 +34,44 @@ The demo below shows a typical Card that groups together Typography, Aspect Rati
## Customization
+### Variants
+
+The Card component supports Joy UI's four [global variants](/joy-ui/main-features/global-variants/): `plain` (default), `outlined`, `soft`, and `solid`.
+
+{{"demo": "CardVariants.js"}}
+
+:::info
+To learn how to add your own variants, check out [Themed componentsβExtend variants](/joy-ui/customization/themed-components/#extend-variants).
+Note that you lose the global variants when you add custom variants.
+:::
+
+### Sizes
+
+The Card component comes in three sizes: `sm`, `md` (default), and `lg`.
+
+Each size has different padding, gap, and font size values.
+
+{{"demo": "CardSizes.js"}}
+
+:::info
+To learn how to add custom sizes to the component, check out [Themed componentsβExtend sizes](/joy-ui/customization/themed-components/#extend-sizes).
+:::
+
+### Colors
+
+Every palette included in the theme is available via the `color` prop.
+Play around combining different colors with different variants.
+
+{{"demo": "CardColors.js"}}
+
+### Inverted colors
+
+When the Card's variant is `soft` or `solid`, you can use the `invertedColors={true}` prop to invert the colors of the children to have enough contrast.
+
+To learn more about this, check out [Color Inversion](/joy-ui/main-features/color-inversion/) feature.
+
+{{"demo": "CardInvertedColors.js"}}
+
### Expand to fill
```jsx
diff --git a/docs/data/joy/components/checkbox/CheckboxColors.js b/docs/data/joy/components/checkbox/CheckboxColors.js
index 177b0c852c3456..57d7c4a2bce278 100644
--- a/docs/data/joy/components/checkbox/CheckboxColors.js
+++ b/docs/data/joy/components/checkbox/CheckboxColors.js
@@ -8,7 +8,6 @@ export default function CheckboxColors() {
-
diff --git a/docs/data/joy/components/checkbox/CheckboxColors.tsx b/docs/data/joy/components/checkbox/CheckboxColors.tsx
index 177b0c852c3456..57d7c4a2bce278 100644
--- a/docs/data/joy/components/checkbox/CheckboxColors.tsx
+++ b/docs/data/joy/components/checkbox/CheckboxColors.tsx
@@ -8,7 +8,6 @@ export default function CheckboxColors() {
-
diff --git a/docs/data/joy/components/checkbox/CheckboxColors.tsx.preview b/docs/data/joy/components/checkbox/CheckboxColors.tsx.preview
index cddc06bd540d56..38b62d6bfc0717 100644
--- a/docs/data/joy/components/checkbox/CheckboxColors.tsx.preview
+++ b/docs/data/joy/components/checkbox/CheckboxColors.tsx.preview
@@ -1,6 +1,5 @@
-
\ No newline at end of file
diff --git a/docs/data/joy/components/checkbox/ExampleButtonCheckbox.js b/docs/data/joy/components/checkbox/ExampleButtonCheckbox.js
index 27c8be8747a045..cf991e1d29c76e 100644
--- a/docs/data/joy/components/checkbox/ExampleButtonCheckbox.js
+++ b/docs/data/joy/components/checkbox/ExampleButtonCheckbox.js
@@ -16,7 +16,6 @@ export default function ExampleButtonCheckbox() {
role="group"
orientation="horizontal"
sx={{
- bgcolor: 'background.body',
flexGrow: 0,
'--List-gap': '8px',
'--List-padding': '8px',
diff --git a/docs/data/joy/components/checkbox/ExampleButtonCheckbox.tsx b/docs/data/joy/components/checkbox/ExampleButtonCheckbox.tsx
index 19d2cec78b9d2a..cb311fbd8bb6c2 100644
--- a/docs/data/joy/components/checkbox/ExampleButtonCheckbox.tsx
+++ b/docs/data/joy/components/checkbox/ExampleButtonCheckbox.tsx
@@ -16,7 +16,6 @@ export default function ExampleButtonCheckbox() {
role="group"
orientation="horizontal"
sx={{
- bgcolor: 'background.body',
flexGrow: 0,
'--List-gap': '8px',
'--List-padding': '8px',
diff --git a/docs/data/joy/components/checkbox/ExampleChoiceChipCheckbox.js b/docs/data/joy/components/checkbox/ExampleChoiceChipCheckbox.js
index ac16d2a88cad31..ceca95867e6a56 100644
--- a/docs/data/joy/components/checkbox/ExampleChoiceChipCheckbox.js
+++ b/docs/data/joy/components/checkbox/ExampleChoiceChipCheckbox.js
@@ -10,11 +10,8 @@ import Done from '@mui/icons-material/Done';
export default function ExampleChoiceChipCheckbox() {
const [value, setValue] = React.useState([]);
return (
-
-
+
+
Choose amenities
diff --git a/docs/data/joy/components/checkbox/ExampleChoiceChipCheckbox.tsx b/docs/data/joy/components/checkbox/ExampleChoiceChipCheckbox.tsx
index ae9a52c12170d9..ac5d99ceabef6a 100644
--- a/docs/data/joy/components/checkbox/ExampleChoiceChipCheckbox.tsx
+++ b/docs/data/joy/components/checkbox/ExampleChoiceChipCheckbox.tsx
@@ -10,11 +10,8 @@ import Done from '@mui/icons-material/Done';
export default function ExampleChoiceChipCheckbox() {
const [value, setValue] = React.useState([]);
return (
-
-
+
+
Choose amenities
diff --git a/docs/data/joy/components/checkbox/ExampleFilterMemberCheckbox.js b/docs/data/joy/components/checkbox/ExampleFilterMemberCheckbox.js
index 01114edfde01cd..7a5fff26076820 100644
--- a/docs/data/joy/components/checkbox/ExampleFilterMemberCheckbox.js
+++ b/docs/data/joy/components/checkbox/ExampleFilterMemberCheckbox.js
@@ -19,7 +19,6 @@ export default function ExampleFilterMemberCheckbox() {
variant="outlined"
sx={{
p: 2,
- bgcolor: 'background.body',
borderRadius: 'sm',
width: 360,
maxWidth: '100%',
@@ -29,7 +28,7 @@ export default function ExampleFilterMemberCheckbox() {
id="member"
sx={{
textTransform: 'uppercase',
- fontSize: 'xs2',
+ fontSize: 'xs',
letterSpacing: 'lg',
fontWeight: 'lg',
color: 'text.secondary',
diff --git a/docs/data/joy/components/checkbox/ExampleFilterMemberCheckbox.tsx b/docs/data/joy/components/checkbox/ExampleFilterMemberCheckbox.tsx
index e9de59515da594..7e3ef186e25e4d 100644
--- a/docs/data/joy/components/checkbox/ExampleFilterMemberCheckbox.tsx
+++ b/docs/data/joy/components/checkbox/ExampleFilterMemberCheckbox.tsx
@@ -20,7 +20,7 @@ export default function ExampleFilterMemberCheckbox() {
variant="outlined"
sx={{
p: 2,
- bgcolor: 'background.body',
+
borderRadius: 'sm',
width: 360,
maxWidth: '100%',
@@ -30,7 +30,7 @@ export default function ExampleFilterMemberCheckbox() {
id="member"
sx={{
textTransform: 'uppercase',
- fontSize: 'xs2',
+ fontSize: 'xs',
letterSpacing: 'lg',
fontWeight: 'lg',
color: 'text.secondary',
diff --git a/docs/data/joy/components/checkbox/ExampleFilterStatusCheckbox.js b/docs/data/joy/components/checkbox/ExampleFilterStatusCheckbox.js
index f80008ec27bc72..47c5036fdc1157 100644
--- a/docs/data/joy/components/checkbox/ExampleFilterStatusCheckbox.js
+++ b/docs/data/joy/components/checkbox/ExampleFilterStatusCheckbox.js
@@ -14,15 +14,12 @@ export default function ExampleFilterStatusCheckbox() {
wrongAddress: false,
});
return (
-
+
+
-
+
Read our terms and conditions.
diff --git a/docs/data/joy/components/checkbox/ExampleSignUpCheckbox.tsx b/docs/data/joy/components/checkbox/ExampleSignUpCheckbox.tsx
index 2402ddcc8909f1..9e4acc3fd4dcd8 100644
--- a/docs/data/joy/components/checkbox/ExampleSignUpCheckbox.tsx
+++ b/docs/data/joy/components/checkbox/ExampleSignUpCheckbox.tsx
@@ -17,7 +17,7 @@ export default function ExampleSignUpCheckbox() {
}
/>
-
+
Read our terms and conditions.
diff --git a/docs/data/joy/components/checkbox/ExampleSignUpCheckbox.tsx.preview b/docs/data/joy/components/checkbox/ExampleSignUpCheckbox.tsx.preview
index b9652048ff5e8e..bee71afb851987 100644
--- a/docs/data/joy/components/checkbox/ExampleSignUpCheckbox.tsx.preview
+++ b/docs/data/joy/components/checkbox/ExampleSignUpCheckbox.tsx.preview
@@ -8,7 +8,7 @@
}
/>
-
+
Read our terms and conditions.
diff --git a/docs/data/joy/components/checkbox/GroupCheckboxes.js b/docs/data/joy/components/checkbox/GroupCheckboxes.js
index 78f6825dcccee8..11db485221a8a5 100644
--- a/docs/data/joy/components/checkbox/GroupCheckboxes.js
+++ b/docs/data/joy/components/checkbox/GroupCheckboxes.js
@@ -8,7 +8,7 @@ import Typography from '@mui/joy/Typography';
export default function GroupCheckboxes() {
return (
-
+
Sandwich Dressings
diff --git a/docs/data/joy/components/checkbox/GroupCheckboxes.tsx b/docs/data/joy/components/checkbox/GroupCheckboxes.tsx
index 78f6825dcccee8..11db485221a8a5 100644
--- a/docs/data/joy/components/checkbox/GroupCheckboxes.tsx
+++ b/docs/data/joy/components/checkbox/GroupCheckboxes.tsx
@@ -8,7 +8,7 @@ import Typography from '@mui/joy/Typography';
export default function GroupCheckboxes() {
return (
-
+
Sandwich Dressings
diff --git a/docs/data/joy/components/checkbox/GroupCheckboxes.tsx.preview b/docs/data/joy/components/checkbox/GroupCheckboxes.tsx.preview
index 19297a721c90c5..db702453689f61 100644
--- a/docs/data/joy/components/checkbox/GroupCheckboxes.tsx.preview
+++ b/docs/data/joy/components/checkbox/GroupCheckboxes.tsx.preview
@@ -1,4 +1,4 @@
-
+
Sandwich Dressings
diff --git a/docs/data/joy/components/checkbox/HoverCheckbox.js b/docs/data/joy/components/checkbox/HoverCheckbox.js
index 9c24175b214868..75665f39cc8354 100644
--- a/docs/data/joy/components/checkbox/HoverCheckbox.js
+++ b/docs/data/joy/components/checkbox/HoverCheckbox.js
@@ -11,9 +11,9 @@ export default function HoverCheckbox() {
root: ({ checked, focusVisible }) => ({
sx: !checked
? {
- '& svg': { opacity: focusVisible ? 0.32 : 0 },
+ '& svg': { opacity: focusVisible ? 1 : 0 },
'&:hover svg': {
- opacity: 0.32,
+ opacity: 1,
},
}
: undefined,
diff --git a/docs/data/joy/components/checkbox/HoverCheckbox.tsx b/docs/data/joy/components/checkbox/HoverCheckbox.tsx
index 9c24175b214868..75665f39cc8354 100644
--- a/docs/data/joy/components/checkbox/HoverCheckbox.tsx
+++ b/docs/data/joy/components/checkbox/HoverCheckbox.tsx
@@ -11,9 +11,9 @@ export default function HoverCheckbox() {
root: ({ checked, focusVisible }) => ({
sx: !checked
? {
- '& svg': { opacity: focusVisible ? 0.32 : 0 },
+ '& svg': { opacity: focusVisible ? 1 : 0 },
'&:hover svg': {
- opacity: 0.32,
+ opacity: 1,
},
}
: undefined,
diff --git a/docs/data/joy/components/checkbox/HoverCheckbox.tsx.preview b/docs/data/joy/components/checkbox/HoverCheckbox.tsx.preview
index 9370853c2f328b..bb8b9476b6c843 100644
--- a/docs/data/joy/components/checkbox/HoverCheckbox.tsx.preview
+++ b/docs/data/joy/components/checkbox/HoverCheckbox.tsx.preview
@@ -5,9 +5,9 @@
root: ({ checked, focusVisible }) => ({
sx: !checked
? {
- '& svg': { opacity: focusVisible ? 0.32 : 0 },
+ '& svg': { opacity: focusVisible ? 1 : 0 },
'&:hover svg': {
- opacity: 0.32,
+ opacity: 1,
},
}
: undefined,
diff --git a/docs/data/joy/components/checkbox/IconlessCheckbox.js b/docs/data/joy/components/checkbox/IconlessCheckbox.js
index 8c1a9b11d4c792..4587e4fa3a50eb 100644
--- a/docs/data/joy/components/checkbox/IconlessCheckbox.js
+++ b/docs/data/joy/components/checkbox/IconlessCheckbox.js
@@ -8,7 +8,7 @@ import Typography from '@mui/joy/Typography';
export default function IconlessCheckbox() {
return (
-
+
Pizza toppings
diff --git a/docs/data/joy/components/checkbox/IconlessCheckbox.tsx b/docs/data/joy/components/checkbox/IconlessCheckbox.tsx
index 8c1a9b11d4c792..4587e4fa3a50eb 100644
--- a/docs/data/joy/components/checkbox/IconlessCheckbox.tsx
+++ b/docs/data/joy/components/checkbox/IconlessCheckbox.tsx
@@ -8,7 +8,7 @@ import Typography from '@mui/joy/Typography';
export default function IconlessCheckbox() {
return (
-
+
Pizza toppings
diff --git a/docs/data/joy/components/checkbox/OverlayCheckbox.js b/docs/data/joy/components/checkbox/OverlayCheckbox.js
index f4d0413f57f485..f7b8c5209d2f1a 100644
--- a/docs/data/joy/components/checkbox/OverlayCheckbox.js
+++ b/docs/data/joy/components/checkbox/OverlayCheckbox.js
@@ -11,13 +11,13 @@ export default function OverlayCheckbox() {
flexDirection: 'column',
gap: 2,
width: 300,
- '& > div': { p: 2, boxShadow: 'sm', borderRadius: 'xs', display: 'flex' },
+ '& > div': { p: 2, borderRadius: 'md', display: 'flex' },
}}
>
-
+
-
+
div': { p: 2, boxShadow: 'sm', borderRadius: 'xs', display: 'flex' },
+ '& > div': { p: 2, borderRadius: 'md', display: 'flex' },
}}
>
-
+
-
+
+
-
+
-
+
Favorite Movies
diff --git a/docs/data/joy/components/chip/CheckboxChip.tsx b/docs/data/joy/components/chip/CheckboxChip.tsx
index 65b2cea4824582..2aeb6ec19f18a8 100644
--- a/docs/data/joy/components/chip/CheckboxChip.tsx
+++ b/docs/data/joy/components/chip/CheckboxChip.tsx
@@ -11,7 +11,7 @@ export default function CheckboxChip() {
return (
-
+
Favorite Movies
diff --git a/docs/data/joy/components/chip/ChipUsage.js b/docs/data/joy/components/chip/ChipUsage.js
index ee5396e9589a3e..96e52e75bb0455 100644
--- a/docs/data/joy/components/chip/ChipUsage.js
+++ b/docs/data/joy/components/chip/ChipUsage.js
@@ -10,13 +10,13 @@ export default function ChipUsages() {
{
propName: 'variant',
knob: 'radio',
- defaultValue: 'solid',
+ defaultValue: 'soft',
options: ['plain', 'outlined', 'soft', 'solid'],
},
{
propName: 'color',
knob: 'color',
- defaultValue: 'primary',
+ defaultValue: 'neutral',
},
{
propName: 'size',
diff --git a/docs/data/joy/components/chip/RadioChip.js b/docs/data/joy/components/chip/RadioChip.js
index 76fa5acbe0abc7..e2d620cc9301a7 100644
--- a/docs/data/joy/components/chip/RadioChip.js
+++ b/docs/data/joy/components/chip/RadioChip.js
@@ -12,7 +12,7 @@ export default function RadioChip() {
return (
-
+
Best Movie
diff --git a/docs/data/joy/components/chip/RadioChip.tsx b/docs/data/joy/components/chip/RadioChip.tsx
index 76fa5acbe0abc7..e2d620cc9301a7 100644
--- a/docs/data/joy/components/chip/RadioChip.tsx
+++ b/docs/data/joy/components/chip/RadioChip.tsx
@@ -12,7 +12,7 @@ export default function RadioChip() {
return (
-
+
Best Movie
diff --git a/docs/data/joy/components/circular-progress/CircularProgressButton.js b/docs/data/joy/components/circular-progress/CircularProgressButton.js
index c14ec84d10a5de..f3be882119e0c0 100644
--- a/docs/data/joy/components/circular-progress/CircularProgressButton.js
+++ b/docs/data/joy/components/circular-progress/CircularProgressButton.js
@@ -8,23 +8,15 @@ import CircularProgress from '@mui/joy/CircularProgress';
export default function CircularProgressButton() {
return (
- }>
- Loadingβ¦
-
+ }>Loadingβ¦
-
+
{/* eslint-disable-next-line jsx-a11y/anchor-is-valid */}
- }
+ variant="plain"
+ startDecorator={ }
sx={{ p: 1 }}
>
Submitting...
diff --git a/docs/data/joy/components/circular-progress/CircularProgressButton.tsx b/docs/data/joy/components/circular-progress/CircularProgressButton.tsx
index c14ec84d10a5de..f3be882119e0c0 100644
--- a/docs/data/joy/components/circular-progress/CircularProgressButton.tsx
+++ b/docs/data/joy/components/circular-progress/CircularProgressButton.tsx
@@ -8,23 +8,15 @@ import CircularProgress from '@mui/joy/CircularProgress';
export default function CircularProgressButton() {
return (
- }>
- Loadingβ¦
-
+ }>Loadingβ¦
-
+
{/* eslint-disable-next-line jsx-a11y/anchor-is-valid */}
- }
+ variant="plain"
+ startDecorator={ }
sx={{ p: 1 }}
>
Submitting...
diff --git a/docs/data/joy/components/circular-progress/CircularProgressButton.tsx.preview b/docs/data/joy/components/circular-progress/CircularProgressButton.tsx.preview
new file mode 100644
index 00000000000000..e4c6378f929eaa
--- /dev/null
+++ b/docs/data/joy/components/circular-progress/CircularProgressButton.tsx.preview
@@ -0,0 +1,13 @@
+ }>Loadingβ¦
+
+
+
+{/* eslint-disable-next-line jsx-a11y/anchor-is-valid */}
+}
+ sx={{ p: 1 }}
+>
+ Submitting...
+
\ No newline at end of file
diff --git a/docs/data/joy/components/circular-progress/CircularProgressColors.js b/docs/data/joy/components/circular-progress/CircularProgressColors.js
index 8754f8dd5c6f0f..7616784f33d59a 100644
--- a/docs/data/joy/components/circular-progress/CircularProgressColors.js
+++ b/docs/data/joy/components/circular-progress/CircularProgressColors.js
@@ -27,7 +27,6 @@ export default function CircularProgressColors() {
-
@@ -40,7 +39,7 @@ export default function CircularProgressColors() {
}}
>
-
@@ -40,7 +39,7 @@ export default function CircularProgressColors() {
}}
>
-
+
Lorem Ipsum is simply dummy text of the printing and typesetting
industry. Lorem Ipsum has been the industry standard dummy text ever
since the 1500s
diff --git a/docs/data/joy/components/divider/DividerInCard.tsx b/docs/data/joy/components/divider/DividerInCard.tsx
index d0b5f14cda8bc6..05f7558a1e4059 100644
--- a/docs/data/joy/components/divider/DividerInCard.tsx
+++ b/docs/data/joy/components/divider/DividerInCard.tsx
@@ -30,7 +30,7 @@ export default function DividerInCard() {
-
+
Lorem Ipsum is simply dummy text of the printing and typesetting
industry. Lorem Ipsum has been the industry standard dummy text ever
since the 1500s
diff --git a/docs/data/joy/components/divider/DividerInModalDialog.js b/docs/data/joy/components/divider/DividerInModalDialog.js
index 5a94fbeee4c79f..faa015d6f27260 100644
--- a/docs/data/joy/components/divider/DividerInModalDialog.js
+++ b/docs/data/joy/components/divider/DividerInModalDialog.js
@@ -21,7 +21,7 @@ export default function DividerInModalDialog() {
Modal Title
-
+
Lorem Ipsum is simply dummy text of the printing and typesetting industry.
Lorem Ipsum has been the industry standard dummy text ever since the 1500s
diff --git a/docs/data/joy/components/divider/DividerInModalDialog.tsx b/docs/data/joy/components/divider/DividerInModalDialog.tsx
index 5a94fbeee4c79f..faa015d6f27260 100644
--- a/docs/data/joy/components/divider/DividerInModalDialog.tsx
+++ b/docs/data/joy/components/divider/DividerInModalDialog.tsx
@@ -21,7 +21,7 @@ export default function DividerInModalDialog() {
Modal Title
-
+
Lorem Ipsum is simply dummy text of the printing and typesetting industry.
Lorem Ipsum has been the industry standard dummy text ever since the 1500s
diff --git a/docs/data/joy/components/grid/AutoGrid.js b/docs/data/joy/components/grid/AutoGrid.js
index 41161bb6b237c7..987cf360c6e5c1 100644
--- a/docs/data/joy/components/grid/AutoGrid.js
+++ b/docs/data/joy/components/grid/AutoGrid.js
@@ -6,7 +6,7 @@ import Grid from '@mui/joy/Grid';
const Item = styled(Sheet)(({ theme }) => ({
backgroundColor:
theme.palette.mode === 'dark' ? theme.palette.background.level1 : '#fff',
- ...theme.typography.body2,
+ ...theme.typography['body-sm'],
padding: theme.spacing(1),
textAlign: 'center',
borderRadius: 4,
diff --git a/docs/data/joy/components/grid/AutoGrid.tsx b/docs/data/joy/components/grid/AutoGrid.tsx
index 41161bb6b237c7..987cf360c6e5c1 100644
--- a/docs/data/joy/components/grid/AutoGrid.tsx
+++ b/docs/data/joy/components/grid/AutoGrid.tsx
@@ -6,7 +6,7 @@ import Grid from '@mui/joy/Grid';
const Item = styled(Sheet)(({ theme }) => ({
backgroundColor:
theme.palette.mode === 'dark' ? theme.palette.background.level1 : '#fff',
- ...theme.typography.body2,
+ ...theme.typography['body-sm'],
padding: theme.spacing(1),
textAlign: 'center',
borderRadius: 4,
diff --git a/docs/data/joy/components/grid/BasicGrid.js b/docs/data/joy/components/grid/BasicGrid.js
index 489cf5a79bc8e3..4caf40a32a593b 100644
--- a/docs/data/joy/components/grid/BasicGrid.js
+++ b/docs/data/joy/components/grid/BasicGrid.js
@@ -6,7 +6,7 @@ import Grid from '@mui/joy/Grid';
const Item = styled(Sheet)(({ theme }) => ({
backgroundColor:
theme.palette.mode === 'dark' ? theme.palette.background.level1 : '#fff',
- ...theme.typography.body2,
+ ...theme.typography['body-sm'],
padding: theme.spacing(1),
textAlign: 'center',
borderRadius: 4,
diff --git a/docs/data/joy/components/grid/BasicGrid.tsx b/docs/data/joy/components/grid/BasicGrid.tsx
index 489cf5a79bc8e3..4caf40a32a593b 100644
--- a/docs/data/joy/components/grid/BasicGrid.tsx
+++ b/docs/data/joy/components/grid/BasicGrid.tsx
@@ -6,7 +6,7 @@ import Grid from '@mui/joy/Grid';
const Item = styled(Sheet)(({ theme }) => ({
backgroundColor:
theme.palette.mode === 'dark' ? theme.palette.background.level1 : '#fff',
- ...theme.typography.body2,
+ ...theme.typography['body-sm'],
padding: theme.spacing(1),
textAlign: 'center',
borderRadius: 4,
diff --git a/docs/data/joy/components/grid/CSSGrid.js b/docs/data/joy/components/grid/CSSGrid.js
index 0e8313116230db..647020a7cc927a 100644
--- a/docs/data/joy/components/grid/CSSGrid.js
+++ b/docs/data/joy/components/grid/CSSGrid.js
@@ -6,7 +6,7 @@ import Sheet from '@mui/joy/Sheet';
const Item = styled(Sheet)(({ theme }) => ({
backgroundColor:
theme.palette.mode === 'dark' ? theme.palette.background.level1 : '#fff',
- ...theme.typography.body2,
+ ...theme.typography['body-sm'],
padding: theme.spacing(1),
textAlign: 'center',
borderRadius: 4,
diff --git a/docs/data/joy/components/grid/CSSGrid.tsx b/docs/data/joy/components/grid/CSSGrid.tsx
index 0e8313116230db..647020a7cc927a 100644
--- a/docs/data/joy/components/grid/CSSGrid.tsx
+++ b/docs/data/joy/components/grid/CSSGrid.tsx
@@ -6,7 +6,7 @@ import Sheet from '@mui/joy/Sheet';
const Item = styled(Sheet)(({ theme }) => ({
backgroundColor:
theme.palette.mode === 'dark' ? theme.palette.background.level1 : '#fff',
- ...theme.typography.body2,
+ ...theme.typography['body-sm'],
padding: theme.spacing(1),
textAlign: 'center',
borderRadius: 4,
diff --git a/docs/data/joy/components/grid/ColumnsGrid.js b/docs/data/joy/components/grid/ColumnsGrid.js
index 830f252b7bdbd3..dc6a77772f90df 100644
--- a/docs/data/joy/components/grid/ColumnsGrid.js
+++ b/docs/data/joy/components/grid/ColumnsGrid.js
@@ -6,7 +6,7 @@ import Grid from '@mui/joy/Grid';
const Item = styled(Sheet)(({ theme }) => ({
backgroundColor:
theme.palette.mode === 'dark' ? theme.palette.background.level1 : '#fff',
- ...theme.typography.body2,
+ ...theme.typography['body-sm'],
padding: theme.spacing(1),
textAlign: 'center',
borderRadius: 4,
diff --git a/docs/data/joy/components/grid/ColumnsGrid.tsx b/docs/data/joy/components/grid/ColumnsGrid.tsx
index 830f252b7bdbd3..dc6a77772f90df 100644
--- a/docs/data/joy/components/grid/ColumnsGrid.tsx
+++ b/docs/data/joy/components/grid/ColumnsGrid.tsx
@@ -6,7 +6,7 @@ import Grid from '@mui/joy/Grid';
const Item = styled(Sheet)(({ theme }) => ({
backgroundColor:
theme.palette.mode === 'dark' ? theme.palette.background.level1 : '#fff',
- ...theme.typography.body2,
+ ...theme.typography['body-sm'],
padding: theme.spacing(1),
textAlign: 'center',
borderRadius: 4,
diff --git a/docs/data/joy/components/grid/FullWidthGrid.js b/docs/data/joy/components/grid/FullWidthGrid.js
index fce8825211aac3..5a0e3f8e5defec 100644
--- a/docs/data/joy/components/grid/FullWidthGrid.js
+++ b/docs/data/joy/components/grid/FullWidthGrid.js
@@ -6,7 +6,7 @@ import Grid from '@mui/joy/Grid';
const Item = styled(Sheet)(({ theme }) => ({
backgroundColor:
theme.palette.mode === 'dark' ? theme.palette.background.level1 : '#fff',
- ...theme.typography.body2,
+ ...theme.typography['body-sm'],
padding: theme.spacing(1),
textAlign: 'center',
borderRadius: 4,
diff --git a/docs/data/joy/components/grid/FullWidthGrid.tsx b/docs/data/joy/components/grid/FullWidthGrid.tsx
index fce8825211aac3..5a0e3f8e5defec 100644
--- a/docs/data/joy/components/grid/FullWidthGrid.tsx
+++ b/docs/data/joy/components/grid/FullWidthGrid.tsx
@@ -6,7 +6,7 @@ import Grid from '@mui/joy/Grid';
const Item = styled(Sheet)(({ theme }) => ({
backgroundColor:
theme.palette.mode === 'dark' ? theme.palette.background.level1 : '#fff',
- ...theme.typography.body2,
+ ...theme.typography['body-sm'],
padding: theme.spacing(1),
textAlign: 'center',
borderRadius: 4,
diff --git a/docs/data/joy/components/grid/ResponsiveGrid.js b/docs/data/joy/components/grid/ResponsiveGrid.js
index 8fbcaffa566148..9e5a32c500aa8e 100644
--- a/docs/data/joy/components/grid/ResponsiveGrid.js
+++ b/docs/data/joy/components/grid/ResponsiveGrid.js
@@ -6,7 +6,7 @@ import Grid from '@mui/joy/Grid';
const Item = styled(Sheet)(({ theme }) => ({
backgroundColor:
theme.palette.mode === 'dark' ? theme.palette.background.level1 : '#fff',
- ...theme.typography.body2,
+ ...theme.typography['body-sm'],
padding: theme.spacing(1),
textAlign: 'center',
borderRadius: 4,
diff --git a/docs/data/joy/components/grid/ResponsiveGrid.tsx b/docs/data/joy/components/grid/ResponsiveGrid.tsx
index 8fbcaffa566148..9e5a32c500aa8e 100644
--- a/docs/data/joy/components/grid/ResponsiveGrid.tsx
+++ b/docs/data/joy/components/grid/ResponsiveGrid.tsx
@@ -6,7 +6,7 @@ import Grid from '@mui/joy/Grid';
const Item = styled(Sheet)(({ theme }) => ({
backgroundColor:
theme.palette.mode === 'dark' ? theme.palette.background.level1 : '#fff',
- ...theme.typography.body2,
+ ...theme.typography['body-sm'],
padding: theme.spacing(1),
textAlign: 'center',
borderRadius: 4,
diff --git a/docs/data/joy/components/grid/RowAndColumnSpacing.js b/docs/data/joy/components/grid/RowAndColumnSpacing.js
index 70452270927784..042d6d12e6b7fd 100644
--- a/docs/data/joy/components/grid/RowAndColumnSpacing.js
+++ b/docs/data/joy/components/grid/RowAndColumnSpacing.js
@@ -6,7 +6,7 @@ import Sheet from '@mui/joy/Sheet';
const Item = styled(Sheet)(({ theme }) => ({
backgroundColor:
theme.palette.mode === 'dark' ? theme.palette.background.level1 : '#fff',
- ...theme.typography.body2,
+ ...theme.typography['body-sm'],
padding: theme.spacing(1),
textAlign: 'center',
borderRadius: 4,
diff --git a/docs/data/joy/components/grid/RowAndColumnSpacing.tsx b/docs/data/joy/components/grid/RowAndColumnSpacing.tsx
index 70452270927784..042d6d12e6b7fd 100644
--- a/docs/data/joy/components/grid/RowAndColumnSpacing.tsx
+++ b/docs/data/joy/components/grid/RowAndColumnSpacing.tsx
@@ -6,7 +6,7 @@ import Sheet from '@mui/joy/Sheet';
const Item = styled(Sheet)(({ theme }) => ({
backgroundColor:
theme.palette.mode === 'dark' ? theme.palette.background.level1 : '#fff',
- ...theme.typography.body2,
+ ...theme.typography['body-sm'],
padding: theme.spacing(1),
textAlign: 'center',
borderRadius: 4,
diff --git a/docs/data/joy/components/grid/VariableWidthGrid.js b/docs/data/joy/components/grid/VariableWidthGrid.js
index 8602bdc1f3e172..b04c4bc357a9cd 100644
--- a/docs/data/joy/components/grid/VariableWidthGrid.js
+++ b/docs/data/joy/components/grid/VariableWidthGrid.js
@@ -6,7 +6,7 @@ import Grid from '@mui/joy/Grid';
const Item = styled(Sheet)(({ theme }) => ({
backgroundColor:
theme.palette.mode === 'dark' ? theme.palette.background.level1 : '#fff',
- ...theme.typography.body2,
+ ...theme.typography['body-sm'],
padding: theme.spacing(1),
textAlign: 'center',
borderRadius: 4,
diff --git a/docs/data/joy/components/grid/VariableWidthGrid.tsx b/docs/data/joy/components/grid/VariableWidthGrid.tsx
index 8602bdc1f3e172..b04c4bc357a9cd 100644
--- a/docs/data/joy/components/grid/VariableWidthGrid.tsx
+++ b/docs/data/joy/components/grid/VariableWidthGrid.tsx
@@ -6,7 +6,7 @@ import Grid from '@mui/joy/Grid';
const Item = styled(Sheet)(({ theme }) => ({
backgroundColor:
theme.palette.mode === 'dark' ? theme.palette.background.level1 : '#fff',
- ...theme.typography.body2,
+ ...theme.typography['body-sm'],
padding: theme.spacing(1),
textAlign: 'center',
borderRadius: 4,
diff --git a/docs/data/joy/components/input/FloatingLabelInput.js b/docs/data/joy/components/input/FloatingLabelInput.js
index 576720cb52d9c5..4b6f17dcf5f466 100644
--- a/docs/data/joy/components/input/FloatingLabelInput.js
+++ b/docs/data/joy/components/input/FloatingLabelInput.js
@@ -67,7 +67,7 @@ const InnerInput = React.forwardRef(function InnerInput(props, ref) {
export default function FloatingLabelInput() {
return (
}
+ endDecorator={ }
slots={{ input: InnerInput }}
slotProps={{ input: { placeholder: 'A placeholder', type: 'password' } }}
sx={{
diff --git a/docs/data/joy/components/input/FloatingLabelInput.tsx b/docs/data/joy/components/input/FloatingLabelInput.tsx
index b342b818b9bbfa..521eb66351af7c 100644
--- a/docs/data/joy/components/input/FloatingLabelInput.tsx
+++ b/docs/data/joy/components/input/FloatingLabelInput.tsx
@@ -70,7 +70,7 @@ const InnerInput = React.forwardRef<
export default function FloatingLabelInput() {
return (
}
+ endDecorator={ }
slots={{ input: InnerInput }}
slotProps={{ input: { placeholder: 'A placeholder', type: 'password' } }}
sx={{
diff --git a/docs/data/joy/components/input/FloatingLabelInput.tsx.preview b/docs/data/joy/components/input/FloatingLabelInput.tsx.preview
index ca4b7ae60349d7..65cdc1846a0b39 100644
--- a/docs/data/joy/components/input/FloatingLabelInput.tsx.preview
+++ b/docs/data/joy/components/input/FloatingLabelInput.tsx.preview
@@ -1,5 +1,5 @@
}
+ endDecorator={ }
slots={{ input: InnerInput }}
slotProps={{ input: { placeholder: 'A placeholder', type: 'password' } }}
sx={{
diff --git a/docs/data/joy/components/input/InputColors.js b/docs/data/joy/components/input/InputColors.js
index c36d484d77fcb8..d98b50891bffd4 100644
--- a/docs/data/joy/components/input/InputColors.js
+++ b/docs/data/joy/components/input/InputColors.js
@@ -16,7 +16,6 @@ export default function InputColors() {
-
diff --git a/docs/data/joy/components/input/InputColors.tsx b/docs/data/joy/components/input/InputColors.tsx
index c36d484d77fcb8..d98b50891bffd4 100644
--- a/docs/data/joy/components/input/InputColors.tsx
+++ b/docs/data/joy/components/input/InputColors.tsx
@@ -16,7 +16,6 @@ export default function InputColors() {
-
diff --git a/docs/data/joy/components/input/InputColors.tsx.preview b/docs/data/joy/components/input/InputColors.tsx.preview
index 2f96befb8909cf..469c897f26eb68 100644
--- a/docs/data/joy/components/input/InputColors.tsx.preview
+++ b/docs/data/joy/components/input/InputColors.tsx.preview
@@ -1,6 +1,5 @@
-
\ No newline at end of file
diff --git a/docs/data/joy/components/input/InputDecorators.js b/docs/data/joy/components/input/InputDecorators.js
index 48c7eb82123de3..e779b87160d580 100644
--- a/docs/data/joy/components/input/InputDecorators.js
+++ b/docs/data/joy/components/input/InputDecorators.js
@@ -17,6 +17,11 @@ export default function InputDecorators() {
variant="plain"
value={currency}
onChange={(_, value) => setCurrency(value)}
+ slotProps={{
+ listbox: {
+ variant: 'outlined',
+ },
+ }}
sx={{ mr: -1.5, '&:hover': { bgcolor: 'transparent' } }}
>
diff --git a/docs/data/joy/components/input/InputDecorators.tsx b/docs/data/joy/components/input/InputDecorators.tsx
index 64f1337e341098..dbcbb77fccbe74 100644
--- a/docs/data/joy/components/input/InputDecorators.tsx
+++ b/docs/data/joy/components/input/InputDecorators.tsx
@@ -17,6 +17,11 @@ export default function InputDecorators() {
variant="plain"
value={currency}
onChange={(_, value) => setCurrency(value!)}
+ slotProps={{
+ listbox: {
+ variant: 'outlined',
+ },
+ }}
sx={{ mr: -1.5, '&:hover': { bgcolor: 'transparent' } }}
>
diff --git a/docs/data/joy/components/input/PasswordMeterInput.js b/docs/data/joy/components/input/PasswordMeterInput.js
index 334ea7c54ac836..f976edde58b73c 100644
--- a/docs/data/joy/components/input/PasswordMeterInput.js
+++ b/docs/data/joy/components/input/PasswordMeterInput.js
@@ -32,7 +32,7 @@ export default function PasswordMeterInput() {
}}
/>
{value.length < 3 && 'Very weak'}
diff --git a/docs/data/joy/components/input/PasswordMeterInput.tsx b/docs/data/joy/components/input/PasswordMeterInput.tsx
index 334ea7c54ac836..f976edde58b73c 100644
--- a/docs/data/joy/components/input/PasswordMeterInput.tsx
+++ b/docs/data/joy/components/input/PasswordMeterInput.tsx
@@ -32,7 +32,7 @@ export default function PasswordMeterInput() {
}}
/>
{value.length < 3 && 'Very weak'}
diff --git a/docs/data/joy/components/linear-progress/LinearProgressColors.js b/docs/data/joy/components/linear-progress/LinearProgressColors.js
index 51ca565134bbdd..8ce599998e8c6d 100644
--- a/docs/data/joy/components/linear-progress/LinearProgressColors.js
+++ b/docs/data/joy/components/linear-progress/LinearProgressColors.js
@@ -23,7 +23,6 @@ export default function LinearProgressColors() {
-
@@ -36,7 +35,7 @@ export default function LinearProgressColors() {
}}
>
-
@@ -37,7 +36,7 @@ export default function LinearProgressColors() {
}}
>
-
-
- `${theme.vars.palette.primary.softColor} transparent transparent`,
- animation: `${circulate} 1s ease infinite`,
- }}
- />
-
- }
- >
+ }>
Processing...
- HIRING!
+
+ hiring
}
- sx={{ '--Link-gap': '0.5rem', pr: 0, pl: 1 }}
+ sx={{ '--Link-gap': '0.5rem', pl: 1, py: 0.5, borderRadius: 'md' }}
>
Careers
diff --git a/docs/data/joy/components/link/DecoratorExamples.tsx b/docs/data/joy/components/link/DecoratorExamples.tsx
index 2b2a6842f12aab..11df5f86dcae6c 100644
--- a/docs/data/joy/components/link/DecoratorExamples.tsx
+++ b/docs/data/joy/components/link/DecoratorExamples.tsx
@@ -1,71 +1,29 @@
import * as React from 'react';
-import { keyframes } from '@mui/system';
import Box from '@mui/joy/Box';
+import CircularProgress from '@mui/joy/CircularProgress';
import Link from '@mui/joy/Link';
import Chip from '@mui/joy/Chip';
-const circulate = keyframes({
- '0%': {
- transform: 'rotate(0deg)',
- },
- '100%': {
- transform: 'rotate(360deg)',
- },
-});
-
export default function DecoratorExamples() {
return (
-
-
- `${theme.vars.palette.primary.softColor} transparent transparent`,
- animation: `${circulate} 1s ease infinite`,
- }}
- />
-
- }
- >
+ }>
Processing...
- HIRING!
+
+ hiring
}
- sx={{ '--Link-gap': '0.5rem', pr: 0, pl: 1 }}
+ sx={{ '--Link-gap': '0.5rem', pl: 1, py: 0.5, borderRadius: 'md' }}
>
Careers
diff --git a/docs/data/joy/components/link/LinkAndTypography.js b/docs/data/joy/components/link/LinkAndTypography.js
index 5783028dd65f25..b68f00bdca01ba 100644
--- a/docs/data/joy/components/link/LinkAndTypography.js
+++ b/docs/data/joy/components/link/LinkAndTypography.js
@@ -31,7 +31,7 @@ export default function LinkAndTypography() {
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
tempor incididunt ut labore et dolore{' '}
- }>
+ }>
Magna Aliqua
. Maecenas sed enim ut sem viverra aliquet eget.
diff --git a/docs/data/joy/components/link/LinkAndTypography.tsx b/docs/data/joy/components/link/LinkAndTypography.tsx
index 5783028dd65f25..b68f00bdca01ba 100644
--- a/docs/data/joy/components/link/LinkAndTypography.tsx
+++ b/docs/data/joy/components/link/LinkAndTypography.tsx
@@ -31,7 +31,7 @@ export default function LinkAndTypography() {
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
tempor incididunt ut labore et dolore{' '}
- }>
+ }>
Magna Aliqua
. Maecenas sed enim ut sem viverra aliquet eget.
diff --git a/docs/data/joy/components/link/LinkCard.js b/docs/data/joy/components/link/LinkCard.js
index f2bd4f1aed41be..c57a7b01024c91 100644
--- a/docs/data/joy/components/link/LinkCard.js
+++ b/docs/data/joy/components/link/LinkCard.js
@@ -8,15 +8,7 @@ import CenterFocusWeak from '@mui/icons-material/CenterFocusWeak';
export default function LinkCard() {
return (
-
+
@@ -32,10 +24,10 @@ export default function LinkCard() {
Joy UI
- Components that spark joy!
+ Components that spark joy!
-
+
Click the and TAB to test the focus
diff --git a/docs/data/joy/components/link/LinkCard.tsx b/docs/data/joy/components/link/LinkCard.tsx
index f2bd4f1aed41be..c57a7b01024c91 100644
--- a/docs/data/joy/components/link/LinkCard.tsx
+++ b/docs/data/joy/components/link/LinkCard.tsx
@@ -8,15 +8,7 @@ import CenterFocusWeak from '@mui/icons-material/CenterFocusWeak';
export default function LinkCard() {
return (
-
+
@@ -32,10 +24,10 @@ export default function LinkCard() {
Joy UI
- Components that spark joy!
+ Components that spark joy!
-
+
Click the and TAB to test the focus
diff --git a/docs/data/joy/components/link/LinkColors.js b/docs/data/joy/components/link/LinkColors.js
index 2d4e6a73fd8b01..a6651ce88fd30c 100644
--- a/docs/data/joy/components/link/LinkColors.js
+++ b/docs/data/joy/components/link/LinkColors.js
@@ -32,9 +32,6 @@ export default function LinkColors() {
Danger
-
- Info
-
Success
@@ -51,7 +48,7 @@ export default function LinkColors() {
}}
>
Danger
-
- Info
-
Success
@@ -52,7 +49,7 @@ export default function LinkColors() {
}}
>
H4
-
- H5
+
+ Title Large
-
- H6
+
+ Title Medium
-
- Body 1
+
+ Title Small
-
- Body 2
+
+ Body Large
-
- Body 3
+ Body Medium
+
+ Body Small
+
+
+ Body Extra Small
);
diff --git a/docs/data/joy/components/link/LinkLevels.tsx b/docs/data/joy/components/link/LinkLevels.tsx
index c31c45e0b291b3..adbb0db2b2f368 100644
--- a/docs/data/joy/components/link/LinkLevels.tsx
+++ b/docs/data/joy/components/link/LinkLevels.tsx
@@ -17,20 +17,24 @@ export default function LinkLevels() {
H4
-
- H5
+
+ Title Large
-
- H6
+
+ Title Medium
-
- Body 1
+
+ Title Small
-
- Body 2
+
+ Body Large
-
- Body 3
+ Body Medium
+
+ Body Small
+
+
+ Body Extra Small
);
diff --git a/docs/data/joy/components/link/LinkUsage.js b/docs/data/joy/components/link/LinkUsage.js
index 4a5aa06169890a..feceec54e58199 100644
--- a/docs/data/joy/components/link/LinkUsage.js
+++ b/docs/data/joy/components/link/LinkUsage.js
@@ -10,8 +10,20 @@ export default function LinkUsage() {
{
propName: 'level',
knob: 'select',
- options: ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'body1', 'body2', 'body3'],
- defaultValue: 'body1',
+ options: [
+ 'h1',
+ 'h2',
+ 'h3',
+ 'h4',
+ 'title-lg',
+ 'title-md',
+ 'title-sm',
+ 'body-lg',
+ 'body-md',
+ 'body-sm',
+ 'body-xs',
+ ],
+ defaultValue: 'body-md',
},
{
propName: 'underline',
diff --git a/docs/data/joy/components/list/BasicList.js b/docs/data/joy/components/list/BasicList.js
index 01cc14e9a2f52e..8dab791134c790 100644
--- a/docs/data/joy/components/list/BasicList.js
+++ b/docs/data/joy/components/list/BasicList.js
@@ -8,7 +8,7 @@ export default function BasicList() {
diff --git a/docs/data/joy/components/list/BasicList.tsx b/docs/data/joy/components/list/BasicList.tsx
index 01cc14e9a2f52e..8dab791134c790 100644
--- a/docs/data/joy/components/list/BasicList.tsx
+++ b/docs/data/joy/components/list/BasicList.tsx
@@ -8,7 +8,7 @@ export default function BasicList() {
diff --git a/docs/data/joy/components/list/BasicList.tsx.preview b/docs/data/joy/components/list/BasicList.tsx.preview
index 7eba3c3c4d9164..561cfa99cef2ea 100644
--- a/docs/data/joy/components/list/BasicList.tsx.preview
+++ b/docs/data/joy/components/list/BasicList.tsx.preview
@@ -1,6 +1,6 @@
diff --git a/docs/data/joy/components/list/DecoratedList.js b/docs/data/joy/components/list/DecoratedList.js
index 2656b14174bb10..3a088cb5d86181 100644
--- a/docs/data/joy/components/list/DecoratedList.js
+++ b/docs/data/joy/components/list/DecoratedList.js
@@ -9,17 +9,14 @@ export default function DecoratedList() {
Ingredients
-
+
π§
1 red onion
diff --git a/docs/data/joy/components/list/DecoratedList.tsx b/docs/data/joy/components/list/DecoratedList.tsx
index 2656b14174bb10..3a088cb5d86181 100644
--- a/docs/data/joy/components/list/DecoratedList.tsx
+++ b/docs/data/joy/components/list/DecoratedList.tsx
@@ -9,17 +9,14 @@ export default function DecoratedList() {
Ingredients
-
+
π§
1 red onion
diff --git a/docs/data/joy/components/list/DividedList.js b/docs/data/joy/components/list/DividedList.js
index cdb57a7b71ea7e..915a1dd59bcad1 100644
--- a/docs/data/joy/components/list/DividedList.js
+++ b/docs/data/joy/components/list/DividedList.js
@@ -19,30 +19,25 @@ export default function DividedList() {
>
{[undefined, 'gutter', 'startDecorator', 'startContent'].map((inset) => (
-
+
{inset ? `inset="${inset}"` : '(default)'}
-
+
Mabel Boyle
-
+
Boyd Burt
diff --git a/docs/data/joy/components/list/DividedList.tsx b/docs/data/joy/components/list/DividedList.tsx
index 30ce851b4f6c8a..3ca55b9b47b963 100644
--- a/docs/data/joy/components/list/DividedList.tsx
+++ b/docs/data/joy/components/list/DividedList.tsx
@@ -20,30 +20,25 @@ export default function DividedList() {
{([undefined, 'gutter', 'startDecorator', 'startContent'] as const).map(
(inset) => (
-
+
{inset ? `inset="${inset}"` : '(default)'}
-
+
Mabel Boyle
-
+
Boyd Burt
diff --git a/docs/data/joy/components/list/EllipsisList.js b/docs/data/joy/components/list/EllipsisList.js
index dd2f6064e45f17..d26dd86c24bd3b 100644
--- a/docs/data/joy/components/list/EllipsisList.js
+++ b/docs/data/joy/components/list/EllipsisList.js
@@ -12,10 +12,8 @@ export default function EllipsisList() {
Inbox
@@ -25,23 +23,23 @@ export default function EllipsisList() {
sx={{ '--ListItemDecorator-size': '56px' }}
>
-
+
- Brunch this weekend?
-
+ Brunch this weekend?
+
I'll be in your neighborhood doing errands this Tuesday.
-
+
- Summer BBQ
-
+ Summer BBQ
+
Wish I could come, but I'm out of town this Friday.
diff --git a/docs/data/joy/components/list/EllipsisList.tsx b/docs/data/joy/components/list/EllipsisList.tsx
index dd2f6064e45f17..d26dd86c24bd3b 100644
--- a/docs/data/joy/components/list/EllipsisList.tsx
+++ b/docs/data/joy/components/list/EllipsisList.tsx
@@ -12,10 +12,8 @@ export default function EllipsisList() {
Inbox
@@ -25,23 +23,23 @@ export default function EllipsisList() {
sx={{ '--ListItemDecorator-size': '56px' }}
>
-
+
- Brunch this weekend?
-
+ Brunch this weekend?
+
I'll be in your neighborhood doing errands this Tuesday.
-
+
- Summer BBQ
-
+ Summer BBQ
+
Wish I could come, but I'm out of town this Friday.
diff --git a/docs/data/joy/components/list/ExampleCollapsibleList.js b/docs/data/joy/components/list/ExampleCollapsibleList.js
index 8a5c958e99c62b..821c5149ded610 100644
--- a/docs/data/joy/components/list/ExampleCollapsibleList.js
+++ b/docs/data/joy/components/list/ExampleCollapsibleList.js
@@ -1,7 +1,7 @@
import * as React from 'react';
import Box from '@mui/joy/Box';
import List from '@mui/joy/List';
-import ListItem, { listItemClasses } from '@mui/joy/ListItem';
+import ListItem from '@mui/joy/ListItem';
import ListItemButton, { listItemButtonClasses } from '@mui/joy/ListItemButton';
import IconButton from '@mui/joy/IconButton';
import Typography from '@mui/joy/Typography';
@@ -38,14 +38,10 @@ export default function ExampleCollapsibleList() {
'--ListItem-startActionWidth': '0px',
'--ListItem-startActionTranslateX': '-50%',
[`& .${listItemButtonClasses.root}`]: {
- borderLeft: '1px solid',
- borderColor: 'divider',
+ borderLeftColor: 'divider',
},
[`& .${listItemButtonClasses.root}.${listItemButtonClasses.selected}`]: {
- borderColor: 'currentColor',
- },
- [`& .${listItemClasses.nested} > .${listItemButtonClasses.root}`]: {
- border: 'none',
+ borderLeftColor: 'currentColor',
},
'& [class*="startAction"]': {
color: 'var(--joy-palette-text-tertiary)',
@@ -54,7 +50,7 @@ export default function ExampleCollapsibleList() {
>
}>
-
+
Documentation
@@ -93,7 +89,7 @@ export default function ExampleCollapsibleList() {
>
Tutorial
-
+
9
@@ -144,7 +140,7 @@ export default function ExampleCollapsibleList() {
>
How-to Guides
-
+
39
diff --git a/docs/data/joy/components/list/ExampleCollapsibleList.tsx b/docs/data/joy/components/list/ExampleCollapsibleList.tsx
index 598f843843a1b8..985d404b6eaf48 100644
--- a/docs/data/joy/components/list/ExampleCollapsibleList.tsx
+++ b/docs/data/joy/components/list/ExampleCollapsibleList.tsx
@@ -1,7 +1,7 @@
import * as React from 'react';
import Box from '@mui/joy/Box';
import List from '@mui/joy/List';
-import ListItem, { listItemClasses } from '@mui/joy/ListItem';
+import ListItem from '@mui/joy/ListItem';
import ListItemButton, { listItemButtonClasses } from '@mui/joy/ListItemButton';
import IconButton from '@mui/joy/IconButton';
import Typography from '@mui/joy/Typography';
@@ -40,14 +40,10 @@ export default function ExampleCollapsibleList() {
'--ListItem-startActionTranslateX': '-50%',
[`& .${listItemButtonClasses.root}`]: {
- borderLeft: '1px solid',
- borderColor: 'divider',
+ borderLeftColor: 'divider',
},
[`& .${listItemButtonClasses.root}.${listItemButtonClasses.selected}`]: {
- borderColor: 'currentColor',
- },
- [`& .${listItemClasses.nested} > .${listItemButtonClasses.root}`]: {
- border: 'none',
+ borderLeftColor: 'currentColor',
},
'& [class*="startAction"]': {
color: 'var(--joy-palette-text-tertiary)',
@@ -56,7 +52,7 @@ export default function ExampleCollapsibleList() {
>
}>
-
+
Documentation
@@ -95,7 +91,7 @@ export default function ExampleCollapsibleList() {
>
Tutorial
-
+
9
@@ -146,7 +142,7 @@ export default function ExampleCollapsibleList() {
>
How-to Guides
-
+
39
diff --git a/docs/data/joy/components/list/ExampleGmailList.js b/docs/data/joy/components/list/ExampleGmailList.js
index be67bec0367ef7..2f686844ccab23 100644
--- a/docs/data/joy/components/list/ExampleGmailList.js
+++ b/docs/data/joy/components/list/ExampleGmailList.js
@@ -22,10 +22,8 @@ export default function ExampleGmailList() {
theme.vars.palette.text.secondary,
'--ListItem-minHeight': '32px',
'--List-nestedInsetStart': '13px',
[`& .${listItemDecoratorClasses.root}`]: {
@@ -40,15 +38,17 @@ export default function ExampleGmailList() {
setIndex(0)}
>
Inbox
-
+
1,950
@@ -56,7 +56,6 @@ export default function ExampleGmailList() {
setIndex(1)}
>
@@ -69,8 +68,7 @@ export default function ExampleGmailList() {
setIndex(2)}
>
@@ -83,7 +81,6 @@ export default function ExampleGmailList() {
setIndex(3)}
>
@@ -91,13 +88,12 @@ export default function ExampleGmailList() {
Social
- 4,320
+ 4,320
setIndex(4)}
>
@@ -105,7 +101,7 @@ export default function ExampleGmailList() {
Updates
- 22,252
+ 22,252
diff --git a/docs/data/joy/components/list/ExampleGmailList.tsx b/docs/data/joy/components/list/ExampleGmailList.tsx
index be67bec0367ef7..2f686844ccab23 100644
--- a/docs/data/joy/components/list/ExampleGmailList.tsx
+++ b/docs/data/joy/components/list/ExampleGmailList.tsx
@@ -22,10 +22,8 @@ export default function ExampleGmailList() {
theme.vars.palette.text.secondary,
'--ListItem-minHeight': '32px',
'--List-nestedInsetStart': '13px',
[`& .${listItemDecoratorClasses.root}`]: {
@@ -40,15 +38,17 @@ export default function ExampleGmailList() {
setIndex(0)}
>
Inbox
-
+
1,950
@@ -56,7 +56,6 @@ export default function ExampleGmailList() {
setIndex(1)}
>
@@ -69,8 +68,7 @@ export default function ExampleGmailList() {
setIndex(2)}
>
@@ -83,7 +81,6 @@ export default function ExampleGmailList() {
setIndex(3)}
>
@@ -91,13 +88,12 @@ export default function ExampleGmailList() {
Social
- 4,320
+ 4,320
setIndex(4)}
>
@@ -105,7 +101,7 @@ export default function ExampleGmailList() {
Updates
- 22,252
+ 22,252
diff --git a/docs/data/joy/components/list/ExampleIOSList.js b/docs/data/joy/components/list/ExampleIOSList.js
index 18c6f2dd52678b..3293aea42a60f6 100644
--- a/docs/data/joy/components/list/ExampleIOSList.js
+++ b/docs/data/joy/components/list/ExampleIOSList.js
@@ -80,7 +80,7 @@ export default function ExampleIOSList() {
iCloud+ Feature Updates
-
+
@@ -100,7 +100,7 @@ export default function ExampleIOSList() {
Apple TV+ Free Year Available
-
+
Included with your recent Apple device purchase. Must be accepted within
90 days of activation.
@@ -163,7 +163,7 @@ export default function ExampleIOSList() {
Wi-Fi
Mars
-
+
@@ -176,23 +176,19 @@ export default function ExampleIOSList() {
Bluetooth
On
-
+
-
+
Cellular
-
+
diff --git a/docs/data/joy/components/list/ExampleIOSList.tsx b/docs/data/joy/components/list/ExampleIOSList.tsx
index 18c6f2dd52678b..3293aea42a60f6 100644
--- a/docs/data/joy/components/list/ExampleIOSList.tsx
+++ b/docs/data/joy/components/list/ExampleIOSList.tsx
@@ -80,7 +80,7 @@ export default function ExampleIOSList() {
iCloud+ Feature Updates
-
+
@@ -100,7 +100,7 @@ export default function ExampleIOSList() {
Apple TV+ Free Year Available
-
+
Included with your recent Apple device purchase. Must be accepted within
90 days of activation.
@@ -163,7 +163,7 @@ export default function ExampleIOSList() {
Wi-Fi
Mars
-
+
@@ -176,23 +176,19 @@ export default function ExampleIOSList() {
Bluetooth
On
-
+
-
+
Cellular
-
+
diff --git a/docs/data/joy/components/list/HorizontalDividedList.js b/docs/data/joy/components/list/HorizontalDividedList.js
index 662b3e93e8b1cc..859c6de8c1acd7 100644
--- a/docs/data/joy/components/list/HorizontalDividedList.js
+++ b/docs/data/joy/components/list/HorizontalDividedList.js
@@ -11,31 +11,29 @@ export default function HorizontalDividedList() {
orientation="horizontal"
variant="outlined"
sx={{
- bgcolor: 'background.body',
- borderRadius: 'sm',
- boxShadow: 'sm',
flexGrow: 0,
mx: 'auto',
'--ListItemDecorator-size': '48px',
'--ListItem-paddingY': '1rem',
+ borderRadius: 'sm',
}}
>
-
+
Mabel Boyle
-
+
Boyd Burt
-
+
Adam Tris
diff --git a/docs/data/joy/components/list/HorizontalDividedList.tsx b/docs/data/joy/components/list/HorizontalDividedList.tsx
index 662b3e93e8b1cc..859c6de8c1acd7 100644
--- a/docs/data/joy/components/list/HorizontalDividedList.tsx
+++ b/docs/data/joy/components/list/HorizontalDividedList.tsx
@@ -11,31 +11,29 @@ export default function HorizontalDividedList() {
orientation="horizontal"
variant="outlined"
sx={{
- bgcolor: 'background.body',
- borderRadius: 'sm',
- boxShadow: 'sm',
flexGrow: 0,
mx: 'auto',
'--ListItemDecorator-size': '48px',
'--ListItem-paddingY': '1rem',
+ borderRadius: 'sm',
}}
>
-
+
Mabel Boyle
-
+
Boyd Burt
-
+
Adam Tris
diff --git a/docs/data/joy/components/list/ListVariables.js b/docs/data/joy/components/list/ListVariables.js
index 531b2d3595244b..8e5ea9abc32789 100644
--- a/docs/data/joy/components/list/ListVariables.js
+++ b/docs/data/joy/components/list/ListVariables.js
@@ -34,7 +34,6 @@ export default function ListVariables() {
...sx,
width: 300,
...theme.variants.outlined.neutral,
- bgcolor: 'background.body',
})}
>
@@ -57,7 +56,7 @@ export default function ListVariables() {
setSmall(event.target.checked)}
endDecorator={
- Toggle small nested list
+ Toggle small nested list
}
sx={{ mb: 2 }}
/>
@@ -25,9 +25,7 @@ export default function NestedList() {
size={small ? 'sm' : undefined}
sx={{
width: 200,
- bgcolor: 'background.body',
borderRadius: 'sm',
- boxShadow: 'sm',
}}
>
diff --git a/docs/data/joy/components/list/NestedList.tsx b/docs/data/joy/components/list/NestedList.tsx
index 0efdde73c046dd..dae6f614768d8f 100644
--- a/docs/data/joy/components/list/NestedList.tsx
+++ b/docs/data/joy/components/list/NestedList.tsx
@@ -16,7 +16,7 @@ export default function NestedList() {
checked={small}
onChange={(event) => setSmall(event.target.checked)}
endDecorator={
- Toggle small nested list
+ Toggle small nested list
}
sx={{ mb: 2 }}
/>
@@ -25,9 +25,7 @@ export default function NestedList() {
size={small ? 'sm' : undefined}
sx={{
width: 200,
- bgcolor: 'background.body',
borderRadius: 'sm',
- boxShadow: 'sm',
}}
>
diff --git a/docs/data/joy/components/list/SizesList.js b/docs/data/joy/components/list/SizesList.js
index 42fb75d1158b60..fbe74f01634c24 100644
--- a/docs/data/joy/components/list/SizesList.js
+++ b/docs/data/joy/components/list/SizesList.js
@@ -14,24 +14,22 @@ export default function SizesList() {
flexGrow: 1,
display: 'flex',
justifyContent: 'center',
- gap: 6,
+ gap: 2,
flexWrap: 'wrap',
'& > *': { minWidth: 0, flexBasis: 200 },
}}
>
{['sm', 'md', 'lg'].map((size) => (
-
+
size="{size}"
diff --git a/docs/data/joy/components/list/SizesList.tsx b/docs/data/joy/components/list/SizesList.tsx
index 78ae51e8dde45a..64009b17b9404d 100644
--- a/docs/data/joy/components/list/SizesList.tsx
+++ b/docs/data/joy/components/list/SizesList.tsx
@@ -14,24 +14,22 @@ export default function SizesList() {
flexGrow: 1,
display: 'flex',
justifyContent: 'center',
- gap: 6,
+ gap: 2,
flexWrap: 'wrap',
'& > *': { minWidth: 0, flexBasis: 200 },
}}
>
{(['sm', 'md', 'lg'] as const).map((size) => (
-
+
size="{size}"
diff --git a/docs/data/joy/components/list/list.md b/docs/data/joy/components/list/list.md
index 8856ba7ff00370..2cdcc82b373d56 100644
--- a/docs/data/joy/components/list/list.md
+++ b/docs/data/joy/components/list/list.md
@@ -169,7 +169,7 @@ The `ListItemButton` and the secondary action render as siblings, that way, the
### Selected
Use the `selected` prop to signal whether a `ListItemButton` is selected or not.
-It applies `color="primary"` and a few extra styles (e.g. font weight) to visually communicate the selected state.
+It applies `color="primary"` of the active variant to visually communicate the selected state.
:::info
A selected `ListItemButton` does not apply `:hover` and `:active` global variant styles.
diff --git a/docs/data/joy/components/menu/MenuIconSideNavExample.js b/docs/data/joy/components/menu/MenuIconSideNavExample.js
index 38f7ac56c8e13c..eb09a244862948 100644
--- a/docs/data/joy/components/menu/MenuIconSideNavExample.js
+++ b/docs/data/joy/components/menu/MenuIconSideNavExample.js
@@ -138,7 +138,7 @@ export default function MenuIconSideNavExample() {
}, 200);
};
return (
-
+
+
{
setOpen(!open);
}}
- sx={{ borderRadius: 0 }}
>
Open menu
@@ -65,7 +64,7 @@ export default function MenuListComposition() {
diff --git a/docs/data/joy/components/menu/MenuListComposition.tsx b/docs/data/joy/components/menu/MenuListComposition.tsx
index f0e6dcd5b8095d..dffc75cb5a4937 100644
--- a/docs/data/joy/components/menu/MenuListComposition.tsx
+++ b/docs/data/joy/components/menu/MenuListComposition.tsx
@@ -42,7 +42,6 @@ export default function MenuListComposition(): JSX.Element {
onClick={() => {
setOpen(!open);
}}
- sx={{ borderRadius: 0 }}
>
Open menu
@@ -65,7 +64,7 @@ export default function MenuListComposition(): JSX.Element {
diff --git a/docs/data/joy/components/menu/MenuListGroup.js b/docs/data/joy/components/menu/MenuListGroup.js
index 30095c3d51147e..1c443f9dd9bb10 100644
--- a/docs/data/joy/components/menu/MenuListGroup.js
+++ b/docs/data/joy/components/menu/MenuListGroup.js
@@ -24,7 +24,7 @@ export default function MenuListGroup() {
diff --git a/docs/data/joy/components/menu/MenuListGroup.tsx b/docs/data/joy/components/menu/MenuListGroup.tsx
index 30095c3d51147e..1c443f9dd9bb10 100644
--- a/docs/data/joy/components/menu/MenuListGroup.tsx
+++ b/docs/data/joy/components/menu/MenuListGroup.tsx
@@ -24,7 +24,7 @@ export default function MenuListGroup() {
diff --git a/docs/data/joy/components/menu/MenuToolbarExample.js b/docs/data/joy/components/menu/MenuToolbarExample.js
index f3f329ec8578ab..addd741849d120 100644
--- a/docs/data/joy/components/menu/MenuToolbarExample.js
+++ b/docs/data/joy/components/menu/MenuToolbarExample.js
@@ -42,7 +42,7 @@ const MenuBarButton = React.forwardRef(
boxShadow: '0 2px 8px 0px rgba(0 0 0 / 0.38)',
'--List-padding': 'var(--ListDivider-gap)',
'--ListItem-minHeight': '32px',
- [`& .${menuItemClasses.root}`]: {
+ [`&& .${menuItemClasses.root}`]: {
transition: 'none',
'&:hover': {
...theme.variants.solid.primary,
@@ -63,7 +63,7 @@ export default function MenuToolbarExample() {
const [menuIndex, setMenuIndex] = React.useState(null);
const renderShortcut = (text) => (
-
+
{text}
);
@@ -127,10 +127,8 @@ export default function MenuToolbarExample() {
data-joy-color-scheme="dark"
sx={{
bgcolor: 'background.body',
- px: 2,
borderRadius: '4px',
maxWidth: 'fit-content',
- '--ListItem-radius': '8px',
}}
>
diff --git a/docs/data/joy/components/menu/SelectedMenu.js b/docs/data/joy/components/menu/SelectedMenu.js
index 9b0ca9ac73d488..d3e2fe643567ce 100644
--- a/docs/data/joy/components/menu/SelectedMenu.js
+++ b/docs/data/joy/components/menu/SelectedMenu.js
@@ -24,16 +24,10 @@ export default function SelectedMenu() {
>
Random project
-
{['Credit Card', 'Paypal', 'QR Code'].map((value, index) => (
diff --git a/docs/data/joy/components/radio-button/ExamplePaymentChannels.tsx b/docs/data/joy/components/radio-button/ExamplePaymentChannels.tsx
index ab541342d73845..42e533446b9464 100644
--- a/docs/data/joy/components/radio-button/ExamplePaymentChannels.tsx
+++ b/docs/data/joy/components/radio-button/ExamplePaymentChannels.tsx
@@ -6,7 +6,7 @@ import ListDivider from '@mui/joy/ListDivider';
import Radio from '@mui/joy/Radio';
import RadioGroup from '@mui/joy/RadioGroup';
import Typography from '@mui/joy/Typography';
-import Switch, { switchClasses } from '@mui/joy/Switch';
+import Switch from '@mui/joy/Switch';
export default function ExamplePaymentChannels() {
const [orientation, setOrientation] =
@@ -23,27 +23,21 @@ export default function ExamplePaymentChannels() {
>
Pay with
) =>
setOrientation(event.target.checked ? 'horizontal' : 'vertical')
}
- sx={{
- [`&&:not(.${switchClasses.checked})`]: {
- '--Switch-trackBackground': (theme) =>
- theme.vars.palette.background.level3,
- },
- }}
/>
{['Credit Card', 'Paypal', 'QR Code'].map((value, index) => (
diff --git a/docs/data/joy/components/radio-button/ExampleProductAttributes.js b/docs/data/joy/components/radio-button/ExampleProductAttributes.js
index 1b52896fb8cb13..61e2505a108d25 100644
--- a/docs/data/joy/components/radio-button/ExampleProductAttributes.js
+++ b/docs/data/joy/components/radio-button/ExampleProductAttributes.js
@@ -16,7 +16,7 @@ export default function ExampleProductAttributes() {
fontWeight: 'xl',
textTransform: 'uppercase',
fontSize: 'xs',
- letterSpacing: '0.15rem',
+ letterSpacing: '0.1em',
}}
>
Color
@@ -26,49 +26,47 @@ export default function ExampleProductAttributes() {
defaultValue="warning"
sx={{ gap: 2, flexWrap: 'wrap', flexDirection: 'row' }}
>
- {['primary', 'neutral', 'danger', 'info', 'success', 'warning'].map(
- (color) => (
- (
+
+ }
+ value={color}
+ slotProps={{
+ input: { 'aria-label': color },
+ radio: {
+ sx: {
+ display: 'contents',
+ '--variant-borderWidth': '2px',
+ },
+ },
+ }}
sx={{
- position: 'relative',
- width: 40,
- height: 40,
- flexShrink: 0,
- bgcolor: `${color}.solidBg`,
- borderRadius: '50%',
- display: 'flex',
- alignItems: 'center',
- justifyContent: 'center',
+ '--joy-focus-outlineOffset': '4px',
+ '--joy-palette-focusVisible': (theme) =>
+ theme.vars.palette[color][500],
+ [`& .${radioClasses.action}.${radioClasses.focusVisible}`]: {
+ outlineWidth: '2px',
+ },
}}
- >
- }
- value={color}
- slotProps={{
- input: { 'aria-label': color },
- radio: {
- sx: {
- display: 'contents',
- '--variant-borderWidth': '2px',
- },
- },
- }}
- sx={{
- '--joy-focus-outlineOffset': '4px',
- '--joy-palette-focusVisible': (theme) =>
- theme.vars.palette[color][500],
- [`& .${radioClasses.action}.${radioClasses.focusVisible}`]: {
- outlineWidth: '2px',
- },
- }}
- />
-
- ),
- )}
+ />
+
+ ))}
Size
diff --git a/docs/data/joy/components/radio-button/ExampleProductAttributes.tsx b/docs/data/joy/components/radio-button/ExampleProductAttributes.tsx
index 1f86055b381d5d..1fc22d5c2492b0 100644
--- a/docs/data/joy/components/radio-button/ExampleProductAttributes.tsx
+++ b/docs/data/joy/components/radio-button/ExampleProductAttributes.tsx
@@ -16,7 +16,7 @@ export default function ExampleProductAttributes() {
fontWeight: 'xl',
textTransform: 'uppercase',
fontSize: 'xs',
- letterSpacing: '0.15rem',
+ letterSpacing: '0.1em',
}}
>
Color
@@ -26,49 +26,49 @@ export default function ExampleProductAttributes() {
defaultValue="warning"
sx={{ gap: 2, flexWrap: 'wrap', flexDirection: 'row' }}
>
- {(
- ['primary', 'neutral', 'danger', 'info', 'success', 'warning'] as const
- ).map((color) => (
-
- }
- value={color}
- slotProps={{
- input: { 'aria-label': color },
- radio: {
- sx: {
- display: 'contents',
- '--variant-borderWidth': '2px',
- },
- },
- }}
+ {(['primary', 'neutral', 'danger', 'success', 'warning'] as const).map(
+ (color) => (
+
- theme.vars.palette[color][500],
- [`& .${radioClasses.action}.${radioClasses.focusVisible}`]: {
- outlineWidth: '2px',
- },
+ position: 'relative',
+ width: 40,
+ height: 40,
+ flexShrink: 0,
+ bgcolor: `${color}.solidBg`,
+ borderRadius: '50%',
+ display: 'flex',
+ alignItems: 'center',
+ justifyContent: 'center',
}}
- />
-
- ))}
+ >
+ }
+ value={color}
+ slotProps={{
+ input: { 'aria-label': color },
+ radio: {
+ sx: {
+ display: 'contents',
+ '--variant-borderWidth': '2px',
+ },
+ },
+ }}
+ sx={{
+ '--joy-focus-outlineOffset': '4px',
+ '--joy-palette-focusVisible': (theme) =>
+ theme.vars.palette[color][500],
+ [`& .${radioClasses.action}.${radioClasses.focusVisible}`]: {
+ outlineWidth: '2px',
+ },
+ }}
+ />
+
+ ),
+ )}
Size
diff --git a/docs/data/joy/components/radio-button/ExampleSegmentedControls.js b/docs/data/joy/components/radio-button/ExampleSegmentedControls.js
index 7e1ca625021bfb..03968470e5a7ea 100644
--- a/docs/data/joy/components/radio-button/ExampleSegmentedControls.js
+++ b/docs/data/joy/components/radio-button/ExampleSegmentedControls.js
@@ -20,7 +20,7 @@ export default function ExampleSegmentedControls() {
sx={{
minHeight: 48,
padding: '4px',
- borderRadius: 'md',
+ borderRadius: '12px',
bgcolor: 'neutral.softBg',
'--RadioGroup-gap': '4px',
'--Radio-actionRadius': '8px',
@@ -43,7 +43,7 @@ export default function ExampleSegmentedControls() {
sx: {
...(checked && {
bgcolor: 'background.surface',
- boxShadow: 'md',
+ boxShadow: 'sm',
'&:hover': {
bgcolor: 'background.surface',
},
diff --git a/docs/data/joy/components/radio-button/ExampleSegmentedControls.tsx b/docs/data/joy/components/radio-button/ExampleSegmentedControls.tsx
index 4f63796f008e23..20f1ad0198d9db 100644
--- a/docs/data/joy/components/radio-button/ExampleSegmentedControls.tsx
+++ b/docs/data/joy/components/radio-button/ExampleSegmentedControls.tsx
@@ -22,7 +22,7 @@ export default function ExampleSegmentedControls() {
sx={{
minHeight: 48,
padding: '4px',
- borderRadius: 'md',
+ borderRadius: '12px',
bgcolor: 'neutral.softBg',
'--RadioGroup-gap': '4px',
'--Radio-actionRadius': '8px',
@@ -45,7 +45,7 @@ export default function ExampleSegmentedControls() {
sx: {
...(checked && {
bgcolor: 'background.surface',
- boxShadow: 'md',
+ boxShadow: 'sm',
'&:hover': {
bgcolor: 'background.surface',
},
diff --git a/docs/data/joy/components/radio-button/IconlessRadio.js b/docs/data/joy/components/radio-button/IconlessRadio.js
index ca4662bdc0933a..4f9d7a5f9f24ef 100644
--- a/docs/data/joy/components/radio-button/IconlessRadio.js
+++ b/docs/data/joy/components/radio-button/IconlessRadio.js
@@ -33,7 +33,6 @@ export default function IconlessRadio() {
p: 2,
borderRadius: 'md',
boxShadow: 'sm',
- bgcolor: 'background.body',
}}
>
{[1, 2, 3].map((num) => (
theme.vars.radius.md,
+ mb: 2,
}}
/>
- Person {num}
+
+ Person {num}
+
))}
diff --git a/docs/data/joy/components/radio-button/OverlayRadio.tsx b/docs/data/joy/components/radio-button/OverlayRadio.tsx
index 3115d687be66e6..2c339a47d71f1d 100644
--- a/docs/data/joy/components/radio-button/OverlayRadio.tsx
+++ b/docs/data/joy/components/radio-button/OverlayRadio.tsx
@@ -16,7 +16,7 @@ export default function OverlayRadio() {
name="member"
defaultValue="person1"
orientation="horizontal"
- sx={{ gap: 2, mt: 1 }}
+ sx={{ gap: 2 }}
>
{[1, 2, 3].map((num) => (
theme.vars.radius.md,
+ mb: 2,
}}
/>
- Person {num}
+
+ Person {num}
+
))}
diff --git a/docs/data/joy/components/radio-button/RadioButtonsGroup.js b/docs/data/joy/components/radio-button/RadioButtonsGroup.js
index cfb87f2ec56e4e..0033cc0cdf939d 100644
--- a/docs/data/joy/components/radio-button/RadioButtonsGroup.js
+++ b/docs/data/joy/components/radio-button/RadioButtonsGroup.js
@@ -9,7 +9,7 @@ export default function RadioButtonsGroup() {
return (
Gender
-
+
Gender
-
+
Gender
-
+
-
diff --git a/docs/data/joy/components/radio-button/RadioColors.tsx b/docs/data/joy/components/radio-button/RadioColors.tsx
index 1768fd4355c252..31e8370b7240c8 100644
--- a/docs/data/joy/components/radio-button/RadioColors.tsx
+++ b/docs/data/joy/components/radio-button/RadioColors.tsx
@@ -12,7 +12,6 @@ export default function RadioColors() {
-
diff --git a/docs/data/joy/components/radio-button/RadioColors.tsx.preview b/docs/data/joy/components/radio-button/RadioColors.tsx.preview
index 9940aaada64f37..41e542a921f098 100644
--- a/docs/data/joy/components/radio-button/RadioColors.tsx.preview
+++ b/docs/data/joy/components/radio-button/RadioColors.tsx.preview
@@ -4,7 +4,6 @@
-
diff --git a/docs/data/joy/components/radio-button/RadioFocus.js b/docs/data/joy/components/radio-button/RadioFocus.js
index a10e98a68d803d..57968824b95ce8 100644
--- a/docs/data/joy/components/radio-button/RadioFocus.js
+++ b/docs/data/joy/components/radio-button/RadioFocus.js
@@ -9,7 +9,7 @@ export default function RadioFocus() {
return (
Focus
-
+
Focus
-
+
Focus
-
+
{['Individual', 'Team', 'Enterprise'].map((item, index) => (
-
+
{[ , , ][index]}
diff --git a/docs/data/joy/components/radio-button/RadioPositionEnd.tsx b/docs/data/joy/components/radio-button/RadioPositionEnd.tsx
index 8159e733f165a0..37ad9b2196dfec 100644
--- a/docs/data/joy/components/radio-button/RadioPositionEnd.tsx
+++ b/docs/data/joy/components/radio-button/RadioPositionEnd.tsx
@@ -21,11 +21,7 @@ export default function RadioPositionEnd() {
}}
>
{['Individual', 'Team', 'Enterprise'].map((item, index) => (
-
+
{[ , , ][index]}
diff --git a/docs/data/joy/components/radio-button/RadioUsage.js b/docs/data/joy/components/radio-button/RadioUsage.js
index b1ad59e1c036a3..64ba200e024abb 100644
--- a/docs/data/joy/components/radio-button/RadioUsage.js
+++ b/docs/data/joy/components/radio-button/RadioUsage.js
@@ -13,13 +13,13 @@ export default function RadioUsage() {
{
propName: 'variant',
knob: 'radio',
- defaultValue: 'soft',
+ defaultValue: 'outlined',
options: ['plain', 'outlined', 'soft', 'solid'],
},
{
propName: 'color',
knob: 'color',
- defaultValue: 'primary',
+ defaultValue: 'neutral',
},
{
propName: 'size',
@@ -41,7 +41,6 @@ export default function RadioUsage() {
orientation={orientation}
defaultValue="1"
name="radio-button-usage"
- sx={{ mt: 1 }}
>
diff --git a/docs/data/joy/components/select/ControlledOpenSelect.js b/docs/data/joy/components/select/ControlledOpenSelect.js
index 00008cfd621a73..073b17dd5918a3 100644
--- a/docs/data/joy/components/select/ControlledOpenSelect.js
+++ b/docs/data/joy/components/select/ControlledOpenSelect.js
@@ -16,7 +16,7 @@ export default function ControlledOpenSelect() {
return (
{
skipRef.current = true;
}}
diff --git a/docs/data/joy/components/select/ControlledOpenSelect.tsx b/docs/data/joy/components/select/ControlledOpenSelect.tsx
index 10cb612c287f43..defa0bbbec0ea6 100644
--- a/docs/data/joy/components/select/ControlledOpenSelect.tsx
+++ b/docs/data/joy/components/select/ControlledOpenSelect.tsx
@@ -19,7 +19,7 @@ export default function ControlledOpenSelect() {
return (
{
skipRef.current = true;
}}
diff --git a/docs/data/joy/components/select/SelectCustomValueAppearance.js b/docs/data/joy/components/select/SelectCustomValueAppearance.js
index e008606860df78..12f0069602a7a9 100644
--- a/docs/data/joy/components/select/SelectCustomValueAppearance.js
+++ b/docs/data/joy/components/select/SelectCustomValueAppearance.js
@@ -43,8 +43,10 @@ export default function SelectCustomValueAppearance() {
- {data.name}
- {data.status}
+
+ {data.name}
+
+ {data.status}
- {data.name}
- {data.status}
+
+ {data.name}
+
+ {data.status}
-
+
{name} ({animals.length})
diff --git a/docs/data/joy/components/select/SelectGroupedOptions.tsx b/docs/data/joy/components/select/SelectGroupedOptions.tsx
index 33d1e73322e6bf..778068cbbb86c1 100644
--- a/docs/data/joy/components/select/SelectGroupedOptions.tsx
+++ b/docs/data/joy/components/select/SelectGroupedOptions.tsx
@@ -46,7 +46,7 @@ export default function SelectGroupedOptions() {
sx={{ '--ListItemDecorator-size': '28px' }}
>
-
+
{name} ({animals.length})
diff --git a/docs/data/joy/components/select/SelectMinWidth.js b/docs/data/joy/components/select/SelectMinWidth.js
index 70f55b92109600..1da61e19fe8a5f 100644
--- a/docs/data/joy/components/select/SelectMinWidth.js
+++ b/docs/data/joy/components/select/SelectMinWidth.js
@@ -23,7 +23,7 @@ export default function SelectMinWidth() {
-
+
Width is fixed at 100px
diff --git a/docs/data/joy/components/select/SelectMinWidth.tsx b/docs/data/joy/components/select/SelectMinWidth.tsx
index 70f55b92109600..1da61e19fe8a5f 100644
--- a/docs/data/joy/components/select/SelectMinWidth.tsx
+++ b/docs/data/joy/components/select/SelectMinWidth.tsx
@@ -23,7 +23,7 @@ export default function SelectMinWidth() {
-
+
Width is fixed at 100px
diff --git a/docs/data/joy/components/select/SelectUsage.js b/docs/data/joy/components/select/SelectUsage.js
index 5a38a953dedc3e..65a250f061e737 100644
--- a/docs/data/joy/components/select/SelectUsage.js
+++ b/docs/data/joy/components/select/SelectUsage.js
@@ -39,12 +39,13 @@ export default function SelectUsage() {
},
{
propName: 'children',
- defaultValue: ``,
+ defaultValue: '',
},
]}
renderDemo={(props) => (
diff --git a/docs/data/joy/components/skeleton/AnimationSkeleton.tsx b/docs/data/joy/components/skeleton/AnimationSkeleton.tsx
index 65d033316322a3..cd4886b7f61af8 100644
--- a/docs/data/joy/components/skeleton/AnimationSkeleton.tsx
+++ b/docs/data/joy/components/skeleton/AnimationSkeleton.tsx
@@ -18,7 +18,7 @@ export default function AnimationSkeleton() {
diff --git a/docs/data/joy/components/skeleton/BasicCardSkeleton.js b/docs/data/joy/components/skeleton/BasicCardSkeleton.js
index 2e69144760b153..17be895ee78435 100644
--- a/docs/data/joy/components/skeleton/BasicCardSkeleton.js
+++ b/docs/data/joy/components/skeleton/BasicCardSkeleton.js
@@ -15,7 +15,7 @@ export default function BasicCardSkeleton() {
Yosemite National Park
-
+
April 24 to May 02, 2021
-
+
Total price:
diff --git a/docs/data/joy/components/skeleton/BasicCardSkeleton.tsx b/docs/data/joy/components/skeleton/BasicCardSkeleton.tsx
index 2e69144760b153..17be895ee78435 100644
--- a/docs/data/joy/components/skeleton/BasicCardSkeleton.tsx
+++ b/docs/data/joy/components/skeleton/BasicCardSkeleton.tsx
@@ -15,7 +15,7 @@ export default function BasicCardSkeleton() {
Yosemite National Park
-
+
April 24 to May 02, 2021
-
+
Total price:
diff --git a/docs/data/joy/components/skeleton/CommentSkeleton.js b/docs/data/joy/components/skeleton/CommentSkeleton.js
index 0fca187d7bcb29..1c5265eb6d264a 100644
--- a/docs/data/joy/components/skeleton/CommentSkeleton.js
+++ b/docs/data/joy/components/skeleton/CommentSkeleton.js
@@ -13,13 +13,13 @@ export default function CommentSkeleton() {
-
+
-
-
-
+
+
+
);
diff --git a/docs/data/joy/components/skeleton/CommentSkeleton.tsx b/docs/data/joy/components/skeleton/CommentSkeleton.tsx
index 0fca187d7bcb29..1c5265eb6d264a 100644
--- a/docs/data/joy/components/skeleton/CommentSkeleton.tsx
+++ b/docs/data/joy/components/skeleton/CommentSkeleton.tsx
@@ -13,13 +13,13 @@ export default function CommentSkeleton() {
-
+
-
-
-
+
+
+
);
diff --git a/docs/data/joy/components/skeleton/InlineSkeleton.js b/docs/data/joy/components/skeleton/InlineSkeleton.js
index 7e457777c7cd31..03b019c28afcda 100644
--- a/docs/data/joy/components/skeleton/InlineSkeleton.js
+++ b/docs/data/joy/components/skeleton/InlineSkeleton.js
@@ -20,7 +20,7 @@ export default function InlineSkeleton() {
A heading
HISTORY, PURPOSE AND USAGE
diff --git a/docs/data/joy/components/skeleton/InlineSkeleton.tsx b/docs/data/joy/components/skeleton/InlineSkeleton.tsx
index 7e457777c7cd31..03b019c28afcda 100644
--- a/docs/data/joy/components/skeleton/InlineSkeleton.tsx
+++ b/docs/data/joy/components/skeleton/InlineSkeleton.tsx
@@ -20,7 +20,7 @@ export default function InlineSkeleton() {
A heading
HISTORY, PURPOSE AND USAGE
diff --git a/docs/data/joy/components/skeleton/TextBlockSkeleton.js b/docs/data/joy/components/skeleton/TextBlockSkeleton.js
index 5f372113578209..6dfd56cdf4bafd 100644
--- a/docs/data/joy/components/skeleton/TextBlockSkeleton.js
+++ b/docs/data/joy/components/skeleton/TextBlockSkeleton.js
@@ -12,14 +12,14 @@ export default function TextBlockSkeleton() {
h2 Typeface
-
- body1 Typeface
+
+ body-md Typeface
-
- body2 Typeface
+
+ body-sm Typeface
-
- body3 Typeface
+
+ body-xs Typeface
);
}
diff --git a/docs/data/joy/components/skeleton/TextBlockSkeleton.tsx b/docs/data/joy/components/skeleton/TextBlockSkeleton.tsx
index 5f372113578209..6dfd56cdf4bafd 100644
--- a/docs/data/joy/components/skeleton/TextBlockSkeleton.tsx
+++ b/docs/data/joy/components/skeleton/TextBlockSkeleton.tsx
@@ -12,14 +12,14 @@ export default function TextBlockSkeleton() {
h2 Typeface
-
- body1 Typeface
+
+ body-md Typeface
-
- body2 Typeface
+
+ body-sm Typeface
-
- body3 Typeface
+
+ body-xs Typeface
);
}
diff --git a/docs/data/joy/components/skeleton/TextBlockSkeleton.tsx.preview b/docs/data/joy/components/skeleton/TextBlockSkeleton.tsx.preview
index a3d0f0a359f131..a9ba6a08868ded 100644
--- a/docs/data/joy/components/skeleton/TextBlockSkeleton.tsx.preview
+++ b/docs/data/joy/components/skeleton/TextBlockSkeleton.tsx.preview
@@ -4,11 +4,11 @@
h2 Typeface
-
-body1 Typeface
+
+body-md Typeface
-
-body2 Typeface
+
+body-sm Typeface
-
-body3 Typeface
\ No newline at end of file
+
+body-xs Typeface
\ No newline at end of file
diff --git a/docs/data/joy/components/stack/BasicStack.js b/docs/data/joy/components/stack/BasicStack.js
index fe96a00bedc855..1bb7416cec5f29 100644
--- a/docs/data/joy/components/stack/BasicStack.js
+++ b/docs/data/joy/components/stack/BasicStack.js
@@ -7,7 +7,7 @@ import { styled } from '@mui/joy/styles';
const Item = styled(Sheet)(({ theme }) => ({
backgroundColor:
theme.palette.mode === 'dark' ? theme.palette.background.level1 : '#fff',
- ...theme.typography.body2,
+ ...theme.typography['body-sm'],
padding: theme.spacing(1),
textAlign: 'center',
borderRadius: 4,
diff --git a/docs/data/joy/components/stack/BasicStack.tsx b/docs/data/joy/components/stack/BasicStack.tsx
index fe96a00bedc855..1bb7416cec5f29 100644
--- a/docs/data/joy/components/stack/BasicStack.tsx
+++ b/docs/data/joy/components/stack/BasicStack.tsx
@@ -7,7 +7,7 @@ import { styled } from '@mui/joy/styles';
const Item = styled(Sheet)(({ theme }) => ({
backgroundColor:
theme.palette.mode === 'dark' ? theme.palette.background.level1 : '#fff',
- ...theme.typography.body2,
+ ...theme.typography['body-sm'],
padding: theme.spacing(1),
textAlign: 'center',
borderRadius: 4,
diff --git a/docs/data/joy/components/stack/DirectionStack.js b/docs/data/joy/components/stack/DirectionStack.js
index fd9153fc286444..e4db4711d8c9a3 100644
--- a/docs/data/joy/components/stack/DirectionStack.js
+++ b/docs/data/joy/components/stack/DirectionStack.js
@@ -6,7 +6,7 @@ import { styled } from '@mui/joy/styles';
const Item = styled(Sheet)(({ theme }) => ({
backgroundColor:
theme.palette.mode === 'dark' ? theme.palette.background.level1 : '#fff',
- ...theme.typography.body2,
+ ...theme.typography['body-sm'],
padding: theme.spacing(1),
textAlign: 'center',
borderRadius: 4,
diff --git a/docs/data/joy/components/stack/DirectionStack.tsx b/docs/data/joy/components/stack/DirectionStack.tsx
index fd9153fc286444..e4db4711d8c9a3 100644
--- a/docs/data/joy/components/stack/DirectionStack.tsx
+++ b/docs/data/joy/components/stack/DirectionStack.tsx
@@ -6,7 +6,7 @@ import { styled } from '@mui/joy/styles';
const Item = styled(Sheet)(({ theme }) => ({
backgroundColor:
theme.palette.mode === 'dark' ? theme.palette.background.level1 : '#fff',
- ...theme.typography.body2,
+ ...theme.typography['body-sm'],
padding: theme.spacing(1),
textAlign: 'center',
borderRadius: 4,
diff --git a/docs/data/joy/components/stack/DividerStack.js b/docs/data/joy/components/stack/DividerStack.js
index 869db1e7d4517e..3451afa7ca399f 100644
--- a/docs/data/joy/components/stack/DividerStack.js
+++ b/docs/data/joy/components/stack/DividerStack.js
@@ -8,7 +8,7 @@ import { styled } from '@mui/joy/styles';
const Item = styled(Sheet)(({ theme }) => ({
backgroundColor:
theme.palette.mode === 'dark' ? theme.palette.background.level1 : '#fff',
- ...theme.typography.body2,
+ ...theme.typography['body-sm'],
padding: theme.spacing(1),
textAlign: 'center',
borderRadius: 4,
diff --git a/docs/data/joy/components/stack/DividerStack.tsx b/docs/data/joy/components/stack/DividerStack.tsx
index 869db1e7d4517e..3451afa7ca399f 100644
--- a/docs/data/joy/components/stack/DividerStack.tsx
+++ b/docs/data/joy/components/stack/DividerStack.tsx
@@ -8,7 +8,7 @@ import { styled } from '@mui/joy/styles';
const Item = styled(Sheet)(({ theme }) => ({
backgroundColor:
theme.palette.mode === 'dark' ? theme.palette.background.level1 : '#fff',
- ...theme.typography.body2,
+ ...theme.typography['body-sm'],
padding: theme.spacing(1),
textAlign: 'center',
borderRadius: 4,
diff --git a/docs/data/joy/components/stack/FlexboxGapStack.js b/docs/data/joy/components/stack/FlexboxGapStack.js
index 3d8c09b36dc3ac..33d144ca45a120 100644
--- a/docs/data/joy/components/stack/FlexboxGapStack.js
+++ b/docs/data/joy/components/stack/FlexboxGapStack.js
@@ -7,7 +7,7 @@ import { styled } from '@mui/joy/styles';
const Item = styled(Sheet)(({ theme }) => ({
backgroundColor:
theme.palette.mode === 'dark' ? theme.palette.background.level1 : '#fff',
- ...theme.typography.body2,
+ ...theme.typography['body-sm'],
padding: theme.spacing(1),
textAlign: 'center',
borderRadius: 4,
diff --git a/docs/data/joy/components/stack/FlexboxGapStack.tsx b/docs/data/joy/components/stack/FlexboxGapStack.tsx
index 3d8c09b36dc3ac..33d144ca45a120 100644
--- a/docs/data/joy/components/stack/FlexboxGapStack.tsx
+++ b/docs/data/joy/components/stack/FlexboxGapStack.tsx
@@ -7,7 +7,7 @@ import { styled } from '@mui/joy/styles';
const Item = styled(Sheet)(({ theme }) => ({
backgroundColor:
theme.palette.mode === 'dark' ? theme.palette.background.level1 : '#fff',
- ...theme.typography.body2,
+ ...theme.typography['body-sm'],
padding: theme.spacing(1),
textAlign: 'center',
borderRadius: 4,
diff --git a/docs/data/joy/components/stack/InteractiveStack.js b/docs/data/joy/components/stack/InteractiveStack.js
index 9d9db740baaa46..febf8e63bfe255 100644
--- a/docs/data/joy/components/stack/InteractiveStack.js
+++ b/docs/data/joy/components/stack/InteractiveStack.js
@@ -13,7 +13,7 @@ import { styled } from '@mui/joy/styles';
const Item = styled(Sheet)(({ theme }) => ({
backgroundColor:
theme.palette.mode === 'dark' ? theme.palette.background.level1 : '#fff',
- ...theme.typography.body2,
+ ...theme.typography['body-sm'],
padding: theme.spacing(1),
textAlign: 'center',
borderRadius: 4,
diff --git a/docs/data/joy/components/stack/InteractiveStack.tsx b/docs/data/joy/components/stack/InteractiveStack.tsx
index 1643857e1e15c4..a31100d97d8c36 100644
--- a/docs/data/joy/components/stack/InteractiveStack.tsx
+++ b/docs/data/joy/components/stack/InteractiveStack.tsx
@@ -13,7 +13,7 @@ import { styled } from '@mui/joy/styles';
const Item = styled(Sheet)(({ theme }) => ({
backgroundColor:
theme.palette.mode === 'dark' ? theme.palette.background.level1 : '#fff',
- ...theme.typography.body2,
+ ...theme.typography['body-sm'],
padding: theme.spacing(1),
textAlign: 'center',
borderRadius: 4,
diff --git a/docs/data/joy/components/stack/ResponsiveStack.js b/docs/data/joy/components/stack/ResponsiveStack.js
index 4949a0ea55fa29..acc2bb6c6ab7e9 100644
--- a/docs/data/joy/components/stack/ResponsiveStack.js
+++ b/docs/data/joy/components/stack/ResponsiveStack.js
@@ -6,7 +6,7 @@ import { styled } from '@mui/joy/styles';
const Item = styled(Sheet)(({ theme }) => ({
backgroundColor:
theme.palette.mode === 'dark' ? theme.palette.background.level1 : '#fff',
- ...theme.typography.body2,
+ ...theme.typography['body-sm'],
padding: theme.spacing(1),
textAlign: 'center',
borderRadius: 4,
diff --git a/docs/data/joy/components/stack/ResponsiveStack.tsx b/docs/data/joy/components/stack/ResponsiveStack.tsx
index 4949a0ea55fa29..acc2bb6c6ab7e9 100644
--- a/docs/data/joy/components/stack/ResponsiveStack.tsx
+++ b/docs/data/joy/components/stack/ResponsiveStack.tsx
@@ -6,7 +6,7 @@ import { styled } from '@mui/joy/styles';
const Item = styled(Sheet)(({ theme }) => ({
backgroundColor:
theme.palette.mode === 'dark' ? theme.palette.background.level1 : '#fff',
- ...theme.typography.body2,
+ ...theme.typography['body-sm'],
padding: theme.spacing(1),
textAlign: 'center',
borderRadius: 4,
diff --git a/docs/data/joy/components/stack/ZeroWidthStack.js b/docs/data/joy/components/stack/ZeroWidthStack.js
index 70c89d61f5ab3e..fe6430db37ecac 100644
--- a/docs/data/joy/components/stack/ZeroWidthStack.js
+++ b/docs/data/joy/components/stack/ZeroWidthStack.js
@@ -7,7 +7,7 @@ import { styled } from '@mui/joy/styles';
import Typography from '@mui/joy/Typography';
const Item = styled(Sheet)(({ theme }) => ({
- ...theme.typography.body2,
+ ...theme.typography['body-sm'],
padding: theme.spacing(1),
textAlign: 'center',
borderRadius: 4,
diff --git a/docs/data/joy/components/stack/ZeroWidthStack.tsx b/docs/data/joy/components/stack/ZeroWidthStack.tsx
index 70c89d61f5ab3e..fe6430db37ecac 100644
--- a/docs/data/joy/components/stack/ZeroWidthStack.tsx
+++ b/docs/data/joy/components/stack/ZeroWidthStack.tsx
@@ -7,7 +7,7 @@ import { styled } from '@mui/joy/styles';
import Typography from '@mui/joy/Typography';
const Item = styled(Sheet)(({ theme }) => ({
- ...theme.typography.body2,
+ ...theme.typography['body-sm'],
padding: theme.spacing(1),
textAlign: 'center',
borderRadius: 4,
diff --git a/docs/data/joy/components/switch/ExampleTrackChild.js b/docs/data/joy/components/switch/ExampleTrackChild.js
index 9b91fd0de6a7f6..7f96a0624a7ffa 100644
--- a/docs/data/joy/components/switch/ExampleTrackChild.js
+++ b/docs/data/joy/components/switch/ExampleTrackChild.js
@@ -1,29 +1,53 @@
import * as React from 'react';
import Switch from '@mui/joy/Switch';
+import Stack from '@mui/joy/Stack';
import Typography from '@mui/joy/Typography';
export default function ExampleTrackChild() {
return (
-
-
- On
-
-
- Off
-
-
- ),
- },
- }}
- sx={{
- '--Switch-thumbSize': '27px',
- '--Switch-trackWidth': '64px',
- '--Switch-trackHeight': '31px',
- }}
- />
+
+
+
+ On
+
+
+ Off
+
+
+ ),
+ },
+ }}
+ sx={{
+ '--Switch-thumbSize': '27px',
+ '--Switch-trackWidth': '64px',
+ '--Switch-trackHeight': '31px',
+ }}
+ />
+
+ I
+ 0
+
+ ),
+ sx: {
+ justifyContent: 'space-around',
+ },
+ },
+ }}
+ sx={{
+ '--Switch-thumbSize': '27px',
+ '--Switch-trackWidth': '52px',
+ '--Switch-trackHeight': '31px',
+ }}
+ />
+
);
}
diff --git a/docs/data/joy/components/switch/ExampleTrackChild.tsx b/docs/data/joy/components/switch/ExampleTrackChild.tsx
index 9b91fd0de6a7f6..7f96a0624a7ffa 100644
--- a/docs/data/joy/components/switch/ExampleTrackChild.tsx
+++ b/docs/data/joy/components/switch/ExampleTrackChild.tsx
@@ -1,29 +1,53 @@
import * as React from 'react';
import Switch from '@mui/joy/Switch';
+import Stack from '@mui/joy/Stack';
import Typography from '@mui/joy/Typography';
export default function ExampleTrackChild() {
return (
-
-
- On
-
-
- Off
-
-
- ),
- },
- }}
- sx={{
- '--Switch-thumbSize': '27px',
- '--Switch-trackWidth': '64px',
- '--Switch-trackHeight': '31px',
- }}
- />
+
+
+
+ On
+
+
+ Off
+
+
+ ),
+ },
+ }}
+ sx={{
+ '--Switch-thumbSize': '27px',
+ '--Switch-trackWidth': '64px',
+ '--Switch-trackHeight': '31px',
+ }}
+ />
+
+ I
+ 0
+
+ ),
+ sx: {
+ justifyContent: 'space-around',
+ },
+ },
+ }}
+ sx={{
+ '--Switch-thumbSize': '27px',
+ '--Switch-trackWidth': '52px',
+ '--Switch-trackHeight': '31px',
+ }}
+ />
+
);
}
diff --git a/docs/data/joy/components/switch/SwitchControl.js b/docs/data/joy/components/switch/SwitchControl.js
index 4a3796a97c721e..13de9b76d7a8ce 100644
--- a/docs/data/joy/components/switch/SwitchControl.js
+++ b/docs/data/joy/components/switch/SwitchControl.js
@@ -20,7 +20,7 @@ export default function SwitchControl() {
checked={checked}
onChange={(event) => setChecked(event.target.checked)}
color={checked ? 'success' : 'neutral'}
- variant="outlined"
+ variant={checked ? 'solid' : 'outlined'}
endDecorator={checked ? 'On' : 'Off'}
slotProps={{
endDecorator: {
diff --git a/docs/data/joy/components/switch/SwitchControl.tsx b/docs/data/joy/components/switch/SwitchControl.tsx
index 901e1d6db947a1..86a8a23f4face6 100644
--- a/docs/data/joy/components/switch/SwitchControl.tsx
+++ b/docs/data/joy/components/switch/SwitchControl.tsx
@@ -22,7 +22,7 @@ export default function SwitchControl() {
setChecked(event.target.checked)
}
color={checked ? 'success' : 'neutral'}
- variant="outlined"
+ variant={checked ? 'solid' : 'outlined'}
endDecorator={checked ? 'On' : 'Off'}
slotProps={{
endDecorator: {
diff --git a/docs/data/joy/components/switch/SwitchUsage.js b/docs/data/joy/components/switch/SwitchUsage.js
index 29b32e84c49f45..fd1f15030fbf3f 100644
--- a/docs/data/joy/components/switch/SwitchUsage.js
+++ b/docs/data/joy/components/switch/SwitchUsage.js
@@ -3,6 +3,7 @@ import Switch from '@mui/joy/Switch';
import JoyUsageDemo from 'docs/src/modules/components/JoyUsageDemo';
export default function SwitchUsage() {
+ const [checked, setChecked] = React.useState(false);
return (
}
+ renderDemo={(props) => (
+ setChecked(event.target.checked)}
+ />
+ )}
/>
);
}
diff --git a/docs/data/joy/components/table/TableCollapsibleRow.js b/docs/data/joy/components/table/TableCollapsibleRow.js
index c4e85a38c90ab5..4d7764f1c8bcea 100644
--- a/docs/data/joy/components/table/TableCollapsibleRow.js
+++ b/docs/data/joy/components/table/TableCollapsibleRow.js
@@ -61,7 +61,7 @@ function Row(props) {
variant="soft"
sx={{ p: 1, pl: 6, boxShadow: 'inset 0 3px 6px 0 rgba(0 0 0 / 0.08)' }}
>
-
+
History
; initialOpen?: boolean
variant="soft"
sx={{ p: 1, pl: 6, boxShadow: 'inset 0 3px 6px 0 rgba(0 0 0 / 0.08)' }}
>
-
+
History
-
+
β Scroll direction β
-
+
β Scroll direction β
({
- '& tr > *:first-child': { bgcolor: 'info.softBg' },
+ '& tr > *:first-child': { bgcolor: 'success.softBg' },
'& th[scope="col"]': theme.variants.solid.neutral,
'& td': theme.variants.soft.neutral,
})}
diff --git a/docs/data/joy/components/table/TableGlobalVariant.tsx b/docs/data/joy/components/table/TableGlobalVariant.tsx
index a2c6719c21fdfb..7b97ab45e3abd7 100644
--- a/docs/data/joy/components/table/TableGlobalVariant.tsx
+++ b/docs/data/joy/components/table/TableGlobalVariant.tsx
@@ -6,7 +6,7 @@ export default function TableGlobalVariant() {
({
- '& tr > *:first-child': { bgcolor: 'info.softBg' },
+ '& tr > *:first-child': { bgcolor: 'success.softBg' },
'& th[scope="col"]': theme.variants.solid.neutral,
'& td': theme.variants.soft.neutral,
})}
diff --git a/docs/data/joy/components/table/TableScrollingShadows.js b/docs/data/joy/components/table/TableScrollingShadows.js
index c043592107ef1e..3cec95661072ce 100644
--- a/docs/data/joy/components/table/TableScrollingShadows.js
+++ b/docs/data/joy/components/table/TableScrollingShadows.js
@@ -23,7 +23,7 @@ const rows = [
export default function TableScrollingShadows() {
return (
-
+
The table body is scrollable.
-
+
The table body is scrollable.
) : (
- theme.vars.palette.info.softBg,
+ theme.vars.palette.success.softBg,
'& thead th:nth-child(1)': {
width: '40px',
},
diff --git a/docs/data/joy/components/table/TableSortAndSelection.tsx b/docs/data/joy/components/table/TableSortAndSelection.tsx
index 10872c4d13b147..af9c7ddc93376c 100644
--- a/docs/data/joy/components/table/TableSortAndSelection.tsx
+++ b/docs/data/joy/components/table/TableSortAndSelection.tsx
@@ -264,7 +264,7 @@ function EnhancedTableToolbar(props: EnhancedTableToolbarProps) {
) : (
- theme.vars.palette.info.softBg,
+ theme.vars.palette.success.softBg,
'& thead th:nth-child(1)': {
width: '40px',
},
diff --git a/docs/data/joy/components/table/TableStickyHeader.js b/docs/data/joy/components/table/TableStickyHeader.js
index 090ad901e83012..74e807460234a1 100644
--- a/docs/data/joy/components/table/TableStickyHeader.js
+++ b/docs/data/joy/components/table/TableStickyHeader.js
@@ -26,7 +26,7 @@ function sum(column) {
export default function TableStickyHeader() {
return (
-
+
The table body is scrollable.
diff --git a/docs/data/joy/components/table/TableStickyHeader.tsx b/docs/data/joy/components/table/TableStickyHeader.tsx
index 8ea61c757c9f93..f1f9e9f432db65 100644
--- a/docs/data/joy/components/table/TableStickyHeader.tsx
+++ b/docs/data/joy/components/table/TableStickyHeader.tsx
@@ -31,7 +31,7 @@ function sum(column: 'calories' | 'fat' | 'carbs' | 'protein') {
export default function TableStickyHeader() {
return (
-
+
The table body is scrollable.
diff --git a/docs/data/joy/components/table/TableTextEllipsis.js b/docs/data/joy/components/table/TableTextEllipsis.js
index ba9bfb41f78ee2..bad48f3dedc22d 100644
--- a/docs/data/joy/components/table/TableTextEllipsis.js
+++ b/docs/data/joy/components/table/TableTextEllipsis.js
@@ -29,7 +29,7 @@ export default function TableTextEllipsis() {
Morty D Ardiousdellois Addami
-
+
Writer, Youtuber
diff --git a/docs/data/joy/components/table/TableTextEllipsis.tsx b/docs/data/joy/components/table/TableTextEllipsis.tsx
index ba9bfb41f78ee2..bad48f3dedc22d 100644
--- a/docs/data/joy/components/table/TableTextEllipsis.tsx
+++ b/docs/data/joy/components/table/TableTextEllipsis.tsx
@@ -29,7 +29,7 @@ export default function TableTextEllipsis() {
Morty D Ardiousdellois Addami
-
+
Writer, Youtuber
diff --git a/docs/data/joy/components/table/TableUsage.js b/docs/data/joy/components/table/TableUsage.js
index e67a716dd3d6e7..7b2da59f1d6bd7 100644
--- a/docs/data/joy/components/table/TableUsage.js
+++ b/docs/data/joy/components/table/TableUsage.js
@@ -55,7 +55,7 @@ export default function ButtonUsage() {
renderDemo={(props) => (
setColor(newValue)}
>
- {['neutral', 'primary', 'danger', 'info', 'success', 'warning'].map(
- (item) => (
-
- ),
- )}
+ {['neutral', 'primary', 'danger', 'success', 'warning'].map((item) => (
+
+ ))}
diff --git a/docs/data/joy/components/table/TableVariants.tsx b/docs/data/joy/components/table/TableVariants.tsx
index bec3b79094ae23..9c91085c8d0962 100644
--- a/docs/data/joy/components/table/TableVariants.tsx
+++ b/docs/data/joy/components/table/TableVariants.tsx
@@ -63,13 +63,11 @@ export default function TableVariants() {
value={color}
onChange={(event, newValue) => setColor(newValue as typeof color)}
>
- {['neutral', 'primary', 'danger', 'info', 'success', 'warning'].map(
- (item) => (
-
- ),
- )}
+ {['neutral', 'primary', 'danger', 'success', 'warning'].map((item) => (
+
+ ))}
diff --git a/docs/data/joy/components/tabs/TabDisabled.js b/docs/data/joy/components/tabs/TabDisabled.js
index c2c759e35ae056..d1695e9dc28e40 100644
--- a/docs/data/joy/components/tabs/TabDisabled.js
+++ b/docs/data/joy/components/tabs/TabDisabled.js
@@ -5,7 +5,7 @@ import Tab from '@mui/joy/Tab';
export default function TabDisabled() {
return (
-
+
First tab
Second tab
diff --git a/docs/data/joy/components/tabs/TabDisabled.tsx b/docs/data/joy/components/tabs/TabDisabled.tsx
index c2c759e35ae056..d1695e9dc28e40 100644
--- a/docs/data/joy/components/tabs/TabDisabled.tsx
+++ b/docs/data/joy/components/tabs/TabDisabled.tsx
@@ -5,7 +5,7 @@ import Tab from '@mui/joy/Tab';
export default function TabDisabled() {
return (
-
+
First tab
Second tab
diff --git a/docs/data/joy/components/tabs/TabDisabled.tsx.preview b/docs/data/joy/components/tabs/TabDisabled.tsx.preview
index 5c90d27f5570fe..fb178b27ee297c 100644
--- a/docs/data/joy/components/tabs/TabDisabled.tsx.preview
+++ b/docs/data/joy/components/tabs/TabDisabled.tsx.preview
@@ -1,4 +1,4 @@
-
+
First tab
Second tab
diff --git a/docs/data/joy/components/tabs/TabsBasic.js b/docs/data/joy/components/tabs/TabsBasic.js
index 7700d27fd85703..85a0ba2db744b7 100644
--- a/docs/data/joy/components/tabs/TabsBasic.js
+++ b/docs/data/joy/components/tabs/TabsBasic.js
@@ -6,19 +6,19 @@ import TabPanel from '@mui/joy/TabPanel';
export default function TabsBasic() {
return (
-
+
First tab
Second tab
Third tab
-
+
First tab panel
-
+
Second tab panel
-
+
Third tab panel
diff --git a/docs/data/joy/components/tabs/TabsBasic.tsx b/docs/data/joy/components/tabs/TabsBasic.tsx
index 7700d27fd85703..85a0ba2db744b7 100644
--- a/docs/data/joy/components/tabs/TabsBasic.tsx
+++ b/docs/data/joy/components/tabs/TabsBasic.tsx
@@ -6,19 +6,19 @@ import TabPanel from '@mui/joy/TabPanel';
export default function TabsBasic() {
return (
-
+
First tab
Second tab
Third tab
-
+
First tab panel
-
+
Second tab panel
-
+
Third tab panel
diff --git a/docs/data/joy/components/tabs/TabsBasic.tsx.preview b/docs/data/joy/components/tabs/TabsBasic.tsx.preview
index 35e69f3f6771f4..088ef73b86168b 100644
--- a/docs/data/joy/components/tabs/TabsBasic.tsx.preview
+++ b/docs/data/joy/components/tabs/TabsBasic.tsx.preview
@@ -1,16 +1,16 @@
-
+
First tab
Second tab
Third tab
-
+
First tab panel
-
+
Second tab panel
-
+
Third tab panel
\ No newline at end of file
diff --git a/docs/data/joy/components/tabs/TabsBottomNavExample.js b/docs/data/joy/components/tabs/TabsBottomNavExample.js
index 1beb9df78485c7..2267777076214a 100644
--- a/docs/data/joy/components/tabs/TabsBottomNavExample.js
+++ b/docs/data/joy/components/tabs/TabsBottomNavExample.js
@@ -11,7 +11,7 @@ import Person from '@mui/icons-material/Person';
export default function TabsBottomNavExample() {
const [index, setIndex] = React.useState(0);
- const colors = ['primary', 'info', 'danger', 'success'];
+ const colors = ['primary', 'danger', 'success', 'warning'];
return (
setIndex(value)}
sx={(theme) => ({
- borderRadius: 'xl',
+ p: 1,
+ borderRadius: '24px',
maxWidth: 400,
mx: 'auto',
boxShadow: theme.shadow.sm,
- '--Tabs-gap': '8px',
'--joy-shadowChannel': theme.vars.palette[colors[index]].darkChannel,
[`& .${tabClasses.root}`]: {
- boxShadow: 'none',
- borderRadius: 'lg',
whiteSpace: 'nowrap',
transition: '0.3s',
- fontWeight: 'lg',
+ fontWeight: 'md',
flex: 1,
[`&:not(.${tabClasses.selected}):not(:hover)`]: {
opacity: 0.72,
@@ -48,10 +47,11 @@ export default function TabsBottomNavExample() {
},
})}
>
-
+
@@ -59,8 +59,9 @@ export default function TabsBottomNavExample() {
Home
@@ -68,8 +69,9 @@ export default function TabsBottomNavExample() {
Likes
@@ -77,8 +79,9 @@ export default function TabsBottomNavExample() {
Search
diff --git a/docs/data/joy/components/tabs/TabsBottomNavExample.tsx b/docs/data/joy/components/tabs/TabsBottomNavExample.tsx
index 7da14b85ed4a83..6ade044bb8a479 100644
--- a/docs/data/joy/components/tabs/TabsBottomNavExample.tsx
+++ b/docs/data/joy/components/tabs/TabsBottomNavExample.tsx
@@ -11,7 +11,7 @@ import Person from '@mui/icons-material/Person';
export default function TabsBottomNavExample() {
const [index, setIndex] = React.useState(0);
- const colors = ['primary', 'info', 'danger', 'success'] as const;
+ const colors = ['primary', 'danger', 'success', 'warning'] as const;
return (
setIndex(value as number)}
sx={(theme) => ({
- borderRadius: 'xl',
+ p: 1,
+ borderRadius: '24px',
maxWidth: 400,
mx: 'auto',
boxShadow: theme.shadow.sm,
- '--Tabs-gap': '8px',
'--joy-shadowChannel': theme.vars.palette[colors[index]].darkChannel,
[`& .${tabClasses.root}`]: {
- boxShadow: 'none',
- borderRadius: 'lg',
whiteSpace: 'nowrap',
transition: '0.3s',
- fontWeight: 'lg',
+ fontWeight: 'md',
flex: 1,
[`&:not(.${tabClasses.selected}):not(:hover)`]: {
opacity: 0.72,
@@ -48,10 +47,11 @@ export default function TabsBottomNavExample() {
},
})}
>
-
+
@@ -59,8 +59,9 @@ export default function TabsBottomNavExample() {
Home
@@ -68,8 +69,9 @@ export default function TabsBottomNavExample() {
Likes
@@ -77,8 +79,9 @@ export default function TabsBottomNavExample() {
Search
diff --git a/docs/data/joy/components/tabs/TabsBrowserExample.js b/docs/data/joy/components/tabs/TabsBrowserExample.js
new file mode 100644
index 00000000000000..5145ec35ec7713
--- /dev/null
+++ b/docs/data/joy/components/tabs/TabsBrowserExample.js
@@ -0,0 +1,157 @@
+import * as React from 'react';
+import Tabs from '@mui/joy/Tabs';
+import TabList from '@mui/joy/TabList';
+import Tab, { tabClasses } from '@mui/joy/Tab';
+import ListItemDecorator from '@mui/joy/ListItemDecorator';
+import SvgIcon from '@mui/joy/SvgIcon';
+
+export default function TabsBrowserExample() {
+ const [index, setIndex] = React.useState(0);
+ return (
+ setIndex(newValue)}
+ >
+
+
+
+
+
+ Google Search
+
+
+
+
+
+ Twitter
+
+
+
+
+
+ Dribbble
+
+
+
+
+
+ React
+
+
+
+ );
+}
+
+function GoogleIcon() {
+ return (
+
+
+
+ );
+}
+function TwitterIcon() {
+ return (
+
+
+
+ );
+}
+
+function DribbbleIcon() {
+ return (
+
+
+
+ );
+}
+
+function ReactIcon() {
+ return (
+
+
+
+ );
+}
diff --git a/docs/data/joy/components/tabs/TabsBrowserExample.tsx b/docs/data/joy/components/tabs/TabsBrowserExample.tsx
new file mode 100644
index 00000000000000..e600658cde5c6c
--- /dev/null
+++ b/docs/data/joy/components/tabs/TabsBrowserExample.tsx
@@ -0,0 +1,157 @@
+import * as React from 'react';
+import Tabs from '@mui/joy/Tabs';
+import TabList from '@mui/joy/TabList';
+import Tab, { tabClasses } from '@mui/joy/Tab';
+import ListItemDecorator from '@mui/joy/ListItemDecorator';
+import SvgIcon from '@mui/joy/SvgIcon';
+
+export default function TabsBrowserExample() {
+ const [index, setIndex] = React.useState(0);
+ return (
+ setIndex(newValue as number)}
+ >
+
+
+
+
+
+ Google Search
+
+
+
+
+
+ Twitter
+
+
+
+
+
+ Dribbble
+
+
+
+
+
+ React
+
+
+
+ );
+}
+
+function GoogleIcon() {
+ return (
+
+
+
+ );
+}
+function TwitterIcon() {
+ return (
+
+
+
+ );
+}
+
+function DribbbleIcon() {
+ return (
+
+
+
+ );
+}
+
+function ReactIcon() {
+ return (
+
+
+
+ );
+}
diff --git a/docs/data/joy/components/tabs/TabsFlex.js b/docs/data/joy/components/tabs/TabsFlex.js
new file mode 100644
index 00000000000000..b2c3b60eb41a48
--- /dev/null
+++ b/docs/data/joy/components/tabs/TabsFlex.js
@@ -0,0 +1,27 @@
+import * as React from 'react';
+import Tabs from '@mui/joy/Tabs';
+import TabList from '@mui/joy/TabList';
+import Tab from '@mui/joy/Tab';
+import Stack from '@mui/joy/Stack';
+
+export default function TabsFlex() {
+ return (
+
+
+
+ First tab
+ Example of a very long tab label
+ Third tab
+
+
+
+
+
+ First tab
+ Example of a very long tab label
+ Third tab
+
+
+
+ );
+}
diff --git a/docs/data/joy/components/tabs/TabsFlex.tsx b/docs/data/joy/components/tabs/TabsFlex.tsx
new file mode 100644
index 00000000000000..b2c3b60eb41a48
--- /dev/null
+++ b/docs/data/joy/components/tabs/TabsFlex.tsx
@@ -0,0 +1,27 @@
+import * as React from 'react';
+import Tabs from '@mui/joy/Tabs';
+import TabList from '@mui/joy/TabList';
+import Tab from '@mui/joy/Tab';
+import Stack from '@mui/joy/Stack';
+
+export default function TabsFlex() {
+ return (
+
+
+
+ First tab
+ Example of a very long tab label
+ Third tab
+
+
+
+
+
+ First tab
+ Example of a very long tab label
+ Third tab
+
+
+
+ );
+}
diff --git a/docs/data/joy/components/tabs/TabsFlex.tsx.preview b/docs/data/joy/components/tabs/TabsFlex.tsx.preview
new file mode 100644
index 00000000000000..b404f77fbb15d2
--- /dev/null
+++ b/docs/data/joy/components/tabs/TabsFlex.tsx.preview
@@ -0,0 +1,15 @@
+
+
+ First tab
+ Example of a very long tab label
+ Third tab
+
+
+
+
+
+ First tab
+ Example of a very long tab label
+ Third tab
+
+
\ No newline at end of file
diff --git a/docs/data/joy/components/tabs/TabsFlexPlacement.js b/docs/data/joy/components/tabs/TabsFlexPlacement.js
new file mode 100644
index 00000000000000..c19d65bdfdcf6b
--- /dev/null
+++ b/docs/data/joy/components/tabs/TabsFlexPlacement.js
@@ -0,0 +1,69 @@
+import * as React from 'react';
+import Box from '@mui/joy/Box';
+import FormControl from '@mui/joy/FormControl';
+import FormLabel from '@mui/joy/FormLabel';
+import Select from '@mui/joy/Select';
+import Option from '@mui/joy/Option';
+import Tabs from '@mui/joy/Tabs';
+import TabList from '@mui/joy/TabList';
+import Tab from '@mui/joy/Tab';
+import TabPanel from '@mui/joy/TabPanel';
+
+export default function TabsFlexPlacement() {
+ const [direction, setDirection] = React.useState('column');
+ const [placement, setPlacement] = React.useState('bottom');
+ return (
+
+
+ Flex direction
+ setDirection(newValue)}
+ >
+
+
+
+
+
+
+
+ Placement
+ setPlacement(newValue)}
+ >
+
+
+
+
+
+
+
+
+
+ Tab A
+
+
+ Tab B
+
+
+ Tab C
+
+
+ Content of Tab A
+ Content of Tab B
+ Content of Tab C
+
+
+ );
+}
diff --git a/docs/data/joy/components/tabs/TabsFlexPlacement.tsx b/docs/data/joy/components/tabs/TabsFlexPlacement.tsx
new file mode 100644
index 00000000000000..c773f237c5b2fc
--- /dev/null
+++ b/docs/data/joy/components/tabs/TabsFlexPlacement.tsx
@@ -0,0 +1,73 @@
+import * as React from 'react';
+import Box from '@mui/joy/Box';
+import FormControl from '@mui/joy/FormControl';
+import FormLabel from '@mui/joy/FormLabel';
+import Select from '@mui/joy/Select';
+import Option from '@mui/joy/Option';
+import Tabs from '@mui/joy/Tabs';
+import TabList from '@mui/joy/TabList';
+import Tab from '@mui/joy/Tab';
+import TabPanel from '@mui/joy/TabPanel';
+
+export default function TabsFlexPlacement() {
+ const [direction, setDirection] = React.useState<
+ 'row' | 'column' | 'row-reverse' | 'column-reverse'
+ >('column');
+ const [placement, setPlacement] = React.useState<
+ 'top' | 'bottom' | 'left' | 'right'
+ >('bottom');
+ return (
+
+
+ Flex direction
+ setDirection(newValue!)}
+ >
+
+
+
+
+
+
+
+ Placement
+ setPlacement(newValue!)}
+ >
+
+
+
+
+
+
+
+
+
+ Tab A
+
+
+ Tab B
+
+
+ Tab C
+
+
+ Content of Tab A
+ Content of Tab B
+ Content of Tab C
+
+
+ );
+}
diff --git a/docs/data/joy/components/tabs/TabsIcon.js b/docs/data/joy/components/tabs/TabsIcon.js
index 66468d48e80194..d0201996a043ac 100644
--- a/docs/data/joy/components/tabs/TabsIcon.js
+++ b/docs/data/joy/components/tabs/TabsIcon.js
@@ -8,7 +8,7 @@ import PersonPinIcon from '@mui/icons-material/PersonPin';
export default function TabsIcon() {
return (
-
+
diff --git a/docs/data/joy/components/tabs/TabsIcon.tsx b/docs/data/joy/components/tabs/TabsIcon.tsx
index 66468d48e80194..d0201996a043ac 100644
--- a/docs/data/joy/components/tabs/TabsIcon.tsx
+++ b/docs/data/joy/components/tabs/TabsIcon.tsx
@@ -8,7 +8,7 @@ import PersonPinIcon from '@mui/icons-material/PersonPin';
export default function TabsIcon() {
return (
-
+
diff --git a/docs/data/joy/components/tabs/TabsIcon.tsx.preview b/docs/data/joy/components/tabs/TabsIcon.tsx.preview
index 2ee615ae539293..5ee4abdd0e0f67 100644
--- a/docs/data/joy/components/tabs/TabsIcon.tsx.preview
+++ b/docs/data/joy/components/tabs/TabsIcon.tsx.preview
@@ -1,4 +1,4 @@
-
+
diff --git a/docs/data/joy/components/tabs/TabsIconWithText.js b/docs/data/joy/components/tabs/TabsIconWithText.js
index 1e10c2dcd06480..1b257eb4f7727b 100644
--- a/docs/data/joy/components/tabs/TabsIconWithText.js
+++ b/docs/data/joy/components/tabs/TabsIconWithText.js
@@ -3,18 +3,15 @@ import Tabs from '@mui/joy/Tabs';
import TabList from '@mui/joy/TabList';
import Tab from '@mui/joy/Tab';
import ListItemDecorator from '@mui/joy/ListItemDecorator';
+import Stack from '@mui/joy/Stack';
import PhoneIcon from '@mui/icons-material/Phone';
import FavoriteIcon from '@mui/icons-material/Favorite';
import PersonPinIcon from '@mui/icons-material/PersonPin';
export default function TabsIconWithText() {
return (
-
-
+
+
@@ -36,8 +33,8 @@ export default function TabsIconWithText() {
-
-
+
+
@@ -58,6 +55,6 @@ export default function TabsIconWithText() {
-
+
);
}
diff --git a/docs/data/joy/components/tabs/TabsIconWithText.tsx b/docs/data/joy/components/tabs/TabsIconWithText.tsx
index 1e10c2dcd06480..1b257eb4f7727b 100644
--- a/docs/data/joy/components/tabs/TabsIconWithText.tsx
+++ b/docs/data/joy/components/tabs/TabsIconWithText.tsx
@@ -3,18 +3,15 @@ import Tabs from '@mui/joy/Tabs';
import TabList from '@mui/joy/TabList';
import Tab from '@mui/joy/Tab';
import ListItemDecorator from '@mui/joy/ListItemDecorator';
+import Stack from '@mui/joy/Stack';
import PhoneIcon from '@mui/icons-material/Phone';
import FavoriteIcon from '@mui/icons-material/Favorite';
import PersonPinIcon from '@mui/icons-material/PersonPin';
export default function TabsIconWithText() {
return (
-
-
+
+
@@ -36,8 +33,8 @@ export default function TabsIconWithText() {
-
-
+
+
@@ -58,6 +55,6 @@ export default function TabsIconWithText() {
-
+
);
}
diff --git a/docs/data/joy/components/tabs/TabsIndicatorPlacement.js b/docs/data/joy/components/tabs/TabsIndicatorPlacement.js
new file mode 100644
index 00000000000000..5c6343a1f06d17
--- /dev/null
+++ b/docs/data/joy/components/tabs/TabsIndicatorPlacement.js
@@ -0,0 +1,38 @@
+import * as React from 'react';
+import Tabs from '@mui/joy/Tabs';
+import TabList from '@mui/joy/TabList';
+import Tab from '@mui/joy/Tab';
+import TabPanel from '@mui/joy/TabPanel';
+
+export default function TabsIndicatorPlacement() {
+ return (
+
+
+
+ Top
+
+
+ Right
+
+
+ Bottom
+
+
+ Left
+
+
+
+ IndicatorPlacement Top
+
+
+ IndicatorPlacement Right
+
+
+ IndicatorPlacement Bottom
+
+
+ IndicatorPlacement Left
+
+
+ );
+}
diff --git a/docs/data/joy/components/tabs/TabsIndicatorPlacement.tsx b/docs/data/joy/components/tabs/TabsIndicatorPlacement.tsx
new file mode 100644
index 00000000000000..5c6343a1f06d17
--- /dev/null
+++ b/docs/data/joy/components/tabs/TabsIndicatorPlacement.tsx
@@ -0,0 +1,38 @@
+import * as React from 'react';
+import Tabs from '@mui/joy/Tabs';
+import TabList from '@mui/joy/TabList';
+import Tab from '@mui/joy/Tab';
+import TabPanel from '@mui/joy/TabPanel';
+
+export default function TabsIndicatorPlacement() {
+ return (
+
+
+
+ Top
+
+
+ Right
+
+
+ Bottom
+
+
+ Left
+
+
+
+ IndicatorPlacement Top
+
+
+ IndicatorPlacement Right
+
+
+ IndicatorPlacement Bottom
+
+
+ IndicatorPlacement Left
+
+
+ );
+}
diff --git a/docs/data/joy/components/tabs/TabsPageExample.js b/docs/data/joy/components/tabs/TabsPageExample.js
index f9282c8e99ad35..915b48892859f3 100644
--- a/docs/data/joy/components/tabs/TabsPageExample.js
+++ b/docs/data/joy/components/tabs/TabsPageExample.js
@@ -14,7 +14,6 @@ export default function TabsPageExample() {
return (
setIndex(value)}
- sx={{ '--Tabs-gap': '0px' }}
>
-
+
Deals{' '}
-
+
Library{' '}
- Search library
+ Search library
- ({
- '--bg': theme.vars.palette.background.level3,
- height: '1px',
- background: 'var(--bg)',
- boxShadow: '0 0 0 100vmax var(--bg)',
- clipPath: 'inset(0 -100vmax)',
- })}
- />
({
'--bg': theme.vars.palette.background.surface,
background: 'var(--bg)',
boxShadow: '0 0 0 100vmax var(--bg)',
clipPath: 'inset(0 -100vmax)',
- px: 4,
- py: 2,
})}
>
@@ -109,7 +84,6 @@ export default function TabsPageExample() {
level="h2"
component="div"
fontSize="lg"
- mb={2}
textColor="text.primary"
>
Deals panel
@@ -120,7 +94,6 @@ export default function TabsPageExample() {
level="h2"
component="div"
fontSize="lg"
- mb={2}
textColor="text.primary"
>
Library panel
diff --git a/docs/data/joy/components/tabs/TabsPageExample.tsx b/docs/data/joy/components/tabs/TabsPageExample.tsx
index 6b6e2ec967e690..745afb97f0faf2 100644
--- a/docs/data/joy/components/tabs/TabsPageExample.tsx
+++ b/docs/data/joy/components/tabs/TabsPageExample.tsx
@@ -14,7 +14,6 @@ export default function TabsPageExample() {
return (
setIndex(value as number)}
- sx={{ '--Tabs-gap': '0px' }}
>
-
+
Deals{' '}
-
+
Library{' '}
- Search library
+ Search library
- ({
- '--bg': theme.vars.palette.background.level3,
- height: '1px',
- background: 'var(--bg)',
- boxShadow: '0 0 0 100vmax var(--bg)',
- clipPath: 'inset(0 -100vmax)',
- })}
- />
({
'--bg': theme.vars.palette.background.surface,
background: 'var(--bg)',
boxShadow: '0 0 0 100vmax var(--bg)',
clipPath: 'inset(0 -100vmax)',
- px: 4,
- py: 2,
})}
>
@@ -109,7 +84,6 @@ export default function TabsPageExample() {
level="h2"
component="div"
fontSize="lg"
- mb={2}
textColor="text.primary"
>
Deals panel
@@ -120,7 +94,6 @@ export default function TabsPageExample() {
level="h2"
component="div"
fontSize="lg"
- mb={2}
textColor="text.primary"
>
Library panel
diff --git a/docs/data/joy/components/tabs/TabsPricingExample.js b/docs/data/joy/components/tabs/TabsPricingExample.js
index e6a22747b00c2d..d703c2ba99df60 100644
--- a/docs/data/joy/components/tabs/TabsPricingExample.js
+++ b/docs/data/joy/components/tabs/TabsPricingExample.js
@@ -8,78 +8,72 @@ import Typography from '@mui/joy/Typography';
export default function TabsPricingExample() {
return (
({
+ sx={{
width: 343,
- '--Tabs-gap': '0px',
borderRadius: 'lg',
boxShadow: 'sm',
overflow: 'auto',
- border: `1px solid ${theme.vars.palette.divider}`,
- })}
+ }}
>
- Community
- Pro
- Premium
+
+ Community
+
+
+ Pro
+
+
+ Premium
+
-
+
Get started with the industry-standard React UI library, MIT-licensed.
-
+
$0{' '}
οΌ Free forever
-
+
Best for professional developers building enterprise or data-rich
applications.
-
+
$15{' '}
/ dev / month
-
+
The most advanced features for data-rich applications, as well as the
highest priority for support.
-
+
({
+ sx={{
width: 343,
- '--Tabs-gap': '0px',
borderRadius: 'lg',
boxShadow: 'sm',
overflow: 'auto',
- border: `1px solid ${theme.vars.palette.divider}`,
- })}
+ }}
>
- Community
- Pro
- Premium
+
+ Community
+
+
+ Pro
+
+
+ Premium
+
-
+
Get started with the industry-standard React UI library, MIT-licensed.
-
+
$0{' '}
οΌ Free forever
-
+
Best for professional developers building enterprise or data-rich
applications.
-
+
$15{' '}
/ dev / month
-
+
The most advanced features for data-rich applications, as well as the
highest priority for support.
-
+
+
+ Feature
+ Specifications
+ Review
+ Support
+
+
+ );
+}
diff --git a/docs/data/joy/components/tabs/TabsSegmentedControls.tsx b/docs/data/joy/components/tabs/TabsSegmentedControls.tsx
new file mode 100644
index 00000000000000..18e897e077a0b3
--- /dev/null
+++ b/docs/data/joy/components/tabs/TabsSegmentedControls.tsx
@@ -0,0 +1,29 @@
+import * as React from 'react';
+import Tabs from '@mui/joy/Tabs';
+import TabList from '@mui/joy/TabList';
+import Tab, { tabClasses } from '@mui/joy/Tab';
+
+export default function TabsSegmentedControls() {
+ return (
+
+
+ Feature
+ Specifications
+ Review
+ Support
+
+
+ );
+}
diff --git a/docs/data/joy/components/tabs/TabsSticky.js b/docs/data/joy/components/tabs/TabsSticky.js
new file mode 100644
index 00000000000000..108881f7d591f6
--- /dev/null
+++ b/docs/data/joy/components/tabs/TabsSticky.js
@@ -0,0 +1,45 @@
+import * as React from 'react';
+import Tabs from '@mui/joy/Tabs';
+import TabList from '@mui/joy/TabList';
+import Tab from '@mui/joy/Tab';
+
+export default function TabsSticky() {
+ const [sticky, setSticky] = React.useState('top');
+ const items = [
+
+
+ Sticky top
+
+
+ Sticky bottom
+
+ ,
+
+ {[...new Array(50)].map((_, index) => (
+ Long content
+ ))}
+ ,
+ ];
+ return (
+ setSticky(newValue)}
+ sx={{
+ p: 1,
+ maxHeight: 200,
+ overflowY: 'auto',
+ }}
+ >
+ {sticky === 'top' ? items : items.reverse()}
+
+ );
+}
diff --git a/docs/data/joy/components/tabs/TabsUnderlineExample.js b/docs/data/joy/components/tabs/TabsUnderlineExample.js
deleted file mode 100644
index 87d45d8571a5d7..00000000000000
--- a/docs/data/joy/components/tabs/TabsUnderlineExample.js
+++ /dev/null
@@ -1,38 +0,0 @@
-import * as React from 'react';
-import Tabs from '@mui/joy/Tabs';
-import TabList from '@mui/joy/TabList';
-import Tab, { tabClasses } from '@mui/joy/Tab';
-
-export default function TabsUnderlineExample() {
- return (
-
-
- Feature
- Specifications
- Review
- Support
-
-
- );
-}
diff --git a/docs/data/joy/components/tabs/TabsUnderlineExample.tsx b/docs/data/joy/components/tabs/TabsUnderlineExample.tsx
deleted file mode 100644
index 87d45d8571a5d7..00000000000000
--- a/docs/data/joy/components/tabs/TabsUnderlineExample.tsx
+++ /dev/null
@@ -1,38 +0,0 @@
-import * as React from 'react';
-import Tabs from '@mui/joy/Tabs';
-import TabList from '@mui/joy/TabList';
-import Tab, { tabClasses } from '@mui/joy/Tab';
-
-export default function TabsUnderlineExample() {
- return (
-
-
- Feature
- Specifications
- Review
- Support
-
-
- );
-}
diff --git a/docs/data/joy/components/tabs/TabsUnderlinePlacement.js b/docs/data/joy/components/tabs/TabsUnderlinePlacement.js
new file mode 100644
index 00000000000000..af19233d001416
--- /dev/null
+++ b/docs/data/joy/components/tabs/TabsUnderlinePlacement.js
@@ -0,0 +1,44 @@
+import * as React from 'react';
+import Tabs from '@mui/joy/Tabs';
+import TabList from '@mui/joy/TabList';
+import Tab from '@mui/joy/Tab';
+import TabPanel from '@mui/joy/TabPanel';
+
+export default function TabsUnderlinePlacement() {
+ const [placement, setPlacement] = React.useState('top');
+ return (
+ setPlacement(newValue)}
+ >
+
+
+ Top
+
+
+ Right
+
+
+ Bottom
+
+
+ Left
+
+
+
+ underlinePlacement Top
+
+
+ underlinePlacement Bottom
+
+
+ underlinePlacement Left
+
+
+ underlinePlacement Right
+
+
+ );
+}
diff --git a/docs/data/joy/components/tabs/TabsUnderlinePlacement.tsx b/docs/data/joy/components/tabs/TabsUnderlinePlacement.tsx
new file mode 100644
index 00000000000000..4f80f1a27f089a
--- /dev/null
+++ b/docs/data/joy/components/tabs/TabsUnderlinePlacement.tsx
@@ -0,0 +1,46 @@
+import * as React from 'react';
+import Tabs from '@mui/joy/Tabs';
+import TabList from '@mui/joy/TabList';
+import Tab from '@mui/joy/Tab';
+import TabPanel from '@mui/joy/TabPanel';
+
+export default function TabsUnderlinePlacement() {
+ const [placement, setPlacement] = React.useState<
+ 'top' | 'bottom' | 'left' | 'right'
+ >('top');
+ return (
+ setPlacement(newValue as typeof placement)}
+ >
+
+
+ Top
+
+
+ Right
+
+
+ Bottom
+
+
+ Left
+
+
+
+ underlinePlacement Top
+
+
+ underlinePlacement Bottom
+
+
+ underlinePlacement Left
+
+
+ underlinePlacement Right
+
+
+ );
+}
diff --git a/docs/data/joy/components/tabs/TabsUsage.js b/docs/data/joy/components/tabs/TabsUsage.js
index e3d13fcfbd4dd8..f70c53e0f79e08 100644
--- a/docs/data/joy/components/tabs/TabsUsage.js
+++ b/docs/data/joy/components/tabs/TabsUsage.js
@@ -3,6 +3,7 @@ import JoyUsageDemo from 'docs/src/modules/components/JoyUsageDemo';
import Tabs from '@mui/joy/Tabs';
import TabList from '@mui/joy/TabList';
import Tab from '@mui/joy/Tab';
+import TabPanel from '@mui/joy/TabPanel';
export default function TabsUsage() {
const [index, setIndex] = React.useState(0);
@@ -11,13 +12,15 @@ export default function TabsUsage() {
componentName="Tabs"
data={[
{
+ formLabel: 'Selected tab variant',
propName: 'variant',
knob: 'radio',
- defaultValue: 'outlined',
+ defaultValue: 'plain',
options: ['plain', 'outlined', 'soft', 'solid'],
codeBlockDisplay: false,
},
{
+ formLabel: 'Selected tab color',
propName: 'color',
knob: 'color',
defaultValue: 'neutral',
@@ -29,6 +32,33 @@ export default function TabsUsage() {
options: ['sm', 'md', 'lg'],
defaultValue: 'md',
},
+ {
+ propName: 'orientation',
+ knob: 'radio',
+ options: ['horizontal', 'vertical'],
+ defaultValue: 'horizontal',
+ },
+ {
+ formLabel: 'Disable TabList underline',
+ propName: 'disableUnderline',
+ knob: 'switch',
+ defaultValue: false,
+ codeBlockDisplay: false,
+ },
+ {
+ formLabel: 'Tab indicator inset',
+ propName: 'indicatorInset',
+ knob: 'switch',
+ defaultValue: false,
+ codeBlockDisplay: false,
+ },
+ {
+ formLabel: 'Disable Tab indicator',
+ propName: 'disableIndicator',
+ knob: 'switch',
+ defaultValue: false,
+ codeBlockDisplay: false,
+ },
{
propName: 'children',
defaultValue: '$children',
@@ -37,40 +67,67 @@ export default function TabsUsage() {
getCodeBlock={(code, props) =>
code.replace(
'$children',
- `
- ...
- `,
+ `
+ ...
+
+ ... `,
)
}
- renderDemo={({ size, ...props }) => (
- setIndex(value)}
- sx={{ borderRadius: 'lg' }}
- >
-
+ renderDemo={({
+ color,
+ variant,
+ disableUnderline,
+ indicatorInset,
+ disableIndicator,
+ ...props
+ }) => (
+ setIndex(value)}>
+
Tab A
Tab B
Tab C
+ Content of Tab A
+ Content of Tab B
+ Content of Tab C
)}
/>
diff --git a/docs/data/joy/components/tabs/TabsVariables.js b/docs/data/joy/components/tabs/TabsVariables.js
index 841137a764b728..a0dea65bff441e 100644
--- a/docs/data/joy/components/tabs/TabsVariables.js
+++ b/docs/data/joy/components/tabs/TabsVariables.js
@@ -12,10 +12,22 @@ export default function ListVariables() {
childrenAccepted
data={[
{
- var: '--Tabs-gap',
- defaultValue: '4px',
+ var: '--Tabs-spacing',
+ defaultValue: '16px',
helperText: "Controls TabList's gap and TabPanel's padding.",
},
+ {
+ var: '--Tab-indicatorThickness',
+ defaultValue: '2px',
+ },
+ {
+ var: '--Tab-indicatorSize',
+ defaultValue: '0px',
+ },
+ {
+ var: '--Tab-indicatorRadius',
+ defaultValue: '0px',
+ },
]}
renderDemo={(sx) => (
diff --git a/docs/data/joy/components/tabs/TabsVariants.js b/docs/data/joy/components/tabs/TabsVariants.js
index 2ece9310e8b59e..a4c1f5fa620ca6 100644
--- a/docs/data/joy/components/tabs/TabsVariants.js
+++ b/docs/data/joy/components/tabs/TabsVariants.js
@@ -12,7 +12,6 @@ export default function TabsVariants() {
aria-label="Plain tabs"
value={index}
onChange={(event, value) => setIndex(value)}
- sx={{ borderRadius: 'lg' }}
>
First tab
@@ -25,24 +24,23 @@ export default function TabsVariants() {
aria-label="Outlined tabs"
value={index}
onChange={(event, value) => setIndex(value)}
- sx={{ borderRadius: 'lg' }}
>
-
+
First tab
Second tab
Third tab
@@ -53,7 +51,6 @@ export default function TabsVariants() {
aria-label="Soft tabs"
value={index}
onChange={(event, value) => setIndex(value)}
- sx={{ borderRadius: 'lg' }}
>
setIndex(value as number)}
- sx={{ borderRadius: 'lg' }}
>
First tab
@@ -25,24 +24,23 @@ export default function TabsVariants() {
aria-label="Outlined tabs"
value={index}
onChange={(event, value) => setIndex(value as number)}
- sx={{ borderRadius: 'lg' }}
>
-
+
First tab
Second tab
Third tab
@@ -53,7 +51,6 @@ export default function TabsVariants() {
aria-label="Soft tabs"
value={index}
onChange={(event, value) => setIndex(value as number)}
- sx={{ borderRadius: 'lg' }}
>
First tab
Second tab
Third tab
-
+
First tab panel
-
+
Second tab panel
-
+
Third tab panel
diff --git a/docs/data/joy/components/tabs/TabsVertical.tsx b/docs/data/joy/components/tabs/TabsVertical.tsx
index 89f5a645637703..fb67f5d87e023c 100644
--- a/docs/data/joy/components/tabs/TabsVertical.tsx
+++ b/docs/data/joy/components/tabs/TabsVertical.tsx
@@ -9,20 +9,20 @@ export default function TabsVertical() {
First tab
Second tab
Third tab
-
+
First tab panel
-
+
Second tab panel
-
+
Third tab panel
diff --git a/docs/data/joy/components/tabs/tabs.md b/docs/data/joy/components/tabs/tabs.md
index 7e7e2f2c5cb97d..a94331fdfa2af9 100644
--- a/docs/data/joy/components/tabs/tabs.md
+++ b/docs/data/joy/components/tabs/tabs.md
@@ -80,6 +80,44 @@ Keyboard navigation (e.g. arrow keys) will adapt automatically to the used orien
{{"demo": "TabsVertical.js"}}
+### Placement
+
+To change the placement, you should provide the value of `top`, `bottom`, `left` or `right`.
+
+This prop can be applied on the TabList component to change the `underlinePlacement` as in the example:
+
+{{"demo": "TabsUnderlinePlacement.js"}}
+
+Or, it can be applied on the Tab component to change the `indicatorPlacement`:
+
+{{"demo": "TabsIndicatorPlacement.js"}}
+
+The flex direction of the Tabs component will need to be changed based on each placement.
+
+{{"demo": "TabsFlexPlacement.js"}}
+
+### Sticky
+
+For long content, you can use the `sticky="top"` prop on the TabList component to keep the tabs visible while scrolling.
+
+To stick the TabList at the bottom, use `sticky="bottom"` and render the TabList at the end of the Tabs component.
+
+{{"demo": "TabsSticky.js"}}
+
+### Tab flex
+
+Use the `tabFlex` prop on the TabList component to make the Tab elements fill the available space as shown in the example below.
+
+The first demo, `tabFlex={1}`, the Tab elements will fill the available space equally.
+
+The second demo, `tabFlex="auto`, the Tab elements will fill the available space equally, but the width of each Tab element will be based on the content.
+
+{{"demo": "TabsFlex.js"}}
+
+:::success
+The value of the `tabFlex` can be any valid [CSS flex](https://developer.mozilla.org/en-US/docs/Web/CSS/flex) value.
+:::
+
### Icon
Since `TabList` uses the same style as the [`List`](/joy-ui/react-list/) component, you can use the icon directly as a child or use `ListItemDecorator` with a text.
@@ -121,18 +159,32 @@ You can use those to customize the component on both the `sx` prop and the theme
## Common examples
-### Underlined tabs
+### Segmented controls
+
+To mimic the iOS segmented controls, add the border-radius to the `sx` prop of the TabList and set the selected Tab's background to `background.surface`.
-{{"demo": "TabsUnderlineExample.js"}}
+{{"demo": "TabsSegmentedControls.js"}}
+
+### Browser tabs
+
+In this example, the Tab's variant is set to `outlined` and the indicator is moved to the top via `indicatorPlacement="top"`. The borders of the Tab are set to `transparent` based on the selected state.
+
+{{"demo": "TabsBrowserExample.js"}}
### Pricing tabs
+This example removes the background of the selected Tab by targeting `[aria-selected="true"]` on the `sx` prop.
+
{{"demo": "TabsPricingExample.js"}}
### With counter chips
+To render tab items at the center of the TabList, use `justifyContent: 'center'` on the `sx` prop of the TabList and set `flex: initial` to each of the Tab to override the default `flex-grow`.
+
{{"demo": "TabsPageExample.js"}}
### Mobile bottom navigation
+In this example, each Tab's is applied with one of the theme's color palette when it is selected.
+
{{"demo": "TabsBottomNavExample.js"}}
diff --git a/docs/data/joy/components/textarea/TextareaDecorators.js b/docs/data/joy/components/textarea/TextareaDecorators.js
index ff8b19d5c44614..551425456cb52f 100644
--- a/docs/data/joy/components/textarea/TextareaDecorators.js
+++ b/docs/data/joy/components/textarea/TextareaDecorators.js
@@ -28,7 +28,7 @@ export default function TextareaDecorators() {
}
endDecorator={
-
+
{text.length} character(s)
}
diff --git a/docs/data/joy/components/textarea/TextareaDecorators.tsx b/docs/data/joy/components/textarea/TextareaDecorators.tsx
index 8a8fb24b285d08..a7eda4084210a0 100644
--- a/docs/data/joy/components/textarea/TextareaDecorators.tsx
+++ b/docs/data/joy/components/textarea/TextareaDecorators.tsx
@@ -28,7 +28,7 @@ export default function TextareaDecorators() {
}
endDecorator={
-
+
{text.length} character(s)
}
diff --git a/docs/data/joy/components/button-group/FigmaButtonGroup.js b/docs/data/joy/components/toggle-button-group/FigmaButtonGroup.js
similarity index 61%
rename from docs/data/joy/components/button-group/FigmaButtonGroup.js
rename to docs/data/joy/components/toggle-button-group/FigmaButtonGroup.js
index f567256020329a..aed19366770a08 100644
--- a/docs/data/joy/components/button-group/FigmaButtonGroup.js
+++ b/docs/data/joy/components/toggle-button-group/FigmaButtonGroup.js
@@ -1,6 +1,5 @@
import * as React from 'react';
-
-import ButtonGroup from '@mui/joy/ButtonGroup';
+import ToggleButtonGroup from '@mui/joy/ToggleButtonGroup';
import IconButton from '@mui/joy/IconButton';
import FormatAlignLeftIcon from '@mui/icons-material/FormatAlignLeft';
import FormatAlignCenterIcon from '@mui/icons-material/FormatAlignCenter';
@@ -8,35 +7,37 @@ import FormatAlignRightIcon from '@mui/icons-material/FormatAlignRight';
import FormatAlignJustifyIcon from '@mui/icons-material/FormatAlignJustify';
export default function FigmaButtonGroup() {
- const [index, setIndex] = React.useState(0);
- const getVariant = (itemIndex) => (itemIndex === index ? 'soft' : 'plain');
+ const [index, setIndex] = React.useState('0');
return (
- {
+ setIndex(newIndex);
+ }}
aria-label="figma button group"
sx={{
'--ButtonGroup-radius': '3px',
'--ButtonGroup-separatorSize': '0px',
'--ButtonGroup-connected': '0',
- '--joy-palette-neutral-plainHoverBg': 'transparent',
- '--joy-palette-neutral-plainActiveBg': 'transparent',
'&:hover': {
boxShadow: 'inset 0px 0px 0px 1px var(--joy-palette-neutral-softBg)',
'--ButtonGroup-connected': '1',
},
}}
>
- setIndex(0)}>
+
- setIndex(1)}>
+
- setIndex(2)}>
+
- setIndex(3)}>
+
-
+
);
}
diff --git a/docs/data/joy/components/button-group/FigmaButtonGroup.tsx b/docs/data/joy/components/toggle-button-group/FigmaButtonGroup.tsx
similarity index 59%
rename from docs/data/joy/components/button-group/FigmaButtonGroup.tsx
rename to docs/data/joy/components/toggle-button-group/FigmaButtonGroup.tsx
index 3900e80070bb15..8bff958d1afd52 100644
--- a/docs/data/joy/components/button-group/FigmaButtonGroup.tsx
+++ b/docs/data/joy/components/toggle-button-group/FigmaButtonGroup.tsx
@@ -1,6 +1,5 @@
import * as React from 'react';
-import { VariantProp } from '@mui/joy/styles';
-import ButtonGroup from '@mui/joy/ButtonGroup';
+import ToggleButtonGroup from '@mui/joy/ToggleButtonGroup';
import IconButton from '@mui/joy/IconButton';
import FormatAlignLeftIcon from '@mui/icons-material/FormatAlignLeft';
import FormatAlignCenterIcon from '@mui/icons-material/FormatAlignCenter';
@@ -8,36 +7,37 @@ import FormatAlignRightIcon from '@mui/icons-material/FormatAlignRight';
import FormatAlignJustifyIcon from '@mui/icons-material/FormatAlignJustify';
export default function FigmaButtonGroup() {
- const [index, setIndex] = React.useState(0);
- const getVariant = (itemIndex: number): VariantProp =>
- itemIndex === index ? 'soft' : 'plain';
+ const [index, setIndex] = React.useState('0');
return (
- {
+ setIndex(newIndex);
+ }}
aria-label="figma button group"
sx={{
'--ButtonGroup-radius': '3px',
'--ButtonGroup-separatorSize': '0px',
'--ButtonGroup-connected': '0',
- '--joy-palette-neutral-plainHoverBg': 'transparent',
- '--joy-palette-neutral-plainActiveBg': 'transparent',
'&:hover': {
boxShadow: 'inset 0px 0px 0px 1px var(--joy-palette-neutral-softBg)',
'--ButtonGroup-connected': '1',
},
}}
>
- setIndex(0)}>
+
- setIndex(1)}>
+
- setIndex(2)}>
+
- setIndex(3)}>
+
-
+
);
}
diff --git a/docs/data/joy/components/toggle-button-group/ToggleGroupToolbar.js b/docs/data/joy/components/toggle-button-group/ToggleGroupToolbar.js
index c24147b7fa8a4f..85d32b4ba54b15 100644
--- a/docs/data/joy/components/toggle-button-group/ToggleGroupToolbar.js
+++ b/docs/data/joy/components/toggle-button-group/ToggleGroupToolbar.js
@@ -22,7 +22,7 @@ export default function ToggleGroupToolbar() {
return (
@@ -56,7 +55,6 @@ export default function ToggleGroupToolbar() {
setFormats(newFormats);
}}
aria-label="text formatting"
- sx={{ borderRadius: 'xs' }}
>
@@ -93,7 +91,7 @@ export default function ToggleGroupToolbar() {
}
- sx={{ borderRadius: 'xs', pl: 1 }}
+ sx={{ pl: 1 }}
>
@@ -56,7 +55,6 @@ export default function ToggleGroupToolbar() {
setFormats(newFormats);
}}
aria-label="text formatting"
- sx={{ borderRadius: 'xs' }}
>
@@ -93,7 +91,7 @@ export default function ToggleGroupToolbar() {
}
- sx={{ borderRadius: 'xs', pl: 1 }}
+ sx={{ pl: 1 }}
>
` can be an object or an array
## Common examples
+### Figma-like toggle group
+
+Use the CSS variable `--ButtonGroup-connected` to control when border radius of the buttons in-between should be removed.
+
+To create a Figma-like button group where the buttons are connected when users hover on any of the buttons, set the `--ButtonGroup-connected` to `0` and change to `1` on hover.
+
+{{"demo": "FigmaButtonGroup.js"}}
+
### Editor toolbar
{{"demo": "ToggleGroupToolbar.js"}}
diff --git a/docs/data/joy/components/tooltip/GitHubTooltip.js b/docs/data/joy/components/tooltip/GitHubTooltip.js
index b05725e57e985a..93db9fa9be9145 100644
--- a/docs/data/joy/components/tooltip/GitHubTooltip.js
+++ b/docs/data/joy/components/tooltip/GitHubTooltip.js
@@ -51,7 +51,7 @@ export default function GitHubTooltip() {
bug π
-
+
package: system
diff --git a/docs/data/joy/components/tooltip/GitHubTooltip.tsx b/docs/data/joy/components/tooltip/GitHubTooltip.tsx
index b05725e57e985a..93db9fa9be9145 100644
--- a/docs/data/joy/components/tooltip/GitHubTooltip.tsx
+++ b/docs/data/joy/components/tooltip/GitHubTooltip.tsx
@@ -51,7 +51,7 @@ export default function GitHubTooltip() {
bug π
-
+
package: system
diff --git a/docs/data/joy/components/tooltip/TooltipColors.js b/docs/data/joy/components/tooltip/TooltipColors.js
index b00c58b6c3e7e8..f1308af17d6499 100644
--- a/docs/data/joy/components/tooltip/TooltipColors.js
+++ b/docs/data/joy/components/tooltip/TooltipColors.js
@@ -39,11 +39,6 @@ export default function TooltipColors() {
Danger
-
-
- Info
-
-
Success
@@ -64,7 +59,7 @@ export default function TooltipColors() {
}}
>
-
-
- Info
-
-
Success
@@ -65,7 +60,7 @@ export default function TooltipColors() {
}}
>
}
sx={{ alignItems: 'flex-start', maxWidth: 240, wordBreak: 'break-all' }}
>
@@ -54,6 +55,32 @@ export default function DecoratorExamples() {
>
Simple alert using only Typography.
+
+
+
+
+ }
+ >
+ +8.2%{' '}
+
+ Since last month
+
+
);
}
diff --git a/docs/data/joy/components/typography/DecoratorExamples.tsx b/docs/data/joy/components/typography/DecoratorExamples.tsx
index 59349e07f4b955..cb5523cd99aee8 100644
--- a/docs/data/joy/components/typography/DecoratorExamples.tsx
+++ b/docs/data/joy/components/typography/DecoratorExamples.tsx
@@ -1,6 +1,7 @@
import * as React from 'react';
import Box from '@mui/joy/Box';
import Typography from '@mui/joy/Typography';
+import SvgIcon from '@mui/joy/SvgIcon';
import InfoOutlined from '@mui/icons-material/InfoOutlined';
export default function DecoratorExamples() {
@@ -38,7 +39,7 @@ export default function DecoratorExamples() {
}
sx={{ alignItems: 'flex-start', maxWidth: 240, wordBreak: 'break-all' }}
>
@@ -54,6 +55,32 @@ export default function DecoratorExamples() {
>
Simple alert using only Typography.
+
+
+
+
+ }
+ >
+ +8.2%{' '}
+
+ Since last month
+
+
);
}
diff --git a/docs/data/joy/components/typography/NestedTypography.js b/docs/data/joy/components/typography/NestedTypography.js
index 0a7b7d5f079525..66a2a28d97baaa 100644
--- a/docs/data/joy/components/typography/NestedTypography.js
+++ b/docs/data/joy/components/typography/NestedTypography.js
@@ -3,14 +3,14 @@ import Typography from '@mui/joy/Typography';
export default function NestedTypography() {
return (
-
+
Typography lets you create nested {' '}
typography. Use your{' '}
imagination
{' '}
to build wonderful{' '}
-
+
user interface
.
diff --git a/docs/data/joy/components/typography/NestedTypography.tsx b/docs/data/joy/components/typography/NestedTypography.tsx
index 0a7b7d5f079525..66a2a28d97baaa 100644
--- a/docs/data/joy/components/typography/NestedTypography.tsx
+++ b/docs/data/joy/components/typography/NestedTypography.tsx
@@ -3,14 +3,14 @@ import Typography from '@mui/joy/Typography';
export default function NestedTypography() {
return (
-
+
Typography lets you create nested {' '}
typography. Use your{' '}
imagination
{' '}
to build wonderful{' '}
-
+
user interface
.
diff --git a/docs/data/joy/components/typography/NestedTypography.tsx.preview b/docs/data/joy/components/typography/NestedTypography.tsx.preview
index 61e81c7af933fa..343d01ace9a2ef 100644
--- a/docs/data/joy/components/typography/NestedTypography.tsx.preview
+++ b/docs/data/joy/components/typography/NestedTypography.tsx.preview
@@ -1,11 +1,11 @@
-
+
Typography lets you create nested {' '}
typography. Use your{' '}
imagination
{' '}
to build wonderful{' '}
-
+
user interface
.
diff --git a/docs/data/joy/components/typography/TypographyBasics.js b/docs/data/joy/components/typography/TypographyBasics.js
index 9c8abb0cbc09f7..6214b906dc416f 100644
--- a/docs/data/joy/components/typography/TypographyBasics.js
+++ b/docs/data/joy/components/typography/TypographyBasics.js
@@ -9,7 +9,7 @@ export default function TypographyBasics() {
Yosemite National Park
-
+
Yosemite National Park is a national park spanning 747,956 acres (1,169.4 sq
mi; 3,025.2 km2) in the western Sierra Nevada of Central California.
diff --git a/docs/data/joy/components/typography/TypographyBasics.tsx b/docs/data/joy/components/typography/TypographyBasics.tsx
index 9c8abb0cbc09f7..6214b906dc416f 100644
--- a/docs/data/joy/components/typography/TypographyBasics.tsx
+++ b/docs/data/joy/components/typography/TypographyBasics.tsx
@@ -9,7 +9,7 @@ export default function TypographyBasics() {
Yosemite National Park
-
+
Yosemite National Park is a national park spanning 747,956 acres (1,169.4 sq
mi; 3,025.2 km2) in the western Sierra Nevada of Central California.
diff --git a/docs/data/joy/components/typography/TypographyBasics.tsx.preview b/docs/data/joy/components/typography/TypographyBasics.tsx.preview
index 9b6e680a26a9c9..ddfba5465a4feb 100644
--- a/docs/data/joy/components/typography/TypographyBasics.tsx.preview
+++ b/docs/data/joy/components/typography/TypographyBasics.tsx.preview
@@ -3,7 +3,7 @@
Yosemite National Park
-
+
Yosemite National Park is a national park spanning 747,956 acres (1,169.4 sq
mi; 3,025.2 km2) in the western Sierra Nevada of Central California.
diff --git a/docs/data/joy/components/typography/TypographyDecorators.js b/docs/data/joy/components/typography/TypographyDecorators.js
index dca2ee5951faa7..09becd1a80501e 100644
--- a/docs/data/joy/components/typography/TypographyDecorators.js
+++ b/docs/data/joy/components/typography/TypographyDecorators.js
@@ -11,8 +11,12 @@ export default function TypographyDecorators() {
The icon automatically adjusts to the scale
123}
+ level="body-lg"
+ endDecorator={
+
+ 123
+
+ }
justifyContent="center"
>
The display also changes to flexbox
diff --git a/docs/data/joy/components/typography/TypographyDecorators.tsx b/docs/data/joy/components/typography/TypographyDecorators.tsx
index dca2ee5951faa7..09becd1a80501e 100644
--- a/docs/data/joy/components/typography/TypographyDecorators.tsx
+++ b/docs/data/joy/components/typography/TypographyDecorators.tsx
@@ -11,8 +11,12 @@ export default function TypographyDecorators() {
The icon automatically adjusts to the scale
123}
+ level="body-lg"
+ endDecorator={
+
+ 123
+
+ }
justifyContent="center"
>
The display also changes to flexbox
diff --git a/docs/data/joy/components/typography/TypographyDecorators.tsx.preview b/docs/data/joy/components/typography/TypographyDecorators.tsx.preview
index fa93c255685d67..02e8b085475628 100644
--- a/docs/data/joy/components/typography/TypographyDecorators.tsx.preview
+++ b/docs/data/joy/components/typography/TypographyDecorators.tsx.preview
@@ -2,8 +2,12 @@
The icon automatically adjusts to the scale
123}
+ level="body-lg"
+ endDecorator={
+
+ 123
+
+ }
justifyContent="center"
>
The display also changes to flexbox
diff --git a/docs/data/joy/components/typography/TypographyHeadline.js b/docs/data/joy/components/typography/TypographyHeadline.js
new file mode 100644
index 00000000000000..25c07a87422706
--- /dev/null
+++ b/docs/data/joy/components/typography/TypographyHeadline.js
@@ -0,0 +1,14 @@
+import * as React from 'react';
+import Stack from '@mui/joy/Stack';
+import Typography from '@mui/joy/Typography';
+
+export default function TypographyHeadline() {
+ return (
+
+ h1: Lorem ipsum
+ h2: What is Lorem Ipsum?
+ h3: The standard Lorem Ipsum passage.
+ h4: The smallest headline of the page
+
+ );
+}
diff --git a/docs/data/joy/components/typography/TypographyHeadline.tsx b/docs/data/joy/components/typography/TypographyHeadline.tsx
new file mode 100644
index 00000000000000..25c07a87422706
--- /dev/null
+++ b/docs/data/joy/components/typography/TypographyHeadline.tsx
@@ -0,0 +1,14 @@
+import * as React from 'react';
+import Stack from '@mui/joy/Stack';
+import Typography from '@mui/joy/Typography';
+
+export default function TypographyHeadline() {
+ return (
+
+ h1: Lorem ipsum
+ h2: What is Lorem Ipsum?
+ h3: The standard Lorem Ipsum passage.
+ h4: The smallest headline of the page
+
+ );
+}
diff --git a/docs/data/joy/components/typography/TypographyHeadline.tsx.preview b/docs/data/joy/components/typography/TypographyHeadline.tsx.preview
new file mode 100644
index 00000000000000..cbaeb2d97ba7a1
--- /dev/null
+++ b/docs/data/joy/components/typography/TypographyHeadline.tsx.preview
@@ -0,0 +1,4 @@
+h1: Lorem ipsum
+h2: What is Lorem Ipsum?
+h3: The standard Lorem Ipsum passage.
+h4: The smallest headline of the page
\ No newline at end of file
diff --git a/docs/data/joy/components/typography/TypographyScales.js b/docs/data/joy/components/typography/TypographyScales.js
index a960c001abf808..c940c87b1fef38 100644
--- a/docs/data/joy/components/typography/TypographyScales.js
+++ b/docs/data/joy/components/typography/TypographyScales.js
@@ -5,19 +5,17 @@ import Typography from '@mui/joy/Typography';
export default function TypographyScales() {
return (
- display1
- display2
h1
h2
h3
h4
- h5
- h6
- body1
- body2
- body3
- body4
- body5
+ title-lg
+ title-md
+ title-sm
+ body-lg
+ body-md
+ body-sm
+ body-xs
);
}
diff --git a/docs/data/joy/components/typography/TypographyScales.tsx b/docs/data/joy/components/typography/TypographyScales.tsx
index a960c001abf808..c940c87b1fef38 100644
--- a/docs/data/joy/components/typography/TypographyScales.tsx
+++ b/docs/data/joy/components/typography/TypographyScales.tsx
@@ -5,19 +5,17 @@ import Typography from '@mui/joy/Typography';
export default function TypographyScales() {
return (
- display1
- display2
h1
h2
h3
h4
- h5
- h6
- body1
- body2
- body3
- body4
- body5
+ title-lg
+ title-md
+ title-sm
+ body-lg
+ body-md
+ body-sm
+ body-xs
);
}
diff --git a/docs/data/joy/components/typography/TypographyScales.tsx.preview b/docs/data/joy/components/typography/TypographyScales.tsx.preview
index da843f05cfcc2b..efc38823f1f567 100644
--- a/docs/data/joy/components/typography/TypographyScales.tsx.preview
+++ b/docs/data/joy/components/typography/TypographyScales.tsx.preview
@@ -1,13 +1,11 @@
-display1
-display2
h1
h2
h3
h4
-h5
-h6
-body1
-body2
-body3
-body4
-body5
\ No newline at end of file
+title-lg
+title-md
+title-sm
+body-lg
+body-md
+body-sm
+body-xs
\ No newline at end of file
diff --git a/docs/data/joy/components/typography/TypographyTitleBody.js b/docs/data/joy/components/typography/TypographyTitleBody.js
new file mode 100644
index 00000000000000..6691a54d0d2b98
--- /dev/null
+++ b/docs/data/joy/components/typography/TypographyTitleBody.js
@@ -0,0 +1,160 @@
+import * as React from 'react';
+import Stack from '@mui/joy/Stack';
+import Typography from '@mui/joy/Typography';
+import SvgIcon from '@mui/joy/SvgIcon';
+
+export default function TypographyTitleBody() {
+ return (
+
+
+
+
+
+
+
+ title-lg: Title of the component
+
+
+ body-lg: This is the description of the component that contain
+ some information of it.
+
+
+
+
+
+
+
+
+
+
+ title-lg: Title of the component
+
+
+ body-md: This is the description of the component that contain
+ some information of it.
+
+
+
+
+
+
+
+
+
+
+ title-lg: Title of the component
+
+
+ body-md: This is the description of the component that contain
+ some information of it.
+
+
+ body-sm: Metadata, e.g. a date.
+
+
+
+
+
+
+
+
+
+
+ title-md: Title of the component
+
+
+ body-md: This is the description of the component that contain
+ some information of it.
+
+
+ body-sm: Metadata, e.g. a date.
+
+
+
+
+
+
+
+
+
+
+ title-sm: Title of the component
+
+
+ body-sm: This is the description of the component that contain
+ some information of it.
+
+
+ body-xs: Metadata, e.g. a date.
+
+
+
+
+ );
+}
diff --git a/docs/data/joy/components/typography/TypographyTitleBody.tsx b/docs/data/joy/components/typography/TypographyTitleBody.tsx
new file mode 100644
index 00000000000000..6691a54d0d2b98
--- /dev/null
+++ b/docs/data/joy/components/typography/TypographyTitleBody.tsx
@@ -0,0 +1,160 @@
+import * as React from 'react';
+import Stack from '@mui/joy/Stack';
+import Typography from '@mui/joy/Typography';
+import SvgIcon from '@mui/joy/SvgIcon';
+
+export default function TypographyTitleBody() {
+ return (
+
+
+
+
+
+
+
+ title-lg: Title of the component
+
+
+ body-lg: This is the description of the component that contain
+ some information of it.
+
+
+
+
+
+
+
+
+
+
+ title-lg: Title of the component
+
+
+ body-md: This is the description of the component that contain
+ some information of it.
+
+
+
+
+
+
+
+
+
+
+ title-lg: Title of the component
+
+
+ body-md: This is the description of the component that contain
+ some information of it.
+
+
+ body-sm: Metadata, e.g. a date.
+
+
+
+
+
+
+
+
+
+
+ title-md: Title of the component
+
+
+ body-md: This is the description of the component that contain
+ some information of it.
+
+
+ body-sm: Metadata, e.g. a date.
+
+
+
+
+
+
+
+
+
+
+ title-sm: Title of the component
+
+
+ body-sm: This is the description of the component that contain
+ some information of it.
+
+
+ body-xs: Metadata, e.g. a date.
+
+
+
+
+ );
+}
diff --git a/docs/data/joy/components/typography/TypographyUsage.js b/docs/data/joy/components/typography/TypographyUsage.js
index 04faf3e7f3ebe2..4e22f8a4643c0b 100644
--- a/docs/data/joy/components/typography/TypographyUsage.js
+++ b/docs/data/joy/components/typography/TypographyUsage.js
@@ -1,7 +1,7 @@
import * as React from 'react';
import JoyUsageDemo from 'docs/src/modules/components/JoyUsageDemo';
+import Box from '@mui/joy/Box';
import Typography from '@mui/joy/Typography';
-import { Box } from '@mui/joy';
export default function TypographyUsages() {
return (
@@ -13,30 +13,28 @@ export default function TypographyUsages() {
knob: 'select',
defaultValue: 'h1',
options: [
- 'display1',
- 'display2',
'h1',
'h2',
'h3',
'h4',
- 'h5',
- 'h6',
- 'body1',
- 'body2',
- 'body3',
+ 'title-lg',
+ 'title-md',
+ 'title-sm',
+ 'body-lg',
+ 'body-md',
+ 'body-sm',
+ 'body-xs',
],
},
{
propName: 'color',
knob: 'color',
- defaultValue: 'neutral',
},
{
propName: 'variant',
knob: 'radio',
- defaultValue: 'plain',
options: ['plain', 'outlined', 'soft', 'solid'],
},
diff --git a/docs/data/joy/components/typography/typography.md b/docs/data/joy/components/typography/typography.md
index 4407bb54e0bc74..f7b976e9fdffc6 100644
--- a/docs/data/joy/components/typography/typography.md
+++ b/docs/data/joy/components/typography/typography.md
@@ -25,6 +25,26 @@ The Typography component wraps around its content, and displays text with specif
{{"demo": "TypographyBasics.js"}}
+### Heading
+
+Use `h1` through `h4` to render a headline. The produced HTML element will match the semantic [headings](https://www.w3.org/WAI/tutorials/page-structure/headings/) of the page structure.
+
+{{"demo": "TypographyHeadline.js"}}
+
+:::info
+The `h5` and `h6` levels are not provided by default given that they are not commonly used. However, you can add them by [customizing the theme's typography](#typography-scale).
+:::
+
+### Title and body
+
+The `title-*` and `body-*` are commonly used in components.
+
+We recommend to combine the title and body with the same or lower size when using them together. For example, `title-lg` and `body-lg` or `title-md` and `body-sm`.
+
+Each level are designed to fit perfectly with the same size of the `SvgIcon` component.
+
+{{"demo": "TypographyTitleBody.js"}}
+
### Nested Typography
The Typography component renders as a `` by default.
@@ -56,11 +76,11 @@ Note that the `color` prop is an exception, it refers to the palette instead of
### Levels
The `level` prop gives access to a pre-defined scale of typographic values defined in the theme.
-These values include various heading levels (h1, h2, h3, etc.) as well as body text levels (body1, body2, etc) and can be used to apply consistent typography throughout your application.
+These values include various heading levels (h1, h2, h3, etc.) as well as body text levels (body-md, body-sm, etc) and can be used to apply consistent typography throughout your application.
Additionally, you can also use the level prop to control the font size, weight, line height, and other typographic properties.
:::warning
-Keep in mind that each level renders a specific HTML tag (e.g. "h1" renders as an `
` element, "body1" renders as a `
`, etc.)
+Keep in mind that each level renders a specific HTML tag (e.g. "h1" renders as an `
` element, "body-md" renders as a `
`, etc.)
:::
{{"demo": "TypographyScales.js"}}
@@ -87,19 +107,16 @@ const theme = extendTheme({
JoyTypography: {
defaultProps: {
levelMapping: {
- display1: 'h1',
- display2: 'h1',
h1: 'h2',
h2: 'h2',
h3: 'h3',
h4: 'h3',
- h5: 'h3',
- h6: 'h3',
- body1: 'p',
- body2: 'span',
- body3: 'span',
- body4: 'span',
- body5: 'span',
+ 'title-lg': 'p',
+ 'title-md': 'p',
+ 'title-sm': 'p',
+ 'body-md': 'p',
+ 'body-sm': 'p',
+ 'body-xs': 'span',
},
},
},
@@ -171,11 +188,13 @@ extendTheme({
h2: undefined,
h3: undefined,
h4: undefined,
- h5: undefined,
- h6: undefined,
- body1: undefined,
- body2: undefined,
- body3: undefined,
+ 'title-lg': undefined,
+ 'title-md': undefined,
+ 'title-sm': undefined,
+ 'body-lg': undefined,
+ 'body-md': undefined,
+ 'body-sm': undefined,
+ 'body-xs': undefined,
// ...your scale
},
});
@@ -187,19 +206,17 @@ When using TypeScript, be sure to also remove the built-in typography tokens fro
// in your theme or index file
declare module '@mui/joy/styles' {
interface TypographySystemOverrides {
- display1: false;
- display2: false;
h1: false;
h2: false;
h3: false;
h4: false;
- h5: false;
- h6: false;
- body1: false;
- body2: false;
- body3: false;
- body4: false;
- body5: false;
+ 'title-lg': false;
+ 'title-md': false;
+ 'title-sm': false;
+ 'body-lg': false;
+ 'body-md': false;
+ 'body-sm': false;
+ 'body-xs': false;
}
}
```
@@ -221,12 +238,12 @@ Here are some factors to ensure that your Typography components are accessible:
## Anatomy
-The Typography component is composed of a single root `
` that's assigned the `body1` class, unless these defaults are overridden by the [`level`](#levels) and/or [`component`](#semantic-elements) props.
+The Typography component is composed of a single root `
` that's assigned the `body-md` class, unless these defaults are overridden by the [`level`](#levels) and/or [`component`](#semantic-elements) props.
When one Typography component is nested within another, the nested component renders as a `` (unless customized as described above).
```html
-
+
diff --git a/docs/data/joy/customization/approaches/ButtonThemes.js b/docs/data/joy/customization/approaches/ButtonThemes.js
index 557886454eb1d2..added9f2c7e51a 100644
--- a/docs/data/joy/customization/approaches/ButtonThemes.js
+++ b/docs/data/joy/customization/approaches/ButtonThemes.js
@@ -475,29 +475,30 @@ export default function ButtonThemes() {
const [design, setDesign] = React.useState('github');
return (
-
-
-
+
+
)}
-
+
+ Change the theme:
+ setDesign(newValue)}
+ sx={{ minWidth: 160 }}
>
- Change the theme:
- setDesign(newValue)}
- sx={{ minWidth: 160 }}
- >
-
-
-
-
-
-
+
+
+
+
+
- {
-
-
+
+
-
- }
-
-
+ copyButtonHidden
+ language="jsx"
+ sx={{
+ display: { xs: 'none', md: 'block' },
+ maxHeight: '40vh',
+ overflow: 'auto',
+ borderRadius: '7px',
+ }}
+ />
+
+
);
}
diff --git a/docs/data/joy/customization/approaches/SxProp.js b/docs/data/joy/customization/approaches/SxProp.js
index a7340c50d1e3f3..206eeef9c72c5f 100644
--- a/docs/data/joy/customization/approaches/SxProp.js
+++ b/docs/data/joy/customization/approaches/SxProp.js
@@ -6,10 +6,13 @@ export default function SxProp() {
({
- background: `linear-gradient(-45deg, ${theme.vars.palette.primary[800]}, ${theme.vars.palette.primary[500]})`,
+ background: `linear-gradient(-45deg, ${theme.vars.palette.primary[700]}, ${theme.vars.palette.primary[600]})`,
+ boxShadow: 'inset 0px 2px 2px rgba(255, 255, 255, 0.3)',
+ borderRadius: 'md',
fontWeight: 'lg', // short-hand syntax, same as `theme.fontWeight.lg`
'&:hover': {
- background: `linear-gradient(-45deg, ${theme.vars.palette.primary[900]}, ${theme.vars.palette.primary[600]})`,
+ background: `${theme.vars.palette.primary[700]}`,
+ boxShadow: 'inset 0px 0px 4px rgba(0, 0, 0, 0.3)',
},
})}
>
diff --git a/docs/data/joy/customization/dark-mode/ModeToggle.js b/docs/data/joy/customization/dark-mode/ModeToggle.js
index 4dc8c6265e4e28..6ee407eb56777a 100644
--- a/docs/data/joy/customization/dark-mode/ModeToggle.js
+++ b/docs/data/joy/customization/dark-mode/ModeToggle.js
@@ -19,7 +19,7 @@ function ModeSwitcher() {
}
return (
setMode(mode === 'dark' ? 'light' : 'dark')}
>
@@ -58,7 +58,6 @@ export default function ModeToggle() {
p: 2,
m: -3,
borderRadius: [0, 'sm'],
- bgcolor: 'background.body',
}}
>
diff --git a/docs/data/joy/customization/dark-mode/ModeToggle.tsx b/docs/data/joy/customization/dark-mode/ModeToggle.tsx
index 3a675df09b94ef..fd9b1c5e784ceb 100644
--- a/docs/data/joy/customization/dark-mode/ModeToggle.tsx
+++ b/docs/data/joy/customization/dark-mode/ModeToggle.tsx
@@ -19,7 +19,7 @@ function ModeSwitcher() {
}
return (
setMode(mode === 'dark' ? 'light' : 'dark')}
>
@@ -58,7 +58,6 @@ export default function ModeToggle() {
p: 2,
m: -3,
borderRadius: [0, 'sm'],
- bgcolor: 'background.body',
}}
>
diff --git a/docs/data/joy/customization/theme-colors/BootstrapVariantTokens.js b/docs/data/joy/customization/theme-colors/BootstrapVariantTokens.js
index 2af206753e475c..ff9050cd92e05c 100644
--- a/docs/data/joy/customization/theme-colors/BootstrapVariantTokens.js
+++ b/docs/data/joy/customization/theme-colors/BootstrapVariantTokens.js
@@ -130,7 +130,6 @@ export default function BootstrapVariantTokens() {
Success
Danger
Warning
- Info
Light
diff --git a/docs/data/joy/customization/theme-colors/PaletteThemeViewer.js b/docs/data/joy/customization/theme-colors/PaletteThemeViewer.js
index a4f377986e0c74..85d5ee93348c32 100644
--- a/docs/data/joy/customization/theme-colors/PaletteThemeViewer.js
+++ b/docs/data/joy/customization/theme-colors/PaletteThemeViewer.js
@@ -121,7 +121,7 @@ export default function PaletteThemeViewer() {
zIndex: 1,
}}
>
- }>
+ }>
Copied
@@ -203,7 +203,6 @@ export default function PaletteThemeViewer() {
fontSize="xs"
startDecorator={renderSwatch('light', token)}
fontFamily="code"
- letterSpacing="sm"
textAlign="left"
sx={{ alignItems: 'flex-start', cursor: 'copy' }}
onClick={() => copy(light[token])}
@@ -219,7 +218,6 @@ export default function PaletteThemeViewer() {
fontSize="xs"
startDecorator={renderSwatch('dark', token)}
fontFamily="code"
- letterSpacing="sm"
textAlign="left"
sx={{ alignItems: 'flex-start', cursor: 'copy' }}
onClick={() => copy(dark[token])}
diff --git a/docs/data/joy/customization/theme-colors/PaletteThemeViewer.tsx b/docs/data/joy/customization/theme-colors/PaletteThemeViewer.tsx
index 41c21655936455..3ed93780fd4a41 100644
--- a/docs/data/joy/customization/theme-colors/PaletteThemeViewer.tsx
+++ b/docs/data/joy/customization/theme-colors/PaletteThemeViewer.tsx
@@ -120,7 +120,7 @@ export default function PaletteThemeViewer() {
zIndex: 1,
}}
>
- }>
+ }>
Copied
@@ -202,7 +202,6 @@ export default function PaletteThemeViewer() {
fontSize="xs"
startDecorator={renderSwatch('light', token)}
fontFamily="code"
- letterSpacing="sm"
textAlign="left"
sx={{ alignItems: 'flex-start', cursor: 'copy' }}
onClick={() => copy(light[token])}
@@ -218,7 +217,6 @@ export default function PaletteThemeViewer() {
fontSize="xs"
startDecorator={renderSwatch('dark', token)}
fontFamily="code"
- letterSpacing="sm"
textAlign="left"
sx={{ alignItems: 'flex-start', cursor: 'copy' }}
onClick={() => copy(dark[token])}
diff --git a/docs/data/joy/customization/theme-shadow/ShadowThemeViewer.js b/docs/data/joy/customization/theme-shadow/ShadowThemeViewer.js
index c8b02dea01246c..979230c710f208 100644
--- a/docs/data/joy/customization/theme-shadow/ShadowThemeViewer.js
+++ b/docs/data/joy/customization/theme-shadow/ShadowThemeViewer.js
@@ -76,7 +76,7 @@ export default function ShadowThemeViewer() {
zIndex: 1,
}}
>
- }>
+ }>
Copied
@@ -115,7 +115,6 @@ export default function ShadowThemeViewer() {
textAlign="left"
fontSize="xs"
fontFamily="code"
- letterSpacing="sm"
onClick={() => copy(token)}
>
{formatShadowLayers(defaultTheme.shadow[token])}
diff --git a/docs/data/joy/customization/theme-shadow/ShadowThemeViewer.tsx b/docs/data/joy/customization/theme-shadow/ShadowThemeViewer.tsx
index 6a60bfa0d76ba5..62b85a8b72c4f9 100644
--- a/docs/data/joy/customization/theme-shadow/ShadowThemeViewer.tsx
+++ b/docs/data/joy/customization/theme-shadow/ShadowThemeViewer.tsx
@@ -76,7 +76,7 @@ export default function ShadowThemeViewer() {
zIndex: 1,
}}
>
- }>
+ }>
Copied
@@ -115,7 +115,6 @@ export default function ShadowThemeViewer() {
textAlign="left"
fontSize="xs"
fontFamily="code"
- letterSpacing="sm"
onClick={() => copy(token)}
>
{formatShadowLayers(defaultTheme.shadow[token])}
diff --git a/docs/data/joy/customization/theme-typography/CustomTypographyLevel.js b/docs/data/joy/customization/theme-typography/CustomTypographyLevel.js
index 5306f1fd3c6433..f1ba6d0a0550b1 100644
--- a/docs/data/joy/customization/theme-typography/CustomTypographyLevel.js
+++ b/docs/data/joy/customization/theme-typography/CustomTypographyLevel.js
@@ -4,7 +4,7 @@ import Box from '@mui/joy/Box';
const customTheme = extendTheme({
typography: {
- display1: {
+ h1: {
// `--joy` is the default CSS variable prefix.
// If you have a custom prefix, you have to use it instead.
// For more details about the custom prefix, go to https://mui.com/joy-ui/customization/using-css-variables/#custom-prefix
@@ -20,7 +20,7 @@ const customTheme = extendTheme({
export default function CustomTypographyLevel() {
return (
- theme.typography.display1}>Gradient text
+ theme.typography.h1}>Gradient text
);
}
diff --git a/docs/data/joy/customization/theme-typography/CustomTypographyLevel.tsx b/docs/data/joy/customization/theme-typography/CustomTypographyLevel.tsx
index 5306f1fd3c6433..f1ba6d0a0550b1 100644
--- a/docs/data/joy/customization/theme-typography/CustomTypographyLevel.tsx
+++ b/docs/data/joy/customization/theme-typography/CustomTypographyLevel.tsx
@@ -4,7 +4,7 @@ import Box from '@mui/joy/Box';
const customTheme = extendTheme({
typography: {
- display1: {
+ h1: {
// `--joy` is the default CSS variable prefix.
// If you have a custom prefix, you have to use it instead.
// For more details about the custom prefix, go to https://mui.com/joy-ui/customization/using-css-variables/#custom-prefix
@@ -20,7 +20,7 @@ const customTheme = extendTheme({
export default function CustomTypographyLevel() {
return (
- theme.typography.display1}>Gradient text
+ theme.typography.h1}>Gradient text
);
}
diff --git a/docs/data/joy/customization/theme-typography/CustomTypographyLevel.tsx.preview b/docs/data/joy/customization/theme-typography/CustomTypographyLevel.tsx.preview
index 8efdd6c11eff6a..3c0983c203e2a0 100644
--- a/docs/data/joy/customization/theme-typography/CustomTypographyLevel.tsx.preview
+++ b/docs/data/joy/customization/theme-typography/CustomTypographyLevel.tsx.preview
@@ -1,3 +1,3 @@
- theme.typography.display1}>Gradient text
+ theme.typography.h1}>Gradient text
\ No newline at end of file
diff --git a/docs/data/joy/customization/theme-typography/NewTypographyLevel.js b/docs/data/joy/customization/theme-typography/NewTypographyLevel.js
index 24e2b3cae7ce02..582e3933229aab 100644
--- a/docs/data/joy/customization/theme-typography/NewTypographyLevel.js
+++ b/docs/data/joy/customization/theme-typography/NewTypographyLevel.js
@@ -6,10 +6,11 @@ import Typography from '@mui/joy/Typography';
const customTheme = extendTheme({
typography: {
kbd: {
- backgroundColor: 'var(--joy-palette-background-surface)',
+ background:
+ 'linear-gradient(to top, var(--joy-palette-background-level2), var(--joy-palette-background-surface))',
border: '1px solid var(--joy-palette-neutral-outlinedBorder)',
borderRadius: 'var(--joy-radius-xs)',
- boxShadow: '0 2px 0px 0px var(--joy-palette-background-level3)',
+ boxShadow: 'var(--joy-shadow-sm)',
padding: '0.125em 0.375em',
},
},
diff --git a/docs/data/joy/customization/theme-typography/TypographyThemeViewer.js b/docs/data/joy/customization/theme-typography/TypographyThemeViewer.js
index ee50a0b5e286a8..5476857f6aa878 100644
--- a/docs/data/joy/customization/theme-typography/TypographyThemeViewer.js
+++ b/docs/data/joy/customization/theme-typography/TypographyThemeViewer.js
@@ -90,11 +90,6 @@ export default function TypographyThemeViewer() {
Line height
-
-
- Letter spacing
-
-
@@ -146,7 +141,6 @@ export default function TypographyThemeViewer() {
{defaultTheme.typography[level].color || '-'}
@@ -170,14 +164,13 @@ export default function TypographyThemeViewer() {
{defaultTheme.typography[level].fontSize || '-'}
- {['fontWeight', 'lineHeight', 'letterSpacing'].map((field) => (
+ {['fontWeight', 'lineHeight'].map((field) => (
diff --git a/docs/data/joy/customization/theme-typography/TypographyThemeViewer.tsx b/docs/data/joy/customization/theme-typography/TypographyThemeViewer.tsx
index adecfe200def30..2f561fba32f8a0 100644
--- a/docs/data/joy/customization/theme-typography/TypographyThemeViewer.tsx
+++ b/docs/data/joy/customization/theme-typography/TypographyThemeViewer.tsx
@@ -91,11 +91,6 @@ export default function TypographyThemeViewer() {
Line height
-
-
- Letter spacing
-
-
@@ -147,7 +142,6 @@ export default function TypographyThemeViewer() {
{defaultTheme.typography[level].color || '-'}
@@ -171,42 +165,38 @@ export default function TypographyThemeViewer() {
{defaultTheme.typography[level].fontSize || '-'}
- {(['fontWeight', 'lineHeight', 'letterSpacing'] as const).map(
- (field) => (
-
- )[
- extractFromVar(
- defaultTheme.typography[level][field] as string,
- field,
- )
- ] || ''
- }
- sx={{ pointerEvents: 'none' }}
+ {(['fontWeight', 'lineHeight'] as const).map((field) => (
+
+ )[
+ extractFromVar(
+ defaultTheme.typography[level][field] as string,
+ field,
+ )
+ ] || ''
+ }
+ sx={{ pointerEvents: 'none' }}
+ >
+
-
- {defaultTheme.typography[level][field] || '-'}
-
-
-
- ),
- )}
+ {defaultTheme.typography[level][field] || '-'}
+
+
+
+ ))}
))}
diff --git a/docs/data/joy/customization/theme-typography/theme-typography.md b/docs/data/joy/customization/theme-typography/theme-typography.md
index f566c5ec3fa8e8..cf8a8aaa5f06f3 100644
--- a/docs/data/joy/customization/theme-typography/theme-typography.md
+++ b/docs/data/joy/customization/theme-typography/theme-typography.md
@@ -8,7 +8,7 @@ Joy UI includes a typography system within the theme to help you create consiste
The default system consists of 13 built-in levels:
-- `body1` - the baseline typography for the application, used as the default configuration in the [Typography](/joy-ui/react-typography/) and [CssBaseline](/joy-ui/react-css-baseline/) components.
+- `body-md` - the baseline typography for the application, used as the default configuration in the [Typography](/joy-ui/react-typography/) and [CssBaseline](/joy-ui/react-css-baseline/) components.
- `body2` through `body5` - can be used for secondary and tertiary information.
- The `h1` to `h6` levels follow the semantic HTML headings.
- The `display1` and `display2` usually appear as taglines for marketing and landing pages.
@@ -40,10 +40,8 @@ Use `undefined` as a value to remove any unneeded levels:
```js
const customTheme = extendTheme({
typography: {
- h5: undefined,
- h6: undefined,
- body4: undefined,
- body5: undefined,
+ 'title-sm': undefined,
+ 'title-xs': undefined,
},
});
```
@@ -54,10 +52,8 @@ For TypeScript, you must augment the theme structure to exclude the default leve
// You can put this to any file that's included in your tsconfig
declare module '@mui/joy/styles' {
interface TypographySystemOverrides {
- h5: false;
- h6: false;
- body4: false;
- body5: false;
+ 'title-sm': false;
+ 'title-xs': false;
}
}
```
@@ -87,8 +83,8 @@ There are several ways that you can use the theme typography in your application
- [Typography](/joy-ui/react-typography/) component: use the `level` prop to change between theme typography levels:
```jsx
- // use the `theme.typography.body2` styles
- Secondary info
+ // use the `theme.typography['body-sm']` styles
+ Secondary info
```
- [CSS Baseline](/joy-ui/react-css-baseline/) component: by default, it applies the `body1` level to the global stylesheet:
@@ -96,15 +92,15 @@ There are several ways that you can use the theme typography in your application
```jsx
- // inherits the `theme.typography.body1` styles
+ // inherits the `theme.typography['body-md']` styles
Hello World
```
- [`sx`](/joy-ui/customization/approaches/#sx-prop) prop: use `typography: $level` to get the specific theme typography level:
```jsx
- // to apply the `theme.typography.body2` styles:
- Small text
+ // to apply the `theme.typography['body-sm']` styles:
+ Small text
```
- [`styled`](/joy-ui/customization/approaches/#reusable-component): create a custom component and apply the style from `theme.typography.*` directly:
@@ -113,7 +109,7 @@ There are several ways that you can use the theme typography in your application
import { styled } from '@mui/joy/styles';
const Tag = styled('span')((theme) => ({
- ...theme.typography.body2,
+ ...theme.typography['body-sm'],
color: 'inherit',
borderRadius: theme.vars.radius.xs,
boxShadow: theme.vars.shadow.sm,
diff --git a/docs/data/joy/getting-started/installation/installation.md b/docs/data/joy/getting-started/installation/installation.md
index 9bbd95c1e44877..b88b8f76572a7d 100644
--- a/docs/data/joy/getting-started/installation/installation.md
+++ b/docs/data/joy/getting-started/installation/installation.md
@@ -32,20 +32,19 @@ Please note that [react](https://www.npmjs.com/package/react) and [react-dom](ht
},
```
-## Public Sans font
+## Inter font
-Joy UI is designed to use the [Public Sans](https://fonts.google.com/specimen/Public+Sans)
+Joy UI is designed to use the [Inter](https://fonts.google.com/specimen/Inter)
font by default.
You may add it to your project with npm via [Fontsource](https://fontsource.org/), or with the Google Fonts CDN.
-
```bash npm
-npm install @fontsource/public-sans
+npm install @fontsource/inter
```
```bash yarn
-yarn add @fontsource/public-sans
+yarn add @fontsource/inter
```
```bash pnpm
@@ -57,16 +56,18 @@ yarn add @fontsource/public-sans
Then you can import it in your entry point like this:
```tsx
-import '@fontsource/public-sans';
+import '@fontsource/inter';
```
### Google Web Fonts
-To install the Public Sans font in your project using the Google Web Fonts CDN, add the following code snippet inside your project's ` ` tag:
+To install the Inter font in your project using the Google Web Fonts CDN, add the following code snippet inside your project's ` ` tag:
```html
+
+
```
diff --git a/docs/data/joy/getting-started/templates/TemplateCollection.js b/docs/data/joy/getting-started/templates/TemplateCollection.js
index 2e3b27cb5140f9..60966f7d820c29 100644
--- a/docs/data/joy/getting-started/templates/TemplateCollection.js
+++ b/docs/data/joy/getting-started/templates/TemplateCollection.js
@@ -263,7 +263,7 @@ export default function TemplateCollection() {
}}
>
{author && (
-
+
Built by{' '}
β’
-
+
Designed by{' '}
{
if (mode === 'light') {
setMode('dark');
@@ -55,7 +54,7 @@ function ColorSchemeToggle() {
export default function EmailExample() {
const [drawerOpen, setDrawerOpen] = React.useState(false);
return (
-
+
{drawerOpen && (
setDrawerOpen(false)}>
@@ -89,7 +88,7 @@ export default function EmailExample() {
@@ -100,12 +99,13 @@ export default function EmailExample() {
}
endDecorator={
-
-
- /
+
+
+ β + k
}
@@ -115,21 +115,23 @@ export default function EmailExample() {
xs: 'none',
sm: 'flex',
},
+ boxShadow: 'sm',
}}
/>
+
@@ -140,8 +142,8 @@ export default function EmailExample() {
control={
@@ -180,30 +182,17 @@ export default function EmailExample() {
justifyContent: 'space-between',
}}
>
-
+
Unread
-
+
You've read all messages in your inbox.
@@ -217,23 +206,10 @@ export default function EmailExample() {
justifyContent: 'space-between',
}}
>
-
+
Everything else
-
+
diff --git a/docs/data/joy/getting-started/templates/email/components/EmailContent.tsx b/docs/data/joy/getting-started/templates/email/components/EmailContent.tsx
index 32824c5aa5c430..8f2d8c62d6936c 100644
--- a/docs/data/joy/getting-started/templates/email/components/EmailContent.tsx
+++ b/docs/data/joy/getting-started/templates/email/components/EmailContent.tsx
@@ -43,10 +43,10 @@ export default function EmailContent() {
sx={{ borderRadius: 'sm' }}
/>
-
+
Alex Jonnold
-
+
21 Oct 2022
@@ -54,13 +54,13 @@ export default function EmailContent() {
-
+
Reply
-
+
-
+
@@ -69,7 +69,7 @@ export default function EmailContent() {
-
+
Details for our Yosemite Park hike
From
- {}}>
+ {}}>
alex.jonnold@hike.com
to
- {}}>
+ {}}>
steve@mail.com
-
+
Hello, my friend!
@@ -133,7 +133,7 @@ export default function EmailContent() {
See you soon, Alex Jonnold
-
+
Attachments
-
-
+
+
videos-hike.zip
- 100 MB
+ 100 MB
diff --git a/docs/data/joy/getting-started/templates/email/components/Mails.tsx b/docs/data/joy/getting-started/templates/email/components/Mails.tsx
index 5653e768f7e606..9647d9d190c65c 100644
--- a/docs/data/joy/getting-started/templates/email/components/Mails.tsx
+++ b/docs/data/joy/getting-started/templates/email/components/Mails.tsx
@@ -42,7 +42,7 @@ export default function EmailList() {
@@ -61,14 +61,14 @@ export default function EmailList() {
mb: 0.5,
}}
>
- {item.name}
-
+ {item.name}
+
{item.date}
{item.title}
- {item.body}
+ {item.body}
diff --git a/docs/data/joy/getting-started/templates/email/components/Navigation.tsx b/docs/data/joy/getting-started/templates/email/components/Navigation.tsx
index d32f3f0838cbbc..b0122d2d2cb575 100644
--- a/docs/data/joy/getting-started/templates/email/components/Navigation.tsx
+++ b/docs/data/joy/getting-started/templates/email/components/Navigation.tsx
@@ -22,12 +22,7 @@ export default function EmailNav() {
Browse
-
+
@@ -38,8 +33,8 @@ export default function EmailNav() {
}}
>
-
-
+
+
Inbox
@@ -47,7 +42,7 @@ export default function EmailNav() {
-
+
Sent
@@ -55,7 +50,7 @@ export default function EmailNav() {
-
+
Draft
@@ -63,7 +58,7 @@ export default function EmailNav() {
-
+
Flagged
@@ -71,7 +66,7 @@ export default function EmailNav() {
-
+
Trash
@@ -82,12 +77,7 @@ export default function EmailNav() {
Tags
-
+
@@ -137,7 +127,7 @@ export default function EmailNav() {
width: '10px',
height: '10px',
borderRadius: '99px',
- bgcolor: 'warning.200',
+ bgcolor: 'warning.300',
}}
/>
diff --git a/docs/data/joy/getting-started/templates/email/theme.tsx b/docs/data/joy/getting-started/templates/email/theme.tsx
deleted file mode 100644
index 02de5b0186517d..00000000000000
--- a/docs/data/joy/getting-started/templates/email/theme.tsx
+++ /dev/null
@@ -1,25 +0,0 @@
-import { extendTheme } from '@mui/joy/styles';
-
-export default extendTheme({
- colorSchemes: {
- light: {
- palette: {
- background: {
- body: 'var(--joy-palette-neutral-50)',
- },
- },
- },
- dark: {
- palette: {
- background: {
- body: 'var(--joy-palette-common-black)',
- surface: 'var(--joy-palette-neutral-900)',
- },
- },
- },
- },
- fontFamily: {
- // display: "'Inter', var(--joy-fontFamily-fallback)",
- // body: "'Inter', var(--joy-fontFamily-fallback)",
- },
-});
diff --git a/docs/data/joy/getting-started/templates/files/App.tsx b/docs/data/joy/getting-started/templates/files/App.tsx
index 0505f1b19298e2..366cbb893f489e 100644
--- a/docs/data/joy/getting-started/templates/files/App.tsx
+++ b/docs/data/joy/getting-started/templates/files/App.tsx
@@ -15,6 +15,10 @@ import Input from '@mui/joy/Input';
import IconButton from '@mui/joy/IconButton';
import Divider from '@mui/joy/Divider';
import Sheet from '@mui/joy/Sheet';
+import Table from '@mui/joy/Table';
+import Tabs from '@mui/joy/Tabs';
+import TabList from '@mui/joy/TabList';
+import Tab from '@mui/joy/Tab';
import List from '@mui/joy/List';
import ListItem from '@mui/joy/ListItem';
import ListItemButton from '@mui/joy/ListItemButton';
@@ -33,7 +37,6 @@ import CloseIcon from '@mui/icons-material/Close';
import BookRoundedIcon from '@mui/icons-material/BookRounded';
// custom
-import filesTheme from './theme';
import Menu from './components/Menu';
import Layout from './components/Layout';
import Navigation from './components/Navigation';
@@ -45,14 +48,14 @@ function ColorSchemeToggle() {
setMounted(true);
}, []);
if (!mounted) {
- return ;
+ return ;
}
return (
{
if (mode === 'light') {
setMode('dark');
@@ -69,7 +72,7 @@ function ColorSchemeToggle() {
export default function FilesExample() {
const [drawerOpen, setDrawerOpen] = React.useState(false);
return (
-
+
{drawerOpen && (
setDrawerOpen(false)}>
@@ -108,7 +111,7 @@ export default function FilesExample() {
@@ -119,12 +122,13 @@ export default function FilesExample() {
}
endDecorator={
-
- /
+
+ β + k
}
@@ -134,21 +138,23 @@ export default function FilesExample() {
xs: 'none',
sm: 'flex',
},
+ boxShadow: 'sm',
}}
/>
+
@@ -159,8 +165,8 @@ export default function FilesExample() {
control={
@@ -178,8 +184,8 @@ export default function FilesExample() {
{
label: 'Files',
active: true,
- href: '/joy-ui/getting-started/templates/files/',
'aria-current': 'page',
+ href: '/joy-ui/getting-started/templates/files/',
},
]}
/>
@@ -199,102 +205,107 @@ export default function FilesExample() {
>
*': {
- p: 2,
- '&:nth-child(n):not(:nth-last-child(-n+4))': {
- borderBottom: '1px solid',
- borderColor: 'divider',
- },
- },
- }}
+ sx={{ borderRadius: 'sm', gridColumn: '1/-1' }}
>
-
- Folder name
-
-
- Date modified
-
-
- Size
-
-
- Users
-
-
- }
- sx={{ alignItems: 'flex-start' }}
- >
- Travel pictures
-
- 21 October 2011, 3PM
-
- 987.5MB
-
-
-
-
-
-
-
-
-
- }
- sx={{ alignItems: 'flex-start' }}
+
- Important documents
-
- 26 May 2010, 7PM
-
- 123.3KB
-
-
-
-
-
-
-
-
-
+
+
+ Folder name
+ Date modified
+ Size
+ Users
+
+
+
+
+
+ }
+ sx={{ alignItems: 'flex-start' }}
+ >
+ Travel pictures
+
+
+ 21 October 2011, 3PM
+
+
+ 987.5MB
+
+
+
+
+
+
+
+
+
+
+
+
+
+ }
+ sx={{ alignItems: 'flex-start' }}
+ >
+ Important documents
+
+
+ 26 May 2010, 7PM
+
+
+ 123.3KB
+
+
+
+
+
+
+
+
+
+
+
+
+
+
}
sx={{ alignItems: 'flex-start' }}
>
Travel pictures
-
+
987.5MB
@@ -369,7 +380,7 @@ export default function FilesExample() {
/>
- 21 October 2011, 3PM
+ 21 October 2011, 3PM
@@ -386,13 +397,13 @@ export default function FilesExample() {
}}
>
}
sx={{ alignItems: 'flex-start' }}
>
Important documents
-
+
123.3KB
@@ -429,7 +440,7 @@ export default function FilesExample() {
/>
- 26 May 2010, 7PM
+ 26 May 2010, 7PM
@@ -465,7 +476,7 @@ export default function FilesExample() {
photos-travel.zip
-
+
Added 25 May 2011
@@ -475,6 +486,8 @@ export default function FilesExample() {
theme.vars.radius.sm,
boxShadow: 'none',
@@ -501,16 +514,12 @@ export default function FilesExample() {
}}
>
- torres-del-paine.png
-
+ torres-del-paine.png
+
Added 5 Aug 2016
-
+
@@ -544,7 +553,7 @@ export default function FilesExample() {
platform_ios.zip
-
+
Added 26 May 2011
@@ -569,27 +578,16 @@ export default function FilesExample() {
-
-
- Details
-
-
- Activity
-
-
+
+
+
+ Details
+
+
+ Activity
+
+
+
-
+
Shared with
@@ -629,38 +627,38 @@ export default function FilesExample() {
'& > *:nth-child(odd)': { color: 'text.secondary' },
}}
>
- Type
-
+ Type
+
Image
- Size
-
+ Size
+
3,6 MB (3,258,385 bytes)
- Storage used
-
+ Storage used
+
3,6 MB (3,258,385 bytes)
- Location
-
+ Location
+
Travel pictures
- Owner
-
+ Owner
+
Michael Scott
- Modified
-
+ Modified
+
26 October 2016
- Created
-
+ Created
+
5 August 2016
diff --git a/docs/data/joy/getting-started/templates/files/components/Navigation.tsx b/docs/data/joy/getting-started/templates/files/components/Navigation.tsx
index bfecd94035107f..2295a88ec3cb54 100644
--- a/docs/data/joy/getting-started/templates/files/components/Navigation.tsx
+++ b/docs/data/joy/getting-started/templates/files/components/Navigation.tsx
@@ -36,8 +36,8 @@ export default function Navigation() {
}}
>
-
-
+
+
My files
diff --git a/docs/data/joy/getting-started/templates/files/theme.tsx b/docs/data/joy/getting-started/templates/files/theme.tsx
deleted file mode 100644
index 02de5b0186517d..00000000000000
--- a/docs/data/joy/getting-started/templates/files/theme.tsx
+++ /dev/null
@@ -1,25 +0,0 @@
-import { extendTheme } from '@mui/joy/styles';
-
-export default extendTheme({
- colorSchemes: {
- light: {
- palette: {
- background: {
- body: 'var(--joy-palette-neutral-50)',
- },
- },
- },
- dark: {
- palette: {
- background: {
- body: 'var(--joy-palette-common-black)',
- surface: 'var(--joy-palette-neutral-900)',
- },
- },
- },
- },
- fontFamily: {
- // display: "'Inter', var(--joy-fontFamily-fallback)",
- // body: "'Inter', var(--joy-fontFamily-fallback)",
- },
-});
diff --git a/docs/data/joy/getting-started/templates/framesx-web-blocks/blocks/HeroLeft01.tsx b/docs/data/joy/getting-started/templates/framesx-web-blocks/blocks/HeroLeft01.tsx
index 8a4b02aaea2301..7d9c8539d0979c 100644
--- a/docs/data/joy/getting-started/templates/framesx-web-blocks/blocks/HeroLeft01.tsx
+++ b/docs/data/joy/getting-started/templates/framesx-web-blocks/blocks/HeroLeft01.tsx
@@ -31,7 +31,7 @@ export default function HeroLeft01() {
-
+
The new version is out.
-
+
This is where a notification message will appear.
Enter text into this container.
@@ -40,7 +40,7 @@ export default function HeroLeft07() {
Download the App
+
({
'[data-feather], .feather': {
- color: 'var(--Icon-color)',
+ color: `var(--Icon-color, ${theme.vars.palette.text.icon})`,
margin: 'var(--Icon-margin)',
- fontSize: 'var(--Icon-fontSize, 20px)',
+ fontSize: `var(--Icon-fontSize, ${theme.vars.fontSize.xl})`,
width: '1em',
height: '1em',
},
- }}
+ })}
/>
diff --git a/docs/data/joy/getting-started/templates/messages/components/ChatBubble.tsx b/docs/data/joy/getting-started/templates/messages/components/ChatBubble.tsx
index e53b3cb44543be..53afcfbf33a804 100644
--- a/docs/data/joy/getting-started/templates/messages/components/ChatBubble.tsx
+++ b/docs/data/joy/getting-started/templates/messages/components/ChatBubble.tsx
@@ -32,10 +32,10 @@ export default function ChatBubble({
spacing={2}
sx={{ mb: 0.25 }}
>
-
+
{sender === 'You' ? sender : sender.name}
- {timestamp}
+ {timestamp}
{attachment ? (
{attachment.fileName}
- {attachment.size}
+ {attachment.size}
diff --git a/docs/data/joy/getting-started/templates/messages/components/ChatListItem.tsx b/docs/data/joy/getting-started/templates/messages/components/ChatListItem.tsx
index 2a5afdbe8f2f2c..fd7ab359b1bdb3 100644
--- a/docs/data/joy/getting-started/templates/messages/components/ChatListItem.tsx
+++ b/docs/data/joy/getting-started/templates/messages/components/ChatListItem.tsx
@@ -36,7 +36,6 @@ export default function ChatListItem({
setSelectedChat({ id, sender, messages });
}}
selected={selected}
- variant={selected ? 'soft' : 'plain'}
color="neutral"
sx={{
flexDirection: 'column',
@@ -51,10 +50,14 @@ export default function ChatListItem({
{sender.name}
- {sender.username}
+ {sender.username}
-
+
5 mins ago
{messages[0].unread && (
@@ -63,7 +66,7 @@ export default function ChatListItem({
{sender.name}
- {sender.username}
+
+ {sender.username}
diff --git a/docs/data/joy/getting-started/templates/messages/components/MyMessages.tsx b/docs/data/joy/getting-started/templates/messages/components/MyMessages.tsx
index 28d996bed53ed0..b984a8e4dbf7e5 100644
--- a/docs/data/joy/getting-started/templates/messages/components/MyMessages.tsx
+++ b/docs/data/joy/getting-started/templates/messages/components/MyMessages.tsx
@@ -10,7 +10,6 @@ export default function MyProfile() {
return (
({
- color: theme.vars.palette.text.tertiary,
-}));
-
export default function Sidebar() {
return (
Home
-
+
@@ -116,7 +111,7 @@ export default function Sidebar() {
Dashboard
-
+
@@ -125,7 +120,7 @@ export default function Sidebar() {
Projects
-
+
@@ -134,7 +129,7 @@ export default function Sidebar() {
Tasks
-
+
@@ -143,7 +138,7 @@ export default function Sidebar() {
Reporting
-
+
@@ -156,7 +151,7 @@ export default function Sidebar() {
-
+
View all
@@ -203,7 +198,7 @@ export default function Sidebar() {
Used space
-
+
Your team has used 80% of your available space. Need more?
@@ -223,7 +218,7 @@ export default function Sidebar() {
Steve E.
- @steveEberger
+ @steveEberger
diff --git a/docs/data/joy/getting-started/templates/messages/theme.ts b/docs/data/joy/getting-started/templates/messages/theme.ts
deleted file mode 100644
index c63a488573e1f3..00000000000000
--- a/docs/data/joy/getting-started/templates/messages/theme.ts
+++ /dev/null
@@ -1,66 +0,0 @@
-import { extendTheme } from '@mui/joy/styles';
-
-export default extendTheme({
- colorSchemes: {
- light: {
- palette: {
- background: {
- body: 'var(--joy-palette-neutral-50)',
- },
- },
- },
- dark: {
- palette: {
- neutral: {
- outlinedBorder: 'var(--joy-palette-neutral-700)',
- },
- },
- },
- },
- components: {
- JoyAutocomplete: {
- styleOverrides: {
- root: {
- boxShadow: 'var(--joy-shadow-xs)',
- },
- },
- },
- JoyButton: {
- styleOverrides: {
- root: {
- boxShadow: 'var(--joy-shadow-xs)',
- },
- },
- },
- JoyInput: {
- styleOverrides: {
- root: {
- boxShadow: 'var(--joy-shadow-xs)',
- },
- },
- },
- JoyTextarea: {
- styleOverrides: {
- root: {
- boxShadow: 'var(--joy-shadow-xs)',
- },
- },
- },
- JoySelect: {
- styleOverrides: {
- root: {
- boxShadow: 'var(--joy-shadow-xs)',
- },
- },
- },
- JoyStack: {
- defaultProps: {
- useFlexGap: true,
- },
- },
- },
- fontFamily: {
- display: "'Inter', var(--joy-fontFamily-fallback)",
- body: "'Inter', var(--joy-fontFamily-fallback)",
- },
-});
diff --git a/docs/data/joy/getting-started/templates/order-dashboard/App.tsx b/docs/data/joy/getting-started/templates/order-dashboard/App.tsx
index e5d92e90b20782..45afc87d7319fe 100644
--- a/docs/data/joy/getting-started/templates/order-dashboard/App.tsx
+++ b/docs/data/joy/getting-started/templates/order-dashboard/App.tsx
@@ -13,7 +13,6 @@ import SecondSidebar from './components/SecondSidebar';
import OrderTable from './components/OrderTable';
import Header from './components/Header';
import ColorSchemeToggle from './components/ColorSchemeToggle';
-import customTheme from './theme';
const useEnhancedEffect =
typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;
@@ -31,17 +30,17 @@ export default function JoyOrderDashboardTemplate() {
}, [status]);
return (
-
+
({
'[data-feather], .feather': {
- color: 'var(--Icon-color)',
+ color: `var(--Icon-color, ${theme.vars.palette.text.icon})`,
margin: 'var(--Icon-margin)',
- fontSize: 'var(--Icon-fontSize, 20px)',
+ fontSize: `var(--Icon-fontSize, ${theme.vars.fontSize.xl})`,
width: '1em',
height: '1em',
},
- }}
+ })}
/>
@@ -104,7 +103,7 @@ export default function JoyOrderDashboardTemplate() {
>
Dashboard
-
+
Orders
diff --git a/docs/data/joy/getting-started/templates/order-dashboard/components/FirstSidebar.tsx b/docs/data/joy/getting-started/templates/order-dashboard/components/FirstSidebar.tsx
index a2c908a6e3c448..4b7564f2ef7d7d 100644
--- a/docs/data/joy/getting-started/templates/order-dashboard/components/FirstSidebar.tsx
+++ b/docs/data/joy/getting-started/templates/order-dashboard/components/FirstSidebar.tsx
@@ -13,8 +13,8 @@ export default function FirstSidebar() {
return (
Status
@@ -184,14 +185,14 @@ export default function OrderTable() {
Category
-
+
Customer
-
+
@@ -211,7 +212,7 @@ export default function OrderTable() {
}}
>
}
sx={{ flexGrow: 1 }}
@@ -261,7 +262,11 @@ export default function OrderTable() {
>
Search for order
- } />
+ }
+ />
{renderFilters()}
@@ -287,6 +292,7 @@ export default function OrderTable() {
'--Table-headerUnderlineThickness': '1px',
'--TableRow-hoverBackground': (theme) =>
theme.vars.palette.background.level1,
+ '--TableCell-paddingY': '12px',
}}
>
@@ -386,12 +392,15 @@ export default function OrderTable() {
{row.customer.name}
- {row.customer.email}
+
+ {row.customer.email}
+
@@ -426,7 +435,7 @@ export default function OrderTable() {
>
-
+
Page 1 of 10
-
+
@@ -131,10 +130,10 @@ export default function SecondSidebar() {
-
+
Olivia Ryhe
- olivia@email.com
+ olivia@email.com
diff --git a/docs/data/joy/getting-started/templates/order-dashboard/theme.ts b/docs/data/joy/getting-started/templates/order-dashboard/theme.ts
deleted file mode 100644
index 4742b97f2f8147..00000000000000
--- a/docs/data/joy/getting-started/templates/order-dashboard/theme.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-import { extendTheme } from '@mui/joy/styles';
-
-export default extendTheme({
- fontFamily: {
- display: "'Inter', var(--joy-fontFamily-fallback)",
- body: "'Inter', var(--joy-fontFamily-fallback)",
- },
-});
diff --git a/docs/data/joy/getting-started/templates/profile-dashboard/App.tsx b/docs/data/joy/getting-started/templates/profile-dashboard/App.tsx
index 09f6735546a8ad..5fd4e480cf58c0 100644
--- a/docs/data/joy/getting-started/templates/profile-dashboard/App.tsx
+++ b/docs/data/joy/getting-started/templates/profile-dashboard/App.tsx
@@ -4,7 +4,6 @@ import GlobalStyles from '@mui/joy/GlobalStyles';
import CssBaseline from '@mui/joy/CssBaseline';
import Box from '@mui/joy/Box';
import useScript from './useScript';
-import customTheme from './theme';
import Sidebar from './components/Sidebar';
import Header from './components/Header';
import MyProfile from './components/MyProfile';
@@ -25,17 +24,17 @@ export default function JoyOrderDashboardTemplate() {
}, [status]);
return (
-
+
({
'[data-feather], .feather': {
- color: 'var(--Icon-color)',
+ color: `var(--Icon-color, ${theme.vars.palette.text.icon})`,
margin: 'var(--Icon-margin)',
- fontSize: 'var(--Icon-fontSize, 20px)',
+ fontSize: `var(--Icon-fontSize, ${theme.vars.fontSize.xl})`,
width: '1em',
height: '1em',
},
- }}
+ })}
/>
diff --git a/docs/data/joy/getting-started/templates/profile-dashboard/components/DropZone.tsx b/docs/data/joy/getting-started/templates/profile-dashboard/components/DropZone.tsx
index c9cd575dcb32b4..b08ee630ebe9c5 100644
--- a/docs/data/joy/getting-started/templates/profile-dashboard/components/DropZone.tsx
+++ b/docs/data/joy/getting-started/templates/profile-dashboard/components/DropZone.tsx
@@ -38,7 +38,7 @@ export default function DropZone({ sx, ...props }: CardProps) {
-
+
Click to upload
{' '}
diff --git a/docs/data/joy/getting-started/templates/profile-dashboard/components/FileUpload.tsx b/docs/data/joy/getting-started/templates/profile-dashboard/components/FileUpload.tsx
index 46fdf696e3eeaa..7f50326288d249 100644
--- a/docs/data/joy/getting-started/templates/profile-dashboard/components/FileUpload.tsx
+++ b/docs/data/joy/getting-started/templates/profile-dashboard/components/FileUpload.tsx
@@ -50,7 +50,7 @@ export default function FileUpload({
{fileName}
- {fileSize}
+ {fileSize}
My profile
-
+
({
- '--List-padding': '0px',
- '--ListItem-minHeight': 'var(--Tab-height)',
'--Chip-minHeight': '20px',
- '--_TabList-bg': theme.vars.palette.background.body,
- backgroundColor: 'var(--_TabList-bg)',
- boxShadow: `inset 0 -1px 0 0 ${theme.vars.palette.divider}`,
- position: 'sticky',
+ '--ListItem-minHeight': '48px',
top: 'calc(-1 * (var(--main-paddingTop, 0px) - var(--Header-height, 0px)))',
zIndex: 10,
width: '100%',
overflow: 'auto hidden',
alignSelf: 'flex-start',
- borderRadius: 0,
scrollSnapType: 'inline',
'&::after': {
pointerEvents: 'none',
@@ -90,7 +76,7 @@ export default function MyProfile() {
zIndex: 1,
right: 0,
borderBottom: '1px solid transparent',
- background: `linear-gradient(to left, var(--_TabList-bg), rgb(0 0 0 / 0))`,
+ background: `linear-gradient(to left, ${theme.vars.palette.background.body}, rgb(0 0 0 / 0))`,
backgroundClip: 'content-box',
},
'&::-webkit-scrollbar': {
@@ -98,51 +84,51 @@ export default function MyProfile() {
display: 'none',
},
[`& .${tabClasses.root}`]: {
+ '--focus-outline-offset': '-2px',
'&:first-of-type': {
ml: 'calc(-1 * var(--ListItem-paddingX))',
},
scrollSnapAlign: 'start',
bgcolor: 'transparent',
- boxShadow: 'none',
flex: 'none',
'&:hover': {
bgcolor: 'transparent',
},
[`&.${tabClasses.selected}`]: {
color: 'primary.plainColor',
- '&:before': {
- content: '""',
- display: 'block',
- position: 'absolute',
- zIndex: 1,
- bottom: 0,
- left: 'var(--ListItem-paddingLeft)',
- right: 'var(--ListItem-paddingRight)',
- height: '2px',
- bgcolor: 'primary.500',
- },
+ bgcolor: 'transparent',
[`& .${chipClasses.root}`]: theme.variants.solid.primary,
},
},
})}
>
- Account settings
-
+
+ Account settings
+
+
Team{' '}
2
- Plan
-
+
+ Plan
+
+
Billing{' '}
4
- Notifications
- Integrations
- API
+
+ Notifications
+
+
+ Integrations
+
+
+ API
+
-
+
);
}
diff --git a/docs/data/joy/getting-started/templates/profile-dashboard/components/Sidebar.tsx b/docs/data/joy/getting-started/templates/profile-dashboard/components/Sidebar.tsx
index 6451c22b4e493c..faa78e1cb2bfbf 100644
--- a/docs/data/joy/getting-started/templates/profile-dashboard/components/Sidebar.tsx
+++ b/docs/data/joy/getting-started/templates/profile-dashboard/components/Sidebar.tsx
@@ -72,7 +72,7 @@ export default function Sidebar() {
left: 0,
width: '100vw',
height: '100vh',
- bgcolor: 'background.body',
+
opacity: 'calc(var(--SideNavigation-slideIn, 0) - 0.2)',
transition: 'opacity 0.4s',
transform: {
@@ -159,7 +159,7 @@ export default function Sidebar() {
-
+
My Profile
@@ -206,7 +206,7 @@ export default function Sidebar() {
Used space
-
+
Your team has used 80% of your available space. Need more?
@@ -227,7 +227,7 @@ export default function Sidebar() {
Siriwat K.
- siriwatk@test.com
+ siriwatk@test.com
diff --git a/docs/data/joy/getting-started/templates/profile-dashboard/theme.ts b/docs/data/joy/getting-started/templates/profile-dashboard/theme.ts
deleted file mode 100644
index d58b38d2e5f4fc..00000000000000
--- a/docs/data/joy/getting-started/templates/profile-dashboard/theme.ts
+++ /dev/null
@@ -1,61 +0,0 @@
-import { extendTheme } from '@mui/joy/styles';
-
-export default extendTheme({
- colorSchemes: {
- light: {
- palette: {
- background: {
- body: 'var(--joy-palette-neutral-50)',
- },
- },
- },
- dark: {
- palette: {
- neutral: {
- outlinedBorder: 'var(--joy-palette-neutral-700)',
- },
- },
- },
- },
- components: {
- JoyAutocomplete: {
- styleOverrides: {
- root: {
- boxShadow: 'var(--joy-shadow-xs)',
- },
- },
- },
- JoyButton: {
- styleOverrides: {
- root: {
- boxShadow: 'var(--joy-shadow-xs)',
- },
- },
- },
- JoyInput: {
- styleOverrides: {
- root: {
- boxShadow: 'var(--joy-shadow-xs)',
- },
- },
- },
- JoyTextarea: {
- styleOverrides: {
- root: {
- boxShadow: 'var(--joy-shadow-xs)',
- },
- },
- },
- JoySelect: {
- styleOverrides: {
- root: {
- boxShadow: 'var(--joy-shadow-xs)',
- },
- },
- },
- },
- fontFamily: {
- display: "'Inter', var(--joy-fontFamily-fallback)",
- body: "'Inter', var(--joy-fontFamily-fallback)",
- },
-});
diff --git a/docs/data/joy/getting-started/templates/rental-dashboard/App.tsx b/docs/data/joy/getting-started/templates/rental-dashboard/App.tsx
index e1350e85e01e61..fa1a766df74c00 100644
--- a/docs/data/joy/getting-started/templates/rental-dashboard/App.tsx
+++ b/docs/data/joy/getting-started/templates/rental-dashboard/App.tsx
@@ -9,7 +9,6 @@ import Stack from '@mui/joy/Stack';
import useScript from './useScript';
import FirstSidebar from './components/FirstSidebar';
import Header from './components/Header';
-import customTheme from './theme';
import RentalCard from './components/RentalCard';
import Main from './components/Main';
import HeaderSection from './components/HeaderSection';
@@ -34,17 +33,17 @@ export default function RentalDashboard() {
}, [status]);
return (
-
+
({
'[data-feather], .feather': {
- color: 'var(--Icon-color)',
+ color: `var(--Icon-color, ${theme.vars.palette.text.icon})`,
margin: 'var(--Icon-margin)',
- fontSize: 'var(--Icon-fontSize, 20px)',
+ fontSize: `var(--Icon-fontSize, ${theme.vars.fontSize.xl})`,
width: '1em',
height: '1em',
},
- }}
+ })}
/>
diff --git a/docs/data/joy/getting-started/templates/rental-dashboard/components/FirstSidebar.tsx b/docs/data/joy/getting-started/templates/rental-dashboard/components/FirstSidebar.tsx
index 1e1a40a9189245..f36be022f12156 100644
--- a/docs/data/joy/getting-started/templates/rental-dashboard/components/FirstSidebar.tsx
+++ b/docs/data/joy/getting-started/templates/rental-dashboard/components/FirstSidebar.tsx
@@ -79,12 +79,7 @@ export default function FirstSidebar() {
- openSidebar()}
- >
+ openSidebar()}>
diff --git a/docs/data/joy/getting-started/templates/rental-dashboard/components/HeaderSection.tsx b/docs/data/joy/getting-started/templates/rental-dashboard/components/HeaderSection.tsx
index 73affc456eff10..dbec55f8481033 100644
--- a/docs/data/joy/getting-started/templates/rental-dashboard/components/HeaderSection.tsx
+++ b/docs/data/joy/getting-started/templates/rental-dashboard/components/HeaderSection.tsx
@@ -24,7 +24,7 @@ export default function HeaderSection() {
>
232 stays in Melbourne
-
+
Book your next stay at one of our properties.
diff --git a/docs/data/joy/getting-started/templates/rental-dashboard/components/Pagination.tsx b/docs/data/joy/getting-started/templates/rental-dashboard/components/Pagination.tsx
index 9e1d436454d210..9671d994ce3f78 100644
--- a/docs/data/joy/getting-started/templates/rental-dashboard/components/Pagination.tsx
+++ b/docs/data/joy/getting-started/templates/rental-dashboard/components/Pagination.tsx
@@ -19,7 +19,7 @@ export default function Pagination() {
>
-
+
Page 1 of 10
+
Sign in to your account
-
+
Welcome back
@@ -213,7 +208,7 @@ export default function JoySignInSideTemplate() {
-
+
Β© Your company {new Date().getFullYear()}
diff --git a/docs/data/joy/getting-started/templates/sign-in-side/theme.ts b/docs/data/joy/getting-started/templates/sign-in-side/theme.ts
deleted file mode 100644
index 4742b97f2f8147..00000000000000
--- a/docs/data/joy/getting-started/templates/sign-in-side/theme.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-import { extendTheme } from '@mui/joy/styles';
-
-export default extendTheme({
- fontFamily: {
- display: "'Inter', var(--joy-fontFamily-fallback)",
- body: "'Inter', var(--joy-fontFamily-fallback)",
- },
-});
diff --git a/docs/data/joy/getting-started/templates/team/App.tsx b/docs/data/joy/getting-started/templates/team/App.tsx
index d99be8351d3403..63c9b934569305 100644
--- a/docs/data/joy/getting-started/templates/team/App.tsx
+++ b/docs/data/joy/getting-started/templates/team/App.tsx
@@ -38,7 +38,6 @@ import GroupRoundedIcon from '@mui/icons-material/GroupRounded';
import BookRoundedIcon from '@mui/icons-material/BookRounded';
// custom
-import teamTheme from './theme';
import Menu from './components/Menu';
import Layout from './components/Layout';
@@ -49,14 +48,14 @@ function ColorSchemeToggle() {
setMounted(true);
}, []);
if (!mounted) {
- return ;
+ return ;
}
return (
{
if (mode === 'light') {
setMode('dark');
@@ -92,8 +91,8 @@ function TeamNav() {
}}
>
-
-
+
+
People
@@ -115,7 +114,7 @@ function TeamNav() {
Policies
@@ -132,7 +131,7 @@ function TeamNav() {
export default function TeamExample() {
const [drawerOpen, setDrawerOpen] = React.useState(false);
return (
-
+
{drawerOpen && (
setDrawerOpen(false)}>
@@ -166,7 +165,7 @@ export default function TeamExample() {
@@ -177,12 +176,13 @@ export default function TeamExample() {
}
endDecorator={
-
-
- /
+
+
+ β + k
}
@@ -192,21 +192,23 @@ export default function TeamExample() {
xs: 'none',
sm: 'flex',
},
+ boxShadow: 'sm',
}}
/>
+
@@ -217,8 +219,8 @@ export default function TeamExample() {
control={
@@ -257,15 +259,7 @@ export default function TeamExample() {
justifyContent: 'space-between',
}}
>
-
- Filter by
-
+ Filter by
Clear filters
@@ -278,8 +272,8 @@ export default function TeamExample() {
justifyContent: 'space-between',
}}
>
-
- By keywords
+
+ Keywords
-
+
Location
-
+
Education
-
+
Previous experience
Andrew Smith
- UI Designer
+ UI Designer
@@ -492,9 +486,9 @@ export default function TeamExample() {
Senior designer
- Dribbble
+ Dribbble
- 2015-now
+ 2015-now
@@ -506,9 +500,9 @@ export default function TeamExample() {
Designer
- Pinterest
+ Pinterest
- 2012-2015
+ 2012-2015
{
setMode(mode === 'light' ? 'dark' : 'light');
}}
@@ -57,7 +57,7 @@ export default function App() {
Welcome!
- Sign in to continue.
+ Sign in to continue.
Email
diff --git a/docs/data/joy/getting-started/tutorial/tutorial-pt.md b/docs/data/joy/getting-started/tutorial/tutorial-pt.md
index b452fe10b4f283..a4d25e62055241 100644
--- a/docs/data/joy/getting-started/tutorial/tutorial-pt.md
+++ b/docs/data/joy/getting-started/tutorial/tutorial-pt.md
@@ -83,7 +83,7 @@ import Typography from '@mui/joy/Typography';
Welcome!
- Sign in to continue
+ Sign in to continue
;
```
diff --git a/docs/data/joy/getting-started/tutorial/tutorial-zh.md b/docs/data/joy/getting-started/tutorial/tutorial-zh.md
index b452fe10b4f283..a4d25e62055241 100644
--- a/docs/data/joy/getting-started/tutorial/tutorial-zh.md
+++ b/docs/data/joy/getting-started/tutorial/tutorial-zh.md
@@ -83,7 +83,7 @@ import Typography from '@mui/joy/Typography';
Welcome!
- Sign in to continue
+ Sign in to continue
;
```
diff --git a/docs/data/joy/getting-started/tutorial/tutorial.md b/docs/data/joy/getting-started/tutorial/tutorial.md
index 688ab35cd78dd4..1d862b7f0dc79f 100644
--- a/docs/data/joy/getting-started/tutorial/tutorial.md
+++ b/docs/data/joy/getting-started/tutorial/tutorial.md
@@ -108,7 +108,7 @@ Replace `Welcome!` inside your Sheet component with this ``:
Welcome!
- Sign in to continue.
+ Sign in to continue.
```
diff --git a/docs/data/joy/getting-started/usage/usage.md b/docs/data/joy/getting-started/usage/usage.md
index 6117e41391e36e..4b93c3908aa1f8 100644
--- a/docs/data/joy/getting-started/usage/usage.md
+++ b/docs/data/joy/getting-started/usage/usage.md
@@ -48,5 +48,5 @@ It fixes some inconsistencies across browsers and devices while providing resets
### Default font
-Joy UI uses the Public Sans font by default.
-See [InstallationβPublic Sans font](/joy-ui/getting-started/installation/#public-sans-font) for complete details.
+Joy UI uses the Inter font by default.
+See [InstallationβInter font](/joy-ui/getting-started/installation/#inter-font) for complete details.
diff --git a/docs/data/joy/main-features/automatic-adjustment/ListThemes.js b/docs/data/joy/main-features/automatic-adjustment/ListThemes.js
index f945649fc890b3..17ab64d8c7946c 100644
--- a/docs/data/joy/main-features/automatic-adjustment/ListThemes.js
+++ b/docs/data/joy/main-features/automatic-adjustment/ListThemes.js
@@ -24,13 +24,12 @@ export default function ButtonThemes() {
'--ListItem-paddingLeft': '5px',
'--ListItem-paddingRight': '5px',
'--ListItem-paddingY': '0px',
- '--ListItem-fontSize': '14px',
'--List-nestedInsetStart': '28px',
- '--ListItemDecorator-color': 'var(--joy-palette-primary-plainColor)',
+ fontSize: '14px',
},
cozy: {
'--List-radius': '20px',
- '--ListItem-minHeight': '48px',
+ '--ListItem-minHeight': '44px',
'--List-padding': '8px',
'--List-gap': '8px',
'--List-nestedInsetStart': 'var(--ListItemDecorator-size)',
@@ -57,14 +56,7 @@ export default function ButtonThemes() {
>
-
+
diff --git a/docs/data/joy/main-features/color-inversion/ColorInversionFooter.js b/docs/data/joy/main-features/color-inversion/ColorInversionFooter.js
index e655155cbac6e6..c9f599adb6a59e 100644
--- a/docs/data/joy/main-features/color-inversion/ColorInversionFooter.js
+++ b/docs/data/joy/main-features/color-inversion/ColorInversionFooter.js
@@ -41,14 +41,7 @@ export default function ColorInversionFooter() {
variant="soft"
size="sm"
onClick={() => {
- const colors = [
- 'primary',
- 'neutral',
- 'danger',
- 'info',
- 'success',
- 'warning',
- ];
+ const colors = ['primary', 'neutral', 'danger', 'success', 'warning'];
const nextColor = colors.indexOf(color);
setColor(colors[nextColor + 1] ?? colors[0]);
@@ -104,8 +97,8 @@ export default function ColorInversionFooter() {
- Intro to the MUI ecosystem
-
+ Intro to the MUI ecosystem
+
MUI blog
diff --git a/docs/data/joy/main-features/color-inversion/ColorInversionFooter.tsx b/docs/data/joy/main-features/color-inversion/ColorInversionFooter.tsx
index 19522780f8345e..933728dc1ce6a3 100644
--- a/docs/data/joy/main-features/color-inversion/ColorInversionFooter.tsx
+++ b/docs/data/joy/main-features/color-inversion/ColorInversionFooter.tsx
@@ -45,7 +45,6 @@ export default function ColorInversionFooter() {
'primary',
'neutral',
'danger',
- 'info',
'success',
'warning',
];
@@ -103,8 +102,8 @@ export default function ColorInversionFooter() {
- Intro to the MUI ecosystem
-
+ Intro to the MUI ecosystem
+
MUI blog
diff --git a/docs/data/joy/main-features/color-inversion/ColorInversionHeader.js b/docs/data/joy/main-features/color-inversion/ColorInversionHeader.js
index 2ed564444a48e5..25d3cd590c5dca 100644
--- a/docs/data/joy/main-features/color-inversion/ColorInversionHeader.js
+++ b/docs/data/joy/main-features/color-inversion/ColorInversionHeader.js
@@ -43,14 +43,7 @@ export default function ColorInversionHeader() {
variant="soft"
size="sm"
onClick={() => {
- const colors = [
- 'primary',
- 'neutral',
- 'danger',
- 'info',
- 'success',
- 'warning',
- ];
+ const colors = ['primary', 'neutral', 'danger', 'success', 'warning'];
const nextColor = colors.indexOf(color);
setColor(colors[nextColor + 1] ?? colors[0]);
@@ -123,7 +116,7 @@ export default function ColorInversionHeader() {
βK
diff --git a/docs/data/joy/main-features/color-inversion/ColorInversionHeader.tsx b/docs/data/joy/main-features/color-inversion/ColorInversionHeader.tsx
index b433e1f42b2aee..acf66252151040 100644
--- a/docs/data/joy/main-features/color-inversion/ColorInversionHeader.tsx
+++ b/docs/data/joy/main-features/color-inversion/ColorInversionHeader.tsx
@@ -47,7 +47,6 @@ export default function ColorInversionHeader() {
'primary',
'neutral',
'danger',
- 'info',
'success',
'warning',
];
@@ -122,7 +121,7 @@ export default function ColorInversionHeader() {
βK
diff --git a/docs/data/joy/main-features/color-inversion/ColorInversionMarketing.js b/docs/data/joy/main-features/color-inversion/ColorInversionMarketing.js
index 431725d023f214..580c0bb6f9b880 100644
--- a/docs/data/joy/main-features/color-inversion/ColorInversionMarketing.js
+++ b/docs/data/joy/main-features/color-inversion/ColorInversionMarketing.js
@@ -25,7 +25,7 @@ export default function ColorInversionMarketing() {
bgcolor: color === 'primary' ? '#042449' : undefined,
p: { xs: '36px', md: '70px' },
pt: { xs: '24px', md: '60px' },
- borderRadius: 'sm',
+ borderRadius: 'lg',
overflow: 'hidden',
'& button': { borderRadius: 'xl' },
}}
@@ -71,14 +71,7 @@ export default function ColorInversionMarketing() {
borderRadius: '50%',
}}
onClick={() => {
- const colors = [
- 'primary',
- 'neutral',
- 'danger',
- 'info',
- 'success',
- 'warning',
- ];
+ const colors = ['primary', 'neutral', 'danger', 'success', 'warning'];
const nextColor = colors.indexOf(color);
setColor(colors[nextColor + 1] ?? colors[0]);
diff --git a/docs/data/joy/main-features/color-inversion/ColorInversionMarketing.tsx b/docs/data/joy/main-features/color-inversion/ColorInversionMarketing.tsx
index acc91306b24964..0cef662c4f6f54 100644
--- a/docs/data/joy/main-features/color-inversion/ColorInversionMarketing.tsx
+++ b/docs/data/joy/main-features/color-inversion/ColorInversionMarketing.tsx
@@ -25,7 +25,7 @@ export default function ColorInversionMarketing() {
bgcolor: color === 'primary' ? '#042449' : undefined,
p: { xs: '36px', md: '70px' },
pt: { xs: '24px', md: '60px' },
- borderRadius: 'sm',
+ borderRadius: 'lg',
overflow: 'hidden',
'& button': { borderRadius: 'xl' },
}}
@@ -75,7 +75,6 @@ export default function ColorInversionMarketing() {
'primary',
'neutral',
'danger',
- 'info',
'success',
'warning',
];
diff --git a/docs/data/joy/main-features/color-inversion/ColorInversionMotivation.js b/docs/data/joy/main-features/color-inversion/ColorInversionMotivation.js
index 54a68b4da1e6fc..822606a78376a9 100644
--- a/docs/data/joy/main-features/color-inversion/ColorInversionMotivation.js
+++ b/docs/data/joy/main-features/color-inversion/ColorInversionMotivation.js
@@ -10,7 +10,7 @@ import KeyboardArrowRightIcon from '@mui/icons-material/KeyboardArrowRight';
export default function ColorInversionMotivation() {
const demo = (
-
+
-
+
Learn how to build super fast websites.
}>
@@ -36,11 +36,18 @@ export default function ColorInversionMotivation() {
);
return (
-
+
{/* Left: The global variants are applied to children only */}
-
+
{demo}
-
+
One layer
Global variants are applied only to the children.
@@ -48,12 +55,12 @@ export default function ColorInversionMotivation() {
{/* Right: The global variants are applied to both parent and children */}
-
+
{React.cloneElement(demo, {
variant: 'solid',
color: 'primary',
})}
-
+
Two layers
Global variants are applied to the card and children.
diff --git a/docs/data/joy/main-features/color-inversion/ColorInversionMotivation.tsx b/docs/data/joy/main-features/color-inversion/ColorInversionMotivation.tsx
index 704bf77ef5addd..352d801efdde4e 100644
--- a/docs/data/joy/main-features/color-inversion/ColorInversionMotivation.tsx
+++ b/docs/data/joy/main-features/color-inversion/ColorInversionMotivation.tsx
@@ -10,7 +10,7 @@ import KeyboardArrowRightIcon from '@mui/icons-material/KeyboardArrowRight';
export default function ColorInversionMotivation() {
const demo = (
-
+
-
+
Learn how to build super fast websites.
}>
@@ -35,11 +35,18 @@ export default function ColorInversionMotivation() {
);
return (
-
+
{/* Left: The global variants are applied to children only */}
-
+
{demo}
-
+
One layer
Global variants are applied only to the children.
@@ -47,12 +54,12 @@ export default function ColorInversionMotivation() {
{/* Right: The global variants are applied to both parent and children */}
-
+
{React.cloneElement(demo, {
variant: 'solid',
color: 'primary',
})}
-
+
Two layers
Global variants are applied to the card and children.
diff --git a/docs/data/joy/main-features/color-inversion/ColorInversionNavigation.js b/docs/data/joy/main-features/color-inversion/ColorInversionNavigation.js
index 3d83273a5b3b8f..7431e8865612b0 100644
--- a/docs/data/joy/main-features/color-inversion/ColorInversionNavigation.js
+++ b/docs/data/joy/main-features/color-inversion/ColorInversionNavigation.js
@@ -30,7 +30,7 @@ export default function ColorInversionNavigation() {
Saleshouse
- general team
+ general team
}
startDecorator={
@@ -62,11 +62,6 @@ export default function ColorInversionNavigation() {
}
- slotProps={{
- listbox: {
- disablePortal: true,
- },
- }}
sx={{ py: 1 }}
>
@@ -91,7 +86,7 @@ export default function ColorInversionNavigation() {
Chat
-
+
5
@@ -131,7 +126,7 @@ export default function ColorInversionNavigation() {
({
p: 2,
@@ -174,14 +169,7 @@ export default function ColorInversionNavigation() {
variant="plain"
size="sm"
onClick={() => {
- const colors = [
- 'primary',
- 'neutral',
- 'danger',
- 'info',
- 'success',
- 'warning',
- ];
+ const colors = ['primary', 'neutral', 'danger', 'success', 'warning'];
const nextColor = colors.indexOf(color);
setColor(colors[nextColor + 1] ?? colors[0]);
diff --git a/docs/data/joy/main-features/color-inversion/ColorInversionNavigation.tsx b/docs/data/joy/main-features/color-inversion/ColorInversionNavigation.tsx
index 37d08a41875880..4bd774bced9463 100644
--- a/docs/data/joy/main-features/color-inversion/ColorInversionNavigation.tsx
+++ b/docs/data/joy/main-features/color-inversion/ColorInversionNavigation.tsx
@@ -30,7 +30,7 @@ export default function ColorInversionNavigation() {
Saleshouse
- general team
+ general team
}
startDecorator={
@@ -62,11 +62,6 @@ export default function ColorInversionNavigation() {
}
- slotProps={{
- listbox: {
- disablePortal: true,
- },
- }}
sx={{ py: 1 }}
>
@@ -91,7 +86,7 @@ export default function ColorInversionNavigation() {
Chat
-
+
5
@@ -131,7 +126,7 @@ export default function ColorInversionNavigation() {
({
p: 2,
@@ -178,7 +173,6 @@ export default function ColorInversionNavigation() {
'primary',
'neutral',
'danger',
- 'info',
'success',
'warning',
];
diff --git a/docs/data/joy/main-features/color-inversion/ColorInversionPopup.js b/docs/data/joy/main-features/color-inversion/ColorInversionPopup.js
index b68790d0fb4dda..df1cf7be0cd4ad 100644
--- a/docs/data/joy/main-features/color-inversion/ColorInversionPopup.js
+++ b/docs/data/joy/main-features/color-inversion/ColorInversionPopup.js
@@ -33,14 +33,7 @@ export default function ColorInversionPopup() {
startDecorator={ }
variant="outlined"
onClick={() => {
- const colors = [
- 'primary',
- 'neutral',
- 'danger',
- 'info',
- 'success',
- 'warning',
- ];
+ const colors = ['primary', 'neutral', 'danger', 'success', 'warning'];
const nextColor = colors.indexOf(color);
setColor(colors[nextColor + 1] ?? colors[0]);
diff --git a/docs/data/joy/main-features/color-inversion/ColorInversionPopup.tsx b/docs/data/joy/main-features/color-inversion/ColorInversionPopup.tsx
index ef04951fb46d4a..1b3c9909fdaa98 100644
--- a/docs/data/joy/main-features/color-inversion/ColorInversionPopup.tsx
+++ b/docs/data/joy/main-features/color-inversion/ColorInversionPopup.tsx
@@ -37,7 +37,6 @@ export default function ColorInversionPopup() {
'primary',
'neutral',
'danger',
- 'info',
'success',
'warning',
];
diff --git a/docs/data/joy/main-features/global-variants/GlobalVariantComponents.js b/docs/data/joy/main-features/global-variants/GlobalVariantComponents.js
index 0bde5d835c1f1c..26bda914db0b3b 100644
--- a/docs/data/joy/main-features/global-variants/GlobalVariantComponents.js
+++ b/docs/data/joy/main-features/global-variants/GlobalVariantComponents.js
@@ -19,7 +19,7 @@ export default function GlobalVariantComponents() {
alignItems: 'center',
}}
>
-
+
Button:
@@ -34,22 +34,22 @@ export default function GlobalVariantComponents() {
Plain
-
+
Chip:
-
+
Solid
-
+
Soft
-
+
Outlined
-
+
Plain
-
+
Checkbox:
diff --git a/docs/data/joy/main-features/global-variants/LevelOfImportance.js b/docs/data/joy/main-features/global-variants/LevelOfImportance.js
index e5578ab46e2b41..d6bdf2e5a48a5b 100644
--- a/docs/data/joy/main-features/global-variants/LevelOfImportance.js
+++ b/docs/data/joy/main-features/global-variants/LevelOfImportance.js
@@ -24,7 +24,7 @@ export default function LevelOfImportance() {
@@ -57,7 +57,7 @@ export default function LevelOfImportance() {
sx={{
borderRadius: 'md',
overflow: 'auto',
- borderColor: 'background.level2',
+ borderColor: 'var(--joy-palette-neutral-outlinedBorder)',
bgcolor: 'background.level1',
}}
>
@@ -69,7 +69,7 @@ export default function LevelOfImportance() {
display: 'flex',
p: 1.5,
gap: 1.5,
- '& > button': { bgcolor: 'background.body' },
+ '& > button': { bgcolor: 'background.surface' },
}}
>
diff --git a/docs/data/joy/migration/PaletteChanges.js b/docs/data/joy/migration/PaletteChanges.js
new file mode 100644
index 00000000000000..2eb60bfe5b138e
--- /dev/null
+++ b/docs/data/joy/migration/PaletteChanges.js
@@ -0,0 +1,183 @@
+import * as React from 'react';
+import colors from '@mui/joy/colors';
+import Box from '@mui/joy/Box';
+import AspectRatio from '@mui/joy/AspectRatio';
+import List from '@mui/joy/List';
+import ListSubheader from '@mui/joy/ListSubheader';
+import ListItem from '@mui/joy/ListItem';
+import Typography from '@mui/joy/Typography';
+import Sheet from '@mui/joy/Sheet';
+import SvgIcon from '@mui/joy/SvgIcon';
+
+const primary = {
+ 50: '#F4FAFF',
+ 100: '#DDF1FF',
+ 200: '#ADDBFF',
+ 300: '#6FB6FF',
+ 400: '#3990FF',
+ 500: '#096BDE',
+ 600: '#054DA7',
+ 700: '#02367D',
+ 800: '#072859',
+ 900: '#00153C',
+};
+
+const neutral = {
+ 50: '#F7F7F8',
+ 100: '#EBEBEF',
+ 200: '#D8D8DF',
+ 300: '#B9B9C6',
+ 400: '#8F8FA3',
+ 500: '#73738C',
+ 600: '#5A5A72',
+ 700: '#434356',
+ 800: '#25252D',
+ 900: '#131318',
+};
+
+const danger = {
+ 50: '#FFF8F6',
+ 100: '#FFE9E8',
+ 200: '#FFC7C5',
+ 300: '#FF9192',
+ 400: '#FA5255',
+ 500: '#D3232F',
+ 600: '#A10E25',
+ 700: '#77061B',
+ 800: '#580013',
+ 900: '#39000D',
+};
+
+const success = {
+ 50: '#F3FEF5',
+ 100: '#D7F5DD',
+ 200: '#77EC95',
+ 300: '#4CC76E',
+ 400: '#2CA24D',
+ 500: '#1A7D36',
+ 600: '#0F5D26',
+ 700: '#034318',
+ 800: '#002F0F',
+ 900: '#001D09',
+};
+
+const warning = {
+ 50: '#FFF8C5',
+ 100: '#FAE17D',
+ 200: '#EAC54F',
+ 300: '#D4A72C',
+ 400: '#BF8700',
+ 500: '#9A6700',
+ 600: '#7D4E00',
+ 700: '#633C01',
+ 800: '#4D2D00',
+ 900: '#3B2300',
+};
+
+const oldColors = {
+ primary,
+ neutral,
+ danger,
+ success,
+ warning,
+ common: {
+ white: '#FFF',
+ black: '#09090D',
+ },
+};
+const newColors = {
+ primary: colors.blue,
+ neutral: colors.grey,
+ danger: colors.red,
+ success: colors.green,
+ warning: colors.yellow,
+ common: {
+ white: '#FCFCFD',
+ black: '#09090B',
+ },
+};
+
+export default function PaletteChanges() {
+ return (
+
+ {['primary', 'neutral', 'danger', 'success', 'warning', 'common'].map(
+ (color) => {
+ const oldColorRange = oldColors[color];
+ const newColorRange = newColors[color];
+ return (
+
+
+
+ {color} {color === 'common' ? '(white & black)' : '(50 - 900)'}
+
+ {Object.keys(newColorRange).map((key) => {
+ return (
+
+
+
+
+ {oldColorRange[key]}
+
+
+
+
+
+
+ {newColorRange[key]}
+
+ );
+ })}
+
+
+ );
+ },
+ )}
+
+ );
+}
diff --git a/docs/data/joy/migration/TitleBodyIconExample.js b/docs/data/joy/migration/TitleBodyIconExample.js
new file mode 100644
index 00000000000000..0a790f3ad80bdd
--- /dev/null
+++ b/docs/data/joy/migration/TitleBodyIconExample.js
@@ -0,0 +1,100 @@
+import * as React from 'react';
+import Box from '@mui/joy/Box';
+import Stack from '@mui/joy/Stack';
+import Typography from '@mui/joy/Typography';
+import SvgIcon from '@mui/joy/SvgIcon';
+
+export default function TitleBodyIconExample() {
+ return (
+
+
+
+
+
+
+
+
+ title-lg: Title of the component
+
+
+ body-md: This is the description of the component that contain
+ some information of it.
+
+
+
+
+
+
+
+
+
+
+ title-md: Title of the component
+
+
+ body-md: This is the description of the component that contain
+ some information of it.
+
+
+ body-sm: Metadata, e.g. a date.
+
+
+
+
+
+
+
+
+
+
+ title-sm: Title of the component
+
+
+ body-sm: This is the description of the component that contain
+ some information of it.
+
+
+ body-xs: Metadata, e.g. a date.
+
+
+
+
+
+ );
+}
diff --git a/docs/data/joy/migration/TitleBodyIconExample.tsx b/docs/data/joy/migration/TitleBodyIconExample.tsx
new file mode 100644
index 00000000000000..0a790f3ad80bdd
--- /dev/null
+++ b/docs/data/joy/migration/TitleBodyIconExample.tsx
@@ -0,0 +1,100 @@
+import * as React from 'react';
+import Box from '@mui/joy/Box';
+import Stack from '@mui/joy/Stack';
+import Typography from '@mui/joy/Typography';
+import SvgIcon from '@mui/joy/SvgIcon';
+
+export default function TitleBodyIconExample() {
+ return (
+
+
+
+
+
+
+
+
+ title-lg: Title of the component
+
+
+ body-md: This is the description of the component that contain
+ some information of it.
+
+
+
+
+
+
+
+
+
+
+ title-md: Title of the component
+
+
+ body-md: This is the description of the component that contain
+ some information of it.
+
+
+ body-sm: Metadata, e.g. a date.
+
+
+
+
+
+
+
+
+
+
+ title-sm: Title of the component
+
+
+ body-sm: This is the description of the component that contain
+ some information of it.
+
+
+ body-xs: Metadata, e.g. a date.
+
+
+
+
+
+ );
+}
diff --git a/docs/data/joy/migration/migrating-default-theme.md b/docs/data/joy/migration/migrating-default-theme.md
new file mode 100644
index 00000000000000..ed402542ce262f
--- /dev/null
+++ b/docs/data/joy/migration/migrating-default-theme.md
@@ -0,0 +1,1042 @@
+# Migrating to the new theme
+
+This guide walks through recent Joy UI default theme upgrades and how to update to it.
+
+With the introduction of Joy UI's v5.0.0-beta.0, its default theme went under some significant restructuring and polish.
+Several changes were made, including renaming, removing, and adding new tokens.
+This guide walks through each and every one of them and provides instructions for a smooth migration process.
+
+## Color & Typography
+
+### Purple palette removed
+
+The purple palette has been removed as we updated the primary color.
+In case you want to continue using it, copy the snippet below to your project:
+
+```js
+const purple = {
+ 50: '#FDF7FF',
+ 100: '#F4EAFF',
+ 200: '#E1CBFF',
+ 300: '#C69EFF',
+ 400: '#A374F9',
+ 500: '#814DDE',
+ 600: '#5F35AE',
+ 700: '#452382',
+ 800: '#301761',
+ 900: '#1D0A42',
+};
+```
+
+### Info palette removed
+
+The info palette has been removed to simplify the color set.
+We've realized that, in most cases, the neutral palette is used for info-related components and use cases.
+Additionally, we noticed a strong overlap between `info` and `neutral`, which motivated further this change.
+
+```diff
+-
++
+```
+
+If you want to continue using it, add the palette directly to the theme object file:
+
+```js
+import { extendTheme } from '@mui/joy/styles';
+
+const info = {
+ 50: '#FDF7FF',
+ 100: '#F4EAFF',
+ 200: '#E1CBFF',
+ 300: '#C69EFF',
+ 400: '#A374F9',
+ 500: '#814DDE',
+ 600: '#5F35AE',
+ 700: '#452382',
+ 800: '#301761',
+ 900: '#1D0A42',
+};
+
+const theme = extendTheme({
+ colorSchemes: {
+ light: {
+ palette: {
+ info: {
+ ...info,
+ plainColor: `var(--joy-palette-info-600)`,
+ plainHoverBg: `var(--joy-palette-info-100)`,
+ plainActiveBg: `var(--joy-palette-info-200)`,
+ plainDisabledColor: `var(--joy-palette-info-200)`,
+ outlinedColor: `var(--joy-palette-info-500)`,
+ outlinedBorder: `var(--joy-palette-info-200)`,
+ outlinedHoverBg: `var(--joy-palette-info-100)`,
+ outlinedHoverBorder: `var(--joy-palette-info-300)`,
+ outlinedActiveBg: `var(--joy-palette-info-200)`,
+ outlinedDisabledColor: `var(--joy-palette-info-100)`,
+ outlinedDisabledBorder: `var(--joy-palette-info-100)`,
+ softColor: `var(--joy-palette-info-600)`,
+ softBg: `var(--joy-palette-info-100)`,
+ softHoverBg: `var(--joy-palette-info-200)`,
+ softActiveBg: `var(--joy-palette-info-300)`,
+ softDisabledColor: `var(--joy-palette-info-300)`,
+ softDisabledBg: `var(--joy-paletteinfo}-50)`,
+ solidColor: '#fff',
+ solidBg: `var(--joy-palette-info-500)`,
+ solidHoverBg: `var(--joy-palette-info-600)`,
+ solidActiveBg: `var(--joy-palette-info-700)`,
+ solidDisabledColor: `#fff`,
+ solidDisabledBg: `var(--joy-palette-info-200)`,
+ },
+ },
+ },
+ dark: {
+ palette: {
+ info: {
+ ...info,
+ plainColor: `var(--joy-palette-info-300)`,
+ plainHoverBg: `var(--joy-palette-info-800)`,
+ plainActiveBg: `var(--joy-palette-info-700)`,
+ plainDisabledColor: `var(--joy-palette-info-800)`,
+ outlinedColor: `var(--joy-palette-info-200)`,
+ outlinedBorder: `var(--joy-palette-info-700)`,
+ outlinedHoverBg: `var(--joy-palette-info-800)`,
+ outlinedHoverBorder: `var(--joy-palette-info-600)`,
+ outlinedActiveBg: `var(--joy-palette-info-900)`,
+ outlinedDisabledColor: `var(--joy-palette-info-800)`,
+ outlinedDisabledBorder: `var(--joy-palette-info-800)`,
+ softColor: `var(--joy-palette-info-200)`,
+ softBg: `var(--joy-palette-info-900)`,
+ softHoverBg: `var(--joy-palette-info-800)`,
+ softActiveBg: `var(--joy-palette-info-700)`,
+ softDisabledColor: `var(--joy-palette-info-800)`,
+ softDisabledBg: `var(--joy-palette-info-900)`,
+ solidColor: `#fff`,
+ solidBg: `var(--joy-palette-info-600)`,
+ solidHoverBg: `var(--joy-palette-info-700)`,
+ solidActiveBg: `var(--joy-palette-info-800)`,
+ solidDisabledColor: `var(--joy-palette-info-700)`,
+ solidDisabledBg: `var(--joy-palette-info-900)`,
+ },
+ },
+ },
+ },
+});
+```
+
+Then provide the `theme` to the `CssVarsProvider`:
+
+```js
+import { CssVarsProvider, extendTheme } from '@mui/joy/styles';
+
+const theme = extendTheme({ β¦ });
+
+function App() {
+ return β¦ ;
+}
+```
+
+#### TypeScript
+
+If working with TypeScript, add the `info` palette to the theme's palette types via module augmentation:
+
+```ts
+// You can put this to any file that's included in your tsconfig
+import type { PaletteRange } from '@mui/joy/styles';
+
+declare module '@mui/joy/styles' {
+ interface ColorPalettePropOverrides {
+ // apply to all Joy UI components that support `color` prop
+ info: true;
+ }
+
+ interface Palette {
+ // this will make the node `info` configurable in `extendTheme`
+ // and add `info` to the theme's palette.
+ info: PaletteRange;
+ }
+}
+```
+
+### Other palettes
+
+Each and every color of all palettes have been refined for better contrast ratios, vibrance, and personality.
+Here's a before and after:
+
+{{"demo": "PaletteChanges.js"}}
+
+#### Keep the old colors
+
+To keep using the old colors, add them to your theme:
+
+
+Primary
+
+```js
+const primary = {
+ 50: '#F4FAFF',
+ 100: '#DDF1FF',
+ 200: '#ADDBFF',
+ 300: '#6FB6FF',
+ 400: '#3990FF',
+ 500: '#096BDE',
+ 600: '#054DA7',
+ 700: '#02367D',
+ 800: '#072859',
+ 900: '#00153C',
+};
+
+extendTheme({
+ colorSchemes: {
+ light: {
+ palette: {
+ primary: {
+ ...primary,
+ plainColor: `var(--joy-palette-primary-600)`,
+ plainHoverBg: `var(--joy-palette-primary-100)`,
+ plainActiveBg: `var(--joy-palette-primary-200)`,
+ plainDisabledColor: `var(--joy-palette-primary-200)`,
+
+ outlinedColor: `var(--joy-palette-primary-500)`,
+ outlinedBorder: `var(--joy-palette-primary-200)`,
+ outlinedHoverBg: `var(--joy-palette-primary-100)`,
+ outlinedHoverBorder: `var(--joy-palette-primary-300)`,
+ outlinedActiveBg: `var(--joy-palette-primary-200)`,
+ outlinedDisabledColor: `var(--joy-palette-primary-100)`,
+ outlinedDisabledBorder: `var(--joy-palette-primary-100)`,
+
+ softColor: `var(--joy-palette-primary-600)`,
+ softBg: `var(--joy-palette-primary-100)`,
+ softHoverBg: `var(--joy-palette-primary-200)`,
+ softActiveBg: `var(--joy-palette-primary-300)`,
+ softDisabledColor: `var(--joy-palette-primary-300)`,
+ softDisabledBg: `var(--joy-palette-primary}-)50`,
+
+ solidColor: '#fff',
+ solidBg: `var(--joy-palette-primary-500)`,
+ solidHoverBg: `var(--joy-palette-primary-600)`,
+ solidActiveBg: `var(--joy-palette-primary-700)`,
+ solidDisabledColor: `#fff`,
+ solidDisabledBg: `var(--joy-palette-primary-200)`,
+ },
+ },
+ },
+ dark: {
+ palette: {
+ primary: {
+ ...primary,
+ plainColor: `var(--joy-palette-primary-300)`,
+ plainHoverBg: `var(--joy-palette-primary-800)`,
+ plainActiveBg: `var(--joy-palette-primary-700)`,
+ plainDisabledColor: `var(--joy-palette-primary-800)`,
+
+ outlinedColor: `var(--joy-palette-primary-200)`,
+ outlinedBorder: `var(--joy-palette-primary-700)`,
+ outlinedHoverBg: `var(--joy-palette-primary-800)`,
+ outlinedHoverBorder: `var(--joy-palette-primary-600)`,
+ outlinedActiveBg: `var(--joy-palette-primary-900)`,
+ outlinedDisabledColor: `var(--joy-palette-primary-800)`,
+ outlinedDisabledBorder: `var(--joy-palette-primary-800)`,
+
+ softColor: `var(--joy-palette-primary-200)`,
+ softBg: `var(--joy-palette-primary-900)`,
+ softHoverBg: `var(--joy-palette-primary-800)`,
+ softActiveBg: `var(--joy-palette-primary-700)`,
+ softDisabledColor: `var(--joy-palette-primary-800)`,
+ softDisabledBg: `var(--joy-palette-primary-900)`,
+
+ solidColor: `#fff`,
+ solidBg: `var(--joy-palette-primary-600)`,
+ solidHoverBg: `var(--joy-palette-primary-700)`,
+ solidActiveBg: `var(--joy-palette-primary-800)`,
+ solidDisabledColor: `var(--joy-palette-primary-700)`,
+ solidDisabledBg: `var(--joy-palette-primary-900)`,
+ },
+ },
+ },
+ },
+});
+```
+
+
+
+
+Neutral
+
+```js
+const neutral = {
+ 50: '#F7F7F8',
+ 100: '#EBEBEF',
+ 200: '#D8D8DF',
+ 300: '#B9B9C6',
+ 400: '#8F8FA3',
+ 500: '#73738C',
+ 600: '#5A5A72',
+ 700: '#434356',
+ 800: '#25252D',
+ 900: '#131318',
+};
+
+extendTheme({
+ colorSchemes: {
+ light: {
+ palette: {
+ neutral: {
+ ...neutral,
+ plainColor: `var(--joy-palette-neutral-800)`,
+ plainHoverColor: `var(--joy-palette-neutral-900)`,
+ plainHoverBg: `var(--joy-palette-neutral-100)`,
+ plainActiveBg: `var(--joy-palette-neutral-200)`,
+ plainDisabledColor: `var(--joy-palette-neutral-300)`,
+
+ outlinedColor: `var(--joy-palette-neutral-800)`,
+ outlinedBorder: `var(--joy-palette-neutral-200)`,
+ outlinedHoverColor: `var(--joy-palette-neutral-900)`,
+ outlinedHoverBg: `var(--joy-palette-neutral-100)`,
+ outlinedHoverBorder: `var(--joy-palette-neutral-300)`,
+ outlinedActiveBg: `var(--joy-palette-neutral-200)`,
+ outlinedDisabledColor: `var(--joy-palette-neutral-300)`,
+ outlinedDisabledBorder: `var(--joy-palette-neutral-100)`,
+
+ softColor: `var(--joy-palette-neutral-800)`,
+ softBg: `var(--joy-palette-neutral-100)`,
+ softHoverColor: `var(--joy-palette-neutral-900)`,
+ softHoverBg: `var(--joy-palette-neutral-200)`,
+ softActiveBg: `var(--joy-palette-neutral-300)`,
+ softDisabledColor: `var(--joy-palette-neutral-300)`,
+ softDisabledBg: `var(--joy-palette-neutral-50)`,
+ solidColor: `var(--joy-palette-common-white)`,
+ solidBg: `var(--joy-palette-neutral-600)`,
+ solidHoverBg: `var(--joy-palette-neutral-700)`,
+ solidActiveBg: `var(--joy-palette-neutral-800)`,
+ solidDisabledColor: `var(--joy-palette-neutral-300)`,
+ solidDisabledBg: `var(--joy-palette-neutral-50)`,
+ },
+ common: {
+ white: '#FFF',
+ black: '#09090D',
+ },
+ text: {
+ secondary: 'var(--joy-palette-neutral-600)',
+ tertiary: 'var(--joy-palette-neutral-500)',
+ },
+ background: {
+ body: 'var(--joy-palette-common-white)',
+ tooltip: 'var(--joy-palette-neutral-800)',
+ backdrop: 'rgba(255 255 255 / 0.5)',
+ },
+ },
+ },
+ dark: {
+ palette: {
+ neutral: {
+ ...neutral,
+ plainColor: `var(--joy-palette-neutral-200)`,
+ plainHoverColor: `var(--joy-palette-neutral-50)`,
+ plainHoverBg: `var(--joy-palette-neutral-800)`,
+ plainActiveBg: `var(--joy-palette-neutral-700)`,
+ plainDisabledColor: `var(--joy-palette-neutral-700)`,
+
+ outlinedColor: `var(--joy-palette-neutral-200)`,
+ outlinedBorder: `var(--joy-palette-neutral-800)`,
+ outlinedHoverColor: `var(--joy-palette-neutral-50)`,
+ outlinedHoverBg: `var(--joy-palette-neutral-800)`,
+ outlinedHoverBorder: `var(--joy-palette-neutral-700)`,
+ outlinedActiveBg: `var(--joy-palette-neutral-800)`,
+ outlinedDisabledColor: `var(--joy-palette-neutral-800)`,
+ outlinedDisabledBorder: `var(--joy-palette-neutral-800)`,
+
+ softColor: `var(--joy-palette-neutral-200)`,
+ softBg: `var(--joy-palette-neutral-800)`,
+ softHoverColor: `var(--joy-palette-neutral-50)`,
+ softHoverBg: `var(--joy-palette-neutral-700)`,
+ softActiveBg: `var(--joy-palette-neutral-600)`,
+ softDisabledColor: `var(--joy-palette-neutral-700)`,
+ softDisabledBg: `var(--joy-palette-neutral-900)`,
+
+ solidColor: `var(--joy-palette-common-white)`,
+ solidBg: `var(--joy-palette-neutral-600)`,
+ solidHoverBg: `var(--joy-palette-neutral-700)`,
+ solidActiveBg: `var(--joy-palette-neutral-800)`,
+ solidDisabledColor: `var(--joy-palette-neutral-700)`,
+ solidDisabledBg: `var(--joy-palette-neutral-900)`,
+ },
+ common: {
+ white: '#FFF',
+ black: '#09090D',
+ },
+ background: {
+ body: 'var(--joy-palette-neutral-900)',
+ surface: 'var(--joy-palette-common-black)',
+ popup: 'var(--joy-palette-neutral-900)',
+ level1: 'var(--joy-palette-neutral-800)',
+ level2: 'var(--joy-palette-neutral-700)',
+ level3: 'var(--joy-palette-neutral-600)',
+ },
+ },
+ },
+ },
+});
+```
+
+
+
+
+Danger
+
+```js
+const danger = {
+ 50: '#FFF8F6',
+ 100: '#FFE9E8',
+ 200: '#FFC7C5',
+ 300: '#FF9192',
+ 400: '#FA5255',
+ 500: '#D3232F',
+ 600: '#A10E25',
+ 700: '#77061B',
+ 800: '#580013',
+ 900: '#39000D',
+};
+
+extendTheme({
+ colorSchemes: {
+ light: {
+ palette: {
+ danger: {
+ ...danger,
+ plainColor: `var(--joy-palette-danger-600)`,
+ plainHoverBg: `var(--joy-palette-danger-100)`,
+ plainActiveBg: `var(--joy-palette-danger-200)`,
+ plainDisabledColor: `var(--joy-palette-danger-200)`,
+
+ outlinedColor: `var(--joy-palette-danger-500)`,
+ outlinedBorder: `var(--joy-palette-danger-200)`,
+ outlinedHoverBg: `var(--joy-palette-danger-100)`,
+ outlinedHoverBorder: `var(--joy-palette-danger-300)`,
+ outlinedActiveBg: `var(--joy-palette-danger-200)`,
+ outlinedDisabledColor: `var(--joy-palette-danger-100)`,
+ outlinedDisabledBorder: `var(--joy-palette-danger-100)`,
+
+ softColor: `var(--joy-palette-danger-600)`,
+ softBg: `var(--joy-palette-danger-100)`,
+ softHoverBg: `var(--joy-palette-danger-200)`,
+ softActiveBg: `var(--joy-palette-danger-300)`,
+ softDisabledColor: `var(--joy-palette-danger-300)`,
+ softDisabledBg: `var(--joy-palette-danger}-)50`,
+
+ solidColor: '#fff',
+ solidBg: `var(--joy-palette-danger-500)`,
+ solidHoverBg: `var(--joy-palette-danger-600)`,
+ solidActiveBg: `var(--joy-palette-danger-700)`,
+ solidDisabledColor: `#fff`,
+ solidDisabledBg: `var(--joy-palette-danger-200)`,
+ },
+ },
+ },
+ dark: {
+ palette: {
+ danger: {
+ ...danger,
+ plainColor: `var(--joy-palette-danger-300)`,
+ plainHoverBg: `var(--joy-palette-danger-800)`,
+ plainActiveBg: `var(--joy-palette-danger-700)`,
+ plainDisabledColor: `var(--joy-palette-danger-800)`,
+
+ outlinedColor: `var(--joy-palette-danger-200)`,
+ outlinedBorder: `var(--joy-palette-danger-700)`,
+ outlinedHoverBg: `var(--joy-palette-danger-800)`,
+ outlinedHoverBorder: `var(--joy-palette-danger-600)`,
+ outlinedActiveBg: `var(--joy-palette-danger-900)`,
+ outlinedDisabledColor: `var(--joy-palette-danger-800)`,
+ outlinedDisabledBorder: `var(--joy-palette-danger-800)`,
+
+ softColor: `var(--joy-palette-danger-200)`,
+ softBg: `var(--joy-palette-danger-900)`,
+ softHoverBg: `var(--joy-palette-danger-800)`,
+ softActiveBg: `var(--joy-palette-danger-700)`,
+ softDisabledColor: `var(--joy-palette-danger-800)`,
+ softDisabledBg: `var(--joy-palette-danger-900)`,
+
+ solidColor: `#fff`,
+ solidBg: `var(--joy-palette-danger-600)`,
+ solidHoverBg: `var(--joy-palette-danger-700)`,
+ solidActiveBg: `var(--joy-palette-danger-800)`,
+ solidDisabledColor: `var(--joy-palette-danger-700)`,
+ solidDisabledBg: `var(--joy-palette-danger-900)`,
+ },
+ },
+ },
+ },
+});
+```
+
+
+
+
+Success
+
+```js
+const success = {
+ 50: '#F3FEF5',
+ 100: '#D7F5DD',
+ 200: '#77EC95',
+ 300: '#4CC76E',
+ 400: '#2CA24D',
+ 500: '#1A7D36',
+ 600: '#0F5D26',
+ 700: '#034318',
+ 800: '#002F0F',
+ 900: '#001D09',
+};
+
+extendTheme({
+ colorSchemes: {
+ light: {
+ palette: {
+ success: {
+ ...success,
+ plainColor: `var(--joy-palette-success-600)`,
+ plainHoverBg: `var(--joy-palette-success-100)`,
+ plainActiveBg: `var(--joy-palette-success-200)`,
+ plainDisabledColor: `var(--joy-palette-success-200)`,
+
+ outlinedColor: `var(--joy-palette-success-500)`,
+ outlinedBorder: `var(--joy-palette-success-200)`,
+ outlinedHoverBg: `var(--joy-palette-success-100)`,
+ outlinedHoverBorder: `var(--joy-palette-success-300)`,
+ outlinedActiveBg: `var(--joy-palette-success-200)`,
+ outlinedDisabledColor: `var(--joy-palette-success-100)`,
+ outlinedDisabledBorder: `var(--joy-palette-success-100)`,
+
+ softColor: `var(--joy-palette-success-600)`,
+ softBg: `var(--joy-palette-success-100)`,
+ softHoverBg: `var(--joy-palette-success-200)`,
+ softActiveBg: `var(--joy-palette-success-300)`,
+ softDisabledColor: `var(--joy-palette-success-300)`,
+ softDisabledBg: `var(--joy-palette-success}-)50`,
+
+ solidColor: '#fff',
+ solidBg: `var(--joy-palette-success-500)`,
+ solidHoverBg: `var(--joy-palette-success-600)`,
+ solidActiveBg: `var(--joy-palette-success-700)`,
+ solidDisabledColor: `#fff`,
+ solidDisabledBg: `var(--joy-palette-success-200)`,
+ },
+ },
+ },
+ dark: {
+ palette: {
+ success: {
+ ...success,
+ plainColor: `var(--joy-palette-success-300)`,
+ plainHoverBg: `var(--joy-palette-success-800)`,
+ plainActiveBg: `var(--joy-palette-success-700)`,
+ plainDisabledColor: `var(--joy-palette-success-800)`,
+
+ outlinedColor: `var(--joy-palette-success-200)`,
+ outlinedBorder: `var(--joy-palette-success-700)`,
+ outlinedHoverBg: `var(--joy-palette-success-800)`,
+ outlinedHoverBorder: `var(--joy-palette-success-600)`,
+ outlinedActiveBg: `var(--joy-palette-success-900)`,
+ outlinedDisabledColor: `var(--joy-palette-success-800)`,
+ outlinedDisabledBorder: `var(--joy-palette-success-800)`,
+
+ softColor: `var(--joy-palette-success-200)`,
+ softBg: `var(--joy-palette-success-900)`,
+ softHoverBg: `var(--joy-palette-success-800)`,
+ softActiveBg: `var(--joy-palette-success-700)`,
+ softDisabledColor: `var(--joy-palette-success-800)`,
+ softDisabledBg: `var(--joy-palette-success-900)`,
+
+ solidColor: '#fff',
+ solidBg: `var(--joy-palette-success-600)`,
+ solidHoverBg: `var(--joy-palette-success-700)`,
+ solidActiveBg: `var(--joy-palette-success-800)`,
+ solidDisabledColor: `var(--joy-palette-success-700)`,
+ solidDisabledBg: `var(--joy-palette-success-900)`,
+ },
+ },
+ },
+ },
+});
+```
+
+
+
+
+Warning
+
+```js
+const warning = {
+ 50: '#FFF8C5',
+ 100: '#FAE17D',
+ 200: '#EAC54F',
+ 300: '#D4A72C',
+ 400: '#BF8700',
+ 500: '#9A6700',
+ 600: '#7D4E00',
+ 700: '#633C01',
+ 800: '#4D2D00',
+ 900: '#3B2300',
+};
+
+extendTheme({
+ colorSchemes: {
+ light: {
+ palette: {
+ warning: {
+ ...warning,
+ plainColor: `var(--joy-palette-warning-800)`,
+ plainHoverBg: `var(--joy-palette-warning-50)`,
+ plainActiveBg: `var(--joy-palette-warning-200)`,
+ plainDisabledColor: `var(--joy-palette-warning-200)`,
+
+ outlinedColor: `var(--joy-palette-warning-800)`,
+ outlinedBorder: `var(--joy-palette-warning-200)`,
+ outlinedHoverBg: `var(--joy-palette-warning-50)`,
+ outlinedHoverBorder: `var(--joy-palette-warning-300)`,
+ outlinedActiveBg: `var(--joy-palette-warning-200)`,
+ outlinedDisabledColor: `var(--joy-palette-warning-100)`,
+ outlinedDisabledBorder: `var(--joy-palette-warning-100)`,
+
+ softColor: `var(--joy-palette-warning-800)`,
+ softBg: `var(--joy-palette-warning-50)`,
+ softHoverBg: `var(--joy-palette-warning-100)`,
+ softActiveBg: `var(--joy-palette-warning-200)`,
+ softDisabledColor: `var(--joy-palette-warning-200)`,
+ softDisabledBg: `var(--joy-palette-warning-50)`,
+
+ solidColor: `var(--joy-palette-warning-800)`,
+ solidBg: `var(--joy-palette-warning-200)`,
+ solidHoverBg: `var(--joy-palette-warning-300)`,
+ solidActiveBg: `var(--joy-palette-warning-400)`,
+ solidDisabledColor: `var(--joy-palette-warning-200)`,
+ solidDisabledBg: `var(--joy-palette-warning-50)`,
+ },
+ },
+ },
+ dark: {
+ palette: {
+ warning: {
+ ...warning,
+ plainColor: `var(--joy-palette-warning-300)`,
+ plainHoverBg: `var(--joy-palette-warning-800)`,
+ plainActiveBg: `var(--joy-palette-warning-700)`,
+ plainDisabledColor: `var(--joy-palette-warning-800)`,
+
+ outlinedColor: `var(--joy-palette-warning-200)`,
+ outlinedBorder: `var(--joy-palette-warning-700)`,
+ outlinedHoverBg: `var(--joy-palette-warning-800)`,
+ outlinedHoverBorder: `var(--joy-palette-warning-600)`,
+ outlinedActiveBg: `var(--joy-palette-warning-900)`,
+ outlinedDisabledColor: `var(--joy-palette-warning-800)`,
+ outlinedDisabledBorder: `var(--joy-palette-warning-800)`,
+
+ softColor: `var(--joy-palette-warning-200)`,
+ softBg: `var(--joy-palette-warning-900)`,
+ softHoverBg: `var(--joy-palette-warning-800)`,
+ softActiveBg: `var(--joy-palette-warning-700)`,
+ softDisabledColor: `var(--joy-palette-warning-800)`,
+ softDisabledBg: `var(--joy-palette-warning-900)`,
+
+ solidColor: `var(--joy-palette-common-black)`,
+ solidBg: `var(--joy-palette-warning-300)`,
+ solidHoverBg: `var(--joy-palette-warning-400)`,
+ solidActiveBg: `var(--joy-palette-warning-500)`,
+ solidDisabledColor: `var(--joy-palette-warning-700)`,
+ solidDisabledBg: `var(--joy-palette-warning-900)`,
+ },
+ },
+ },
+ },
+});
+```
+
+
+
+### Font family
+
+The default theme typeface has been changed to [`Inter`](https://fonts.google.com/specimen/Inter?query=inter).
+Follow the [installation guide](/joy-ui/getting-started/installation/#inter-font) to install it.
+
+To keep the old font family, add the following to your theme:
+
+```js
+extendTheme({
+ fontFamily: {
+ display: '"Public Sans", var(--joy-fontFamily-fallback)',
+ body: '"Public Sans", var(--joy-fontFamily-fallback)',
+ },
+});
+```
+
+### Font size
+
+The font size scale has been reduced to:
+
+```diff
+ {
+- xl7: '4.5rem',
+- xl6: '3.75rem',
+- xl5: '3rem',
+ xl4: '2.25rem',
+ xl3: '1.875rem',
+ xl2: '1.5rem',
+ xl: '1.25rem',
+ lg: '1.125rem',
+ md: '1rem',
+ sm: '0.875rem',
+ xs: '0.75rem',
+- xs2: '0.625rem',
+- xs3: '0.5rem',
+ }
+```
+
+To keep the old font size scale, add the following to your theme:
+
+```js
+extendTheme({
+ fontSize: {
+ xl7: '4.5rem',
+ xl6: '3.75rem',
+ xl5: '3rem',
+ xs2: '0.625rem',
+ xs3: '0.5rem',
+ },
+});
+```
+
+#### TypeScript
+
+If working with TypeScript, add the old font size scale to the theme's type via module augmentation:
+
+```ts
+// You can put this to any file that's included in your tsconfig
+declare module '@mui/joy/styles' {
+ interface FontSizeOverrides {
+ xl7: true;
+ xl6: true;
+ xl5: true;
+ xs2: true;
+ xs3: true;
+ }
+}
+```
+
+### Font weight
+
+The font weight scale has been reduced to:
+
+```diff
+ {
+- xs: 200,
+ sm: 300,
+ md: 500,
+ lg: 600,
+ xl: 700,
+- xl2: 800,
+- xl3: 900,
+ }
+```
+
+To keep the old font weight scale, add the following to your theme:
+
+```js
+extendTheme({
+ fontWeight: {
+ xs: 200,
+ xl2: 800,
+ xl3: 900,
+ },
+});
+```
+
+#### TypeScript
+
+If working with TypeScript, add the old font weight scale to the theme's type via module augmentation:
+
+```ts
+// You can put this to any file that's included in your tsconfig
+declare module '@mui/joy/styles' {
+ interface FontWeightOverrides {
+ xs: true;
+ xl2: true;
+ xl3: true;
+ }
+}
+```
+
+### Line height
+
+The font size scale has been changed to:
+
+```diff
+ {
+- sm: 1.25,
+- md: 1.5,
+- lg: 1.7,
++ xs: 1.33334, // largest font sizes for h1, h2
++ sm: 1.42858, // normal font sizes
++ md: 1.5, // normal font sizes
++ lg: 1.55556, // large font sizes for components
++ xl: 1.66667, // smallest font sizes
+ }
+```
+
+### Letter spacing
+
+The letter spacing scale has been removed.
+To add it back, add the following to your theme:
+
+```js
+extendTheme({
+ letterSpacing: {
+ sm: '-0.01em',
+ md: '0.083em',
+ lg: '0.125em',
+ },
+});
+```
+
+#### TypeScript
+
+If working with TypeScript, add the old letter spacing scale to the theme's type via module augmentation:
+
+```ts
+// You can put this to any file that's included in your tsconfig
+declare module '@mui/joy/styles' {
+ interface ThemeScales {
+ letterSpacing: {
+ sm: string;
+ md: string;
+ lg: string;
+ };
+ }
+}
+```
+
+### Level
+
+The default typography level scale (`theme.typography.*`) has been restructured to:
+
+```diff
+ h1
+ h2
+ h3
+ h4
++ title-lg
++ title-md
++ title-sm
++ body-lg
++ body-md
++ body-sm
++ body-xs
+- display1
+- display2
+- h5 // recommend to use `title-lg` instead
+- h6 // recommend to use `title-md` instead
+- body1 // recommend to use `body-md` instead
+- body2 // recommend to use `body-sm` instead
+- body3 // recommend to use `body-xs` instead
+- body4
+- body5
+```
+
+The reason behind this restructure is to make the levels more consistent and easier to use.
+The `h1` through `h4` levels are intended to be used for page headings, while the `title-*` and `body-*` levels are intended to be used as page paragraphs and as component texts.
+
+The `title-*` and `body-*` levels are designed to be composable which align perfectly with each size of the `SvgIcon` component:
+
+{{"demo": "TitleBodyIconExample.js"}}
+
+### Shadow
+
+The shadow scale remains the same but all values have been changed.
+
+To keep the old shadow scale, add the following to your theme:
+
+```js
+extendTheme({
+ shadow: {
+ xs: `var(--joy-shadowRing, 0 0 #000),
+ 0 1px 2px 0 rgba(var(--joy-shadowChannel, 187 187 187) / 0.12)`,
+ sm: `var(--joy-shadowRing, 0 0 #000),
+ 0.3px 0.8px 1.1px rgba(var(--joy-shadowChannel, 187 187 187) / 0.11),
+ 0.5px 1.3px 1.8px -0.6px rgba(var(--joy-shadowChannel, 187 187 187) / 0.18),
+ 1.1px 2.7px 3.8px -1.2px rgba(var(--joy-shadowChannel, 187 187 187) / 0.26)`,
+ md: `var(--joy-shadowRing, 0 0 #000),
+ 0.3px 0.8px 1.1px rgba(var(--joy-shadowChannel, 187 187 187) / 0.12),
+ 1.1px 2.8px 3.9px -0.4px rgba(var(--joy-shadowChannel, 187 187 187) / 0.17),
+ 2.4px 6.1px 8.6px -0.8px rgba(var(--joy-shadowChannel, 187 187 187) / 0.23),
+ 5.3px 13.3px 18.8px -1.2px rgba(var(--joy-shadowChannel, 187 187 187) / 0.29)`,
+ lg: `var(--joy-shadowRing, 0 0 #000),
+ 0.3px 0.8px 1.1px rgba(var(--joy-shadowChannel, 187 187 187) / 0.11),
+ 1.8px 4.5px 6.4px -0.2px rgba(var(--joy-shadowChannel, 187 187 187) / 0.13),
+ 3.2px 7.9px 11.2px -0.4px rgba(var(--joy-shadowChannel, 187 187 187) / 0.16),
+ 4.8px 12px 17px -0.5px rgba(var(--joy-shadowChannel, 187 187 187) / 0.19),
+ 7px 17.5px 24.7px -0.7px rgba(var(--joy-shadowChannel, 187 187 187) / 0.21)`,
+ xl: `var(--joy-shadowRing, 0 0 #000),
+ 0.3px 0.8px 1.1px rgba(var(--joy-shadowChannel, 187 187 187) / 0.11),
+ 1.8px 4.5px 6.4px -0.2px rgba(var(--joy-shadowChannel, 187 187 187) / 0.13),
+ 3.2px 7.9px 11.2px -0.4px rgba(var(--joy-shadowChannel, 187 187 187) / 0.16),
+ 4.8px 12px 17px -0.5px rgba(var(--joy-shadowChannel, 187 187 187) / 0.19),
+ 7px 17.5px 24.7px -0.7px rgba(var(--joy-shadowChannel, 187 187 187) / 0.21),
+ 10.2px 25.5px 36px -0.9px rgba(var(--joy-shadowChannel, 187 187 187) / 0.24),
+ 14.8px 36.8px 52.1px -1.1px rgba(var(--joy-shadowChannel, 187 187 187) / 0.27), 21px 52.3px 74px -1.2px rgba(var(--joy-shadowChannel, 187 187 187) / 0.29)`,
+ },
+});
+```
+
+## Components
+
+### Alert
+
+The default variant has been changed to `outlined` and the default color has been changed to `neutral`.
+
+To keep the old default variant and color, add the following to your theme:
+
+```js
+extendTheme({
+ components: {
+ JoyAlert: {
+ defaultProps: {
+ variant: 'soft',
+ color: 'primary',
+ },
+ },
+ },
+});
+```
+
+### Autocomplete
+
+The variant and color are now the same for `input` and `listbox` slots.
+
+If you want to use a different variant for a specific slot, use `slotProps`. In the following example, the `listbox` slot uses the `plain` variant:
+
+```js
+
+```
+
+### Chip
+
+The default variant has been changed to `soft` and the default color has been changed to `neutral`.
+
+To keep the old default variant and color, add the following to your theme:
+
+```js
+extendTheme({
+ components: {
+ JoyChip: {
+ defaultProps: {
+ variant: 'solid',
+ color: 'primary',
+ },
+ },
+ },
+});
+```
+
+### ChipDelete
+
+The default variant has been changed to `plain` and the default color has been changed to `neutral`.
+
+To keep the old default variant and color, add the following to your theme:
+
+```js
+extendTheme({
+ components: {
+ JoyChipDelete: {
+ defaultProps: {
+ variant: 'solid',
+ color: 'primary',
+ },
+ },
+ },
+});
+```
+
+### IconButton
+
+The default variant has been changed to `plain` and the default color has been changed to `neutral`.
+
+To keep the old default variant and color, add the following to your theme:
+
+```js
+extendTheme({
+ components: {
+ JoyIconButton: {
+ defaultProps: {
+ variant: 'soft',
+ color: 'primary',
+ },
+ },
+ },
+});
+```
+
+### Tabs
+
+The [Tabs](/joy-ui/react-tabs/) component has been redesigned following feedback we've received on [this GitHub issue](https://github.com/mui/material-ui/issues/36782).
+
+{{"demo": "../components/tabs/TabsBasic.js"}}
+
+To keep the old Tabs design, add the following to your theme:
+
+```js
+extendTheme({
+ components: {
+ JoyTabList: {
+ defaultProps: {
+ variant: 'soft',
+ disableUnderline: true,
+ },
+ styleOverrides: {
+ root: {
+ gap: '0.25rem',
+ padding: '0.25rem',
+ '--List-padding': '0.25rem',
+ borderRadius: 'var(--joy-radius-xl)',
+ '--List-radius': 'var(--joy-radius-xl)',
+ },
+ },
+ },
+ JoyTab: {
+ defaultProps: {
+ disableIndicator: true,
+ },
+ styleOverrides: {
+ root: {
+ '&[aria-selected="true"]': {
+ boxShadow: 'var(--joy-shadow-sm)',
+ backgroundColor: 'var(--joy-palette-background-surface)',
+ },
+ },
+ },
+ },
+ },
+});
+```
+
+### Select
+
+The variant and color are now the same for `button` and `listbox` slots.
+
+If you want to use a different variant for a specific slot, use `slotProps`. In the following example, the `listbox` slot uses the `plain` variant:
+
+```js
+
+```
diff --git a/docs/data/joy/pages.ts b/docs/data/joy/pages.ts
index d5b164b9571eb7..4dcf29308805af 100644
--- a/docs/data/joy/pages.ts
+++ b/docs/data/joy/pages.ts
@@ -167,6 +167,17 @@ const pages: readonly MuiPage[] = [
},
],
},
+ {
+ pathname: '/joy-ui/migration',
+ title: 'Migration',
+ icon: standardNavIcons.BookIcon,
+ children: [
+ {
+ pathname: '/joy-ui/migration/migrating-default-theme',
+ title: 'Migrating the default theme',
+ },
+ ],
+ },
];
export default pages;
diff --git a/docs/pages/_document.js b/docs/pages/_document.js
index a88fd85330e2aa..89f61613f85824 100644
--- a/docs/pages/_document.js
+++ b/docs/pages/_document.js
@@ -81,7 +81,7 @@ export default class MyDocument extends Document {
{/* ========== Font preload (prevent font flash) ============= */}
diff --git a/docs/pages/experiments/joy/style-guide.tsx b/docs/pages/experiments/joy/style-guide.tsx
index c9c80cf1cdf4b7..81617dc1b3bbff 100644
--- a/docs/pages/experiments/joy/style-guide.tsx
+++ b/docs/pages/experiments/joy/style-guide.tsx
@@ -82,8 +82,8 @@ function ColorToken({ name, value }: { name: string; value: string }) {
boxShadow: 'sm',
}}
/>
- {name}
- {color}
+ {name}
+ {color}
);
}
@@ -98,7 +98,7 @@ function PaletteTokens() {
return (
{mounted && (
-
+
Palette ({colorScheme})
)}
@@ -144,7 +144,7 @@ function TypographyScale() {
const { typography } = useTheme();
return (
-
+
Typography
@@ -186,14 +186,14 @@ export default function JoyStyleGuide() {
-
+
UI Patterns
List item title
- Secondary text.
+ Secondary text.
@@ -201,17 +201,17 @@ export default function JoyStyleGuide() {
List item title
- Secondary text.
+ Secondary text.
- metadata
+ metadata
List item title
- Secondary text.
- metadata
+ Secondary text.
+ metadata
diff --git a/docs/pages/joy-ui/api/alert.json b/docs/pages/joy-ui/api/alert.json
index 2753e56171c1a0..695e6959608ae3 100644
--- a/docs/pages/joy-ui/api/alert.json
+++ b/docs/pages/joy-ui/api/alert.json
@@ -3,9 +3,9 @@
"color": {
"type": {
"name": "union",
- "description": "'danger'
| 'info'
| 'neutral'
| 'primary'
| 'success'
| 'warning'
| string"
+ "description": "'danger'
| 'neutral'
| 'primary'
| 'success'
| 'warning'
| string"
},
- "default": "'primary'",
+ "default": "'neutral'",
"additionalPropsInfo": { "joy-color": true }
},
"component": { "type": { "name": "elementType" } },
@@ -48,7 +48,7 @@
"name": "union",
"description": "'outlined'
| 'plain'
| 'soft'
| 'solid'
| string"
},
- "default": "'soft'",
+ "default": "'outlined'",
"additionalPropsInfo": { "joy-variant": true }
}
},
@@ -78,7 +78,6 @@
"classes": [
"colorContext",
"colorDanger",
- "colorInfo",
"colorNeutral",
"colorPrimary",
"colorSuccess",
diff --git a/docs/pages/joy-ui/api/aspect-ratio.json b/docs/pages/joy-ui/api/aspect-ratio.json
index 830ca18eadd252..2d6a581e761121 100644
--- a/docs/pages/joy-ui/api/aspect-ratio.json
+++ b/docs/pages/joy-ui/api/aspect-ratio.json
@@ -4,7 +4,7 @@
"color": {
"type": {
"name": "enum",
- "description": "'danger'
| 'info'
| 'neutral'
| 'primary'
| 'success'
| 'warning'"
+ "description": "'danger'
| 'neutral'
| 'primary'
| 'success'
| 'warning'"
},
"default": "'neutral'",
"additionalPropsInfo": { "joy-color": true }
@@ -71,7 +71,6 @@
"classes": [
"colorContext",
"colorDanger",
- "colorInfo",
"colorNeutral",
"colorPrimary",
"colorSuccess",
diff --git a/docs/pages/joy-ui/api/autocomplete-listbox.json b/docs/pages/joy-ui/api/autocomplete-listbox.json
index a336dee2ec0ba1..dba79ad81f8108 100644
--- a/docs/pages/joy-ui/api/autocomplete-listbox.json
+++ b/docs/pages/joy-ui/api/autocomplete-listbox.json
@@ -3,7 +3,7 @@
"color": {
"type": {
"name": "union",
- "description": "'danger'
| 'info'
| 'neutral'
| 'primary'
| 'success'
| 'warning'
| string"
+ "description": "'danger'
| 'neutral'
| 'primary'
| 'success'
| 'warning'
| string"
},
"default": "'neutral'",
"additionalPropsInfo": { "joy-color": true }
@@ -53,7 +53,6 @@
"classes": [
"colorContext",
"colorDanger",
- "colorInfo",
"colorNeutral",
"colorPrimary",
"colorSuccess",
diff --git a/docs/pages/joy-ui/api/autocomplete-option.json b/docs/pages/joy-ui/api/autocomplete-option.json
index 3041e701c2a417..a181f215af0c31 100644
--- a/docs/pages/joy-ui/api/autocomplete-option.json
+++ b/docs/pages/joy-ui/api/autocomplete-option.json
@@ -3,7 +3,7 @@
"color": {
"type": {
"name": "union",
- "description": "'danger'
| 'info'
| 'neutral'
| 'primary'
| 'success'
| 'warning'
| string"
+ "description": "'danger'
| 'neutral'
| 'primary'
| 'success'
| 'warning'
| string"
},
"default": "'neutral'",
"additionalPropsInfo": { "joy-color": true }
@@ -48,7 +48,6 @@
"classes": [
"colorContext",
"colorDanger",
- "colorInfo",
"colorNeutral",
"colorPrimary",
"colorSuccess",
diff --git a/docs/pages/joy-ui/api/autocomplete.json b/docs/pages/joy-ui/api/autocomplete.json
index b04e59237babbc..5431feacfc7ea8 100644
--- a/docs/pages/joy-ui/api/autocomplete.json
+++ b/docs/pages/joy-ui/api/autocomplete.json
@@ -11,7 +11,7 @@
"color": {
"type": {
"name": "enum",
- "description": "'danger'
| 'info'
| 'neutral'
| 'primary'
| 'success'
| 'warning'"
+ "description": "'danger'
| 'neutral'
| 'primary'
| 'success'
| 'warning'"
},
"default": "'neutral'",
"additionalPropsInfo": { "joy-color": true }
@@ -257,7 +257,6 @@
"classes": [
"colorContext",
"colorDanger",
- "colorInfo",
"colorNeutral",
"colorPrimary",
"colorSuccess",
diff --git a/docs/pages/joy-ui/api/avatar-group.json b/docs/pages/joy-ui/api/avatar-group.json
index 95b6d2f5b2c220..1183d4760a7fb9 100644
--- a/docs/pages/joy-ui/api/avatar-group.json
+++ b/docs/pages/joy-ui/api/avatar-group.json
@@ -4,7 +4,7 @@
"color": {
"type": {
"name": "union",
- "description": "'danger'
| 'info'
| 'neutral'
| 'primary'
| 'success'
| 'warning'
| string"
+ "description": "'danger'
| 'neutral'
| 'primary'
| 'success'
| 'warning'
| string"
},
"default": "'neutral'",
"additionalPropsInfo": { "joy-color": true }
diff --git a/docs/pages/joy-ui/api/avatar.json b/docs/pages/joy-ui/api/avatar.json
index ad26f57143340d..1b5666bd0b3a70 100644
--- a/docs/pages/joy-ui/api/avatar.json
+++ b/docs/pages/joy-ui/api/avatar.json
@@ -5,7 +5,7 @@
"color": {
"type": {
"name": "union",
- "description": "'danger'
| 'info'
| 'neutral'
| 'primary'
| 'success'
| 'warning'
| string"
+ "description": "'danger'
| 'neutral'
| 'primary'
| 'success'
| 'warning'
| string"
},
"default": "'neutral'",
"additionalPropsInfo": { "joy-color": true }
@@ -78,7 +78,6 @@
"classes": [
"colorContext",
"colorDanger",
- "colorInfo",
"colorNeutral",
"colorPrimary",
"colorSuccess",
diff --git a/docs/pages/joy-ui/api/badge.json b/docs/pages/joy-ui/api/badge.json
index 9c722daed8f601..617ae96e602244 100644
--- a/docs/pages/joy-ui/api/badge.json
+++ b/docs/pages/joy-ui/api/badge.json
@@ -16,7 +16,7 @@
"color": {
"type": {
"name": "union",
- "description": "'danger'
| 'info'
| 'neutral'
| 'primary'
| 'success'
| 'warning'
| string"
+ "description": "'danger'
| 'neutral'
| 'primary'
| 'success'
| 'warning'
| string"
},
"default": "'primary'",
"additionalPropsInfo": { "joy-color": true }
@@ -85,7 +85,6 @@
"anchorOriginTopRight",
"colorContext",
"colorDanger",
- "colorInfo",
"colorNeutral",
"colorPrimary",
"colorSuccess",
diff --git a/docs/pages/joy-ui/api/button-group.json b/docs/pages/joy-ui/api/button-group.json
index 22bddea6f19af0..8a6c78ff29b02e 100644
--- a/docs/pages/joy-ui/api/button-group.json
+++ b/docs/pages/joy-ui/api/button-group.json
@@ -5,7 +5,7 @@
"color": {
"type": {
"name": "union",
- "description": "'danger'
| 'info'
| 'neutral'
| 'primary'
| 'success'
| 'warning'
| string"
+ "description": "'danger'
| 'neutral'
| 'primary'
| 'success'
| 'warning'
| string"
},
"default": "'neutral'",
"additionalPropsInfo": { "joy-color": true }
@@ -70,7 +70,6 @@
"classes": [
"colorContext",
"colorDanger",
- "colorInfo",
"colorNeutral",
"colorPrimary",
"colorSuccess",
diff --git a/docs/pages/joy-ui/api/button.json b/docs/pages/joy-ui/api/button.json
index 332bccad0bc0e6..1faf00e66beb2f 100644
--- a/docs/pages/joy-ui/api/button.json
+++ b/docs/pages/joy-ui/api/button.json
@@ -9,7 +9,7 @@
"color": {
"type": {
"name": "union",
- "description": "'danger'
| 'info'
| 'neutral'
| 'primary'
| 'success'
| 'warning'
| string"
+ "description": "'danger'
| 'neutral'
| 'primary'
| 'success'
| 'warning'
| string"
},
"default": "'primary'",
"additionalPropsInfo": { "joy-color": true }
@@ -99,7 +99,6 @@
"classes": [
"colorContext",
"colorDanger",
- "colorInfo",
"colorNeutral",
"colorPrimary",
"colorSuccess",
diff --git a/docs/pages/joy-ui/api/card-overflow.json b/docs/pages/joy-ui/api/card-overflow.json
index e5ce75742ed7fc..4d13ef3f79ded5 100644
--- a/docs/pages/joy-ui/api/card-overflow.json
+++ b/docs/pages/joy-ui/api/card-overflow.json
@@ -4,7 +4,7 @@
"color": {
"type": {
"name": "union",
- "description": "'danger'
| 'info'
| 'neutral'
| 'primary'
| 'success'
| 'warning'
| string"
+ "description": "'danger'
| 'neutral'
| 'primary'
| 'success'
| 'warning'
| string"
},
"default": "'neutral'",
"additionalPropsInfo": { "joy-color": true }
@@ -49,7 +49,6 @@
"classes": [
"colorContext",
"colorDanger",
- "colorInfo",
"colorNeutral",
"colorPrimary",
"colorSuccess",
diff --git a/docs/pages/joy-ui/api/card.json b/docs/pages/joy-ui/api/card.json
index bf8b449e08e339..ecfe2b8ac63f8d 100644
--- a/docs/pages/joy-ui/api/card.json
+++ b/docs/pages/joy-ui/api/card.json
@@ -4,7 +4,7 @@
"color": {
"type": {
"name": "union",
- "description": "'danger'
| 'info'
| 'neutral'
| 'primary'
| 'success'
| 'warning'
| string"
+ "description": "'danger'
| 'neutral'
| 'primary'
| 'success'
| 'warning'
| string"
},
"default": "'neutral'",
"additionalPropsInfo": { "joy-color": true }
@@ -62,7 +62,6 @@
"classes": [
"colorContext",
"colorDanger",
- "colorInfo",
"colorNeutral",
"colorPrimary",
"colorSuccess",
diff --git a/docs/pages/joy-ui/api/checkbox.json b/docs/pages/joy-ui/api/checkbox.json
index 8cff3e1262903b..d69a29b04f2354 100644
--- a/docs/pages/joy-ui/api/checkbox.json
+++ b/docs/pages/joy-ui/api/checkbox.json
@@ -6,7 +6,7 @@
"color": {
"type": {
"name": "union",
- "description": "'danger'
| 'info'
| 'neutral'
| 'primary'
| 'success'
| 'warning'
| string"
+ "description": "'danger'
| 'neutral'
| 'primary'
| 'success'
| 'warning'
| string"
},
"default": "'neutral'",
"additionalPropsInfo": { "joy-color": true }
@@ -111,7 +111,6 @@
"checked",
"colorContext",
"colorDanger",
- "colorInfo",
"colorNeutral",
"colorPrimary",
"colorSuccess",
diff --git a/docs/pages/joy-ui/api/chip-delete.json b/docs/pages/joy-ui/api/chip-delete.json
index 837886548aa7d2..6be1a624b0d34c 100644
--- a/docs/pages/joy-ui/api/chip-delete.json
+++ b/docs/pages/joy-ui/api/chip-delete.json
@@ -4,9 +4,9 @@
"color": {
"type": {
"name": "union",
- "description": "'danger'
| 'info'
| 'neutral'
| 'primary'
| 'success'
| 'warning'
| string"
+ "description": "'danger'
| 'neutral'
| 'primary'
| 'success'
| 'warning'
| string"
},
- "default": "'primary'",
+ "default": "'neutral'",
"additionalPropsInfo": { "joy-color": true }
},
"component": { "type": { "name": "elementType" } },
@@ -33,7 +33,7 @@
"name": "union",
"description": "'outlined'
| 'plain'
| 'soft'
| 'solid'
| string"
},
- "default": "'solid'",
+ "default": "'plain'",
"additionalPropsInfo": { "joy-variant": true }
}
},
@@ -51,7 +51,6 @@
"classes": [
"colorContext",
"colorDanger",
- "colorInfo",
"colorNeutral",
"colorPrimary",
"colorSuccess",
diff --git a/docs/pages/joy-ui/api/chip.json b/docs/pages/joy-ui/api/chip.json
index 118fcfadd6ada7..a18830ac7b2c85 100644
--- a/docs/pages/joy-ui/api/chip.json
+++ b/docs/pages/joy-ui/api/chip.json
@@ -4,9 +4,9 @@
"color": {
"type": {
"name": "union",
- "description": "'danger'
| 'info'
| 'neutral'
| 'primary'
| 'success'
| 'warning'
| string"
+ "description": "'danger'
| 'neutral'
| 'primary'
| 'success'
| 'warning'
| string"
},
- "default": "'primary'",
+ "default": "'neutral'",
"additionalPropsInfo": { "joy-color": true }
},
"component": { "type": { "name": "elementType" } },
@@ -49,7 +49,7 @@
"name": "union",
"description": "'outlined'
| 'plain'
| 'soft'
| 'solid'
| string"
},
- "default": "'solid'",
+ "default": "'soft'",
"additionalPropsInfo": { "joy-variant": true }
}
},
@@ -91,7 +91,6 @@
"classes": [
"colorContext",
"colorDanger",
- "colorInfo",
"colorNeutral",
"colorPrimary",
"colorSuccess",
diff --git a/docs/pages/joy-ui/api/circular-progress.json b/docs/pages/joy-ui/api/circular-progress.json
index 7660f2a49b6d3f..cde1cf42455de7 100644
--- a/docs/pages/joy-ui/api/circular-progress.json
+++ b/docs/pages/joy-ui/api/circular-progress.json
@@ -3,7 +3,7 @@
"color": {
"type": {
"name": "union",
- "description": "'danger'
| 'info'
| 'neutral'
| 'primary'
| 'success'
| 'warning'
| string"
+ "description": "'danger'
| 'neutral'
| 'primary'
| 'success'
| 'warning'
| string"
},
"default": "'primary'",
"additionalPropsInfo": { "joy-color": true }
@@ -83,7 +83,6 @@
"classes": [
"colorContext",
"colorDanger",
- "colorInfo",
"colorNeutral",
"colorPrimary",
"colorSuccess",
diff --git a/docs/pages/joy-ui/api/form-control.json b/docs/pages/joy-ui/api/form-control.json
index 4667712ee81bb5..22141ae05438fc 100644
--- a/docs/pages/joy-ui/api/form-control.json
+++ b/docs/pages/joy-ui/api/form-control.json
@@ -4,7 +4,7 @@
"color": {
"type": {
"name": "union",
- "description": "'danger'
| 'info'
| 'neutral'
| 'primary'
| 'success'
| 'warning'
| string"
+ "description": "'danger'
| 'neutral'
| 'primary'
| 'success'
| 'warning'
| string"
},
"additionalPropsInfo": { "joy-color": true }
},
@@ -54,7 +54,6 @@
"classes": {
"classes": [
"colorDanger",
- "colorInfo",
"colorNeutral",
"colorPrimary",
"colorSuccess",
diff --git a/docs/pages/joy-ui/api/icon-button.json b/docs/pages/joy-ui/api/icon-button.json
index 58ab8a62293624..60ca611ac4664d 100644
--- a/docs/pages/joy-ui/api/icon-button.json
+++ b/docs/pages/joy-ui/api/icon-button.json
@@ -9,9 +9,9 @@
"color": {
"type": {
"name": "union",
- "description": "'danger'
| 'info'
| 'neutral'
| 'primary'
| 'success'
| 'warning'
| string"
+ "description": "'danger'
| 'neutral'
| 'primary'
| 'success'
| 'warning'
| string"
},
- "default": "'primary'",
+ "default": "'neutral'",
"additionalPropsInfo": { "joy-color": true }
},
"component": { "type": { "name": "elementType" } },
@@ -46,7 +46,7 @@
"name": "union",
"description": "'outlined'
| 'plain'
| 'soft'
| 'solid'
| string"
},
- "default": "'soft'",
+ "default": "'plain'",
"additionalPropsInfo": { "joy-variant": true }
}
},
@@ -64,7 +64,6 @@
"classes": [
"colorContext",
"colorDanger",
- "colorInfo",
"colorNeutral",
"colorPrimary",
"colorSuccess",
diff --git a/docs/pages/joy-ui/api/input.json b/docs/pages/joy-ui/api/input.json
index 0650df01c7e0ee..493096137879f4 100644
--- a/docs/pages/joy-ui/api/input.json
+++ b/docs/pages/joy-ui/api/input.json
@@ -4,7 +4,7 @@
"color": {
"type": {
"name": "union",
- "description": "'danger'
| 'info'
| 'neutral'
| 'primary'
| 'success'
| 'warning'
| string"
+ "description": "'danger'
| 'neutral'
| 'primary'
| 'success'
| 'warning'
| string"
},
"additionalPropsInfo": { "joy-color": true }
},
@@ -66,7 +66,6 @@
"classes": [
"colorContext",
"colorDanger",
- "colorInfo",
"colorNeutral",
"colorPrimary",
"colorSuccess",
diff --git a/docs/pages/joy-ui/api/linear-progress.json b/docs/pages/joy-ui/api/linear-progress.json
index ed33ade02d1643..7c1ed4aacec1c8 100644
--- a/docs/pages/joy-ui/api/linear-progress.json
+++ b/docs/pages/joy-ui/api/linear-progress.json
@@ -3,7 +3,7 @@
"color": {
"type": {
"name": "union",
- "description": "'danger'
| 'info'
| 'neutral'
| 'primary'
| 'success'
| 'warning'
| string"
+ "description": "'danger'
| 'neutral'
| 'primary'
| 'success'
| 'warning'
| string"
},
"default": "'primary'",
"additionalPropsInfo": { "joy-color": true }
@@ -59,7 +59,6 @@
"classes": [
"colorContext",
"colorDanger",
- "colorInfo",
"colorNeutral",
"colorPrimary",
"colorSuccess",
diff --git a/docs/pages/joy-ui/api/link.json b/docs/pages/joy-ui/api/link.json
index 976f2e9c61332d..1fbf519fa5dd60 100644
--- a/docs/pages/joy-ui/api/link.json
+++ b/docs/pages/joy-ui/api/link.json
@@ -4,7 +4,7 @@
"color": {
"type": {
"name": "union",
- "description": "'danger'
| 'info'
| 'neutral'
| 'primary'
| 'success'
| 'warning'
| string"
+ "description": "'danger'
| 'neutral'
| 'primary'
| 'success'
| 'warning'
| string"
},
"default": "'primary'",
"additionalPropsInfo": { "joy-color": true }
@@ -17,7 +17,7 @@
"name": "union",
"description": "'body1'
| 'body2'
| 'body3'
| 'h1'
| 'h2'
| 'h3'
| 'h4'
| 'h5'
| 'h6'
| 'inherit'
| string"
},
- "default": "'body1'"
+ "default": "'body-md'"
},
"overlay": { "type": { "name": "bool" }, "default": "false" },
"slotProps": {
@@ -84,12 +84,12 @@
],
"classes": {
"classes": [
- "body1",
- "body2",
- "body3",
+ "body-lg",
+ "body-md",
+ "body-sm",
+ "body-xs",
"colorContext",
"colorDanger",
- "colorInfo",
"colorNeutral",
"colorPrimary",
"colorSuccess",
@@ -100,8 +100,9 @@
"h2",
"h3",
"h4",
- "h5",
- "h6",
+ "title-lg",
+ "title-md",
+ "title-sm",
"underlineAlways",
"underlineHover",
"underlineNone",
diff --git a/docs/pages/joy-ui/api/list-item-button.json b/docs/pages/joy-ui/api/list-item-button.json
index fb62bed1fe3c6a..25ba7019e94a81 100644
--- a/docs/pages/joy-ui/api/list-item-button.json
+++ b/docs/pages/joy-ui/api/list-item-button.json
@@ -11,9 +11,9 @@
"color": {
"type": {
"name": "union",
- "description": "'danger'
| 'info'
| 'neutral'
| 'primary'
| 'success'
| 'warning'
| string"
+ "description": "'danger'
| 'neutral'
| 'primary'
| 'success'
| 'warning'
| string"
},
- "default": "selected ? 'primary' : 'neutral'",
+ "default": "'neutral'",
"additionalPropsInfo": { "joy-color": true }
},
"component": { "type": { "name": "elementType" } },
@@ -63,7 +63,6 @@
"classes": [
"colorContext",
"colorDanger",
- "colorInfo",
"colorNeutral",
"colorPrimary",
"colorSuccess",
diff --git a/docs/pages/joy-ui/api/list-item.json b/docs/pages/joy-ui/api/list-item.json
index 7c43b32cd6c54c..10e902b521a45f 100644
--- a/docs/pages/joy-ui/api/list-item.json
+++ b/docs/pages/joy-ui/api/list-item.json
@@ -4,7 +4,7 @@
"color": {
"type": {
"name": "union",
- "description": "'danger'
| 'info'
| 'neutral'
| 'primary'
| 'success'
| 'warning'
| string"
+ "description": "'danger'
| 'neutral'
| 'primary'
| 'success'
| 'warning'
| string"
},
"default": "'neutral'",
"additionalPropsInfo": { "joy-color": true }
@@ -71,7 +71,6 @@
"classes": [
"colorContext",
"colorDanger",
- "colorInfo",
"colorNeutral",
"colorPrimary",
"colorSuccess",
diff --git a/docs/pages/joy-ui/api/list-subheader.json b/docs/pages/joy-ui/api/list-subheader.json
index f5b2888758acf0..28d0f2da4f851e 100644
--- a/docs/pages/joy-ui/api/list-subheader.json
+++ b/docs/pages/joy-ui/api/list-subheader.json
@@ -4,7 +4,7 @@
"color": {
"type": {
"name": "union",
- "description": "'danger'
| 'info'
| 'neutral'
| 'primary'
| 'success'
| 'warning'
| string"
+ "description": "'danger'
| 'neutral'
| 'primary'
| 'success'
| 'warning'
| string"
},
"additionalPropsInfo": { "joy-color": true }
},
@@ -48,7 +48,6 @@
"classes": [
"colorContext",
"colorDanger",
- "colorInfo",
"colorNeutral",
"colorPrimary",
"colorSuccess",
diff --git a/docs/pages/joy-ui/api/list.json b/docs/pages/joy-ui/api/list.json
index 64ddc743a7ba9f..1d137ab4873ed4 100644
--- a/docs/pages/joy-ui/api/list.json
+++ b/docs/pages/joy-ui/api/list.json
@@ -4,7 +4,7 @@
"color": {
"type": {
"name": "union",
- "description": "'danger'
| 'info'
| 'neutral'
| 'primary'
| 'success'
| 'warning'
| string"
+ "description": "'danger'
| 'neutral'
| 'primary'
| 'success'
| 'warning'
| string"
},
"default": "'neutral'",
"additionalPropsInfo": { "joy-color": true }
@@ -62,7 +62,6 @@
"classes": [
"colorContext",
"colorDanger",
- "colorInfo",
"colorNeutral",
"colorPrimary",
"colorSuccess",
diff --git a/docs/pages/joy-ui/api/menu-item.json b/docs/pages/joy-ui/api/menu-item.json
index 14b26d228e13d8..373df5b0c4aae9 100644
--- a/docs/pages/joy-ui/api/menu-item.json
+++ b/docs/pages/joy-ui/api/menu-item.json
@@ -4,9 +4,9 @@
"color": {
"type": {
"name": "union",
- "description": "'danger'
| 'info'
| 'neutral'
| 'primary'
| 'success'
| 'warning'
| string"
+ "description": "'danger'
| 'neutral'
| 'primary'
| 'success'
| 'warning'
| string"
},
- "default": "selected ? 'primary' : 'neutral'",
+ "default": "'neutral'",
"additionalPropsInfo": { "joy-color": true }
},
"orientation": {
@@ -46,7 +46,6 @@
"classes": [
"colorContext",
"colorDanger",
- "colorInfo",
"colorNeutral",
"colorPrimary",
"colorSuccess",
diff --git a/docs/pages/joy-ui/api/menu-list.json b/docs/pages/joy-ui/api/menu-list.json
index 77cbc6f45d9218..c3898c9eed9384 100644
--- a/docs/pages/joy-ui/api/menu-list.json
+++ b/docs/pages/joy-ui/api/menu-list.json
@@ -4,7 +4,7 @@
"color": {
"type": {
"name": "union",
- "description": "'danger'
| 'info'
| 'neutral'
| 'primary'
| 'success'
| 'warning'
| string"
+ "description": "'danger'
| 'neutral'
| 'primary'
| 'success'
| 'warning'
| string"
},
"default": "'neutral'",
"additionalPropsInfo": { "joy-color": true }
@@ -58,7 +58,6 @@
"classes": [
"colorContext",
"colorDanger",
- "colorInfo",
"colorNeutral",
"colorPrimary",
"colorSuccess",
diff --git a/docs/pages/joy-ui/api/menu.json b/docs/pages/joy-ui/api/menu.json
index 3279626284709e..da46dd0cb14e4f 100644
--- a/docs/pages/joy-ui/api/menu.json
+++ b/docs/pages/joy-ui/api/menu.json
@@ -4,7 +4,7 @@
"color": {
"type": {
"name": "enum",
- "description": "'danger'
| 'info'
| 'neutral'
| 'primary'
| 'success'
| 'warning'"
+ "description": "'danger'
| 'neutral'
| 'primary'
| 'success'
| 'warning'"
},
"default": "'neutral'",
"additionalPropsInfo": { "joy-color": true }
@@ -69,7 +69,6 @@
"classes": [
"colorContext",
"colorDanger",
- "colorInfo",
"colorNeutral",
"colorPrimary",
"colorSuccess",
diff --git a/docs/pages/joy-ui/api/modal-close.json b/docs/pages/joy-ui/api/modal-close.json
index 628bee8057bc26..84479ee68c2493 100644
--- a/docs/pages/joy-ui/api/modal-close.json
+++ b/docs/pages/joy-ui/api/modal-close.json
@@ -3,7 +3,7 @@
"color": {
"type": {
"name": "union",
- "description": "'danger'
| 'info'
| 'neutral'
| 'primary'
| 'success'
| 'warning'
| string"
+ "description": "'danger'
| 'neutral'
| 'primary'
| 'success'
| 'warning'
| string"
},
"default": "'neutral'",
"additionalPropsInfo": { "joy-color": true }
@@ -56,7 +56,6 @@
"classes": [
"colorContext",
"colorDanger",
- "colorInfo",
"colorNeutral",
"colorPrimary",
"colorSuccess",
diff --git a/docs/pages/joy-ui/api/modal-dialog.json b/docs/pages/joy-ui/api/modal-dialog.json
index 9dca67ddad47b9..45f07810fe68e3 100644
--- a/docs/pages/joy-ui/api/modal-dialog.json
+++ b/docs/pages/joy-ui/api/modal-dialog.json
@@ -4,7 +4,7 @@
"color": {
"type": {
"name": "union",
- "description": "'danger'
| 'info'
| 'neutral'
| 'primary'
| 'success'
| 'warning'
| string"
+ "description": "'danger'
| 'neutral'
| 'primary'
| 'success'
| 'warning'
| string"
},
"default": "'neutral'",
"additionalPropsInfo": { "joy-color": true }
@@ -64,7 +64,6 @@
"classes": [
"colorContext",
"colorDanger",
- "colorInfo",
"colorNeutral",
"colorPrimary",
"colorSuccess",
diff --git a/docs/pages/joy-ui/api/option.json b/docs/pages/joy-ui/api/option.json
index f1e1061b5d59b2..2cfa9b8e066242 100644
--- a/docs/pages/joy-ui/api/option.json
+++ b/docs/pages/joy-ui/api/option.json
@@ -5,7 +5,7 @@
"color": {
"type": {
"name": "union",
- "description": "'danger'
| 'info'
| 'neutral'
| 'primary'
| 'success'
| 'warning'
| string"
+ "description": "'danger'
| 'neutral'
| 'primary'
| 'success'
| 'warning'
| string"
},
"default": "'neutral'",
"additionalPropsInfo": { "joy-color": true }
@@ -52,7 +52,6 @@
"classes": [
"colorContext",
"colorDanger",
- "colorInfo",
"colorNeutral",
"colorPrimary",
"colorSuccess",
diff --git a/docs/pages/joy-ui/api/radio-group.json b/docs/pages/joy-ui/api/radio-group.json
index 7cc46be41150c9..c12aa4139a9b54 100644
--- a/docs/pages/joy-ui/api/radio-group.json
+++ b/docs/pages/joy-ui/api/radio-group.json
@@ -4,7 +4,7 @@
"color": {
"type": {
"name": "union",
- "description": "'danger'
| 'info'
| 'primary'
| 'success'
| 'warning'
| string"
+ "description": "'danger'
| 'primary'
| 'success'
| 'warning'
| string"
},
"default": "'neutral'",
"additionalPropsInfo": { "joy-color": true }
@@ -72,7 +72,6 @@
"classes": {
"classes": [
"colorDanger",
- "colorInfo",
"colorNeutral",
"colorPrimary",
"colorSuccess",
diff --git a/docs/pages/joy-ui/api/radio.json b/docs/pages/joy-ui/api/radio.json
index db3bf46737ad1b..b2b12a3a0f8dd9 100644
--- a/docs/pages/joy-ui/api/radio.json
+++ b/docs/pages/joy-ui/api/radio.json
@@ -6,7 +6,7 @@
"color": {
"type": {
"name": "union",
- "description": "'danger'
| 'info'
| 'primary'
| 'success'
| 'warning'
| string"
+ "description": "'danger'
| 'primary'
| 'success'
| 'warning'
| string"
},
"default": "'neutral'",
"additionalPropsInfo": { "joy-color": true }
@@ -113,7 +113,6 @@
"checked",
"colorContext",
"colorDanger",
- "colorInfo",
"colorNeutral",
"colorPrimary",
"colorSuccess",
diff --git a/docs/pages/joy-ui/api/select.json b/docs/pages/joy-ui/api/select.json
index ff5f12eb224a45..4e9b8d2ce3b9ad 100644
--- a/docs/pages/joy-ui/api/select.json
+++ b/docs/pages/joy-ui/api/select.json
@@ -10,7 +10,7 @@
"color": {
"type": {
"name": "union",
- "description": "'danger'
| 'info'
| 'neutral'
| 'primary'
| 'success'
| 'warning'
| string"
+ "description": "'danger'
| 'neutral'
| 'primary'
| 'success'
| 'warning'
| string"
},
"additionalPropsInfo": { "joy-color": true }
},
@@ -104,7 +104,6 @@
"classes": [
"colorContext",
"colorDanger",
- "colorInfo",
"colorNeutral",
"colorPrimary",
"colorSuccess",
diff --git a/docs/pages/joy-ui/api/sheet.json b/docs/pages/joy-ui/api/sheet.json
index ddfee8c810b0da..aea3d5a1cbb28e 100644
--- a/docs/pages/joy-ui/api/sheet.json
+++ b/docs/pages/joy-ui/api/sheet.json
@@ -4,7 +4,7 @@
"color": {
"type": {
"name": "union",
- "description": "'danger'
| 'info'
| 'neutral'
| 'primary'
| 'success'
| 'warning'
| string"
+ "description": "'danger'
| 'neutral'
| 'primary'
| 'success'
| 'warning'
| string"
},
"default": "'neutral'",
"additionalPropsInfo": { "joy-color": true }
@@ -50,7 +50,6 @@
"classes": [
"colorContext",
"colorDanger",
- "colorInfo",
"colorNeutral",
"colorPrimary",
"colorSuccess",
diff --git a/docs/pages/joy-ui/api/skeleton.json b/docs/pages/joy-ui/api/skeleton.json
index 4473b77a5e93d1..27ca56758ad87c 100644
--- a/docs/pages/joy-ui/api/skeleton.json
+++ b/docs/pages/joy-ui/api/skeleton.json
@@ -18,9 +18,9 @@
"level": {
"type": {
"name": "union",
- "description": "'body1'
| 'body2'
| 'body3'
| 'h1'
| 'h2'
| 'h3'
| 'h4'
| 'h5'
| 'h6'
| 'inherit'
| string"
+ "description": "'h1'
| 'h2'
| 'h3'
| 'h4'
| 'title-lg'
| 'title-md'
| 'title-sm'
| 'body-lg'
| 'body-md'
| 'body-sm'
| 'body-xs'
| 'inherit'
| string"
},
- "default": "variant === 'text' ? 'body1' : 'inherit'"
+ "default": "variant === 'text' ? 'body-md' : 'inherit'"
},
"loading": { "type": { "name": "bool" }, "default": "true" },
"overlay": { "type": { "name": "bool" }, "default": "false" },
@@ -67,15 +67,17 @@
],
"classes": {
"classes": [
- "body1",
- "body2",
- "body3",
+ "body-lg",
+ "body-md",
+ "body-sm",
+ "body-xs",
"h1",
"h2",
"h3",
"h4",
- "h5",
- "h6",
+ "title-lg",
+ "title-md",
+ "title-sm",
"variantCircular",
"variantInline",
"variantOverlay",
diff --git a/docs/pages/joy-ui/api/slider.json b/docs/pages/joy-ui/api/slider.json
index 7695fe81a7e8f2..7edfe1d4c0c032 100644
--- a/docs/pages/joy-ui/api/slider.json
+++ b/docs/pages/joy-ui/api/slider.json
@@ -6,7 +6,7 @@
"color": {
"type": {
"name": "union",
- "description": "'danger'
| 'info'
| 'neutral'
| 'primary'
| 'success'
| 'warning'
| string"
+ "description": "'danger'
| 'neutral'
| 'primary'
| 'success'
| 'warning'
| string"
},
"default": "'primary'",
"additionalPropsInfo": { "joy-color": true }
@@ -177,7 +177,6 @@
"classes": [
"colorContext",
"colorDanger",
- "colorInfo",
"colorNeutral",
"colorPrimary",
"colorSuccess",
diff --git a/docs/pages/joy-ui/api/svg-icon.json b/docs/pages/joy-ui/api/svg-icon.json
index 005b40fdfab8bb..3f8db08e540805 100644
--- a/docs/pages/joy-ui/api/svg-icon.json
+++ b/docs/pages/joy-ui/api/svg-icon.json
@@ -4,22 +4,28 @@
"color": {
"type": {
"name": "union",
- "description": "'danger'
| 'info'
| 'inherit'
| 'neutral'
| 'primary'
| 'success'
| 'warning'
| string"
+ "description": "'danger'
| 'inherit'
| 'neutral'
| 'primary'
| 'success'
| 'warning'
| string"
},
- "default": "'inherit'",
"additionalPropsInfo": { "joy-color": true }
},
"component": { "type": { "name": "elementType" } },
"fontSize": {
"type": {
- "name": "enum",
- "description": "'inherit'
| 'lg'
| 'md'
| 'sm'
| 'xl'
| 'xl2'
| 'xl3'
| 'xl4'
| 'xl5'
| 'xl6'
| 'xl7'
| 'xs'
| 'xs2'
| 'xs3'"
- },
- "default": "'xl'"
+ "name": "union",
+ "description": "'inherit'
| 'lg'
| 'md'
| 'sm'
| 'xl'
| 'xl2'
| 'xl3'
| 'xl4'
| 'xs'
| string"
+ }
},
"htmlColor": { "type": { "name": "string" } },
"inheritViewBox": { "type": { "name": "bool" }, "default": "false" },
"shapeRendering": { "type": { "name": "string" } },
+ "size": {
+ "type": {
+ "name": "union",
+ "description": "'sm'
| 'md'
| 'lg'
| string"
+ },
+ "default": "'md'",
+ "additionalPropsInfo": { "joy-size": true }
+ },
"slotProps": {
"type": { "name": "shape", "description": "{ root?: func
| object }" },
"default": "{}"
@@ -52,7 +58,6 @@
"classes": {
"classes": [
"colorDanger",
- "colorInfo",
"colorInherit",
"colorNeutral",
"colorPrimary",
@@ -66,9 +71,10 @@
"fontSizeXl2",
"fontSizeXl3",
"fontSizeXl4",
- "fontSizeXl5",
- "fontSizeXl6",
- "fontSizeXs"
+ "fontSizeXs",
+ "sizeLg",
+ "sizeMd",
+ "sizeSm"
],
"globalClasses": {}
},
diff --git a/docs/pages/joy-ui/api/switch.json b/docs/pages/joy-ui/api/switch.json
index f4567e2ba68637..47fb120e9bdfca 100644
--- a/docs/pages/joy-ui/api/switch.json
+++ b/docs/pages/joy-ui/api/switch.json
@@ -4,7 +4,7 @@
"color": {
"type": {
"name": "union",
- "description": "'danger'
| 'info'
| 'primary'
| 'success'
| 'warning'
| string"
+ "description": "'danger'
| 'primary'
| 'success'
| 'warning'
| string"
},
"default": "'neutral'",
"additionalPropsInfo": { "joy-color": true }
@@ -113,7 +113,6 @@
"checked",
"colorContext",
"colorDanger",
- "colorInfo",
"colorPrimary",
"colorSuccess",
"colorWarning",
diff --git a/docs/pages/joy-ui/api/tab-list.json b/docs/pages/joy-ui/api/tab-list.json
index 829af4c4115d0b..8b3a9a83341d85 100644
--- a/docs/pages/joy-ui/api/tab-list.json
+++ b/docs/pages/joy-ui/api/tab-list.json
@@ -4,12 +4,13 @@
"color": {
"type": {
"name": "union",
- "description": "'danger'
| 'info'
| 'neutral'
| 'primary'
| 'success'
| 'warning'
| string"
+ "description": "'danger'
| 'neutral'
| 'primary'
| 'success'
| 'warning'
| string"
},
"default": "'neutral'",
"additionalPropsInfo": { "joy-color": true }
},
"component": { "type": { "name": "elementType" } },
+ "disableUnderline": { "type": { "name": "bool" }, "default": "false" },
"size": {
"type": {
"name": "union",
@@ -26,6 +27,7 @@
"default": "{}",
"additionalPropsInfo": { "slotsApi": true }
},
+ "sticky": { "type": { "name": "enum", "description": "'bottom'
| 'top'" } },
"sx": {
"type": {
"name": "union",
@@ -33,12 +35,20 @@
},
"additionalPropsInfo": { "sx": true }
},
+ "tabFlex": { "type": { "name": "union", "description": "number
| string" } },
+ "underlinePlacement": {
+ "type": {
+ "name": "enum",
+ "description": "'bottom'
| 'left'
| 'right'
| 'top'"
+ },
+ "default": "orientation === 'horizontal' ? 'bottom' : 'right'"
+ },
"variant": {
"type": {
"name": "union",
"description": "'outlined'
| 'plain'
| 'soft'
| 'solid'
| string"
},
- "default": "'soft'",
+ "default": "'plain'",
"additionalPropsInfo": { "joy-variant": true }
}
},
@@ -56,7 +66,6 @@
"classes": [
"colorContext",
"colorDanger",
- "colorInfo",
"colorNeutral",
"colorPrimary",
"colorSuccess",
diff --git a/docs/pages/joy-ui/api/tab-panel.json b/docs/pages/joy-ui/api/tab-panel.json
index f46ba696bc6a11..3a6ad7f9eadbbf 100644
--- a/docs/pages/joy-ui/api/tab-panel.json
+++ b/docs/pages/joy-ui/api/tab-panel.json
@@ -1,6 +1,14 @@
{
"props": {
"children": { "type": { "name": "node" } },
+ "color": {
+ "type": {
+ "name": "union",
+ "description": "'danger'
| 'neutral'
| 'primary'
| 'success'
| 'warning'
| string"
+ },
+ "default": "'neutral'",
+ "additionalPropsInfo": { "joy-color": true }
+ },
"component": { "type": { "name": "elementType" } },
"size": {
"type": {
@@ -28,6 +36,14 @@
"value": {
"type": { "name": "union", "description": "number
| string" },
"default": "0"
+ },
+ "variant": {
+ "type": {
+ "name": "union",
+ "description": "'outlined'
| 'plain'
| 'soft'
| 'solid'
| string"
+ },
+ "default": "'plain'",
+ "additionalPropsInfo": { "joy-variant": true }
}
},
"name": "TabPanel",
@@ -41,7 +57,24 @@
}
],
"classes": {
- "classes": ["hidden", "horizontal", "sizeLg", "sizeMd", "sizeSm", "vertical"],
+ "classes": [
+ "colorContext",
+ "colorDanger",
+ "colorNeutral",
+ "colorPrimary",
+ "colorSuccess",
+ "colorWarning",
+ "hidden",
+ "horizontal",
+ "sizeLg",
+ "sizeMd",
+ "sizeSm",
+ "variantOutlined",
+ "variantPlain",
+ "variantSoft",
+ "variantSolid",
+ "vertical"
+ ],
"globalClasses": {}
},
"spread": true,
diff --git a/docs/pages/joy-ui/api/tab.json b/docs/pages/joy-ui/api/tab.json
index beb6f52b6a099d..d3716789903c42 100644
--- a/docs/pages/joy-ui/api/tab.json
+++ b/docs/pages/joy-ui/api/tab.json
@@ -9,13 +9,22 @@
"color": {
"type": {
"name": "union",
- "description": "'danger'
| 'info'
| 'neutral'
| 'primary'
| 'success'
| 'warning'
| string"
+ "description": "'danger'
| 'neutral'
| 'primary'
| 'success'
| 'warning'
| string"
},
"default": "'neutral'",
"additionalPropsInfo": { "joy-color": true }
},
"component": { "type": { "name": "elementType" } },
"disabled": { "type": { "name": "bool" }, "default": "false" },
+ "disableIndicator": { "type": { "name": "bool" }, "default": "false" },
+ "indicatorInset": { "type": { "name": "bool" } },
+ "indicatorPlacement": {
+ "type": {
+ "name": "enum",
+ "description": "'bottom'
| 'left'
| 'right'
| 'top'"
+ },
+ "default": "row ? 'bottom' : 'right'"
+ },
"onChange": { "type": { "name": "func" } },
"orientation": {
"type": { "name": "enum", "description": "'horizontal'
| 'vertical'" },
@@ -61,7 +70,6 @@
"classes": [
"colorContext",
"colorDanger",
- "colorInfo",
"colorNeutral",
"colorPrimary",
"colorSuccess",
diff --git a/docs/pages/joy-ui/api/table.json b/docs/pages/joy-ui/api/table.json
index 1dcb3df8f94f85..0cb2bf0fd68c9f 100644
--- a/docs/pages/joy-ui/api/table.json
+++ b/docs/pages/joy-ui/api/table.json
@@ -11,7 +11,7 @@
"color": {
"type": {
"name": "union",
- "description": "'danger'
| 'info'
| 'neutral'
| 'primary'
| 'success'
| 'warning'
| string"
+ "description": "'danger'
| 'neutral'
| 'primary'
| 'success'
| 'warning'
| string"
},
"default": "'neutral'",
"additionalPropsInfo": { "joy-color": true }
@@ -81,7 +81,6 @@
"borderAxisYBetween",
"colorContext",
"colorDanger",
- "colorInfo",
"colorNeutral",
"colorPrimary",
"colorSuccess",
diff --git a/docs/pages/joy-ui/api/tabs.json b/docs/pages/joy-ui/api/tabs.json
index 12cad4dbc26ab3..4e1524851b2981 100644
--- a/docs/pages/joy-ui/api/tabs.json
+++ b/docs/pages/joy-ui/api/tabs.json
@@ -4,7 +4,7 @@
"color": {
"type": {
"name": "union",
- "description": "'danger'
| 'info'
| 'neutral'
| 'primary'
| 'success'
| 'warning'
| string"
+ "description": "'danger'
| 'neutral'
| 'primary'
| 'success'
| 'warning'
| string"
},
"default": "'neutral'",
"additionalPropsInfo": { "joy-color": true }
@@ -69,7 +69,6 @@
"classes": [
"colorContext",
"colorDanger",
- "colorInfo",
"colorNeutral",
"colorPrimary",
"colorSuccess",
diff --git a/docs/pages/joy-ui/api/textarea.json b/docs/pages/joy-ui/api/textarea.json
index 85665163ec2bb4..0028d06f5d5924 100644
--- a/docs/pages/joy-ui/api/textarea.json
+++ b/docs/pages/joy-ui/api/textarea.json
@@ -3,7 +3,7 @@
"color": {
"type": {
"name": "union",
- "description": "'danger'
| 'info'
| 'neutral'
| 'primary'
| 'success'
| 'warning'
| string"
+ "description": "'danger'
| 'neutral'
| 'primary'
| 'success'
| 'warning'
| string"
},
"additionalPropsInfo": { "joy-color": true }
},
@@ -66,7 +66,6 @@
"classes": [
"colorContext",
"colorDanger",
- "colorInfo",
"colorNeutral",
"colorPrimary",
"colorSuccess",
diff --git a/docs/pages/joy-ui/api/toggle-button-group.json b/docs/pages/joy-ui/api/toggle-button-group.json
index 089bf9668842fe..a34e443f114a6f 100644
--- a/docs/pages/joy-ui/api/toggle-button-group.json
+++ b/docs/pages/joy-ui/api/toggle-button-group.json
@@ -77,7 +77,6 @@
"classes": [
"colorContext",
"colorDanger",
- "colorInfo",
"colorNeutral",
"colorPrimary",
"colorSuccess",
diff --git a/docs/pages/joy-ui/api/tooltip.json b/docs/pages/joy-ui/api/tooltip.json
index e456736a12bf44..0c640f7691fb3d 100644
--- a/docs/pages/joy-ui/api/tooltip.json
+++ b/docs/pages/joy-ui/api/tooltip.json
@@ -5,7 +5,7 @@
"color": {
"type": {
"name": "enum",
- "description": "'danger'
| 'info'
| 'neutral'
| 'primary'
| 'success'
| 'warning'"
+ "description": "'danger'
| 'neutral'
| 'primary'
| 'success'
| 'warning'"
},
"default": "'neutral'",
"additionalPropsInfo": { "joy-color": true }
@@ -111,7 +111,6 @@
"classes": [
"colorContext",
"colorDanger",
- "colorInfo",
"colorNeutral",
"colorPrimary",
"colorSuccess",
diff --git a/docs/pages/joy-ui/api/typography.json b/docs/pages/joy-ui/api/typography.json
index 7cf58eb5146d83..be5995fd3a8c51 100644
--- a/docs/pages/joy-ui/api/typography.json
+++ b/docs/pages/joy-ui/api/typography.json
@@ -4,7 +4,7 @@
"color": {
"type": {
"name": "union",
- "description": "'danger'
| 'info'
| 'neutral'
| 'primary'
| 'success'
| 'warning'
| string"
+ "description": "'danger'
| 'neutral'
| 'primary'
| 'success'
| 'warning'
| string"
},
"additionalPropsInfo": { "joy-color": true }
},
@@ -14,13 +14,13 @@
"level": {
"type": {
"name": "union",
- "description": "'body1'
| 'body2'
| 'body3'
| 'h1'
| 'h2'
| 'h3'
| 'h4'
| 'h5'
| 'h6'
| 'inherit'
| string"
+ "description": "'h1'
| 'h2'
| 'h3'
| 'h4'
| 'title-lg'
| 'title-md'
| 'title-sm'
| 'body-lg'
| 'body-md'
| 'body-sm'
| 'body-xs'
| 'inherit'
| string"
},
- "default": "'body1'"
+ "default": "'body-md'"
},
"levelMapping": {
"type": { "name": "object" },
- "default": "{\n h1: 'h1',\n h2: 'h2',\n h3: 'h3',\n h4: 'h4',\n h5: 'h5',\n h6: 'h6',\n body1: 'p',\n body2: 'p',\n body3: 'p',\n inherit: 'p',\n}"
+ "default": "{\n h1: 'h1',\n h2: 'h2',\n h3: 'h3',\n h4: 'h4',\n 'title-lg': 'p',\n 'title-md': 'p',\n 'title-sm': 'p',\n 'body-lg': 'p',\n 'body-md': 'p',\n 'body-sm': 'p',\n 'body-xs': 'span',\n inherit: 'p',\n}"
},
"noWrap": { "type": { "name": "bool" }, "default": "false" },
"slotProps": {
@@ -79,12 +79,12 @@
],
"classes": {
"classes": [
- "body1",
- "body2",
- "body3",
+ "body-lg",
+ "body-md",
+ "body-sm",
+ "body-xs",
"colorContext",
"colorDanger",
- "colorInfo",
"colorNeutral",
"colorPrimary",
"colorSuccess",
@@ -94,9 +94,10 @@
"h2",
"h3",
"h4",
- "h5",
- "h6",
"noWrap",
+ "title-lg",
+ "title-md",
+ "title-sm",
"variantOutlined",
"variantPlain",
"variantSoft",
diff --git a/docs/pages/joy-ui/migration/migrating-default-theme.js b/docs/pages/joy-ui/migration/migrating-default-theme.js
new file mode 100644
index 00000000000000..6e8f9e71a68bc1
--- /dev/null
+++ b/docs/pages/joy-ui/migration/migrating-default-theme.js
@@ -0,0 +1,7 @@
+import * as React from 'react';
+import MarkdownDocs from 'docs/src/modules/components/MarkdownDocs';
+import * as pageProps from 'docs/data/joy/migration/migrating-default-theme.md?@mui/markdown';
+
+export default function Page() {
+ return ;
+}
diff --git a/docs/public/static/screenshots/joy-ui/getting-started/templates/email-dark.jpg b/docs/public/static/screenshots/joy-ui/getting-started/templates/email-dark.jpg
index dfcacb98ae13f7..ac3fc00035e90c 100644
Binary files a/docs/public/static/screenshots/joy-ui/getting-started/templates/email-dark.jpg and b/docs/public/static/screenshots/joy-ui/getting-started/templates/email-dark.jpg differ
diff --git a/docs/public/static/screenshots/joy-ui/getting-started/templates/email.jpg b/docs/public/static/screenshots/joy-ui/getting-started/templates/email.jpg
index 87bba10d6fbb13..12f2e5feec25b7 100644
Binary files a/docs/public/static/screenshots/joy-ui/getting-started/templates/email.jpg and b/docs/public/static/screenshots/joy-ui/getting-started/templates/email.jpg differ
diff --git a/docs/public/static/screenshots/joy-ui/getting-started/templates/files-dark.jpg b/docs/public/static/screenshots/joy-ui/getting-started/templates/files-dark.jpg
index 2322485713832f..9518b97cd1317a 100644
Binary files a/docs/public/static/screenshots/joy-ui/getting-started/templates/files-dark.jpg and b/docs/public/static/screenshots/joy-ui/getting-started/templates/files-dark.jpg differ
diff --git a/docs/public/static/screenshots/joy-ui/getting-started/templates/files.jpg b/docs/public/static/screenshots/joy-ui/getting-started/templates/files.jpg
index 9edb329c03c9dd..b6004ee1e1b2c1 100644
Binary files a/docs/public/static/screenshots/joy-ui/getting-started/templates/files.jpg and b/docs/public/static/screenshots/joy-ui/getting-started/templates/files.jpg differ
diff --git a/docs/public/static/screenshots/joy-ui/getting-started/templates/framesx-web-blocks-dark.jpg b/docs/public/static/screenshots/joy-ui/getting-started/templates/framesx-web-blocks-dark.jpg
index b814535a11efd6..5b0778c645d20f 100644
Binary files a/docs/public/static/screenshots/joy-ui/getting-started/templates/framesx-web-blocks-dark.jpg and b/docs/public/static/screenshots/joy-ui/getting-started/templates/framesx-web-blocks-dark.jpg differ
diff --git a/docs/public/static/screenshots/joy-ui/getting-started/templates/framesx-web-blocks.jpg b/docs/public/static/screenshots/joy-ui/getting-started/templates/framesx-web-blocks.jpg
index 1b5720a09df60a..8ba7e489ae5423 100644
Binary files a/docs/public/static/screenshots/joy-ui/getting-started/templates/framesx-web-blocks.jpg and b/docs/public/static/screenshots/joy-ui/getting-started/templates/framesx-web-blocks.jpg differ
diff --git a/docs/public/static/screenshots/joy-ui/getting-started/templates/messages-dark.jpg b/docs/public/static/screenshots/joy-ui/getting-started/templates/messages-dark.jpg
index 4474caeca5a3a7..1b02be5ec38766 100644
Binary files a/docs/public/static/screenshots/joy-ui/getting-started/templates/messages-dark.jpg and b/docs/public/static/screenshots/joy-ui/getting-started/templates/messages-dark.jpg differ
diff --git a/docs/public/static/screenshots/joy-ui/getting-started/templates/messages.jpg b/docs/public/static/screenshots/joy-ui/getting-started/templates/messages.jpg
index 8eb00dbe019b31..4424555cc12067 100644
Binary files a/docs/public/static/screenshots/joy-ui/getting-started/templates/messages.jpg and b/docs/public/static/screenshots/joy-ui/getting-started/templates/messages.jpg differ
diff --git a/docs/public/static/screenshots/joy-ui/getting-started/templates/order-dashboard-dark.jpg b/docs/public/static/screenshots/joy-ui/getting-started/templates/order-dashboard-dark.jpg
index 23919c6d359fb7..897bae0bb2289b 100644
Binary files a/docs/public/static/screenshots/joy-ui/getting-started/templates/order-dashboard-dark.jpg and b/docs/public/static/screenshots/joy-ui/getting-started/templates/order-dashboard-dark.jpg differ
diff --git a/docs/public/static/screenshots/joy-ui/getting-started/templates/order-dashboard.jpg b/docs/public/static/screenshots/joy-ui/getting-started/templates/order-dashboard.jpg
index 48302fc3b98153..52fd740db46973 100644
Binary files a/docs/public/static/screenshots/joy-ui/getting-started/templates/order-dashboard.jpg and b/docs/public/static/screenshots/joy-ui/getting-started/templates/order-dashboard.jpg differ
diff --git a/docs/public/static/screenshots/joy-ui/getting-started/templates/profile-dashboard-dark.jpg b/docs/public/static/screenshots/joy-ui/getting-started/templates/profile-dashboard-dark.jpg
index dfbd5cbc390e26..49cf54bdc2ef2a 100644
Binary files a/docs/public/static/screenshots/joy-ui/getting-started/templates/profile-dashboard-dark.jpg and b/docs/public/static/screenshots/joy-ui/getting-started/templates/profile-dashboard-dark.jpg differ
diff --git a/docs/public/static/screenshots/joy-ui/getting-started/templates/profile-dashboard.jpg b/docs/public/static/screenshots/joy-ui/getting-started/templates/profile-dashboard.jpg
index 35decd6d4723b7..799144f8956859 100644
Binary files a/docs/public/static/screenshots/joy-ui/getting-started/templates/profile-dashboard.jpg and b/docs/public/static/screenshots/joy-ui/getting-started/templates/profile-dashboard.jpg differ
diff --git a/docs/public/static/screenshots/joy-ui/getting-started/templates/rental-dashboard-dark.jpg b/docs/public/static/screenshots/joy-ui/getting-started/templates/rental-dashboard-dark.jpg
index 2ee72c17472ffa..f21f51353163a0 100644
Binary files a/docs/public/static/screenshots/joy-ui/getting-started/templates/rental-dashboard-dark.jpg and b/docs/public/static/screenshots/joy-ui/getting-started/templates/rental-dashboard-dark.jpg differ
diff --git a/docs/public/static/screenshots/joy-ui/getting-started/templates/rental-dashboard.jpg b/docs/public/static/screenshots/joy-ui/getting-started/templates/rental-dashboard.jpg
index 2d9d02d4e7c286..789b86b380ac19 100644
Binary files a/docs/public/static/screenshots/joy-ui/getting-started/templates/rental-dashboard.jpg and b/docs/public/static/screenshots/joy-ui/getting-started/templates/rental-dashboard.jpg differ
diff --git a/docs/public/static/screenshots/joy-ui/getting-started/templates/sign-in-side-dark.jpg b/docs/public/static/screenshots/joy-ui/getting-started/templates/sign-in-side-dark.jpg
index af07cc044ae98a..a795922b70f436 100644
Binary files a/docs/public/static/screenshots/joy-ui/getting-started/templates/sign-in-side-dark.jpg and b/docs/public/static/screenshots/joy-ui/getting-started/templates/sign-in-side-dark.jpg differ
diff --git a/docs/public/static/screenshots/joy-ui/getting-started/templates/sign-in-side.jpg b/docs/public/static/screenshots/joy-ui/getting-started/templates/sign-in-side.jpg
index 5b4a909c2ee96e..1593f64c19a5cf 100644
Binary files a/docs/public/static/screenshots/joy-ui/getting-started/templates/sign-in-side.jpg and b/docs/public/static/screenshots/joy-ui/getting-started/templates/sign-in-side.jpg differ
diff --git a/docs/public/static/screenshots/joy-ui/getting-started/templates/team-dark.jpg b/docs/public/static/screenshots/joy-ui/getting-started/templates/team-dark.jpg
index c2cdacc035e566..5648a6a97278ed 100644
Binary files a/docs/public/static/screenshots/joy-ui/getting-started/templates/team-dark.jpg and b/docs/public/static/screenshots/joy-ui/getting-started/templates/team-dark.jpg differ
diff --git a/docs/public/static/screenshots/joy-ui/getting-started/templates/team.jpg b/docs/public/static/screenshots/joy-ui/getting-started/templates/team.jpg
index c38d91438ac4fe..1fd111188d45d2 100644
Binary files a/docs/public/static/screenshots/joy-ui/getting-started/templates/team.jpg and b/docs/public/static/screenshots/joy-ui/getting-started/templates/team.jpg differ
diff --git a/docs/src/modules/components/JoyThemeBuilder.tsx b/docs/src/modules/components/JoyThemeBuilder.tsx
index d2bbc50b442a30..2f99dac59d4f18 100644
--- a/docs/src/modules/components/JoyThemeBuilder.tsx
+++ b/docs/src/modules/components/JoyThemeBuilder.tsx
@@ -45,6 +45,7 @@ import Tabs from '@mui/joy/Tabs';
import TabList from '@mui/joy/TabList';
import TabPanel, { tabPanelClasses } from '@mui/joy/TabPanel';
import Tab, { tabClasses } from '@mui/joy/Tab';
+import ToggleButtonGroup from '@mui/joy/ToggleButtonGroup';
import Typography from '@mui/joy/Typography';
import SvgIcon from '@mui/joy/SvgIcon';
import KeyboardArrowRight from '@mui/icons-material/KeyboardArrowRight';
@@ -450,10 +451,7 @@ function CodeBlockResult({
theme.js
-
+
@@ -1015,10 +1013,10 @@ function GlobalVariantForm({
].filter((item) => !(tokens as Array).includes(item));
return (
-
+
Global variant tokens
-
+
Pick the specific primitive color, now in CSS variables form already, to correspond to a
semantic global variant token.
@@ -1471,27 +1469,20 @@ export default function JoyThemeBuilder() {
borderRadius: '8px 8px 0 0',
}}
>
- setColorMode(newValue as 'light' | 'dark')}
- sx={{ bgcolor: 'transparent' }}
>
-
-
-
-
- {' '}
- Light
-
-
-
-
- {' '}
- Dark
-
-
-
+
+
+ Light
+
+
+
+ Dark
+
+
Palette
- {(['primary', 'neutral', 'danger', 'info', 'success', 'warning'] as const).map(
- (color) => (
-
-
- setColorProp(color)}
- >
-
-
-
- {color}
-
-
-
-
-
- ),
- )}
+ {(['primary', 'neutral', 'danger', 'success', 'warning'] as const).map((color) => (
+
+
+ setColorProp(color)}
+ >
+
+
+
+ {color}
+
+
+
+
+
+ ))}
mergedValue[k] !== undefined);
return (
- button': {
- bgcolor: 'transparent',
- boxShadow: 'none',
- flex: 'none',
- color: 'text.tertiary',
- fontWeight: 'md',
- '&:hover': { bgcolor: 'transparent' },
- '&[aria-selected="true"]': {
- color: 'text.primary',
- '&::before': {
- content: '""',
- display: 'block',
- position: 'absolute',
- height: 2,
- left: 'var(--ListItem-paddingLeft)',
- right: 'var(--ListItem-paddingRight)',
- bottom: -1,
- bgcolor: `${colorProp}.solidBg`,
- },
- },
- },
- }}
- >
+
Primitive colors
Global variants
-
-
+
Customize primitive colors
-
+
Add your custom-tailored palette here, inserting each HEX value to the scale, or
choose from an available set of popular color palettes.
diff --git a/docs/src/modules/components/JoyUsageDemo.tsx b/docs/src/modules/components/JoyUsageDemo.tsx
index 37d4f2dcb7cceb..4222dd65da2ec7 100644
--- a/docs/src/modules/components/JoyUsageDemo.tsx
+++ b/docs/src/modules/components/JoyUsageDemo.tsx
@@ -149,6 +149,11 @@ interface JoyUsageDemoProps {
* If `false`, the prop does not display in the code block.
*/
codeBlockDisplay?: boolean;
+ /**
+ * The string to be displayed in the form label.
+ * If not provided, the `propName` is displayed as Pascal case.
+ */
+ formLabel?: string;
}>;
/**
* A function to override the code block result.
@@ -270,425 +275,427 @@ export default function JoyUsageDemo({
},
}}
>
- {data.map(({ propName, knob, options = [], defaultValue, labels }) => {
- const resolvedValue = props[propName] ?? defaultValue;
- if (!knob) {
- return null;
- }
- if (knob === 'switch') {
- return (
-
- {propName}
-
- setProps((latestProps) => ({
- ...latestProps,
- [propName]: event.target.checked,
- }))
- }
- sx={{
- '--Switch-trackWidth': '32px',
- '--Switch-trackBackground': (theme) =>
- `rgba(${theme.vars.palette.neutral.mainChannel} / 0.3)`,
- '&:hover': {
- '--Switch-trackBackground': (theme) =>
- `rgba(${theme.vars.palette.neutral.mainChannel} / 0.5)`,
- },
- }}
- />
-
- );
- }
- if (knob === 'radio') {
- const labelId = `${componentName}-${propName}`;
- return (
-
- {propName}
- {
+ const resolvedValue = props[propName] ?? defaultValue;
+ if (!knob) {
+ return null;
+ }
+ if (knob === 'switch') {
+ return (
+ {
- let value: string | boolean | undefined = event.target.value;
- if (value === 'true') {
- value = true;
- } else if (value === 'false') {
- value = false;
- } else if (value === 'undefined') {
- value = undefined;
- }
- setProps((latestProps) => ({
- ...latestProps,
- [propName]: value,
- }));
- }}
- sx={{ flexWrap: 'wrap', gap: 1 }}
+ sx={{ justifyContent: 'space-between' }}
>
- {options.map((value: string, index: number) => {
- const checked = String(resolvedValue) === value;
- return (
-
- {labels?.[index] || value} }
- value={value}
- disableIcon
- overlay
- />
-
- );
- })}
-
-
- );
- }
- if (knob === 'controlled') {
- const labelId = `${componentName}-${propName}`;
- const finalValue =
- resolvedValue === undefined ? 'uncontrolled' : String(resolvedValue);
- return (
-
- {propName}
- {
- let value: string | boolean | undefined = event.target.value;
- if (value === 'true') {
- value = true;
- } else if (value === 'false') {
- value = false;
- } else if (value === 'uncontrolled') {
- value = undefined;
+ {formLabel}
+
+ setProps((latestProps) => ({
+ ...latestProps,
+ [propName]: event.target.checked,
+ }))
}
- setProps((latestProps) => ({
- ...latestProps,
- [propName]: value,
- }));
- }}
- sx={{ flexWrap: 'wrap', gap: 1 }}
- >
- {['uncontrolled', 'true', 'false'].map((value, index) => {
- const checked = finalValue === value;
- return (
-
-
+ `rgba(${theme.vars.palette.neutral.mainChannel} / 0.3)`,
+ '&:hover': {
+ '--Switch-trackBackground': (theme) =>
+ `rgba(${theme.vars.palette.neutral.mainChannel} / 0.5)`,
+ },
+ }}
+ />
+
+ );
+ }
+ if (knob === 'radio') {
+ const labelId = `${componentName}-${propName}`;
+ return (
+
+ {formLabel}
+ {
+ let value: string | boolean | undefined = event.target.value;
+ if (value === 'true') {
+ value = true;
+ } else if (value === 'false') {
+ value = false;
+ } else if (value === 'undefined') {
+ value = undefined;
+ }
+ setProps((latestProps) => ({
+ ...latestProps,
+ [propName]: value,
+ }));
+ }}
+ sx={{ flexWrap: 'wrap', gap: 1 }}
+ >
+ {options.map((value: string, index: number) => {
+ const checked = String(resolvedValue) === value;
+ return (
+ {labels?.[index] || value} }
- value={value}
- disableIcon
- overlay
- />
-
- );
- })}
-
-
- );
- }
- if (knob === 'color') {
- return (
-
- Color
-
- setProps((latestProps) => ({
- ...latestProps,
- color: event.target.value,
- }))
- }
- sx={{ flexWrap: 'wrap', gap: 1.5 }}
- >
- {(['primary', 'neutral', 'danger', 'info', 'success', 'warning'] as const).map(
- (value) => {
- const checked = resolvedValue === value;
+ size="sm"
+ sx={{ bgcolor: 'background.body' }}
+ >
+ {labels?.[index] || value} }
+ value={value}
+ disableIcon
+ overlay
+ />
+
+ );
+ })}
+
+
+ );
+ }
+ if (knob === 'controlled') {
+ const labelId = `${componentName}-${propName}`;
+ const finalValue =
+ resolvedValue === undefined ? 'uncontrolled' : String(resolvedValue);
+ return (
+
+ {formLabel}
+ {
+ let value: string | boolean | undefined = event.target.value;
+ if (value === 'true') {
+ value = true;
+ } else if (value === 'false') {
+ value = false;
+ } else if (value === 'uncontrolled') {
+ value = undefined;
+ }
+ setProps((latestProps) => ({
+ ...latestProps,
+ [propName]: value,
+ }));
+ }}
+ sx={{ flexWrap: 'wrap', gap: 1 }}
+ >
+ {['uncontrolled', 'true', 'false'].map((value, index) => {
+ const checked = finalValue === value;
return (
-
{labels?.[index] || value} }
value={value}
disableIcon
overlay
+ />
+
+ );
+ })}
+
+
+ );
+ }
+ if (knob === 'color') {
+ return (
+
+ {formLabel}
+
+ setProps((latestProps) => ({
+ ...latestProps,
+ [propName || 'color']: event.target.value,
+ }))
+ }
+ sx={{ flexWrap: 'wrap', gap: 1.5 }}
+ >
+ {(['primary', 'neutral', 'danger', 'success', 'warning'] as const).map(
+ (value) => {
+ const checked = resolvedValue === value;
+ return (
+
- {checked && (
-
+
- )}
-
- );
- },
- )}
-
-
- );
- }
- if (knob === 'select') {
- return (
-
- {propName}
-
+ )}
+
+ );
},
- },
- }}
- value={(resolvedValue || 'none') as string}
- onChange={(event, val) =>
- setProps((latestProps) => ({
- ...latestProps,
- [propName]: val,
- }))
- }
- >
- {options.map((value) => (
-
+ );
+ }
+ if (knob === 'select') {
+ return (
+
+ {formLabel}
+
-
-
-
- {value}
-
- ))}
-
-
- );
- }
- if (knob === 'input') {
- return (
-
- {propName}
-
- setProps((latestProps) => ({
- ...latestProps,
- [propName]: event.target.value,
- }))
- }
- sx={{
- textTransform: 'capitalize',
- [`& .${inputClasses.root}`]: {
- bgcolor: 'background.body',
- },
- }}
- />
-
- );
- }
- if (knob === 'number') {
- return (
-
- {propName}
-
- setProps((latestProps) => ({
- ...latestProps,
- [propName]: Number.isNaN(event.target.valueAsNumber)
- ? undefined
- : event.target.valueAsNumber,
- }))
- }
- sx={{
- textTransform: 'capitalize',
- [`& .${inputClasses.root}`]: {
- bgcolor: 'background.body',
- },
- }}
- />
-
- );
- }
- if (knob === 'placement') {
- return (
-
- Placement
-
- setProps((latestProps) => ({
- ...latestProps,
- [propName]: event.target.value,
- }))
- }
- >
-
+ setProps((latestProps) => ({
+ ...latestProps,
+ [propName]: val,
+ }))
+ }
+ >
+ {options.map((value) => (
+
+ ))}
+
+
+ );
+ }
+ if (knob === 'input') {
+ return (
+
+ {formLabel}
+
+ setProps((latestProps) => ({
+ ...latestProps,
+ [propName]: event.target.value,
+ }))
+ }
+ sx={{
+ textTransform: 'capitalize',
+ [`& .${inputClasses.root}`]: {
+ bgcolor: 'background.body',
+ },
+ }}
+ />
+
+ );
+ }
+ if (knob === 'number') {
+ return (
+
+ {formLabel}
+
+ setProps((latestProps) => ({
+ ...latestProps,
+ [propName]: Number.isNaN(event.target.valueAsNumber)
+ ? undefined
+ : event.target.valueAsNumber,
+ }))
+ }
sx={{
- display: 'grid',
- gridTemplateColumns: '40px 1fr 1fr 1fr 40px',
- gridTemplateRows: 'repeat(5, 20px)',
- gridAutoFlow: 'row dense',
- alignItems: 'center',
+ textTransform: 'capitalize',
+ [`& .${inputClasses.root}`]: {
+ bgcolor: 'background.body',
+ },
}}
+ />
+
+ );
+ }
+ if (knob === 'placement') {
+ return (
+
+ {formLabel}
+
+ setProps((latestProps) => ({
+ ...latestProps,
+ [propName]: event.target.value,
+ }))
+ }
>
- {resolvedValue}
-
- {/* void */}
-
-
-
- {/* void */}
- {[
- 'top-start',
- 'top',
- 'top-end',
- 'left-start',
- 'right-start',
- 'left',
- 'right',
- 'left-end',
- 'right-end',
- 'bottom-start',
- 'bottom',
- 'bottom-end',
- ].map((placement) => (
-
- ({
- sx: (theme) => ({
- ...(checked && {
- ...theme.variants.solid.primary,
- '&:hover': theme.variants.solid.primary,
- }),
- }),
+ {resolvedValue}
+
+ {/* void */}
+
+
+
+ {/* void */}
+ {[
+ 'top-start',
+ 'top',
+ 'top-end',
+ 'left-start',
+ 'right-start',
+ 'left',
+ 'right',
+ 'left-end',
+ 'right-end',
+ 'bottom-start',
+ 'bottom',
+ 'bottom-end',
+ ].map((placement) => (
+
-
- ))}
-
-
-
- );
- }
- return null;
- })}
+ >
+ ({
+ sx: (theme) => ({
+ ...(checked && {
+ ...theme.variants.solid.primary,
+ '&:hover': theme.variants.solid.primary,
+ }),
+ }),
+ }),
+ }}
+ />
+
+ ))}
+
+
+
+ );
+ }
+ return null;
+ },
+ )}
diff --git a/docs/src/modules/components/JoyVariablesDemo.tsx b/docs/src/modules/components/JoyVariablesDemo.tsx
index 14db9be49bd348..6f5a757cb7e4f5 100644
--- a/docs/src/modules/components/JoyVariablesDemo.tsx
+++ b/docs/src/modules/components/JoyVariablesDemo.tsx
@@ -49,7 +49,6 @@ function SlotVariables({ slot, data, renderField, defaultOpen = false }: SlotVar
component="button"
underline="none"
fontSize="xs"
- letterSpacing="md"
textTransform="uppercase"
fontWeight="lg"
endDecorator={
@@ -185,7 +184,7 @@ export default function JoyVariablesDemo(props: {
endDecorator={
{typeof resolvedValue === 'string' ? (
-
+
px
) : null}
diff --git a/docs/src/modules/joy/generateThemeAugmentation.test.ts b/docs/src/modules/joy/generateThemeAugmentation.test.ts
index 38325b38f4002c..d888a878be7b3f 100644
--- a/docs/src/modules/joy/generateThemeAugmentation.test.ts
+++ b/docs/src/modules/joy/generateThemeAugmentation.test.ts
@@ -26,7 +26,6 @@ declare module '@mui/joy/styles' {
'PalettePrimaryOverrides',
'PaletteNeutralOverrides',
'PaletteDangerOverrides',
- 'PaletteInfoOverrides',
'PaletteSuccessOverrides',
'PaletteWarningOverrides',
'PaletteBackgroundOverrides',
@@ -72,9 +71,6 @@ declare module '@mui/joy/styles' {
danger: {
gradient3: 'any',
},
- info: {
- gradient4: 'any',
- },
success: {
gradient5: 'any',
},
@@ -105,9 +101,6 @@ declare module '@mui/joy/styles' {
interface PaletteDangerOverrides {
gradient3: true;
}
- interface PaletteInfoOverrides {
- gradient4: true;
- }
interface PaletteSuccessOverrides {
gradient5: true;
}
diff --git a/docs/src/modules/joy/generateThemeAugmentation.ts b/docs/src/modules/joy/generateThemeAugmentation.ts
index 13941707a45f9d..08d16972d5aafa 100644
--- a/docs/src/modules/joy/generateThemeAugmentation.ts
+++ b/docs/src/modules/joy/generateThemeAugmentation.ts
@@ -53,10 +53,6 @@ export default function generateThemeAugmentation(data: any) {
'PaletteDangerOverrides',
prependSpace(augmentPalette(data?.colorSchemes, 'danger'), 4),
),
- renderInterface(
- 'PaletteInfoOverrides',
- prependSpace(augmentPalette(data?.colorSchemes, 'info'), 4),
- ),
renderInterface(
'PaletteSuccessOverrides',
prependSpace(augmentPalette(data?.colorSchemes, 'success'), 4),
diff --git a/docs/src/modules/joy/getMinimalJoyTemplate.ts b/docs/src/modules/joy/getMinimalJoyTemplate.ts
index 1b0b28fb1aca3a..887a8f51a7f28b 100644
--- a/docs/src/modules/joy/getMinimalJoyTemplate.ts
+++ b/docs/src/modules/joy/getMinimalJoyTemplate.ts
@@ -102,7 +102,7 @@ export default function App() {
-
+
Developed by{" "}
You've read all messages in your inbox.
diff --git a/docs/translations/api-docs-joy/alert/alert.json b/docs/translations/api-docs-joy/alert/alert.json
index 4052802ce17066..6d6cf0e8747e24 100644
--- a/docs/translations/api-docs-joy/alert/alert.json
+++ b/docs/translations/api-docs-joy/alert/alert.json
@@ -35,11 +35,6 @@
"nodeName": "the root element",
"conditions": "color=\"danger\"
"
},
- "colorInfo": {
- "description": "Class name applied to {{nodeName}} if {{conditions}}.",
- "nodeName": "the root element",
- "conditions": "color=\"info\"
"
- },
"colorNeutral": {
"description": "Class name applied to {{nodeName}} if {{conditions}}.",
"nodeName": "the root element",
diff --git a/docs/translations/api-docs-joy/aspect-ratio/aspect-ratio.json b/docs/translations/api-docs-joy/aspect-ratio/aspect-ratio.json
index 81da535aee38f9..72d1490f7454be 100644
--- a/docs/translations/api-docs-joy/aspect-ratio/aspect-ratio.json
+++ b/docs/translations/api-docs-joy/aspect-ratio/aspect-ratio.json
@@ -50,11 +50,6 @@
"nodeName": "the content element",
"conditions": "color=\"danger\"
"
},
- "colorInfo": {
- "description": "Class name applied to {{nodeName}} if {{conditions}}.",
- "nodeName": "the content element",
- "conditions": "color=\"info\"
"
- },
"colorSuccess": {
"description": "Class name applied to {{nodeName}} if {{conditions}}.",
"nodeName": "the content element",
diff --git a/docs/translations/api-docs-joy/autocomplete-listbox/autocomplete-listbox.json b/docs/translations/api-docs-joy/autocomplete-listbox/autocomplete-listbox.json
index ed89e713dd6508..ccfe29967de631 100644
--- a/docs/translations/api-docs-joy/autocomplete-listbox/autocomplete-listbox.json
+++ b/docs/translations/api-docs-joy/autocomplete-listbox/autocomplete-listbox.json
@@ -37,9 +37,6 @@
"colorDanger": {
"description": "Classname applied to the root element if color="danger"
."
},
- "colorInfo": {
- "description": "Classname applied to the root element if color="info"
."
- },
"colorSuccess": {
"description": "Classname applied to the root element if color="success"
."
},
diff --git a/docs/translations/api-docs-joy/autocomplete-option/autocomplete-option.json b/docs/translations/api-docs-joy/autocomplete-option/autocomplete-option.json
index fb97fd19b62976..8c6fe9666cbb4a 100644
--- a/docs/translations/api-docs-joy/autocomplete-option/autocomplete-option.json
+++ b/docs/translations/api-docs-joy/autocomplete-option/autocomplete-option.json
@@ -42,11 +42,6 @@
"nodeName": "the root element",
"conditions": "color=\"danger\"
"
},
- "colorInfo": {
- "description": "Class name applied to {{nodeName}} if {{conditions}}.",
- "nodeName": "the root element",
- "conditions": "color=\"info\"
"
- },
"colorSuccess": {
"description": "Class name applied to {{nodeName}} if {{conditions}}.",
"nodeName": "the root element",
diff --git a/docs/translations/api-docs-joy/autocomplete/autocomplete.json b/docs/translations/api-docs-joy/autocomplete/autocomplete.json
index f9e8cdf270b6df..90b874e7e42ef3 100644
--- a/docs/translations/api-docs-joy/autocomplete/autocomplete.json
+++ b/docs/translations/api-docs-joy/autocomplete/autocomplete.json
@@ -258,11 +258,6 @@
"nodeName": "the root element",
"conditions": "color=\"danger\"
"
},
- "colorInfo": {
- "description": "Class name applied to {{nodeName}} if {{conditions}}.",
- "nodeName": "the root element",
- "conditions": "color=\"info\"
"
- },
"colorSuccess": {
"description": "Class name applied to {{nodeName}} if {{conditions}}.",
"nodeName": "the root element",
diff --git a/docs/translations/api-docs-joy/avatar/avatar.json b/docs/translations/api-docs-joy/avatar/avatar.json
index 7719c2b8156389..38a64b9c82e204 100644
--- a/docs/translations/api-docs-joy/avatar/avatar.json
+++ b/docs/translations/api-docs-joy/avatar/avatar.json
@@ -46,11 +46,6 @@
"nodeName": "the root element",
"conditions": "color=\"danger\"
"
},
- "colorInfo": {
- "description": "Class name applied to {{nodeName}} if {{conditions}}.",
- "nodeName": "the root element",
- "conditions": "color=\"info\"
"
- },
"colorSuccess": {
"description": "Class name applied to {{nodeName}} if {{conditions}}.",
"nodeName": "the root element",
diff --git a/docs/translations/api-docs-joy/badge/badge.json b/docs/translations/api-docs-joy/badge/badge.json
index 315ba22bd2b240..b50ba75779fbaf 100644
--- a/docs/translations/api-docs-joy/badge/badge.json
+++ b/docs/translations/api-docs-joy/badge/badge.json
@@ -64,11 +64,6 @@
"nodeName": "the badge span
element",
"conditions": "color=\"danger\"
"
},
- "colorInfo": {
- "description": "Class name applied to {{nodeName}} if {{conditions}}.",
- "nodeName": "the badge span
element",
- "conditions": "color=\"info\"
"
- },
"colorNeutral": {
"description": "Class name applied to {{nodeName}} if {{conditions}}.",
"nodeName": "the badge span
element",
diff --git a/docs/translations/api-docs-joy/button-group/button-group.json b/docs/translations/api-docs-joy/button-group/button-group.json
index 3d027bf574ac1f..16e81a15425b8e 100644
--- a/docs/translations/api-docs-joy/button-group/button-group.json
+++ b/docs/translations/api-docs-joy/button-group/button-group.json
@@ -45,11 +45,6 @@
"nodeName": "the root element",
"conditions": "color=\"danger\"
"
},
- "colorInfo": {
- "description": "Class name applied to {{nodeName}} if {{conditions}}.",
- "nodeName": "the root element",
- "conditions": "color=\"info\"
"
- },
"colorSuccess": {
"description": "Class name applied to {{nodeName}} if {{conditions}}.",
"nodeName": "the root element",
diff --git a/docs/translations/api-docs-joy/button/button.json b/docs/translations/api-docs-joy/button/button.json
index ff6901568c56e0..77d6e488c913ef 100644
--- a/docs/translations/api-docs-joy/button/button.json
+++ b/docs/translations/api-docs-joy/button/button.json
@@ -52,11 +52,6 @@
"nodeName": "the root element",
"conditions": "color=\"danger\"
"
},
- "colorInfo": {
- "description": "Class name applied to {{nodeName}} if {{conditions}}.",
- "nodeName": "the root element",
- "conditions": "color=\"info\"
"
- },
"colorSuccess": {
"description": "Class name applied to {{nodeName}} if {{conditions}}.",
"nodeName": "the root element",
diff --git a/docs/translations/api-docs-joy/card-overflow/card-overflow.json b/docs/translations/api-docs-joy/card-overflow/card-overflow.json
index 3e276a0426c2b8..16b33555474181 100644
--- a/docs/translations/api-docs-joy/card-overflow/card-overflow.json
+++ b/docs/translations/api-docs-joy/card-overflow/card-overflow.json
@@ -36,11 +36,6 @@
"nodeName": "the root element",
"conditions": "color=\"danger\"
"
},
- "colorInfo": {
- "description": "Class name applied to {{nodeName}} if {{conditions}}.",
- "nodeName": "the root element",
- "conditions": "color=\"info\"
"
- },
"colorSuccess": {
"description": "Class name applied to {{nodeName}} if {{conditions}}.",
"nodeName": "the root element",
diff --git a/docs/translations/api-docs-joy/card/card.json b/docs/translations/api-docs-joy/card/card.json
index 373bcc835d34da..e5ee90e3f4a250 100644
--- a/docs/translations/api-docs-joy/card/card.json
+++ b/docs/translations/api-docs-joy/card/card.json
@@ -43,11 +43,6 @@
"nodeName": "the root element",
"conditions": "color=\"danger\"
"
},
- "colorInfo": {
- "description": "Class name applied to {{nodeName}} if {{conditions}}.",
- "nodeName": "the root element",
- "conditions": "color=\"info\"
"
- },
"colorSuccess": {
"description": "Class name applied to {{nodeName}} if {{conditions}}.",
"nodeName": "the root element",
diff --git a/docs/translations/api-docs-joy/checkbox/checkbox.json b/docs/translations/api-docs-joy/checkbox/checkbox.json
index 2991efa5701a64..389f67c22998f0 100644
--- a/docs/translations/api-docs-joy/checkbox/checkbox.json
+++ b/docs/translations/api-docs-joy/checkbox/checkbox.json
@@ -96,11 +96,6 @@
"nodeName": "the root element",
"conditions": "color=\"danger\"
"
},
- "colorInfo": {
- "description": "Class name applied to {{nodeName}} if {{conditions}}.",
- "nodeName": "the root element",
- "conditions": "color=\"info\"
"
- },
"colorNeutral": {
"description": "Class name applied to {{nodeName}} if {{conditions}}.",
"nodeName": "the root element",
diff --git a/docs/translations/api-docs-joy/chip-delete/chip-delete.json b/docs/translations/api-docs-joy/chip-delete/chip-delete.json
index 250dfd6652c612..f1303a7956cf6b 100644
--- a/docs/translations/api-docs-joy/chip-delete/chip-delete.json
+++ b/docs/translations/api-docs-joy/chip-delete/chip-delete.json
@@ -50,11 +50,6 @@
"nodeName": "the root element",
"conditions": "color=\"danger\"
"
},
- "colorInfo": {
- "description": "Class name applied to {{nodeName}} if {{conditions}}.",
- "nodeName": "the root element",
- "conditions": "color=\"info\"
"
- },
"colorSuccess": {
"description": "Class name applied to {{nodeName}} if {{conditions}}.",
"nodeName": "the root element",
diff --git a/docs/translations/api-docs-joy/chip/chip.json b/docs/translations/api-docs-joy/chip/chip.json
index 325c958f589ec9..7b1114f8705508 100644
--- a/docs/translations/api-docs-joy/chip/chip.json
+++ b/docs/translations/api-docs-joy/chip/chip.json
@@ -41,11 +41,6 @@
"nodeName": "the root element",
"conditions": "color=\"danger\"
"
},
- "colorInfo": {
- "description": "Class name applied to {{nodeName}} if {{conditions}}.",
- "nodeName": "the root element",
- "conditions": "color=\"info\"
"
- },
"colorSuccess": {
"description": "Class name applied to {{nodeName}} if {{conditions}}.",
"nodeName": "the root element",
diff --git a/docs/translations/api-docs-joy/circular-progress/circular-progress.json b/docs/translations/api-docs-joy/circular-progress/circular-progress.json
index 746eaca096bdc6..65e9567235be1e 100644
--- a/docs/translations/api-docs-joy/circular-progress/circular-progress.json
+++ b/docs/translations/api-docs-joy/circular-progress/circular-progress.json
@@ -57,11 +57,6 @@
"nodeName": "the root element",
"conditions": "color=\"danger\"
"
},
- "colorInfo": {
- "description": "Class name applied to {{nodeName}} if {{conditions}}.",
- "nodeName": "the root element",
- "conditions": "color=\"info\"
"
- },
"colorSuccess": {
"description": "Class name applied to {{nodeName}} if {{conditions}}.",
"nodeName": "the root element",
diff --git a/docs/translations/api-docs-joy/form-control/form-control.json b/docs/translations/api-docs-joy/form-control/form-control.json
index cb35ed34bbf8c4..7242653629f473 100644
--- a/docs/translations/api-docs-joy/form-control/form-control.json
+++ b/docs/translations/api-docs-joy/form-control/form-control.json
@@ -48,11 +48,6 @@
"nodeName": "the root element",
"conditions": "color=\"danger\"
"
},
- "colorInfo": {
- "description": "Class name applied to {{nodeName}} if {{conditions}}.",
- "nodeName": "the root element",
- "conditions": "color=\"info\"
"
- },
"colorSuccess": {
"description": "Class name applied to {{nodeName}} if {{conditions}}.",
"nodeName": "the root element",
diff --git a/docs/translations/api-docs-joy/icon-button/icon-button.json b/docs/translations/api-docs-joy/icon-button/icon-button.json
index 1e912fb5d6e228..2cfc2a2717e267 100644
--- a/docs/translations/api-docs-joy/icon-button/icon-button.json
+++ b/docs/translations/api-docs-joy/icon-button/icon-button.json
@@ -41,11 +41,6 @@
"nodeName": "the root element",
"conditions": "color=\"danger\"
"
},
- "colorInfo": {
- "description": "Class name applied to {{nodeName}} if {{conditions}}.",
- "nodeName": "the root element",
- "conditions": "color=\"info\"
"
- },
"colorSuccess": {
"description": "Class name applied to {{nodeName}} if {{conditions}}.",
"nodeName": "the root element",
diff --git a/docs/translations/api-docs-joy/input/input.json b/docs/translations/api-docs-joy/input/input.json
index ca1f00e5cc85af..0e6f5cf273e59a 100644
--- a/docs/translations/api-docs-joy/input/input.json
+++ b/docs/translations/api-docs-joy/input/input.json
@@ -62,11 +62,6 @@
"nodeName": "the root element",
"conditions": "color=\"danger\"
"
},
- "colorInfo": {
- "description": "Class name applied to {{nodeName}} if {{conditions}}.",
- "nodeName": "the root element",
- "conditions": "color=\"info\"
"
- },
"colorSuccess": {
"description": "Class name applied to {{nodeName}} if {{conditions}}.",
"nodeName": "the root element",
diff --git a/docs/translations/api-docs-joy/linear-progress/linear-progress.json b/docs/translations/api-docs-joy/linear-progress/linear-progress.json
index 547d182053a59c..a5100d2f6c9b9f 100644
--- a/docs/translations/api-docs-joy/linear-progress/linear-progress.json
+++ b/docs/translations/api-docs-joy/linear-progress/linear-progress.json
@@ -48,11 +48,6 @@
"nodeName": "the root element",
"conditions": "color=\"danger\"
"
},
- "colorInfo": {
- "description": "Class name applied to {{nodeName}} if {{conditions}}.",
- "nodeName": "the root element",
- "conditions": "color=\"info\"
"
- },
"colorSuccess": {
"description": "Class name applied to {{nodeName}} if {{conditions}}.",
"nodeName": "the root element",
diff --git a/docs/translations/api-docs-joy/link/link.json b/docs/translations/api-docs-joy/link/link.json
index fea9048728229d..211041111eddd5 100644
--- a/docs/translations/api-docs-joy/link/link.json
+++ b/docs/translations/api-docs-joy/link/link.json
@@ -39,11 +39,6 @@
"nodeName": "the root element",
"conditions": "color=\"danger\"
"
},
- "colorInfo": {
- "description": "Class name applied to {{nodeName}} if {{conditions}}.",
- "nodeName": "the root element",
- "conditions": "color=\"info\"
"
- },
"colorSuccess": {
"description": "Class name applied to {{nodeName}} if {{conditions}}.",
"nodeName": "the root element",
@@ -124,30 +119,40 @@
"nodeName": "the root element",
"conditions": "level=\"h4\"
"
},
- "h5": {
+ "title-lg": {
+ "description": "Class name applied to {{nodeName}} if {{conditions}}.",
+ "nodeName": "the root element",
+ "conditions": "level=\"title-lg\"
"
+ },
+ "title-md": {
+ "description": "Class name applied to {{nodeName}} if {{conditions}}.",
+ "nodeName": "the root element",
+ "conditions": "level=\"title-md\"
"
+ },
+ "title-sm": {
"description": "Class name applied to {{nodeName}} if {{conditions}}.",
"nodeName": "the root element",
- "conditions": "level=\"h5\"
"
+ "conditions": "level=\"title-sm\"
"
},
- "h6": {
+ "body-lg": {
"description": "Class name applied to {{nodeName}} if {{conditions}}.",
"nodeName": "the root element",
- "conditions": "level=\"h6\"
"
+ "conditions": "level=\"body-lg\"
"
},
- "body1": {
+ "body-md": {
"description": "Class name applied to {{nodeName}} if {{conditions}}.",
"nodeName": "the root element",
- "conditions": "level=\"body1\"
"
+ "conditions": "level=\"body-md\"
"
},
- "body2": {
+ "body-sm": {
"description": "Class name applied to {{nodeName}} if {{conditions}}.",
"nodeName": "the root element",
- "conditions": "level=\"body2\"
"
+ "conditions": "level=\"body-sm\"
"
},
- "body3": {
+ "body-xs": {
"description": "Class name applied to {{nodeName}} if {{conditions}}.",
"nodeName": "the root element",
- "conditions": "level=\"body3\"
"
+ "conditions": "level=\"body-xs\"
"
},
"startDecorator": { "description": "Class name applied to the startDecorator element" },
"endDecorator": { "description": "Class name applied to the endDecorator element" }
diff --git a/docs/translations/api-docs-joy/list-item-button/list-item-button.json b/docs/translations/api-docs-joy/list-item-button/list-item-button.json
index 97258a922a9b88..0af926ce1aeb98 100644
--- a/docs/translations/api-docs-joy/list-item-button/list-item-button.json
+++ b/docs/translations/api-docs-joy/list-item-button/list-item-button.json
@@ -56,11 +56,6 @@
"nodeName": "the root element",
"conditions": "color=\"danger\"
"
},
- "colorInfo": {
- "description": "Class name applied to {{nodeName}} if {{conditions}}.",
- "nodeName": "the root element",
- "conditions": "color=\"info\"
"
- },
"colorSuccess": {
"description": "Class name applied to {{nodeName}} if {{conditions}}.",
"nodeName": "the root element",
diff --git a/docs/translations/api-docs-joy/list-item/list-item.json b/docs/translations/api-docs-joy/list-item/list-item.json
index 37cc7528f07804..e3ec7eaba926bb 100644
--- a/docs/translations/api-docs-joy/list-item/list-item.json
+++ b/docs/translations/api-docs-joy/list-item/list-item.json
@@ -65,11 +65,6 @@
"nodeName": "the root element",
"conditions": "color=\"danger\"
"
},
- "colorInfo": {
- "description": "Class name applied to {{nodeName}} if {{conditions}}.",
- "nodeName": "the root element",
- "conditions": "color=\"info\"
"
- },
"colorSuccess": {
"description": "Class name applied to {{nodeName}} if {{conditions}}.",
"nodeName": "the root element",
diff --git a/docs/translations/api-docs-joy/list-subheader/list-subheader.json b/docs/translations/api-docs-joy/list-subheader/list-subheader.json
index 70fe1240cc6efd..067848f2bb7013 100644
--- a/docs/translations/api-docs-joy/list-subheader/list-subheader.json
+++ b/docs/translations/api-docs-joy/list-subheader/list-subheader.json
@@ -42,11 +42,6 @@
"nodeName": "the root element",
"conditions": "color=\"danger\"
"
},
- "colorInfo": {
- "description": "Class name applied to {{nodeName}} if {{conditions}}.",
- "nodeName": "the root element",
- "conditions": "color=\"info\"
"
- },
"colorSuccess": {
"description": "Class name applied to {{nodeName}} if {{conditions}}.",
"nodeName": "the root element",
diff --git a/docs/translations/api-docs-joy/list/list.json b/docs/translations/api-docs-joy/list/list.json
index 1797fcadc39452..2969d64b1bf5a7 100644
--- a/docs/translations/api-docs-joy/list/list.json
+++ b/docs/translations/api-docs-joy/list/list.json
@@ -48,9 +48,6 @@
"colorDanger": {
"description": "Classname applied to the root element if color="danger"
."
},
- "colorInfo": {
- "description": "Classname applied to the root element if color="info"
."
- },
"colorSuccess": {
"description": "Classname applied to the root element if color="success"
."
},
diff --git a/docs/translations/api-docs-joy/menu-item/menu-item.json b/docs/translations/api-docs-joy/menu-item/menu-item.json
index 34661f5fb110a1..f442341aac6eed 100644
--- a/docs/translations/api-docs-joy/menu-item/menu-item.json
+++ b/docs/translations/api-docs-joy/menu-item/menu-item.json
@@ -44,11 +44,6 @@
"nodeName": "the root element",
"conditions": "color=\"danger\"
"
},
- "colorInfo": {
- "description": "Class name applied to {{nodeName}} if {{conditions}}.",
- "nodeName": "the root element",
- "conditions": "color=\"info\"
"
- },
"colorSuccess": {
"description": "Class name applied to {{nodeName}} if {{conditions}}.",
"nodeName": "the root element",
diff --git a/docs/translations/api-docs-joy/menu-list/menu-list.json b/docs/translations/api-docs-joy/menu-list/menu-list.json
index c675e69cbe9074..00babbbe67ca2f 100644
--- a/docs/translations/api-docs-joy/menu-list/menu-list.json
+++ b/docs/translations/api-docs-joy/menu-list/menu-list.json
@@ -51,9 +51,6 @@
"colorDanger": {
"description": "Classname applied to the root element if color="danger"
."
},
- "colorInfo": {
- "description": "Classname applied to the root element if color="info"
."
- },
"colorSuccess": {
"description": "Classname applied to the root element if color="success"
."
},
diff --git a/docs/translations/api-docs-joy/menu/menu.json b/docs/translations/api-docs-joy/menu/menu.json
index addb58eed6d367..b04ee5b83d52be 100644
--- a/docs/translations/api-docs-joy/menu/menu.json
+++ b/docs/translations/api-docs-joy/menu/menu.json
@@ -52,9 +52,6 @@
"colorDanger": {
"description": "Classname applied to the root element if color="danger"
."
},
- "colorInfo": {
- "description": "Classname applied to the root element if color="info"
."
- },
"colorSuccess": {
"description": "Classname applied to the root element if color="success"
."
},
diff --git a/docs/translations/api-docs-joy/modal-close/modal-close.json b/docs/translations/api-docs-joy/modal-close/modal-close.json
index 83b7efa6fd7454..de5e15c275f69c 100644
--- a/docs/translations/api-docs-joy/modal-close/modal-close.json
+++ b/docs/translations/api-docs-joy/modal-close/modal-close.json
@@ -34,11 +34,6 @@
"nodeName": "the root element",
"conditions": "color=\"danger\"
"
},
- "colorInfo": {
- "description": "Class name applied to {{nodeName}} if {{conditions}}.",
- "nodeName": "the root element",
- "conditions": "color=\"info\"
"
- },
"colorSuccess": {
"description": "Class name applied to {{nodeName}} if {{conditions}}.",
"nodeName": "the root element",
diff --git a/docs/translations/api-docs-joy/modal-dialog/modal-dialog.json b/docs/translations/api-docs-joy/modal-dialog/modal-dialog.json
index cae7596ad9bf5e..a3c3beb1aae31f 100644
--- a/docs/translations/api-docs-joy/modal-dialog/modal-dialog.json
+++ b/docs/translations/api-docs-joy/modal-dialog/modal-dialog.json
@@ -36,11 +36,6 @@
"nodeName": "the root element",
"conditions": "color=\"danger\"
"
},
- "colorInfo": {
- "description": "Class name applied to {{nodeName}} if {{conditions}}.",
- "nodeName": "the root element",
- "conditions": "color=\"info\"
"
- },
"colorSuccess": {
"description": "Class name applied to {{nodeName}} if {{conditions}}.",
"nodeName": "the root element",
diff --git a/docs/translations/api-docs-joy/option/option.json b/docs/translations/api-docs-joy/option/option.json
index c673ecf02e29c5..c3ff11e6804f6e 100644
--- a/docs/translations/api-docs-joy/option/option.json
+++ b/docs/translations/api-docs-joy/option/option.json
@@ -39,11 +39,6 @@
"nodeName": "the root element",
"conditions": "color=\"danger\"
"
},
- "colorInfo": {
- "description": "Class name applied to {{nodeName}} if {{conditions}}.",
- "nodeName": "the root element",
- "conditions": "color=\"info\"
"
- },
"colorSuccess": {
"description": "Class name applied to {{nodeName}} if {{conditions}}.",
"nodeName": "the root element",
diff --git a/docs/translations/api-docs-joy/radio-group/radio-group.json b/docs/translations/api-docs-joy/radio-group/radio-group.json
index 68c8c55ea390ae..204364f1d1c9e1 100644
--- a/docs/translations/api-docs-joy/radio-group/radio-group.json
+++ b/docs/translations/api-docs-joy/radio-group/radio-group.json
@@ -72,11 +72,6 @@
"nodeName": "the root element",
"conditions": "color=\"danger\"
"
},
- "colorInfo": {
- "description": "Class name applied to {{nodeName}} if {{conditions}}.",
- "nodeName": "the root element",
- "conditions": "color=\"info\"
"
- },
"colorSuccess": {
"description": "Class name applied to {{nodeName}} if {{conditions}}.",
"nodeName": "the root element",
diff --git a/docs/translations/api-docs-joy/radio/radio.json b/docs/translations/api-docs-joy/radio/radio.json
index 5e9a7a1a263f12..2f072ef43f2667 100644
--- a/docs/translations/api-docs-joy/radio/radio.json
+++ b/docs/translations/api-docs-joy/radio/radio.json
@@ -89,11 +89,6 @@
"nodeName": "the root element",
"conditions": "color=\"danger\"
"
},
- "colorInfo": {
- "description": "Class name applied to {{nodeName}} if {{conditions}}.",
- "nodeName": "the root element",
- "conditions": "color=\"info\"
"
- },
"colorNeutral": {
"description": "Class name applied to {{nodeName}} if {{conditions}}.",
"nodeName": "the root element",
diff --git a/docs/translations/api-docs-joy/select/select.json b/docs/translations/api-docs-joy/select/select.json
index d6d3565005254c..93b7e7139efa22 100644
--- a/docs/translations/api-docs-joy/select/select.json
+++ b/docs/translations/api-docs-joy/select/select.json
@@ -97,11 +97,6 @@
"nodeName": "the root slot",
"conditions": "color=\"danger\"
"
},
- "colorInfo": {
- "description": "Class name applied to {{nodeName}} if {{conditions}}.",
- "nodeName": "the root slot",
- "conditions": "color=\"info\"
"
- },
"colorSuccess": {
"description": "Class name applied to {{nodeName}} if {{conditions}}.",
"nodeName": "the root slot",
diff --git a/docs/translations/api-docs-joy/sheet/sheet.json b/docs/translations/api-docs-joy/sheet/sheet.json
index 73130ad01cdec1..165554f18e44f3 100644
--- a/docs/translations/api-docs-joy/sheet/sheet.json
+++ b/docs/translations/api-docs-joy/sheet/sheet.json
@@ -37,11 +37,6 @@
"nodeName": "the root element",
"conditions": "color=\"danger\"
"
},
- "colorInfo": {
- "description": "Class name applied to {{nodeName}} if {{conditions}}.",
- "nodeName": "the root element",
- "conditions": "color=\"info\"
"
- },
"colorSuccess": {
"description": "Class name applied to {{nodeName}} if {{conditions}}.",
"nodeName": "the root element",
diff --git a/docs/translations/api-docs-joy/skeleton/skeleton.json b/docs/translations/api-docs-joy/skeleton/skeleton.json
index 7092f8779d2bfe..2a16674f2c8070 100644
--- a/docs/translations/api-docs-joy/skeleton/skeleton.json
+++ b/docs/translations/api-docs-joy/skeleton/skeleton.json
@@ -75,30 +75,40 @@
"nodeName": "the root element",
"conditions": "level=\"h4\"
"
},
- "h5": {
+ "title-lg": {
"description": "Class name applied to {{nodeName}} if {{conditions}}.",
"nodeName": "the root element",
- "conditions": "level=\"h5\"
"
+ "conditions": "level=\"title-lg\"
"
},
- "h6": {
+ "title-md": {
"description": "Class name applied to {{nodeName}} if {{conditions}}.",
"nodeName": "the root element",
- "conditions": "level=\"h6\"
"
+ "conditions": "level=\"title-md\"
"
},
- "body1": {
+ "title-sm": {
"description": "Class name applied to {{nodeName}} if {{conditions}}.",
"nodeName": "the root element",
- "conditions": "level=\"body1\"
"
+ "conditions": "level=\"title-sm\"
"
},
- "body2": {
+ "body-lg": {
"description": "Class name applied to {{nodeName}} if {{conditions}}.",
"nodeName": "the root element",
- "conditions": "level=\"body2\"
"
+ "conditions": "level=\"body-lg\"
"
},
- "body3": {
+ "body-md": {
"description": "Class name applied to {{nodeName}} if {{conditions}}.",
"nodeName": "the root element",
- "conditions": "level=\"body3\"
"
+ "conditions": "level=\"body-md\"
"
+ },
+ "body-sm": {
+ "description": "Class name applied to {{nodeName}} if {{conditions}}.",
+ "nodeName": "the root element",
+ "conditions": "level=\"body-sm\"
"
+ },
+ "body-xs": {
+ "description": "Class name applied to {{nodeName}} if {{conditions}}.",
+ "nodeName": "the root element",
+ "conditions": "level=\"body-xs\"
"
}
},
"slotDescriptions": { "root": "The component that renders the root." }
diff --git a/docs/translations/api-docs-joy/slider/slider.json b/docs/translations/api-docs-joy/slider/slider.json
index 217b9d1c8c8f19..e08b39d0a13a4b 100644
--- a/docs/translations/api-docs-joy/slider/slider.json
+++ b/docs/translations/api-docs-joy/slider/slider.json
@@ -174,11 +174,6 @@
"nodeName": "the root element",
"conditions": "color=\"danger\"
"
},
- "colorInfo": {
- "description": "Class name applied to {{nodeName}} if {{conditions}}.",
- "nodeName": "the root element",
- "conditions": "color=\"info\"
"
- },
"colorSuccess": {
"description": "Class name applied to {{nodeName}} if {{conditions}}.",
"nodeName": "the root element",
diff --git a/docs/translations/api-docs-joy/svg-icon/svg-icon.json b/docs/translations/api-docs-joy/svg-icon/svg-icon.json
index 9879a566d63e1e..0a9bd86e7b2a5c 100644
--- a/docs/translations/api-docs-joy/svg-icon/svg-icon.json
+++ b/docs/translations/api-docs-joy/svg-icon/svg-icon.json
@@ -9,7 +9,7 @@
"description": "The component used for the root node. Either a string to use a HTML element or a component."
},
"fontSize": {
- "description": "The fontSize applied to the icon. Defaults to 1rem, but can be configure to inherit font size."
+ "description": "The theme's fontSize applied to the icon that will override the size
prop. Use this prop when you want to use a specific font-size from the theme."
},
"htmlColor": { "description": "Applies a color attribute to the SVG element." },
"inheritViewBox": {
@@ -18,6 +18,7 @@
"shapeRendering": {
"description": "The shape-rendering attribute. The behavior of the different options is described on the MDN Web Docs. If you are having issues with blurry icons you should investigate this prop."
},
+ "size": { "description": "The size of the component." },
"slotProps": { "description": "The props used for each slot inside." },
"slots": { "description": "The components used for each slot inside." },
"sx": {
@@ -52,11 +53,6 @@
"nodeName": "the root element",
"conditions": "color=\"danger\"
"
},
- "colorInfo": {
- "description": "Class name applied to {{nodeName}} if {{conditions}}.",
- "nodeName": "the root element",
- "conditions": "color=\"info\"
"
- },
"colorSuccess": {
"description": "Class name applied to {{nodeName}} if {{conditions}}.",
"nodeName": "the root element",
@@ -112,15 +108,20 @@
"nodeName": "the root element",
"conditions": "fontSize=\"xl4\"
"
},
- "fontSizeXl5": {
+ "sizeSm": {
+ "description": "Class name applied to {{nodeName}} if {{conditions}}.",
+ "nodeName": "the root element",
+ "conditions": "size=\"sm\"
"
+ },
+ "sizeMd": {
"description": "Class name applied to {{nodeName}} if {{conditions}}.",
"nodeName": "the root element",
- "conditions": "fontSize=\"xl5\"
"
+ "conditions": "size=\"md\"
"
},
- "fontSizeXl6": {
+ "sizeLg": {
"description": "Class name applied to {{nodeName}} if {{conditions}}.",
"nodeName": "the root element",
- "conditions": "fontSize=\"xl6\"
"
+ "conditions": "size=\"lg\"
"
}
},
"slotDescriptions": { "root": "The component that renders the root." }
diff --git a/docs/translations/api-docs-joy/switch/switch.json b/docs/translations/api-docs-joy/switch/switch.json
index b8419420132fb7..9370c49a1238a8 100644
--- a/docs/translations/api-docs-joy/switch/switch.json
+++ b/docs/translations/api-docs-joy/switch/switch.json
@@ -76,11 +76,6 @@
"nodeName": "the root element",
"conditions": "color=\"danger\"
"
},
- "colorInfo": {
- "description": "Class name applied to {{nodeName}} if {{conditions}}.",
- "nodeName": "the root element",
- "conditions": "color=\"info\"
"
- },
"colorSuccess": {
"description": "Class name applied to {{nodeName}} if {{conditions}}.",
"nodeName": "the root element",
diff --git a/docs/translations/api-docs-joy/tab-list/tab-list.json b/docs/translations/api-docs-joy/tab-list/tab-list.json
index eeb233426021bd..51200b3d9fa6cc 100644
--- a/docs/translations/api-docs-joy/tab-list/tab-list.json
+++ b/docs/translations/api-docs-joy/tab-list/tab-list.json
@@ -10,12 +10,18 @@
"component": {
"description": "The component used for the root node. Either a string to use a HTML element or a component."
},
+ "disableUnderline": {
+ "description": "If true
, the TabList's underline will disappear."
+ },
"size": { "description": "The size of the component." },
"slotProps": { "description": "The props used for each slot inside." },
"slots": { "description": "The components used for each slot inside." },
+ "sticky": { "description": "If provided, the TabList will have postion sticky
." },
"sx": {
"description": "The system prop that allows defining system overrides as well as additional CSS styles."
},
+ "tabFlex": { "description": "The flex value of the Tab." },
+ "underlinePlacement": { "description": "The placement of the TabList's underline." },
"variant": {
"description": "The global variant to use."
}
@@ -31,9 +37,6 @@
"colorDanger": {
"description": "Classname applied to the root element if color="danger"
."
},
- "colorInfo": {
- "description": "Classname applied to the root element if color="info"
."
- },
"colorSuccess": {
"description": "Classname applied to the root element if color="success"
."
},
diff --git a/docs/translations/api-docs-joy/tab-panel/tab-panel.json b/docs/translations/api-docs-joy/tab-panel/tab-panel.json
index 0f4cef86598fc4..28a028235f34a0 100644
--- a/docs/translations/api-docs-joy/tab-panel/tab-panel.json
+++ b/docs/translations/api-docs-joy/tab-panel/tab-panel.json
@@ -2,6 +2,9 @@
"componentDescription": "",
"propDescriptions": {
"children": { "description": "The content of the component." },
+ "color": {
+ "description": "The color of the component. It supports those theme colors that make sense for this component."
+ },
"component": {
"description": "The component used for the root node. Either a string to use a HTML element or a component."
},
@@ -13,6 +16,9 @@
},
"value": {
"description": "The value of the TabPanel. It will be shown when the Tab with the corresponding value is selected."
+ },
+ "variant": {
+ "description": "The global variant to use."
}
},
"classDescriptions": {
@@ -36,6 +42,38 @@
"description": "Class name applied to {{nodeName}} if {{conditions}}.",
"nodeName": "the root element",
"conditions": "orientation=\"vertical\"
"
+ },
+ "colorPrimary": {
+ "description": "Classname applied to the root element if color="primary"
."
+ },
+ "colorNeutral": {
+ "description": "Classname applied to the root element if color="neutral"
."
+ },
+ "colorDanger": {
+ "description": "Classname applied to the root element if color="danger"
."
+ },
+ "colorSuccess": {
+ "description": "Classname applied to the root element if color="success"
."
+ },
+ "colorWarning": {
+ "description": "Classname applied to the root element if color="warning"
."
+ },
+ "colorContext": {
+ "description": "Class name applied to {{nodeName}} when {{conditions}}.",
+ "nodeName": "the root element",
+ "conditions": "color inversion is triggered"
+ },
+ "variantPlain": {
+ "description": "Classname applied to the root element if variant="plain"
."
+ },
+ "variantOutlined": {
+ "description": "Classname applied to the root element if variant="outlined"
."
+ },
+ "variantSoft": {
+ "description": "Classname applied to the root element if variant="soft"
."
+ },
+ "variantSolid": {
+ "description": "Classname applied to the root element if variant="solid"
."
}
},
"slotDescriptions": { "root": "The component that renders the root." }
diff --git a/docs/translations/api-docs-joy/tab/tab.json b/docs/translations/api-docs-joy/tab/tab.json
index 1de61c308d5bb5..2d1455dc168517 100644
--- a/docs/translations/api-docs-joy/tab/tab.json
+++ b/docs/translations/api-docs-joy/tab/tab.json
@@ -11,6 +11,15 @@
"description": "The component used for the root node. Either a string to use a HTML element or a component."
},
"disabled": { "description": "If true
, the component is disabled." },
+ "disableIndicator": {
+ "description": "If true
, the pseudo element indicator is hidden."
+ },
+ "indicatorInset": {
+ "description": "If true
, the indicator stay within the padding based on the Tabs
orientation."
+ },
+ "indicatorPlacement": {
+ "description": "The indicator's position when the Tab is selected."
+ },
"onChange": { "description": "Callback invoked when new value is being set." },
"orientation": { "description": "The content direction flow." },
"slotProps": { "description": "The props used for each slot inside." },
@@ -49,9 +58,6 @@
"colorDanger": {
"description": "Classname applied to the root element if color="danger"
."
},
- "colorInfo": {
- "description": "Classname applied to the root element if color="info"
."
- },
"colorSuccess": {
"description": "Classname applied to the root element if color="success"
."
},
diff --git a/docs/translations/api-docs-joy/table/table.json b/docs/translations/api-docs-joy/table/table.json
index 1b074de73d5d19..37236af2f0d939 100644
--- a/docs/translations/api-docs-joy/table/table.json
+++ b/docs/translations/api-docs-joy/table/table.json
@@ -51,11 +51,6 @@
"nodeName": "the root element",
"conditions": "color=\"danger\"
"
},
- "colorInfo": {
- "description": "Class name applied to {{nodeName}} if {{conditions}}.",
- "nodeName": "the root element",
- "conditions": "color=\"info\"
"
- },
"colorSuccess": {
"description": "Class name applied to {{nodeName}} if {{conditions}}.",
"nodeName": "the root element",
diff --git a/docs/translations/api-docs-joy/tabs/tabs.json b/docs/translations/api-docs-joy/tabs/tabs.json
index fc37e2929a851d..76727116c5169a 100644
--- a/docs/translations/api-docs-joy/tabs/tabs.json
+++ b/docs/translations/api-docs-joy/tabs/tabs.json
@@ -47,9 +47,6 @@
"colorDanger": {
"description": "Classname applied to the root element if color="danger"
."
},
- "colorInfo": {
- "description": "Classname applied to the root element if color="info"
."
- },
"colorSuccess": {
"description": "Classname applied to the root element if color="success"
."
},
diff --git a/docs/translations/api-docs-joy/textarea/textarea.json b/docs/translations/api-docs-joy/textarea/textarea.json
index 969e028c74335d..793dbda7fb168d 100644
--- a/docs/translations/api-docs-joy/textarea/textarea.json
+++ b/docs/translations/api-docs-joy/textarea/textarea.json
@@ -70,11 +70,6 @@
"nodeName": "the root element",
"conditions": "color=\"danger\"
"
},
- "colorInfo": {
- "description": "Class name applied to {{nodeName}} if {{conditions}}.",
- "nodeName": "the root element",
- "conditions": "color=\"info\"
"
- },
"colorSuccess": {
"description": "Class name applied to {{nodeName}} if {{conditions}}.",
"nodeName": "the root element",
diff --git a/docs/translations/api-docs-joy/toggle-button-group/toggle-button-group.json b/docs/translations/api-docs-joy/toggle-button-group/toggle-button-group.json
index e001536054649e..52129aed489747 100644
--- a/docs/translations/api-docs-joy/toggle-button-group/toggle-button-group.json
+++ b/docs/translations/api-docs-joy/toggle-button-group/toggle-button-group.json
@@ -55,11 +55,6 @@
"nodeName": "the root element",
"conditions": "color=\"danger\"
"
},
- "colorInfo": {
- "description": "Class name applied to {{nodeName}} if {{conditions}}.",
- "nodeName": "the root element",
- "conditions": "color=\"info\"
"
- },
"colorSuccess": {
"description": "Class name applied to {{nodeName}} if {{conditions}}.",
"nodeName": "the root element",
diff --git a/docs/translations/api-docs-joy/tooltip/tooltip.json b/docs/translations/api-docs-joy/tooltip/tooltip.json
index ba9881dd695328..b96391a981cf20 100644
--- a/docs/translations/api-docs-joy/tooltip/tooltip.json
+++ b/docs/translations/api-docs-joy/tooltip/tooltip.json
@@ -118,11 +118,6 @@
"nodeName": "the root element",
"conditions": "color=\"danger\"
"
},
- "colorInfo": {
- "description": "Class name applied to {{nodeName}} if {{conditions}}.",
- "nodeName": "the root element",
- "conditions": "color=\"info\"
"
- },
"colorNeutral": {
"description": "Class name applied to {{nodeName}} if {{conditions}}.",
"nodeName": "the root element",
diff --git a/docs/translations/api-docs-joy/typography/typography.json b/docs/translations/api-docs-joy/typography/typography.json
index 7089fe3747aab0..592b7f96cda81e 100644
--- a/docs/translations/api-docs-joy/typography/typography.json
+++ b/docs/translations/api-docs-joy/typography/typography.json
@@ -50,30 +50,40 @@
"nodeName": "the root element",
"conditions": "level=\"h4\"
"
},
- "h5": {
+ "title-lg": {
"description": "Class name applied to {{nodeName}} if {{conditions}}.",
"nodeName": "the root element",
- "conditions": "level=\"h5\"
"
+ "conditions": "level=\"title-lg\"
"
},
- "h6": {
+ "title-md": {
"description": "Class name applied to {{nodeName}} if {{conditions}}.",
"nodeName": "the root element",
- "conditions": "level=\"h6\"
"
+ "conditions": "level=\"title-md\"
"
},
- "body1": {
+ "title-sm": {
"description": "Class name applied to {{nodeName}} if {{conditions}}.",
"nodeName": "the root element",
- "conditions": "level=\"body1\"
"
+ "conditions": "level=\"title-sm\"
"
},
- "body2": {
+ "body-lg": {
"description": "Class name applied to {{nodeName}} if {{conditions}}.",
"nodeName": "the root element",
- "conditions": "level=\"body2\"
"
+ "conditions": "level=\"body-lg\"
"
},
- "body3": {
+ "body-md": {
"description": "Class name applied to {{nodeName}} if {{conditions}}.",
"nodeName": "the root element",
- "conditions": "level=\"body3\"
"
+ "conditions": "level=\"body-md\"
"
+ },
+ "body-sm": {
+ "description": "Class name applied to {{nodeName}} if {{conditions}}.",
+ "nodeName": "the root element",
+ "conditions": "level=\"body-sm\"
"
+ },
+ "body-xs": {
+ "description": "Class name applied to {{nodeName}} if {{conditions}}.",
+ "nodeName": "the root element",
+ "conditions": "level=\"body-xs\"
"
},
"noWrap": {
"description": "Class name applied to {{nodeName}} if {{conditions}}.",
@@ -102,11 +112,6 @@
"nodeName": "the root element",
"conditions": "color=\"danger\"
"
},
- "colorInfo": {
- "description": "Class name applied to {{nodeName}} if {{conditions}}.",
- "nodeName": "the root element",
- "conditions": "color=\"info\"
"
- },
"colorSuccess": {
"description": "Class name applied to {{nodeName}} if {{conditions}}.",
"nodeName": "the root element",
diff --git a/docs/translations/translations.json b/docs/translations/translations.json
index d708c6cedd9de4..68405d03d40adc 100644
--- a/docs/translations/translations.json
+++ b/docs/translations/translations.json
@@ -512,6 +512,8 @@
"/joy-ui/guides/overriding-component-structure": "Overriding component structure",
"/joy-ui/guides/using-joy-ui-and-material-ui-together": "Joy UI and Material UI together",
"/joy-ui/guides/using-icon-libraries": "Using icon libraries",
- "/joy-ui/guides/next-js-app-router": "Next.js App Router"
+ "/joy-ui/guides/next-js-app-router": "Next.js App Router",
+ "/joy-ui/migration": "Migration",
+ "/joy-ui/migration/migrating-default-theme": "Migrating the default theme"
}
}
diff --git a/examples/joy-next-app-router-ts/src/app/page.tsx b/examples/joy-next-app-router-ts/src/app/page.tsx
index d235da99c007ab..dfedc6a301e4c4 100644
--- a/examples/joy-next-app-router-ts/src/app/page.tsx
+++ b/examples/joy-next-app-router-ts/src/app/page.tsx
@@ -37,7 +37,7 @@ export default function Home() {
Welcome back π
- Sign in to continue.
+ Sign in to continue.
Email
diff --git a/examples/joy-next-app-router-ts/src/app/sign-up/page.tsx b/examples/joy-next-app-router-ts/src/app/sign-up/page.tsx
index 7a8883dc131dba..f2451d7ef42fb4 100644
--- a/examples/joy-next-app-router-ts/src/app/sign-up/page.tsx
+++ b/examples/joy-next-app-router-ts/src/app/sign-up/page.tsx
@@ -37,7 +37,7 @@ export default function SignUp() {
Welcome π
- Sign up for an account.
+ Sign up for an account.
Email
diff --git a/packages/api-docs-builder/ApiBuilders/ComponentApiBuilder.ts b/packages/api-docs-builder/ApiBuilders/ComponentApiBuilder.ts
index 255668f6cde090..26a657b7a0e50d 100644
--- a/packages/api-docs-builder/ApiBuilders/ComponentApiBuilder.ts
+++ b/packages/api-docs-builder/ApiBuilders/ComponentApiBuilder.ts
@@ -490,7 +490,7 @@ const attachPropsTable = (reactApi: ReactApi) => {
try {
prop = createDescribeableProp(propDescriptor, propName);
} catch (error) {
- propErrors.push([propName, error as Error]);
+ propErrors.push([`[${reactApi.name}] \`${propName}\``, error as Error]);
prop = null;
}
if (prop === null) {
diff --git a/packages/mui-joy/src/Alert/Alert.spec.tsx b/packages/mui-joy/src/Alert/Alert.spec.tsx
index 860a99f9c21601..cc11ff86543ab5 100644
--- a/packages/mui-joy/src/Alert/Alert.spec.tsx
+++ b/packages/mui-joy/src/Alert/Alert.spec.tsx
@@ -15,7 +15,6 @@ import Alert, { AlertOwnerState } from '@mui/joy/Alert';
// `color`
;
;
- ;
;
;
;
diff --git a/packages/mui-joy/src/Alert/Alert.test.tsx b/packages/mui-joy/src/Alert/Alert.test.tsx
index 9b47494ae77364..535719b37be4ef 100644
--- a/packages/mui-joy/src/Alert/Alert.test.tsx
+++ b/packages/mui-joy/src/Alert/Alert.test.tsx
@@ -32,10 +32,10 @@ describe(' ', () => {
it('soft by default', () => {
const { getByRole } = render( );
- expect(getByRole('alert')).to.have.class(classes.variantSoft);
+ expect(getByRole('alert')).to.have.class(classes.variantOutlined);
});
- (['outlined', 'soft', 'solid'] as const).forEach((variant) => {
+ (['plain', 'soft', 'solid'] as const).forEach((variant) => {
it(`should render ${variant}`, () => {
const { getByRole } = render( );
@@ -50,10 +50,10 @@ describe(' ', () => {
it('adds a primary class by default', () => {
const { getByRole } = render( );
- expect(getByRole('alert')).to.have.class(classes.colorPrimary);
+ expect(getByRole('alert')).to.have.class(classes.colorNeutral);
});
- (['primary', 'success', 'info', 'danger', 'neutral', 'warning'] as const).forEach((color) => {
+ (['primary', 'success', 'danger', 'neutral', 'warning'] as const).forEach((color) => {
it(`should render ${color}`, () => {
const { getByRole } = render( );
diff --git a/packages/mui-joy/src/Alert/Alert.tsx b/packages/mui-joy/src/Alert/Alert.tsx
index c27b23b1b41078..ff47ef78cc12fa 100644
--- a/packages/mui-joy/src/Alert/Alert.tsx
+++ b/packages/mui-joy/src/Alert/Alert.tsx
@@ -11,6 +11,7 @@ import { ColorInversionProvider, useColorInversion } from '../styles/ColorInvers
import useSlot from '../utils/useSlot';
import { getAlertUtilityClass } from './alertClasses';
import { AlertProps, AlertOwnerState, AlertTypeMap } from './AlertProps';
+import { resolveSxValue } from '../styles/styleUtils';
const useUtilityClasses = (ownerState: AlertOwnerState) => {
const { variant, color, size } = ownerState;
@@ -33,79 +34,78 @@ const AlertRoot = styled('div', {
name: 'JoyAlert',
slot: 'Root',
overridesResolver: (props, styles) => styles.root,
-})<{ ownerState: AlertOwnerState }>(({ theme, ownerState }) => [
- {
- '--Alert-radius': theme.vars.radius.sm,
- '--Alert-decoratorChildRadius':
- 'max((var(--Alert-radius) - var(--variant-borderWidth, 0px)) - var(--Alert-padding), min(var(--Alert-padding) + var(--variant-borderWidth, 0px), var(--Alert-radius) / 2))',
- '--Button-minHeight': 'var(--Alert-decoratorChildHeight)',
- '--IconButton-size': 'var(--Alert-decoratorChildHeight)',
- '--Button-radius': 'var(--Alert-decoratorChildRadius)',
- '--IconButton-radius': 'var(--Alert-decoratorChildRadius)',
- ...(ownerState.size === 'sm' && {
- '--Alert-padding': '0.5rem',
- '--Alert-gap': '0.375rem',
- '--Alert-decoratorChildHeight': '1.5rem',
- '--Icon-fontSize': '1.125rem',
- fontSize: theme.vars.fontSize.sm,
- }),
- ...(ownerState.size === 'md' && {
- '--Alert-padding': '0.75rem',
- '--Alert-gap': '0.5rem',
- '--Alert-decoratorChildHeight': '2rem',
- '--Icon-fontSize': '1.25rem',
- fontSize: theme.vars.fontSize.sm,
+})<{ ownerState: AlertOwnerState }>(({ theme, ownerState }) => {
+ const { p, padding, borderRadius } = resolveSxValue({ theme, ownerState }, [
+ 'p',
+ 'padding',
+ 'borderRadius',
+ ]);
+ return [
+ {
+ '--Alert-radius': theme.vars.radius.sm,
+ '--Alert-decoratorChildRadius':
+ 'max((var(--Alert-radius) - var(--variant-borderWidth, 0px)) - var(--Alert-padding), min(var(--Alert-padding) + var(--variant-borderWidth, 0px), var(--Alert-radius) / 2))',
+ '--Button-minHeight': 'var(--Alert-decoratorChildHeight)',
+ '--IconButton-size': 'var(--Alert-decoratorChildHeight)',
+ '--Button-radius': 'var(--Alert-decoratorChildRadius)',
+ '--IconButton-radius': 'var(--Alert-decoratorChildRadius)',
+ '--Icon-color': 'currentColor',
+ ...(ownerState.size === 'sm' && {
+ '--Alert-padding': '0.5rem',
+ '--Alert-decoratorChildHeight': '1.5rem',
+ '--Icon-fontSize': theme.vars.fontSize.xl,
+ gap: '0.5rem',
+ }),
+ ...(ownerState.size === 'md' && {
+ '--Alert-padding': '0.75rem',
+ '--Alert-decoratorChildHeight': '2rem',
+ '--Icon-fontSize': theme.vars.fontSize.xl,
+ gap: '0.625rem',
+ }),
+ ...(ownerState.size === 'lg' && {
+ '--Alert-padding': '1rem',
+ '--Alert-decoratorChildHeight': '2.375rem',
+ '--Icon-fontSize': theme.vars.fontSize.xl2,
+ gap: '0.875rem',
+ }),
+ backgroundColor: theme.vars.palette.background.surface,
+ display: 'flex',
+ position: 'relative',
+ alignItems: 'center',
+ padding: `var(--Alert-padding)`,
+ borderRadius: 'var(--Alert-radius)',
+ boxShadow: theme.vars.shadow.xs,
+ ...theme.typography[`body-${({ sm: 'xs', md: 'sm', lg: 'md' } as const)[ownerState.size!]}`],
fontWeight: theme.vars.fontWeight.md,
- }),
- ...(ownerState.size === 'lg' && {
- '--Alert-padding': '1rem',
- '--Alert-gap': '0.75rem',
- '--Alert-decoratorChildHeight': '2.375rem',
- '--Icon-fontSize': '1.5rem',
- fontSize: theme.vars.fontSize.md,
- fontWeight: theme.vars.fontWeight.md,
- }),
- fontFamily: theme.vars.fontFamily.body,
- lineHeight: theme.vars.lineHeight.md,
- backgroundColor: 'transparent',
- display: 'flex',
- position: 'relative',
- alignItems: 'center',
- padding: `var(--Alert-padding)`,
- borderRadius: 'var(--Alert-radius)',
- ...theme.variants[ownerState.variant!]?.[ownerState.color!],
- },
- ownerState.color !== 'context' &&
- ownerState.invertedColors &&
- theme.colorInversion[ownerState.variant!]?.[ownerState.color!],
-]);
+ ...theme.variants[ownerState.variant!]?.[ownerState.color!],
+ },
+ ownerState.color !== 'context' &&
+ ownerState.invertedColors &&
+ theme.colorInversion[ownerState.variant!]?.[ownerState.color!],
+ p !== undefined && { '--Alert-padding': p },
+ padding !== undefined && { '--Alert-padding': padding },
+ borderRadius !== undefined && { '--Alert-radius': borderRadius },
+ ];
+});
const AlertStartDecorator = styled('span', {
name: 'JoyAlert',
slot: 'StartDecorator',
overridesResolver: (props, styles) => styles.startDecorator,
-})<{ ownerState: AlertOwnerState }>(({ theme, ownerState }) => ({
+})<{ ownerState: AlertOwnerState }>({
display: 'inherit',
flex: 'none',
- marginInlineEnd: 'var(--Alert-gap)',
- ...(ownerState.color !== 'context' && {
- color: theme.vars.palette[ownerState.color!]?.[`${ownerState.variant!}Color`],
- }),
-}));
+});
const AlertEndDecorator = styled('span', {
name: 'JoyAlert',
slot: 'EndDecorator',
overridesResolver: (props, styles) => styles.endDecorator,
-})<{ ownerState: AlertOwnerState }>(({ theme, ownerState }) => ({
+})<{ ownerState: AlertOwnerState }>({
display: 'inherit',
flex: 'none',
- marginInlineStart: 'var(--Alert-gap)',
marginLeft: 'auto',
- ...(ownerState.color !== 'context' && {
- color: theme.vars.palette[ownerState.color!]?.[`${ownerState.variant!}Color`],
- }),
-}));
+});
/**
*
* Demos:
@@ -125,10 +125,10 @@ const Alert = React.forwardRef(function Alert(inProps, ref) {
const {
children,
className,
- color: colorProp = 'primary',
+ color: colorProp = 'neutral',
invertedColors = false,
role = 'alert',
- variant = 'soft',
+ variant = 'outlined',
size = 'md',
startDecorator,
endDecorator,
@@ -212,10 +212,10 @@ Alert.propTypes /* remove-proptypes */ = {
className: PropTypes.string,
/**
* The color of the component. It supports those theme colors that make sense for this component.
- * @default 'primary'
+ * @default 'neutral'
*/
color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([
- PropTypes.oneOf(['danger', 'info', 'neutral', 'primary', 'success', 'warning']),
+ PropTypes.oneOf(['danger', 'neutral', 'primary', 'success', 'warning']),
PropTypes.string,
]),
/**
@@ -277,7 +277,7 @@ Alert.propTypes /* remove-proptypes */ = {
]),
/**
* The [global variant](https://mui.com/joy-ui/main-features/global-variants/) to use.
- * @default 'soft'
+ * @default 'outlined'
*/
variant: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([
PropTypes.oneOf(['outlined', 'plain', 'soft', 'solid']),
diff --git a/packages/mui-joy/src/Alert/AlertProps.ts b/packages/mui-joy/src/Alert/AlertProps.ts
index fcda2317c97c97..b79749d972e662 100644
--- a/packages/mui-joy/src/Alert/AlertProps.ts
+++ b/packages/mui-joy/src/Alert/AlertProps.ts
@@ -41,7 +41,7 @@ export interface AlertTypeMap {
AlertSlotsAndSlotProps & {
/**
* The color of the component. It supports those theme colors that make sense for this component.
- * @default 'primary'
+ * @default 'neutral'
*/
color?: OverridableStringUnion;
/**
@@ -73,7 +73,7 @@ export interface AlertTypeMap {
sx?: SxProps;
/**
* The [global variant](https://mui.com/joy-ui/main-features/global-variants/) to use.
- * @default 'soft'
+ * @default 'outlined'
*/
variant?: OverridableStringUnion;
};
diff --git a/packages/mui-joy/src/Alert/alertClasses.ts b/packages/mui-joy/src/Alert/alertClasses.ts
index 9f22b93d5738d7..b470ec43d6b2aa 100644
--- a/packages/mui-joy/src/Alert/alertClasses.ts
+++ b/packages/mui-joy/src/Alert/alertClasses.ts
@@ -7,8 +7,6 @@ export interface AlertClasses {
colorPrimary: string;
/** Class name applied to the root element if `color="danger"`. */
colorDanger: string;
- /** Class name applied to the root element if `color="info"`. */
- colorInfo: string;
/** Class name applied to the root element if `color="neutral"`. */
colorNeutral: string;
/** Class name applied to the root element if `color="success"`. */
@@ -49,7 +47,6 @@ const alertClasses: AlertClasses = generateUtilityClasses('MuiAlert', [
'endDecorator',
'colorPrimary',
'colorDanger',
- 'colorInfo',
'colorNeutral',
'colorSuccess',
'colorWarning',
diff --git a/packages/mui-joy/src/AspectRatio/AspectRatio.test.tsx b/packages/mui-joy/src/AspectRatio/AspectRatio.test.tsx
index d77306f5950237..5dc77a5ba452fb 100644
--- a/packages/mui-joy/src/AspectRatio/AspectRatio.test.tsx
+++ b/packages/mui-joy/src/AspectRatio/AspectRatio.test.tsx
@@ -62,7 +62,7 @@ describe(' ', () => {
expect(getByTestId('root').firstChild).to.have.class(classes.colorNeutral);
});
- (['primary', 'success', 'info', 'danger', 'neutral', 'warning'] as const).forEach((color) => {
+ (['primary', 'success', 'danger', 'neutral', 'warning'] as const).forEach((color) => {
it(`should render ${color}`, () => {
const { getByTestId } = render(
diff --git a/packages/mui-joy/src/AspectRatio/AspectRatio.tsx b/packages/mui-joy/src/AspectRatio/AspectRatio.tsx
index 480dae813bfeb4..c5aadf95b810f8 100644
--- a/packages/mui-joy/src/AspectRatio/AspectRatio.tsx
+++ b/packages/mui-joy/src/AspectRatio/AspectRatio.tsx
@@ -30,7 +30,7 @@ const AspectRatioRoot = styled('div', {
name: 'JoyAspectRatio',
slot: 'Root',
overridesResolver: (props, styles) => styles.root,
-})<{ ownerState: AspectRatioOwnerState }>(({ ownerState }) => {
+})<{ ownerState: AspectRatioOwnerState }>(({ ownerState, theme }) => {
const minHeight =
typeof ownerState.minHeight === 'number' ? `${ownerState.minHeight}px` : ownerState.minHeight;
const maxHeight =
@@ -40,6 +40,10 @@ const AspectRatioRoot = styled('div', {
'--AspectRatio-paddingBottom': `clamp(var(--AspectRatio-minHeight), calc(100% / (${ownerState.ratio})), var(--AspectRatio-maxHeight))`,
'--AspectRatio-maxHeight': maxHeight || '9999px',
'--AspectRatio-minHeight': minHeight || '0px',
+ '--Icon-color':
+ ownerState.color !== 'neutral' || ownerState.variant === 'solid'
+ ? 'currentColor'
+ : theme.vars.palette.text.icon,
borderRadius: 'var(--AspectRatio-radius)',
flexDirection: 'column',
margin: 'var(--AspectRatio-margin)',
@@ -50,38 +54,37 @@ const AspectRatioContent = styled('div', {
name: 'JoyAspectRatio',
slot: 'Content',
overridesResolver: (props, styles) => styles.content,
-})<{ ownerState: AspectRatioOwnerState }>(({ theme, ownerState }) => [
- {
- flex: 1,
- position: 'relative',
- borderRadius: 'inherit',
- height: 0,
- paddingBottom: 'calc(var(--AspectRatio-paddingBottom) - 2 * var(--variant-borderWidth, 0px))',
- overflow: 'hidden',
- transition: 'inherit', // makes it easy to add transition to the content
- // use data-attribute instead of :first-child to support zero config SSR (emotion)
- // use nested selector for integrating with nextjs image `fill` layout (spans are inserted on top of the img)
- '& [data-first-child]': {
- display: 'flex',
- justifyContent: 'center',
- alignItems: 'center',
- boxSizing: 'border-box',
- position: 'absolute',
+})<{ ownerState: AspectRatioOwnerState }>(({ theme, ownerState }) => ({
+ flex: 1,
+ position: 'relative',
+ borderRadius: 'inherit',
+ height: 0,
+ paddingBottom: 'calc(var(--AspectRatio-paddingBottom) - 2 * var(--variant-borderWidth, 0px))',
+ overflow: 'hidden',
+ transition: 'inherit', // makes it easy to add transition to the content
+ // use data-attribute instead of :first-child to support zero config SSR (emotion)
+ // use nested selector for integrating with nextjs image `fill` layout (spans are inserted on top of the img)
+ '& [data-first-child]': {
+ display: 'flex',
+ justifyContent: 'center',
+ alignItems: 'center',
+ boxSizing: 'border-box',
+ position: 'absolute',
+ width: '100%',
+ height: '100%',
+ objectFit: ownerState.objectFit,
+ margin: 0,
+ padding: 0,
+ '& > img': {
+ // support art-direction that uses
width: '100%',
height: '100%',
objectFit: ownerState.objectFit,
- margin: 0,
- padding: 0,
- '& > img': {
- // support art-direction that uses
- width: '100%',
- height: '100%',
- objectFit: ownerState.objectFit,
- },
},
},
- theme.variants[ownerState.variant!]?.[ownerState.color!],
-]);
+ ...theme.typography['body-md'],
+ ...theme.variants[ownerState.variant!]?.[ownerState.color!],
+}));
/**
*
@@ -171,7 +174,7 @@ AspectRatio.propTypes /* remove-proptypes */ = {
* The color of the component. It supports those theme colors that make sense for this component.
* @default 'neutral'
*/
- color: PropTypes.oneOf(['danger', 'info', 'neutral', 'primary', 'success', 'warning']),
+ color: PropTypes.oneOf(['danger', 'neutral', 'primary', 'success', 'warning']),
/**
* The component used for the root node.
* Either a string to use a HTML element or a component.
diff --git a/packages/mui-joy/src/AspectRatio/aspectRatioClasses.ts b/packages/mui-joy/src/AspectRatio/aspectRatioClasses.ts
index 472845f5d49c5a..d7213e28652929 100644
--- a/packages/mui-joy/src/AspectRatio/aspectRatioClasses.ts
+++ b/packages/mui-joy/src/AspectRatio/aspectRatioClasses.ts
@@ -11,8 +11,6 @@ export interface AspectRatioClasses {
colorNeutral: string;
/** Class name applied to the content element if `color="danger"`. */
colorDanger: string;
- /** Class name applied to the content element if `color="info"`. */
- colorInfo: string;
/** Class name applied to the content element if `color="success"`. */
colorSuccess: string;
/** Class name applied to the content element if `color="warning"`. */
@@ -41,7 +39,6 @@ const aspectRatioClasses: AspectRatioClasses = generateUtilityClasses('MuiAspect
'colorPrimary',
'colorNeutral',
'colorDanger',
- 'colorInfo',
'colorSuccess',
'colorWarning',
'colorContext',
diff --git a/packages/mui-joy/src/Autocomplete/Autocomplete.tsx b/packages/mui-joy/src/Autocomplete/Autocomplete.tsx
index 21c905f0108d1d..5b13700085f035 100644
--- a/packages/mui-joy/src/Autocomplete/Autocomplete.tsx
+++ b/packages/mui-joy/src/Autocomplete/Autocomplete.tsx
@@ -18,6 +18,7 @@ import { useThemeProps } from '../styles';
import ClearIcon from '../internal/svg-icons/Close';
import ArrowDropDownIcon from '../internal/svg-icons/ArrowDropDown';
import styled from '../styles/styled';
+import { VariantColorProvider, getChildVariantAndColor } from '../styles/variantColorInheritance';
// slot components
import { StyledIconButton } from '../IconButton/IconButton';
// default render components
@@ -60,13 +61,6 @@ const defaultRenderGroup = (params: AutocompleteRenderGroupParams) => (
);
-const defaultVariantMapping = {
- plain: 'plain',
- outlined: 'plain',
- soft: 'soft',
- solid: 'solid',
-};
-
const useUtilityClasses = (ownerState: OwnerState) => {
const {
disabled,
@@ -213,14 +207,15 @@ const AutocompletePopupIndicator = styled(StyledIconButton as unknown as 'button
name: 'JoyAutocomplete',
slot: 'PopupIndicator',
overridesResolver: (props, styles) => styles.popupIndicator,
-})<{ ownerState: OwnerState }>(({ ownerState }) => ({
+})<{ ownerState: OwnerState }>({
alignSelf: 'center',
marginInlineStart: 'calc(var(--_Input-paddingBlock) / 2)',
marginInlineEnd: 'calc(var(--Input-decoratorChildOffset) * -1)',
- ...(ownerState.popupOpen && {
+ [`&.${autocompleteClasses.popupIndicatorOpen}`]: {
transform: 'rotate(180deg)',
- }),
-}));
+ '--Icon-color': 'currentColor',
+ },
+});
const AutocompleteListbox = styled(StyledAutocompleteListbox, {
name: 'JoyAutocomplete',
@@ -361,7 +356,8 @@ const Autocomplete = React.forwardRef(function Autocomplete(
const formControl = React.useContext(FormControlContext);
const error = inProps.error ?? formControl?.error ?? errorProp;
const size = inProps.size ?? formControl?.size ?? sizeProp;
- const color = getColor(inProps.color, error ? 'danger' : formControl?.color ?? colorProp);
+ const rootColor = inProps.color ?? (error ? 'danger' : formControl?.color ?? colorProp);
+ const color = getColor(inProps.color, rootColor);
const disabled = disabledProp ?? formControl?.disabled ?? false;
const {
@@ -545,8 +541,10 @@ const Autocomplete = React.forwardRef(function Autocomplete(
ownerState,
getSlotOwnerState: (mergedProps) => ({
size: mergedProps.size || size,
- variant: mergedProps.variant || defaultVariantMapping[variant] || 'plain',
- color: mergedProps.color || 'neutral',
+ variant:
+ mergedProps.variant || getChildVariantAndColor(variant, rootColor).variant || 'plain',
+ color: mergedProps.color || getChildVariantAndColor(variant, rootColor).color || 'neutral',
+ disableColorInversion: !!inProps.color,
}),
additionalProps: {
'aria-label': clearText,
@@ -562,8 +560,10 @@ const Autocomplete = React.forwardRef(function Autocomplete(
ownerState,
getSlotOwnerState: (mergedProps) => ({
size: mergedProps.size || size,
- variant: mergedProps.variant || defaultVariantMapping[variant] || 'plain',
- color: mergedProps.color || 'neutral',
+ variant:
+ mergedProps.variant || getChildVariantAndColor(variant, rootColor).variant || 'plain',
+ color: mergedProps.color || getChildVariantAndColor(variant, rootColor).color || 'neutral',
+ disableColorInversion: !!inProps.color,
}),
additionalProps: {
disabled,
@@ -581,8 +581,8 @@ const Autocomplete = React.forwardRef(function Autocomplete(
ownerState,
getSlotOwnerState: (mergedProps) => ({
size: mergedProps.size || size,
- variant: mergedProps.variant || 'outlined',
- color: mergedProps.color || 'neutral',
+ variant: mergedProps.variant || variant,
+ color: mergedProps.color || (!mergedProps.disablePortal ? rootColor : color),
disableColorInversion: !mergedProps.disablePortal,
}),
additionalProps: {
@@ -642,8 +642,9 @@ const Autocomplete = React.forwardRef(function Autocomplete(
externalForwardedProps,
ownerState,
getSlotOwnerState: (mergedProps) => ({
- variant: mergedProps.variant || 'plain',
- color: mergedProps.color || 'neutral',
+ variant:
+ mergedProps.variant || getChildVariantAndColor(variant, rootColor).variant || 'plain',
+ color: mergedProps.color || getChildVariantAndColor(variant, rootColor).color || 'neutral',
disableColorInversion: !listboxProps.disablePortal,
}),
additionalProps: {
@@ -685,41 +686,43 @@ const Autocomplete = React.forwardRef(function Autocomplete(
let popup = null;
if (anchorEl) {
popup = (
-
-
- {groupedOptions.map((option, index) => {
- if (groupBy) {
- const typedOption = option as AutocompleteGroupedOption;
- return renderGroup({
- key: String(typedOption.key),
- group: typedOption.group,
- children: typedOption.options.map((option2, index2) =>
- renderListOption(option2, typedOption.index + index2),
- ),
- });
- }
- return renderListOption(option, index);
- })}
- {loading && groupedOptions.length === 0 ? (
- {loadingText}
- ) : null}
- {groupedOptions.length === 0 && !freeSolo && !loading ? (
- {noOptionsText}
- ) : null}
-
-
+
+
+
+ {groupedOptions.map((option, index) => {
+ if (groupBy) {
+ const typedOption = option as AutocompleteGroupedOption;
+ return renderGroup({
+ key: String(typedOption.key),
+ group: typedOption.group,
+ children: typedOption.options.map((option2, index2) =>
+ renderListOption(option2, typedOption.index + index2),
+ ),
+ });
+ }
+ return renderListOption(option, index);
+ })}
+ {loading && groupedOptions.length === 0 ? (
+ {loadingText}
+ ) : null}
+ {groupedOptions.length === 0 && !freeSolo && !loading ? (
+ {noOptionsText}
+ ) : null}
+
+
+
);
if (!listboxProps.disablePortal) {
@@ -811,7 +814,7 @@ Autocomplete.propTypes /* remove-proptypes */ = {
* The color of the component. It supports those theme colors that make sense for this component.
* @default 'neutral'
*/
- color: PropTypes.oneOf(['danger', 'info', 'neutral', 'primary', 'success', 'warning']),
+ color: PropTypes.oneOf(['danger', 'neutral', 'primary', 'success', 'warning']),
/**
* The default value. Use when the component is not controlled.
* @default props.multiple ? [] : null
diff --git a/packages/mui-joy/src/Autocomplete/autocompleteClasses.ts b/packages/mui-joy/src/Autocomplete/autocompleteClasses.ts
index 35bf90f81b6d1d..7fcf8d969fdf0a 100644
--- a/packages/mui-joy/src/Autocomplete/autocompleteClasses.ts
+++ b/packages/mui-joy/src/Autocomplete/autocompleteClasses.ts
@@ -47,8 +47,6 @@ export interface AutocompleteClasses {
colorNeutral: string;
/** Class name applied to the root element if `color="danger"`. */
colorDanger: string;
- /** Class name applied to the root element if `color="info"`. */
- colorInfo: string;
/** Class name applied to the root element if `color="success"`. */
colorSuccess: string;
/** Class name applied to the root element if `color="warning"`. */
@@ -101,7 +99,6 @@ const autocompleteClasses: AutocompleteClasses = generateUtilityClasses('MuiAuto
'colorPrimary',
'colorNeutral',
'colorDanger',
- 'colorInfo',
'colorSuccess',
'colorWarning',
'colorContext',
diff --git a/packages/mui-joy/src/AutocompleteListbox/AutocompleteListbox.tsx b/packages/mui-joy/src/AutocompleteListbox/AutocompleteListbox.tsx
index cbf3ac020b1d22..d7fbbe9bb78bd7 100644
--- a/packages/mui-joy/src/AutocompleteListbox/AutocompleteListbox.tsx
+++ b/packages/mui-joy/src/AutocompleteListbox/AutocompleteListbox.tsx
@@ -7,6 +7,7 @@ import { unstable_capitalize as capitalize } from '@mui/utils';
import composeClasses from '@mui/base/composeClasses';
import { StyledList } from '../List/List';
import { styled, useThemeProps } from '../styles';
+import { VariantColorProvider } from '../styles/variantColorInheritance';
import { getAutocompleteListboxUtilityClass } from './autocompleteListboxClasses';
import {
AutocompleteListboxOwnerState,
@@ -52,7 +53,6 @@ export const StyledAutocompleteListbox = styled(StyledList)<{
const variantStyle = theme.variants[ownerState.variant!]?.[ownerState.color!];
return {
'--focus-outline-offset': `calc(${theme.vars.focus.thickness} * -1)`, // to prevent the focus outline from being cut by overflow
- '--List-radius': theme.vars.radius.sm,
'--ListItem-stickyBackground':
variantStyle?.backgroundColor ||
variantStyle?.background ||
@@ -60,6 +60,7 @@ export const StyledAutocompleteListbox = styled(StyledList)<{
'--ListItem-stickyTop': 'calc(var(--List-padding, var(--ListDivider-gap)) * -1)',
...scopedVariables,
boxShadow: theme.shadow.md,
+ borderRadius: `var(--List-radius, ${theme.vars.radius.sm})`,
...(!variantStyle?.backgroundColor && {
backgroundColor: theme.vars.palette.background.popup,
}),
@@ -142,7 +143,11 @@ const AutocompleteListbox = React.forwardRef(function AutocompleteListbox(inProp
},
});
- return {children} ;
+ return (
+
+ {children}
+
+ );
}) as OverridableComponent;
AutocompleteListbox.propTypes /* remove-proptypes */ = {
@@ -163,7 +168,7 @@ AutocompleteListbox.propTypes /* remove-proptypes */ = {
* @default 'neutral'
*/
color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([
- PropTypes.oneOf(['danger', 'info', 'neutral', 'primary', 'success', 'warning']),
+ PropTypes.oneOf(['danger', 'neutral', 'primary', 'success', 'warning']),
PropTypes.string,
]),
/**
diff --git a/packages/mui-joy/src/AutocompleteListbox/autocompleteListboxClasses.ts b/packages/mui-joy/src/AutocompleteListbox/autocompleteListboxClasses.ts
index 91a3a84d29a26d..631781a39c7e66 100644
--- a/packages/mui-joy/src/AutocompleteListbox/autocompleteListboxClasses.ts
+++ b/packages/mui-joy/src/AutocompleteListbox/autocompleteListboxClasses.ts
@@ -15,8 +15,6 @@ export interface AutocompleteListboxClasses {
colorNeutral: string;
/** Classname applied to the root element if `color="danger"`. */
colorDanger: string;
- /** Classname applied to the root element if `color="info"`. */
- colorInfo: string;
/** Classname applied to the root element if `color="success"`. */
colorSuccess: string;
/** Classname applied to the root element if `color="warning"`. */
@@ -49,7 +47,6 @@ const autocompleteListboxClasses: AutocompleteListboxClasses = generateUtilityCl
'colorPrimary',
'colorNeutral',
'colorDanger',
- 'colorInfo',
'colorSuccess',
'colorWarning',
'colorContext',
diff --git a/packages/mui-joy/src/AutocompleteOption/AutocompleteOption.tsx b/packages/mui-joy/src/AutocompleteOption/AutocompleteOption.tsx
index 38608b3aeaf3d0..9c2268c32ebab9 100644
--- a/packages/mui-joy/src/AutocompleteOption/AutocompleteOption.tsx
+++ b/packages/mui-joy/src/AutocompleteOption/AutocompleteOption.tsx
@@ -7,9 +7,8 @@ import { unstable_capitalize as capitalize } from '@mui/utils';
import composeClasses from '@mui/base/composeClasses';
import { StyledListItemButton } from '../ListItemButton/ListItemButton';
import { styled, useThemeProps } from '../styles';
-import autocompleteOptionClasses, {
- getAutocompleteOptionUtilityClass,
-} from './autocompleteOptionClasses';
+import { useVariantColor } from '../styles/variantColorInheritance';
+import { getAutocompleteOptionUtilityClass } from './autocompleteOptionClasses';
import { AutocompleteOptionOwnerState, AutocompleteOptionTypeMap } from './AutocompleteOptionProps';
import { useColorInversion } from '../styles/ColorInversion';
import useSlot from '../utils/useSlot';
@@ -33,17 +32,9 @@ export const StyledAutocompleteOption = styled(StyledListItemButton as unknown a
}>(({ theme, ownerState }) => ({
'&[aria-disabled="true"]': theme.variants[`${ownerState.variant!}Disabled`]?.[ownerState.color!],
'&[aria-selected="true"]': {
- color: theme.variants.soft?.[ownerState.color === 'context' ? 'context' : 'primary']?.color,
- backgroundColor:
- theme.variants.soft?.[ownerState.color === 'context' ? 'context' : 'primary']
- ?.backgroundColor,
+ ...theme.variants[`${ownerState.variant!}Active`]?.[ownerState.color!],
fontWeight: theme.vars.fontWeight.md,
},
- [`&.${autocompleteOptionClasses.focused}:not([aria-selected="true"]):not(:hover)`]: {
- // create the focused style similar to the hover state
- backgroundColor:
- theme.variants[`${ownerState.variant!}Hover`]?.[ownerState.color!]?.backgroundColor,
- },
}));
const AutocompleteOptionRoot = styled(StyledAutocompleteOption, {
@@ -71,14 +62,18 @@ const AutocompleteOption = React.forwardRef(function AutocompleteOption(inProps,
children,
component = 'li',
color: colorProp = 'neutral',
- variant = 'plain',
+ variant: variantProp = 'plain',
className,
slots = {},
slotProps = {},
...other
} = props;
+ const { variant = variantProp, color: inheritedColor = colorProp } = useVariantColor(
+ inProps.variant,
+ inProps.color,
+ );
const { getColor } = useColorInversion(variant);
- const color = getColor(inProps.color, colorProp);
+ const color = getColor(inProps.color, inheritedColor);
const ownerState = {
...props,
@@ -123,7 +118,7 @@ AutocompleteOption.propTypes /* remove-proptypes */ = {
* @default 'neutral'
*/
color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([
- PropTypes.oneOf(['danger', 'info', 'neutral', 'primary', 'success', 'warning']),
+ PropTypes.oneOf(['danger', 'neutral', 'primary', 'success', 'warning']),
PropTypes.string,
]),
/**
diff --git a/packages/mui-joy/src/AutocompleteOption/autocompleteOptionClasses.ts b/packages/mui-joy/src/AutocompleteOption/autocompleteOptionClasses.ts
index f2b1bd6cab5a84..9aa2d229c2a573 100644
--- a/packages/mui-joy/src/AutocompleteOption/autocompleteOptionClasses.ts
+++ b/packages/mui-joy/src/AutocompleteOption/autocompleteOptionClasses.ts
@@ -13,8 +13,6 @@ export interface AutocompleteOptionClasses {
colorNeutral: string;
/** Class name applied to the root element if `color="danger"`. */
colorDanger: string;
- /** Class name applied to the root element if `color="info"`. */
- colorInfo: string;
/** Class name applied to the root element if `color="success"`. */
colorSuccess: string;
/** Class name applied to the root element if `color="warning"`. */
@@ -46,7 +44,6 @@ const autocompleteOptionClasses: AutocompleteOptionClasses = generateUtilityClas
'colorPrimary',
'colorNeutral',
'colorDanger',
- 'colorInfo',
'colorSuccess',
'colorWarning',
'colorContext',
diff --git a/packages/mui-joy/src/Avatar/Avatar.spec.tsx b/packages/mui-joy/src/Avatar/Avatar.spec.tsx
index 513b1c181f901e..35b3b93782c454 100644
--- a/packages/mui-joy/src/Avatar/Avatar.spec.tsx
+++ b/packages/mui-joy/src/Avatar/Avatar.spec.tsx
@@ -15,7 +15,6 @@ import { expectType } from '@mui/types';
// `color`
;
;
- ;
;
;
;
diff --git a/packages/mui-joy/src/Avatar/Avatar.test.tsx b/packages/mui-joy/src/Avatar/Avatar.test.tsx
index def9a25ca96a93..29f031769b961a 100644
--- a/packages/mui-joy/src/Avatar/Avatar.test.tsx
+++ b/packages/mui-joy/src/Avatar/Avatar.test.tsx
@@ -60,7 +60,7 @@ describe(' ', () => {
expect(getByTestId('root')).to.have.class(classes.colorNeutral);
});
- (['primary', 'success', 'info', 'danger', 'neutral', 'warning'] as const).forEach((color) => {
+ (['primary', 'success', 'danger', 'neutral', 'warning'] as const).forEach((color) => {
it(`should render ${color}`, () => {
const { getByTestId } = render( );
diff --git a/packages/mui-joy/src/Avatar/Avatar.tsx b/packages/mui-joy/src/Avatar/Avatar.tsx
index 57e08c51439aad..fd2eb21fa1e240 100644
--- a/packages/mui-joy/src/Avatar/Avatar.tsx
+++ b/packages/mui-joy/src/Avatar/Avatar.tsx
@@ -34,41 +34,40 @@ const AvatarRoot = styled('div', {
name: 'JoyAvatar',
slot: 'Root',
overridesResolver: (props, styles) => styles.root,
-})<{ ownerState: AvatarOwnerState }>(({ theme, ownerState }) => {
- return [
- {
- ...(ownerState.size === 'sm' && {
- width: `var(--Avatar-size, 2rem)`,
- height: `var(--Avatar-size, 2rem)`,
- fontSize: `calc(var(--Avatar-size, 2rem) * 0.4375)`, // default as 14px
- }),
- ...(ownerState.size === 'md' && {
- width: `var(--Avatar-size, 2.5rem)`,
- height: `var(--Avatar-size, 2.5rem)`,
- fontSize: `calc(var(--Avatar-size, 2.5rem) * 0.4)`, // default as 16px
- }),
- ...(ownerState.size === 'lg' && {
- width: `var(--Avatar-size, 3rem)`,
- height: `var(--Avatar-size, 3rem)`,
- fontSize: `calc(var(--Avatar-size, 3rem) * 0.375)`, // default as 18px
- }),
- marginInlineStart: 'var(--Avatar-marginInlineStart)',
- boxShadow: `var(--Avatar-ring)`,
- fontFamily: theme.vars.fontFamily.body,
- fontWeight: theme.vars.fontWeight.md,
- position: 'relative',
- display: 'flex',
- alignItems: 'center',
- justifyContent: 'center',
- flexShrink: 0,
- lineHeight: 1,
- overflow: 'hidden',
- borderRadius: 'var(--Avatar-radius, 50%)',
- userSelect: 'none',
- },
- theme.variants[ownerState.variant!]?.[ownerState.color!],
- ];
-});
+})<{ ownerState: AvatarOwnerState }>(({ theme, ownerState }) => ({
+ '--Icon-color':
+ ownerState.color !== 'neutral' || ownerState.variant === 'solid'
+ ? 'currentColor'
+ : theme.vars.palette.text.icon,
+ ...theme.typography[`title-${ownerState.size!}`],
+ ...(ownerState.size === 'sm' && {
+ width: `var(--Avatar-size, 2rem)`,
+ height: `var(--Avatar-size, 2rem)`,
+ fontSize: `calc(var(--Avatar-size, 2rem) * 0.4375)`, // default as 14px
+ }),
+ ...(ownerState.size === 'md' && {
+ width: `var(--Avatar-size, 2.5rem)`,
+ height: `var(--Avatar-size, 2.5rem)`,
+ fontSize: `calc(var(--Avatar-size, 2.5rem) * 0.4)`, // default as 16px
+ }),
+ ...(ownerState.size === 'lg' && {
+ width: `var(--Avatar-size, 3rem)`,
+ height: `var(--Avatar-size, 3rem)`,
+ fontSize: `calc(var(--Avatar-size, 3rem) * 0.375)`, // default as 18px
+ }),
+ marginInlineStart: 'var(--Avatar-marginInlineStart)',
+ boxShadow: `var(--Avatar-ring)`,
+ position: 'relative',
+ display: 'flex',
+ alignItems: 'center',
+ justifyContent: 'center',
+ flexShrink: 0,
+ lineHeight: 1,
+ overflow: 'hidden',
+ borderRadius: 'var(--Avatar-radius, 50%)',
+ userSelect: 'none',
+ ...theme.variants[ownerState.variant!]?.[ownerState.color!],
+}));
const AvatarImg = styled('img', {
name: 'JoyAvatar',
@@ -258,7 +257,7 @@ Avatar.propTypes /* remove-proptypes */ = {
* @default 'neutral'
*/
color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([
- PropTypes.oneOf(['danger', 'info', 'neutral', 'primary', 'success', 'warning']),
+ PropTypes.oneOf(['danger', 'neutral', 'primary', 'success', 'warning']),
PropTypes.string,
]),
/**
diff --git a/packages/mui-joy/src/Avatar/avatarClasses.ts b/packages/mui-joy/src/Avatar/avatarClasses.ts
index 29842d1ac4dc4f..53a348f63cc41f 100644
--- a/packages/mui-joy/src/Avatar/avatarClasses.ts
+++ b/packages/mui-joy/src/Avatar/avatarClasses.ts
@@ -9,8 +9,6 @@ export interface AvatarClasses {
colorNeutral: string;
/** Class name applied to the root element if `color="danger"`. */
colorDanger: string;
- /** Class name applied to the root element if `color="info"`. */
- colorInfo: string;
/** Class name applied to the root element if `color="success"`. */
colorSuccess: string;
/** Class name applied to the root element if `color="warning"`. */
@@ -46,7 +44,6 @@ const avatarClasses: AvatarClasses = generateUtilityClasses('MuiAvatar', [
'colorPrimary',
'colorNeutral',
'colorDanger',
- 'colorInfo',
'colorSuccess',
'colorWarning',
'colorContext',
diff --git a/packages/mui-joy/src/AvatarGroup/AvatarGroup.tsx b/packages/mui-joy/src/AvatarGroup/AvatarGroup.tsx
index 28deb0f6038d23..a412fd30ebf48e 100644
--- a/packages/mui-joy/src/AvatarGroup/AvatarGroup.tsx
+++ b/packages/mui-joy/src/AvatarGroup/AvatarGroup.tsx
@@ -118,7 +118,7 @@ AvatarGroup.propTypes /* remove-proptypes */ = {
* @default 'neutral'
*/
color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([
- PropTypes.oneOf(['danger', 'info', 'neutral', 'primary', 'success', 'warning']),
+ PropTypes.oneOf(['danger', 'neutral', 'primary', 'success', 'warning']),
PropTypes.string,
]),
/**
diff --git a/packages/mui-joy/src/Badge/Badge.spec.tsx b/packages/mui-joy/src/Badge/Badge.spec.tsx
index bed59927bac9dc..d1ffd8a9781220 100644
--- a/packages/mui-joy/src/Badge/Badge.spec.tsx
+++ b/packages/mui-joy/src/Badge/Badge.spec.tsx
@@ -14,7 +14,6 @@ import { expectType } from '@mui/types';
// `color`
;
;
- ;
;
;
;
diff --git a/packages/mui-joy/src/Badge/Badge.test.tsx b/packages/mui-joy/src/Badge/Badge.test.tsx
index 9fc41c650a0f0c..13921cb3f5d864 100644
--- a/packages/mui-joy/src/Badge/Badge.test.tsx
+++ b/packages/mui-joy/src/Badge/Badge.test.tsx
@@ -121,7 +121,7 @@ describe(' ', () => {
expect(findBadge(container)).to.have.class(classes.colorPrimary);
});
- (['primary', 'success', 'info', 'danger', 'neutral', 'warning'] as const).forEach((color) => {
+ (['primary', 'success', 'danger', 'neutral', 'warning'] as const).forEach((color) => {
it(`should render ${color}`, () => {
const { container } = render( );
diff --git a/packages/mui-joy/src/Badge/Badge.tsx b/packages/mui-joy/src/Badge/Badge.tsx
index e05eb3c2d3e18d..3bff899460b790 100644
--- a/packages/mui-joy/src/Badge/Badge.tsx
+++ b/packages/mui-joy/src/Badge/Badge.tsx
@@ -41,7 +41,6 @@ const BadgeRoot = styled('span', {
'--Badge-minHeight': '1rem',
}),
'--Badge-paddingX': '0.25rem',
- fontSize: theme.vars.fontSize.xs,
}),
...(ownerState.size === 'md' && {
'--Badge-minHeight': '0.75rem',
@@ -49,7 +48,6 @@ const BadgeRoot = styled('span', {
'--Badge-minHeight': '1.25rem',
}),
'--Badge-paddingX': '0.375rem',
- fontSize: theme.vars.fontSize.sm,
}),
...(ownerState.size === 'lg' && {
'--Badge-minHeight': '1rem',
@@ -57,7 +55,6 @@ const BadgeRoot = styled('span', {
'--Badge-minHeight': '1.5rem',
}),
'--Badge-paddingX': '0.5rem',
- fontSize: theme.vars.fontSize.md,
}),
'--Badge-ringSize': '2px',
'--Badge-ring': `0 0 0 var(--Badge-ringSize) var(--Badge-ringColor, ${theme.vars.palette.background.surface})`,
@@ -105,7 +102,11 @@ const BadgeBadge = styled('span', {
ownerState.anchorOrigin?.horizontal === 'left' ? 'translateX(-50%)' : 'translateX(50%)';
const transformOriginY = ownerState.anchorOrigin?.vertical === 'top' ? '0%' : '100%';
const transformOriginX = ownerState.anchorOrigin?.horizontal === 'left' ? '0%' : '100%';
+ const typography =
+ theme.typography[`body-${({ sm: 'xs', md: 'sm', lg: 'md' } as const)[ownerState.size!]}`];
return {
+ '--Icon-color': 'currentColor',
+ '--Icon-fontSize': `calc(1em * ${typography.lineHeight ?? '1'})`,
display: 'inline-flex',
flexWrap: 'wrap',
justifyContent: 'center',
@@ -114,11 +115,8 @@ const BadgeBadge = styled('span', {
position: 'absolute',
boxSizing: 'border-box',
boxShadow: 'var(--Badge-ring)',
- fontFamily: theme.vars.fontFamily.body,
- fontWeight: theme.vars.fontWeight.md,
lineHeight: 1,
- padding:
- 'calc(var(--Badge-paddingX) / 2 - var(--variant-borderWidth, 0px)) calc(var(--Badge-paddingX) - var(--variant-borderWidth, 0px))',
+ padding: '0 calc(var(--Badge-paddingX) - var(--variant-borderWidth, 0px))',
minHeight: 'var(--Badge-minHeight)',
minWidth: 'var(--Badge-minHeight)',
borderRadius: 'var(--Badge-radius, var(--Badge-minHeight))',
@@ -131,6 +129,8 @@ const BadgeBadge = styled('span', {
[`&.${badgeClasses.invisible}`]: {
transform: `scale(0) ${translateX} ${translateY}`,
},
+ ...typography,
+ fontWeight: theme.vars.fontWeight.md,
...theme.variants[ownerState.variant!]?.[ownerState.color!],
};
});
@@ -262,7 +262,7 @@ Badge.propTypes /* remove-proptypes */ = {
* @default 'primary'
*/
color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([
- PropTypes.oneOf(['danger', 'info', 'neutral', 'primary', 'success', 'warning']),
+ PropTypes.oneOf(['danger', 'neutral', 'primary', 'success', 'warning']),
PropTypes.string,
]),
/**
diff --git a/packages/mui-joy/src/Badge/badgeClasses.ts b/packages/mui-joy/src/Badge/badgeClasses.ts
index 7eb357e4524186..b1a09c78215ad0 100644
--- a/packages/mui-joy/src/Badge/badgeClasses.ts
+++ b/packages/mui-joy/src/Badge/badgeClasses.ts
@@ -17,8 +17,6 @@ export interface BadgeClasses {
colorPrimary: string;
/** Class name applied to the badge `span` element if `color="danger"`. */
colorDanger: string;
- /** Class name applied to the badge `span` element if `color="info"`. */
- colorInfo: string;
/** Class name applied to the badge `span` element if `color="neutral"`. */
colorNeutral: string;
/** Class name applied to the badge `span` element if `color="success"`. */
@@ -64,7 +62,6 @@ const badgeClasses: BadgeClasses = generateUtilityClasses('MuiBadge', [
'anchorOriginBottomLeft',
'colorPrimary',
'colorDanger',
- 'colorInfo',
'colorNeutral',
'colorSuccess',
'colorWarning',
diff --git a/packages/mui-joy/src/Box/Box.spec.tsx b/packages/mui-joy/src/Box/Box.spec.tsx
index 7b3662b686389d..ca49fa91520c91 100644
--- a/packages/mui-joy/src/Box/Box.spec.tsx
+++ b/packages/mui-joy/src/Box/Box.spec.tsx
@@ -5,7 +5,7 @@ function ThemeValuesCanBeSpread() {
;
({
- ...theme.typography.body1,
+ ...theme.typography['body-md'],
color: theme.palette.primary[500],
})}
/>;
@@ -17,7 +17,7 @@ function ThemeValuesCanBeSpread() {
/>;
theme.variants.outlined,
(theme) => ({
'&:hover': theme.variants.outlinedHover,
diff --git a/packages/mui-joy/src/Breadcrumbs/Breadcrumbs.tsx b/packages/mui-joy/src/Breadcrumbs/Breadcrumbs.tsx
index 0befd96117fd15..e228d46a9bf6ad 100644
--- a/packages/mui-joy/src/Breadcrumbs/Breadcrumbs.tsx
+++ b/packages/mui-joy/src/Breadcrumbs/Breadcrumbs.tsx
@@ -2,7 +2,10 @@
import * as React from 'react';
import PropTypes from 'prop-types';
import { OverridableComponent } from '@mui/types';
-import { unstable_capitalize as capitalize } from '@mui/utils';
+import {
+ unstable_capitalize as capitalize,
+ unstable_isMuiElement as isMuiElement,
+} from '@mui/utils';
import { unstable_composeClasses as composeClasses } from '@mui/base';
import clsx from 'clsx';
import { useThemeProps } from '../styles';
@@ -10,6 +13,7 @@ import useSlot from '../utils/useSlot';
import styled from '../styles/styled';
import { getBreadcrumbsUtilityClass } from './breadcrumbsClasses';
import { BreadcrumbsProps, BreadcrumbsOwnerState, BreadcrumbsTypeMap } from './BreadcrumbsProps';
+import { TypographyInheritContext } from '../Typography/Typography';
const useUtilityClasses = (ownerState: BreadcrumbsOwnerState) => {
const { size } = ownerState;
@@ -31,20 +35,17 @@ const BreadcrumbsRoot = styled('nav', {
})<{ ownerState: BreadcrumbsOwnerState }>(({ theme, ownerState }) => ({
...(ownerState.size === 'sm' && {
'--Breadcrumbs-gap': '0.25rem',
- fontSize: theme.vars.fontSize.sm,
padding: '0.5rem',
}),
...(ownerState.size === 'md' && {
'--Breadcrumbs-gap': '0.375rem',
- fontSize: theme.vars.fontSize.md,
padding: '0.75rem',
}),
...(ownerState.size === 'lg' && {
'--Breadcrumbs-gap': '0.5rem',
- fontSize: theme.vars.fontSize.lg,
padding: '1rem',
}),
- lineHeight: 1,
+ ...theme.typography[`body-${ownerState.size!}`],
}));
const BreadcrumbsOl = styled('ol', {
@@ -63,9 +64,12 @@ const BreadcrumbsOl = styled('ol', {
const BreadcrumbsLi = styled('li', {
name: 'JoyBreadcrumbs',
- slot: 'Ol',
- overridesResolver: (props, styles) => styles.ol,
-})<{ ownerState: BreadcrumbsOwnerState }>({});
+ slot: 'Li',
+ overridesResolver: (props, styles) => styles.li,
+})<{ ownerState: BreadcrumbsOwnerState }>({
+ display: 'flex',
+ alignItems: 'center',
+});
const BreadcrumbsSeparator = styled('li', {
name: 'JoyBreadcrumbs',
@@ -144,34 +148,38 @@ const Breadcrumbs = React.forwardRef(function Breadcrumbs(inProps, ref) {
ownerState,
});
- const allItems = React.Children.toArray(children)
- .filter((child) => {
+ const allItems = (
+ React.Children.toArray(children).filter((child) => {
return React.isValidElement(child);
- })
- .map((child, index) => (
-
- {child}
-
- ));
+ }) as Array
+ ).map((child, index) => (
+
+ {isMuiElement(child, ['Typography'])
+ ? React.cloneElement(child, { component: child.props.component ?? 'span' })
+ : child}
+
+ ));
return (
-
-
- {allItems.reduce((acc: React.ReactNode[], current: React.ReactNode, index: number) => {
- if (index < allItems.length - 1) {
- acc = acc.concat(
- current,
-
- {separator}
- ,
- );
- } else {
- acc.push(current);
- }
- return acc;
- }, [])}
-
-
+
+
+
+ {allItems.reduce((acc: React.ReactNode[], current: React.ReactNode, index: number) => {
+ if (index < allItems.length - 1) {
+ acc = acc.concat(
+ current,
+
+ {separator}
+ ,
+ );
+ } else {
+ acc.push(current);
+ }
+ return acc;
+ }, [])}
+
+
+
);
}) as OverridableComponent;
diff --git a/packages/mui-joy/src/Button/Button.spec.tsx b/packages/mui-joy/src/Button/Button.spec.tsx
index f53fd0d4ed013d..40f5642e216e03 100644
--- a/packages/mui-joy/src/Button/Button.spec.tsx
+++ b/packages/mui-joy/src/Button/Button.spec.tsx
@@ -29,7 +29,6 @@ function handleClick4(event: React.MouseEvent) {}
Button ;
Button ;
Button ;
-Button ;
Button ;
Button ;
// @ts-expect-error no `black` color
diff --git a/packages/mui-joy/src/Button/Button.test.tsx b/packages/mui-joy/src/Button/Button.test.tsx
index 4906a03a210910..a1271e18fc3d6f 100644
--- a/packages/mui-joy/src/Button/Button.test.tsx
+++ b/packages/mui-joy/src/Button/Button.test.tsx
@@ -130,7 +130,7 @@ describe('Joy ', () => {
});
it('is rendered properly when `loading` and children should not be visible', function test() {
- if (!/jsdom/.test(window.navigator.userAgent)) {
+ if (/jsdom/.test(window.navigator.userAgent)) {
this.skip();
}
const { container, getByRole } = render(
diff --git a/packages/mui-joy/src/Button/Button.tsx b/packages/mui-joy/src/Button/Button.tsx
index a2ddd64de8473b..c0d23288834989 100644
--- a/packages/mui-joy/src/Button/Button.tsx
+++ b/packages/mui-joy/src/Button/Button.tsx
@@ -97,9 +97,14 @@ export const getButtonStyles = ({
return [
{
'--Icon-margin': 'initial', // reset the icon's margin.
+ '--Icon-color':
+ ownerState.color !== 'neutral' || ownerState.variant === 'solid'
+ ? 'currentColor'
+ : theme.vars.palette.text.icon,
...(ownerState.size === 'sm' && {
- '--Icon-fontSize': '1.25rem',
+ '--Icon-fontSize': theme.vars.fontSize.lg,
'--CircularProgress-size': '20px', // must be `px` unit, otherwise the CircularProgress is broken in Safari
+ '--CircularProgress-thickness': '2px',
'--Button-gap': '0.375rem',
minHeight: 'var(--Button-minHeight, 2rem)',
fontSize: theme.vars.fontSize.sm,
@@ -107,8 +112,9 @@ export const getButtonStyles = ({
paddingInline: '0.75rem',
}),
...(ownerState.size === 'md' && {
- '--Icon-fontSize': '1.5rem', // control the SvgIcon font-size
+ '--Icon-fontSize': theme.vars.fontSize.xl,
'--CircularProgress-size': '24px', // must be `px` unit, otherwise the CircularProgress is broken in Safari
+ '--CircularProgress-thickness': '3px',
'--Button-gap': '0.5rem',
minHeight: 'var(--Button-minHeight, 2.5rem)', // use min-height instead of height to make the button resilient to its content
fontSize: theme.vars.fontSize.sm,
@@ -116,8 +122,9 @@ export const getButtonStyles = ({
paddingInline: '1rem',
}),
...(ownerState.size === 'lg' && {
- '--Icon-fontSize': '1.75rem',
+ '--Icon-fontSize': theme.vars.fontSize.xl2,
'--CircularProgress-size': '28px', // must be `px` unit, otherwise the CircularProgress is broken in Safari
+ '--CircularProgress-thickness': '4px',
'--Button-gap': '0.75rem',
minHeight: 'var(--Button-minHeight, 3rem)',
fontSize: theme.vars.fontSize.md,
@@ -143,17 +150,16 @@ export const getButtonStyles = ({
}),
[theme.focus.selector]: theme.focus.default,
},
- theme.variants[ownerState.variant!]?.[ownerState.color!],
{
+ ...theme.variants[ownerState.variant!]?.[ownerState.color!],
'&:hover': {
'@media (hover: hover)': theme.variants[`${ownerState.variant!}Hover`]?.[ownerState.color!],
},
- },
- { '&:active': theme.variants[`${ownerState.variant!}Active`]?.[ownerState.color!] },
- {
- [`&.${buttonClasses.disabled}`]:
- theme.variants[`${ownerState.variant!}Disabled`]?.[ownerState.color!],
+ '&:active, &[aria-pressed="true"]':
+ theme.variants[`${ownerState.variant!}Active`]?.[ownerState.color!],
+ '&:disabled': theme.variants[`${ownerState.variant!}Disabled`]?.[ownerState.color!],
...(ownerState.loadingPosition === 'center' && {
+ // this has to come after the variant styles to take effect.
[`&.${buttonClasses.loading}`]: {
color: 'transparent',
},
@@ -335,7 +341,7 @@ Button.propTypes /* remove-proptypes */ = {
* @default 'primary'
*/
color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([
- PropTypes.oneOf(['danger', 'info', 'neutral', 'primary', 'success', 'warning']),
+ PropTypes.oneOf(['danger', 'neutral', 'primary', 'success', 'warning']),
PropTypes.string,
]),
/**
diff --git a/packages/mui-joy/src/Button/buttonClasses.ts b/packages/mui-joy/src/Button/buttonClasses.ts
index 60b9320103274b..1d6617a04c5740 100644
--- a/packages/mui-joy/src/Button/buttonClasses.ts
+++ b/packages/mui-joy/src/Button/buttonClasses.ts
@@ -9,8 +9,6 @@ export interface ButtonClasses {
colorNeutral: string;
/** Class name applied to the root element if `color="danger"`. */
colorDanger: string;
- /** Class name applied to the root element if `color="info"`. */
- colorInfo: string;
/** Class name applied to the root element if `color="success"`. */
colorSuccess: string;
/** Class name applied to the root element if `color="warning"`. */
@@ -58,7 +56,6 @@ const buttonClasses: ButtonClasses = generateUtilityClasses('MuiButton', [
'colorPrimary',
'colorNeutral',
'colorDanger',
- 'colorInfo',
'colorSuccess',
'colorWarning',
'colorContext',
diff --git a/packages/mui-joy/src/ButtonGroup/ButtonGroup.spec.tsx b/packages/mui-joy/src/ButtonGroup/ButtonGroup.spec.tsx
index af380f9e5f9f57..bc67ca0c885b66 100644
--- a/packages/mui-joy/src/ButtonGroup/ButtonGroup.spec.tsx
+++ b/packages/mui-joy/src/ButtonGroup/ButtonGroup.spec.tsx
@@ -14,7 +14,6 @@ import * as React from 'react';
// `color`
;
;
- ;
;
;
;
diff --git a/packages/mui-joy/src/ButtonGroup/ButtonGroup.test.tsx b/packages/mui-joy/src/ButtonGroup/ButtonGroup.test.tsx
index fb56a05913f022..1cfa975628c33e 100644
--- a/packages/mui-joy/src/ButtonGroup/ButtonGroup.test.tsx
+++ b/packages/mui-joy/src/ButtonGroup/ButtonGroup.test.tsx
@@ -95,7 +95,7 @@ describe(' ', () => {
expect(getByTestId('root')).to.have.class(classes.colorNeutral);
});
- (['primary', 'success', 'info', 'danger', 'neutral', 'warning'] as const).forEach((color) => {
+ (['primary', 'success', 'danger', 'neutral', 'warning'] as const).forEach((color) => {
it(`should render ${color}`, () => {
const { getByTestId, container } = render(
diff --git a/packages/mui-joy/src/ButtonGroup/ButtonGroup.tsx b/packages/mui-joy/src/ButtonGroup/ButtonGroup.tsx
index 0ced4dae01cdc1..86667b01832b3c 100644
--- a/packages/mui-joy/src/ButtonGroup/ButtonGroup.tsx
+++ b/packages/mui-joy/src/ButtonGroup/ButtonGroup.tsx
@@ -37,7 +37,7 @@ const useUtilityClasses = (ownerState: ButtonGroupOwnerState) => {
export const StyledButtonGroup = styled('div')<{ ownerState: ButtonGroupOwnerState }>(
({ theme, ownerState }) => {
- const radius = resolveSxValue({ theme, ownerState }, 'borderRadius');
+ const { borderRadius: radius } = resolveSxValue({ theme, ownerState }, ['borderRadius']);
const firstChildRadius =
ownerState.orientation === 'vertical'
? 'var(--ButtonGroup-radius) var(--ButtonGroup-radius) var(--unstable_childRadius) var(--unstable_childRadius)'
@@ -71,24 +71,15 @@ export const StyledButtonGroup = styled('div')<{ ownerState: ButtonGroupOwnerSta
ownerState.variant === 'outlined' ? '1px' : 'calc(var(--ButtonGroup-connected) * 1px)',
...(ownerState.color !== 'context' && {
'--ButtonGroup-separatorColor': theme.vars.palette[ownerState.color!]?.outlinedBorder,
- ...(ownerState.variant === 'solid' && {
- '--ButtonGroup-separatorColor': theme.vars.palette[ownerState.color!]?.[400],
- }),
}),
'--ButtonGroup-radius': theme.vars.radius.sm,
'--Divider-inset': '0.5rem',
- '--variant-borderWidth': '0px', // prevent inheritance from above to children
'--unstable_childRadius':
'calc((1 - var(--ButtonGroup-connected)) * var(--ButtonGroup-radius) - var(--variant-borderWidth, 0px))', // for internal usage
...styles,
display: 'flex',
borderRadius: 'var(--ButtonGroup-radius)',
flexDirection: ownerState.orientation === 'vertical' ? 'column' : 'row',
- // single Button or IconButton
- [`& > :only-child`]: {
- '--Button-radius': 'var(--ButtonGroup-radius)',
- '--IconButton-radius': 'var(--ButtonGroup-radius)',
- },
// first Button or IconButton
[`& > [data-first-child]`]: {
'--Button-radius': firstChildRadius,
@@ -127,6 +118,11 @@ export const StyledButtonGroup = styled('div')<{ ownerState: ButtonGroupOwnerSta
borderTop: 'var(--ButtonGroup-separatorSize) solid var(--ButtonGroup-separatorColor)',
}),
},
+ // single Button or IconButton
+ [`& > :only-child`]: {
+ '--Button-radius': 'var(--ButtonGroup-radius)',
+ '--IconButton-radius': 'var(--ButtonGroup-radius)',
+ },
[`& > :not([data-first-child]):not(:only-child)`]: {
'--Button-margin': margin,
'--IconButton-margin': margin,
@@ -161,15 +157,6 @@ export const StyledButtonGroup = styled('div')<{ ownerState: ButtonGroupOwnerSta
},
}),
},
- {
- [theme.getColorSchemeSelector('dark')]: {
- ...(ownerState.color !== 'context' && {
- ...(ownerState.variant !== 'outlined' && {
- '--ButtonGroup-separatorColor': theme.vars.palette[ownerState.color!]?.[700],
- }),
- }),
- },
- },
radius !== undefined && {
'--ButtonGroup-radius': radius,
},
@@ -301,7 +288,7 @@ ButtonGroup.propTypes /* remove-proptypes */ = {
* @default 'neutral'
*/
color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([
- PropTypes.oneOf(['danger', 'info', 'neutral', 'primary', 'success', 'warning']),
+ PropTypes.oneOf(['danger', 'neutral', 'primary', 'success', 'warning']),
PropTypes.string,
]),
/**
diff --git a/packages/mui-joy/src/ButtonGroup/buttonGroupClasses.ts b/packages/mui-joy/src/ButtonGroup/buttonGroupClasses.ts
index 6581d18972e55d..e2b90d22a9ccab 100644
--- a/packages/mui-joy/src/ButtonGroup/buttonGroupClasses.ts
+++ b/packages/mui-joy/src/ButtonGroup/buttonGroupClasses.ts
@@ -9,8 +9,6 @@ export interface ButtonGroupClasses {
colorNeutral: string;
/** Class name applied to the root element if `color="danger"`. */
colorDanger: string;
- /** Class name applied to the root element if `color="info"`. */
- colorInfo: string;
/** Class name applied to the root element if `color="success"`. */
colorSuccess: string;
/** Class name applied to the root element if `color="warning"`. */
@@ -48,7 +46,6 @@ const buttonGroupClasses: ButtonGroupClasses = generateUtilityClasses('MuiButton
'colorPrimary',
'colorNeutral',
'colorDanger',
- 'colorInfo',
'colorSuccess',
'colorWarning',
'colorContext',
diff --git a/packages/mui-joy/src/Card/Card.test.tsx b/packages/mui-joy/src/Card/Card.test.tsx
index 756e343b29ac6f..0c48034d3eefb8 100644
--- a/packages/mui-joy/src/Card/Card.test.tsx
+++ b/packages/mui-joy/src/Card/Card.test.tsx
@@ -57,7 +57,7 @@ describe(' ', () => {
expect(getByTestId('root')).to.have.class(classes.colorNeutral);
});
- (['primary', 'success', 'info', 'danger', 'neutral', 'warning'] as const).forEach((color) => {
+ (['primary', 'success', 'danger', 'neutral', 'warning'] as const).forEach((color) => {
it(`should render ${color}`, () => {
const { getByTestId } = render(
diff --git a/packages/mui-joy/src/Card/Card.tsx b/packages/mui-joy/src/Card/Card.tsx
index b9112f5072963b..865de004a9a93b 100644
--- a/packages/mui-joy/src/Card/Card.tsx
+++ b/packages/mui-joy/src/Card/Card.tsx
@@ -36,58 +36,67 @@ const CardRoot = styled('div', {
name: 'JoyCard',
slot: 'Root',
overridesResolver: (props, styles) => styles.root,
-})<{ ownerState: CardOwnerState }>(({ theme, ownerState }) => [
- {
- // a context variable for any child component
- '--Card-childRadius':
- 'max((var(--Card-radius) - var(--variant-borderWidth, 0px)) - var(--Card-padding), min(var(--Card-padding) / 2, (var(--Card-radius) - var(--variant-borderWidth, 0px)) / 2))',
- // AspectRatio integration
- '--AspectRatio-radius': 'var(--Card-childRadius)',
- // Link integration
- '--unstable_actionMargin': 'calc(-1 * var(--variant-borderWidth, 0px))',
- // Link, Radio, Checkbox integration
- '--unstable_actionRadius': resolveSxValue(
- { theme, ownerState },
- 'borderRadius',
- 'var(--Card-radius)',
- ),
- // CardCover integration
- '--CardCover-radius': 'calc(var(--Card-radius) - var(--variant-borderWidth, 0px))',
- // CardOverflow integration
- '--CardOverflow-offset': `calc(-1 * var(--Card-padding))`,
- '--CardOverflow-radius': 'calc(var(--Card-radius) - var(--variant-borderWidth, 0px))',
- // Divider integration
- '--Divider-inset': 'calc(-1 * var(--Card-padding))',
- ...(ownerState.size === 'sm' && {
- '--Card-radius': theme.vars.radius.sm,
- '--Card-padding': '0.5rem',
- gap: '0.375rem 0.5rem',
- }),
- ...(ownerState.size === 'md' && {
- '--Card-radius': theme.vars.radius.md,
- '--Card-padding': '1rem',
- gap: '0.75rem 1rem',
- }),
- ...(ownerState.size === 'lg' && {
- '--Card-radius': theme.vars.radius.lg,
- '--Card-padding': '1.5rem',
- gap: '1rem 1.5rem',
- }),
- padding: 'var(--Card-padding)',
- borderRadius: 'var(--Card-radius)',
- boxShadow: theme.shadow.sm,
- backgroundColor: theme.vars.palette.background.surface,
- fontFamily: theme.vars.fontFamily.body,
- fontSize: theme.vars.fontSize.md,
- position: 'relative',
- display: 'flex',
- flexDirection: ownerState.orientation === 'horizontal' ? 'row' : 'column',
- },
- theme.variants[ownerState.variant!]?.[ownerState.color!],
- ownerState.color !== 'context' &&
- ownerState.invertedColors &&
- theme.colorInversion[ownerState.variant!]?.[ownerState.color!],
-]);
+})<{ ownerState: CardOwnerState }>(({ theme, ownerState }) => {
+ const { p, padding, borderRadius } = resolveSxValue({ theme, ownerState }, [
+ 'p',
+ 'padding',
+ 'borderRadius',
+ ]);
+ return [
+ {
+ '--Icon-color':
+ ownerState.color !== 'neutral' || ownerState.variant === 'solid'
+ ? 'currentColor'
+ : theme.vars.palette.text.icon,
+ // a context variable for any child component
+ '--Card-childRadius':
+ 'max((var(--Card-radius) - var(--variant-borderWidth, 0px)) - var(--Card-padding), min(var(--Card-padding) / 2, (var(--Card-radius) - var(--variant-borderWidth, 0px)) / 2))',
+ // AspectRatio integration
+ '--AspectRatio-radius': 'var(--Card-childRadius)',
+ // Link integration
+ '--unstable_actionMargin': 'calc(-1 * var(--variant-borderWidth, 0px))',
+ // Link, Radio, Checkbox integration
+ '--unstable_actionRadius': 'var(--Card-radius)',
+ // CardCover integration
+ '--CardCover-radius': 'calc(var(--Card-radius) - var(--variant-borderWidth, 0px))',
+ // CardOverflow integration
+ '--CardOverflow-offset': `calc(-1 * var(--Card-padding))`,
+ '--CardOverflow-radius': 'calc(var(--Card-radius) - var(--variant-borderWidth, 0px))',
+ // Divider integration
+ '--Divider-inset': 'calc(-1 * var(--Card-padding))',
+ ...(ownerState.size === 'sm' && {
+ '--Card-radius': theme.vars.radius.sm,
+ '--Card-padding': '0.5rem',
+ gap: '0.375rem 0.5rem',
+ }),
+ ...(ownerState.size === 'md' && {
+ '--Card-radius': theme.vars.radius.md,
+ '--Card-padding': '1rem',
+ gap: '0.75rem 1rem',
+ }),
+ ...(ownerState.size === 'lg' && {
+ '--Card-radius': theme.vars.radius.lg,
+ '--Card-padding': '1.5rem',
+ gap: '1rem 1.5rem',
+ }),
+ padding: 'var(--Card-padding)',
+ borderRadius: 'var(--Card-radius)',
+ boxShadow: theme.shadow.sm,
+ backgroundColor: theme.vars.palette.background.surface,
+ position: 'relative',
+ display: 'flex',
+ flexDirection: ownerState.orientation === 'horizontal' ? 'row' : 'column',
+ ...theme.typography[`body-${ownerState.size!}`],
+ ...theme.variants[ownerState.variant!]?.[ownerState.color!],
+ },
+ ownerState.color !== 'context' &&
+ ownerState.invertedColors &&
+ theme.colorInversion[ownerState.variant!]?.[ownerState.color!],
+ p !== undefined && { '--Card-padding': p },
+ padding !== undefined && { '--Card-padding': padding },
+ borderRadius !== undefined && { '--Card-radius': borderRadius },
+ ];
+});
/**
*
@@ -199,7 +208,7 @@ Card.propTypes /* remove-proptypes */ = {
* @default 'neutral'
*/
color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([
- PropTypes.oneOf(['danger', 'info', 'neutral', 'primary', 'success', 'warning']),
+ PropTypes.oneOf(['danger', 'neutral', 'primary', 'success', 'warning']),
PropTypes.string,
]),
/**
diff --git a/packages/mui-joy/src/Card/cardClasses.ts b/packages/mui-joy/src/Card/cardClasses.ts
index 50342e91179a66..2b3c45f43ce70f 100644
--- a/packages/mui-joy/src/Card/cardClasses.ts
+++ b/packages/mui-joy/src/Card/cardClasses.ts
@@ -9,8 +9,6 @@ export interface CardClasses {
colorNeutral: string;
/** Class name applied to the root element if `color="danger"`. */
colorDanger: string;
- /** Class name applied to the root element if `color="info"`. */
- colorInfo: string;
/** Class name applied to the root element if `color="success"`. */
colorSuccess: string;
/** Class name applied to the root element if `color="warning"`. */
@@ -48,7 +46,6 @@ const cardClasses: CardClasses = generateUtilityClasses('MuiCard', [
'colorPrimary',
'colorNeutral',
'colorDanger',
- 'colorInfo',
'colorSuccess',
'colorWarning',
'colorContext',
diff --git a/packages/mui-joy/src/CardActions/CardActions.tsx b/packages/mui-joy/src/CardActions/CardActions.tsx
index 2644980f1c89e7..4c64f1ee966b53 100644
--- a/packages/mui-joy/src/CardActions/CardActions.tsx
+++ b/packages/mui-joy/src/CardActions/CardActions.tsx
@@ -48,17 +48,20 @@ const CardActionsRoot = styled('div', {
[`.${dividerClasses.root} + &`]: {
'--unstable_padding': '0',
},
- ...(ownerState.buttonFlex && {
- [`& > :not(.${iconButtonClasses.root})`]: {
- flex: ownerState.buttonFlex,
- },
- [`& > :not(button) > .${buttonClasses.root}`]: {
- width: '100%', // for button to fill its wrapper.
- },
- }),
- [`& > .${buttonClasses.root}:only-child`]: {
- flex: 'auto',
- },
+ ...(ownerState.buttonFlex
+ ? {
+ [`& > :not(.${iconButtonClasses.root})`]: {
+ flex: ownerState.buttonFlex,
+ },
+ [`& > :not(button) > .${buttonClasses.root}`]: {
+ width: '100%', // for button to fill its wrapper.
+ },
+ }
+ : {
+ [`& > .${buttonClasses.root}:only-child`]: {
+ flex: 'auto',
+ },
+ }),
};
});
/**
diff --git a/packages/mui-joy/src/CardContent/CardContent.tsx b/packages/mui-joy/src/CardContent/CardContent.tsx
index 1f17d614da353e..251ce36b32c143 100644
--- a/packages/mui-joy/src/CardContent/CardContent.tsx
+++ b/packages/mui-joy/src/CardContent/CardContent.tsx
@@ -28,7 +28,7 @@ const CardContentRoot = styled('div', {
flexDirection: ownerState.orientation === 'horizontal' ? 'row' : 'column',
flex: 1, // fill the available space in the Card and also shrink if needed
zIndex: 1,
- columnGap: 'calc(0.75 * var(--Card-padding))',
+ columnGap: 'var(--Card-padding)',
padding: 'var(--unstable_padding)',
[`.${cardOverflowClasses.root} > &`]: {
'--unstable_padding': 'calc(var(--Card-padding) * 0.75) 0px',
diff --git a/packages/mui-joy/src/CardOverflow/CardOverflow.test.tsx b/packages/mui-joy/src/CardOverflow/CardOverflow.test.tsx
index 2f503595abba4e..0a677d2469d4da 100644
--- a/packages/mui-joy/src/CardOverflow/CardOverflow.test.tsx
+++ b/packages/mui-joy/src/CardOverflow/CardOverflow.test.tsx
@@ -60,7 +60,7 @@ describe(' ', () => {
expect(getByTestId('root')).to.have.class(classes.colorNeutral);
});
- (['primary', 'success', 'info', 'danger', 'neutral', 'warning'] as const).forEach((color) => {
+ (['primary', 'success', 'danger', 'neutral', 'warning'] as const).forEach((color) => {
it(`should render ${color}`, () => {
const { getByTestId } = render(
diff --git a/packages/mui-joy/src/CardOverflow/CardOverflow.tsx b/packages/mui-joy/src/CardOverflow/CardOverflow.tsx
index 1938e8b3bdf03d..dd994e27c57118 100644
--- a/packages/mui-joy/src/CardOverflow/CardOverflow.tsx
+++ b/packages/mui-joy/src/CardOverflow/CardOverflow.tsx
@@ -175,7 +175,7 @@ CardOverflow.propTypes /* remove-proptypes */ = {
* @default 'neutral'
*/
color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([
- PropTypes.oneOf(['danger', 'info', 'neutral', 'primary', 'success', 'warning']),
+ PropTypes.oneOf(['danger', 'neutral', 'primary', 'success', 'warning']),
PropTypes.string,
]),
/**
diff --git a/packages/mui-joy/src/CardOverflow/cardOverflowClasses.ts b/packages/mui-joy/src/CardOverflow/cardOverflowClasses.ts
index 93fea0d8e8bfff..ab3b9191e5c0ed 100644
--- a/packages/mui-joy/src/CardOverflow/cardOverflowClasses.ts
+++ b/packages/mui-joy/src/CardOverflow/cardOverflowClasses.ts
@@ -9,8 +9,6 @@ export interface CardOverflowClasses {
colorNeutral: string;
/** Class name applied to the root element if `color="danger"`. */
colorDanger: string;
- /** Class name applied to the root element if `color="info"`. */
- colorInfo: string;
/** Class name applied to the root element if `color="success"`. */
colorSuccess: string;
/** Class name applied to the root element if `color="warning"`. */
@@ -38,7 +36,6 @@ const aspectRatioClasses: CardOverflowClasses = generateUtilityClasses('MuiCardO
'colorPrimary',
'colorNeutral',
'colorDanger',
- 'colorInfo',
'colorSuccess',
'colorWarning',
'colorContext',
diff --git a/packages/mui-joy/src/Checkbox/Checkbox.spec.tsx b/packages/mui-joy/src/Checkbox/Checkbox.spec.tsx
index 5189c6e812341f..6978a6a70dc1ef 100644
--- a/packages/mui-joy/src/Checkbox/Checkbox.spec.tsx
+++ b/packages/mui-joy/src/Checkbox/Checkbox.spec.tsx
@@ -22,7 +22,6 @@ import { expectType } from '@mui/types';
;
;
- ;
;
;
;
diff --git a/packages/mui-joy/src/Checkbox/Checkbox.tsx b/packages/mui-joy/src/Checkbox/Checkbox.tsx
index eb8078dc8452df..8d61c43b2c21f9 100644
--- a/packages/mui-joy/src/Checkbox/Checkbox.tsx
+++ b/packages/mui-joy/src/Checkbox/Checkbox.tsx
@@ -16,7 +16,8 @@ import { TypographyNestedContext } from '../Typography/Typography';
import FormControlContext from '../FormControl/FormControlContext';
const useUtilityClasses = (ownerState: CheckboxOwnerState) => {
- const { checked, disabled, disableIcon, focusVisible, color, variant, size } = ownerState;
+ const { checked, disabled, disableIcon, focusVisible, color, variant, size, indeterminate } =
+ ownerState;
const slots = {
root: [
@@ -28,7 +29,12 @@ const useUtilityClasses = (ownerState: CheckboxOwnerState) => {
color && `color${capitalize(color)}`,
size && `size${capitalize(size)}`,
],
- checkbox: ['checkbox', checked && 'checked', disabled && 'disabled'], // disabled class is necessary for displaying global variant
+ checkbox: [
+ 'checkbox',
+ checked && 'checked',
+ indeterminate && 'indeterminate',
+ disabled && 'disabled', // disabled class is necessary for displaying global variant
+ ],
action: [
'action',
checked && 'checked',
@@ -50,20 +56,20 @@ const CheckboxRoot = styled('span', {
'--Icon-fontSize': 'var(--Checkbox-size)',
...(ownerState.size === 'sm' && {
'--Checkbox-size': '1rem',
- '--Checkbox-gap': '0.375rem',
- '& ~ *': { '--FormHelperText-margin': '0.375rem 0 0 1.375rem' },
+ '--Checkbox-gap': '0.5rem',
+ '& ~ *': { '--FormHelperText-margin': '0 0 0 1.5rem' },
fontSize: theme.vars.fontSize.sm,
}),
...(ownerState.size === 'md' && {
'--Checkbox-size': '1.25rem',
- '--Checkbox-gap': '0.5rem',
- '& ~ *': { '--FormHelperText-margin': '0.375rem 0 0 1.75rem' },
+ '--Checkbox-gap': '0.625rem',
+ '& ~ *': { '--FormHelperText-margin': '0.25rem 0 0 1.875rem' },
fontSize: theme.vars.fontSize.md,
}),
...(ownerState.size === 'lg' && {
'--Checkbox-size': '1.5rem',
- '--Checkbox-gap': '0.625rem',
- '& ~ *': { '--FormHelperText-margin': '0.375rem 0 0 2.125rem' },
+ '--Checkbox-gap': '0.75rem',
+ '& ~ *': { '--FormHelperText-margin': '0.375rem 0 0 2.25rem' },
fontSize: theme.vars.fontSize.lg,
}),
position: ownerState.overlay ? 'initial' : 'relative',
@@ -90,8 +96,12 @@ const CheckboxCheckbox = styled('span', {
const variantStyle = theme.variants[`${ownerState.variant!}`]?.[ownerState.color!];
return [
{
+ '--Icon-color':
+ ownerState.color !== 'neutral' || ownerState.variant === 'solid'
+ ? 'currentColor'
+ : theme.vars.palette.text.icon,
boxSizing: 'border-box',
- borderRadius: theme.vars.radius.xs,
+ borderRadius: `min(${theme.vars.radius.sm}, 0.25rem)`,
width: 'var(--Checkbox-size)',
height: 'var(--Checkbox-size)',
display: 'inline-flex',
@@ -101,6 +111,9 @@ const CheckboxCheckbox = styled('span', {
...(ownerState.disableIcon && {
display: 'contents',
}),
+ [`&.${checkboxClasses.checked}, &.${checkboxClasses.indeterminate}`]: {
+ '--Icon-color': 'currentColor',
+ },
},
...(!ownerState.disableIcon
? [
@@ -391,7 +404,7 @@ Checkbox.propTypes /* remove-proptypes */ = {
* @default 'neutral'
*/
color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([
- PropTypes.oneOf(['danger', 'info', 'neutral', 'primary', 'success', 'warning']),
+ PropTypes.oneOf(['danger', 'neutral', 'primary', 'success', 'warning']),
PropTypes.string,
]),
/**
diff --git a/packages/mui-joy/src/Checkbox/checkboxClasses.ts b/packages/mui-joy/src/Checkbox/checkboxClasses.ts
index 5e4e3eacb8ab90..ea46ea2d273544 100644
--- a/packages/mui-joy/src/Checkbox/checkboxClasses.ts
+++ b/packages/mui-joy/src/Checkbox/checkboxClasses.ts
@@ -23,8 +23,6 @@ export interface CheckboxClasses {
colorPrimary: string;
/** Class name applied to the root element if `color="danger"`. */
colorDanger: string;
- /** Class name applied to the root element if `color="info"`. */
- colorInfo: string;
/** Class name applied to the root element if `color="neutral"`. */
colorNeutral: string;
/** Class name applied to the root element if `color="success"`. */
@@ -65,7 +63,6 @@ const checkboxClasses: CheckboxClasses = generateUtilityClasses('MuiCheckbox', [
'indeterminate',
'colorPrimary',
'colorDanger',
- 'colorInfo',
'colorNeutral',
'colorSuccess',
'colorWarning',
diff --git a/packages/mui-joy/src/Chip/Chip.spec.tsx b/packages/mui-joy/src/Chip/Chip.spec.tsx
index ddb8e0f4e7f571..b07e80d9bff38c 100644
--- a/packages/mui-joy/src/Chip/Chip.spec.tsx
+++ b/packages/mui-joy/src/Chip/Chip.spec.tsx
@@ -15,7 +15,6 @@ import { expectType } from '@mui/types';
// `color`
;
;
- ;
;
;
;
diff --git a/packages/mui-joy/src/Chip/Chip.test.tsx b/packages/mui-joy/src/Chip/Chip.test.tsx
index 6fabb3df2c0f05..b2ca5016e1a84b 100644
--- a/packages/mui-joy/src/Chip/Chip.test.tsx
+++ b/packages/mui-joy/src/Chip/Chip.test.tsx
@@ -27,7 +27,7 @@ describe(' ', () => {
refInstanceof: window.HTMLDivElement,
testDeepOverrides: { slotName: 'label', slotClassName: classes.label },
testComponentPropWith: 'span',
- testVariantProps: { variant: 'soft' },
+ testVariantProps: { variant: 'solid' },
testCustomVariant: true,
slots: {
root: { expectedClassName: classes.root },
@@ -69,10 +69,10 @@ describe(' ', () => {
it('contained by default', () => {
const { getByTestId } = render( );
- expect(getByTestId('root')).to.have.class(classes.variantSolid);
+ expect(getByTestId('root')).to.have.class(classes.variantSoft);
});
- (['outlined', 'soft', 'solid'] as const).forEach((variant) => {
+ (['outlined', 'plain', 'solid'] as const).forEach((variant) => {
it(`should render ${variant}`, () => {
const { getByTestId } = render( );
@@ -87,10 +87,10 @@ describe(' ', () => {
it('adds a primary class by default', () => {
const { getByTestId } = render( );
- expect(getByTestId('root')).to.have.class(classes.colorPrimary);
+ expect(getByTestId('root')).to.have.class(classes.colorNeutral);
});
- (['primary', 'success', 'info', 'danger', 'neutral', 'warning'] as const).forEach((color) => {
+ (['primary', 'success', 'danger', 'neutral', 'warning'] as const).forEach((color) => {
it(`should render ${color}`, () => {
const { getByTestId } = render( );
diff --git a/packages/mui-joy/src/Chip/Chip.tsx b/packages/mui-joy/src/Chip/Chip.tsx
index 7dc7f8928ee938..fecf729c110c5c 100644
--- a/packages/mui-joy/src/Chip/Chip.tsx
+++ b/packages/mui-joy/src/Chip/Chip.tsx
@@ -8,7 +8,9 @@ import { OverridableComponent } from '@mui/types';
import { unstable_capitalize as capitalize, unstable_useId as useId } from '@mui/utils';
import { useThemeProps } from '../styles';
import styled from '../styles/styled';
+import { VariantColorProvider } from '../styles/variantColorInheritance';
import { useColorInversion } from '../styles/ColorInversion';
+import { resolveSxValue } from '../styles/styleUtils';
import chipClasses, { getChipUtilityClass } from './chipClasses';
import { ChipProps, ChipOwnerState, ChipTypeMap } from './ChipProps';
import ChipContext from './ChipContext';
@@ -40,6 +42,8 @@ const ChipRoot = styled('div', {
slot: 'Root',
overridesResolver: (props, styles) => styles.root,
})<{ ownerState: ChipOwnerState }>(({ theme, ownerState }) => {
+ const variantStyle = theme.variants[ownerState.variant!]?.[ownerState.color!];
+ const { borderRadius } = resolveSxValue({ theme, ownerState }, ['borderRadius']);
return [
{
// for controlling chip delete margin offset
@@ -52,31 +56,29 @@ const ChipRoot = styled('div', {
'--Avatar-radius': 'var(--Chip-decoratorChildRadius)',
'--Avatar-size': 'var(--Chip-decoratorChildHeight)',
'--Icon-margin': 'initial', // reset the icon's margin.
+ '--Icon-color': 'currentColor',
'--unstable_actionRadius': 'var(--_Chip-radius)', // to be used with Radio or Checkbox
...(ownerState.size === 'sm' && {
- '--Chip-gap': '0.25rem',
'--Chip-paddingInline': '0.5rem',
'--Chip-decoratorChildHeight':
'calc(min(1.125rem, var(--_Chip-minHeight)) - 2 * var(--variant-borderWidth, 0px))',
- '--Icon-fontSize': 'calc(var(--_Chip-minHeight) / 1.714)', // 0.875rem by default
+ '--Icon-fontSize': theme.vars.fontSize.sm,
'--_Chip-minHeight': 'var(--Chip-minHeight, 1.5rem)',
- fontSize: theme.vars.fontSize.xs,
+ gap: '0.25rem',
}),
...(ownerState.size === 'md' && {
- '--Chip-gap': '0.375rem',
'--Chip-paddingInline': '0.75rem',
'--Chip-decoratorChildHeight': 'min(1.375rem, var(--_Chip-minHeight))',
- '--Icon-fontSize': 'calc(var(--_Chip-minHeight) / 1.778)', // 1.125rem by default
+ '--Icon-fontSize': theme.vars.fontSize.lg,
'--_Chip-minHeight': 'var(--Chip-minHeight, 2rem)',
- fontSize: theme.vars.fontSize.sm,
+ gap: '0.375rem',
}),
...(ownerState.size === 'lg' && {
- '--Chip-gap': '0.5rem',
'--Chip-paddingInline': '1rem',
'--Chip-decoratorChildHeight': 'min(1.75rem, var(--_Chip-minHeight))',
- '--Icon-fontSize': 'calc(var(--_Chip-minHeight) / 2)', // 1.25rem by default
+ '--Icon-fontSize': theme.vars.fontSize.xl,
'--_Chip-minHeight': 'var(--Chip-minHeight, 2.5rem)',
- fontSize: theme.vars.fontSize.md,
+ gap: '0.5rem',
}),
'--_Chip-radius': 'var(--Chip-radius, 1.5rem)',
'--_Chip-paddingBlock':
@@ -86,8 +88,6 @@ const ChipRoot = styled('div', {
paddingInline: 'var(--Chip-paddingInline)',
borderRadius: 'var(--_Chip-radius)',
position: 'relative',
- fontWeight: theme.vars.fontWeight.md,
- fontFamily: theme.vars.fontFamily.body,
display: 'inline-flex',
alignItems: 'center',
justifyContent: 'center',
@@ -95,14 +95,17 @@ const ChipRoot = styled('div', {
textDecoration: 'none',
verticalAlign: 'middle',
boxSizing: 'border-box',
+ ...theme.typography[`body-${({ sm: 'xs', md: 'sm', lg: 'md' } as const)[ownerState.size!]}`],
+ fontWeight: theme.vars.fontWeight.md,
[`&.${chipClasses.disabled}`]: {
color: theme.variants[`${ownerState.variant!}Disabled`]?.[ownerState.color!]?.color,
},
},
...(!ownerState.clickable
? [
- theme.variants[ownerState.variant!]?.[ownerState.color!],
{
+ backgroundColor: theme.vars.palette.background.surface,
+ ...variantStyle,
[`&.${chipClasses.disabled}`]:
theme.variants[`${ownerState.variant!}Disabled`]?.[ownerState.color!],
},
@@ -110,9 +113,10 @@ const ChipRoot = styled('div', {
: [
{
'--variant-borderWidth': '0px',
- color: theme.variants[ownerState.variant!]?.[ownerState.color!]?.color,
+ color: variantStyle?.color,
},
]),
+ borderRadius !== undefined && { '--_Chip-radius': borderRadius },
];
});
@@ -139,6 +143,10 @@ const ChipAction = styled('button', {
overridesResolver: (props, styles) => styles.action,
})<{ ownerState: ChipOwnerState }>(({ theme, ownerState }) => [
{
+ '--Icon-color':
+ ownerState.color !== 'neutral' || ownerState.variant === 'solid'
+ ? 'currentColor'
+ : theme.vars.palette.text.icon,
position: 'absolute',
zIndex: 0,
top: 0,
@@ -155,7 +163,10 @@ const ChipAction = styled('button', {
borderRadius: 'inherit',
[theme.focus.selector]: theme.focus.default,
},
- theme.variants[ownerState.variant!]?.[ownerState.color!],
+ {
+ backgroundColor: theme.vars.palette.background.surface,
+ ...theme.variants[ownerState.variant!]?.[ownerState.color!],
+ },
{ '&:hover': theme.variants[`${ownerState.variant!}Hover`]?.[ownerState.color!] },
{ '&:active': theme.variants[`${ownerState.variant!}Active`]?.[ownerState.color!] },
{
@@ -170,10 +181,9 @@ const ChipStartDecorator = styled('span', {
overridesResolver: (props, styles) => styles.startDecorator,
})<{ ownerState: ChipOwnerState }>({
'--Avatar-marginInlineStart': 'calc(var(--Chip-decoratorChildOffset) * -1)',
- '--Chip-deleteMargin': '0 0 0 calc(var(--Chip-decoratorChildOffset) * -1)',
+ '--IconButton-margin': '0 0 0 calc(var(--Chip-decoratorChildOffset) * -1)',
'--Icon-margin': '0 0 0 calc(var(--Chip-paddingInline) / -4)',
display: 'inherit',
- marginInlineEnd: 'var(--Chip-gap)',
// set zIndex to 1 with order to stay on top of other controls, eg. Checkbox, Radio
order: 0,
zIndex: 1,
@@ -185,10 +195,9 @@ const ChipEndDecorator = styled('span', {
slot: 'EndDecorator',
overridesResolver: (props, styles) => styles.endDecorator,
})<{ ownerState: ChipOwnerState }>({
- '--Chip-deleteMargin': '0 calc(var(--Chip-decoratorChildOffset) * -1) 0 0',
+ '--IconButton-margin': '0 calc(var(--Chip-decoratorChildOffset) * -1) 0 0',
'--Icon-margin': '0 calc(var(--Chip-paddingInline) / -4) 0 0',
display: 'inherit',
- marginInlineStart: 'var(--Chip-gap)',
// set zIndex to 1 with order to stay on top of other controls, eg. Checkbox, Radio
order: 2,
zIndex: 1,
@@ -211,11 +220,11 @@ const Chip = React.forwardRef(function Chip(inProps, ref) {
const {
children,
className,
- color: colorProp = 'primary',
+ color: colorProp = 'neutral',
onClick,
disabled = false,
size = 'md',
- variant = 'solid',
+ variant = 'soft',
startDecorator,
endDecorator,
component,
@@ -296,26 +305,27 @@ const Chip = React.forwardRef(function Chip(inProps, ref) {
ownerState,
});
- const chipContextValue = React.useMemo(
- () => ({ disabled, variant, color: color === 'context' ? undefined : color }),
- [color, disabled, variant],
- );
+ const chipContextValue = React.useMemo(() => ({ disabled }), [disabled]);
return (
-
- {clickable && }
+
+
+ {clickable && }
- {/* label is always the first element for integrating with other controls, eg. Checkbox, Radio. Use CSS order to rearrange position */}
-
- {children}
-
- {startDecorator && (
- {startDecorator}
- )}
+ {/* label is always the first element for integrating with other controls, eg. Checkbox, Radio. Use CSS order to rearrange position */}
+
+ {children}
+
+ {startDecorator && (
+ {startDecorator}
+ )}
- {endDecorator && {endDecorator} }
-
+ {endDecorator && (
+ {endDecorator}
+ )}
+
+
);
}) as OverridableComponent;
@@ -335,10 +345,10 @@ Chip.propTypes /* remove-proptypes */ = {
className: PropTypes.string,
/**
* The color of the component. It supports those theme colors that make sense for this component.
- * @default 'primary'
+ * @default 'neutral'
*/
color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([
- PropTypes.oneOf(['danger', 'info', 'neutral', 'primary', 'success', 'warning']),
+ PropTypes.oneOf(['danger', 'neutral', 'primary', 'success', 'warning']),
PropTypes.string,
]),
/**
@@ -404,7 +414,7 @@ Chip.propTypes /* remove-proptypes */ = {
]),
/**
* The [global variant](https://mui.com/joy-ui/main-features/global-variants/) to use.
- * @default 'solid'
+ * @default 'soft'
*/
variant: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([
PropTypes.oneOf(['outlined', 'plain', 'soft', 'solid']),
diff --git a/packages/mui-joy/src/Chip/ChipProps.ts b/packages/mui-joy/src/Chip/ChipProps.ts
index 7b254b1a12175e..ec2de267a21444 100644
--- a/packages/mui-joy/src/Chip/ChipProps.ts
+++ b/packages/mui-joy/src/Chip/ChipProps.ts
@@ -64,7 +64,7 @@ export interface ChipTypeMap {
children?: React.ReactNode;
/**
* The color of the component. It supports those theme colors that make sense for this component.
- * @default 'primary'
+ * @default 'neutral'
*/
color?: OverridableStringUnion;
/**
@@ -96,7 +96,7 @@ export interface ChipTypeMap {
sx?: SxProps;
/**
* The [global variant](https://mui.com/joy-ui/main-features/global-variants/) to use.
- * @default 'solid'
+ * @default 'soft'
*/
variant?: OverridableStringUnion;
};
diff --git a/packages/mui-joy/src/Chip/chipClasses.ts b/packages/mui-joy/src/Chip/chipClasses.ts
index 970aec80fb7e3d..705d493a617210 100644
--- a/packages/mui-joy/src/Chip/chipClasses.ts
+++ b/packages/mui-joy/src/Chip/chipClasses.ts
@@ -9,8 +9,6 @@ export interface ChipClasses {
colorNeutral: string;
/** Class name applied to the root element if `color="danger"`. */
colorDanger: string;
- /** Class name applied to the root element if `color="info"`. */
- colorInfo: string;
/** Class name applied to the root element if `color="success"`. */
colorSuccess: string;
/** Class name applied to the root element if `color="warning"`. */
@@ -61,7 +59,6 @@ const chipClasses: ChipClasses = generateUtilityClasses('MuiChip', [
'colorPrimary',
'colorNeutral',
'colorDanger',
- 'colorInfo',
'colorSuccess',
'colorWarning',
'colorContext',
diff --git a/packages/mui-joy/src/ChipDelete/ChipDelete.test.tsx b/packages/mui-joy/src/ChipDelete/ChipDelete.test.tsx
index ab7e265d6421d8..ba9328c78b8d51 100644
--- a/packages/mui-joy/src/ChipDelete/ChipDelete.test.tsx
+++ b/packages/mui-joy/src/ChipDelete/ChipDelete.test.tsx
@@ -51,7 +51,7 @@ describe(' ', () => {
,
);
- expect(getByRole('button')).to.have.class(classes.variantSolid);
+ expect(getByRole('button')).to.have.class(classes.variantSoft);
});
it('use variant prop if provided', () => {
diff --git a/packages/mui-joy/src/ChipDelete/ChipDelete.tsx b/packages/mui-joy/src/ChipDelete/ChipDelete.tsx
index 307a511dacb66a..006012057bb48b 100644
--- a/packages/mui-joy/src/ChipDelete/ChipDelete.tsx
+++ b/packages/mui-joy/src/ChipDelete/ChipDelete.tsx
@@ -7,12 +7,14 @@ import { unstable_composeClasses as composeClasses } from '@mui/base';
import useButton from '@mui/base/useButton';
import { useThemeProps } from '../styles';
import styled from '../styles/styled';
+import { useVariantColor } from '../styles/variantColorInheritance';
import { useColorInversion } from '../styles/ColorInversion';
import Cancel from '../internal/svg-icons/Cancel';
-import chipDeleteClasses, { getChipDeleteUtilityClass } from './chipDeleteClasses';
+import { getChipDeleteUtilityClass } from './chipDeleteClasses';
import { ChipDeleteProps, ChipDeleteOwnerState, ChipDeleteTypeMap } from './ChipDeleteProps';
import ChipContext from '../Chip/ChipContext';
import useSlot from '../utils/useSlot';
+import { StyledIconButton } from '../IconButton/IconButton';
const useUtilityClasses = (ownerState: ChipDeleteOwnerState) => {
const { focusVisible, variant, color, disabled } = ownerState;
@@ -29,43 +31,19 @@ const useUtilityClasses = (ownerState: ChipDeleteOwnerState) => {
return composeClasses(slots, getChipDeleteUtilityClass, {});
};
-const ChipDeleteRoot = styled('button', {
+const ChipDeleteRoot = styled(StyledIconButton as unknown as 'button', {
name: 'JoyChipDelete',
slot: 'Root',
overridesResolver: (props, styles) => styles.root,
-})<{ ownerState: ChipDeleteOwnerState }>(({ theme, ownerState }) => [
- {
- '--Icon-margin': 'initial', // prevent overrides from parent
- pointerEvents: 'visible', // force the ChipDelete to be hoverable because the decorator can have pointerEvents 'none'
- cursor: 'pointer',
- width: 'var(--Chip-deleteSize, 2rem)',
- height: 'var(--Chip-deleteSize, 2rem)',
- borderRadius: 'var(--Chip-deleteRadius, 50%)',
- margin: 'var(--Chip-deleteMargin)',
- display: 'inline-flex',
- justifyContent: 'center',
- alignItems: 'center',
- zIndex: 1, // overflow above sibling button or anchor
- border: 'none', // reset user agent stylesheet
- background: 'none', // reset user agent stylesheet
- padding: '0px', // reset user agent stylesheet
- [theme.focus.selector]: theme.focus.default,
- },
- theme.variants[ownerState.variant!]?.[ownerState.color!],
- { '&:hover': theme.variants[`${ownerState.variant!}Hover`]?.[ownerState.color!] },
- { '&:active': theme.variants[`${ownerState.variant!}Active`]?.[ownerState.color!] },
- {
- [`&.${chipDeleteClasses.disabled}`]:
- theme.variants[`${ownerState.variant!}Disabled`]?.[ownerState.color!],
- },
-]);
+})<{ ownerState: ChipDeleteOwnerState }>({
+ '--IconButton-size': 'var(--Chip-deleteSize, 2rem)',
+ '--Icon-fontSize': 'calc(var(--IconButton-size, 2rem) / 1.3)',
+ pointerEvents: 'visible', // force the ChipDelete to be hoverable because the decorator can have pointerEvents 'none'
+ borderRadius: 'var(--Chip-deleteRadius, 50%)',
+ zIndex: 1, // overflow above sibling button or anchor
+ padding: 0, // reset user agent stylesheet
+});
-const chipVariantMapping = {
- plain: 'outlined',
- outlined: 'soft',
- soft: 'solid',
- solid: 'solid',
-} as const;
/**
*
* Demos:
@@ -84,8 +62,8 @@ const ChipDelete = React.forwardRef(function ChipDelete(inProps, ref) {
const {
children,
- variant: variantProp,
- color: colorProp,
+ variant: variantProp = 'plain',
+ color: colorProp = 'neutral',
disabled: disabledProp,
onKeyDown,
onDelete,
@@ -96,9 +74,12 @@ const ChipDelete = React.forwardRef(function ChipDelete(inProps, ref) {
...other
} = props;
const chipContext = React.useContext(ChipContext);
- const variant = variantProp || chipVariantMapping[chipContext.variant!] || 'solid';
+ const { variant = variantProp, color: inheritedColor = colorProp } = useVariantColor(
+ inProps.variant,
+ inProps.color,
+ );
const { getColor } = useColorInversion(variant);
- const color = getColor(inProps.color, colorProp || chipContext.color || 'primary');
+ const color = getColor(inProps.color, inheritedColor);
const disabled = disabledProp ?? chipContext.disabled;
const buttonRef = React.useRef(null);
@@ -171,10 +152,10 @@ ChipDelete.propTypes /* remove-proptypes */ = {
children: PropTypes.node,
/**
* The color of the component. It supports those theme colors that make sense for this component.
- * @default 'primary'
+ * @default 'neutral'
*/
color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([
- PropTypes.oneOf(['danger', 'info', 'neutral', 'primary', 'success', 'warning']),
+ PropTypes.oneOf(['danger', 'neutral', 'primary', 'success', 'warning']),
PropTypes.string,
]),
/**
@@ -225,7 +206,7 @@ ChipDelete.propTypes /* remove-proptypes */ = {
]),
/**
* The [global variant](https://mui.com/joy-ui/main-features/global-variants/) to use.
- * @default 'solid'
+ * @default 'plain'
*/
variant: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([
PropTypes.oneOf(['outlined', 'plain', 'soft', 'solid']),
diff --git a/packages/mui-joy/src/ChipDelete/ChipDeleteProps.ts b/packages/mui-joy/src/ChipDelete/ChipDeleteProps.ts
index cf80c30b375145..6aa29c7c67940e 100644
--- a/packages/mui-joy/src/ChipDelete/ChipDeleteProps.ts
+++ b/packages/mui-joy/src/ChipDelete/ChipDeleteProps.ts
@@ -27,7 +27,7 @@ export interface ChipDeleteTypeMap;
/**
@@ -53,7 +53,7 @@ export interface ChipDeleteTypeMap
;
} & ChipDeleteSlotsAndSlotProps;
diff --git a/packages/mui-joy/src/ChipDelete/chipDeleteClasses.ts b/packages/mui-joy/src/ChipDelete/chipDeleteClasses.ts
index f7212b8fc1c4aa..e247c40075cf06 100644
--- a/packages/mui-joy/src/ChipDelete/chipDeleteClasses.ts
+++ b/packages/mui-joy/src/ChipDelete/chipDeleteClasses.ts
@@ -13,8 +13,6 @@ export interface ChipDeleteClasses {
colorNeutral: string;
/** Class name applied to the root element if `color="danger"`. */
colorDanger: string;
- /** Class name applied to the root element if `color="info"`. */
- colorInfo: string;
/** Class name applied to the root element if `color="success"`. */
colorSuccess: string;
/** Class name applied to the root element if `color="warning"`. */
@@ -42,7 +40,6 @@ const chipDeleteClasses: ChipDeleteClasses = generateUtilityClasses('MuiChipDele
'colorPrimary',
'colorNeutral',
'colorDanger',
- 'colorInfo',
'colorSuccess',
'colorWarning',
'colorContext',
diff --git a/packages/mui-joy/src/CircularProgress/CircularProgress.spec.tsx b/packages/mui-joy/src/CircularProgress/CircularProgress.spec.tsx
index 8bec44bd26fd7d..80e6a4c36dd210 100644
--- a/packages/mui-joy/src/CircularProgress/CircularProgress.spec.tsx
+++ b/packages/mui-joy/src/CircularProgress/CircularProgress.spec.tsx
@@ -15,7 +15,6 @@ import { expectType } from '@mui/types';
// `color`
;
;
- ;
;
;
;
diff --git a/packages/mui-joy/src/CircularProgress/CircularProgress.test.tsx b/packages/mui-joy/src/CircularProgress/CircularProgress.test.tsx
index 61752246d18530..3143b7de61280e 100644
--- a/packages/mui-joy/src/CircularProgress/CircularProgress.test.tsx
+++ b/packages/mui-joy/src/CircularProgress/CircularProgress.test.tsx
@@ -69,7 +69,7 @@ describe(' ', () => {
expect(getByRole('progressbar')).to.have.class(classes.colorPrimary);
});
- (['primary', 'success', 'info', 'danger', 'neutral', 'warning'] as const).forEach((color) => {
+ (['primary', 'success', 'danger', 'neutral', 'warning'] as const).forEach((color) => {
it(`should render ${color}`, () => {
const { getByRole } = render( );
diff --git a/packages/mui-joy/src/CircularProgress/CircularProgress.tsx b/packages/mui-joy/src/CircularProgress/CircularProgress.tsx
index 870032b0e3e5be..d53022c549a2a8 100644
--- a/packages/mui-joy/src/CircularProgress/CircularProgress.tsx
+++ b/packages/mui-joy/src/CircularProgress/CircularProgress.tsx
@@ -46,6 +46,10 @@ const useUtilityClasses = (ownerState: CircularProgressOwnerState) => {
return composeClasses(slots, getCircularProgressUtilityClass, {});
};
+function getThickness(slot: 'track' | 'progress', defaultValue: string) {
+ return `var(--CircularProgress-${slot}Thickness, var(--CircularProgress-thickness, ${defaultValue}))`;
+}
+
const CircularProgressRoot = styled('span', {
name: 'JoyCircularProgress',
slot: 'Root',
@@ -62,39 +66,37 @@ const CircularProgressRoot = styled('span', {
'--CircularProgress-percent': ownerState.value, // 0 - 100
'--CircularProgress-linecap': 'round',
...(ownerState.size === 'sm' && {
- '--CircularProgress-trackThickness': '3px',
- '--CircularProgress-progressThickness': '3px',
'--_root-size': 'var(--CircularProgress-size, 24px)', // use --_root-size to let other components overrides via --CircularProgress-size
+ '--_track-thickness': getThickness('track', '3px'),
+ '--_progress-thickness': getThickness('progress', '3px'),
}),
...(ownerState.instanceSize === 'sm' && {
'--CircularProgress-size': '24px',
}),
...(ownerState.size === 'md' && {
- '--CircularProgress-trackThickness': '6px',
- '--CircularProgress-progressThickness': '6px',
+ '--_track-thickness': getThickness('track', '6px'),
+ '--_progress-thickness': getThickness('progress', '6px'),
'--_root-size': 'var(--CircularProgress-size, 40px)',
}),
...(ownerState.instanceSize === 'md' && {
'--CircularProgress-size': '40px',
}),
...(ownerState.size === 'lg' && {
- '--CircularProgress-trackThickness': '8px',
- '--CircularProgress-progressThickness': '8px',
+ '--_track-thickness': getThickness('track', '8px'),
+ '--_progress-thickness': getThickness('progress', '8px'),
'--_root-size': 'var(--CircularProgress-size, 64px)',
}),
...(ownerState.instanceSize === 'lg' && {
'--CircularProgress-size': '64px',
}),
...(ownerState.thickness && {
- '--CircularProgress-trackThickness': `${ownerState.thickness}px`,
- '--CircularProgress-progressThickness': `${ownerState.thickness}px`,
+ '--_track-thickness': `${ownerState.thickness}px`,
+ '--_progress-thickness': `${ownerState.thickness}px`,
}),
// internal variables
- '--_thickness-diff':
- 'calc(var(--CircularProgress-trackThickness) - var(--CircularProgress-progressThickness))',
+ '--_thickness-diff': 'calc(var(--_track-thickness) - var(--_progress-thickness))',
'--_inner-size': 'calc(var(--_root-size) - 2 * var(--variant-borderWidth, 0px))',
- '--_outlined-inset':
- 'max(var(--CircularProgress-trackThickness), var(--CircularProgress-progressThickness))',
+ '--_outlined-inset': 'max(var(--_track-thickness), var(--_progress-thickness))',
width: 'var(--_root-size)',
height: 'var(--_root-size)',
borderRadius: 'var(--_root-size)',
@@ -151,9 +153,9 @@ const CircularProgressTrack = styled('circle', {
})<{ ownerState: CircularProgressOwnerState }>({
cx: '50%',
cy: '50%',
- r: 'calc(var(--_inner-size) / 2 - var(--CircularProgress-trackThickness) / 2 + min(0px, var(--_thickness-diff) / 2))',
+ r: 'calc(var(--_inner-size) / 2 - var(--_track-thickness) / 2 + min(0px, var(--_thickness-diff) / 2))',
fill: 'transparent',
- strokeWidth: 'var(--CircularProgress-trackThickness)',
+ strokeWidth: 'var(--_track-thickness)',
stroke: 'var(--CircularProgress-trackColor)',
});
@@ -164,13 +166,13 @@ const CircularProgressProgress = styled('circle', {
})<{ ownerState: CircularProgressOwnerState }>(
{
'--_progress-radius':
- 'calc(var(--_inner-size) / 2 - var(--CircularProgress-progressThickness) / 2 - max(0px, var(--_thickness-diff) / 2))',
+ 'calc(var(--_inner-size) / 2 - var(--_progress-thickness) / 2 - max(0px, var(--_thickness-diff) / 2))',
'--_progress-length': 'calc(2 * 3.1415926535 * var(--_progress-radius))', // the circumference around the progress
cx: '50%',
cy: '50%',
r: 'var(--_progress-radius)',
fill: 'transparent',
- strokeWidth: 'var(--CircularProgress-progressThickness)',
+ strokeWidth: 'var(--_progress-thickness)',
stroke: 'var(--CircularProgress-progressColor)',
strokeLinecap: 'var(--CircularProgress-linecap, round)' as 'round', // can't use CSS variable directly, need to cast type.
strokeDasharray: 'var(--_progress-length)',
@@ -311,7 +313,7 @@ CircularProgress.propTypes /* remove-proptypes */ = {
* @default 'primary'
*/
color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([
- PropTypes.oneOf(['danger', 'info', 'neutral', 'primary', 'success', 'warning']),
+ PropTypes.oneOf(['danger', 'neutral', 'primary', 'success', 'warning']),
PropTypes.string,
]),
/**
diff --git a/packages/mui-joy/src/CircularProgress/circularProgressClasses.ts b/packages/mui-joy/src/CircularProgress/circularProgressClasses.ts
index 436bc40a12185c..337ea50ea94478 100644
--- a/packages/mui-joy/src/CircularProgress/circularProgressClasses.ts
+++ b/packages/mui-joy/src/CircularProgress/circularProgressClasses.ts
@@ -17,8 +17,6 @@ export interface CircularProgressClasses {
colorNeutral: string;
/** Class name applied to the root element if `color="danger"`. */
colorDanger: string;
- /** Class name applied to the root element if `color="info"`. */
- colorInfo: string;
/** Class name applied to the root element if `color="success"`. */
colorSuccess: string;
/** Class name applied to the root element if `color="warning"`. */
@@ -58,7 +56,6 @@ const circularProgressClasses: CircularProgressClasses = generateUtilityClasses(
'colorPrimary',
'colorNeutral',
'colorDanger',
- 'colorInfo',
'colorSuccess',
'colorWarning',
'colorContext',
diff --git a/packages/mui-joy/src/CssBaseline/CssBaseline.tsx b/packages/mui-joy/src/CssBaseline/CssBaseline.tsx
index c84cdca45b0b3b..9f94fa89bc3b03 100644
--- a/packages/mui-joy/src/CssBaseline/CssBaseline.tsx
+++ b/packages/mui-joy/src/CssBaseline/CssBaseline.tsx
@@ -37,7 +37,7 @@ function CssBaseline(props: CssBaselineProps) {
}
const defaultTypographyLevel =
(theme as unknown as { components: Components }).components?.JoyTypography
- ?.defaultProps?.level ?? 'body1';
+ ?.defaultProps?.level ?? 'body-md';
return {
html: {
WebkitFontSmoothing: 'antialiased',
@@ -52,7 +52,7 @@ function CssBaseline(props: CssBaselineProps) {
boxSizing: 'inherit',
},
'strong, b': {
- fontWeight: 'bold',
+ fontWeight: theme.vars.fontWeight.lg,
},
body: {
margin: 0, // Remove the margin in all browsers.
diff --git a/packages/mui-joy/src/Divider/Divider.tsx b/packages/mui-joy/src/Divider/Divider.tsx
index 024d64f565c0b4..452df3157dfab1 100644
--- a/packages/mui-joy/src/Divider/Divider.tsx
+++ b/packages/mui-joy/src/Divider/Divider.tsx
@@ -48,8 +48,7 @@ export const DividerRoot = styled('hr', {
whiteSpace: 'nowrap',
textAlign: 'center',
border: 0,
- fontFamily: theme.vars.fontFamily.body,
- fontSize: theme.vars.fontSize.sm,
+ ...theme.typography['body-sm'],
'&::before, &::after': {
position: 'relative',
inlineSize:
diff --git a/packages/mui-joy/src/FormControl/FormControl.test.tsx b/packages/mui-joy/src/FormControl/FormControl.test.tsx
index edb3b3ac7d9101..363c80abf6885b 100644
--- a/packages/mui-joy/src/FormControl/FormControl.test.tsx
+++ b/packages/mui-joy/src/FormControl/FormControl.test.tsx
@@ -42,12 +42,11 @@ describe(' ', () => {
expect(getByTestId('root')).not.to.have.class(classes.colorNeutral);
expect(getByTestId('root')).not.to.have.class(classes.colorPrimary);
expect(getByTestId('root')).not.to.have.class(classes.colorDanger);
- expect(getByTestId('root')).not.to.have.class(classes.colorInfo);
expect(getByTestId('root')).not.to.have.class(classes.colorSuccess);
expect(getByTestId('root')).not.to.have.class(classes.colorWarning);
});
- (['primary', 'success', 'info', 'danger', 'neutral', 'warning'] as const).forEach((color) => {
+ (['primary', 'success', 'danger', 'neutral', 'warning'] as const).forEach((color) => {
it(`should render ${color}`, () => {
const { getByTestId } = render( );
diff --git a/packages/mui-joy/src/FormControl/FormControl.tsx b/packages/mui-joy/src/FormControl/FormControl.tsx
index 91a43e6cb93228..71697e2571c645 100644
--- a/packages/mui-joy/src/FormControl/FormControl.tsx
+++ b/packages/mui-joy/src/FormControl/FormControl.tsx
@@ -39,20 +39,26 @@ export const FormControlRoot = styled('div', {
'--FormLabel-asteriskColor': theme.vars.palette.danger[500],
...(ownerState.size === 'sm' && {
'--FormLabel-fontSize': theme.vars.fontSize.xs,
+ '--FormLabel-lineHeight': theme.vars.lineHeight.xl,
'--FormLabel-margin':
ownerState.orientation === 'horizontal' ? '0 0.5rem 0 0' : '0 0 0.25rem 0',
'--FormHelperText-fontSize': theme.vars.fontSize.xs,
+ '--FormHelperText-lineHeight': theme.vars.lineHeight.xl,
}),
...(ownerState.size === 'md' && {
'--FormLabel-fontSize': theme.vars.fontSize.sm,
+ '--FormLabel-lineHeight': theme.vars.lineHeight.sm,
'--FormLabel-margin':
- ownerState.orientation === 'horizontal' ? '0 0.75rem 0 0' : '0 0 0.25rem 0',
+ ownerState.orientation === 'horizontal' ? '0 0.75rem 0 0' : '0 0 0.375rem 0',
'--FormHelperText-fontSize': theme.vars.fontSize.sm,
+ '--FormHelperText-lineHeight': theme.vars.lineHeight.sm,
}),
...(ownerState.size === 'lg' && {
'--FormLabel-fontSize': theme.vars.fontSize.md,
- '--FormLabel-margin': ownerState.orientation === 'horizontal' ? '0 1rem 0 0' : '0 0 0.25rem 0',
+ '--FormLabel-lineHeight': theme.vars.lineHeight.md,
+ '--FormLabel-margin': ownerState.orientation === 'horizontal' ? '0 1rem 0 0' : '0 0 0.5rem 0',
'--FormHelperText-fontSize': theme.vars.fontSize.sm,
+ '--FormHelperText-lineHeight': theme.vars.lineHeight.sm,
}),
...(ownerState.color &&
ownerState.color !== 'context' && {
@@ -195,7 +201,7 @@ FormControl.propTypes /* remove-proptypes */ = {
* The color of the component. It supports those theme colors that make sense for this component.
*/
color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([
- PropTypes.oneOf(['danger', 'info', 'neutral', 'primary', 'success', 'warning']),
+ PropTypes.oneOf(['danger', 'neutral', 'primary', 'success', 'warning']),
PropTypes.string,
]),
/**
diff --git a/packages/mui-joy/src/FormControl/formControlClasses.ts b/packages/mui-joy/src/FormControl/formControlClasses.ts
index b4b39be2d97473..fc9d24be03bdbe 100644
--- a/packages/mui-joy/src/FormControl/formControlClasses.ts
+++ b/packages/mui-joy/src/FormControl/formControlClasses.ts
@@ -13,8 +13,6 @@ export interface FormControlClasses {
colorNeutral: string;
/** Class name applied to the root element if `color="danger"`. */
colorDanger: string;
- /** Class name applied to the root element if `color="info"`. */
- colorInfo: string;
/** Class name applied to the root element if `color="success"`. */
colorSuccess: string;
/** Class name applied to the root element if `color="warning"`. */
@@ -44,7 +42,6 @@ const formControlClasses: FormControlClasses = generateUtilityClasses('MuiFormCo
'colorPrimary',
'colorNeutral',
'colorDanger',
- 'colorInfo',
'colorSuccess',
'colorWarning',
'sizeSm',
diff --git a/packages/mui-joy/src/FormHelperText/FormHelperText.tsx b/packages/mui-joy/src/FormHelperText/FormHelperText.tsx
index 26ac0d341b12f2..7b2ac4f97c9876 100644
--- a/packages/mui-joy/src/FormHelperText/FormHelperText.tsx
+++ b/packages/mui-joy/src/FormHelperText/FormHelperText.tsx
@@ -28,8 +28,8 @@ const FormHelperTextRoot = styled('div', {
alignItems: 'center',
fontFamily: theme.vars.fontFamily.body,
fontSize: `var(--FormHelperText-fontSize, ${theme.vars.fontSize.sm})`,
- lineHeight: theme.vars.lineHeight.sm,
- color: `var(--FormHelperText-color, ${theme.vars.palette.text.secondary})`,
+ lineHeight: `var(--FormHelperText-lineHeight, ${theme.vars.lineHeight.sm})`,
+ color: `var(--FormHelperText-color, ${theme.vars.palette.text.tertiary})`,
margin: 'var(--FormHelperText-margin, 0px)',
[`.${formLabelClasses.root} + &`]: {
'--FormHelperText-margin': '0px', // remove the margin if the helper text is next to the form label.
diff --git a/packages/mui-joy/src/FormLabel/FormLabel.tsx b/packages/mui-joy/src/FormLabel/FormLabel.tsx
index f2de55989caae9..a8457e6dd3f4bd 100644
--- a/packages/mui-joy/src/FormLabel/FormLabel.tsx
+++ b/packages/mui-joy/src/FormLabel/FormLabel.tsx
@@ -32,7 +32,7 @@ const FormLabelRoot = styled('label', {
fontFamily: theme.vars.fontFamily.body,
fontSize: `var(--FormLabel-fontSize, ${theme.vars.fontSize.sm})`,
fontWeight: theme.vars.fontWeight.md,
- lineHeight: theme.vars.lineHeight.md,
+ lineHeight: `var(--FormLabel-lineHeight, ${theme.vars.lineHeight.sm})`,
color: `var(--FormLabel-color, ${theme.vars.palette.text.primary})`,
margin: 'var(--FormLabel-margin, 0px)',
}));
diff --git a/packages/mui-joy/src/IconButton/IconButton.test.tsx b/packages/mui-joy/src/IconButton/IconButton.test.tsx
index 033f9d85ec8657..258fa9025a7977 100644
--- a/packages/mui-joy/src/IconButton/IconButton.test.tsx
+++ b/packages/mui-joy/src/IconButton/IconButton.test.tsx
@@ -23,18 +23,18 @@ describe('Joy ', () => {
describeJoyColorInversion( , { muiName: 'JoyIconButton', classes });
- it('by default, should render with the root, variantSolid, sizeMd and colorPrimary classes', () => {
+ it('by default, should render with the root, variantPlain, sizeMd and colorNeutral classes', () => {
const { getByRole } = render(Hello World );
const button = getByRole('button');
expect(button).to.have.class(classes.root);
- expect(button).to.have.class(classes.variantSoft);
+ expect(button).to.have.class(classes.variantPlain);
expect(button).to.have.class(classes.sizeMd);
- expect(button).to.have.class(classes.colorPrimary);
+ expect(button).to.have.class(classes.colorNeutral);
// should not have other variant classes
expect(button).not.to.have.class(classes.variantOutlined);
- expect(button).not.to.have.class(classes.variantPlain);
+ expect(button).not.to.have.class(classes.variantSoft);
expect(button).not.to.have.class(classes.variantSolid);
});
diff --git a/packages/mui-joy/src/IconButton/IconButton.tsx b/packages/mui-joy/src/IconButton/IconButton.tsx
index 5dc67323fb5a99..c02d01d8c859b9 100644
--- a/packages/mui-joy/src/IconButton/IconButton.tsx
+++ b/packages/mui-joy/src/IconButton/IconButton.tsx
@@ -7,7 +7,7 @@ import composeClasses from '@mui/base/composeClasses';
import { styled, useThemeProps } from '../styles';
import { useColorInversion } from '../styles/ColorInversion';
import useSlot from '../utils/useSlot';
-import iconButtonClasses, { getIconButtonUtilityClass } from './iconButtonClasses';
+import { getIconButtonUtilityClass } from './iconButtonClasses';
import { IconButtonOwnerState, IconButtonTypeMap, ExtendIconButton } from './IconButtonProps';
import ButtonGroupContext from '../ButtonGroup/ButtonGroupContext';
@@ -38,12 +38,17 @@ export const StyledIconButton = styled('button')<{ ownerState: IconButtonOwnerSt
({ theme, ownerState }) => [
{
'--Icon-margin': 'initial', // reset the icon's margin.
+ '--Icon-color':
+ ownerState.color !== 'neutral' || ownerState.variant === 'solid'
+ ? 'currentColor'
+ : theme.vars.palette.text.icon,
...(ownerState.instanceSize && {
'--IconButton-size': { sm: '2rem', md: '2.5rem', lg: '3rem' }[ownerState.instanceSize],
}),
...(ownerState.size === 'sm' && {
'--Icon-fontSize': 'calc(var(--IconButton-size, 2rem) / 1.6)', // 1.25rem by default
'--CircularProgress-size': '20px',
+ '--CircularProgress-thickness': '2px',
minWidth: 'var(--IconButton-size, 2rem)', // use min-width instead of height to make the button resilient to its content
minHeight: 'var(--IconButton-size, 2rem)', // use min-height instead of height to make the button resilient to its content
fontSize: theme.vars.fontSize.sm,
@@ -52,6 +57,7 @@ export const StyledIconButton = styled('button')<{ ownerState: IconButtonOwnerSt
...(ownerState.size === 'md' && {
'--Icon-fontSize': 'calc(var(--IconButton-size, 2.5rem) / 1.667)', // 1.5rem by default
'--CircularProgress-size': '24px',
+ '--CircularProgress-thickness': '3px',
minWidth: 'var(--IconButton-size, 2.5rem)',
minHeight: 'var(--IconButton-size, 2.5rem)',
fontSize: theme.vars.fontSize.md,
@@ -60,6 +66,7 @@ export const StyledIconButton = styled('button')<{ ownerState: IconButtonOwnerSt
...(ownerState.size === 'lg' && {
'--Icon-fontSize': 'calc(var(--IconButton-size, 3rem) / 1.714)', // 1.75rem by default
'--CircularProgress-size': '28px',
+ '--CircularProgress-thickness': '4px',
minWidth: 'var(--IconButton-size, 3rem)',
minHeight: 'var(--IconButton-size, 3rem)',
fontSize: theme.vars.fontSize.lg,
@@ -79,18 +86,24 @@ export const StyledIconButton = styled('button')<{ ownerState: IconButtonOwnerSt
alignItems: 'center',
justifyContent: 'center',
position: 'relative',
- [theme.focus.selector]: theme.focus.default,
+ [theme.focus.selector]: { '--Icon-color': 'currentColor', ...theme.focus.default },
},
- theme.variants[ownerState.variant!]?.[ownerState.color!],
{
+ ...theme.variants[ownerState.variant!]?.[ownerState.color!],
'&:hover': {
- '@media (hover: hover)': theme.variants[`${ownerState.variant!}Hover`]?.[ownerState.color!],
+ '@media (hover: hover)': {
+ '--Icon-color': 'currentColor',
+ ...theme.variants[`${ownerState.variant!}Hover`]?.[ownerState.color!],
+ },
+ },
+ '&:active, &[aria-pressed="true"]': {
+ '--Icon-color': 'currentColor',
+ ...theme.variants[`${ownerState.variant!}Active`]?.[ownerState.color!],
+ },
+ '&:disabled': {
+ '--Icon-color': 'currentColor',
+ ...theme.variants[`${ownerState.variant!}Disabled`]?.[ownerState.color!],
},
- },
- { '&:active': theme.variants[`${ownerState.variant!}Active`]?.[ownerState.color!] },
- {
- [`&.${iconButtonClasses.disabled}`]:
- theme.variants[`${ownerState.variant!}Disabled`]?.[ownerState.color!],
},
],
);
@@ -122,9 +135,9 @@ const IconButton = React.forwardRef(function IconButton(inProps, ref) {
children,
action,
component = 'button',
- color: colorProp = 'primary',
+ color: colorProp = 'neutral',
disabled: disabledProp,
- variant: variantProp = 'soft',
+ variant: variantProp = 'plain',
size: sizeProp = 'md',
slots = {},
slotProps = {},
@@ -205,10 +218,10 @@ IconButton.propTypes /* remove-proptypes */ = {
children: PropTypes.node,
/**
* The color of the component. It supports those theme colors that make sense for this component.
- * @default 'primary'
+ * @default 'neutral'
*/
color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([
- PropTypes.oneOf(['danger', 'info', 'neutral', 'primary', 'success', 'warning']),
+ PropTypes.oneOf(['danger', 'neutral', 'primary', 'success', 'warning']),
PropTypes.string,
]),
/**
@@ -266,7 +279,7 @@ IconButton.propTypes /* remove-proptypes */ = {
tabIndex: PropTypes.number,
/**
* The [global variant](https://mui.com/joy-ui/main-features/global-variants/) to use.
- * @default 'soft'
+ * @default 'plain'
*/
variant: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([
PropTypes.oneOf(['outlined', 'plain', 'soft', 'solid']),
diff --git a/packages/mui-joy/src/IconButton/IconButtonProps.ts b/packages/mui-joy/src/IconButton/IconButtonProps.ts
index 6cc195acbddb5d..8eddbb07650457 100644
--- a/packages/mui-joy/src/IconButton/IconButtonProps.ts
+++ b/packages/mui-joy/src/IconButton/IconButtonProps.ts
@@ -39,7 +39,7 @@ export interface IconButtonTypeMap;
/**
@@ -71,7 +71,7 @@ export interface IconButtonTypeMap
;
/**
* The [global variant](https://mui.com/joy-ui/main-features/global-variants/) to use.
- * @default 'soft'
+ * @default 'plain'
*/
variant?: OverridableStringUnion;
} & IconButtonSlotsAndSlotProps;
diff --git a/packages/mui-joy/src/IconButton/iconButtonClasses.ts b/packages/mui-joy/src/IconButton/iconButtonClasses.ts
index f8b08b0c6a0360..6063c7a9420321 100644
--- a/packages/mui-joy/src/IconButton/iconButtonClasses.ts
+++ b/packages/mui-joy/src/IconButton/iconButtonClasses.ts
@@ -9,8 +9,6 @@ export interface IconButtonClasses {
colorNeutral: string;
/** Class name applied to the root element if `color="danger"`. */
colorDanger: string;
- /** Class name applied to the root element if `color="info"`. */
- colorInfo: string;
/** Class name applied to the root element if `color="success"`. */
colorSuccess: string;
/** Class name applied to the root element if `color="warning"`. */
@@ -48,7 +46,6 @@ const iconButtonClasses: IconButtonClasses = generateUtilityClasses('MuiIconButt
'colorPrimary',
'colorNeutral',
'colorDanger',
- 'colorInfo',
'colorSuccess',
'colorWarning',
'colorContext',
diff --git a/packages/mui-joy/src/Input/Input.tsx b/packages/mui-joy/src/Input/Input.tsx
index fbe8f3f679eb8f..250bb6c2c38125 100644
--- a/packages/mui-joy/src/Input/Input.tsx
+++ b/packages/mui-joy/src/Input/Input.tsx
@@ -39,7 +39,8 @@ export const StyledInputRoot = styled('div')<{ ownerState: InputOwnerState }>(
'--Input-radius': theme.vars.radius.sm,
'--Input-gap': '0.5rem',
'--Input-placeholderColor': 'inherit',
- '--Input-placeholderOpacity': 0.5,
+ '--Input-placeholderOpacity': 0.64,
+ '--Input-decoratorColor': theme.vars.palette.text.icon,
'--Input-focused': '0',
'--Input-focusedThickness': theme.vars.focus.thickness,
...(ownerState.color === 'context'
@@ -56,20 +57,20 @@ export const StyledInputRoot = styled('div')<{ ownerState: InputOwnerState }>(
'--Input-minHeight': '2rem',
'--Input-paddingInline': '0.5rem',
'--Input-decoratorChildHeight': 'min(1.5rem, var(--Input-minHeight))',
- '--Icon-fontSize': '1.25rem',
+ '--Icon-fontSize': theme.vars.fontSize.xl,
}),
...(ownerState.size === 'md' && {
'--Input-minHeight': '2.5rem',
'--Input-paddingInline': '0.75rem',
'--Input-decoratorChildHeight': 'min(2rem, var(--Input-minHeight))',
- '--Icon-fontSize': '1.5rem',
+ '--Icon-fontSize': theme.vars.fontSize.xl2,
}),
...(ownerState.size === 'lg' && {
'--Input-minHeight': '3rem',
'--Input-paddingInline': '1rem',
'--Input-gap': '0.75rem',
'--Input-decoratorChildHeight': 'min(2.375rem, var(--Input-minHeight))',
- '--Icon-fontSize': '1.75rem',
+ '--Icon-fontSize': theme.vars.fontSize.xl2,
}),
// variables for controlling child components
'--Input-decoratorChildOffset':
@@ -93,11 +94,9 @@ export const StyledInputRoot = styled('div')<{ ownerState: InputOwnerState }>(
display: 'flex',
paddingInline: `var(--Input-paddingInline)`,
borderRadius: 'var(--Input-radius)',
- fontFamily: theme.vars.fontFamily.body,
- fontSize: theme.vars.fontSize.md,
- ...(ownerState.size === 'sm' && {
- fontSize: theme.vars.fontSize.sm,
- }),
+ ...theme.typography[`body-${ownerState.size!}`],
+ ...variantStyle,
+ backgroundColor: variantStyle?.backgroundColor ?? theme.vars.palette.background.surface,
'&:before': {
boxSizing: 'border-box',
content: '""',
@@ -115,9 +114,6 @@ export const StyledInputRoot = styled('div')<{ ownerState: InputOwnerState }>(
},
},
{
- // variant styles
- ...variantStyle,
- backgroundColor: variantStyle?.backgroundColor ?? theme.vars.palette.background.surface,
'&:hover': {
...theme.variants[`${ownerState.variant!}Hover`]?.[ownerState.color!],
backgroundColor: null, // it is not common to change background on hover for Input
@@ -182,42 +178,29 @@ export const StyledInputHtml = styled('input')<{ ownerState: InputOwnerState }>(
}),
);
-export const StyledInputStartDecorator = styled('div')<{ ownerState: InputOwnerState }>(
- ({ theme, ownerState }) => ({
- '--Button-margin': '0 0 0 calc(var(--Input-decoratorChildOffset) * -1)',
- '--IconButton-margin': '0 0 0 calc(var(--Input-decoratorChildOffset) * -1)',
- '--Icon-margin': '0 0 0 calc(var(--Input-paddingInline) / -4)',
- display: 'inherit',
- alignItems: 'center',
- paddingBlock: 'var(--unstable_InputPaddingBlock)', // for wrapping Autocomplete's tags
- flexWrap: 'wrap', // for wrapping Autocomplete's tags
- marginInlineEnd: 'var(--Input-gap)',
- color: theme.vars.palette.text.tertiary,
- cursor: 'initial',
- ...(ownerState.focused && {
- color: theme.variants[ownerState.variant!]?.[ownerState.color!]?.color,
- }),
- ...(ownerState.disabled && {
- color: theme.variants[`${ownerState.variant!}Disabled`]?.[ownerState.color!]?.color,
- }),
- }),
-);
+export const StyledInputStartDecorator = styled('div')<{ ownerState: InputOwnerState }>({
+ '--Button-margin': '0 0 0 calc(var(--Input-decoratorChildOffset) * -1)',
+ '--IconButton-margin': '0 0 0 calc(var(--Input-decoratorChildOffset) * -1)',
+ '--Icon-margin': '0 0 0 calc(var(--Input-paddingInline) / -4)',
+ display: 'inherit',
+ alignItems: 'center',
+ paddingBlock: 'var(--unstable_InputPaddingBlock)', // for wrapping Autocomplete's tags
+ flexWrap: 'wrap', // for wrapping Autocomplete's tags
+ marginInlineEnd: 'var(--Input-gap)',
+ color: 'var(--Input-decoratorColor)',
+ cursor: 'initial',
+});
-export const StyledInputEndDecorator = styled('div')<{ ownerState: InputOwnerState }>(
- ({ theme, ownerState }) => ({
- '--Button-margin': '0 calc(var(--Input-decoratorChildOffset) * -1) 0 0',
- '--IconButton-margin': '0 calc(var(--Input-decoratorChildOffset) * -1) 0 0',
- '--Icon-margin': '0 calc(var(--Input-paddingInline) / -4) 0 0',
- display: 'inherit',
- alignItems: 'center',
- marginInlineStart: 'var(--Input-gap)',
- color: theme.variants[ownerState.variant!]?.[ownerState.color!]?.color,
- cursor: 'initial',
- ...(ownerState.disabled && {
- color: theme.variants[`${ownerState.variant!}Disabled`]?.[ownerState.color!]?.color,
- }),
- }),
-);
+export const StyledInputEndDecorator = styled('div')<{ ownerState: InputOwnerState }>({
+ '--Button-margin': '0 calc(var(--Input-decoratorChildOffset) * -1) 0 0',
+ '--IconButton-margin': '0 calc(var(--Input-decoratorChildOffset) * -1) 0 0',
+ '--Icon-margin': '0 calc(var(--Input-paddingInline) / -4) 0 0',
+ display: 'inherit',
+ alignItems: 'center',
+ marginInlineStart: 'var(--Input-gap)',
+ color: 'var(--Input-decoratorColor)',
+ cursor: 'initial',
+});
const InputRoot = styled(StyledInputRoot, {
name: 'JoyInput',
@@ -387,7 +370,7 @@ Input.propTypes /* remove-proptypes */ = {
* @default 'neutral'
*/
color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([
- PropTypes.oneOf(['danger', 'info', 'neutral', 'primary', 'success', 'warning']),
+ PropTypes.oneOf(['danger', 'neutral', 'primary', 'success', 'warning']),
PropTypes.string,
]),
/**
diff --git a/packages/mui-joy/src/Input/inputClasses.ts b/packages/mui-joy/src/Input/inputClasses.ts
index a1f17563ce8a1d..0cfc27801f78f0 100644
--- a/packages/mui-joy/src/Input/inputClasses.ts
+++ b/packages/mui-joy/src/Input/inputClasses.ts
@@ -19,8 +19,6 @@ export interface InputClasses {
colorNeutral: string;
/** Class name applied to the root element if `color="danger"`. */
colorDanger: string;
- /** Class name applied to the root element if `color="info"`. */
- colorInfo: string;
/** Class name applied to the root element if `color="success"`. */
colorSuccess: string;
/** Class name applied to the root element if `color="warning"`. */
@@ -67,7 +65,6 @@ const inputClasses: InputClasses = generateUtilityClasses('MuiInput', [
'colorPrimary',
'colorNeutral',
'colorDanger',
- 'colorInfo',
'colorSuccess',
'colorWarning',
'colorContext',
diff --git a/packages/mui-joy/src/LinearProgress/LinearProgress.test.tsx b/packages/mui-joy/src/LinearProgress/LinearProgress.test.tsx
index 5e838d205a31a5..8b2197300f0872 100644
--- a/packages/mui-joy/src/LinearProgress/LinearProgress.test.tsx
+++ b/packages/mui-joy/src/LinearProgress/LinearProgress.test.tsx
@@ -54,7 +54,7 @@ describe(' ', () => {
const { getByRole } = render( );
expect(getByRole('progressbar')).to.have.class(classes.colorPrimary);
});
- (['primary', 'success', 'info', 'danger', 'neutral', 'warning'] as const).forEach((color) => {
+ (['primary', 'success', 'danger', 'neutral', 'warning'] as const).forEach((color) => {
it(`should render ${color}`, () => {
const { getByRole } = render( );
expect(getByRole('progressbar')).to.have.class(
diff --git a/packages/mui-joy/src/LinearProgress/LinearProgress.tsx b/packages/mui-joy/src/LinearProgress/LinearProgress.tsx
index 9c073337b14f29..05c9753d8999aa 100644
--- a/packages/mui-joy/src/LinearProgress/LinearProgress.tsx
+++ b/packages/mui-joy/src/LinearProgress/LinearProgress.tsx
@@ -229,7 +229,7 @@ LinearProgress.propTypes /* remove-proptypes */ = {
* @default 'primary'
*/
color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([
- PropTypes.oneOf(['danger', 'info', 'neutral', 'primary', 'success', 'warning']),
+ PropTypes.oneOf(['danger', 'neutral', 'primary', 'success', 'warning']),
PropTypes.string,
]),
/**
diff --git a/packages/mui-joy/src/LinearProgress/linearProgressClasses.ts b/packages/mui-joy/src/LinearProgress/linearProgressClasses.ts
index 62b5214d47ae47..b15787b1aa2def 100644
--- a/packages/mui-joy/src/LinearProgress/linearProgressClasses.ts
+++ b/packages/mui-joy/src/LinearProgress/linearProgressClasses.ts
@@ -11,8 +11,6 @@ export interface LinearProgressClasses {
colorNeutral: string;
/** Class name applied to the root element if `color="danger"`. */
colorDanger: string;
- /** Class name applied to the root element if `color="info"`. */
- colorInfo: string;
/** Class name applied to the root element if `color="success"`. */
colorSuccess: string;
/** Class name applied to the root element if `color="warning"`. */
@@ -47,7 +45,6 @@ const linearProgressClasses: LinearProgressClasses = generateUtilityClasses('Mui
'colorPrimary',
'colorNeutral',
'colorDanger',
- 'colorInfo',
'colorSuccess',
'colorWarning',
'colorContext',
diff --git a/packages/mui-joy/src/Link/Link.spec.tsx b/packages/mui-joy/src/Link/Link.spec.tsx
index 6dde3ffaf1fd5b..fa34417c4d0787 100644
--- a/packages/mui-joy/src/Link/Link.spec.tsx
+++ b/packages/mui-joy/src/Link/Link.spec.tsx
@@ -14,7 +14,6 @@ import { expectType } from '@mui/types';
// `color`
;
;
-;
;
;
;
@@ -26,12 +25,13 @@ import { expectType } from '@mui/types';
;
;
;
-;
-;
-;
-;
-;
-;
+;
+;
+;
+;
+;
+;
+;
// `underline`
;
diff --git a/packages/mui-joy/src/Link/Link.test.tsx b/packages/mui-joy/src/Link/Link.test.tsx
index 30221b04093716..84e84136cb56b3 100644
--- a/packages/mui-joy/src/Link/Link.test.tsx
+++ b/packages/mui-joy/src/Link/Link.test.tsx
@@ -137,7 +137,7 @@ describe('', () => {
expect(getByTestId('root')).to.have.class(classes.colorPrimary);
});
- (['primary', 'success', 'info', 'danger', 'neutral', 'warning'] as const).forEach((color) => {
+ (['primary', 'success', 'danger', 'neutral', 'warning'] as const).forEach((color) => {
it(`should render ${color}`, () => {
const { getByTestId } = render(
@@ -160,10 +160,24 @@ describe('', () => {
,
);
- expect(getByTestId('root')).have.class(classes.body1);
+ expect(getByTestId('root')).have.class(classes['body-md']);
});
- (['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'body1', 'body2', 'body3'] as const).forEach((level) => {
+ (
+ [
+ 'h1',
+ 'h2',
+ 'h3',
+ 'h4',
+ 'title-lg',
+ 'title-md',
+ 'title-sm',
+ 'body-lg',
+ 'body-md',
+ 'body-sm',
+ 'body-xs',
+ ] as const
+ ).forEach((level) => {
it(`should render ${level}`, () => {
const { getByTestId } = render(
diff --git a/packages/mui-joy/src/Link/Link.tsx b/packages/mui-joy/src/Link/Link.tsx
index 432e8db1660c74..31cfcdc0558623 100644
--- a/packages/mui-joy/src/Link/Link.tsx
+++ b/packages/mui-joy/src/Link/Link.tsx
@@ -74,6 +74,9 @@ const LinkRoot = styled('a', {
return [
{
'--Icon-fontSize': '1.25em',
+ '--Icon-color': 'currentColor',
+ '--CircularProgress-size': '1.25em',
+ '--CircularProgress-thickness': '3px',
...(ownerState.level && ownerState.level !== 'inherit' && theme.typography[ownerState.level]),
...(ownerState.level === 'inherit' && {
font: 'inherit',
@@ -93,6 +96,8 @@ const LinkRoot = styled('a', {
...(ownerState.startDecorator && {
verticalAlign: 'bottom', // to make the link align with the parent's content
}),
+ textDecorationThickness: 'max(0.08em, 1px)', // steal from https://moderncss.dev/modern-css-for-dynamic-component-based-architecture/#css-reset-additions
+ textUnderlineOffset: '0.15em', // steal from https://moderncss.dev/modern-css-for-dynamic-component-based-architecture/#css-reset-additions
display: 'inline-flex',
alignItems: 'center',
WebkitTapHighlightColor: 'transparent',
@@ -111,10 +116,10 @@ const LinkRoot = styled('a', {
}),
...(ownerState.variant
? {
- paddingBlock: 'min(0.15em, 4px)',
- paddingInline: '0.375em', // better than left, right because it also works with writing mode.
+ paddingBlock: 'min(0.1em, 4px)',
+ paddingInline: '0.25em', // better than left, right because it also works with writing mode.
...(!ownerState.nesting && {
- marginInline: '-0.375em',
+ marginInline: '-0.25em',
}),
}
: {
@@ -199,7 +204,7 @@ const Link = React.forwardRef(function Link(inProps, ref) {
disabled = false,
onBlur,
onFocus,
- level: levelProp = 'body1',
+ level: levelProp = 'body-md',
overlay = false,
underline = 'hover',
endDecorator,
@@ -312,7 +317,7 @@ Link.propTypes /* remove-proptypes */ = {
* @default 'primary'
*/
color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([
- PropTypes.oneOf(['danger', 'info', 'neutral', 'primary', 'success', 'warning']),
+ PropTypes.oneOf(['danger', 'neutral', 'primary', 'success', 'warning']),
PropTypes.string,
]),
/**
@@ -331,7 +336,7 @@ Link.propTypes /* remove-proptypes */ = {
endDecorator: PropTypes.node,
/**
* Applies the theme typography styles.
- * @default 'body1'
+ * @default 'body-md'
*/
level: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([
PropTypes.oneOf(['body1', 'body2', 'body3', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'inherit']),
diff --git a/packages/mui-joy/src/Link/LinkProps.ts b/packages/mui-joy/src/Link/LinkProps.ts
index acf997a88d4850..d877fa915efc22 100644
--- a/packages/mui-joy/src/Link/LinkProps.ts
+++ b/packages/mui-joy/src/Link/LinkProps.ts
@@ -67,7 +67,7 @@ export interface LinkTypeMap {
endDecorator?: React.ReactNode;
/**
* Applies the theme typography styles.
- * @default 'body1'
+ * @default 'body-md'
*/
level?: keyof TypographySystem | 'inherit';
/**
diff --git a/packages/mui-joy/src/Link/linkClasses.ts b/packages/mui-joy/src/Link/linkClasses.ts
index 374441c9f0f661..bf82288d8905b0 100644
--- a/packages/mui-joy/src/Link/linkClasses.ts
+++ b/packages/mui-joy/src/Link/linkClasses.ts
@@ -9,8 +9,6 @@ export interface LinkClasses {
colorNeutral: string;
/** Class name applied to the root element if `color="danger"`. */
colorDanger: string;
- /** Class name applied to the root element if `color="info"`. */
- colorInfo: string;
/** Class name applied to the root element if `color="success"`. */
colorSuccess: string;
/** Class name applied to the root element if `color="warning"`. */
@@ -43,16 +41,20 @@ export interface LinkClasses {
h3: string;
/** Class name applied to the root element if `level="h4"`. */
h4: string;
- /** Class name applied to the root element if `level="h5"`. */
- h5: string;
- /** Class name applied to the root element if `level="h6"`. */
- h6: string;
- /** Class name applied to the root element if `level="body1"`. */
- body1: string;
- /** Class name applied to the root element if `level="body2"`. */
- body2: string;
- /** Class name applied to the root element if `level="body3"`. */
- body3: string;
+ /** Class name applied to the root element if `level="title-lg"`. */
+ 'title-lg': string;
+ /** Class name applied to the root element if `level="title-md"`. */
+ 'title-md': string;
+ /** Class name applied to the root element if `level="title-sm"`. */
+ 'title-sm': string;
+ /** Class name applied to the root element if `level="body-lg"`. */
+ 'body-lg': string;
+ /** Class name applied to the root element if `level="body-md"`. */
+ 'body-md': string;
+ /** Class name applied to the root element if `level="body-sm"`. */
+ 'body-sm': string;
+ /** Class name applied to the root element if `level="body-xs"`. */
+ 'body-xs': string;
/** Class name applied to the startDecorator element */
startDecorator: string;
/** Class name applied to the endDecorator element */
@@ -72,7 +74,6 @@ const linkClasses: LinkClasses = generateUtilityClasses('MuiLink', [
'colorPrimary',
'colorNeutral',
'colorDanger',
- 'colorInfo',
'colorSuccess',
'colorWarning',
'colorContext',
@@ -88,11 +89,13 @@ const linkClasses: LinkClasses = generateUtilityClasses('MuiLink', [
'h2',
'h3',
'h4',
- 'h5',
- 'h6',
- 'body1',
- 'body2',
- 'body3',
+ 'title-lg',
+ 'title-md',
+ 'title-sm',
+ 'body-lg',
+ 'body-md',
+ 'body-sm',
+ 'body-xs',
'startDecorator',
'endDecorator',
]);
diff --git a/packages/mui-joy/src/List/List.tsx b/packages/mui-joy/src/List/List.tsx
index 8363384cd5c90c..88a4bd1967456f 100644
--- a/packages/mui-joy/src/List/List.tsx
+++ b/packages/mui-joy/src/List/List.tsx
@@ -6,6 +6,7 @@ import { unstable_capitalize as capitalize } from '@mui/utils';
import { OverridableComponent } from '@mui/types';
import composeClasses from '@mui/base/composeClasses';
import { styled, useThemeProps } from '../styles';
+import { resolveSxValue } from '../styles/styleUtils';
import { useColorInversion } from '../styles/ColorInversion';
import { ListProps, ListOwnerState, ListTypeMap } from './ListProps';
import { getListUtilityClass } from './listClasses';
@@ -34,6 +35,11 @@ const useUtilityClasses = (ownerState: ListOwnerState) => {
};
export const StyledList = styled('ul')<{ ownerState: ListOwnerState }>(({ theme, ownerState }) => {
+ const { p, padding, borderRadius } = resolveSxValue({ theme, ownerState }, [
+ 'p',
+ 'padding',
+ 'borderRadius',
+ ]);
function applySizeVars(size: ListProps['size']) {
if (size === 'sm') {
return {
@@ -41,9 +47,8 @@ export const StyledList = styled('ul')<{ ownerState: ListOwnerState }>(({ theme,
'--ListItem-minHeight': '2rem',
'--ListItem-paddingY': '0.25rem',
'--ListItem-paddingX': '0.5rem',
- '--ListItem-fontSize': theme.vars.fontSize.sm,
'--ListItemDecorator-size': ownerState.orientation === 'horizontal' ? '1.5rem' : '2rem',
- '--Icon-fontSize': '1.125rem',
+ '--Icon-fontSize': theme.vars.fontSize.lg,
};
}
if (size === 'md') {
@@ -52,9 +57,8 @@ export const StyledList = styled('ul')<{ ownerState: ListOwnerState }>(({ theme,
'--ListItem-minHeight': '2.5rem',
'--ListItem-paddingY': '0.375rem',
'--ListItem-paddingX': '0.75rem',
- '--ListItem-fontSize': theme.vars.fontSize.md,
'--ListItemDecorator-size': ownerState.orientation === 'horizontal' ? '1.75rem' : '2.5rem',
- '--Icon-fontSize': '1.25rem',
+ '--Icon-fontSize': theme.vars.fontSize.xl,
};
}
if (size === 'lg') {
@@ -63,9 +67,8 @@ export const StyledList = styled('ul')<{ ownerState: ListOwnerState }>(({ theme,
'--ListItem-minHeight': '3rem',
'--ListItem-paddingY': '0.5rem',
'--ListItem-paddingX': '1rem',
- '--ListItem-fontSize': theme.vars.fontSize.md,
'--ListItemDecorator-size': ownerState.orientation === 'horizontal' ? '2.25rem' : '3rem',
- '--Icon-fontSize': '1.5rem',
+ '--Icon-fontSize': theme.vars.fontSize.xl2,
};
}
return {};
@@ -91,7 +94,6 @@ export const StyledList = styled('ul')<{ ownerState: ListOwnerState }>(({ theme,
!ownerState.nesting && {
...applySizeVars(ownerState.size),
'--List-gap': '0px',
- '--ListItemDecorator-color': theme.vars.palette.text.tertiary,
'--List-nestedInsetStart': '0px',
'--ListItem-paddingLeft': 'var(--ListItem-paddingX)',
'--ListItem-paddingRight': 'var(--ListItem-paddingX)',
@@ -103,6 +105,7 @@ export const StyledList = styled('ul')<{ ownerState: ListOwnerState }>(({ theme,
'--ListItem-startActionTranslateX': 'calc(0.5 * var(--ListItem-paddingLeft))',
'--ListItem-endActionTranslateX': 'calc(-0.5 * var(--ListItem-paddingRight))',
margin: 'initial',
+ ...theme.typography[`body-${ownerState.size!}`],
// --List-padding is not declared to let list uses --ListDivider-gap by default.
...(ownerState.orientation === 'horizontal'
? {
@@ -135,6 +138,11 @@ export const StyledList = styled('ul')<{ ownerState: ListOwnerState }>(({ theme,
position: 'relative', // for sticky ListItem
...theme.variants[ownerState.variant!]?.[ownerState.color!],
'--unstable_List-borderWidth': 'var(--variant-borderWidth, 0px)', // For children to lookup the List's border width.
+ ...(borderRadius !== undefined && {
+ '--List-radius': borderRadius,
+ }),
+ ...(p !== undefined && { '--List-padding': p }),
+ ...(padding !== undefined && { '--List-padding': padding }),
},
];
});
@@ -251,7 +259,7 @@ List.propTypes /* remove-proptypes */ = {
* @default 'neutral'
*/
color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([
- PropTypes.oneOf(['danger', 'info', 'neutral', 'primary', 'success', 'warning']),
+ PropTypes.oneOf(['danger', 'neutral', 'primary', 'success', 'warning']),
PropTypes.string,
]),
/**
diff --git a/packages/mui-joy/src/List/listClasses.ts b/packages/mui-joy/src/List/listClasses.ts
index 6647107241ac20..0484ece4208889 100644
--- a/packages/mui-joy/src/List/listClasses.ts
+++ b/packages/mui-joy/src/List/listClasses.ts
@@ -19,8 +19,6 @@ export interface ListClasses {
colorNeutral: string;
/** Classname applied to the root element if `color="danger"`. */
colorDanger: string;
- /** Classname applied to the root element if `color="info"`. */
- colorInfo: string;
/** Classname applied to the root element if `color="success"`. */
colorSuccess: string;
/** Classname applied to the root element if `color="warning"`. */
@@ -57,7 +55,6 @@ const listClasses: ListClasses = generateUtilityClasses('MuiList', [
'colorPrimary',
'colorNeutral',
'colorDanger',
- 'colorInfo',
'colorSuccess',
'colorWarning',
'colorContext',
diff --git a/packages/mui-joy/src/ListItem/ListItem.tsx b/packages/mui-joy/src/ListItem/ListItem.tsx
index 203fda83e63274..b9d95ea95e507d 100644
--- a/packages/mui-joy/src/ListItem/ListItem.tsx
+++ b/packages/mui-joy/src/ListItem/ListItem.tsx
@@ -97,14 +97,12 @@ const ListItemRoot = styled('li', {
marginBlockStart: 'var(--List-gap)',
}),
minBlockSize: 'var(--ListItem-minHeight)',
- fontSize: 'var(--ListItem-fontSize)',
- fontFamily: theme.vars.fontFamily.body,
...(ownerState.sticky && {
// sticky in list item can be found in grouped options
position: 'sticky',
top: 'var(--ListItem-stickyTop, 0px)', // integration with Menu and Select.
zIndex: 1,
- background: 'var(--ListItem-stickyBackground)',
+ background: `var(--ListItem-stickyBackground, ${theme.vars.palette.background.body})`,
}),
},
theme.variants[ownerState.variant!]?.[ownerState.color!],
@@ -278,7 +276,7 @@ ListItem.propTypes /* remove-proptypes */ = {
* @default 'neutral'
*/
color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([
- PropTypes.oneOf(['danger', 'info', 'neutral', 'primary', 'success', 'warning']),
+ PropTypes.oneOf(['danger', 'neutral', 'primary', 'success', 'warning']),
PropTypes.string,
]),
/**
diff --git a/packages/mui-joy/src/ListItem/listItemClasses.ts b/packages/mui-joy/src/ListItem/listItemClasses.ts
index a9f36a902b47a5..371e0b1a71b47e 100644
--- a/packages/mui-joy/src/ListItem/listItemClasses.ts
+++ b/packages/mui-joy/src/ListItem/listItemClasses.ts
@@ -19,8 +19,6 @@ export interface ListItemClasses {
colorNeutral: string;
/** Class name applied to the root element if `color="danger"`. */
colorDanger: string;
- /** Class name applied to the root element if `color="info"`. */
- colorInfo: string;
/** Class name applied to the root element if `color="success"`. */
colorSuccess: string;
/** Class name applied to the root element if `color="warning"`. */
@@ -53,7 +51,6 @@ const listItemClasses: ListItemClasses = generateUtilityClasses('MuiListItem', [
'colorPrimary',
'colorNeutral',
'colorDanger',
- 'colorInfo',
'colorSuccess',
'colorWarning',
'colorContext',
diff --git a/packages/mui-joy/src/ListItemButton/ListItemButton.tsx b/packages/mui-joy/src/ListItemButton/ListItemButton.tsx
index c1977eac09fbd9..fd8b4faa0a43e9 100644
--- a/packages/mui-joy/src/ListItemButton/ListItemButton.tsx
+++ b/packages/mui-joy/src/ListItemButton/ListItemButton.tsx
@@ -41,77 +41,80 @@ const useUtilityClasses = (ownerState: ListItemButtonOwnerState) => {
};
export const StyledListItemButton = styled('div')<{ ownerState: ListItemButtonOwnerState }>(
- ({ theme, ownerState }) => [
- {
- ...(ownerState.selected && {
- '--ListItemDecorator-color': 'initial',
- }),
- ...(ownerState.disabled && {
- '--ListItemDecorator-color':
- theme.variants?.[`${ownerState.variant!}Disabled`]?.[ownerState.color!]?.color,
- }),
- WebkitTapHighlightColor: 'transparent',
- boxSizing: 'border-box',
- position: 'relative',
- display: 'flex',
- flexDirection: 'row',
- alignItems: 'center',
- alignSelf: 'stretch', // always stretch itself to fill the parent (List|ListItem)
- ...(ownerState.orientation === 'vertical' && {
- flexDirection: 'column',
- justifyContent: 'center',
- }),
- textAlign: 'initial',
- textDecoration: 'initial', // reset native anchor tag
- backgroundColor: 'initial', // reset button background
- cursor: 'pointer',
- // In some cases, ListItemButton is a child of ListItem so the margin needs to be controlled by the ListItem. The value is negative to account for the ListItem's padding
- marginInline: 'var(--ListItemButton-marginInline)',
- marginBlock: 'var(--ListItemButton-marginBlock)',
- ...(ownerState['data-first-child'] === undefined && {
- marginInlineStart: ownerState.row ? 'var(--List-gap)' : undefined,
- marginBlockStart: ownerState.row ? undefined : 'var(--List-gap)',
- }),
- // account for the border width, so that all of the ListItemButtons content aligned horizontally
- paddingBlock: 'calc(var(--ListItem-paddingY) - var(--variant-borderWidth, 0px))',
- // account for the border width, so that all of the ListItemButtons content aligned vertically
- paddingInlineStart:
- 'calc(var(--ListItem-paddingLeft) + var(--ListItem-startActionWidth, var(--unstable_startActionWidth, 0px)))', // --internal variable makes it possible to customize the actionWidth from the top List
- paddingInlineEnd:
- 'calc(var(--ListItem-paddingRight) + var(--ListItem-endActionWidth, var(--unstable_endActionWidth, 0px)))', // --internal variable makes it possible to customize the actionWidth from the top List
- minBlockSize: 'var(--ListItem-minHeight)',
- border: 'none',
- borderRadius: 'var(--ListItem-radius)',
- flexGrow: ownerState.row ? 0 : 1,
- flexBasis: ownerState.row ? 'auto' : '0%', // for long text (in vertical), displays in multiple lines.
- flexShrink: 0,
- minInlineSize: 0,
- fontSize: 'var(--ListItem-fontSize)',
- fontFamily: theme.vars.fontFamily.body,
- ...(ownerState.selected && {
- fontWeight: theme.vars.fontWeight.md,
- }),
- [theme.focus.selector]: theme.focus.default,
+ ({ theme, ownerState }) => ({
+ '--Icon-margin': 'initial', // reset the icon's margin.
+ '--Icon-color':
+ ownerState.color !== 'neutral' || ownerState.variant === 'solid'
+ ? 'currentColor'
+ : theme.vars.palette.text.icon,
+ WebkitTapHighlightColor: 'transparent',
+ boxSizing: 'border-box',
+ position: 'relative',
+ display: 'flex',
+ flexDirection: 'row',
+ alignItems: 'center',
+ alignSelf: 'stretch', // always stretch itself to fill the parent (List|ListItem)
+ ...(ownerState.orientation === 'vertical' && {
+ flexDirection: 'column',
+ justifyContent: 'center',
+ }),
+ textAlign: 'initial',
+ textDecoration: 'initial', // reset native anchor tag
+ backgroundColor: 'initial', // reset button background
+ cursor: 'pointer',
+ // In some cases, ListItemButton is a child of ListItem so the margin needs to be controlled by the ListItem. The value is negative to account for the ListItem's padding
+ marginInline: 'var(--ListItemButton-marginInline)',
+ marginBlock: 'var(--ListItemButton-marginBlock)',
+ ...(ownerState['data-first-child'] === undefined && {
+ marginInlineStart: ownerState.row ? 'var(--List-gap)' : undefined,
+ marginBlockStart: ownerState.row ? undefined : 'var(--List-gap)',
+ }),
+ // account for the border width, so that all of the ListItemButtons content aligned horizontally
+ paddingBlock: 'calc(var(--ListItem-paddingY) - var(--variant-borderWidth, 0px))',
+ // account for the border width, so that all of the ListItemButtons content aligned vertically
+ paddingInlineStart:
+ 'calc(var(--ListItem-paddingLeft) + var(--ListItem-startActionWidth, var(--unstable_startActionWidth, 0px)))', // --internal variable makes it possible to customize the actionWidth from the top List
+ paddingInlineEnd:
+ 'calc(var(--ListItem-paddingRight) + var(--ListItem-endActionWidth, var(--unstable_endActionWidth, 0px)))', // --internal variable makes it possible to customize the actionWidth from the top List
+ minBlockSize: 'var(--ListItem-minHeight)',
+ border: '1px solid transparent', // use `transparent` as a placeholder to prevent the button from jumping when switching to `outlined` variant
+ borderRadius: 'var(--ListItem-radius)',
+ flexGrow: ownerState.row ? 0 : 1,
+ flexBasis: ownerState.row ? 'auto' : '0%', // for long text (in vertical), displays in multiple lines.
+ flexShrink: 0,
+ fontSize: 'inherit', // prevent user agent style when component="button"
+ lineHeight: 'inherit', // prevent user agent style when component="button"
+ minInlineSize: 0,
+ [theme.focus.selector]: {
+ ...theme.focus.default,
+ zIndex: 1, // to be above of the next element. For example, the first Tab item should be above the second so that the outline is above the second Tab.
},
- {
- ...theme.variants[ownerState.variant!]?.[ownerState.color!],
- ...(!ownerState.selected && {
- '&:hover': theme.variants[`${ownerState.variant!}Hover`]?.[ownerState.color!],
- '&:active': theme.variants[`${ownerState.variant!}Active`]?.[ownerState.color!],
- }),
+ ...theme.variants[ownerState.variant!]?.[ownerState.color!],
+ [`&.${listItemButtonClasses.selected}`]: {
+ ...theme.variants[`${ownerState.variant!}Active`]?.[ownerState.color!],
+ '--Icon-color': 'currentColor',
+ },
+ [`&:not(.${listItemButtonClasses.selected}, [aria-selected="true"])`]: {
+ '&:hover': theme.variants[`${ownerState.variant!}Hover`]?.[ownerState.color!],
+ '&:active': theme.variants[`${ownerState.variant!}Active`]?.[ownerState.color!],
},
- {
- [`&.${listItemButtonClasses.disabled}`]:
- theme.variants[`${ownerState.variant!}Disabled`]?.[ownerState.color!],
+ [`&.${listItemButtonClasses.disabled}`]: {
+ ...theme.variants[`${ownerState.variant!}Disabled`]?.[ownerState.color!],
},
- ],
+ }),
);
const ListItemButtonRoot = styled(StyledListItemButton, {
name: 'JoyListItemButton',
slot: 'Root',
overridesResolver: (props, styles) => styles.root,
-})({});
+})(({ ownerState, theme }) => ({
+ ...(!ownerState.row && {
+ [`&.${listItemButtonClasses.selected}`]: {
+ fontWeight: theme.vars.fontWeight.md,
+ },
+ }),
+}));
/**
*
* Demos:
@@ -138,7 +141,7 @@ const ListItemButton = React.forwardRef(function ListItemButton(inProps, ref) {
orientation = 'horizontal',
role,
selected = false,
- color: colorProp = selected ? 'primary' : 'neutral',
+ color: colorProp = 'neutral',
variant = 'plain',
slots = {},
slotProps = {},
@@ -231,10 +234,10 @@ ListItemButton.propTypes /* remove-proptypes */ = {
className: PropTypes.string,
/**
* The color of the component. It supports those theme colors that make sense for this component.
- * @default selected ? 'primary' : 'neutral'
+ * @default 'neutral'
*/
color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([
- PropTypes.oneOf(['danger', 'info', 'neutral', 'primary', 'success', 'warning']),
+ PropTypes.oneOf(['danger', 'neutral', 'primary', 'success', 'warning']),
PropTypes.string,
]),
/**
diff --git a/packages/mui-joy/src/ListItemButton/ListItemButtonProps.ts b/packages/mui-joy/src/ListItemButton/ListItemButtonProps.ts
index ca3ae4af511f4f..54402f51c8991d 100644
--- a/packages/mui-joy/src/ListItemButton/ListItemButtonProps.ts
+++ b/packages/mui-joy/src/ListItemButton/ListItemButtonProps.ts
@@ -44,7 +44,7 @@ export interface ListItemButtonTypeMap
;
/**
diff --git a/packages/mui-joy/src/ListItemButton/listItemButtonClasses.ts b/packages/mui-joy/src/ListItemButton/listItemButtonClasses.ts
index 7567816cad1b7a..3504d773bf5a42 100644
--- a/packages/mui-joy/src/ListItemButton/listItemButtonClasses.ts
+++ b/packages/mui-joy/src/ListItemButton/listItemButtonClasses.ts
@@ -13,8 +13,6 @@ export interface ListItemButtonClasses {
colorNeutral: string;
/** Class name applied to the root element if `color="danger"`. */
colorDanger: string;
- /** Class name applied to the root element if `color="info"`. */
- colorInfo: string;
/** Class name applied to the root element if `color="success"`. */
colorSuccess: string;
/** Class name applied to the root element if `color="warning"`. */
@@ -50,7 +48,6 @@ const listItemButtonClasses: ListItemButtonClasses = generateUtilityClasses('Mui
'colorPrimary',
'colorNeutral',
'colorDanger',
- 'colorInfo',
'colorSuccess',
'colorWarning',
'colorContext',
diff --git a/packages/mui-joy/src/ListItemDecorator/ListItemDecorator.tsx b/packages/mui-joy/src/ListItemDecorator/ListItemDecorator.tsx
index 8ee585c68c3297..7a11361eec5d6c 100644
--- a/packages/mui-joy/src/ListItemDecorator/ListItemDecorator.tsx
+++ b/packages/mui-joy/src/ListItemDecorator/ListItemDecorator.tsx
@@ -25,11 +25,12 @@ const ListItemDecoratorRoot = styled('span', {
})<{ ownerState: ListItemDecoratorOwnerState }>(({ ownerState }) => ({
boxSizing: 'border-box',
display: 'inline-flex',
- color: `var(--ListItemDecorator-color)`,
+ alignItems: `var(--unstable_ListItemDecorator-alignItems, ${
+ ownerState.parentOrientation === 'horizontal' ? 'center' : 'initial'
+ })`,
...(ownerState.parentOrientation === 'horizontal'
? {
minInlineSize: 'var(--ListItemDecorator-size)',
- alignItems: 'center',
}
: {
minBlockSize: 'var(--ListItemDecorator-size)',
diff --git a/packages/mui-joy/src/ListSubheader/ListSubheader.tsx b/packages/mui-joy/src/ListSubheader/ListSubheader.tsx
index ae18eb49638931..d20f71e0ce5e11 100644
--- a/packages/mui-joy/src/ListSubheader/ListSubheader.tsx
+++ b/packages/mui-joy/src/ListSubheader/ListSubheader.tsx
@@ -39,11 +39,10 @@ const ListSubheaderRoot = styled('div', {
paddingInlineStart: 'var(--ListItem-paddingLeft)',
paddingInlineEnd: 'var(--ListItem-paddingRight)',
minBlockSize: 'var(--ListItem-minHeight)',
- fontSize: 'calc(var(--ListItem-fontSize) * 0.75)',
- fontWeight: theme.vars.fontWeight.lg,
- fontFamily: theme.vars.fontFamily.body,
- letterSpacing: theme.vars.letterSpacing.md,
+ ...theme.typography['body-xs'],
+ fontSize: 'max(0.75em, 0.625rem)',
textTransform: 'uppercase',
+ letterSpacing: '0.1em',
...(ownerState.sticky && {
position: 'sticky',
top: 'var(--ListItem-stickyTop, 0px)', // integration with Menu and Select.
@@ -138,7 +137,7 @@ ListSubheader.propTypes /* remove-proptypes */ = {
* The color of the component. It supports those theme colors that make sense for this component.
*/
color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([
- PropTypes.oneOf(['danger', 'info', 'neutral', 'primary', 'success', 'warning']),
+ PropTypes.oneOf(['danger', 'neutral', 'primary', 'success', 'warning']),
PropTypes.string,
]),
/**
diff --git a/packages/mui-joy/src/ListSubheader/listSubheaderClasses.ts b/packages/mui-joy/src/ListSubheader/listSubheaderClasses.ts
index 9b58eb5116dfe9..26ce5bade385a1 100644
--- a/packages/mui-joy/src/ListSubheader/listSubheaderClasses.ts
+++ b/packages/mui-joy/src/ListSubheader/listSubheaderClasses.ts
@@ -11,8 +11,6 @@ export interface ListSubheaderClasses {
colorNeutral: string;
/** Class name applied to the root element if `color="danger"`. */
colorDanger: string;
- /** Class name applied to the root element if `color="info"`. */
- colorInfo: string;
/** Class name applied to the root element if `color="success"`. */
colorSuccess: string;
/** Class name applied to the root element if `color="warning"`. */
@@ -41,7 +39,6 @@ const listSubheaderClasses: ListSubheaderClasses = generateUtilityClasses('MuiLi
'colorPrimary',
'colorNeutral',
'colorDanger',
- 'colorInfo',
'colorSuccess',
'colorWarning',
'colorContext',
diff --git a/packages/mui-joy/src/Menu/Menu.tsx b/packages/mui-joy/src/Menu/Menu.tsx
index 00d106857aa962..37c6120df1c5d2 100644
--- a/packages/mui-joy/src/Menu/Menu.tsx
+++ b/packages/mui-joy/src/Menu/Menu.tsx
@@ -12,6 +12,7 @@ import { StyledList } from '../List/List';
import ListProvider, { scopedVariables } from '../List/ListProvider';
import GroupListContext from '../List/GroupListContext';
import { styled, useThemeProps } from '../styles';
+import { VariantColorProvider } from '../styles/variantColorInheritance';
import ColorInversion, {
ColorInversionProvider,
useColorInversion,
@@ -45,13 +46,13 @@ const MenuRoot = styled(StyledList, {
return [
{
'--focus-outline-offset': `calc(${theme.vars.focus.thickness} * -1)`, // to prevent the focus outline from being cut by overflow
- '--List-radius': theme.vars.radius.sm,
'--ListItem-stickyBackground':
variantStyle?.backgroundColor ||
variantStyle?.background ||
theme.vars.palette.background.popup,
'--ListItem-stickyTop': 'calc(var(--List-padding, var(--ListDivider-gap)) * -1)', // negative amount of the List's padding block
...scopedVariables,
+ borderRadius: `var(--List-radius, ${theme.vars.radius.sm})`,
boxShadow: theme.shadow.md,
overflow: 'auto',
// `unstable_popup-zIndex` is a private variable that lets other component, e.g. Modal, to override the z-index so that the listbox can be displayed above the Modal.
@@ -164,9 +165,12 @@ const Menu = React.forwardRef(function Menu(inProps, ref: React.ForwardedRef
-
- {children}
-
+ {/* If `invertedColors` is true, let the children use their default variant */}
+
+
+ {children}
+
+
);
@@ -214,7 +218,7 @@ Menu.propTypes /* remove-proptypes */ = {
* The color of the component. It supports those theme colors that make sense for this component.
* @default 'neutral'
*/
- color: PropTypes.oneOf(['danger', 'info', 'neutral', 'primary', 'success', 'warning']),
+ color: PropTypes.oneOf(['danger', 'neutral', 'primary', 'success', 'warning']),
/**
* The component used for the root node.
* Either a string to use a HTML element or a component.
diff --git a/packages/mui-joy/src/Menu/menuClasses.ts b/packages/mui-joy/src/Menu/menuClasses.ts
index c0b40a8d32169a..c6158244174b05 100644
--- a/packages/mui-joy/src/Menu/menuClasses.ts
+++ b/packages/mui-joy/src/Menu/menuClasses.ts
@@ -13,8 +13,6 @@ export interface MenuClasses {
colorNeutral: string;
/** Classname applied to the root element if `color="danger"`. */
colorDanger: string;
- /** Classname applied to the root element if `color="info"`. */
- colorInfo: string;
/** Classname applied to the root element if `color="success"`. */
colorSuccess: string;
/** Classname applied to the root element if `color="warning"`. */
@@ -50,7 +48,6 @@ const menuClasses: MenuClasses = generateUtilityClasses('MuiMenu', [
'colorPrimary',
'colorNeutral',
'colorDanger',
- 'colorInfo',
'colorSuccess',
'colorWarning',
'colorContext',
diff --git a/packages/mui-joy/src/MenuItem/MenuItem.tsx b/packages/mui-joy/src/MenuItem/MenuItem.tsx
index 4d01c4e6dfb286..2037fc35b75a6b 100644
--- a/packages/mui-joy/src/MenuItem/MenuItem.tsx
+++ b/packages/mui-joy/src/MenuItem/MenuItem.tsx
@@ -7,6 +7,7 @@ import useMenuItem from '@mui/base/useMenuItem';
import { StyledListItemButton } from '../ListItemButton/ListItemButton';
import { styled, useThemeProps } from '../styles';
import { useColorInversion } from '../styles/ColorInversion';
+import { useVariantColor } from '../styles/variantColorInheritance';
import { getMenuItemUtilityClass } from './menuItemClasses';
import { MenuItemOwnerState, ExtendMenuItem, MenuItemTypeMap } from './MenuItemProps';
import RowListContext from '../List/RowListContext';
@@ -60,15 +61,19 @@ const MenuItem = React.forwardRef(function MenuItem(inProps, ref) {
disabled: disabledProp = false,
component = 'li',
selected = false,
- color: colorProp = selected ? 'primary' : 'neutral',
+ color: colorProp = 'neutral',
orientation = 'horizontal',
- variant = 'plain',
+ variant: variantProp = 'plain',
slots = {},
slotProps = {},
...other
} = props;
+ const { variant = variantProp, color: inheritedColor = colorProp } = useVariantColor(
+ inProps.variant,
+ inProps.color,
+ );
const { getColor } = useColorInversion(variant);
- const color = getColor(inProps.color, colorProp);
+ const color = getColor(inProps.color, inheritedColor);
const { getRootProps, disabled, focusVisible } = useMenuItem({
disabled: disabledProp,
@@ -117,10 +122,10 @@ MenuItem.propTypes /* remove-proptypes */ = {
children: PropTypes.node,
/**
* The color of the component. It supports those theme colors that make sense for this component.
- * @default selected ? 'primary' : 'neutral'
+ * @default 'neutral'
*/
color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([
- PropTypes.oneOf(['danger', 'info', 'neutral', 'primary', 'success', 'warning']),
+ PropTypes.oneOf(['danger', 'neutral', 'primary', 'success', 'warning']),
PropTypes.string,
]),
/**
diff --git a/packages/mui-joy/src/MenuItem/menuItemClasses.ts b/packages/mui-joy/src/MenuItem/menuItemClasses.ts
index b920b86fcbb7ae..a8ef6afc3864a9 100644
--- a/packages/mui-joy/src/MenuItem/menuItemClasses.ts
+++ b/packages/mui-joy/src/MenuItem/menuItemClasses.ts
@@ -15,8 +15,6 @@ export interface MenuItemClasses {
colorNeutral: string;
/** Class name applied to the root element if `color="danger"`. */
colorDanger: string;
- /** Class name applied to the root element if `color="info"`. */
- colorInfo: string;
/** Class name applied to the root element if `color="success"`. */
colorSuccess: string;
/** Class name applied to the root element if `color="warning"`. */
@@ -47,7 +45,6 @@ const menuItemClasses: MenuItemClasses = generateUtilityClasses('MuiMenuItem', [
'colorPrimary',
'colorNeutral',
'colorDanger',
- 'colorInfo',
'colorSuccess',
'colorWarning',
'colorContext',
diff --git a/packages/mui-joy/src/MenuList/MenuList.tsx b/packages/mui-joy/src/MenuList/MenuList.tsx
index 3cb0e527d9e571..36962567082a9a 100644
--- a/packages/mui-joy/src/MenuList/MenuList.tsx
+++ b/packages/mui-joy/src/MenuList/MenuList.tsx
@@ -37,13 +37,13 @@ const MenuListRoot = styled(StyledList, {
const variantStyle = theme.variants[ownerState.variant!]?.[ownerState.color!];
return {
'--focus-outline-offset': `calc(${theme.vars.focus.thickness} * -1)`, // to prevent the focus outline from being cut by overflow
- '--List-radius': theme.vars.radius.sm,
'--ListItem-stickyBackground':
variantStyle?.backgroundColor ||
variantStyle?.background ||
theme.vars.palette.background.surface,
'--ListItem-stickyTop': 'calc(var(--List-padding, var(--ListDivider-gap)) * -1)', // negative amount of the List's padding block
...scopedVariables,
+ borderRadius: `var(--List-radius, ${theme.vars.radius.sm})`,
overflow: 'auto',
...(!variantStyle?.backgroundColor && {
backgroundColor: theme.vars.palette.background.surface,
@@ -152,7 +152,7 @@ MenuList.propTypes /* remove-proptypes */ = {
* @default 'neutral'
*/
color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([
- PropTypes.oneOf(['danger', 'info', 'neutral', 'primary', 'success', 'warning']),
+ PropTypes.oneOf(['danger', 'neutral', 'primary', 'success', 'warning']),
PropTypes.string,
]),
/**
diff --git a/packages/mui-joy/src/MenuList/menuListClasses.ts b/packages/mui-joy/src/MenuList/menuListClasses.ts
index 693c45e3a9a82f..a7047f7f45322a 100644
--- a/packages/mui-joy/src/MenuList/menuListClasses.ts
+++ b/packages/mui-joy/src/MenuList/menuListClasses.ts
@@ -15,8 +15,6 @@ export interface MenuListClasses {
colorNeutral: string;
/** Classname applied to the root element if `color="danger"`. */
colorDanger: string;
- /** Classname applied to the root element if `color="info"`. */
- colorInfo: string;
/** Classname applied to the root element if `color="success"`. */
colorSuccess: string;
/** Classname applied to the root element if `color="warning"`. */
@@ -48,7 +46,6 @@ const menuClasses: MenuListClasses = generateUtilityClasses('MuiMenuList', [
'colorPrimary',
'colorNeutral',
'colorDanger',
- 'colorInfo',
'colorSuccess',
'colorWarning',
'colorContext',
diff --git a/packages/mui-joy/src/ModalClose/ModalClose.test.tsx b/packages/mui-joy/src/ModalClose/ModalClose.test.tsx
index 02e4b5f566bffc..48f9a37da4c332 100644
--- a/packages/mui-joy/src/ModalClose/ModalClose.test.tsx
+++ b/packages/mui-joy/src/ModalClose/ModalClose.test.tsx
@@ -58,7 +58,7 @@ describe(' ', () => {
expect(getByRole('button')).to.have.class(classes.colorNeutral);
});
- (['primary', 'success', 'info', 'danger', 'neutral', 'warning'] as const).forEach((color) => {
+ (['primary', 'success', 'danger', 'neutral', 'warning'] as const).forEach((color) => {
it(`should render ${color}`, () => {
const { getByRole } = render(Hello World );
diff --git a/packages/mui-joy/src/ModalClose/ModalClose.tsx b/packages/mui-joy/src/ModalClose/ModalClose.tsx
index 71938f8862d81f..e6d66bd31f96ff 100644
--- a/packages/mui-joy/src/ModalClose/ModalClose.tsx
+++ b/packages/mui-joy/src/ModalClose/ModalClose.tsx
@@ -155,7 +155,7 @@ ModalClose.propTypes /* remove-proptypes */ = {
* @default 'neutral'
*/
color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([
- PropTypes.oneOf(['danger', 'info', 'neutral', 'primary', 'success', 'warning']),
+ PropTypes.oneOf(['danger', 'neutral', 'primary', 'success', 'warning']),
PropTypes.string,
]),
/**
diff --git a/packages/mui-joy/src/ModalClose/modalCloseClasses.ts b/packages/mui-joy/src/ModalClose/modalCloseClasses.ts
index a56bb5e62d5be2..f8330e5c72a944 100644
--- a/packages/mui-joy/src/ModalClose/modalCloseClasses.ts
+++ b/packages/mui-joy/src/ModalClose/modalCloseClasses.ts
@@ -9,8 +9,6 @@ export interface ModalCloseClasses {
colorNeutral: string;
/** Class name applied to the root element if `color="danger"`. */
colorDanger: string;
- /** Class name applied to the root element if `color="info"`. */
- colorInfo: string;
/** Class name applied to the root element if `color="success"`. */
colorSuccess: string;
/** Class name applied to the root element if `color="warning"`. */
@@ -44,7 +42,6 @@ const modalCloseClasses: ModalCloseClasses = generateUtilityClasses('MuiModalClo
'colorPrimary',
'colorNeutral',
'colorDanger',
- 'colorInfo',
'colorSuccess',
'colorWarning',
'colorContext',
diff --git a/packages/mui-joy/src/ModalDialog/ModalDialog.test.tsx b/packages/mui-joy/src/ModalDialog/ModalDialog.test.tsx
index a180bca3263716..8f662d9a776760 100644
--- a/packages/mui-joy/src/ModalDialog/ModalDialog.test.tsx
+++ b/packages/mui-joy/src/ModalDialog/ModalDialog.test.tsx
@@ -51,7 +51,7 @@ describe(' ', () => {
expect(getByRole('dialog')).to.have.class(classes.colorNeutral);
});
- (['primary', 'success', 'info', 'danger', 'neutral', 'warning'] as const).forEach((color) => {
+ (['primary', 'success', 'danger', 'neutral', 'warning'] as const).forEach((color) => {
it(`should render ${color}`, () => {
const { getByRole } = render( );
diff --git a/packages/mui-joy/src/ModalDialog/ModalDialog.tsx b/packages/mui-joy/src/ModalDialog/ModalDialog.tsx
index 5111d07a2ae83c..d5fb6472ebeacd 100644
--- a/packages/mui-joy/src/ModalDialog/ModalDialog.tsx
+++ b/packages/mui-joy/src/ModalDialog/ModalDialog.tsx
@@ -49,7 +49,6 @@ const ModalDialogRoot = styled(SheetRoot, {
'--ModalDialog-titleOffset': theme.spacing(0.25),
'--ModalDialog-descriptionOffset': theme.spacing(0.25),
'--ModalClose-inset': theme.spacing(1.25),
- fontSize: theme.vars.fontSize.sm,
}),
...(ownerState.size === 'md' && {
'--ModalDialog-padding': theme.spacing(2.5),
@@ -58,16 +57,14 @@ const ModalDialogRoot = styled(SheetRoot, {
'--ModalDialog-titleOffset': theme.spacing(0.25),
'--ModalDialog-descriptionOffset': theme.spacing(0.75),
'--ModalClose-inset': theme.spacing(1.5),
- fontSize: theme.vars.fontSize.md,
}),
...(ownerState.size === 'lg' && {
'--ModalDialog-padding': theme.spacing(3),
'--ModalDialog-radius': theme.vars.radius.md,
'--ModalDialog-gap': theme.spacing(2),
- '--ModalDialog-titleOffset': theme.spacing(0.75),
+ '--ModalDialog-titleOffset': theme.spacing(0.5),
'--ModalDialog-descriptionOffset': theme.spacing(1),
'--ModalClose-inset': theme.spacing(1.5),
- fontSize: theme.vars.fontSize.lg,
}),
boxSizing: 'border-box',
boxShadow: theme.shadow.md,
@@ -214,7 +211,7 @@ ModalDialog.propTypes /* remove-proptypes */ = {
* @default 'neutral'
*/
color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([
- PropTypes.oneOf(['danger', 'info', 'neutral', 'primary', 'success', 'warning']),
+ PropTypes.oneOf(['danger', 'neutral', 'primary', 'success', 'warning']),
PropTypes.string,
]),
/**
diff --git a/packages/mui-joy/src/ModalDialog/modalDialogClasses.ts b/packages/mui-joy/src/ModalDialog/modalDialogClasses.ts
index e66cb64db6c5d3..efaf0ed0e07d00 100644
--- a/packages/mui-joy/src/ModalDialog/modalDialogClasses.ts
+++ b/packages/mui-joy/src/ModalDialog/modalDialogClasses.ts
@@ -9,8 +9,6 @@ export interface ModalDialogClasses {
colorNeutral: string;
/** Class name applied to the root element if `color="danger"`. */
colorDanger: string;
- /** Class name applied to the root element if `color="info"`. */
- colorInfo: string;
/** Class name applied to the root element if `color="success"`. */
colorSuccess: string;
/** Class name applied to the root element if `color="warning"`. */
@@ -48,7 +46,6 @@ const modalDialogClasses: ModalDialogClasses = generateUtilityClasses('MuiModalD
'colorPrimary',
'colorNeutral',
'colorDanger',
- 'colorInfo',
'colorSuccess',
'colorWarning',
'colorContext',
diff --git a/packages/mui-joy/src/Option/Option.tsx b/packages/mui-joy/src/Option/Option.tsx
index f02b596f99ebab..af8d6da9c9ffb2 100644
--- a/packages/mui-joy/src/Option/Option.tsx
+++ b/packages/mui-joy/src/Option/Option.tsx
@@ -8,6 +8,7 @@ import useSlot from '../utils/useSlot';
import { StyledListItemButton } from '../ListItemButton/ListItemButton';
import { styled, useThemeProps } from '../styles';
import { useColorInversion } from '../styles/ColorInversion';
+import { useVariantColor } from '../styles/variantColorInheritance';
import { OptionOwnerState, ExtendOption, OptionTypeMap } from './OptionProps';
import optionClasses, { getOptionUtilityClass } from './optionClasses';
import RowListContext from '../List/RowListContext';
@@ -29,7 +30,7 @@ const OptionRoot = styled(StyledListItemButton as unknown as 'li', {
})<{ ownerState: OptionOwnerState }>(({ theme, ownerState }) => {
const variantStyle = theme.variants[`${ownerState.variant!}Hover`]?.[ownerState.color!];
return {
- [`&.${optionClasses.highlighted}`]: {
+ [`&.${optionClasses.highlighted}:not([aria-selected="true"])`]: {
backgroundColor: variantStyle?.backgroundColor,
},
};
@@ -56,7 +57,7 @@ const Option = React.forwardRef(function Option(inProps, ref: React.ForwardedRef
disabled = false,
value,
label,
- variant = 'plain',
+ variant: variantProp = 'plain',
color: colorProp = 'neutral',
slots = {},
slotProps = {},
@@ -64,6 +65,10 @@ const Option = React.forwardRef(function Option(inProps, ref: React.ForwardedRef
} = props;
const row = React.useContext(RowListContext);
+ const { variant = variantProp, color: inheritedColor = colorProp } = useVariantColor(
+ inProps.variant,
+ inProps.color,
+ );
const optionRef = React.useRef(null);
const combinedRef = useForkRef(optionRef, ref);
@@ -78,7 +83,7 @@ const Option = React.forwardRef(function Option(inProps, ref: React.ForwardedRef
});
const { getColor } = useColorInversion(variant);
- const color = getColor(inProps.color, selected ? 'primary' : colorProp);
+ const color = getColor(inProps.color, inheritedColor);
const ownerState: OptionOwnerState = {
...props,
@@ -121,7 +126,7 @@ Option.propTypes /* remove-proptypes */ = {
* @default 'neutral'
*/
color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([
- PropTypes.oneOf(['danger', 'info', 'neutral', 'primary', 'success', 'warning']),
+ PropTypes.oneOf(['danger', 'neutral', 'primary', 'success', 'warning']),
PropTypes.string,
]),
/**
diff --git a/packages/mui-joy/src/Option/optionClasses.ts b/packages/mui-joy/src/Option/optionClasses.ts
index 8e8c2975831d86..91aba707f53989 100644
--- a/packages/mui-joy/src/Option/optionClasses.ts
+++ b/packages/mui-joy/src/Option/optionClasses.ts
@@ -9,8 +9,6 @@ export interface OptionClasses {
colorNeutral: string;
/** Class name applied to the root element if `color="danger"`. */
colorDanger: string;
- /** Class name applied to the root element if `color="info"`. */
- colorInfo: string;
/** Class name applied to the root element if `color="success"`. */
colorSuccess: string;
/** Class name applied to the root element if `color="warning"`. */
@@ -44,7 +42,6 @@ const optionClasses: OptionClasses = generateUtilityClasses('MuiOption', [
'colorPrimary',
'colorNeutral',
'colorDanger',
- 'colorInfo',
'colorSuccess',
'colorWarning',
'colorContext',
diff --git a/packages/mui-joy/src/Radio/Radio.spec.tsx b/packages/mui-joy/src/Radio/Radio.spec.tsx
index 07ea1d010f3e93..2493d3a3ce7a74 100644
--- a/packages/mui-joy/src/Radio/Radio.spec.tsx
+++ b/packages/mui-joy/src/Radio/Radio.spec.tsx
@@ -20,7 +20,6 @@ import { expectType } from '@mui/types';
;
;
- ;
;
;
;
diff --git a/packages/mui-joy/src/Radio/Radio.tsx b/packages/mui-joy/src/Radio/Radio.tsx
index 8057a0238a932b..f44fb9b57dd237 100644
--- a/packages/mui-joy/src/Radio/Radio.tsx
+++ b/packages/mui-joy/src/Radio/Radio.tsx
@@ -59,22 +59,24 @@ const RadioRoot = styled('span', {
return [
{
'--Icon-fontSize': 'var(--Radio-size)',
+ '--Icon-color': 'currentColor',
...(ownerState.size === 'sm' && {
'--Radio-size': '1rem',
- '--Radio-gap': '0.375rem',
- '& ~ *': { '--FormHelperText-margin': '0.375rem 0 0 1.375rem' },
+ '--Radio-gap': '0.5rem',
+ // --FormHelperText-margin is equal to --Radio-size + --Radio-gap but we can't use calc() with CSS variables because the FormHelperText is a sibling element
+ '& ~ *': { '--FormHelperText-margin': '0 0 0 1.5rem' },
fontSize: theme.vars.fontSize.sm,
}),
...(ownerState.size === 'md' && {
'--Radio-size': '1.25rem',
- '--Radio-gap': '0.5rem',
- '& ~ *': { '--FormHelperText-margin': '0.375rem 0 0 1.75rem' },
+ '--Radio-gap': '0.625rem',
+ '& ~ *': { '--FormHelperText-margin': '0.25rem 0 0 1.875rem' },
fontSize: theme.vars.fontSize.md,
}),
...(ownerState.size === 'lg' && {
'--Radio-size': '1.5rem',
- '--Radio-gap': '0.625rem',
- '& ~ *': { '--FormHelperText-margin': '0.375rem 0 0 2.125rem' },
+ '--Radio-gap': '0.75rem',
+ '& ~ *': { '--FormHelperText-margin': '0.375rem 0 0 2.25rem' },
fontSize: theme.vars.fontSize.lg,
}),
position: ownerState.overlay ? 'initial' : 'relative',
@@ -112,6 +114,10 @@ const RadioRadio = styled('span', {
const variantStyle = theme.variants[`${ownerState.variant!}`]?.[ownerState.color!];
return [
{
+ '--Icon-color':
+ ownerState.color !== 'neutral' || ownerState.variant === 'solid'
+ ? 'currentColor'
+ : theme.vars.palette.text.icon,
margin: 0,
boxSizing: 'border-box',
width: 'var(--Radio-size)',
@@ -124,6 +130,9 @@ const RadioRadio = styled('span', {
...(ownerState.disableIcon && {
display: 'contents',
}),
+ [`&.${radioClasses.checked}`]: {
+ '--Icon-color': 'currentColor',
+ },
},
...(!ownerState.disableIcon
? [
@@ -426,7 +435,7 @@ Radio.propTypes /* remove-proptypes */ = {
* @default 'neutral'
*/
color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([
- PropTypes.oneOf(['danger', 'info', 'primary', 'success', 'warning']),
+ PropTypes.oneOf(['danger', 'primary', 'success', 'warning']),
PropTypes.string,
]),
/**
diff --git a/packages/mui-joy/src/Radio/radioClasses.ts b/packages/mui-joy/src/Radio/radioClasses.ts
index 19d88ca89862d3..1d2525477fd3ea 100644
--- a/packages/mui-joy/src/Radio/radioClasses.ts
+++ b/packages/mui-joy/src/Radio/radioClasses.ts
@@ -23,8 +23,6 @@ export interface RadioClasses {
colorPrimary: string;
/** Class name applied to the root element if `color="danger"`. */
colorDanger: string;
- /** Class name applied to the root element if `color="info"`. */
- colorInfo: string;
/** Class name applied to the root element if `color="neutral"`. */
colorNeutral: string;
/** Class name applied to the root element if `color="success"`. */
@@ -65,7 +63,6 @@ const radioClasses: RadioClasses = generateUtilityClasses('MuiRadio', [
'focusVisible',
'colorPrimary',
'colorDanger',
- 'colorInfo',
'colorNeutral',
'colorSuccess',
'colorWarning',
diff --git a/packages/mui-joy/src/RadioGroup/RadioGroup.tsx b/packages/mui-joy/src/RadioGroup/RadioGroup.tsx
index 6355d6d915e832..41fbeefff40c30 100644
--- a/packages/mui-joy/src/RadioGroup/RadioGroup.tsx
+++ b/packages/mui-joy/src/RadioGroup/RadioGroup.tsx
@@ -196,7 +196,7 @@ RadioGroup.propTypes /* remove-proptypes */ = {
* @default 'neutral'
*/
color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([
- PropTypes.oneOf(['danger', 'info', 'primary', 'success', 'warning']),
+ PropTypes.oneOf(['danger', 'primary', 'success', 'warning']),
PropTypes.string,
]),
/**
diff --git a/packages/mui-joy/src/RadioGroup/radioGroupClasses.ts b/packages/mui-joy/src/RadioGroup/radioGroupClasses.ts
index 0fcdd34448fb30..649f775fd122d6 100644
--- a/packages/mui-joy/src/RadioGroup/radioGroupClasses.ts
+++ b/packages/mui-joy/src/RadioGroup/radioGroupClasses.ts
@@ -15,8 +15,6 @@ export interface RadioGroupClasses {
colorNeutral: string;
/** Class name applied to the root element if `color="danger"`. */
colorDanger: string;
- /** Class name applied to the root element if `color="info"`. */
- colorInfo: string;
/** Class name applied to the root element if `color="success"`. */
colorSuccess: string;
/** Class name applied to the root element if `color="warning"`. */
@@ -46,7 +44,6 @@ const radioGroupClasses: RadioGroupClasses = generateUtilityClasses('MuiRadioGro
'colorPrimary',
'colorNeutral',
'colorDanger',
- 'colorInfo',
'colorSuccess',
'colorWarning',
'variantPlain',
diff --git a/packages/mui-joy/src/ScopedCssBaseline/ScopedCssBaseline.tsx b/packages/mui-joy/src/ScopedCssBaseline/ScopedCssBaseline.tsx
index 8bb9188e984075..091028817abf5f 100644
--- a/packages/mui-joy/src/ScopedCssBaseline/ScopedCssBaseline.tsx
+++ b/packages/mui-joy/src/ScopedCssBaseline/ScopedCssBaseline.tsx
@@ -47,11 +47,11 @@ const ScopedCssBaselineRoot = styled('div', {
// Fix font resize problem in iOS
WebkitTextSizeAdjust: '100%',
color: theme.vars.palette.text.primary,
- ...(theme.typography.body1 as any),
+ ...theme.typography['body-md'],
backgroundColor: theme.vars.palette.background.body,
'@media print': {
// Save printer ink.
- backgroundColor: theme.vars.palette.common.white,
+ backgroundColor: '#fff',
},
'& *, & *::before, & *::after': {
boxSizing: 'inherit',
diff --git a/packages/mui-joy/src/Select/Select.tsx b/packages/mui-joy/src/Select/Select.tsx
index 620a4a78770545..fcde333178f002 100644
--- a/packages/mui-joy/src/Select/Select.tsx
+++ b/packages/mui-joy/src/Select/Select.tsx
@@ -15,10 +15,12 @@ import Unfold from '../internal/svg-icons/Unfold';
import { styled, useThemeProps } from '../styles';
import ColorInversion, { useColorInversion } from '../styles/ColorInversion';
import { SelectOwnProps, SelectOwnerState, SelectTypeMap } from './SelectProps';
+import { resolveSxValue } from '../styles/styleUtils';
import useSlot from '../utils/useSlot';
import selectClasses, { getSelectUtilityClass } from './selectClasses';
import { ListOwnerState } from '../List';
import FormControlContext from '../FormControl/FormControlContext';
+import { VariantColorProvider } from '../styles/variantColorInheritance';
function defaultRenderSingleValue(selectedOption: SelectOption | null) {
return selectedOption?.label ?? '';
@@ -84,11 +86,13 @@ const SelectRoot = styled('div', {
overridesResolver: (props, styles) => styles.root,
})<{ ownerState: SelectOwnerState }>(({ theme, ownerState }) => {
const variantStyle = theme.variants[`${ownerState.variant!}`]?.[ownerState.color!];
+ const { borderRadius } = resolveSxValue({ theme, ownerState }, ['borderRadius']);
return [
{
'--Select-radius': theme.vars.radius.sm,
'--Select-gap': '0.5rem',
- '--Select-placeholderOpacity': 0.5,
+ '--Select-placeholderOpacity': 0.64,
+ '--Select-decoratorColor': theme.vars.palette.text.icon,
'--Select-focusedThickness': theme.vars.focus.thickness,
...(ownerState.color === 'context'
? {
@@ -107,19 +111,19 @@ const SelectRoot = styled('div', {
'--Select-minHeight': '2rem',
'--Select-paddingInline': '0.5rem',
'--Select-decoratorChildHeight': 'min(1.5rem, var(--Select-minHeight))',
- '--Icon-fontSize': '1.25rem',
+ '--Icon-fontSize': theme.vars.fontSize.xl,
}),
...(ownerState.size === 'md' && {
'--Select-minHeight': '2.5rem',
'--Select-paddingInline': '0.75rem',
'--Select-decoratorChildHeight': 'min(2rem, var(--Select-minHeight))',
- '--Icon-fontSize': '1.5rem',
+ '--Icon-fontSize': theme.vars.fontSize.xl2,
}),
...(ownerState.size === 'lg' && {
'--Select-minHeight': '3rem',
'--Select-paddingInline': '1rem',
'--Select-decoratorChildHeight': 'min(2.375rem, var(--Select-minHeight))',
- '--Icon-fontSize': '1.75rem',
+ '--Icon-fontSize': theme.vars.fontSize.xl2,
}),
// variables for controlling child components
'--Select-decoratorChildOffset':
@@ -147,11 +151,8 @@ const SelectRoot = styled('div', {
paddingBlock: { sm: 2, md: 3, lg: 4 }[ownerState.size], // the padding-block act as a minimum spacing between content and root element
}),
paddingInline: `var(--Select-paddingInline)`,
- fontFamily: theme.vars.fontFamily.body,
- fontSize: theme.vars.fontSize.md,
- ...(ownerState.size === 'sm' && {
- fontSize: theme.vars.fontSize.sm,
- }),
+ ...theme.typography[`body-${ownerState.size!}`],
+ ...variantStyle,
'&::before': {
boxSizing: 'border-box',
content: '""',
@@ -177,12 +178,11 @@ const SelectRoot = styled('div', {
},
},
{
- // apply global variant styles
- ...variantStyle,
'&:hover': theme.variants[`${ownerState.variant!}Hover`]?.[ownerState.color!],
[`&.${selectClasses.disabled}`]:
theme.variants[`${ownerState.variant!}Disabled`]?.[ownerState.color!],
},
+ borderRadius !== undefined && { '--Select-radius': borderRadius },
];
});
@@ -234,7 +234,6 @@ const SelectListbox = styled(StyledList, {
: theme.variants[ownerState.variant!]?.[ownerState.color!];
return {
'--focus-outline-offset': `calc(${theme.vars.focus.thickness} * -1)`, // to prevent the focus outline from being cut by overflow
- '--List-radius': theme.vars.radius.sm,
'--ListItem-stickyBackground':
variantStyle?.backgroundColor ||
variantStyle?.background ||
@@ -246,6 +245,7 @@ const SelectListbox = styled(StyledList, {
overflow: 'auto',
outline: 0,
boxShadow: theme.shadow.md,
+ borderRadius: `var(--List-radius, ${theme.vars.radius.sm})`,
// `unstable_popup-zIndex` is a private variable that lets other component, e.g. Modal, to override the z-index so that the listbox can be displayed above the Modal.
zIndex: `var(--unstable_popup-zIndex, ${theme.vars.zIndex.popup})`,
...(!variantStyle?.backgroundColor && {
@@ -258,50 +258,47 @@ const SelectStartDecorator = styled('span', {
name: 'JoySelect',
slot: 'StartDecorator',
overridesResolver: (props, styles) => styles.startDecorator,
-})<{ ownerState: SelectOwnerState }>(({ theme, ownerState }) => ({
+})<{ ownerState: SelectOwnerState }>({
'--Button-margin': '0 0 0 calc(var(--Select-decoratorChildOffset) * -1)',
'--IconButton-margin': '0 0 0 calc(var(--Select-decoratorChildOffset) * -1)',
'--Icon-margin': '0 0 0 calc(var(--Select-paddingInline) / -4)',
display: 'inherit',
alignItems: 'center',
+ color: 'var(--Select-decoratorColor)',
marginInlineEnd: 'var(--Select-gap)',
- color: theme.vars.palette.text.tertiary,
- ...(ownerState.focusVisible && {
- color: 'var(--Select-focusedHighlight)',
- }),
-}));
+});
const SelectEndDecorator = styled('span', {
name: 'JoySelect',
slot: 'EndDecorator',
overridesResolver: (props, styles) => styles.endDecorator,
-})<{ ownerState: SelectOwnerState }>(({ theme, ownerState }) => {
- const variantStyle = theme.variants[ownerState.variant!]?.[ownerState.color!];
- return {
- '--Button-margin': '0 calc(var(--Select-decoratorChildOffset) * -1) 0 0',
- '--IconButton-margin': '0 calc(var(--Select-decoratorChildOffset) * -1) 0 0',
- '--Icon-margin': '0 calc(var(--Select-paddingInline) / -4) 0 0',
- display: 'inherit',
- alignItems: 'center',
- marginInlineStart: 'var(--Select-gap)',
- color: variantStyle?.color,
- };
+})<{ ownerState: SelectOwnerState }>({
+ '--Button-margin': '0 calc(var(--Select-decoratorChildOffset) * -1) 0 0',
+ '--IconButton-margin': '0 calc(var(--Select-decoratorChildOffset) * -1) 0 0',
+ '--Icon-margin': '0 calc(var(--Select-paddingInline) / -4) 0 0',
+ display: 'inherit',
+ alignItems: 'center',
+ color: 'var(--Select-decoratorColor)',
+ marginInlineStart: 'var(--Select-gap)',
});
const SelectIndicator = styled('span', {
name: 'JoySelect',
slot: 'Indicator',
-})<{ ownerState: SelectOwnerState }>(({ ownerState }) => ({
+})<{ ownerState: SelectOwnerState }>(({ ownerState, theme }) => ({
...(ownerState.size === 'sm' && {
- '--Icon-fontSize': '1.125rem',
+ '--Icon-fontSize': theme.vars.fontSize.lg,
}),
...(ownerState.size === 'md' && {
- '--Icon-fontSize': '1.25rem',
+ '--Icon-fontSize': theme.vars.fontSize.xl,
}),
...(ownerState.size === 'lg' && {
- '--Icon-fontSize': '1.5rem',
+ '--Icon-fontSize': theme.vars.fontSize.xl2,
}),
- color: 'var(--Select-indicatorColor)',
+ '--Icon-color':
+ ownerState.color !== 'neutral' || ownerState.variant === 'solid'
+ ? 'currentColor'
+ : theme.vars.palette.text.icon,
display: 'inherit',
alignItems: 'center',
marginInlineStart: 'var(--Select-gap)',
@@ -309,6 +306,9 @@ const SelectIndicator = styled('span', {
[`.${selectClasses.endDecorator} + &`]: {
marginInlineStart: 'calc(var(--Select-gap) / 2)',
},
+ [`&.${selectClasses.expanded}, .${selectClasses.disabled} > &`]: {
+ '--Icon-color': 'currentColor',
+ },
}));
/**
*
@@ -518,8 +518,8 @@ const Select = React.forwardRef(function Select(
} as SelectOwnerState & ListOwnerState,
getSlotOwnerState: (mergedProps) => ({
size: mergedProps.size || size,
- variant: mergedProps.variant || 'outlined',
- color: mergedProps.color || 'neutral',
+ variant: mergedProps.variant || variant,
+ color: mergedProps.color || (!mergedProps.disablePortal ? colorProp : color),
disableColorInversion: !mergedProps.disablePortal,
}),
});
@@ -545,14 +545,6 @@ const Select = React.forwardRef(function Select(
ownerState,
});
- const context = React.useMemo(
- () => ({
- ...contextValue,
- color,
- }),
- [color, contextValue],
- );
-
// Wait for `listboxProps` because `slotProps.listbox` could be a function.
const modifiers = React.useMemo(
() => [...defaultModifiers, ...(listboxProps.modifiers || [])],
@@ -575,11 +567,13 @@ const Select = React.forwardRef(function Select(
slots: { root: listboxProps.as || 'ul' },
})}
>
-