Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/mui/material-ui into move…
Browse files Browse the repository at this point in the history
…-use-media-query-to-system
  • Loading branch information
siriwatknp committed Feb 21, 2024
2 parents 6a4b4a0 + b6bec6c commit a184be6
Show file tree
Hide file tree
Showing 301 changed files with 1,564 additions and 782 deletions.
10 changes: 6 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -166,17 +166,17 @@ jobs:
echo "no changes"
fi
- run:
name: typescript-to-proptypes
name: internal-scripts
command: |
# latest commit
LATEST_COMMIT=$(git rev-parse HEAD)
# latest commit where packages/typescript-to-proptypes was changed
FOLDER_COMMIT=$(git log -1 --format=format:%H --full-diff packages/typescript-to-proptypes)
# latest commit where internal-scripts was changed
FOLDER_COMMIT=$(git log -1 --format=format:%H --full-diff packages-internal/scripts)
if [ $FOLDER_COMMIT = $LATEST_COMMIT ]; then
echo "changes, let's run the tests"
pnpm --filter typescript-to-proptypes test
pnpm --filter @mui/internal-scripts test
else
echo "no changes"
fi
Expand Down Expand Up @@ -260,6 +260,8 @@ jobs:
- run:
name: Tests TypeScript definitions
command: pnpm typescript:ci
environment:
NODE_OPTIONS: --max-old-space-size=3072
- run:
name: Test module augmentation
command: |
Expand Down
4 changes: 2 additions & 2 deletions .codesandbox/ci.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"packages/mui-types",
"packages/mui-utils",
"packages/docs-utils",
"packages/typescript-to-proptypes"
"packages-internal/scripts"
],
"publishDirectory": {
"@mui/base": "packages/mui-base/build",
Expand All @@ -40,7 +40,7 @@
"@mui/types": "packages/mui-types/build",
"@mui/utils": "packages/mui-utils/build",
"@mui-internal/docs-utils": "packages/docs-utils",
"@mui-internal/typescript-to-proptypes": "packages/typescript-to-proptypes"
"@mui/internal-scripts": "packages-internal/scripts"
},
"sandboxes": [
"/examples/material-ui-cra-ts",
Expand Down
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
/packages/zero-runtime/tests/fixtures/
/packages/zero-next-plugin/loader.js
# Ignore fixtures
/packages/typescript-to-proptypes/test/*/*
/packages-internal/scripts/typescript-to-proptypes/test/*/*
/test/bundling/fixtures/**/*.fixture.js
# just an import that reports eslint errors depending on whether the fixture (which is not checked in) exists
/test/bundling/fixtures/create-react-app/src/index.js
Expand Down
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ module.exports = {
},
},
{
files: ['packages/typescript-to-proptypes/src/**/*.ts'],
files: ['packages-internal/scripts/typescript-to-proptypes/src/**/*.ts'],
rules: {
// Working with flags is common in TypeScript compiler
'no-bitwise': 'off',
Expand Down
6 changes: 5 additions & 1 deletion apps/zero-runtime-next-app/next.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-env node */
// eslint-ignore-next-line import/no-unresolved
const { withZeroPlugin } = require('@mui/zero-next-plugin');
const { extendTheme } = require('@mui/zero-runtime');
const { experimental_extendTheme: extendTheme } = require('@mui/material/styles');

/**
* @typedef {import('@mui/zero-next-plugin').ZeroPluginConfig} ZeroPluginConfig
Expand Down Expand Up @@ -83,6 +83,10 @@ const theme = extendTheme({
},
});

theme.getColorSchemeSelector = (key) => {
return `[data-mui-color-scheme="${key}"]`;
};

// { [theme.getColorSchemeSelector('dark')]: { color: 'black' } }

/**
Expand Down
1 change: 0 additions & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ module.exports = function getBabelConfig(api) {
alias: {
...defaultAlias,
modules: './modules',
'typescript-to-proptypes': './packages/typescript-to-proptypes/src',
},
root: ['./'],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -309,18 +309,18 @@ function Styles() {
color: ${isDarkMode ? cyan[100] : cyan[900]};
}
&.base--focused,
&.base--focusVisible {
&.Mui-focused,
&.Mui-focusVisible {
background-color: ${isDarkMode ? grey[800] : grey[100]};
color: ${isDarkMode ? grey[300] : grey[900]};
}
&.base--focusVisible {
&.Mui-focusVisible {
box-shadow: 0 0 0 3px ${isDarkMode ? cyan[500] : cyan[200]};
}
&[aria-selected=true].base--focused,
&[aria-selected=true].base--focusVisible {
&[aria-selected=true].Mui-focused,
&[aria-selected=true].Mui-focusVisible {
background-color: ${isDarkMode ? cyan[900] : cyan[100]};
color: ${isDarkMode ? cyan[100] : cyan[900]};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -283,18 +283,18 @@ function Styles() {
color: ${isDarkMode ? cyan[100] : cyan[900]};
}
&.base--focused,
&.base--focusVisible {
&.Mui-focused,
&.Mui-focusVisible {
background-color: ${isDarkMode ? grey[800] : grey[100]};
color: ${isDarkMode ? grey[300] : grey[900]};
}
&.base--focusVisible {
&.Mui-focusVisible {
box-shadow: 0 0 0 3px ${isDarkMode ? cyan[500] : cyan[200]};
}
&[aria-selected=true].base--focused,
&[aria-selected=true].base--focusVisible {
&[aria-selected=true].Mui-focused,
&[aria-selected=true].Mui-focusVisible {
background-color: ${isDarkMode ? cyan[900] : cyan[100]};
color: ${isDarkMode ? cyan[100] : cyan[900]};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,18 +237,18 @@ const StyledOption = styled('li')(
color: ${theme.palette.mode === 'dark' ? blue[100] : blue[900]};
}
&.base--focused,
&.base--focusVisible {
&.Mui-focused,
&.Mui-focusVisible {
background-color: ${theme.palette.mode === 'dark' ? grey[800] : grey[100]};
color: ${theme.palette.mode === 'dark' ? grey[300] : grey[900]};
}
&.base--focusVisible {
&.Mui-focusVisible {
box-shadow: 0 0 0 3px ${theme.palette.mode === 'dark' ? blue[500] : blue[200]};
}
&[aria-selected=true].base--focused,
&[aria-selected=true].base--focusVisible {
&[aria-selected=true].Mui-focused,
&[aria-selected=true].Mui-focusVisible {
background-color: ${theme.palette.mode === 'dark' ? blue[900] : blue[100]};
color: ${theme.palette.mode === 'dark' ? blue[100] : blue[900]};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,18 +220,18 @@ const StyledOption = styled('li')(
color: ${theme.palette.mode === 'dark' ? blue[100] : blue[900]};
}
&.base--focused,
&.base--focusVisible {
&.Mui-focused,
&.Mui-focusVisible {
background-color: ${theme.palette.mode === 'dark' ? grey[800] : grey[100]};
color: ${theme.palette.mode === 'dark' ? grey[300] : grey[900]};
}
&.base--focusVisible {
&.Mui-focusVisible {
box-shadow: 0 0 0 3px ${theme.palette.mode === 'dark' ? blue[500] : blue[200]};
}
&[aria-selected=true].base--focused,
&[aria-selected=true].base--focusVisible {
&[aria-selected=true].Mui-focused,
&[aria-selected=true].Mui-focusVisible {
background-color: ${theme.palette.mode === 'dark' ? blue[900] : blue[100]};
color: ${theme.palette.mode === 'dark' ? blue[100] : blue[900]};
}
Expand Down
10 changes: 5 additions & 5 deletions docs/data/base/components/autocomplete/ControlledStates.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,18 +171,18 @@ const Option = styled('li')(
color: ${theme.palette.mode === 'dark' ? blue[100] : blue[900]};
}
&.base--focused,
&.base--focusVisible {
&.Mui-focused,
&.Mui-focusVisible {
background-color: ${theme.palette.mode === 'dark' ? grey[800] : grey[100]};
color: ${theme.palette.mode === 'dark' ? grey[300] : grey[900]};
}
&.base--focusVisible {
&.Mui-focusVisible {
box-shadow: 0 0 0 3px ${theme.palette.mode === 'dark' ? blue[500] : blue[200]};
}
&[aria-selected=true].base--focused,
&[aria-selected=true].base--focusVisible {
&[aria-selected=true].Mui-focused,
&[aria-selected=true].Mui-focusVisible {
background-color: ${theme.palette.mode === 'dark' ? blue[900] : blue[100]};
color: ${theme.palette.mode === 'dark' ? blue[100] : blue[900]};
}
Expand Down
10 changes: 5 additions & 5 deletions docs/data/base/components/autocomplete/ControlledStates.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -171,18 +171,18 @@ const Option = styled('li')(
color: ${theme.palette.mode === 'dark' ? blue[100] : blue[900]};
}
&.base--focused,
&.base--focusVisible {
&.Mui-focused,
&.Mui-focusVisible {
background-color: ${theme.palette.mode === 'dark' ? grey[800] : grey[100]};
color: ${theme.palette.mode === 'dark' ? grey[300] : grey[900]};
}
&.base--focusVisible {
&.Mui-focusVisible {
box-shadow: 0 0 0 3px ${theme.palette.mode === 'dark' ? blue[500] : blue[200]};
}
&[aria-selected=true].base--focused,
&[aria-selected=true].base--focusVisible {
&[aria-selected=true].Mui-focused,
&[aria-selected=true].Mui-focusVisible {
background-color: ${theme.palette.mode === 'dark' ? blue[900] : blue[100]};
color: ${theme.palette.mode === 'dark' ? blue[100] : blue[900]};
}
Expand Down
10 changes: 5 additions & 5 deletions docs/data/base/components/autocomplete/UseAutocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,18 +160,18 @@ const Option = styled('li')(
color: ${theme.palette.mode === 'dark' ? blue[100] : blue[900]};
}
&.base--focused,
&.base--focusVisible {
&.Mui-focused,
&.Mui-focusVisible {
background-color: ${theme.palette.mode === 'dark' ? grey[800] : grey[100]};
color: ${theme.palette.mode === 'dark' ? grey[300] : grey[900]};
}
&.base--focusVisible {
&.Mui-focusVisible {
box-shadow: 0 0 0 3px ${theme.palette.mode === 'dark' ? blue[500] : blue[200]};
}
&[aria-selected=true].base--focused,
&[aria-selected=true].base--focusVisible {
&[aria-selected=true].Mui-focused,
&[aria-selected=true].Mui-focusVisible {
background-color: ${theme.palette.mode === 'dark' ? blue[900] : blue[100]};
color: ${theme.palette.mode === 'dark' ? blue[100] : blue[900]};
}
Expand Down
10 changes: 5 additions & 5 deletions docs/data/base/components/autocomplete/UseAutocomplete.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -162,18 +162,18 @@ const Option = styled('li')(
color: ${theme.palette.mode === 'dark' ? blue[100] : blue[900]};
}
&.base--focused,
&.base--focusVisible {
&.Mui-focused,
&.Mui-focusVisible {
background-color: ${theme.palette.mode === 'dark' ? grey[800] : grey[100]};
color: ${theme.palette.mode === 'dark' ? grey[300] : grey[900]};
}
&.base--focusVisible {
&.Mui-focusVisible {
box-shadow: 0 0 0 3px ${theme.palette.mode === 'dark' ? blue[500] : blue[200]};
}
&[aria-selected=true].base--focused,
&[aria-selected=true].base--focusVisible {
&[aria-selected=true].Mui-focused,
&[aria-selected=true].Mui-focusVisible {
background-color: ${theme.palette.mode === 'dark' ? blue[900] : blue[100]};
color: ${theme.palette.mode === 'dark' ? blue[100] : blue[900]};
}
Expand Down
10 changes: 5 additions & 5 deletions docs/data/base/components/autocomplete/UseAutocompletePopper.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,18 +184,18 @@ const Option = styled('li')(
color: ${theme.palette.mode === 'dark' ? blue[100] : blue[900]};
}
&.base--focused,
&.base--focusVisible {
&.Mui-focused,
&.Mui-focusVisible {
background-color: ${theme.palette.mode === 'dark' ? grey[800] : grey[100]};
color: ${theme.palette.mode === 'dark' ? grey[300] : grey[900]};
}
&.base--focusVisible {
&.Mui-focusVisible {
box-shadow: 0 0 0 3px ${theme.palette.mode === 'dark' ? blue[500] : blue[200]};
}
&[aria-selected=true].base--focused,
&[aria-selected=true].base--focusVisible {
&[aria-selected=true].Mui-focused,
&[aria-selected=true].Mui-focusVisible {
background-color: ${theme.palette.mode === 'dark' ? blue[900] : blue[100]};
color: ${theme.palette.mode === 'dark' ? blue[100] : blue[900]};
}
Expand Down
10 changes: 5 additions & 5 deletions docs/data/base/components/autocomplete/UseAutocompletePopper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -192,18 +192,18 @@ const Option = styled('li')(
color: ${theme.palette.mode === 'dark' ? blue[100] : blue[900]};
}
&.base--focused,
&.base--focusVisible {
&.Mui-focused,
&.Mui-focusVisible {
background-color: ${theme.palette.mode === 'dark' ? grey[800] : grey[100]};
color: ${theme.palette.mode === 'dark' ? grey[300] : grey[900]};
}
&.base--focusVisible {
&.Mui-focusVisible {
box-shadow: 0 0 0 3px ${theme.palette.mode === 'dark' ? blue[500] : blue[200]};
}
&[aria-selected=true].base--focused,
&[aria-selected=true].base--focusVisible {
&[aria-selected=true].Mui-focused,
&[aria-selected=true].Mui-focusVisible {
background-color: ${theme.palette.mode === 'dark' ? blue[900] : blue[100]};
color: ${theme.palette.mode === 'dark' ? blue[100] : blue[900]};
}
Expand Down
46 changes: 27 additions & 19 deletions docs/data/joy/components/linear-progress/LinearProgressWithLabel.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import * as React from 'react';
import LinearProgress from '@mui/joy/LinearProgress';
import Typography from '@mui/joy/Typography';
import Box from '@mui/joy/Box';

export default function LinearProgressWithLabel() {
const [progress, setProgress] = React.useState(0);
Expand All @@ -16,28 +17,35 @@ export default function LinearProgressWithLabel() {
}, []);

return (
<LinearProgress
determinate
variant="outlined"
color="neutral"
size="sm"
thickness={32}
value={progress}
<Box
sx={{
'--LinearProgress-radius': '0px',
'--LinearProgress-progressThickness': '24px',
boxShadow: 'sm',
borderColor: 'neutral.500',
bgcolor: 'white',
width: '100%',
}}
>
<Typography
level="body-xs"
fontWeight="xl"
textColor="common.white"
sx={{ mixBlendMode: 'difference' }}
<LinearProgress
determinate
variant="outlined"
color="neutral"
size="sm"
thickness={32}
value={progress}
sx={{
'--LinearProgress-radius': '0px',
'--LinearProgress-progressThickness': '24px',
boxShadow: 'sm',
borderColor: 'neutral.500',
}}
>
LOADING… {`${Math.round(progress)}%`}
</Typography>
</LinearProgress>
<Typography
level="body-xs"
fontWeight="xl"
textColor="common.white"
sx={{ mixBlendMode: 'difference' }}
>
LOADING… {`${Math.round(progress)}%`}
</Typography>
</LinearProgress>
</Box>
);
}
Loading

0 comments on commit a184be6

Please sign in to comment.