Skip to content

Commit

Permalink
Merge branch 'next' of https://github.com/mui/material-ui into fix/co…
Browse files Browse the repository at this point in the history
…demod-pigment
  • Loading branch information
siriwatknp committed Jun 4, 2024
2 parents 7533f08 + 460d6f7 commit ec44ea2
Show file tree
Hide file tree
Showing 77 changed files with 662 additions and 400 deletions.
2 changes: 1 addition & 1 deletion apps/local-ui-lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
"version": "0.0.1",
"private": true,
"dependencies": {
"@pigment-css/react": "^0.0.9"
"@pigment-css/react": "^0.0.12"
}
}
4 changes: 2 additions & 2 deletions apps/pigment-css-next-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"clean": "rimraf .next"
},
"dependencies": {
"@pigment-css/react": "^0.0.10",
"@pigment-css/react": "^0.0.12",
"@mui/utils": "workspace:^",
"@mui/base": "workspace:^",
"@mui/lab": "workspace:^",
Expand All @@ -24,7 +24,7 @@
"next": "latest"
},
"devDependencies": {
"@pigment-css/nextjs-plugin": "^0.0.10",
"@pigment-css/nextjs-plugin": "^0.0.12",
"@types/node": "^20.5.7",
"@types/react": "^18.2.55",
"@types/react-dom": "^18.3.0",
Expand Down
4 changes: 2 additions & 2 deletions apps/pigment-css-vite-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"build": "vite build"
},
"dependencies": {
"@pigment-css/react": "^0.0.9",
"@pigment-css/react": "^0.0.12",
"@mui/utils": "workspace:^",
"@mui/base": "workspace:^",
"@mui/lab": "workspace:^",
Expand All @@ -27,7 +27,7 @@
"devDependencies": {
"@babel/preset-react": "^7.24.6",
"@babel/preset-typescript": "^7.24.6",
"@pigment-css/vite-plugin": "^0.0.9",
"@pigment-css/vite-plugin": "^0.0.12",
"@types/react": "^18.2.55",
"@types/react-dom": "^18.3.0",
"@vitejs/plugin-react": "^4.3.0",
Expand Down
2 changes: 1 addition & 1 deletion docs/data/joy/components/radio-button/radio-button.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ When should you use radio buttons rather than checkboxes, switches, or selects?
import Radio from '@mui/joy/Radio';
```

The Joy UI Radio button behaves similar to the native HTML <input type="radio">, so it accepts props like `checked`, `value` and `onChange`.
The Joy UI Radio button behaves similar to the native HTML `<input type="radio">`, so it accepts props like `checked`, `value` and `onChange`.

{{"demo": "RadioButtons.js"}}

Expand Down
28 changes: 24 additions & 4 deletions docs/data/material/components/accordion/AccordionTransition.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,30 @@ export default function AccordionTransition() {
onChange={handleExpansion}
slots={{ transition: Fade }}
slotProps={{ transition: { timeout: 400 } }}
sx={{
'& .MuiAccordion-region': { height: expanded ? 'auto' : 0 },
'& .MuiAccordionDetails-root': { display: expanded ? 'block' : 'none' },
}}
sx={[
expanded
? {
'& .MuiAccordion-region': {
height: 'auto',
},
}
: {
'& .MuiAccordion-region': {
height: 0,
},
},
expanded
? {
'& .MuiAccordionDetails-root': {
display: 'block',
},
}
: {
'& .MuiAccordionDetails-root': {
display: 'none',
},
},
]}
>
<AccordionSummary
expandIcon={<ExpandMoreIcon />}
Expand Down
28 changes: 24 additions & 4 deletions docs/data/material/components/accordion/AccordionTransition.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,30 @@ export default function AccordionTransition() {
onChange={handleExpansion}
slots={{ transition: Fade as AccordionSlots['transition'] }}
slotProps={{ transition: { timeout: 400 } }}
sx={{
'& .MuiAccordion-region': { height: expanded ? 'auto' : 0 },
'& .MuiAccordionDetails-root': { display: expanded ? 'block' : 'none' },
}}
sx={[
expanded
? {
'& .MuiAccordion-region': {
height: 'auto',
},
}
: {
'& .MuiAccordion-region': {
height: 0,
},
},
expanded
? {
'& .MuiAccordionDetails-root': {
display: 'block',
},
}
: {
'& .MuiAccordionDetails-root': {
display: 'none',
},
},
]}
>
<AccordionSummary
expandIcon={<ExpandMoreIcon />}
Expand Down
1 change: 0 additions & 1 deletion docs/data/material/components/app-bar/ResponsiveAppBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ function ResponsiveAppBar() {
</Button>
))}
</Box>

<Box sx={{ flexGrow: 0 }}>
<Tooltip title="Open settings">
<IconButton onClick={handleOpenUserMenu} sx={{ p: 0 }}>
Expand Down
1 change: 0 additions & 1 deletion docs/data/material/components/app-bar/ResponsiveAppBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ function ResponsiveAppBar() {
</Button>
))}
</Box>

<Box sx={{ flexGrow: 0 }}>
<Tooltip title="Open settings">
<IconButton onClick={handleOpenUserMenu} sx={{ p: 0 }}>
Expand Down
2 changes: 0 additions & 2 deletions docs/data/material/components/autocomplete/CountrySelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,12 @@ export default function CountrySelect() {
/>
);
}

interface CountryType {
code: string;
label: string;
phone: string;
suggested?: boolean;
}

// From https://bitbucket.org/atlassian/atlaskit-mk-2/raw/4ad0e56649c3e6c973e226b7efaeb28cb240ccb0/packages/core/select/src/data/countries.js
const countries: readonly CountryType[] = [
{ code: 'AD', label: 'Andorra', phone: '376' },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,14 @@ export default function CustomInputAutocomplete() {
<label>
Value:{' '}
<Autocomplete
sx={{
sx={(theme) => ({
display: 'inline-block',
'& input': {
width: 200,
bgcolor: 'background.paper',
color: (theme) =>
theme.palette.getContrastText(theme.palette.background.paper),
color: theme.palette.getContrastText(theme.palette.background.paper),
},
}}
})}
id="custom-input-demo"
options={options}
renderInput={(params) => (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,14 @@ export default function CustomInputAutocomplete() {
<label>
Value:{' '}
<Autocomplete
sx={{
sx={(theme) => ({
display: 'inline-block',
'& input': {
width: 200,
bgcolor: 'background.paper',
color: (theme) =>
theme.palette.getContrastText(theme.palette.background.paper),
color: theme.palette.getContrastText(theme.palette.background.paper),
},
}}
})}
id="custom-input-demo"
options={options}
renderInput={(params) => (
Expand Down
21 changes: 12 additions & 9 deletions docs/data/material/components/autocomplete/GitHubLabel.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,13 +162,14 @@ export default function GitHubLabel() {
<ClickAwayListener onClickAway={handleClose}>
<div>
<Box
sx={{
borderBottom: `1px solid ${
theme.palette.mode === 'light' ? '#eaecef' : '#30363d'
}`,
sx={(t) => ({
borderBottom: `1px solid ${'#30363d'}`,
padding: '8px 10px',
fontWeight: 600,
}}
...t.applyStyles('light', {
borderBottom: `1px solid ${'#eaecef'}`,
}),
})}
>
Apply labels to this pull request
</Box>
Expand Down Expand Up @@ -216,13 +217,15 @@ export default function GitHubLabel() {
style={{ backgroundColor: option.color }}
/>
<Box
sx={{
sx={(t) => ({
flexGrow: 1,
'& span': {
color:
theme.palette.mode === 'light' ? '#586069' : '#8b949e',
color: '#8b949e',
...t.applyStyles('light', {
color: '#586069',
}),
},
}}
})}
>
{option.name}
<br />
Expand Down
21 changes: 12 additions & 9 deletions docs/data/material/components/autocomplete/GitHubLabel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -164,13 +164,14 @@ export default function GitHubLabel() {
<ClickAwayListener onClickAway={handleClose}>
<div>
<Box
sx={{
borderBottom: `1px solid ${
theme.palette.mode === 'light' ? '#eaecef' : '#30363d'
}`,
sx={(t) => ({
borderBottom: `1px solid ${'#30363d'}`,
padding: '8px 10px',
fontWeight: 600,
}}
...t.applyStyles('light', {
borderBottom: `1px solid ${'#eaecef'}`,
}),
})}
>
Apply labels to this pull request
</Box>
Expand Down Expand Up @@ -222,13 +223,15 @@ export default function GitHubLabel() {
style={{ backgroundColor: option.color }}
/>
<Box
sx={{
sx={(t) => ({
flexGrow: 1,
'& span': {
color:
theme.palette.mode === 'light' ? '#586069' : '#8b949e',
color: '#8b949e',
...t.applyStyles('light', {
color: '#586069',
}),
},
}}
})}
>
{option.name}
<br />
Expand Down
2 changes: 1 addition & 1 deletion docs/data/material/components/backdrop/SimpleBackdrop.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default function SimpleBackdrop() {
<div>
<Button onClick={handleOpen}>Show backdrop</Button>
<Backdrop
sx={{ color: '#fff', zIndex: (theme) => theme.zIndex.drawer + 1 }}
sx={(theme) => ({ color: '#fff', zIndex: theme.zIndex.drawer + 1 })}
open={open}
onClick={handleClose}
>
Expand Down
2 changes: 1 addition & 1 deletion docs/data/material/components/backdrop/SimpleBackdrop.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default function SimpleBackdrop() {
<div>
<Button onClick={handleOpen}>Show backdrop</Button>
<Backdrop
sx={{ color: '#fff', zIndex: (theme) => theme.zIndex.drawer + 1 }}
sx={(theme) => ({ color: '#fff', zIndex: theme.zIndex.drawer + 1 })}
open={open}
onClick={handleClose}
>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Button onClick={handleOpen}>Show backdrop</Button>
<Backdrop
sx={{ color: '#fff', zIndex: (theme) => theme.zIndex.drawer + 1 }}
sx={(theme) => ({ color: '#fff', zIndex: theme.zIndex.drawer + 1 })}
open={open}
onClick={handleClose}
>
Expand Down
1 change: 0 additions & 1 deletion docs/data/material/components/badges/BadgeOverlap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ const rectangle = <Box component="span" sx={shapeStyles} />;
const circle = (
<Box component="span" sx={{ ...shapeStyles, ...shapeCircleStyles }} />
);

export default function BadgeOverlap() {
return (
<Stack spacing={3} direction="row">
Expand Down
6 changes: 3 additions & 3 deletions docs/data/material/components/buttons/ButtonBaseDemo.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,12 @@ export default function ButtonBaseDemo() {
component="span"
variant="subtitle1"
color="inherit"
sx={{
sx={(theme) => ({
position: 'relative',
p: 4,
pt: 2,
pb: (theme) => `calc(${theme.spacing(1)} + 6px)`,
}}
pb: `calc(${theme.spacing(1)} + 6px)`,
})}
>
{image.title}
<ImageMarked className="MuiImageMarked-root" />
Expand Down
6 changes: 3 additions & 3 deletions docs/data/material/components/buttons/ButtonBaseDemo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,12 @@ export default function ButtonBaseDemo() {
component="span"
variant="subtitle1"
color="inherit"
sx={{
sx={(theme) => ({
position: 'relative',
p: 4,
pt: 2,
pb: (theme) => `calc(${theme.spacing(1)} + 6px)`,
}}
pb: `calc(${theme.spacing(1)} + 6px)`,
})}
>
{image.title}
<ImageMarked className="MuiImageMarked-root" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ export default function LoadingButtonsTransition() {
<span>Save</span>
</LoadingButton>
</Box>

<Box sx={{ '& > button': { m: 1 } }}>
<LoadingButton
onClick={handleClick}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ export default function LoadingButtonsTransition() {
<span>Save</span>
</LoadingButton>
</Box>

<Box sx={{ '& > button': { m: 1 } }}>
<LoadingButton
onClick={handleClick}
Expand Down
8 changes: 6 additions & 2 deletions docs/data/material/components/chips/ChipsPlayground.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,12 @@ function ChipsPlayground() {
<Grid container sx={{ flexGrow: 1 }}>
<Grid item xs={12}>
<Grid container justifyContent="center" alignItems="center">
<Grid item sx={{ height: (theme) => theme.spacing(10) }}>
<Grid
item
sx={(theme) => ({
height: theme.spacing(10),
})}
>
<Chip
label="Chip Component"
color={color}
Expand Down Expand Up @@ -258,5 +263,4 @@ function ChipsPlayground() {
</Grid>
);
}

export default ChipsPlayground;
6 changes: 3 additions & 3 deletions docs/data/material/components/dialogs/CustomizedDialogs.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ export default function CustomizedDialogs() {
<IconButton
aria-label="close"
onClick={handleClose}
sx={{
sx={(theme) => ({
position: 'absolute',
right: 8,
top: 8,
color: (theme) => theme.palette.grey[500],
}}
color: theme.palette.grey[500],
})}
>
<CloseIcon />
</IconButton>
Expand Down
Loading

0 comments on commit ec44ea2

Please sign in to comment.