Skip to content

Commit

Permalink
[docs][base-ui] Overall demos design review (#38820)
Browse files Browse the repository at this point in the history
Co-authored-by: Danilo Leal <[email protected]>
Co-authored-by: mnajdova <[email protected]>
  • Loading branch information
3 people authored Oct 18, 2023
1 parent 3dae3db commit 8ac9490
Show file tree
Hide file tree
Showing 254 changed files with 5,641 additions and 3,979 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ const blue = {
400: '#3399FF',
500: '#007FFF',
600: '#0072E5',
700: '#0059B2',
900: '#003A75',
};

Expand All @@ -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;
Expand All @@ -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 {
Expand Down Expand Up @@ -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)'
};
`,
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ const blue = {
400: '#3399FF',
500: '#007FFF',
600: '#0072E5',
700: '#0059B2',
900: '#003A75',
};

Expand All @@ -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;
Expand All @@ -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 {
Expand Down Expand Up @@ -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)'
};
`,
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ const Autocomplete = React.forwardRef(function Autocomplete(props, ref) {
/>
</Button>
</div>
{anchorEl ? (
{anchorEl && (
<Popper
open={popupOpen}
anchorEl={anchorEl}
Expand Down Expand Up @@ -115,7 +115,7 @@ const Autocomplete = React.forwardRef(function Autocomplete(props, ref) {
)}
</ul>
</Popper>
) : null}
)}
</React.Fragment>
);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ const Autocomplete = React.forwardRef(function Autocomplete(
/>
</Button>
</div>
{anchorEl ? (
{anchorEl && (
<Popper
open={popupOpen}
anchorEl={anchorEl}
Expand Down Expand Up @@ -116,7 +116,7 @@ const Autocomplete = React.forwardRef(function Autocomplete(
)}
</ul>
</Popper>
) : null}
)}
</React.Fragment>
);
});
Expand Down
18 changes: 13 additions & 5 deletions docs/data/base/components/autocomplete/ControlledStates.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ const blue = {
400: '#3399FF',
500: '#007FFF',
600: '#0072E5',
700: '#0059B2',
900: '#003A75',
};

Expand All @@ -74,7 +75,6 @@ const grey = {

const StyledAutocomplete = styled('div')`
position: relative;
margin: 1.5rem 0;
`;

const StyledInputRoot = styled('div')(
Expand All @@ -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;
Expand All @@ -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 {
Expand Down Expand Up @@ -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)'
};
`,
);

Expand Down Expand Up @@ -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,
Expand Down
18 changes: 13 additions & 5 deletions docs/data/base/components/autocomplete/ControlledStates.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ const blue = {
400: '#3399FF',
500: '#007FFF',
600: '#0072E5',
700: '#0059B2',
900: '#003A75',
};

Expand All @@ -74,7 +75,6 @@ const grey = {

const StyledAutocomplete = styled('div')`
position: relative;
margin: 1.5rem 0;
`;

const StyledInputRoot = styled('div')(
Expand All @@ -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;
Expand All @@ -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 {
Expand Down Expand Up @@ -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)'
};
`,
);

Expand Down Expand Up @@ -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,
Expand Down
9 changes: 6 additions & 3 deletions docs/data/base/components/autocomplete/UseAutocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ const blue = {
400: '#3399FF',
500: '#007FFF',
600: '#0072E5',
700: '#0059B2',
900: '#003A75',
};

Expand Down Expand Up @@ -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;
Expand All @@ -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 {
Expand Down Expand Up @@ -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)'
};
`,
Expand Down
9 changes: 6 additions & 3 deletions docs/data/base/components/autocomplete/UseAutocomplete.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ const blue = {
400: '#3399FF',
500: '#007FFF',
600: '#0072E5',
700: '#0059B2',
900: '#003A75',
};

Expand Down Expand Up @@ -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;
Expand All @@ -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 {
Expand Down Expand Up @@ -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)'
};
`,
Expand Down
11 changes: 8 additions & 3 deletions docs/data/base/components/autocomplete/UseAutocompletePopper.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ const blue = {
400: '#3399FF',
500: '#007FFF',
600: '#0072E5',
700: '#0059B2',
900: '#003A75',
};

Expand All @@ -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;
Expand All @@ -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 {
Expand Down Expand Up @@ -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)'
};
`,
);

Expand Down
11 changes: 8 additions & 3 deletions docs/data/base/components/autocomplete/UseAutocompletePopper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ const blue = {
400: '#3399FF',
500: '#007FFF',
600: '#0072E5',
700: '#0059B2',
900: '#003A75',
};

Expand All @@ -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;
Expand All @@ -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 {
Expand Down Expand Up @@ -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)'
};
`,
);

Expand Down
Loading

0 comments on commit 8ac9490

Please sign in to comment.