diff --git a/docs/data/base/components/autocomplete/AutocompleteIntroduction/system/index.js b/docs/data/base/components/autocomplete/AutocompleteIntroduction/system/index.js
index 47593a14592705..b5adaa20c616cf 100644
--- a/docs/data/base/components/autocomplete/AutocompleteIntroduction/system/index.js
+++ b/docs/data/base/components/autocomplete/AutocompleteIntroduction/system/index.js
@@ -122,6 +122,7 @@ const blue = {
400: '#3399FF',
500: '#007FFF',
600: '#0072E5',
+ 700: '#0059B2',
900: '#003A75',
};
@@ -146,8 +147,8 @@ const StyledAutocompleteRoot = styled('div')(
color: ${theme.palette.mode === 'dark' ? grey[300] : grey[500]};
background: ${theme.palette.mode === 'dark' ? grey[900] : '#fff'};
border: 1px solid ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
- box-shadow: 0px 4px 6px ${
- theme.palette.mode === 'dark' ? 'rgba(0,0,0, 0.50)' : 'rgba(0,0,0, 0.05)'
+ box-shadow: 0px 2px 4px ${
+ theme.palette.mode === 'dark' ? 'rgba(0,0,0, 0.5)' : 'rgba(0,0,0, 0.05)'
};
display: flex;
gap: 5px;
@@ -157,7 +158,7 @@ const StyledAutocompleteRoot = styled('div')(
&.focused {
border-color: ${blue[400]};
- box-shadow: 0 0 0 3px ${theme.palette.mode === 'dark' ? blue[500] : blue[200]};
+ box-shadow: 0 0 0 3px ${theme.palette.mode === 'dark' ? blue[700] : blue[200]};
}
&:hover {
@@ -211,7 +212,7 @@ const StyledListbox = styled('ul')(
border: 1px solid ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
color: ${theme.palette.mode === 'dark' ? grey[300] : grey[900]};
box-shadow: 0px 4px 6px ${
- theme.palette.mode === 'dark' ? 'rgba(0,0,0, 0.50)' : 'rgba(0,0,0, 0.05)'
+ theme.palette.mode === 'dark' ? 'rgba(0,0,0, 0.3)' : 'rgba(0,0,0, 0.05)'
};
`,
);
diff --git a/docs/data/base/components/autocomplete/AutocompleteIntroduction/system/index.tsx b/docs/data/base/components/autocomplete/AutocompleteIntroduction/system/index.tsx
index 32447970f4c752..7ef07de478eb8e 100644
--- a/docs/data/base/components/autocomplete/AutocompleteIntroduction/system/index.tsx
+++ b/docs/data/base/components/autocomplete/AutocompleteIntroduction/system/index.tsx
@@ -105,6 +105,7 @@ const blue = {
400: '#3399FF',
500: '#007FFF',
600: '#0072E5',
+ 700: '#0059B2',
900: '#003A75',
};
@@ -129,8 +130,8 @@ const StyledAutocompleteRoot = styled('div')(
color: ${theme.palette.mode === 'dark' ? grey[300] : grey[500]};
background: ${theme.palette.mode === 'dark' ? grey[900] : '#fff'};
border: 1px solid ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
- box-shadow: 0px 4px 6px ${
- theme.palette.mode === 'dark' ? 'rgba(0,0,0, 0.50)' : 'rgba(0,0,0, 0.05)'
+ box-shadow: 0px 2px 4px ${
+ theme.palette.mode === 'dark' ? 'rgba(0,0,0, 0.5)' : 'rgba(0,0,0, 0.05)'
};
display: flex;
gap: 5px;
@@ -140,7 +141,7 @@ const StyledAutocompleteRoot = styled('div')(
&.focused {
border-color: ${blue[400]};
- box-shadow: 0 0 0 3px ${theme.palette.mode === 'dark' ? blue[500] : blue[200]};
+ box-shadow: 0 0 0 3px ${theme.palette.mode === 'dark' ? blue[700] : blue[200]};
}
&:hover {
@@ -194,7 +195,7 @@ const StyledListbox = styled('ul')(
border: 1px solid ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
color: ${theme.palette.mode === 'dark' ? grey[300] : grey[900]};
box-shadow: 0px 4px 6px ${
- theme.palette.mode === 'dark' ? 'rgba(0,0,0, 0.50)' : 'rgba(0,0,0, 0.05)'
+ theme.palette.mode === 'dark' ? 'rgba(0,0,0, 0.3)' : 'rgba(0,0,0, 0.05)'
};
`,
);
diff --git a/docs/data/base/components/autocomplete/AutocompleteIntroduction/tailwind/index.js b/docs/data/base/components/autocomplete/AutocompleteIntroduction/tailwind/index.js
index d80f7a1d5c54f7..05dbe02b814927 100644
--- a/docs/data/base/components/autocomplete/AutocompleteIntroduction/tailwind/index.js
+++ b/docs/data/base/components/autocomplete/AutocompleteIntroduction/tailwind/index.js
@@ -79,7 +79,7 @@ const Autocomplete = React.forwardRef(function Autocomplete(props, ref) {
/>
- {anchorEl ? (
+ {anchorEl && (
- ) : null}
+ )}
);
});
diff --git a/docs/data/base/components/autocomplete/AutocompleteIntroduction/tailwind/index.tsx b/docs/data/base/components/autocomplete/AutocompleteIntroduction/tailwind/index.tsx
index bb3f5d16d9cbaf..fc4cb52385565b 100644
--- a/docs/data/base/components/autocomplete/AutocompleteIntroduction/tailwind/index.tsx
+++ b/docs/data/base/components/autocomplete/AutocompleteIntroduction/tailwind/index.tsx
@@ -80,7 +80,7 @@ const Autocomplete = React.forwardRef(function Autocomplete(
/>
- {anchorEl ? (
+ {anchorEl && (
- ) : null}
+ )}
);
});
diff --git a/docs/data/base/components/autocomplete/ControlledStates.js b/docs/data/base/components/autocomplete/ControlledStates.js
index e795ac73d10e07..d94672d0c49044 100644
--- a/docs/data/base/components/autocomplete/ControlledStates.js
+++ b/docs/data/base/components/autocomplete/ControlledStates.js
@@ -56,6 +56,7 @@ const blue = {
400: '#3399FF',
500: '#007FFF',
600: '#0072E5',
+ 700: '#0059B2',
900: '#003A75',
};
@@ -74,7 +75,6 @@ const grey = {
const StyledAutocomplete = styled('div')`
position: relative;
- margin: 1.5rem 0;
`;
const StyledInputRoot = styled('div')(
@@ -85,7 +85,9 @@ const StyledInputRoot = styled('div')(
color: ${theme.palette.mode === 'dark' ? grey[300] : grey[500]};
background: ${theme.palette.mode === 'dark' ? grey[900] : '#fff'};
border: 1px solid ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
- box-shadow: 0px 2px 2px ${theme.palette.mode === 'dark' ? grey[900] : grey[50]};
+ box-shadow: 0px 2px 4px ${
+ theme.palette.mode === 'dark' ? 'rgba(0,0,0, 0.5)' : 'rgba(0,0,0, 0.05)'
+ };
display: flex;
gap: 5px;
padding-right: 5px;
@@ -94,7 +96,7 @@ const StyledInputRoot = styled('div')(
&.focused {
border-color: ${blue[400]};
- box-shadow: 0 0 0 3px ${theme.palette.mode === 'dark' ? blue[500] : blue[200]};
+ box-shadow: 0 0 0 3px ${theme.palette.mode === 'dark' ? blue[700] : blue[200]};
}
&:hover {
@@ -142,7 +144,9 @@ const StyledListbox = styled('ul')(
background: ${theme.palette.mode === 'dark' ? grey[900] : '#fff'};
border: 1px solid ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
color: ${theme.palette.mode === 'dark' ? grey[300] : grey[900]};
- box-shadow: 0px 4px 30px ${theme.palette.mode === 'dark' ? grey[900] : grey[200]};
+ box-shadow: 0px 4px 6px ${
+ theme.palette.mode === 'dark' ? 'rgba(0,0,0, 0.50)' : 'rgba(0,0,0, 0.05)'
+ };
`,
);
@@ -187,12 +191,16 @@ const StyledOption = styled('li')(
const Layout = styled('div')`
display: flex;
flex-flow: column nowrap;
+ gap: 4px;
`;
const Pre = styled('pre')(({ theme }) => ({
margin: '0.5rem 0',
+ fontSize: '0.75rem',
'& code': {
- backgroundColor: theme.palette.mode === 'light' ? '#ebebef' : '#25252d',
+ backgroundColor: theme.palette.mode === 'light' ? grey[100] : grey[900],
+ border: '1px solid',
+ borderColor: theme.palette.mode === 'light' ? grey[300] : grey[700],
color: theme.palette.mode === 'light' ? '#000' : '#fff',
padding: '0.125rem 0.25rem',
borderRadius: 3,
diff --git a/docs/data/base/components/autocomplete/ControlledStates.tsx b/docs/data/base/components/autocomplete/ControlledStates.tsx
index 4bb540fe33578c..2c6406829eeb74 100644
--- a/docs/data/base/components/autocomplete/ControlledStates.tsx
+++ b/docs/data/base/components/autocomplete/ControlledStates.tsx
@@ -56,6 +56,7 @@ const blue = {
400: '#3399FF',
500: '#007FFF',
600: '#0072E5',
+ 700: '#0059B2',
900: '#003A75',
};
@@ -74,7 +75,6 @@ const grey = {
const StyledAutocomplete = styled('div')`
position: relative;
- margin: 1.5rem 0;
`;
const StyledInputRoot = styled('div')(
@@ -85,7 +85,9 @@ const StyledInputRoot = styled('div')(
color: ${theme.palette.mode === 'dark' ? grey[300] : grey[500]};
background: ${theme.palette.mode === 'dark' ? grey[900] : '#fff'};
border: 1px solid ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
- box-shadow: 0px 2px 2px ${theme.palette.mode === 'dark' ? grey[900] : grey[50]};
+ box-shadow: 0px 2px 4px ${
+ theme.palette.mode === 'dark' ? 'rgba(0,0,0, 0.5)' : 'rgba(0,0,0, 0.05)'
+ };
display: flex;
gap: 5px;
padding-right: 5px;
@@ -94,7 +96,7 @@ const StyledInputRoot = styled('div')(
&.focused {
border-color: ${blue[400]};
- box-shadow: 0 0 0 3px ${theme.palette.mode === 'dark' ? blue[500] : blue[200]};
+ box-shadow: 0 0 0 3px ${theme.palette.mode === 'dark' ? blue[700] : blue[200]};
}
&:hover {
@@ -142,7 +144,9 @@ const StyledListbox = styled('ul')(
background: ${theme.palette.mode === 'dark' ? grey[900] : '#fff'};
border: 1px solid ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
color: ${theme.palette.mode === 'dark' ? grey[300] : grey[900]};
- box-shadow: 0px 4px 30px ${theme.palette.mode === 'dark' ? grey[900] : grey[200]};
+ box-shadow: 0px 4px 6px ${
+ theme.palette.mode === 'dark' ? 'rgba(0,0,0, 0.50)' : 'rgba(0,0,0, 0.05)'
+ };
`,
);
@@ -187,12 +191,16 @@ const StyledOption = styled('li')(
const Layout = styled('div')`
display: flex;
flex-flow: column nowrap;
+ gap: 4px;
`;
const Pre = styled('pre')(({ theme }) => ({
margin: '0.5rem 0',
+ fontSize: '0.75rem',
'& code': {
- backgroundColor: theme.palette.mode === 'light' ? '#ebebef' : '#25252d',
+ backgroundColor: theme.palette.mode === 'light' ? grey[100] : grey[900],
+ border: '1px solid',
+ borderColor: theme.palette.mode === 'light' ? grey[300] : grey[700],
color: theme.palette.mode === 'light' ? '#000' : '#fff',
padding: '0.125rem 0.25rem',
borderRadius: 3,
diff --git a/docs/data/base/components/autocomplete/UseAutocomplete.js b/docs/data/base/components/autocomplete/UseAutocomplete.js
index 47acbc2343b82a..1f23f2985c422a 100644
--- a/docs/data/base/components/autocomplete/UseAutocomplete.js
+++ b/docs/data/base/components/autocomplete/UseAutocomplete.js
@@ -49,6 +49,7 @@ const blue = {
400: '#3399FF',
500: '#007FFF',
600: '#0072E5',
+ 700: '#0059B2',
900: '#003A75',
};
@@ -81,7 +82,9 @@ const StyledAutocompleteRoot = styled('div')(
color: ${theme.palette.mode === 'dark' ? grey[300] : grey[500]};
background: ${theme.palette.mode === 'dark' ? grey[900] : '#fff'};
border: 1px solid ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
- box-shadow: 0px 2px 2px ${theme.palette.mode === 'dark' ? grey[900] : grey[50]};
+ box-shadow: 0px 2px 4px ${
+ theme.palette.mode === 'dark' ? 'rgba(0,0,0, 0.5)' : 'rgba(0,0,0, 0.05)'
+ };
display: flex;
gap: 5px;
padding-right: 5px;
@@ -90,7 +93,7 @@ const StyledAutocompleteRoot = styled('div')(
&.focused {
border-color: ${blue[400]};
- box-shadow: 0 0 0 3px ${theme.palette.mode === 'dark' ? blue[500] : blue[200]};
+ box-shadow: 0 0 0 3px ${theme.palette.mode === 'dark' ? blue[600] : blue[200]};
}
&:hover {
@@ -136,7 +139,7 @@ const StyledListbox = styled('ul')(
background: ${theme.palette.mode === 'dark' ? grey[900] : '#fff'};
border: 1px solid ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
color: ${theme.palette.mode === 'dark' ? grey[300] : grey[900]};
- box-shadow: 0px 4px 6px ${
+ box-shadow: 0px 2px 3px ${
theme.palette.mode === 'dark' ? 'rgba(0,0,0, 0.50)' : 'rgba(0,0,0, 0.05)'
};
`,
diff --git a/docs/data/base/components/autocomplete/UseAutocomplete.tsx b/docs/data/base/components/autocomplete/UseAutocomplete.tsx
index be8b95aa2e66db..6b0e9701dc0f3b 100644
--- a/docs/data/base/components/autocomplete/UseAutocomplete.tsx
+++ b/docs/data/base/components/autocomplete/UseAutocomplete.tsx
@@ -51,6 +51,7 @@ const blue = {
400: '#3399FF',
500: '#007FFF',
600: '#0072E5',
+ 700: '#0059B2',
900: '#003A75',
};
@@ -83,7 +84,9 @@ const StyledAutocompleteRoot = styled('div')(
color: ${theme.palette.mode === 'dark' ? grey[300] : grey[500]};
background: ${theme.palette.mode === 'dark' ? grey[900] : '#fff'};
border: 1px solid ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
- box-shadow: 0px 2px 2px ${theme.palette.mode === 'dark' ? grey[900] : grey[50]};
+ box-shadow: 0px 2px 4px ${
+ theme.palette.mode === 'dark' ? 'rgba(0,0,0, 0.5)' : 'rgba(0,0,0, 0.05)'
+ };
display: flex;
gap: 5px;
padding-right: 5px;
@@ -92,7 +95,7 @@ const StyledAutocompleteRoot = styled('div')(
&.focused {
border-color: ${blue[400]};
- box-shadow: 0 0 0 3px ${theme.palette.mode === 'dark' ? blue[500] : blue[200]};
+ box-shadow: 0 0 0 3px ${theme.palette.mode === 'dark' ? blue[600] : blue[200]};
}
&:hover {
@@ -138,7 +141,7 @@ const StyledListbox = styled('ul')(
background: ${theme.palette.mode === 'dark' ? grey[900] : '#fff'};
border: 1px solid ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
color: ${theme.palette.mode === 'dark' ? grey[300] : grey[900]};
- box-shadow: 0px 4px 6px ${
+ box-shadow: 0px 2px 3px ${
theme.palette.mode === 'dark' ? 'rgba(0,0,0, 0.50)' : 'rgba(0,0,0, 0.05)'
};
`,
diff --git a/docs/data/base/components/autocomplete/UseAutocompletePopper.js b/docs/data/base/components/autocomplete/UseAutocompletePopper.js
index 1953f2a977ee5c..eeb08684a1c36f 100644
--- a/docs/data/base/components/autocomplete/UseAutocompletePopper.js
+++ b/docs/data/base/components/autocomplete/UseAutocompletePopper.js
@@ -69,6 +69,7 @@ const blue = {
400: '#3399FF',
500: '#007FFF',
600: '#0072E5',
+ 700: '#0059B2',
900: '#003A75',
};
@@ -93,7 +94,9 @@ const StyledAutocompleteRoot = styled('div')(
color: ${theme.palette.mode === 'dark' ? grey[300] : grey[500]};
background: ${theme.palette.mode === 'dark' ? grey[900] : '#fff'};
border: 1px solid ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
- box-shadow: 0px 2px 2px ${theme.palette.mode === 'dark' ? grey[900] : grey[50]};
+ box-shadow: 0px 2px 4px ${
+ theme.palette.mode === 'dark' ? 'rgba(0,0,0, 0.5)' : 'rgba(0,0,0, 0.05)'
+ };
display: flex;
gap: 5px;
padding-right: 5px;
@@ -103,7 +106,7 @@ const StyledAutocompleteRoot = styled('div')(
&.focused {
border-color: ${blue[400]};
- box-shadow: 0 0 0 3px ${theme.palette.mode === 'dark' ? blue[500] : blue[200]};
+ box-shadow: 0 0 0 3px ${theme.palette.mode === 'dark' ? blue[700] : blue[200]};
}
&:hover {
@@ -155,7 +158,9 @@ const StyledListbox = styled('ul')(
background: ${theme.palette.mode === 'dark' ? grey[900] : '#fff'};
border: 1px solid ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
color: ${theme.palette.mode === 'dark' ? grey[300] : grey[900]};
- box-shadow: 0px 4px 30px ${theme.palette.mode === 'dark' ? grey[900] : grey[200]};
+ box-shadow: 0px 4px 6px ${
+ theme.palette.mode === 'dark' ? 'rgba(0,0,0, 0.50)' : 'rgba(0,0,0, 0.05)'
+ };
`,
);
diff --git a/docs/data/base/components/autocomplete/UseAutocompletePopper.tsx b/docs/data/base/components/autocomplete/UseAutocompletePopper.tsx
index 64a624887ccdf0..ad4f1ecac192f0 100644
--- a/docs/data/base/components/autocomplete/UseAutocompletePopper.tsx
+++ b/docs/data/base/components/autocomplete/UseAutocompletePopper.tsx
@@ -77,6 +77,7 @@ const blue = {
400: '#3399FF',
500: '#007FFF',
600: '#0072E5',
+ 700: '#0059B2',
900: '#003A75',
};
@@ -101,7 +102,9 @@ const StyledAutocompleteRoot = styled('div')(
color: ${theme.palette.mode === 'dark' ? grey[300] : grey[500]};
background: ${theme.palette.mode === 'dark' ? grey[900] : '#fff'};
border: 1px solid ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
- box-shadow: 0px 2px 2px ${theme.palette.mode === 'dark' ? grey[900] : grey[50]};
+ box-shadow: 0px 2px 4px ${
+ theme.palette.mode === 'dark' ? 'rgba(0,0,0, 0.5)' : 'rgba(0,0,0, 0.05)'
+ };
display: flex;
gap: 5px;
padding-right: 5px;
@@ -111,7 +114,7 @@ const StyledAutocompleteRoot = styled('div')(
&.focused {
border-color: ${blue[400]};
- box-shadow: 0 0 0 3px ${theme.palette.mode === 'dark' ? blue[500] : blue[200]};
+ box-shadow: 0 0 0 3px ${theme.palette.mode === 'dark' ? blue[700] : blue[200]};
}
&:hover {
@@ -163,7 +166,9 @@ const StyledListbox = styled('ul')(
background: ${theme.palette.mode === 'dark' ? grey[900] : '#fff'};
border: 1px solid ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
color: ${theme.palette.mode === 'dark' ? grey[300] : grey[900]};
- box-shadow: 0px 4px 30px ${theme.palette.mode === 'dark' ? grey[900] : grey[200]};
+ box-shadow: 0px 4px 6px ${
+ theme.palette.mode === 'dark' ? 'rgba(0,0,0, 0.50)' : 'rgba(0,0,0, 0.05)'
+ };
`,
);
diff --git a/docs/data/base/components/badge/BadgeVisibility.js b/docs/data/base/components/badge/BadgeVisibility.js
index 270e118fe342a2..aa692503627ce3 100644
--- a/docs/data/base/components/badge/BadgeVisibility.js
+++ b/docs/data/base/components/badge/BadgeVisibility.js
@@ -1,92 +1,44 @@
import * as React from 'react';
-import Box from '@mui/material/Box';
-import { styled } from '@mui/system';
import { Badge as BaseBadge, badgeClasses } from '@mui/base/Badge';
-import ButtonGroup from '@mui/material/ButtonGroup';
-import Button from '@mui/material/Button';
+// Auxiliary demo components
+import { styled, Stack } from '@mui/system';
+import { Button, buttonClasses } from '@mui/base/Button';
+import { Switch, switchClasses } from '@mui/base/Switch';
+import Divider from '@mui/material/Divider';
+// Icons
import AddIcon from '@mui/icons-material/Add';
import RemoveIcon from '@mui/icons-material/Remove';
import MailIcon from '@mui/icons-material/Mail';
-import Switch from '@mui/material/Switch';
-import FormControlLabel from '@mui/material/FormControlLabel';
-export default function BadgeVisibility() {
- const [count, setCount] = React.useState(1);
- const [invisible, setInvisible] = React.useState(false);
-
- const handleBadgeVisibility = () => {
- setInvisible(!invisible);
- };
-
- return (
- *': {
- marginBottom: 2,
- },
- [`& .${badgeClasses.root}`]: {
- marginRight: 4,
- },
- }}
- >
-
-
-
-
-
-
-
-
-
-
-
-
-
- }
- label="Show Badge"
- />
-
-
- );
-}
const blue = {
+ 200: '#99CCF3',
500: '#007FFF',
};
const grey = {
+ 50: '#f6f8fa',
+ 100: '#eaeef2',
+ 200: '#d0d7de',
300: '#afb8c1',
+ 400: '#8c959f',
+ 500: '#6e7781',
+ 600: '#57606a',
+ 700: '#424a53',
+ 800: '#32383f',
900: '#24292f',
};
const Badge = styled(BaseBadge)(
({ theme }) => `
box-sizing: border-box;
+ position: relative;
+ display: flex;
+ align-self: center;
margin: 0;
padding: 0;
- font-size: 14px;
list-style: none;
font-family: IBM Plex Sans, sans-serif;
- position: relative;
- display: inline-block;
+ font-size: 14px;
line-height: 1;
& .${badgeClasses.badge} {
@@ -107,7 +59,7 @@ const Badge = styled(BaseBadge)(
background: ${blue[500]};
box-shadow: 0px 4px 6x ${theme.palette.mode === 'dark' ? grey[900] : grey[300]};
transform: translate(50%, -50%);
- transform-origin: 100% 0;
+ transform-origin: 100% 0;
}
& .${badgeClasses.invisible} {
@@ -116,3 +68,152 @@ const Badge = styled(BaseBadge)(
}
`,
);
+
+const StyledButton = styled(Button)(
+ ({ theme }) => `
+ cursor: pointer;
+ padding: 4px 8px;
+ display: flex;
+ align-items: center;
+ border-radius: 8px;
+ transition: all 150ms ease;
+ background-color: transparent;
+ border: 1px solid ${theme.palette.mode === 'dark' ? grey[800] : grey[200]};
+
+ &:hover {
+ background: ${theme.palette.mode === 'dark' ? grey[800] : grey[50]};
+ }
+
+ &.${buttonClasses.active} {
+ background: ${theme.palette.mode === 'dark' ? grey[900] : grey[100]};
+ }
+
+ &.${buttonClasses.focusVisible} {
+ box-shadow: 0 3px 20px 0 rgba(61, 71, 82, 0.1), 0 0 0 4px rgba(0, 127, 255, 0.5);
+ outline: none;
+ }
+ `,
+);
+
+const Root = styled('span')(
+ ({ theme }) => `
+ position: relative;
+ display: inline-block;
+ width: 32px;
+ height: 20px;
+ cursor: pointer;
+
+
+ & .${switchClasses.track} {
+ background: ${theme.palette.mode === 'dark' ? grey[600] : grey[400]};
+ border-radius: 16px;
+ display: block;
+ height: 100%;
+ width: 100%;
+ position: absolute;
+ }
+
+ & .${switchClasses.thumb} {
+ position: relative;
+ display: block;
+ width: 14px;
+ height: 14px;
+ top: 3px;
+ left: 3px;
+ border-radius: 16px;
+ background-color: #fff;
+ transition-property: all;
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
+ transition-duration: 120ms;
+ }
+
+ &.${switchClasses.focusVisible} .${switchClasses.track} {
+ box-shadow: 0 0 0 3px ${theme.palette.mode === 'dark' ? grey[700] : blue[200]};
+ }
+
+ &.${switchClasses.checked} {
+ .${switchClasses.thumb} {
+ left: 15px;
+ top: 3px;
+ background-color: #fff;
+ }
+
+ .${switchClasses.track} {
+ background: ${blue[500]};
+ }
+ }
+
+ & .${switchClasses.input} {
+ cursor: inherit;
+ position: absolute;
+ width: 100%;
+ height: 100%;
+ top: 0;
+ left: 0;
+ opacity: 0;
+ z-index: 1;
+ margin: 0;
+ }
+ `,
+);
+
+const StyledLabel = styled('label')(
+ ({ theme }) => `
+ font-family: IBM Plex Sans, sans-serif;
+ font-size: 0.875rem;
+ color: ${theme.palette.mode === 'dark' ? grey[300] : grey[900]};
+ `,
+);
+
+export default function BadgeVisibility() {
+ const [count, setCount] = React.useState(1);
+ const [invisible, setInvisible] = React.useState(false);
+
+ const handleBadgeVisibility = () => {
+ setInvisible(!invisible);
+ };
+
+ return (
+
+
+
+
+
+
+ {
+ setCount(Math.max(count - 1, 0));
+ }}
+ >
+
+
+ {
+ setCount(count + 1);
+ }}
+ >
+
+
+
+
+ Show badge
+
+
+
+
+ );
+}
diff --git a/docs/data/base/components/badge/BadgeVisibility.tsx b/docs/data/base/components/badge/BadgeVisibility.tsx
index 270e118fe342a2..aa692503627ce3 100644
--- a/docs/data/base/components/badge/BadgeVisibility.tsx
+++ b/docs/data/base/components/badge/BadgeVisibility.tsx
@@ -1,92 +1,44 @@
import * as React from 'react';
-import Box from '@mui/material/Box';
-import { styled } from '@mui/system';
import { Badge as BaseBadge, badgeClasses } from '@mui/base/Badge';
-import ButtonGroup from '@mui/material/ButtonGroup';
-import Button from '@mui/material/Button';
+// Auxiliary demo components
+import { styled, Stack } from '@mui/system';
+import { Button, buttonClasses } from '@mui/base/Button';
+import { Switch, switchClasses } from '@mui/base/Switch';
+import Divider from '@mui/material/Divider';
+// Icons
import AddIcon from '@mui/icons-material/Add';
import RemoveIcon from '@mui/icons-material/Remove';
import MailIcon from '@mui/icons-material/Mail';
-import Switch from '@mui/material/Switch';
-import FormControlLabel from '@mui/material/FormControlLabel';
-export default function BadgeVisibility() {
- const [count, setCount] = React.useState(1);
- const [invisible, setInvisible] = React.useState(false);
-
- const handleBadgeVisibility = () => {
- setInvisible(!invisible);
- };
-
- return (
- *': {
- marginBottom: 2,
- },
- [`& .${badgeClasses.root}`]: {
- marginRight: 4,
- },
- }}
- >
-
-
-
-
-
-
-
-
-
-
-
-
-
- }
- label="Show Badge"
- />
-
-
- );
-}
const blue = {
+ 200: '#99CCF3',
500: '#007FFF',
};
const grey = {
+ 50: '#f6f8fa',
+ 100: '#eaeef2',
+ 200: '#d0d7de',
300: '#afb8c1',
+ 400: '#8c959f',
+ 500: '#6e7781',
+ 600: '#57606a',
+ 700: '#424a53',
+ 800: '#32383f',
900: '#24292f',
};
const Badge = styled(BaseBadge)(
({ theme }) => `
box-sizing: border-box;
+ position: relative;
+ display: flex;
+ align-self: center;
margin: 0;
padding: 0;
- font-size: 14px;
list-style: none;
font-family: IBM Plex Sans, sans-serif;
- position: relative;
- display: inline-block;
+ font-size: 14px;
line-height: 1;
& .${badgeClasses.badge} {
@@ -107,7 +59,7 @@ const Badge = styled(BaseBadge)(
background: ${blue[500]};
box-shadow: 0px 4px 6x ${theme.palette.mode === 'dark' ? grey[900] : grey[300]};
transform: translate(50%, -50%);
- transform-origin: 100% 0;
+ transform-origin: 100% 0;
}
& .${badgeClasses.invisible} {
@@ -116,3 +68,152 @@ const Badge = styled(BaseBadge)(
}
`,
);
+
+const StyledButton = styled(Button)(
+ ({ theme }) => `
+ cursor: pointer;
+ padding: 4px 8px;
+ display: flex;
+ align-items: center;
+ border-radius: 8px;
+ transition: all 150ms ease;
+ background-color: transparent;
+ border: 1px solid ${theme.palette.mode === 'dark' ? grey[800] : grey[200]};
+
+ &:hover {
+ background: ${theme.palette.mode === 'dark' ? grey[800] : grey[50]};
+ }
+
+ &.${buttonClasses.active} {
+ background: ${theme.palette.mode === 'dark' ? grey[900] : grey[100]};
+ }
+
+ &.${buttonClasses.focusVisible} {
+ box-shadow: 0 3px 20px 0 rgba(61, 71, 82, 0.1), 0 0 0 4px rgba(0, 127, 255, 0.5);
+ outline: none;
+ }
+ `,
+);
+
+const Root = styled('span')(
+ ({ theme }) => `
+ position: relative;
+ display: inline-block;
+ width: 32px;
+ height: 20px;
+ cursor: pointer;
+
+
+ & .${switchClasses.track} {
+ background: ${theme.palette.mode === 'dark' ? grey[600] : grey[400]};
+ border-radius: 16px;
+ display: block;
+ height: 100%;
+ width: 100%;
+ position: absolute;
+ }
+
+ & .${switchClasses.thumb} {
+ position: relative;
+ display: block;
+ width: 14px;
+ height: 14px;
+ top: 3px;
+ left: 3px;
+ border-radius: 16px;
+ background-color: #fff;
+ transition-property: all;
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
+ transition-duration: 120ms;
+ }
+
+ &.${switchClasses.focusVisible} .${switchClasses.track} {
+ box-shadow: 0 0 0 3px ${theme.palette.mode === 'dark' ? grey[700] : blue[200]};
+ }
+
+ &.${switchClasses.checked} {
+ .${switchClasses.thumb} {
+ left: 15px;
+ top: 3px;
+ background-color: #fff;
+ }
+
+ .${switchClasses.track} {
+ background: ${blue[500]};
+ }
+ }
+
+ & .${switchClasses.input} {
+ cursor: inherit;
+ position: absolute;
+ width: 100%;
+ height: 100%;
+ top: 0;
+ left: 0;
+ opacity: 0;
+ z-index: 1;
+ margin: 0;
+ }
+ `,
+);
+
+const StyledLabel = styled('label')(
+ ({ theme }) => `
+ font-family: IBM Plex Sans, sans-serif;
+ font-size: 0.875rem;
+ color: ${theme.palette.mode === 'dark' ? grey[300] : grey[900]};
+ `,
+);
+
+export default function BadgeVisibility() {
+ const [count, setCount] = React.useState(1);
+ const [invisible, setInvisible] = React.useState(false);
+
+ const handleBadgeVisibility = () => {
+ setInvisible(!invisible);
+ };
+
+ return (
+
+
+
+
+
+
+ {
+ setCount(Math.max(count - 1, 0));
+ }}
+ >
+
+
+ {
+ setCount(count + 1);
+ }}
+ >
+
+
+
+
+ Show badge
+
+
+
+
+ );
+}
diff --git a/docs/data/base/components/button/UnstyledButtonCustom.js b/docs/data/base/components/button/UnstyledButtonCustom.js
index 4f4e2399fafeaf..c057fef09c7499 100644
--- a/docs/data/base/components/button/UnstyledButtonCustom.js
+++ b/docs/data/base/components/button/UnstyledButtonCustom.js
@@ -35,7 +35,8 @@ const blue = {
200: '#99CCF3',
400: '#3399FF',
500: '#007FFF',
- 600: '#0072E5',
+ 600: '#0072E6',
+ 700: '#0059B3',
800: '#004C99',
900: '#003A75',
};
@@ -44,7 +45,7 @@ const CustomButtonRoot = styled(ButtonRoot)(
({ theme }) => `
overflow: visible;
cursor: pointer;
- --main-color: ${theme.palette.mode === 'light' ? blue[600] : blue[100]};
+ --main-color: ${theme.palette.mode === 'light' ? blue[600] : blue[200]};
--hover-color: ${theme.palette.mode === 'light' ? blue[50] : blue[900]};
--active-color: ${theme.palette.mode === 'light' ? blue[100] : blue[800]};
@@ -57,15 +58,15 @@ const CustomButtonRoot = styled(ButtonRoot)(
& .bg {
stroke: var(--main-color);
stroke-width: 1;
- filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.1));
+ filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.1));
fill: transparent;
}
& .borderEffect {
stroke: var(--main-color);
stroke-width: 2;
- stroke-dasharray: 150 600;
- stroke-dashoffset: 150;
+ stroke-dasharray: 120 600;
+ stroke-dashoffset: 120;
fill: transparent;
}
@@ -82,14 +83,14 @@ const CustomButtonRoot = styled(ButtonRoot)(
&:focus,
&.${buttonClasses.focusVisible} {
- outline: 2px solid ${theme.palette.mode === 'dark' ? blue[400] : blue[200]};
+ outline: 2px solid ${theme.palette.mode === 'dark' ? blue[700] : blue[200]};
outline-offset: 2px;
}
&.${buttonClasses.active} {
& .bg {
fill: var(--active-color);
- transition: fill 300ms ease-out;
+ transition: fill 150ms ease-out;
}
}
@@ -106,11 +107,10 @@ const CustomButtonRoot = styled(ButtonRoot)(
align-items: center;
justify-content: center;
color: var(--main-color);
- text-transform: uppercase;
}
& svg {
- margin: 0 5px;
+ margin: 0 4px;
}
}`,
);
diff --git a/docs/data/base/components/button/UnstyledButtonCustom.tsx b/docs/data/base/components/button/UnstyledButtonCustom.tsx
index 72413739662779..e98295562540a0 100644
--- a/docs/data/base/components/button/UnstyledButtonCustom.tsx
+++ b/docs/data/base/components/button/UnstyledButtonCustom.tsx
@@ -36,7 +36,8 @@ const blue = {
200: '#99CCF3',
400: '#3399FF',
500: '#007FFF',
- 600: '#0072E5',
+ 600: '#0072E6',
+ 700: '#0059B3',
800: '#004C99',
900: '#003A75',
};
@@ -45,7 +46,7 @@ const CustomButtonRoot = styled(ButtonRoot)(
({ theme }: { theme: Theme }) => `
overflow: visible;
cursor: pointer;
- --main-color: ${theme.palette.mode === 'light' ? blue[600] : blue[100]};
+ --main-color: ${theme.palette.mode === 'light' ? blue[600] : blue[200]};
--hover-color: ${theme.palette.mode === 'light' ? blue[50] : blue[900]};
--active-color: ${theme.palette.mode === 'light' ? blue[100] : blue[800]};
@@ -58,15 +59,15 @@ const CustomButtonRoot = styled(ButtonRoot)(
& .bg {
stroke: var(--main-color);
stroke-width: 1;
- filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.1));
+ filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.1));
fill: transparent;
}
& .borderEffect {
stroke: var(--main-color);
stroke-width: 2;
- stroke-dasharray: 150 600;
- stroke-dashoffset: 150;
+ stroke-dasharray: 120 600;
+ stroke-dashoffset: 120;
fill: transparent;
}
@@ -83,14 +84,14 @@ const CustomButtonRoot = styled(ButtonRoot)(
&:focus,
&.${buttonClasses.focusVisible} {
- outline: 2px solid ${theme.palette.mode === 'dark' ? blue[400] : blue[200]};
+ outline: 2px solid ${theme.palette.mode === 'dark' ? blue[700] : blue[200]};
outline-offset: 2px;
}
&.${buttonClasses.active} {
& .bg {
fill: var(--active-color);
- transition: fill 300ms ease-out;
+ transition: fill 150ms ease-out;
}
}
@@ -107,11 +108,10 @@ const CustomButtonRoot = styled(ButtonRoot)(
align-items: center;
justify-content: center;
color: var(--main-color);
- text-transform: uppercase;
}
& svg {
- margin: 0 5px;
+ margin: 0 4px;
}
}`,
);
diff --git a/docs/data/base/components/button/UnstyledButtonIntroduction/css/index.js b/docs/data/base/components/button/UnstyledButtonIntroduction/css/index.js
index 3dae77721c653b..d4b3d39c329352 100644
--- a/docs/data/base/components/button/UnstyledButtonIntroduction/css/index.js
+++ b/docs/data/base/components/button/UnstyledButtonIntroduction/css/index.js
@@ -1,5 +1,6 @@
import * as React from 'react';
-import { Button, buttonClasses } from '@mui/base/Button';
+import { Button } from '@mui/base/Button';
+import { useTheme } from '@mui/system';
import Stack from '@mui/material/Stack';
export default function UnstyledButtonsIntroduction() {
@@ -29,11 +30,24 @@ const cyan = {
900: '#022127',
};
+const grey = {
+ 200: '#d0d7de',
+ 700: '#424a53',
+};
+
+function useIsDarkMode() {
+ const theme = useTheme();
+ return theme.palette.mode === 'dark';
+}
+
function Styles() {
+ // Replace this with your app logic for determining dark mode
+ const isDarkMode = useIsDarkMode();
+
return (
);
diff --git a/docs/data/base/components/button/UnstyledButtonIntroduction/css/index.tsx b/docs/data/base/components/button/UnstyledButtonIntroduction/css/index.tsx
index 3dae77721c653b..d4b3d39c329352 100644
--- a/docs/data/base/components/button/UnstyledButtonIntroduction/css/index.tsx
+++ b/docs/data/base/components/button/UnstyledButtonIntroduction/css/index.tsx
@@ -1,5 +1,6 @@
import * as React from 'react';
-import { Button, buttonClasses } from '@mui/base/Button';
+import { Button } from '@mui/base/Button';
+import { useTheme } from '@mui/system';
import Stack from '@mui/material/Stack';
export default function UnstyledButtonsIntroduction() {
@@ -29,11 +30,24 @@ const cyan = {
900: '#022127',
};
+const grey = {
+ 200: '#d0d7de',
+ 700: '#424a53',
+};
+
+function useIsDarkMode() {
+ const theme = useTheme();
+ return theme.palette.mode === 'dark';
+}
+
function Styles() {
+ // Replace this with your app logic for determining dark mode
+ const isDarkMode = useIsDarkMode();
+
return (
);
diff --git a/docs/data/base/components/button/UnstyledButtonIntroduction/system/index.js b/docs/data/base/components/button/UnstyledButtonIntroduction/system/index.js
index b16483005ffd01..e40e926764481e 100644
--- a/docs/data/base/components/button/UnstyledButtonIntroduction/system/index.js
+++ b/docs/data/base/components/button/UnstyledButtonIntroduction/system/index.js
@@ -1,5 +1,5 @@
import * as React from 'react';
-import { Button as BaseButton, buttonClasses } from '@mui/base/Button';
+import { Button as BaseButton } from '@mui/base/Button';
import { styled } from '@mui/system';
import Stack from '@mui/material/Stack';
@@ -13,15 +13,17 @@ export default function UnstyledButtonsIntroduction() {
}
const blue = {
+ 200: '#99CCFF',
+ 300: '#66B2FF',
+ 400: '#3399FF',
500: '#007FFF',
600: '#0072E5',
- 700: '#0059B2',
+ 700: '#0066CC',
};
const grey = {
- 100: '#eaeef2',
- 300: '#afb8c1',
- 900: '#24292f',
+ 200: '#d0d7de',
+ 700: '#424a53',
};
const Button = styled(BaseButton)(
@@ -36,25 +38,35 @@ const Button = styled(BaseButton)(
color: white;
transition: all 150ms ease;
cursor: pointer;
- border: none;
- box-shadow: 0px 4px 30px ${theme.palette.mode === 'dark' ? grey[900] : grey[100]};
+ border: 1px solid ${blue[500]};
+ box-shadow: 0 2px 4px ${
+ theme.palette.mode === 'dark' ? 'rgba(0, 0, 0, 0.5)' : 'rgba(0, 127, 255, 0.5)'
+ }, inset 0 1.5px 1px ${blue[400]}, inset 0 -2px 1px ${blue[600]};
&:hover {
background-color: ${blue[600]};
}
- &.${buttonClasses.active} {
+ &:active {
background-color: ${blue[700]};
+ box-shadow: none;
}
- &.${buttonClasses.focusVisible} {
- box-shadow: 0 3px 20px 0 rgba(61, 71, 82, 0.1), 0 0 0 5px rgba(0, 127, 255, 0.5);
+ &:focus-visible {
+ box-shadow: 0 0 0 4px ${theme.palette.mode === 'dark' ? blue[300] : blue[200]};
outline: none;
}
- &.${buttonClasses.disabled} {
- opacity: 0.5;
+ &:disabled {
+ background-color: ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
+ color: ${theme.palette.mode === 'dark' ? grey[200] : grey[700]};
+ border: 1px solid ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
cursor: not-allowed;
+ box-shadow: none;
+
+ &:hover {
+ background-color: ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
+ }
}
`,
);
diff --git a/docs/data/base/components/button/UnstyledButtonIntroduction/system/index.tsx b/docs/data/base/components/button/UnstyledButtonIntroduction/system/index.tsx
index b16483005ffd01..e40e926764481e 100644
--- a/docs/data/base/components/button/UnstyledButtonIntroduction/system/index.tsx
+++ b/docs/data/base/components/button/UnstyledButtonIntroduction/system/index.tsx
@@ -1,5 +1,5 @@
import * as React from 'react';
-import { Button as BaseButton, buttonClasses } from '@mui/base/Button';
+import { Button as BaseButton } from '@mui/base/Button';
import { styled } from '@mui/system';
import Stack from '@mui/material/Stack';
@@ -13,15 +13,17 @@ export default function UnstyledButtonsIntroduction() {
}
const blue = {
+ 200: '#99CCFF',
+ 300: '#66B2FF',
+ 400: '#3399FF',
500: '#007FFF',
600: '#0072E5',
- 700: '#0059B2',
+ 700: '#0066CC',
};
const grey = {
- 100: '#eaeef2',
- 300: '#afb8c1',
- 900: '#24292f',
+ 200: '#d0d7de',
+ 700: '#424a53',
};
const Button = styled(BaseButton)(
@@ -36,25 +38,35 @@ const Button = styled(BaseButton)(
color: white;
transition: all 150ms ease;
cursor: pointer;
- border: none;
- box-shadow: 0px 4px 30px ${theme.palette.mode === 'dark' ? grey[900] : grey[100]};
+ border: 1px solid ${blue[500]};
+ box-shadow: 0 2px 4px ${
+ theme.palette.mode === 'dark' ? 'rgba(0, 0, 0, 0.5)' : 'rgba(0, 127, 255, 0.5)'
+ }, inset 0 1.5px 1px ${blue[400]}, inset 0 -2px 1px ${blue[600]};
&:hover {
background-color: ${blue[600]};
}
- &.${buttonClasses.active} {
+ &:active {
background-color: ${blue[700]};
+ box-shadow: none;
}
- &.${buttonClasses.focusVisible} {
- box-shadow: 0 3px 20px 0 rgba(61, 71, 82, 0.1), 0 0 0 5px rgba(0, 127, 255, 0.5);
+ &:focus-visible {
+ box-shadow: 0 0 0 4px ${theme.palette.mode === 'dark' ? blue[300] : blue[200]};
outline: none;
}
- &.${buttonClasses.disabled} {
- opacity: 0.5;
+ &:disabled {
+ background-color: ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
+ color: ${theme.palette.mode === 'dark' ? grey[200] : grey[700]};
+ border: 1px solid ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
cursor: not-allowed;
+ box-shadow: none;
+
+ &:hover {
+ background-color: ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
+ }
}
`,
);
diff --git a/docs/data/base/components/button/UnstyledButtonIntroduction/tailwind/index.js b/docs/data/base/components/button/UnstyledButtonIntroduction/tailwind/index.js
index f887ed0d501825..96a8c746bb3d0c 100644
--- a/docs/data/base/components/button/UnstyledButtonIntroduction/tailwind/index.js
+++ b/docs/data/base/components/button/UnstyledButtonIntroduction/tailwind/index.js
@@ -3,23 +3,34 @@ import PropTypes from 'prop-types';
import { Button as BaseButton } from '@mui/base/Button';
import Stack from '@mui/material/Stack';
import clsx from 'clsx';
+import { useTheme } from '@mui/system';
+
+function useIsDarkMode() {
+ const theme = useTheme();
+ return theme.palette.mode === 'dark';
+}
export default function UnstyledButtonsIntroduction() {
+ // Replace this with your app logic for determining dark mode
+ const isDarkMode = useIsDarkMode();
+
return (
-
-
-
-
+
+
+ Button
+ Disabled
+
+
);
}
-const Button = React.forwardRef((props, ref) => {
+const CustomButton = React.forwardRef((props, ref) => {
const { className, ...other } = props;
return (
{
);
});
-Button.propTypes = {
+CustomButton.propTypes = {
className: PropTypes.string,
};
diff --git a/docs/data/base/components/button/UnstyledButtonIntroduction/tailwind/index.tsx b/docs/data/base/components/button/UnstyledButtonIntroduction/tailwind/index.tsx
index d92fffecf769c0..8a6709ac7701e0 100644
--- a/docs/data/base/components/button/UnstyledButtonIntroduction/tailwind/index.tsx
+++ b/docs/data/base/components/button/UnstyledButtonIntroduction/tailwind/index.tsx
@@ -2,26 +2,39 @@ import * as React from 'react';
import { Button as BaseButton, ButtonProps } from '@mui/base/Button';
import Stack from '@mui/material/Stack';
import clsx from 'clsx';
+import { useTheme } from '@mui/system';
+
+function useIsDarkMode() {
+ const theme = useTheme();
+ return theme.palette.mode === 'dark';
+}
export default function UnstyledButtonsIntroduction() {
+ // Replace this with your app logic for determining dark mode
+ const isDarkMode = useIsDarkMode();
+
return (
-
-
-
-
+
+
+ Button
+ Disabled
+
+
);
}
-const Button = React.forwardRef((props, ref) => {
- const { className, ...other } = props;
- return (
-
- );
-});
+const CustomButton = React.forwardRef(
+ (props, ref) => {
+ const { className, ...other } = props;
+ return (
+
+ );
+ },
+);
diff --git a/docs/data/base/components/button/UnstyledButtonIntroduction/tailwind/index.tsx.preview b/docs/data/base/components/button/UnstyledButtonIntroduction/tailwind/index.tsx.preview
index b7b5add52ab6c2..53f6465d2c7cfb 100644
--- a/docs/data/base/components/button/UnstyledButtonIntroduction/tailwind/index.tsx.preview
+++ b/docs/data/base/components/button/UnstyledButtonIntroduction/tailwind/index.tsx.preview
@@ -1,2 +1,4 @@
-
-
\ No newline at end of file
+
+ Button
+ Disabled
+
\ No newline at end of file
diff --git a/docs/data/base/components/button/UnstyledButtonsDisabledFocus.js b/docs/data/base/components/button/UnstyledButtonsDisabledFocus.js
index 0171d48acef2cb..1541fa924064a7 100644
--- a/docs/data/base/components/button/UnstyledButtonsDisabledFocus.js
+++ b/docs/data/base/components/button/UnstyledButtonsDisabledFocus.js
@@ -15,23 +15,35 @@ export default function UnstyledButtonsDisabledFocus() {
}
const blue = {
+ 200: '#99CCFF',
+ 300: '#66B2FF',
+ 400: '#3399FF',
500: '#007FFF',
600: '#0072E5',
- 700: '#0059B2',
+ 700: '#0066CC',
};
-const Button = styled(BaseButton)`
- font-family: 'IBM Plex Sans', sans-serif;
+const grey = {
+ 200: '#d0d7de',
+ 700: '#424a53',
+};
+
+const Button = styled(BaseButton)(
+ ({ theme }) => `
+ font-family: IBM Plex Sans, sans-serif;
+ font-weight: 600;
font-size: 0.875rem;
line-height: 1.5;
background-color: ${blue[500]};
- color: white;
- border-radius: 8px;
- font-weight: 600;
padding: 8px 16px;
- cursor: pointer;
+ border-radius: 8px;
+ color: white;
transition: all 150ms ease;
- border: none;
+ cursor: pointer;
+ border: 1px solid ${blue[500]};
+ box-shadow: 0 2px 1px ${
+ theme.palette.mode === 'dark' ? 'rgba(0, 0, 0, 0.5)' : 'rgba(45, 45, 60, 0.2)'
+ }, inset 0 1.5px 1px ${blue[400]}, inset 0 -2px 1px ${blue[600]};
&:hover {
background-color: ${blue[600]};
@@ -39,15 +51,23 @@ const Button = styled(BaseButton)`
&.${buttonClasses.active} {
background-color: ${blue[700]};
+ box-shadow: none;
}
&.${buttonClasses.focusVisible} {
- box-shadow: 0 4px 20px 0 rgb(61 71 82 / 0.1), 0 0 0 5px rgb(0 127 255 / 0.5);
+ box-shadow: 0 0 0 4px ${theme.palette.mode === 'dark' ? blue[300] : blue[200]};
outline: none;
}
&.${buttonClasses.disabled} {
- opacity: 0.5;
+ background-color: ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
+ color: ${theme.palette.mode === 'dark' ? grey[200] : grey[700]}};
+ border: 1px solid ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
cursor: not-allowed;
+ box-shadow: none;
+ &:hover {
+ background-color: ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
+ }
}
-`;
+`,
+);
diff --git a/docs/data/base/components/button/UnstyledButtonsDisabledFocus.tsx b/docs/data/base/components/button/UnstyledButtonsDisabledFocus.tsx
index 0171d48acef2cb..1541fa924064a7 100644
--- a/docs/data/base/components/button/UnstyledButtonsDisabledFocus.tsx
+++ b/docs/data/base/components/button/UnstyledButtonsDisabledFocus.tsx
@@ -15,23 +15,35 @@ export default function UnstyledButtonsDisabledFocus() {
}
const blue = {
+ 200: '#99CCFF',
+ 300: '#66B2FF',
+ 400: '#3399FF',
500: '#007FFF',
600: '#0072E5',
- 700: '#0059B2',
+ 700: '#0066CC',
};
-const Button = styled(BaseButton)`
- font-family: 'IBM Plex Sans', sans-serif;
+const grey = {
+ 200: '#d0d7de',
+ 700: '#424a53',
+};
+
+const Button = styled(BaseButton)(
+ ({ theme }) => `
+ font-family: IBM Plex Sans, sans-serif;
+ font-weight: 600;
font-size: 0.875rem;
line-height: 1.5;
background-color: ${blue[500]};
- color: white;
- border-radius: 8px;
- font-weight: 600;
padding: 8px 16px;
- cursor: pointer;
+ border-radius: 8px;
+ color: white;
transition: all 150ms ease;
- border: none;
+ cursor: pointer;
+ border: 1px solid ${blue[500]};
+ box-shadow: 0 2px 1px ${
+ theme.palette.mode === 'dark' ? 'rgba(0, 0, 0, 0.5)' : 'rgba(45, 45, 60, 0.2)'
+ }, inset 0 1.5px 1px ${blue[400]}, inset 0 -2px 1px ${blue[600]};
&:hover {
background-color: ${blue[600]};
@@ -39,15 +51,23 @@ const Button = styled(BaseButton)`
&.${buttonClasses.active} {
background-color: ${blue[700]};
+ box-shadow: none;
}
&.${buttonClasses.focusVisible} {
- box-shadow: 0 4px 20px 0 rgb(61 71 82 / 0.1), 0 0 0 5px rgb(0 127 255 / 0.5);
+ box-shadow: 0 0 0 4px ${theme.palette.mode === 'dark' ? blue[300] : blue[200]};
outline: none;
}
&.${buttonClasses.disabled} {
- opacity: 0.5;
+ background-color: ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
+ color: ${theme.palette.mode === 'dark' ? grey[200] : grey[700]}};
+ border: 1px solid ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
cursor: not-allowed;
+ box-shadow: none;
+ &:hover {
+ background-color: ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
+ }
}
-`;
+`,
+);
diff --git a/docs/data/base/components/button/UnstyledButtonsDisabledFocusCustom.js b/docs/data/base/components/button/UnstyledButtonsDisabledFocusCustom.js
index c62571925fe9cb..c7724d595bfa30 100644
--- a/docs/data/base/components/button/UnstyledButtonsDisabledFocusCustom.js
+++ b/docs/data/base/components/button/UnstyledButtonsDisabledFocusCustom.js
@@ -17,39 +17,59 @@ export default function UnstyledButtonsDisabledFocusCustom() {
}
const blue = {
+ 200: '#99CCFF',
+ 300: '#66B2FF',
+ 400: '#3399FF',
500: '#007FFF',
600: '#0072E5',
- 700: '#0059B2',
+ 700: '#0066CC',
};
-const Button = styled(BaseButton)`
- font-family: 'IBM Plex Sans', sans-serif;
+const grey = {
+ 200: '#d0d7de',
+ 700: '#424a53',
+};
+
+const Button = styled(BaseButton)(
+ ({ theme }) => `
+ font-family: IBM Plex Sans, sans-serif;
+ font-weight: 600;
font-size: 0.875rem;
line-height: 1.5;
background-color: ${blue[500]};
- color: white;
- border-radius: 8px;
- font-weight: 600;
padding: 8px 16px;
- cursor: pointer;
+ border-radius: 8px;
+ color: white;
transition: all 150ms ease;
- border: none;
+ cursor: pointer;
+ border: 1px solid ${blue[500]};
+ box-shadow: 0 2px 1px ${
+ theme.palette.mode === 'dark' ? 'rgba(0, 0, 0, 0.5)' : 'rgba(45, 45, 60, 0.2)'
+ }, inset 0 1.5px 1px ${blue[400]}, inset 0 -2px 1px ${blue[600]};
- &:hover:not(.${buttonClasses.disabled}) {
+ &:hover {
background-color: ${blue[600]};
}
&.${buttonClasses.active} {
background-color: ${blue[700]};
+ box-shadow: none;
}
&.${buttonClasses.focusVisible} {
- box-shadow: 0 4px 20px 0 rgb(61 71 82 / 0.1), 0 0 0 5px rgb(0 127 255 / 0.5);
+ box-shadow: 0 0 0 4px ${theme.palette.mode === 'dark' ? blue[300] : blue[200]};
outline: none;
}
&.${buttonClasses.disabled} {
- opacity: 0.5;
+ background-color: ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
+ color: ${theme.palette.mode === 'dark' ? grey[200] : grey[700]}};
+ border: 1px solid ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
cursor: not-allowed;
+ box-shadow: none;
+ &:hover {
+ background-color: ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
+ }
}
-`;
+`,
+);
diff --git a/docs/data/base/components/button/UnstyledButtonsDisabledFocusCustom.tsx b/docs/data/base/components/button/UnstyledButtonsDisabledFocusCustom.tsx
index 0c75b3d74b92d2..e5244190898e67 100644
--- a/docs/data/base/components/button/UnstyledButtonsDisabledFocusCustom.tsx
+++ b/docs/data/base/components/button/UnstyledButtonsDisabledFocusCustom.tsx
@@ -22,39 +22,59 @@ export default function UnstyledButtonsDisabledFocusCustom() {
}
const blue = {
+ 200: '#99CCFF',
+ 300: '#66B2FF',
+ 400: '#3399FF',
500: '#007FFF',
600: '#0072E5',
- 700: '#0059B2',
+ 700: '#0066CC',
};
-const Button = styled(BaseButton)`
- font-family: 'IBM Plex Sans', sans-serif;
+const grey = {
+ 200: '#d0d7de',
+ 700: '#424a53',
+};
+
+const Button = styled(BaseButton)(
+ ({ theme }) => `
+ font-family: IBM Plex Sans, sans-serif;
+ font-weight: 600;
font-size: 0.875rem;
line-height: 1.5;
background-color: ${blue[500]};
- color: white;
- border-radius: 8px;
- font-weight: 600;
padding: 8px 16px;
- cursor: pointer;
+ border-radius: 8px;
+ color: white;
transition: all 150ms ease;
- border: none;
+ cursor: pointer;
+ border: 1px solid ${blue[500]};
+ box-shadow: 0 2px 1px ${
+ theme.palette.mode === 'dark' ? 'rgba(0, 0, 0, 0.5)' : 'rgba(45, 45, 60, 0.2)'
+ }, inset 0 1.5px 1px ${blue[400]}, inset 0 -2px 1px ${blue[600]};
- &:hover:not(.${buttonClasses.disabled}) {
+ &:hover {
background-color: ${blue[600]};
}
&.${buttonClasses.active} {
background-color: ${blue[700]};
+ box-shadow: none;
}
&.${buttonClasses.focusVisible} {
- box-shadow: 0 4px 20px 0 rgb(61 71 82 / 0.1), 0 0 0 5px rgb(0 127 255 / 0.5);
+ box-shadow: 0 0 0 4px ${theme.palette.mode === 'dark' ? blue[300] : blue[200]};
outline: none;
}
&.${buttonClasses.disabled} {
- opacity: 0.5;
+ background-color: ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
+ color: ${theme.palette.mode === 'dark' ? grey[200] : grey[700]}};
+ border: 1px solid ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
cursor: not-allowed;
+ box-shadow: none;
+ &:hover {
+ background-color: ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
+ }
}
-` as PolymorphicComponent;
+`,
+) as PolymorphicComponent;
diff --git a/docs/data/base/components/button/UnstyledButtonsSimple/css/index.js b/docs/data/base/components/button/UnstyledButtonsSimple/css/index.js
index f7cdde1f0fd0be..2d76dd5384de1d 100644
--- a/docs/data/base/components/button/UnstyledButtonsSimple/css/index.js
+++ b/docs/data/base/components/button/UnstyledButtonsSimple/css/index.js
@@ -1,5 +1,6 @@
import * as React from 'react';
-import { Button, buttonClasses } from '@mui/base/Button';
+import { Button } from '@mui/base/Button';
+import { useTheme } from '@mui/system';
import Stack from '@mui/material/Stack';
export default function UnstyledButtonsSimple() {
@@ -29,35 +30,58 @@ const cyan = {
900: '#022127',
};
+const grey = {
+ 200: '#d0d7de',
+ 700: '#424a53',
+};
+
+function useIsDarkMode() {
+ const theme = useTheme();
+ return theme.palette.mode === 'dark';
+}
+
function Styles() {
+ // Replace this with your app logic for determining dark mode
+ const isDarkMode = useIsDarkMode();
+
return (
diff --git a/docs/data/base/components/button/UnstyledButtonsSimple/css/index.tsx b/docs/data/base/components/button/UnstyledButtonsSimple/css/index.tsx
index f7cdde1f0fd0be..2d76dd5384de1d 100644
--- a/docs/data/base/components/button/UnstyledButtonsSimple/css/index.tsx
+++ b/docs/data/base/components/button/UnstyledButtonsSimple/css/index.tsx
@@ -1,5 +1,6 @@
import * as React from 'react';
-import { Button, buttonClasses } from '@mui/base/Button';
+import { Button } from '@mui/base/Button';
+import { useTheme } from '@mui/system';
import Stack from '@mui/material/Stack';
export default function UnstyledButtonsSimple() {
@@ -29,35 +30,58 @@ const cyan = {
900: '#022127',
};
+const grey = {
+ 200: '#d0d7de',
+ 700: '#424a53',
+};
+
+function useIsDarkMode() {
+ const theme = useTheme();
+ return theme.palette.mode === 'dark';
+}
+
function Styles() {
+ // Replace this with your app logic for determining dark mode
+ const isDarkMode = useIsDarkMode();
+
return (
diff --git a/docs/data/base/components/button/UnstyledButtonsSimple/system/index.js b/docs/data/base/components/button/UnstyledButtonsSimple/system/index.js
index de8dc38e8101d4..d04aadf10e0544 100644
--- a/docs/data/base/components/button/UnstyledButtonsSimple/system/index.js
+++ b/docs/data/base/components/button/UnstyledButtonsSimple/system/index.js
@@ -1,5 +1,5 @@
import * as React from 'react';
-import { Button as BaseButton, buttonClasses } from '@mui/base/Button';
+import { Button as BaseButton } from '@mui/base/Button';
import { styled } from '@mui/system';
import Stack from '@mui/material/Stack';
@@ -13,39 +13,60 @@ export default function UnstyledButtonsSimple() {
}
const blue = {
+ 200: '#99CCFF',
+ 300: '#66B2FF',
+ 400: '#3399FF',
500: '#007FFF',
600: '#0072E5',
- 700: '#0059B2',
+ 700: '#0066CC',
};
-const Button = styled(BaseButton)`
- font-family: 'IBM Plex Sans', sans-serif;
+const grey = {
+ 200: '#d0d7de',
+ 700: '#424a53',
+};
+
+const Button = styled(BaseButton)(
+ ({ theme }) => `
+ font-family: IBM Plex Sans, sans-serif;
+ font-weight: 600;
font-size: 0.875rem;
line-height: 1.5;
background-color: ${blue[500]};
- color: white;
- border-radius: 8px;
- font-weight: 600;
padding: 8px 16px;
- cursor: pointer;
+ border-radius: 8px;
+ color: white;
transition: all 150ms ease;
- border: none;
+ cursor: pointer;
+ border: 1px solid ${blue[500]};
+ box-shadow: 0 2px 1px ${
+ theme.palette.mode === 'dark' ? 'rgba(0, 0, 0, 0.5)' : 'rgba(45, 45, 60, 0.2)'
+ }, inset 0 1.5px 1px ${blue[400]}, inset 0 -2px 1px ${blue[600]};
- &:hover:not(:disabled) {
+ &:hover {
background-color: ${blue[600]};
}
- &:active:not(:disabled) {
+ &:active {
background-color: ${blue[700]};
+ box-shadow: none;
}
- &.${buttonClasses.focusVisible} {
- box-shadow: 0 4px 20px 0 rgb(61 71 82 / 0.1), 0 0 0 5px rgb(0 127 255 / 0.5);
+ &:focus-visible {
+ box-shadow: 0 0 0 4px ${theme.palette.mode === 'dark' ? blue[300] : blue[200]};
outline: none;
}
- &.${buttonClasses.disabled} {
- opacity: 0.5;
+ &:disabled {
+ background-color: ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
+ color: ${theme.palette.mode === 'dark' ? grey[200] : grey[700]};
+ border: 1px solid ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
cursor: not-allowed;
+ box-shadow: none;
+
+ &:hover {
+ background-color: ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
+ }
}
-`;
+`,
+);
diff --git a/docs/data/base/components/button/UnstyledButtonsSimple/system/index.tsx b/docs/data/base/components/button/UnstyledButtonsSimple/system/index.tsx
index de8dc38e8101d4..d04aadf10e0544 100644
--- a/docs/data/base/components/button/UnstyledButtonsSimple/system/index.tsx
+++ b/docs/data/base/components/button/UnstyledButtonsSimple/system/index.tsx
@@ -1,5 +1,5 @@
import * as React from 'react';
-import { Button as BaseButton, buttonClasses } from '@mui/base/Button';
+import { Button as BaseButton } from '@mui/base/Button';
import { styled } from '@mui/system';
import Stack from '@mui/material/Stack';
@@ -13,39 +13,60 @@ export default function UnstyledButtonsSimple() {
}
const blue = {
+ 200: '#99CCFF',
+ 300: '#66B2FF',
+ 400: '#3399FF',
500: '#007FFF',
600: '#0072E5',
- 700: '#0059B2',
+ 700: '#0066CC',
};
-const Button = styled(BaseButton)`
- font-family: 'IBM Plex Sans', sans-serif;
+const grey = {
+ 200: '#d0d7de',
+ 700: '#424a53',
+};
+
+const Button = styled(BaseButton)(
+ ({ theme }) => `
+ font-family: IBM Plex Sans, sans-serif;
+ font-weight: 600;
font-size: 0.875rem;
line-height: 1.5;
background-color: ${blue[500]};
- color: white;
- border-radius: 8px;
- font-weight: 600;
padding: 8px 16px;
- cursor: pointer;
+ border-radius: 8px;
+ color: white;
transition: all 150ms ease;
- border: none;
+ cursor: pointer;
+ border: 1px solid ${blue[500]};
+ box-shadow: 0 2px 1px ${
+ theme.palette.mode === 'dark' ? 'rgba(0, 0, 0, 0.5)' : 'rgba(45, 45, 60, 0.2)'
+ }, inset 0 1.5px 1px ${blue[400]}, inset 0 -2px 1px ${blue[600]};
- &:hover:not(:disabled) {
+ &:hover {
background-color: ${blue[600]};
}
- &:active:not(:disabled) {
+ &:active {
background-color: ${blue[700]};
+ box-shadow: none;
}
- &.${buttonClasses.focusVisible} {
- box-shadow: 0 4px 20px 0 rgb(61 71 82 / 0.1), 0 0 0 5px rgb(0 127 255 / 0.5);
+ &:focus-visible {
+ box-shadow: 0 0 0 4px ${theme.palette.mode === 'dark' ? blue[300] : blue[200]};
outline: none;
}
- &.${buttonClasses.disabled} {
- opacity: 0.5;
+ &:disabled {
+ background-color: ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
+ color: ${theme.palette.mode === 'dark' ? grey[200] : grey[700]};
+ border: 1px solid ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
cursor: not-allowed;
+ box-shadow: none;
+
+ &:hover {
+ background-color: ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
+ }
}
-`;
+`,
+);
diff --git a/docs/data/base/components/button/UnstyledButtonsSimple/tailwind/index.js b/docs/data/base/components/button/UnstyledButtonsSimple/tailwind/index.js
index 1339ee876c8f34..49d7bfb820ac2b 100644
--- a/docs/data/base/components/button/UnstyledButtonsSimple/tailwind/index.js
+++ b/docs/data/base/components/button/UnstyledButtonsSimple/tailwind/index.js
@@ -3,23 +3,36 @@ import PropTypes from 'prop-types';
import { Button as BaseButton } from '@mui/base/Button';
import Stack from '@mui/material/Stack';
import clsx from 'clsx';
+import { useTheme } from '@mui/system';
+
+function useIsDarkMode() {
+ const theme = useTheme();
+ return theme.palette.mode === 'dark';
+}
export default function UnstyledButtonsSimple() {
+ // Replace this with your app logic for determining dark mode
+ const isDarkMode = useIsDarkMode();
+
return (
-
-
-
-
+
+
+
+ Button
+
+ Disabled
+
+
);
}
-const Button = React.forwardRef((props, ref) => {
+const CustomButton = React.forwardRef((props, ref) => {
const { className, ...other } = props;
return (
{
);
});
-Button.propTypes = {
+CustomButton.propTypes = {
className: PropTypes.string,
};
diff --git a/docs/data/base/components/button/UnstyledButtonsSimple/tailwind/index.tsx b/docs/data/base/components/button/UnstyledButtonsSimple/tailwind/index.tsx
index 16e2d86ba2b877..8d9009a8a58943 100644
--- a/docs/data/base/components/button/UnstyledButtonsSimple/tailwind/index.tsx
+++ b/docs/data/base/components/button/UnstyledButtonsSimple/tailwind/index.tsx
@@ -2,26 +2,41 @@ import * as React from 'react';
import { Button as BaseButton, ButtonProps } from '@mui/base/Button';
import Stack from '@mui/material/Stack';
import clsx from 'clsx';
+import { useTheme } from '@mui/system';
+
+function useIsDarkMode() {
+ const theme = useTheme();
+ return theme.palette.mode === 'dark';
+}
export default function UnstyledButtonsSimple() {
+ // Replace this with your app logic for determining dark mode
+ const isDarkMode = useIsDarkMode();
+
return (
-
-
-
-
+
+
+
+ Button
+
+ Disabled
+
+
);
}
-const Button = React.forwardRef((props, ref) => {
- const { className, ...other } = props;
- return (
-
- );
-});
+const CustomButton = React.forwardRef(
+ (props, ref) => {
+ const { className, ...other } = props;
+ return (
+
+ );
+ },
+);
diff --git a/docs/data/base/components/button/UnstyledButtonsSimple/tailwind/index.tsx.preview b/docs/data/base/components/button/UnstyledButtonsSimple/tailwind/index.tsx.preview
index d96ba614272a34..25ff0c531391b5 100644
--- a/docs/data/base/components/button/UnstyledButtonsSimple/tailwind/index.tsx.preview
+++ b/docs/data/base/components/button/UnstyledButtonsSimple/tailwind/index.tsx.preview
@@ -1,2 +1,6 @@
-
-
\ No newline at end of file
+
+
+ Button
+
+ Disabled
+
\ No newline at end of file
diff --git a/docs/data/base/components/button/UnstyledButtonsSpan.js b/docs/data/base/components/button/UnstyledButtonsSpan.js
index e4933ae60abfac..98ba103d2ae061 100644
--- a/docs/data/base/components/button/UnstyledButtonsSpan.js
+++ b/docs/data/base/components/button/UnstyledButtonsSpan.js
@@ -15,23 +15,35 @@ export default function UnstyledButtonsSpan() {
}
const blue = {
+ 200: '#99CCFF',
+ 300: '#66B2FF',
+ 400: '#3399FF',
500: '#007FFF',
600: '#0072E5',
- 700: '#0059B2',
+ 700: '#0066CC',
};
-const Button = styled(BaseButton)`
- font-family: 'IBM Plex Sans', sans-serif;
+const grey = {
+ 200: '#d0d7de',
+ 700: '#424a53',
+};
+
+const Button = styled(BaseButton)(
+ ({ theme }) => `
+ font-family: IBM Plex Sans, sans-serif;
+ font-weight: 600;
font-size: 0.875rem;
line-height: 1.5;
background-color: ${blue[500]};
- color: white;
- border-radius: 8px;
- font-weight: 600;
padding: 8px 16px;
- cursor: pointer;
+ border-radius: 8px;
+ color: white;
transition: all 150ms ease;
- border: none;
+ cursor: pointer;
+ border: 1px solid ${blue[500]};
+ box-shadow: 0 2px 1px ${
+ theme.palette.mode === 'dark' ? 'rgba(0, 0, 0, 0.5)' : 'rgba(45, 45, 60, 0.2)'
+ }, inset 0 1.5px 1px ${blue[400]}, inset 0 -2px 1px ${blue[600]};
&:hover {
background-color: ${blue[600]};
@@ -39,15 +51,23 @@ const Button = styled(BaseButton)`
&.${buttonClasses.active} {
background-color: ${blue[700]};
+ box-shadow: none;
}
&.${buttonClasses.focusVisible} {
- box-shadow: 0 4px 20px 0 rgb(61 71 82 / 0.1), 0 0 0 5px rgb(0 127 255 / 0.5);
+ box-shadow: 0 0 0 4px ${theme.palette.mode === 'dark' ? blue[300] : blue[200]};
outline: none;
}
&.${buttonClasses.disabled} {
- opacity: 0.5;
+ background-color: ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
+ color: ${theme.palette.mode === 'dark' ? grey[200] : grey[700]}};
+ border: 0;
cursor: not-allowed;
+ box-shadow: none;
+ &:hover {
+ background-color: ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
+ }
}
-`;
+ `,
+);
diff --git a/docs/data/base/components/button/UnstyledButtonsSpan.tsx b/docs/data/base/components/button/UnstyledButtonsSpan.tsx
index fb788475dc3a32..03bdfe07ad8458 100644
--- a/docs/data/base/components/button/UnstyledButtonsSpan.tsx
+++ b/docs/data/base/components/button/UnstyledButtonsSpan.tsx
@@ -20,23 +20,35 @@ export default function UnstyledButtonsSpan() {
}
const blue = {
+ 200: '#99CCFF',
+ 300: '#66B2FF',
+ 400: '#3399FF',
500: '#007FFF',
600: '#0072E5',
- 700: '#0059B2',
+ 700: '#0066CC',
};
-const Button = styled(BaseButton)`
- font-family: 'IBM Plex Sans', sans-serif;
+const grey = {
+ 200: '#d0d7de',
+ 700: '#424a53',
+};
+
+const Button = styled(BaseButton)(
+ ({ theme }) => `
+ font-family: IBM Plex Sans, sans-serif;
+ font-weight: 600;
font-size: 0.875rem;
line-height: 1.5;
background-color: ${blue[500]};
- color: white;
- border-radius: 8px;
- font-weight: 600;
padding: 8px 16px;
- cursor: pointer;
+ border-radius: 8px;
+ color: white;
transition: all 150ms ease;
- border: none;
+ cursor: pointer;
+ border: 1px solid ${blue[500]};
+ box-shadow: 0 2px 1px ${
+ theme.palette.mode === 'dark' ? 'rgba(0, 0, 0, 0.5)' : 'rgba(45, 45, 60, 0.2)'
+ }, inset 0 1.5px 1px ${blue[400]}, inset 0 -2px 1px ${blue[600]};
&:hover {
background-color: ${blue[600]};
@@ -44,15 +56,23 @@ const Button = styled(BaseButton)`
&.${buttonClasses.active} {
background-color: ${blue[700]};
+ box-shadow: none;
}
&.${buttonClasses.focusVisible} {
- box-shadow: 0 4px 20px 0 rgb(61 71 82 / 0.1), 0 0 0 5px rgb(0 127 255 / 0.5);
+ box-shadow: 0 0 0 4px ${theme.palette.mode === 'dark' ? blue[300] : blue[200]};
outline: none;
}
&.${buttonClasses.disabled} {
- opacity: 0.5;
+ background-color: ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
+ color: ${theme.palette.mode === 'dark' ? grey[200] : grey[700]}};
+ border: 0;
cursor: not-allowed;
+ box-shadow: none;
+ &:hover {
+ background-color: ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
+ }
}
-` as PolymorphicComponent;
+ `,
+) as PolymorphicComponent;
diff --git a/docs/data/base/components/button/UnstyledButtonsSpan/css/index.js b/docs/data/base/components/button/UnstyledButtonsSpan/css/index.js
index 07b3949ac8f65e..4b73dbd2e18a0b 100644
--- a/docs/data/base/components/button/UnstyledButtonsSpan/css/index.js
+++ b/docs/data/base/components/button/UnstyledButtonsSpan/css/index.js
@@ -1,5 +1,6 @@
import * as React from 'react';
-import { Button, buttonClasses } from '@mui/base/Button';
+import { Button } from '@mui/base/Button';
+import { useTheme } from '@mui/system';
import Stack from '@mui/material/Stack';
export default function UnstyledButtonsSpan() {
@@ -31,32 +32,54 @@ const cyan = {
900: '#022127',
};
+const grey = {
+ 200: '#d0d7de',
+ 700: '#424a53',
+};
+
+function useIsDarkMode() {
+ const theme = useTheme();
+ return theme.palette.mode === 'dark';
+}
+
function Styles() {
+ // Replace this with your app logic for determining dark mode
+ const isDarkMode = useIsDarkMode();
return (
+ .CustomButton {
+ font-family: IBM Plex Sans, sans-serif;
+ font-weight: 600;
+ font-size: 0.875rem;
+ line-height: 1.5;
+ background-color: ${cyan[500]};
+ padding: 8px 16px;
+ border-radius: 8px;
+ color: white;
+ transition: all 150ms ease;
+ cursor: pointer;
+ border: 1px solid ${cyan[500]};
+ box-shadow: 0 2px 1px ${
+ isDarkMode ? 'rgba(0, 0, 0, 0.5)' : 'rgba(45, 45, 60, 0.2)'
+ }, inset 0 1.5px 1px ${cyan[400]}, inset 0 -2px 1px ${cyan[600]};
+ }
+ .CustomButton:hover {
+ background-color: ${cyan[600]};
+ }
+ .CustomButton:active {
+ background-color: ${cyan[700]};
+ }
+ .CustomButton:focusVisible {
+ box-shadow: 0 0 0 4px ${isDarkMode ? cyan[300] : cyan[200]};
+ outline: none;
+ }
+ .CustomButton[aria-disabled='true'] {
+ background-color: ${isDarkMode ? grey[700] : grey[200]};
+ color: ${isDarkMode ? grey[200] : grey[700]};
+ border: 0;
+ cursor: not-allowed;
+ box-shadow: none;
+ }
+ `}
);
}
diff --git a/docs/data/base/components/button/UnstyledButtonsSpan/css/index.tsx b/docs/data/base/components/button/UnstyledButtonsSpan/css/index.tsx
index 07b3949ac8f65e..4b73dbd2e18a0b 100644
--- a/docs/data/base/components/button/UnstyledButtonsSpan/css/index.tsx
+++ b/docs/data/base/components/button/UnstyledButtonsSpan/css/index.tsx
@@ -1,5 +1,6 @@
import * as React from 'react';
-import { Button, buttonClasses } from '@mui/base/Button';
+import { Button } from '@mui/base/Button';
+import { useTheme } from '@mui/system';
import Stack from '@mui/material/Stack';
export default function UnstyledButtonsSpan() {
@@ -31,32 +32,54 @@ const cyan = {
900: '#022127',
};
+const grey = {
+ 200: '#d0d7de',
+ 700: '#424a53',
+};
+
+function useIsDarkMode() {
+ const theme = useTheme();
+ return theme.palette.mode === 'dark';
+}
+
function Styles() {
+ // Replace this with your app logic for determining dark mode
+ const isDarkMode = useIsDarkMode();
return (
+ .CustomButton {
+ font-family: IBM Plex Sans, sans-serif;
+ font-weight: 600;
+ font-size: 0.875rem;
+ line-height: 1.5;
+ background-color: ${cyan[500]};
+ padding: 8px 16px;
+ border-radius: 8px;
+ color: white;
+ transition: all 150ms ease;
+ cursor: pointer;
+ border: 1px solid ${cyan[500]};
+ box-shadow: 0 2px 1px ${
+ isDarkMode ? 'rgba(0, 0, 0, 0.5)' : 'rgba(45, 45, 60, 0.2)'
+ }, inset 0 1.5px 1px ${cyan[400]}, inset 0 -2px 1px ${cyan[600]};
+ }
+ .CustomButton:hover {
+ background-color: ${cyan[600]};
+ }
+ .CustomButton:active {
+ background-color: ${cyan[700]};
+ }
+ .CustomButton:focusVisible {
+ box-shadow: 0 0 0 4px ${isDarkMode ? cyan[300] : cyan[200]};
+ outline: none;
+ }
+ .CustomButton[aria-disabled='true'] {
+ background-color: ${isDarkMode ? grey[700] : grey[200]};
+ color: ${isDarkMode ? grey[200] : grey[700]};
+ border: 0;
+ cursor: not-allowed;
+ box-shadow: none;
+ }
+ `}
);
}
diff --git a/docs/data/base/components/button/UnstyledButtonsSpan/system/index.js b/docs/data/base/components/button/UnstyledButtonsSpan/system/index.js
index e4933ae60abfac..8bba4b2d3f951c 100644
--- a/docs/data/base/components/button/UnstyledButtonsSpan/system/index.js
+++ b/docs/data/base/components/button/UnstyledButtonsSpan/system/index.js
@@ -1,5 +1,5 @@
import * as React from 'react';
-import { Button as BaseButton, buttonClasses } from '@mui/base/Button';
+import { Button as BaseButton } from '@mui/base/Button';
import { styled } from '@mui/system';
import Stack from '@mui/material/Stack';
@@ -15,39 +15,60 @@ export default function UnstyledButtonsSpan() {
}
const blue = {
+ 200: '#99CCFF',
+ 300: '#66B2FF',
+ 400: '#3399FF',
500: '#007FFF',
600: '#0072E5',
- 700: '#0059B2',
+ 700: '#0066CC',
};
-const Button = styled(BaseButton)`
- font-family: 'IBM Plex Sans', sans-serif;
+const grey = {
+ 200: '#d0d7de',
+ 700: '#424a53',
+};
+
+const Button = styled(BaseButton)(
+ ({ theme }) => `
+ font-family: IBM Plex Sans, sans-serif;
+ font-weight: 600;
font-size: 0.875rem;
line-height: 1.5;
background-color: ${blue[500]};
- color: white;
- border-radius: 8px;
- font-weight: 600;
padding: 8px 16px;
- cursor: pointer;
+ border-radius: 8px;
+ color: white;
transition: all 150ms ease;
- border: none;
+ cursor: pointer;
+ border: 1px solid ${blue[500]};
+ box-shadow: 0 2px 1px ${
+ theme.palette.mode === 'dark' ? 'rgba(0, 0, 0, 0.5)' : 'rgba(45, 45, 60, 0.2)'
+ }, inset 0 1.5px 1px ${blue[400]}, inset 0 -2px 1px ${blue[600]};
&:hover {
background-color: ${blue[600]};
}
- &.${buttonClasses.active} {
+ &:active {
background-color: ${blue[700]};
+ box-shadow: none;
}
- &.${buttonClasses.focusVisible} {
- box-shadow: 0 4px 20px 0 rgb(61 71 82 / 0.1), 0 0 0 5px rgb(0 127 255 / 0.5);
+ &:focus-visible {
+ box-shadow: 0 0 0 4px ${theme.palette.mode === 'dark' ? blue[300] : blue[200]};
outline: none;
}
- &.${buttonClasses.disabled} {
- opacity: 0.5;
+ &.Mui-disabled {
+ background-color: ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
+ color: ${theme.palette.mode === 'dark' ? grey[200] : grey[700]};
+ border: 1px solid ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
cursor: not-allowed;
+ box-shadow: none;
+ }
+
+ &.Mui-disabled:hover {
+ background-color: ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
}
-`;
+`,
+);
diff --git a/docs/data/base/components/button/UnstyledButtonsSpan/system/index.tsx b/docs/data/base/components/button/UnstyledButtonsSpan/system/index.tsx
index fb788475dc3a32..8bba4b2d3f951c 100644
--- a/docs/data/base/components/button/UnstyledButtonsSpan/system/index.tsx
+++ b/docs/data/base/components/button/UnstyledButtonsSpan/system/index.tsx
@@ -1,12 +1,7 @@
import * as React from 'react';
-import {
- Button as BaseButton,
- buttonClasses,
- ButtonTypeMap,
-} from '@mui/base/Button';
+import { Button as BaseButton } from '@mui/base/Button';
import { styled } from '@mui/system';
import Stack from '@mui/material/Stack';
-import { PolymorphicComponent } from '@mui/base/utils';
export default function UnstyledButtonsSpan() {
return (
@@ -20,39 +15,60 @@ export default function UnstyledButtonsSpan() {
}
const blue = {
+ 200: '#99CCFF',
+ 300: '#66B2FF',
+ 400: '#3399FF',
500: '#007FFF',
600: '#0072E5',
- 700: '#0059B2',
+ 700: '#0066CC',
};
-const Button = styled(BaseButton)`
- font-family: 'IBM Plex Sans', sans-serif;
+const grey = {
+ 200: '#d0d7de',
+ 700: '#424a53',
+};
+
+const Button = styled(BaseButton)(
+ ({ theme }) => `
+ font-family: IBM Plex Sans, sans-serif;
+ font-weight: 600;
font-size: 0.875rem;
line-height: 1.5;
background-color: ${blue[500]};
- color: white;
- border-radius: 8px;
- font-weight: 600;
padding: 8px 16px;
- cursor: pointer;
+ border-radius: 8px;
+ color: white;
transition: all 150ms ease;
- border: none;
+ cursor: pointer;
+ border: 1px solid ${blue[500]};
+ box-shadow: 0 2px 1px ${
+ theme.palette.mode === 'dark' ? 'rgba(0, 0, 0, 0.5)' : 'rgba(45, 45, 60, 0.2)'
+ }, inset 0 1.5px 1px ${blue[400]}, inset 0 -2px 1px ${blue[600]};
&:hover {
background-color: ${blue[600]};
}
- &.${buttonClasses.active} {
+ &:active {
background-color: ${blue[700]};
+ box-shadow: none;
}
- &.${buttonClasses.focusVisible} {
- box-shadow: 0 4px 20px 0 rgb(61 71 82 / 0.1), 0 0 0 5px rgb(0 127 255 / 0.5);
+ &:focus-visible {
+ box-shadow: 0 0 0 4px ${theme.palette.mode === 'dark' ? blue[300] : blue[200]};
outline: none;
}
- &.${buttonClasses.disabled} {
- opacity: 0.5;
+ &.Mui-disabled {
+ background-color: ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
+ color: ${theme.palette.mode === 'dark' ? grey[200] : grey[700]};
+ border: 1px solid ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
cursor: not-allowed;
+ box-shadow: none;
+ }
+
+ &.Mui-disabled:hover {
+ background-color: ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
}
-` as PolymorphicComponent;
+`,
+);
diff --git a/docs/data/base/components/button/UnstyledButtonsSpan/tailwind/index.js b/docs/data/base/components/button/UnstyledButtonsSpan/tailwind/index.js
index 1413e86cb49628..5fd52f0d74ea8f 100644
--- a/docs/data/base/components/button/UnstyledButtonsSpan/tailwind/index.js
+++ b/docs/data/base/components/button/UnstyledButtonsSpan/tailwind/index.js
@@ -3,32 +3,55 @@ import PropTypes from 'prop-types';
import { Button as BaseButton } from '@mui/base/Button';
import Stack from '@mui/material/Stack';
import clsx from 'clsx';
+import { useTheme } from '@mui/system';
+
+function useIsDarkMode() {
+ const theme = useTheme();
+ return theme.palette.mode === 'dark';
+}
export default function UnstyledButtonsSimple() {
+ // Replace this with your app logic for determining dark mode
+ const isDarkMode = useIsDarkMode();
+
return (
-
-
-
-
+
+
+
+ Button
+
+
+ Disabled
+
+
+
);
}
-const Button = React.forwardRef((props, ref) => {
- const { className, ...other } = props;
+const CustomButton = React.forwardRef((props, ref) => {
+ const { className, disabled, ...other } = props;
return (
);
});
-Button.propTypes = {
+CustomButton.propTypes = {
className: PropTypes.string,
+ /**
+ * If `true`, the component is disabled.
+ * @default false
+ */
+ disabled: PropTypes.bool,
};
diff --git a/docs/data/base/components/button/UnstyledButtonsSpan/tailwind/index.tsx b/docs/data/base/components/button/UnstyledButtonsSpan/tailwind/index.tsx
index 2f3356ffac01e4..4e7aef776baed9 100644
--- a/docs/data/base/components/button/UnstyledButtonsSpan/tailwind/index.tsx
+++ b/docs/data/base/components/button/UnstyledButtonsSpan/tailwind/index.tsx
@@ -2,28 +2,48 @@ import * as React from 'react';
import { Button as BaseButton, ButtonProps } from '@mui/base/Button';
import Stack from '@mui/material/Stack';
import clsx from 'clsx';
+import { useTheme } from '@mui/system';
+
+function useIsDarkMode() {
+ const theme = useTheme();
+ return theme.palette.mode === 'dark';
+}
export default function UnstyledButtonsSimple() {
+ // Replace this with your app logic for determining dark mode
+ const isDarkMode = useIsDarkMode();
+
return (
-
-
-
-
+
+
+
+ Button
+
+
+ Disabled
+
+
+
);
}
-const Button = React.forwardRef((props, ref) => {
- const { className, ...other } = props;
- return (
-
- );
-});
+const CustomButton = React.forwardRef(
+ (props, ref) => {
+ const { className, disabled, ...other } = props;
+ return (
+
+ );
+ },
+);
diff --git a/docs/data/base/components/button/UnstyledButtonsSpan/tailwind/index.tsx.preview b/docs/data/base/components/button/UnstyledButtonsSpan/tailwind/index.tsx.preview
index 1a2ded5e53c887..6eae560418bde6 100644
--- a/docs/data/base/components/button/UnstyledButtonsSpan/tailwind/index.tsx.preview
+++ b/docs/data/base/components/button/UnstyledButtonsSpan/tailwind/index.tsx.preview
@@ -1,4 +1,8 @@
-
-
\ No newline at end of file
+
+
+ Button
+
+
+ Disabled
+
+
\ No newline at end of file
diff --git a/docs/data/base/components/button/UnstyledLinkButton.js b/docs/data/base/components/button/UnstyledLinkButton.js
index ddddc49946132c..8ddf9a4a4fd5b0 100644
--- a/docs/data/base/components/button/UnstyledLinkButton.js
+++ b/docs/data/base/components/button/UnstyledLinkButton.js
@@ -1,5 +1,5 @@
import * as React from 'react';
-import { Button as BaseButton, buttonClasses } from '@mui/base/Button';
+import { Button as BaseButton } from '@mui/base/Button';
import { styled } from '@mui/system';
import Stack from '@mui/material/Stack';
import Link from 'next/link';
@@ -16,43 +16,60 @@ export default function UnstyledLinkButton() {
}
const blue = {
+ 200: '#99CCFF',
+ 300: '#66B2FF',
+ 400: '#3399FF',
500: '#007FFF',
600: '#0072E5',
- 700: '#0059B2',
+ 700: '#0066CC',
};
const grey = {
- 100: '#eaeef2',
- 300: '#afb8c1',
- 900: '#24292f',
+ 200: '#d0d7de',
+ 700: '#424a53',
};
const Button = styled(BaseButton)(
({ theme }) => `
font-family: IBM Plex Sans, sans-serif;
- font-weight: bold;
+ font-weight: 600;
font-size: 0.875rem;
+ line-height: 1.5;
background-color: ${blue[500]};
padding: 8px 16px;
border-radius: 8px;
- line-height: 1.5;
color: white;
transition: all 150ms ease;
cursor: pointer;
- border: none;
- box-shadow: 0px 4px 30px ${theme.palette.mode === 'dark' ? grey[900] : grey[100]};
+ border: 1px solid ${blue[500]};
+ box-shadow: 0 2px 1px ${
+ theme.palette.mode === 'dark' ? 'rgba(0, 0, 0, 0.5)' : 'rgba(45, 45, 60, 0.2)'
+ }, inset 0 1.5px 1px ${blue[400]}, inset 0 -2px 1px ${blue[600]};
&:hover {
background-color: ${blue[600]};
}
- &.${buttonClasses.active} {
+ &:active {
background-color: ${blue[700]};
+ box-shadow: none;
}
- &.${buttonClasses.focusVisible} {
- box-shadow: 0 3px 20px 0 rgba(61, 71, 82, 0.1), 0 0 0 5px rgba(0, 127, 255, 0.5);
+ &:focus-visible {
+ box-shadow: 0 0 0 4px ${theme.palette.mode === 'dark' ? blue[300] : blue[200]};
outline: none;
}
+
+ &:disabled {
+ background-color: ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
+ color: ${theme.palette.mode === 'dark' ? grey[200] : grey[700]};
+ border: 1px solid ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
+ cursor: not-allowed;
+ box-shadow: none;
+
+ &:hover {
+ background-color: ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
+ }
+ }
`,
);
diff --git a/docs/data/base/components/button/UnstyledLinkButton.tsx b/docs/data/base/components/button/UnstyledLinkButton.tsx
index ddddc49946132c..8ddf9a4a4fd5b0 100644
--- a/docs/data/base/components/button/UnstyledLinkButton.tsx
+++ b/docs/data/base/components/button/UnstyledLinkButton.tsx
@@ -1,5 +1,5 @@
import * as React from 'react';
-import { Button as BaseButton, buttonClasses } from '@mui/base/Button';
+import { Button as BaseButton } from '@mui/base/Button';
import { styled } from '@mui/system';
import Stack from '@mui/material/Stack';
import Link from 'next/link';
@@ -16,43 +16,60 @@ export default function UnstyledLinkButton() {
}
const blue = {
+ 200: '#99CCFF',
+ 300: '#66B2FF',
+ 400: '#3399FF',
500: '#007FFF',
600: '#0072E5',
- 700: '#0059B2',
+ 700: '#0066CC',
};
const grey = {
- 100: '#eaeef2',
- 300: '#afb8c1',
- 900: '#24292f',
+ 200: '#d0d7de',
+ 700: '#424a53',
};
const Button = styled(BaseButton)(
({ theme }) => `
font-family: IBM Plex Sans, sans-serif;
- font-weight: bold;
+ font-weight: 600;
font-size: 0.875rem;
+ line-height: 1.5;
background-color: ${blue[500]};
padding: 8px 16px;
border-radius: 8px;
- line-height: 1.5;
color: white;
transition: all 150ms ease;
cursor: pointer;
- border: none;
- box-shadow: 0px 4px 30px ${theme.palette.mode === 'dark' ? grey[900] : grey[100]};
+ border: 1px solid ${blue[500]};
+ box-shadow: 0 2px 1px ${
+ theme.palette.mode === 'dark' ? 'rgba(0, 0, 0, 0.5)' : 'rgba(45, 45, 60, 0.2)'
+ }, inset 0 1.5px 1px ${blue[400]}, inset 0 -2px 1px ${blue[600]};
&:hover {
background-color: ${blue[600]};
}
- &.${buttonClasses.active} {
+ &:active {
background-color: ${blue[700]};
+ box-shadow: none;
}
- &.${buttonClasses.focusVisible} {
- box-shadow: 0 3px 20px 0 rgba(61, 71, 82, 0.1), 0 0 0 5px rgba(0, 127, 255, 0.5);
+ &:focus-visible {
+ box-shadow: 0 0 0 4px ${theme.palette.mode === 'dark' ? blue[300] : blue[200]};
outline: none;
}
+
+ &:disabled {
+ background-color: ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
+ color: ${theme.palette.mode === 'dark' ? grey[200] : grey[700]};
+ border: 1px solid ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
+ cursor: not-allowed;
+ box-shadow: none;
+
+ &:hover {
+ background-color: ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
+ }
+ }
`,
);
diff --git a/docs/data/base/components/button/UseButton.js b/docs/data/base/components/button/UseButton.js
index 86fa65d66bcef7..652eb00212fedf 100644
--- a/docs/data/base/components/button/UseButton.js
+++ b/docs/data/base/components/button/UseButton.js
@@ -45,39 +45,60 @@ export default function UseButton() {
}
const blue = {
+ 200: '#99CCFF',
+ 300: '#66B2FF',
+ 400: '#3399FF',
500: '#007FFF',
600: '#0072E5',
- 700: '#0059B2',
+ 700: '#0066CC',
};
-const CustomButtonRoot = styled('button')`
- font-family: 'IBM Plex Sans', sans-serif;
+const grey = {
+ 200: '#d0d7de',
+ 700: '#424a53',
+};
+
+const CustomButtonRoot = styled('button')(
+ ({ theme }) => `
+ font-family: IBM Plex Sans, sans-serif;
+ font-weight: 600;
font-size: 0.875rem;
line-height: 1.5;
background-color: ${blue[500]};
- color: white;
- border-radius: 8px;
- font-weight: 600;
padding: 8px 16px;
- cursor: pointer;
+ border-radius: 8px;
+ color: white;
transition: all 150ms ease;
- border: none;
+ cursor: pointer;
+ border: 1px solid ${blue[500]};
+ box-shadow: 0 2px 1px ${
+ theme.palette.mode === 'dark' ? 'rgba(0, 0, 0, 0.5)' : 'rgba(45, 45, 60, 0.2)'
+ }, inset 0 1.5px 1px ${blue[400]}, inset 0 -2px 1px ${blue[600]};
&:hover {
background-color: ${blue[600]};
}
- &.active {
+ &:active {
background-color: ${blue[700]};
+ box-shadow: none;
}
- &.focusVisible {
- box-shadow: 0 4px 20px 0 rgb(61 71 82 / 0.1), 0 0 0 5px rgb(0 127 255 / 0.5);
+ &:focus-visible {
+ box-shadow: 0 0 0 4px ${theme.palette.mode === 'dark' ? blue[300] : blue[200]};
outline: none;
}
- &.disabled {
- opacity: 0.5;
+ &:disabled {
+ background-color: ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
+ color: ${theme.palette.mode === 'dark' ? grey[200] : grey[700]};
+ border: 1px solid ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
cursor: not-allowed;
+ box-shadow: none;
+
+ &:hover {
+ background-color: ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
+ }
}
-`;
+`,
+);
diff --git a/docs/data/base/components/button/UseButton.tsx b/docs/data/base/components/button/UseButton.tsx
index 5a5186b11fdb42..51fa3861051cbe 100644
--- a/docs/data/base/components/button/UseButton.tsx
+++ b/docs/data/base/components/button/UseButton.tsx
@@ -38,39 +38,60 @@ export default function UseButton() {
}
const blue = {
+ 200: '#99CCFF',
+ 300: '#66B2FF',
+ 400: '#3399FF',
500: '#007FFF',
600: '#0072E5',
- 700: '#0059B2',
+ 700: '#0066CC',
};
-const CustomButtonRoot = styled('button')`
- font-family: 'IBM Plex Sans', sans-serif;
+const grey = {
+ 200: '#d0d7de',
+ 700: '#424a53',
+};
+
+const CustomButtonRoot = styled('button')(
+ ({ theme }) => `
+ font-family: IBM Plex Sans, sans-serif;
+ font-weight: 600;
font-size: 0.875rem;
line-height: 1.5;
background-color: ${blue[500]};
- color: white;
- border-radius: 8px;
- font-weight: 600;
padding: 8px 16px;
- cursor: pointer;
+ border-radius: 8px;
+ color: white;
transition: all 150ms ease;
- border: none;
+ cursor: pointer;
+ border: 1px solid ${blue[500]};
+ box-shadow: 0 2px 1px ${
+ theme.palette.mode === 'dark' ? 'rgba(0, 0, 0, 0.5)' : 'rgba(45, 45, 60, 0.2)'
+ }, inset 0 1.5px 1px ${blue[400]}, inset 0 -2px 1px ${blue[600]};
&:hover {
background-color: ${blue[600]};
}
- &.active {
+ &:active {
background-color: ${blue[700]};
+ box-shadow: none;
}
- &.focusVisible {
- box-shadow: 0 4px 20px 0 rgb(61 71 82 / 0.1), 0 0 0 5px rgb(0 127 255 / 0.5);
+ &:focus-visible {
+ box-shadow: 0 0 0 4px ${theme.palette.mode === 'dark' ? blue[300] : blue[200]};
outline: none;
}
- &.disabled {
- opacity: 0.5;
+ &:disabled {
+ background-color: ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
+ color: ${theme.palette.mode === 'dark' ? grey[200] : grey[700]};
+ border: 1px solid ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
cursor: not-allowed;
+ box-shadow: none;
+
+ &:hover {
+ background-color: ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
+ }
}
-`;
+`,
+);
diff --git a/docs/data/base/components/form-control/BasicFormControl/css/index.js b/docs/data/base/components/form-control/BasicFormControl/css/index.js
index 457b77cfc28f04..acc31a00f807c0 100644
--- a/docs/data/base/components/form-control/BasicFormControl/css/index.js
+++ b/docs/data/base/components/form-control/BasicFormControl/css/index.js
@@ -119,22 +119,24 @@ function Styles() {
{`
.CustomInput .${inputClasses.input} {
width: 320px;
- font-size: 0.875rem;
font-family: IBM Plex Sans, sans-serif;
+ font-size: 0.875rem;
font-weight: 400;
line-height: 1.5;
padding: 8px 12px;
border-radius: 8px;
color: ${isDarkMode ? grey[300] : grey[900]};
background: ${isDarkMode ? grey[900] : '#fff'};
- border: 1px solid ${isDarkMode ? grey[800] : grey[300]};
+ border: 1px solid ${isDarkMode ? grey[700] : grey[200]};
+ box-shadow: 0px 2px 2px ${isDarkMode ? grey[900] : grey[50]};
}
- .CustomInput .${inputClasses.input}:hover {
- background: ${isDarkMode ? '' : grey[100]};
- border-color: ${isDarkMode ? grey[700] : grey[400]};
+ .CustomInput .${inputClasses.input}:hover {
+ border-color: ${cyan[400]};
}
- .CustomInput .${inputClasses.input}:focus {
- outline: 3px solid ${isDarkMode ? cyan[600] : cyan[100]};
+ .CustomInput .${inputClasses.input}:focus {
+ outline: 0;
+ border-color: ${cyan[400]};
+ box-shadow: 0 0 0 3px ${isDarkMode ? cyan[600] : cyan[200]};
}
`}
diff --git a/docs/data/base/components/form-control/BasicFormControl/css/index.tsx b/docs/data/base/components/form-control/BasicFormControl/css/index.tsx
index 46197fae28b4ac..f18df60da0ef5f 100644
--- a/docs/data/base/components/form-control/BasicFormControl/css/index.tsx
+++ b/docs/data/base/components/form-control/BasicFormControl/css/index.tsx
@@ -119,22 +119,24 @@ function Styles() {
{`
.CustomInput .${inputClasses.input} {
width: 320px;
- font-size: 0.875rem;
font-family: IBM Plex Sans, sans-serif;
+ font-size: 0.875rem;
font-weight: 400;
line-height: 1.5;
padding: 8px 12px;
border-radius: 8px;
color: ${isDarkMode ? grey[300] : grey[900]};
background: ${isDarkMode ? grey[900] : '#fff'};
- border: 1px solid ${isDarkMode ? grey[800] : grey[300]};
+ border: 1px solid ${isDarkMode ? grey[700] : grey[200]};
+ box-shadow: 0px 2px 2px ${isDarkMode ? grey[900] : grey[50]};
}
- .CustomInput .${inputClasses.input}:hover {
- background: ${isDarkMode ? '' : grey[100]};
- border-color: ${isDarkMode ? grey[700] : grey[400]};
+ .CustomInput .${inputClasses.input}:hover {
+ border-color: ${cyan[400]};
}
- .CustomInput .${inputClasses.input}:focus {
- outline: 3px solid ${isDarkMode ? cyan[600] : cyan[100]};
+ .CustomInput .${inputClasses.input}:focus {
+ outline: 0;
+ border-color: ${cyan[400]};
+ box-shadow: 0 0 0 3px ${isDarkMode ? cyan[600] : cyan[200]};
}
`}
diff --git a/docs/data/base/components/form-control/BasicFormControl/system/index.js b/docs/data/base/components/form-control/BasicFormControl/system/index.js
index f2b89b5af1061b..d3a401bd831183 100644
--- a/docs/data/base/components/form-control/BasicFormControl/system/index.js
+++ b/docs/data/base/components/form-control/BasicFormControl/system/index.js
@@ -19,23 +19,25 @@ const StyledInput = styled(Input)(
.${inputClasses.input} {
width: 320px;
- font-size: 0.875rem;
font-family: IBM Plex Sans, sans-serif;
+ font-size: 0.875rem;
font-weight: 400;
line-height: 1.5;
- color: ${theme.palette.mode === 'dark' ? grey[300] : grey[900]};
- background: ${theme.palette.mode === 'dark' ? grey[900] : '#fff'};
- border: 1px solid ${theme.palette.mode === 'dark' ? grey[800] : grey[300]};
padding: 8px 12px;
border-radius: 8px;
+ color: ${theme.palette.mode === 'dark' ? grey[300] : grey[900]};
+ background: ${theme.palette.mode === 'dark' ? grey[900] : '#fff'};
+ border: 1px solid ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
+ box-shadow: 0px 2px 2px ${theme.palette.mode === 'dark' ? grey[900] : grey[50]};
&:hover {
- background: ${theme.palette.mode === 'dark' ? '' : grey[100]};
- border-color: ${theme.palette.mode === 'dark' ? grey[700] : grey[400]};
+ border-color: ${blue[400]};
}
&:focus {
- outline: 3px solid ${theme.palette.mode === 'dark' ? blue[600] : blue[100]};
+ outline: 0;
+ border-color: ${blue[400]};
+ box-shadow: 0 0 0 3px ${theme.palette.mode === 'dark' ? blue[600] : blue[200]};
}
}
`,
@@ -99,9 +101,11 @@ const HelperText = styled((props) => {
const blue = {
100: '#DAECFF',
- 200: '#80BFFF',
+ 200: '#b6daff',
400: '#3399FF',
+ 500: '#007FFF',
600: '#0072E5',
+ 900: '#003A75',
};
const grey = {
diff --git a/docs/data/base/components/form-control/BasicFormControl/system/index.tsx b/docs/data/base/components/form-control/BasicFormControl/system/index.tsx
index a76d389e9f983c..23b80503f934f1 100644
--- a/docs/data/base/components/form-control/BasicFormControl/system/index.tsx
+++ b/docs/data/base/components/form-control/BasicFormControl/system/index.tsx
@@ -19,23 +19,25 @@ const StyledInput = styled(Input)(
.${inputClasses.input} {
width: 320px;
- font-size: 0.875rem;
font-family: IBM Plex Sans, sans-serif;
+ font-size: 0.875rem;
font-weight: 400;
line-height: 1.5;
- color: ${theme.palette.mode === 'dark' ? grey[300] : grey[900]};
- background: ${theme.palette.mode === 'dark' ? grey[900] : '#fff'};
- border: 1px solid ${theme.palette.mode === 'dark' ? grey[800] : grey[300]};
padding: 8px 12px;
border-radius: 8px;
+ color: ${theme.palette.mode === 'dark' ? grey[300] : grey[900]};
+ background: ${theme.palette.mode === 'dark' ? grey[900] : '#fff'};
+ border: 1px solid ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
+ box-shadow: 0px 2px 2px ${theme.palette.mode === 'dark' ? grey[900] : grey[50]};
&:hover {
- background: ${theme.palette.mode === 'dark' ? '' : grey[100]};
- border-color: ${theme.palette.mode === 'dark' ? grey[700] : grey[400]};
+ border-color: ${blue[400]};
}
&:focus {
- outline: 3px solid ${theme.palette.mode === 'dark' ? blue[600] : blue[100]};
+ outline: 0;
+ border-color: ${blue[400]};
+ box-shadow: 0 0 0 3px ${theme.palette.mode === 'dark' ? blue[600] : blue[200]};
}
}
`,
@@ -101,9 +103,11 @@ const HelperText = styled((props: {}) => {
const blue = {
100: '#DAECFF',
- 200: '#80BFFF',
+ 200: '#b6daff',
400: '#3399FF',
+ 500: '#007FFF',
600: '#0072E5',
+ 900: '#003A75',
};
const grey = {
diff --git a/docs/data/base/components/form-control/BasicFormControl/tailwind/index.js b/docs/data/base/components/form-control/BasicFormControl/tailwind/index.js
index 70cc33b485a2ce..a256d4d8ff650f 100644
--- a/docs/data/base/components/form-control/BasicFormControl/tailwind/index.js
+++ b/docs/data/base/components/form-control/BasicFormControl/tailwind/index.js
@@ -23,7 +23,7 @@ export default function BasicFormControl() {
slotProps={{
input: {
className:
- 'w-80 text-sm font-normal font-sans leading-normal text-slate-900 dark:text-slate-300 bg-white dark:bg-slate-800 border border-solid border-slate-200 dark:border-slate-700 px-3 py-2 rounded-lg hover:bg-slate-100 hover:dark:bg-slate-900 hover:border-slate-400 hover:dark:border-slate-700 focus:outline-0 focus:shadow-outline-purple',
+ 'w-80 text-sm font-sans font-normal leading-5 px-3 py-2 rounded-lg shadow-md shadow-slate-100 dark:shadow-slate-900 focus:shadow-outline-purple dark:focus:shadow-outline-purple focus:shadow-lg border border-solid border-slate-300 hover:border-purple-500 dark:hover:border-purple-500 focus:border-purple-500 dark:focus:border-purple-500 dark:border-slate-600 bg-white dark:bg-slate-900 text-slate-900 dark:text-slate-300 focus-visible:outline-0',
},
}}
/>
diff --git a/docs/data/base/components/form-control/BasicFormControl/tailwind/index.tsx b/docs/data/base/components/form-control/BasicFormControl/tailwind/index.tsx
index 075842a9b4edf1..d3cbca6446e435 100644
--- a/docs/data/base/components/form-control/BasicFormControl/tailwind/index.tsx
+++ b/docs/data/base/components/form-control/BasicFormControl/tailwind/index.tsx
@@ -22,7 +22,7 @@ export default function BasicFormControl() {
slotProps={{
input: {
className:
- 'w-80 text-sm font-normal font-sans leading-normal text-slate-900 dark:text-slate-300 bg-white dark:bg-slate-800 border border-solid border-slate-200 dark:border-slate-700 px-3 py-2 rounded-lg hover:bg-slate-100 hover:dark:bg-slate-900 hover:border-slate-400 hover:dark:border-slate-700 focus:outline-0 focus:shadow-outline-purple',
+ 'w-80 text-sm font-sans font-normal leading-5 px-3 py-2 rounded-lg shadow-md shadow-slate-100 dark:shadow-slate-900 focus:shadow-outline-purple dark:focus:shadow-outline-purple focus:shadow-lg border border-solid border-slate-300 hover:border-purple-500 dark:hover:border-purple-500 focus:border-purple-500 dark:focus:border-purple-500 dark:border-slate-600 bg-white dark:bg-slate-900 text-slate-900 dark:text-slate-300 focus-visible:outline-0',
},
}}
/>
diff --git a/docs/data/base/components/form-control/BasicFormControl/tailwind/index.tsx.preview b/docs/data/base/components/form-control/BasicFormControl/tailwind/index.tsx.preview
index c2e8de0d897c7d..f5d74c426a9415 100644
--- a/docs/data/base/components/form-control/BasicFormControl/tailwind/index.tsx.preview
+++ b/docs/data/base/components/form-control/BasicFormControl/tailwind/index.tsx.preview
@@ -5,7 +5,7 @@
slotProps={{
input: {
className:
- 'w-80 text-sm font-normal font-sans leading-normal text-slate-900 dark:text-slate-300 bg-white dark:bg-slate-800 border border-solid border-slate-200 dark:border-slate-700 px-3 py-2 rounded-lg hover:bg-slate-100 hover:dark:bg-slate-900 hover:border-slate-400 hover:dark:border-slate-700 focus:outline-0 focus:shadow-outline-purple',
+ 'w-80 text-sm font-sans font-normal leading-5 px-3 py-2 rounded-lg shadow-md shadow-slate-100 dark:shadow-slate-900 focus:shadow-outline-purple dark:focus:shadow-outline-purple focus:shadow-lg border border-solid border-slate-300 hover:border-purple-500 dark:hover:border-purple-500 focus:border-purple-500 dark:focus:border-purple-500 dark:border-slate-600 bg-white dark:bg-slate-900 text-slate-900 dark:text-slate-300 focus-visible:outline-0',
},
}}
/>
diff --git a/docs/data/base/components/form-control/FormControlFunctionChild.js b/docs/data/base/components/form-control/FormControlFunctionChild.js
index 1d15c03b3e2ff4..c766da4a0de5d8 100644
--- a/docs/data/base/components/form-control/FormControlFunctionChild.js
+++ b/docs/data/base/components/form-control/FormControlFunctionChild.js
@@ -22,23 +22,25 @@ const StyledInput = styled(Input)(
.${inputClasses.input} {
width: 320px;
- font-size: 0.875rem;
font-family: IBM Plex Sans, sans-serif;
+ font-size: 0.875rem;
font-weight: 400;
line-height: 1.5;
- color: ${theme.palette.mode === 'dark' ? grey[300] : grey[900]};
- background: ${theme.palette.mode === 'dark' ? grey[900] : grey[50]};
- border: 1px solid ${theme.palette.mode === 'dark' ? grey[800] : grey[300]};
+ padding: 8px 12px;
border-radius: 8px;
- padding: 12px 12px;
+ color: ${theme.palette.mode === 'dark' ? grey[300] : grey[900]};
+ background: ${theme.palette.mode === 'dark' ? grey[900] : '#fff'};
+ border: 1px solid ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
+ box-shadow: 0px 2px 2px ${theme.palette.mode === 'dark' ? grey[900] : grey[50]};
&:hover {
- background: ${theme.palette.mode === 'dark' ? '' : grey[100]};
- border-color: ${theme.palette.mode === 'dark' ? grey[700] : grey[400]};
+ border-color: ${blue[400]};
}
&:focus {
- outline: 3px solid ${theme.palette.mode === 'dark' ? blue[600] : blue[100]};
+ outline: 0;
+ border-color: ${blue[400]};
+ box-shadow: 0 0 0 3px ${theme.palette.mode === 'dark' ? blue[600] : blue[200]};
}
}
diff --git a/docs/data/base/components/form-control/FormControlFunctionChild.tsx b/docs/data/base/components/form-control/FormControlFunctionChild.tsx
index 2ec9f57b26b993..a952029df0cba8 100644
--- a/docs/data/base/components/form-control/FormControlFunctionChild.tsx
+++ b/docs/data/base/components/form-control/FormControlFunctionChild.tsx
@@ -22,23 +22,25 @@ const StyledInput = styled(Input)(
.${inputClasses.input} {
width: 320px;
- font-size: 0.875rem;
font-family: IBM Plex Sans, sans-serif;
+ font-size: 0.875rem;
font-weight: 400;
line-height: 1.5;
- color: ${theme.palette.mode === 'dark' ? grey[300] : grey[900]};
- background: ${theme.palette.mode === 'dark' ? grey[900] : grey[50]};
- border: 1px solid ${theme.palette.mode === 'dark' ? grey[800] : grey[300]};
+ padding: 8px 12px;
border-radius: 8px;
- padding: 12px 12px;
+ color: ${theme.palette.mode === 'dark' ? grey[300] : grey[900]};
+ background: ${theme.palette.mode === 'dark' ? grey[900] : '#fff'};
+ border: 1px solid ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
+ box-shadow: 0px 2px 2px ${theme.palette.mode === 'dark' ? grey[900] : grey[50]};
&:hover {
- background: ${theme.palette.mode === 'dark' ? '' : grey[100]};
- border-color: ${theme.palette.mode === 'dark' ? grey[700] : grey[400]};
+ border-color: ${blue[400]};
}
&:focus {
- outline: 3px solid ${theme.palette.mode === 'dark' ? blue[600] : blue[100]};
+ outline: 0;
+ border-color: ${blue[400]};
+ box-shadow: 0 0 0 3px ${theme.palette.mode === 'dark' ? blue[600] : blue[200]};
}
}
diff --git a/docs/data/base/components/input/InputAdornments.js b/docs/data/base/components/input/InputAdornments.js
index 53ccfa9ad38663..8ab68d2ff47854 100644
--- a/docs/data/base/components/input/InputAdornments.js
+++ b/docs/data/base/components/input/InputAdornments.js
@@ -1,11 +1,10 @@
import * as React from 'react';
import PropTypes from 'prop-types';
-import Box from '@mui/material/Box';
+import { Box, styled } from '@mui/system';
import { Button } from '@mui/base/Button';
import { Input as BaseInput, inputClasses } from '@mui/base/Input';
import Visibility from '@mui/icons-material/Visibility';
import VisibilityOff from '@mui/icons-material/VisibilityOff';
-import { styled } from '@mui/system';
const Input = React.forwardRef(function CustomInput(props, ref) {
const { slots, ...other } = props;
@@ -79,11 +78,16 @@ export default function InputAdornments() {
endAdornment={
- {values.showPassword ? : }
+ {values.showPassword ? (
+
+ ) : (
+
+ )}
}
@@ -98,6 +102,7 @@ const blue = {
400: '#3399FF',
500: '#007FFF',
600: '#0072E5',
+ 700: '#0059B2',
};
const grey = {
@@ -121,7 +126,9 @@ const InputRoot = styled('div')(
color: ${theme.palette.mode === 'dark' ? grey[300] : grey[500]};
background: ${theme.palette.mode === 'dark' ? grey[900] : '#fff'};
border: 1px solid ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
- box-shadow: 0px 2px 2px ${theme.palette.mode === 'dark' ? grey[900] : grey[50]};
+ box-shadow: 0px 2px 4px ${
+ theme.palette.mode === 'dark' ? 'rgba(0,0,0, 0.5)' : 'rgba(0,0,0, 0.05)'
+ };
display: flex;
align-items: center;
justify-content: center;
@@ -129,7 +136,7 @@ const InputRoot = styled('div')(
&.${inputClasses.focused} {
border-color: ${blue[400]};
- box-shadow: 0 0 0 3px ${theme.palette.mode === 'dark' ? blue[500] : blue[200]};
+ box-shadow: 0 0 0 3px ${theme.palette.mode === 'dark' ? blue[600] : blue[200]};
}
&:hover {
diff --git a/docs/data/base/components/input/InputAdornments.tsx b/docs/data/base/components/input/InputAdornments.tsx
index 3d48b596be6d66..4fda1c5368f3ef 100644
--- a/docs/data/base/components/input/InputAdornments.tsx
+++ b/docs/data/base/components/input/InputAdornments.tsx
@@ -1,10 +1,9 @@
import * as React from 'react';
-import Box from '@mui/material/Box';
+import { Box, styled } from '@mui/system';
import { Button } from '@mui/base/Button';
import { Input as BaseInput, InputProps, inputClasses } from '@mui/base/Input';
import Visibility from '@mui/icons-material/Visibility';
import VisibilityOff from '@mui/icons-material/VisibilityOff';
-import { styled } from '@mui/system';
const Input = React.forwardRef(function CustomInput(
props: InputProps,
@@ -77,11 +76,16 @@ export default function InputAdornments() {
endAdornment={
- {values.showPassword ? : }
+ {values.showPassword ? (
+
+ ) : (
+
+ )}
}
@@ -96,6 +100,7 @@ const blue = {
400: '#3399FF',
500: '#007FFF',
600: '#0072E5',
+ 700: '#0059B2',
};
const grey = {
@@ -119,7 +124,9 @@ const InputRoot = styled('div')(
color: ${theme.palette.mode === 'dark' ? grey[300] : grey[500]};
background: ${theme.palette.mode === 'dark' ? grey[900] : '#fff'};
border: 1px solid ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
- box-shadow: 0px 2px 2px ${theme.palette.mode === 'dark' ? grey[900] : grey[50]};
+ box-shadow: 0px 2px 4px ${
+ theme.palette.mode === 'dark' ? 'rgba(0,0,0, 0.5)' : 'rgba(0,0,0, 0.05)'
+ };
display: flex;
align-items: center;
justify-content: center;
@@ -127,7 +134,7 @@ const InputRoot = styled('div')(
&.${inputClasses.focused} {
border-color: ${blue[400]};
- box-shadow: 0 0 0 3px ${theme.palette.mode === 'dark' ? blue[500] : blue[200]};
+ box-shadow: 0 0 0 3px ${theme.palette.mode === 'dark' ? blue[600] : blue[200]};
}
&:hover {
diff --git a/docs/data/base/components/input/InputMultiline.js b/docs/data/base/components/input/InputMultiline.js
index 01815fac298d65..3d592879711ef9 100644
--- a/docs/data/base/components/input/InputMultiline.js
+++ b/docs/data/base/components/input/InputMultiline.js
@@ -7,7 +7,7 @@ const Input = React.forwardRef(function CustomInput(props, ref) {
`
- width: 320px;
- font-family: IBM Plex Sans, sans-serif;
- font-size: 0.875rem;
- font-weight: 400;
- line-height: 1.5;
- padding: 8px 12px;
- border-radius: 8px;
- color: ${theme.palette.mode === 'dark' ? grey[300] : grey[900]};
- background: ${theme.palette.mode === 'dark' ? grey[900] : '#fff'};
- border: 1px solid ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
- box-shadow: 0px 2px 2px ${theme.palette.mode === 'dark' ? grey[900] : grey[50]};
-
- &:hover {
- border-color: ${blue[400]};
- }
-
- &:focus {
- border-color: ${blue[400]};
- box-shadow: 0 0 0 3px ${theme.palette.mode === 'dark' ? blue[500] : blue[200]};
- }
-
- // firefox
- &:focus-visible {
- outline: 0;
- }
-`,
-);
-
const TextareaElement = styled('textarea', {
shouldForwardProp: (prop) =>
!['ownerState', 'minRows', 'maxRows'].includes(prop.toString()),
@@ -87,11 +58,13 @@ const TextareaElement = styled('textarea', {
font-weight: 400;
line-height: 1.5rem;
padding: 8px 12px;
- border-radius: 8px;
+ border-radius: 8px 8px 0 8px;
color: ${theme.palette.mode === 'dark' ? grey[300] : grey[900]};
background: ${theme.palette.mode === 'dark' ? grey[900] : '#fff'};
border: 1px solid ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
- box-shadow: 0px 2px 2px ${theme.palette.mode === 'dark' ? grey[900] : grey[50]};
+ box-shadow: 0px 2px 4px ${
+ theme.palette.mode === 'dark' ? 'rgba(0,0,0, 0.5)' : 'rgba(0,0,0, 0.05)'
+ };
&:hover {
border-color: ${blue[400]};
@@ -99,7 +72,7 @@ const TextareaElement = styled('textarea', {
&:focus {
border-color: ${blue[400]};
- box-shadow: 0 0 0 3px ${theme.palette.mode === 'dark' ? blue[500] : blue[200]};
+ box-shadow: 0 0 0 3px ${theme.palette.mode === 'dark' ? blue[700] : blue[200]};
}
// firefox
diff --git a/docs/data/base/components/input/InputMultiline.tsx b/docs/data/base/components/input/InputMultiline.tsx
index a3cd09d624a012..fab8f1be4cbf66 100644
--- a/docs/data/base/components/input/InputMultiline.tsx
+++ b/docs/data/base/components/input/InputMultiline.tsx
@@ -10,7 +10,7 @@ const Input = React.forwardRef(function CustomInput(
`
- width: 320px;
- font-family: IBM Plex Sans, sans-serif;
- font-size: 0.875rem;
- font-weight: 400;
- line-height: 1.5;
- padding: 8px 12px;
- border-radius: 8px;
- color: ${theme.palette.mode === 'dark' ? grey[300] : grey[900]};
- background: ${theme.palette.mode === 'dark' ? grey[900] : '#fff'};
- border: 1px solid ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
- box-shadow: 0px 2px 2px ${theme.palette.mode === 'dark' ? grey[900] : grey[50]};
-
- &:hover {
- border-color: ${blue[400]};
- }
-
- &:focus {
- border-color: ${blue[400]};
- box-shadow: 0 0 0 3px ${theme.palette.mode === 'dark' ? blue[500] : blue[200]};
- }
-
- // firefox
- &:focus-visible {
- outline: 0;
- }
-`,
-);
-
const TextareaElement = styled('textarea', {
shouldForwardProp: (prop) =>
!['ownerState', 'minRows', 'maxRows'].includes(prop.toString()),
@@ -90,11 +61,13 @@ const TextareaElement = styled('textarea', {
font-weight: 400;
line-height: 1.5rem;
padding: 8px 12px;
- border-radius: 8px;
+ border-radius: 8px 8px 0 8px;
color: ${theme.palette.mode === 'dark' ? grey[300] : grey[900]};
background: ${theme.palette.mode === 'dark' ? grey[900] : '#fff'};
border: 1px solid ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
- box-shadow: 0px 2px 2px ${theme.palette.mode === 'dark' ? grey[900] : grey[50]};
+ box-shadow: 0px 2px 4px ${
+ theme.palette.mode === 'dark' ? 'rgba(0,0,0, 0.5)' : 'rgba(0,0,0, 0.05)'
+ };
&:hover {
border-color: ${blue[400]};
@@ -102,7 +75,7 @@ const TextareaElement = styled('textarea', {
&:focus {
border-color: ${blue[400]};
- box-shadow: 0 0 0 3px ${theme.palette.mode === 'dark' ? blue[500] : blue[200]};
+ box-shadow: 0 0 0 3px ${theme.palette.mode === 'dark' ? blue[700] : blue[200]};
}
// firefox
diff --git a/docs/data/base/components/input/InputMultilineAutosize.js b/docs/data/base/components/input/InputMultilineAutosize.js
index dcc0779e5702c4..2026ecf40a5b4a 100644
--- a/docs/data/base/components/input/InputMultilineAutosize.js
+++ b/docs/data/base/components/input/InputMultilineAutosize.js
@@ -8,7 +8,7 @@ const Input = React.forwardRef(function CustomInput(props, ref) {
`
- width: 320px;
- font-family: IBM Plex Sans, sans-serif;
- font-size: 0.875rem;
- font-weight: 400;
- line-height: 1.5;
- padding: 8px 12px;
- border-radius: 8px;
- color: ${theme.palette.mode === 'dark' ? grey[300] : grey[900]};
- background: ${theme.palette.mode === 'dark' ? grey[900] : '#fff'};
- border: 1px solid ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
- box-shadow: 0px 2px 2px ${theme.palette.mode === 'dark' ? grey[900] : grey[50]};
-
- &:hover {
- border-color: ${blue[400]};
- }
-
- &:focus {
- border-color: ${blue[400]};
- box-shadow: 0 0 0 3px ${theme.palette.mode === 'dark' ? blue[500] : blue[200]};
- }
-
- // firefox
- &:focus-visible {
- outline: 0;
- }
-`,
-);
-
const TextareaElement = styled(TextareaAutosize)(
({ theme }) => `
width: 320px;
@@ -85,11 +56,13 @@ const TextareaElement = styled(TextareaAutosize)(
font-weight: 400;
line-height: 1.5rem;
padding: 8px 12px;
- border-radius: 8px;
+ border-radius: 8px 8px 0 8px;
color: ${theme.palette.mode === 'dark' ? grey[300] : grey[900]};
background: ${theme.palette.mode === 'dark' ? grey[900] : '#fff'};
border: 1px solid ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
- box-shadow: 0px 2px 2px ${theme.palette.mode === 'dark' ? grey[900] : grey[50]};
+ box-shadow: 0px 2px 4px ${
+ theme.palette.mode === 'dark' ? 'rgba(0,0,0, 0.5)' : 'rgba(0,0,0, 0.05)'
+ };
&:hover {
border-color: ${blue[400]};
diff --git a/docs/data/base/components/input/InputMultilineAutosize.tsx b/docs/data/base/components/input/InputMultilineAutosize.tsx
index 7f50f9eeea76f1..1cee3e28cf0351 100644
--- a/docs/data/base/components/input/InputMultilineAutosize.tsx
+++ b/docs/data/base/components/input/InputMultilineAutosize.tsx
@@ -11,7 +11,7 @@ const Input = React.forwardRef(function CustomInput(
`
- width: 320px;
- font-family: IBM Plex Sans, sans-serif;
- font-size: 0.875rem;
- font-weight: 400;
- line-height: 1.5;
- padding: 8px 12px;
- border-radius: 8px;
- color: ${theme.palette.mode === 'dark' ? grey[300] : grey[900]};
- background: ${theme.palette.mode === 'dark' ? grey[900] : '#fff'};
- border: 1px solid ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
- box-shadow: 0px 2px 2px ${theme.palette.mode === 'dark' ? grey[900] : grey[50]};
-
- &:hover {
- border-color: ${blue[400]};
- }
-
- &:focus {
- border-color: ${blue[400]};
- box-shadow: 0 0 0 3px ${theme.palette.mode === 'dark' ? blue[500] : blue[200]};
- }
-
- // firefox
- &:focus-visible {
- outline: 0;
- }
-`,
-);
-
const TextareaElement = styled(TextareaAutosize)(
({ theme }) => `
width: 320px;
@@ -88,11 +59,13 @@ const TextareaElement = styled(TextareaAutosize)(
font-weight: 400;
line-height: 1.5rem;
padding: 8px 12px;
- border-radius: 8px;
+ border-radius: 8px 8px 0 8px;
color: ${theme.palette.mode === 'dark' ? grey[300] : grey[900]};
background: ${theme.palette.mode === 'dark' ? grey[900] : '#fff'};
border: 1px solid ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
- box-shadow: 0px 2px 2px ${theme.palette.mode === 'dark' ? grey[900] : grey[50]};
+ box-shadow: 0px 2px 4px ${
+ theme.palette.mode === 'dark' ? 'rgba(0,0,0, 0.5)' : 'rgba(0,0,0, 0.05)'
+ };
&:hover {
border-color: ${blue[400]};
diff --git a/docs/data/base/components/input/UnstyledInputBasic/css/index.js b/docs/data/base/components/input/UnstyledInputBasic/css/index.js
index a64877d635bed1..267fffdaf76aee 100644
--- a/docs/data/base/components/input/UnstyledInputBasic/css/index.js
+++ b/docs/data/base/components/input/UnstyledInputBasic/css/index.js
@@ -72,7 +72,7 @@ function Styles() {
&:focus {
border-color: ${cyan[400]};
- box-shadow: 0 0 0 3px ${isDarkMode ? cyan[500] : cyan[200]};
+ box-shadow: 0 0 0 3px ${isDarkMode ? cyan[600] : cyan[200]};
}
&:focus-visible {
diff --git a/docs/data/base/components/input/UnstyledInputBasic/css/index.tsx b/docs/data/base/components/input/UnstyledInputBasic/css/index.tsx
index a64877d635bed1..267fffdaf76aee 100644
--- a/docs/data/base/components/input/UnstyledInputBasic/css/index.tsx
+++ b/docs/data/base/components/input/UnstyledInputBasic/css/index.tsx
@@ -72,7 +72,7 @@ function Styles() {
&:focus {
border-color: ${cyan[400]};
- box-shadow: 0 0 0 3px ${isDarkMode ? cyan[500] : cyan[200]};
+ box-shadow: 0 0 0 3px ${isDarkMode ? cyan[600] : cyan[200]};
}
&:focus-visible {
diff --git a/docs/data/base/components/input/UnstyledInputBasic/system/index.js b/docs/data/base/components/input/UnstyledInputBasic/system/index.js
index a2a77d121f090b..5e2411801ec107 100644
--- a/docs/data/base/components/input/UnstyledInputBasic/system/index.js
+++ b/docs/data/base/components/input/UnstyledInputBasic/system/index.js
@@ -51,7 +51,7 @@ const InputElement = styled('input')(
&:focus {
border-color: ${blue[400]};
- box-shadow: 0 0 0 3px ${theme.palette.mode === 'dark' ? blue[500] : blue[200]};
+ box-shadow: 0 0 0 3px ${theme.palette.mode === 'dark' ? blue[600] : blue[200]};
}
// firefox
diff --git a/docs/data/base/components/input/UnstyledInputBasic/system/index.tsx b/docs/data/base/components/input/UnstyledInputBasic/system/index.tsx
index a1a75d1be3b22c..18abe87b2be58e 100644
--- a/docs/data/base/components/input/UnstyledInputBasic/system/index.tsx
+++ b/docs/data/base/components/input/UnstyledInputBasic/system/index.tsx
@@ -54,7 +54,7 @@ const InputElement = styled('input')(
&:focus {
border-color: ${blue[400]};
- box-shadow: 0 0 0 3px ${theme.palette.mode === 'dark' ? blue[500] : blue[200]};
+ box-shadow: 0 0 0 3px ${theme.palette.mode === 'dark' ? blue[600] : blue[200]};
}
// firefox
diff --git a/docs/data/base/components/input/UnstyledInputIntroduction/css/index.js b/docs/data/base/components/input/UnstyledInputIntroduction/css/index.js
index 7db613fae34b34..d21a199bd02242 100644
--- a/docs/data/base/components/input/UnstyledInputIntroduction/css/index.js
+++ b/docs/data/base/components/input/UnstyledInputIntroduction/css/index.js
@@ -64,7 +64,9 @@ function Styles() {
color: ${isDarkMode ? grey[300] : grey[900]};
background: ${isDarkMode ? grey[900] : '#fff'};
border: 1px solid ${isDarkMode ? grey[700] : grey[200]};
- box-shadow: 0px 2px 24px ${isDarkMode ? cyan[800] : cyan[100]};
+ box-shadow: 0px 2px 4px ${
+ isDarkMode ? 'rgba(0,0,0, 0.5)' : 'rgba(0,0,0, 0.05)'
+ };
&:hover {
border-color: ${cyan[400]};
diff --git a/docs/data/base/components/input/UnstyledInputIntroduction/css/index.tsx b/docs/data/base/components/input/UnstyledInputIntroduction/css/index.tsx
index 7db613fae34b34..d21a199bd02242 100644
--- a/docs/data/base/components/input/UnstyledInputIntroduction/css/index.tsx
+++ b/docs/data/base/components/input/UnstyledInputIntroduction/css/index.tsx
@@ -64,7 +64,9 @@ function Styles() {
color: ${isDarkMode ? grey[300] : grey[900]};
background: ${isDarkMode ? grey[900] : '#fff'};
border: 1px solid ${isDarkMode ? grey[700] : grey[200]};
- box-shadow: 0px 2px 24px ${isDarkMode ? cyan[800] : cyan[100]};
+ box-shadow: 0px 2px 4px ${
+ isDarkMode ? 'rgba(0,0,0, 0.5)' : 'rgba(0,0,0, 0.05)'
+ };
&:hover {
border-color: ${cyan[400]};
diff --git a/docs/data/base/components/input/UnstyledInputIntroduction/system/index.js b/docs/data/base/components/input/UnstyledInputIntroduction/system/index.js
index 1a7ccc2f1608a2..639d71cb3df671 100644
--- a/docs/data/base/components/input/UnstyledInputIntroduction/system/index.js
+++ b/docs/data/base/components/input/UnstyledInputIntroduction/system/index.js
@@ -44,7 +44,9 @@ const InputElement = styled('input')(
color: ${theme.palette.mode === 'dark' ? grey[300] : grey[900]};
background: ${theme.palette.mode === 'dark' ? grey[900] : '#fff'};
border: 1px solid ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
- box-shadow: 0px 2px 24px ${theme.palette.mode === 'dark' ? blue[900] : blue[100]};
+ box-shadow: 0px 2px 4px ${
+ theme.palette.mode === 'dark' ? 'rgba(0,0,0, 0.5)' : 'rgba(0,0,0, 0.05)'
+ };
&:hover {
border-color: ${blue[400]};
diff --git a/docs/data/base/components/input/UnstyledInputIntroduction/system/index.tsx b/docs/data/base/components/input/UnstyledInputIntroduction/system/index.tsx
index f7da1c165b0de0..baa932fff2a6c3 100644
--- a/docs/data/base/components/input/UnstyledInputIntroduction/system/index.tsx
+++ b/docs/data/base/components/input/UnstyledInputIntroduction/system/index.tsx
@@ -47,7 +47,9 @@ const InputElement = styled('input')(
color: ${theme.palette.mode === 'dark' ? grey[300] : grey[900]};
background: ${theme.palette.mode === 'dark' ? grey[900] : '#fff'};
border: 1px solid ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
- box-shadow: 0px 2px 24px ${theme.palette.mode === 'dark' ? blue[900] : blue[100]};
+ box-shadow: 0px 2px 4px ${
+ theme.palette.mode === 'dark' ? 'rgba(0,0,0, 0.5)' : 'rgba(0,0,0, 0.05)'
+ };
&:hover {
border-color: ${blue[400]};
diff --git a/docs/data/base/components/input/UnstyledInputIntroduction/tailwind/index.js b/docs/data/base/components/input/UnstyledInputIntroduction/tailwind/index.js
index 863bce82d7ee99..f92fd7173a997c 100644
--- a/docs/data/base/components/input/UnstyledInputIntroduction/tailwind/index.js
+++ b/docs/data/base/components/input/UnstyledInputIntroduction/tailwind/index.js
@@ -34,7 +34,7 @@ const Input = React.forwardRef((props, ref) => {
return {
...resolvedSlotProps,
className: clsx(
- 'w-80 text-sm font-normal font-sans leading-5 px-3 py-2 rounded-lg shadow-md shadow-slate-100 dark:shadow-slate-900 focus:shadow-outline-purple dark:focus:shadow-outline-purple focus:shadow-lg border border-solid border-slate-300 hover:border-purple-500 dark:hover:border-purple-500 focus:border-purple-500 dark:focus:border-purple-500 dark:border-slate-600 bg-white dark:bg-slate-900 text-slate-900 dark:text-slate-300 focus-visible:outline-0',
+ 'w-80 text-sm font-normal font-sans leading-5 px-3 py-2 rounded-lg shadow-md shadow-slate-100 dark:shadow-slate-900 focus:shadow-outline-purple dark:focus:shadow-outline-purple dark:outline-purple-600 focus:shadow-lg border border-solid border-slate-300 hover:border-purple-500 dark:hover:border-purple-500 focus:border-purple-500 dark:focus:border-purple-600 dark:border-slate-600 bg-white dark:bg-slate-900 text-slate-900 dark:text-slate-300 focus-visible:outline-0',
resolvedSlotProps?.className,
),
};
diff --git a/docs/data/base/components/input/UnstyledInputIntroduction/tailwind/index.tsx b/docs/data/base/components/input/UnstyledInputIntroduction/tailwind/index.tsx
index 521b5e2b822c6e..102d996ae90908 100644
--- a/docs/data/base/components/input/UnstyledInputIntroduction/tailwind/index.tsx
+++ b/docs/data/base/components/input/UnstyledInputIntroduction/tailwind/index.tsx
@@ -34,7 +34,7 @@ const Input = React.forwardRef((props, ref) => {
return {
...resolvedSlotProps,
className: clsx(
- 'w-80 text-sm font-normal font-sans leading-5 px-3 py-2 rounded-lg shadow-md shadow-slate-100 dark:shadow-slate-900 focus:shadow-outline-purple dark:focus:shadow-outline-purple focus:shadow-lg border border-solid border-slate-300 hover:border-purple-500 dark:hover:border-purple-500 focus:border-purple-500 dark:focus:border-purple-500 dark:border-slate-600 bg-white dark:bg-slate-900 text-slate-900 dark:text-slate-300 focus-visible:outline-0',
+ 'w-80 text-sm font-normal font-sans leading-5 px-3 py-2 rounded-lg shadow-md shadow-slate-100 dark:shadow-slate-900 focus:shadow-outline-purple dark:focus:shadow-outline-purple dark:outline-purple-600 focus:shadow-lg border border-solid border-slate-300 hover:border-purple-500 dark:hover:border-purple-500 focus:border-purple-500 dark:focus:border-purple-600 dark:border-slate-600 bg-white dark:bg-slate-900 text-slate-900 dark:text-slate-300 focus-visible:outline-0',
resolvedSlotProps?.className,
),
};
diff --git a/docs/data/base/components/input/UseInput.js b/docs/data/base/components/input/UseInput.js
index ef81f4af696f38..55eb776818ef54 100644
--- a/docs/data/base/components/input/UseInput.js
+++ b/docs/data/base/components/input/UseInput.js
@@ -28,6 +28,7 @@ const blue = {
400: '#3399FF',
500: '#007FFF',
600: '#0072E5',
+ 700: '#0059B2',
};
const grey = {
@@ -55,7 +56,9 @@ const StyledInputElement = styled('input')(
color: ${theme.palette.mode === 'dark' ? grey[300] : grey[900]};
background: ${theme.palette.mode === 'dark' ? grey[900] : '#fff'};
border: 1px solid ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
- box-shadow: 0px 2px 2px ${theme.palette.mode === 'dark' ? grey[900] : grey[50]};
+ box-shadow: 0px 2px 4px ${
+ theme.palette.mode === 'dark' ? 'rgba(0,0,0, 0.5)' : 'rgba(0,0,0, 0.05)'
+ };
&:hover {
border-color: ${blue[400]};
@@ -63,7 +66,7 @@ const StyledInputElement = styled('input')(
&:focus {
border-color: ${blue[400]};
- box-shadow: 0 0 0 3px ${theme.palette.mode === 'dark' ? blue[500] : blue[200]};
+ box-shadow: 0 0 0 3px ${theme.palette.mode === 'dark' ? blue[600] : blue[200]};
}
// firefox
diff --git a/docs/data/base/components/input/UseInput.tsx b/docs/data/base/components/input/UseInput.tsx
index 244addad780d32..853a256ba02b71 100644
--- a/docs/data/base/components/input/UseInput.tsx
+++ b/docs/data/base/components/input/UseInput.tsx
@@ -31,6 +31,7 @@ const blue = {
400: '#3399FF',
500: '#007FFF',
600: '#0072E5',
+ 700: '#0059B2',
};
const grey = {
@@ -58,7 +59,9 @@ const StyledInputElement = styled('input')(
color: ${theme.palette.mode === 'dark' ? grey[300] : grey[900]};
background: ${theme.palette.mode === 'dark' ? grey[900] : '#fff'};
border: 1px solid ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
- box-shadow: 0px 2px 2px ${theme.palette.mode === 'dark' ? grey[900] : grey[50]};
+ box-shadow: 0px 2px 4px ${
+ theme.palette.mode === 'dark' ? 'rgba(0,0,0, 0.5)' : 'rgba(0,0,0, 0.05)'
+ };
&:hover {
border-color: ${blue[400]};
@@ -66,7 +69,7 @@ const StyledInputElement = styled('input')(
&:focus {
border-color: ${blue[400]};
- box-shadow: 0 0 0 3px ${theme.palette.mode === 'dark' ? blue[500] : blue[200]};
+ box-shadow: 0 0 0 3px ${theme.palette.mode === 'dark' ? blue[600] : blue[200]};
}
// firefox
diff --git a/docs/data/base/components/menu/MenuIntroduction/css/index.js b/docs/data/base/components/menu/MenuIntroduction/css/index.js
index 6e0530275de76e..8a9793cf215952 100644
--- a/docs/data/base/components/menu/MenuIntroduction/css/index.js
+++ b/docs/data/base/components/menu/MenuIntroduction/css/index.js
@@ -60,16 +60,16 @@ const cyan = {
};
const grey = {
- 50: '#f6f8fa',
- 100: '#eaeef2',
- 200: '#d0d7de',
- 300: '#afb8c1',
- 400: '#8c959f',
- 500: '#6e7781',
- 600: '#57606a',
- 700: '#424a53',
- 800: '#32383f',
- 900: '#24292f',
+ 50: '#F3F6F9',
+ 100: '#E5EAF2',
+ 200: '#DAE2ED',
+ 300: '#C7D0DD',
+ 400: '#B0B8C4',
+ 500: '#9DA8B7',
+ 600: '#6B7A90',
+ 700: '#434D5B',
+ 800: '#303740',
+ 900: '#1C2025',
};
function useIsDarkMode() {
@@ -128,32 +128,34 @@ function Styles() {
.TriggerButtonIntroduction {
font-family: IBM Plex Sans, sans-serif;
- font-size: 0.875rem;
font-weight: 600;
- box-sizing: border-box;
- min-height: calc(1.5em + 22px);
- border-radius: 12px;
- padding: 8px 14px;
+ font-size: 0.875rem;
line-height: 1.5;
- background: ${isDarkMode ? grey[900] : '#fff'};
+ padding: 8px 16px;
+ border-radius: 8px;
+ color: white;
+ transition: all 150ms ease;
cursor: pointer;
+ background: ${isDarkMode ? grey[900] : '#fff'};
border: 1px solid ${isDarkMode ? grey[700] : grey[200]};
- color: ${isDarkMode ? grey[300] : grey[900]};
+ color: ${isDarkMode ? grey[200] : grey[900]};
+ box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
+
+ &:hover {
+ background: ${isDarkMode ? grey[800] : grey[50]};
+ border-color: ${isDarkMode ? grey[600] : grey[300]};
+ }
- transition-property: all;
- transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
- transition-duration: 120ms;
+ &:active {
+ background: ${isDarkMode ? grey[700] : grey[100]};
+ }
+
+ &:focus-visible {
+ box-shadow: 0 0 0 4px ${isDarkMode ? cyan[300] : cyan[200]};
+ outline: none;
+ }
}
- .TriggerButtonIntroduction:hover {
- background: ${isDarkMode ? grey[800] : grey[50]};
- border-color: ${isDarkMode ? grey[600] : grey[300]};
- }
-
- .TriggerButtonIntroduction:focus-visible {
- border-color: ${cyan[400]};
- outline: 3px solid ${isDarkMode ? cyan[500] : cyan[200]};
- }
.CustomMenuIntroduction {
z-index: 1;
diff --git a/docs/data/base/components/menu/MenuIntroduction/css/index.tsx b/docs/data/base/components/menu/MenuIntroduction/css/index.tsx
index 70ee0fda43b8c4..3ef0c7e9860ceb 100644
--- a/docs/data/base/components/menu/MenuIntroduction/css/index.tsx
+++ b/docs/data/base/components/menu/MenuIntroduction/css/index.tsx
@@ -60,16 +60,16 @@ const cyan = {
};
const grey = {
- 50: '#f6f8fa',
- 100: '#eaeef2',
- 200: '#d0d7de',
- 300: '#afb8c1',
- 400: '#8c959f',
- 500: '#6e7781',
- 600: '#57606a',
- 700: '#424a53',
- 800: '#32383f',
- 900: '#24292f',
+ 50: '#F3F6F9',
+ 100: '#E5EAF2',
+ 200: '#DAE2ED',
+ 300: '#C7D0DD',
+ 400: '#B0B8C4',
+ 500: '#9DA8B7',
+ 600: '#6B7A90',
+ 700: '#434D5B',
+ 800: '#303740',
+ 900: '#1C2025',
};
function useIsDarkMode() {
@@ -128,32 +128,34 @@ function Styles() {
.TriggerButtonIntroduction {
font-family: IBM Plex Sans, sans-serif;
- font-size: 0.875rem;
font-weight: 600;
- box-sizing: border-box;
- min-height: calc(1.5em + 22px);
- border-radius: 12px;
- padding: 8px 14px;
+ font-size: 0.875rem;
line-height: 1.5;
- background: ${isDarkMode ? grey[900] : '#fff'};
+ padding: 8px 16px;
+ border-radius: 8px;
+ color: white;
+ transition: all 150ms ease;
cursor: pointer;
+ background: ${isDarkMode ? grey[900] : '#fff'};
border: 1px solid ${isDarkMode ? grey[700] : grey[200]};
- color: ${isDarkMode ? grey[300] : grey[900]};
+ color: ${isDarkMode ? grey[200] : grey[900]};
+ box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
+
+ &:hover {
+ background: ${isDarkMode ? grey[800] : grey[50]};
+ border-color: ${isDarkMode ? grey[600] : grey[300]};
+ }
- transition-property: all;
- transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
- transition-duration: 120ms;
+ &:active {
+ background: ${isDarkMode ? grey[700] : grey[100]};
+ }
+
+ &:focus-visible {
+ box-shadow: 0 0 0 4px ${isDarkMode ? cyan[300] : cyan[200]};
+ outline: none;
+ }
}
- .TriggerButtonIntroduction:hover {
- background: ${isDarkMode ? grey[800] : grey[50]};
- border-color: ${isDarkMode ? grey[600] : grey[300]};
- }
-
- .TriggerButtonIntroduction:focus-visible {
- border-color: ${cyan[400]};
- outline: 3px solid ${isDarkMode ? cyan[500] : cyan[200]};
- }
.CustomMenuIntroduction {
z-index: 1;
diff --git a/docs/data/base/components/menu/MenuIntroduction/system/index.js b/docs/data/base/components/menu/MenuIntroduction/system/index.js
index 4d5f34ddb2b8fa..5e7c7c36312592 100644
--- a/docs/data/base/components/menu/MenuIntroduction/system/index.js
+++ b/docs/data/base/components/menu/MenuIntroduction/system/index.js
@@ -27,25 +27,29 @@ export default function MenuIntroduction() {
}
const blue = {
- 100: '#DAECFF',
+ 50: '#F0F7FF',
+ 100: '#C2E0FF',
200: '#99CCF3',
+ 300: '#66B2FF',
400: '#3399FF',
500: '#007FFF',
- 600: '#0072E5',
+ 600: '#0072E6',
+ 700: '#0059B3',
+ 800: '#004C99',
900: '#003A75',
};
const grey = {
- 50: '#f6f8fa',
- 100: '#eaeef2',
- 200: '#d0d7de',
- 300: '#afb8c1',
- 400: '#8c959f',
- 500: '#6e7781',
- 600: '#57606a',
- 700: '#424a53',
- 800: '#32383f',
- 900: '#24292f',
+ 50: '#F3F6F9',
+ 100: '#E5EAF2',
+ 200: '#DAE2ED',
+ 300: '#C7D0DD',
+ 400: '#B0B8C4',
+ 500: '#9DA8B7',
+ 600: '#6B7A90',
+ 700: '#434D5B',
+ 800: '#303740',
+ 900: '#1C2025',
};
const Listbox = styled('ul')(
@@ -90,8 +94,8 @@ const MenuItem = styled(BaseMenuItem)(
}
&:hover:not(.${menuItemClasses.disabled}) {
- background-color: ${theme.palette.mode === 'dark' ? grey[800] : grey[100]};
- color: ${theme.palette.mode === 'dark' ? grey[300] : grey[900]};
+ background-color: ${theme.palette.mode === 'dark' ? blue[900] : blue[50]};
+ color: ${theme.palette.mode === 'dark' ? blue[100] : blue[900]};
}
`,
);
@@ -99,29 +103,31 @@ const MenuItem = styled(BaseMenuItem)(
const MenuButton = styled(BaseMenuButton)(
({ theme }) => `
font-family: IBM Plex Sans, sans-serif;
- font-size: 0.875rem;
font-weight: 600;
- box-sizing: border-box;
- min-height: calc(1.5em + 22px);
- border-radius: 12px;
- padding: 8px 14px;
+ font-size: 0.875rem;
line-height: 1.5;
+ padding: 8px 16px;
+ border-radius: 8px;
+ color: white;
+ transition: all 150ms ease;
+ cursor: pointer;
background: ${theme.palette.mode === 'dark' ? grey[900] : '#fff'};
border: 1px solid ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
- color: ${theme.palette.mode === 'dark' ? grey[300] : grey[900]};
-
- transition-property: all;
- transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
- transition-duration: 120ms;
+ color: ${theme.palette.mode === 'dark' ? grey[200] : grey[900]};
+ box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
&:hover {
background: ${theme.palette.mode === 'dark' ? grey[800] : grey[50]};
border-color: ${theme.palette.mode === 'dark' ? grey[600] : grey[300]};
}
+ &:active {
+ background: ${theme.palette.mode === 'dark' ? grey[700] : grey[100]};
+ }
+
&:focus-visible {
- border-color: ${blue[400]};
- outline: 3px solid ${theme.palette.mode === 'dark' ? blue[500] : blue[200]};
+ box-shadow: 0 0 0 4px ${theme.palette.mode === 'dark' ? blue[300] : blue[200]};
+ outline: none;
}
`,
);
diff --git a/docs/data/base/components/menu/MenuIntroduction/system/index.tsx b/docs/data/base/components/menu/MenuIntroduction/system/index.tsx
index fdb17c7e40c206..d5ce5a00829dd2 100644
--- a/docs/data/base/components/menu/MenuIntroduction/system/index.tsx
+++ b/docs/data/base/components/menu/MenuIntroduction/system/index.tsx
@@ -27,25 +27,29 @@ export default function MenuIntroduction() {
}
const blue = {
- 100: '#DAECFF',
+ 50: '#F0F7FF',
+ 100: '#C2E0FF',
200: '#99CCF3',
+ 300: '#66B2FF',
400: '#3399FF',
500: '#007FFF',
- 600: '#0072E5',
+ 600: '#0072E6',
+ 700: '#0059B3',
+ 800: '#004C99',
900: '#003A75',
};
const grey = {
- 50: '#f6f8fa',
- 100: '#eaeef2',
- 200: '#d0d7de',
- 300: '#afb8c1',
- 400: '#8c959f',
- 500: '#6e7781',
- 600: '#57606a',
- 700: '#424a53',
- 800: '#32383f',
- 900: '#24292f',
+ 50: '#F3F6F9',
+ 100: '#E5EAF2',
+ 200: '#DAE2ED',
+ 300: '#C7D0DD',
+ 400: '#B0B8C4',
+ 500: '#9DA8B7',
+ 600: '#6B7A90',
+ 700: '#434D5B',
+ 800: '#303740',
+ 900: '#1C2025',
};
const Listbox = styled('ul')(
@@ -90,8 +94,8 @@ const MenuItem = styled(BaseMenuItem)(
}
&:hover:not(.${menuItemClasses.disabled}) {
- background-color: ${theme.palette.mode === 'dark' ? grey[800] : grey[100]};
- color: ${theme.palette.mode === 'dark' ? grey[300] : grey[900]};
+ background-color: ${theme.palette.mode === 'dark' ? blue[900] : blue[50]};
+ color: ${theme.palette.mode === 'dark' ? blue[100] : blue[900]};
}
`,
);
@@ -99,29 +103,31 @@ const MenuItem = styled(BaseMenuItem)(
const MenuButton = styled(BaseMenuButton)(
({ theme }) => `
font-family: IBM Plex Sans, sans-serif;
- font-size: 0.875rem;
font-weight: 600;
- box-sizing: border-box;
- min-height: calc(1.5em + 22px);
- border-radius: 12px;
- padding: 8px 14px;
+ font-size: 0.875rem;
line-height: 1.5;
+ padding: 8px 16px;
+ border-radius: 8px;
+ color: white;
+ transition: all 150ms ease;
+ cursor: pointer;
background: ${theme.palette.mode === 'dark' ? grey[900] : '#fff'};
border: 1px solid ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
- color: ${theme.palette.mode === 'dark' ? grey[300] : grey[900]};
-
- transition-property: all;
- transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
- transition-duration: 120ms;
+ color: ${theme.palette.mode === 'dark' ? grey[200] : grey[900]};
+ box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
&:hover {
background: ${theme.palette.mode === 'dark' ? grey[800] : grey[50]};
border-color: ${theme.palette.mode === 'dark' ? grey[600] : grey[300]};
}
+ &:active {
+ background: ${theme.palette.mode === 'dark' ? grey[700] : grey[100]};
+ }
+
&:focus-visible {
- border-color: ${blue[400]};
- outline: 3px solid ${theme.palette.mode === 'dark' ? blue[500] : blue[200]};
+ box-shadow: 0 0 0 4px ${theme.palette.mode === 'dark' ? blue[300] : blue[200]};
+ outline: none;
}
`,
);
diff --git a/docs/data/base/components/menu/MenuIntroduction/tailwind/index.js b/docs/data/base/components/menu/MenuIntroduction/tailwind/index.js
index 6cb844adb3525d..0269a77e2bc4ae 100644
--- a/docs/data/base/components/menu/MenuIntroduction/tailwind/index.js
+++ b/docs/data/base/components/menu/MenuIntroduction/tailwind/index.js
@@ -98,7 +98,7 @@ const MenuButton = React.forwardRef((props, ref) => {
(
- Dashboard
+ My account