Skip to content

Commit

Permalink
Merge branch 'master' into modal-event-handlers
Browse files Browse the repository at this point in the history
  • Loading branch information
sai6855 committed Sep 14, 2024
2 parents e116263 + 012c2e8 commit 662042f
Show file tree
Hide file tree
Showing 54 changed files with 320 additions and 129 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export default function ExampleAlignmentButtons() {
variant="outlined"
value={alignment}
onChange={(event) => setAlignment(event.target.value)}
sx={{ display: 'inline-flex' }}
>
{['left', 'center', 'right', 'justify'].map((item) => (
<Box
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export default function ExampleAlignmentButtons() {
onChange={(event: React.ChangeEvent<HTMLInputElement>) =>
setAlignment(event.target.value)
}
sx={{ display: 'inline-flex' }}
>
{['left', 'center', 'right', 'justify'].map((item) => (
<Box
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default function ToggleGroupToolbar() {
return (
<Sheet
variant="outlined"
sx={{ borderRadius: 'md', display: 'flex', gap: 2, p: 0.5 }}
sx={{ borderRadius: 'md', display: 'inline-flex', gap: 2, p: 0.5 }}
>
<ToggleButtonGroup
variant="plain"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default function ToggleGroupToolbar() {
return (
<Sheet
variant="outlined"
sx={{ borderRadius: 'md', display: 'flex', gap: 2, p: 0.5 }}
sx={{ borderRadius: 'md', display: 'inline-flex', gap: 2, p: 0.5 }}
>
<ToggleButtonGroup
variant="plain"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ const templates = [
author: authors.MUI,
design: {
name: 'Frames X',
link: 'https://framesxdesign.com/product',
link: 'https://framesxdesign.com/',
},
},
];
Expand Down
51 changes: 51 additions & 0 deletions docs/data/material/components/breadcrumbs/CondensedWithMenu.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
import * as React from 'react';
import Breadcrumbs from '@mui/material/Breadcrumbs';
import Link from '@mui/material/Link';
import Menu from '@mui/material/Menu';
import MenuItem from '@mui/material/MenuItem';
import IconButton from '@mui/material/IconButton';
import MoreHorizIcon from '@mui/icons-material/MoreHoriz';

export default function CondensedWithMenu() {
const [anchorEl, setAnchorEl] = React.useState(null);
const open = Boolean(anchorEl);

const handleClick = (event) => {
if (event) {
setAnchorEl(event.currentTarget);
}
};

const handleClose = () => {
setAnchorEl(null);
};

return (
<React.Fragment>
<Menu
anchorEl={anchorEl}
open={open}
onClose={handleClose}
aria-labelledby="with-menu-demo-breadcrumbs"
>
<MenuItem onClick={handleClose}>Breadcrumb 2</MenuItem>
<MenuItem onClick={handleClose}>Breadcrumb 3</MenuItem>
<MenuItem onClick={handleClose}>Breadcrumb 4</MenuItem>
</Menu>
<Breadcrumbs aria-label="breadcrumbs">
<Link color="primary" href="#condensed-with-menu">
Breadcrumb 1
</Link>
<IconButton color="primary" size="small" onClick={handleClick}>
<MoreHorizIcon />
</IconButton>
<Link color="primary" href="#condensed-with-menu">
Breadcrumb 5
</Link>
<Link color="primary" href="#condensed-with-menu">
Breadcrumb 6
</Link>
</Breadcrumbs>
</React.Fragment>
);
}
51 changes: 51 additions & 0 deletions docs/data/material/components/breadcrumbs/CondensedWithMenu.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
import * as React from 'react';
import Breadcrumbs from '@mui/material/Breadcrumbs';
import Link from '@mui/material/Link';
import Menu from '@mui/material/Menu';
import MenuItem from '@mui/material/MenuItem';
import IconButton from '@mui/material/IconButton';
import MoreHorizIcon from '@mui/icons-material/MoreHoriz';

export default function CondensedWithMenu() {
const [anchorEl, setAnchorEl] = React.useState<HTMLButtonElement | null>(null);
const open = Boolean(anchorEl);

const handleClick = (event: React.MouseEvent<HTMLButtonElement> | null) => {
if (event) {
setAnchorEl(event.currentTarget);
}
};

const handleClose = () => {
setAnchorEl(null);
};

return (
<React.Fragment>
<Menu
anchorEl={anchorEl}
open={open}
onClose={handleClose}
aria-labelledby="with-menu-demo-breadcrumbs"
>
<MenuItem onClick={handleClose}>Breadcrumb 2</MenuItem>
<MenuItem onClick={handleClose}>Breadcrumb 3</MenuItem>
<MenuItem onClick={handleClose}>Breadcrumb 4</MenuItem>
</Menu>
<Breadcrumbs aria-label="breadcrumbs">
<Link color="primary" href="#condensed-with-menu">
Breadcrumb 1
</Link>
<IconButton color="primary" size="small" onClick={handleClick}>
<MoreHorizIcon />
</IconButton>
<Link color="primary" href="#condensed-with-menu">
Breadcrumb 5
</Link>
<Link color="primary" href="#condensed-with-menu">
Breadcrumb 6
</Link>
</Breadcrumbs>
</React.Fragment>
);
}
6 changes: 6 additions & 0 deletions docs/data/material/components/breadcrumbs/breadcrumbs.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ In the following examples, we are using two string separators and an SVG icon.

{{"demo": "CollapsedBreadcrumbs.js"}}

## Condensed with menu

As an alternative, consider adding a Menu component to display the condensed links in a dropdown list:

{{"demo": "CondensedWithMenu.js"}}

## Customization

Here is an example of customizing the component.
Expand Down
2 changes: 1 addition & 1 deletion docs/data/material/components/dividers/FlexDivider.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default function FlexDivider() {
return (
<Box
sx={{
display: 'flex',
display: 'inline-flex',
alignItems: 'center',
border: '1px solid',
borderColor: 'divider',
Expand Down
2 changes: 1 addition & 1 deletion docs/data/material/components/dividers/FlexDivider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default function FlexDivider() {
return (
<Box
sx={{
display: 'flex',
display: 'inline-flex',
alignItems: 'center',
border: '1px solid',
borderColor: 'divider',
Expand Down
13 changes: 13 additions & 0 deletions docs/data/material/components/progress/CircularSize.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import * as React from 'react';
import Stack from '@mui/material/Stack';
import CircularProgress from '@mui/material/CircularProgress';

export default function CircularSize() {
return (
<Stack spacing={2} direction="row" alignItems="center">
<CircularProgress size="30px" />
<CircularProgress size={40} />
<CircularProgress size="3rem" />
</Stack>
);
}
13 changes: 13 additions & 0 deletions docs/data/material/components/progress/CircularSize.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import * as React from 'react';
import Stack from '@mui/material/Stack';
import CircularProgress from '@mui/material/CircularProgress';

export default function CircularSize() {
return (
<Stack spacing={2} direction="row" alignItems="center">
<CircularProgress size="30px" />
<CircularProgress size={40} />
<CircularProgress size="3rem" />
</Stack>
);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<CircularProgress size="30px" />
<CircularProgress size={40} />
<CircularProgress size="3rem" />
4 changes: 4 additions & 0 deletions docs/data/material/components/progress/progress.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ The animations of the components rely on CSS as much as possible to work even be

{{"demo": "CircularColor.js"}}

### Circular size

{{"demo": "CircularSize.js"}}

### Circular determinate

{{"demo": "CircularDeterminate.js"}}
Expand Down
2 changes: 1 addition & 1 deletion docs/data/material/components/slider/MusicPlayerSlider.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export default function MusicPlayerSlider() {
return `${minute}:${secondLeft < 10 ? `0${secondLeft}` : secondLeft}`;
}
return (
<Box sx={{ width: '100%', overflow: 'hidden' }}>
<Box sx={{ width: '100%', overflow: 'hidden', position: 'relative', p: 3 }}>
<Widget>
<Box sx={{ display: 'flex', alignItems: 'center' }}>
<CoverImage>
Expand Down
2 changes: 1 addition & 1 deletion docs/data/material/components/slider/MusicPlayerSlider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export default function MusicPlayerSlider() {
return `${minute}:${secondLeft < 10 ? `0${secondLeft}` : secondLeft}`;
}
return (
<Box sx={{ width: '100%', overflow: 'hidden' }}>
<Box sx={{ width: '100%', overflow: 'hidden', position: 'relative', p: 3 }}>
<Widget>
<Box sx={{ display: 'flex', alignItems: 'center' }}>
<CoverImage>
Expand Down
2 changes: 1 addition & 1 deletion examples/material-ui-nextjs-ts/next-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
// see https://nextjs.org/docs/pages/building-your-application/configuring/typescript for more information.
2 changes: 1 addition & 1 deletion examples/material-ui-pigment-css-nextjs-ts/next-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
// see https://nextjs.org/docs/pages/building-your-application/configuring/typescript for more information.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"repository": {
"type": "git",
"url": "https://github.com/mui/material-ui.git",
"url": "git+https://github.com/mui/material-ui.git",
"directory": "packages-internal/babel-plugin-resolve-imports"
},
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages-internal/docs-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"types": "./build/index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/mui/material-ui.git",
"url": "git+https://github.com/mui/material-ui.git",
"directory": "packages-internal/docs-utils"
},
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion packages-internal/scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"repository": {
"type": "git",
"url": "https://github.com/mui/material-ui.git",
"url": "git+https://github.com/mui/material-ui.git",
"directory": "packages-internal/scripts"
},
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin-material-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
},
"repository": {
"type": "git",
"url": "https://github.com/mui/material-ui.git"
"url": "git+https://github.com/mui/material-ui.git"
},
"license": "MIT"
}
2 changes: 1 addition & 1 deletion packages/markdown/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"repository": {
"type": "git",
"url": "https://github.com/mui/material-ui.git",
"url": "git+https://github.com/mui/material-ui.git",
"directory": "packages/markdown"
},
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion packages/markdown/parseMarkdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -275,12 +275,12 @@ const noSEOadvantage = [
'https://heroicons.com/',
'https://react-icons.github.io/',
'https://fontawesome.com/',
'https://www.radix-ui.com/',
'https://react-spectrum.adobe.com/',
'https://headlessui.com/',
'https://refine.dev/',
'https://scaffoldhub.io/',
'https://marmelab.com/',
'https://framesxdesign.com/',
];

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-babel-macros/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"main": "./MuiError.macro.js",
"repository": {
"type": "git",
"url": "https://github.com/mui/material-ui.git",
"url": "git+https://github.com/mui/material-ui.git",
"directory": "packages/mui-babel-macros"
},
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
],
"repository": {
"type": "git",
"url": "https://github.com/mui/material-ui.git",
"url": "git+https://github.com/mui/material-ui.git",
"directory": "packages/mui-base"
},
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-codemod/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
},
"repository": {
"type": "git",
"url": "https://github.com/mui/material-ui.git",
"url": "git+https://github.com/mui/material-ui.git",
"directory": "packages/mui-codemod"
},
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-core-downloads-tracker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"files": [],
"repository": {
"type": "git",
"url": "https://github.com/mui/material-ui.git",
"url": "git+https://github.com/mui/material-ui.git",
"directory": "packages/core-downloads-tracker"
},
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
],
"repository": {
"type": "git",
"url": "https://github.com/mui/material-ui.git",
"url": "git+https://github.com/mui/material-ui.git",
"directory": "packages/mui-docs"
},
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-envinfo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"bin": "./envinfo.js",
"repository": {
"type": "git",
"url": "https://github.com/mui/material-ui",
"url": "git+https://github.com/mui/material-ui",
"directory": "packages/mui-envinfo"
},
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-icons-material/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
],
"repository": {
"type": "git",
"url": "https://github.com/mui/material-ui.git",
"url": "git+https://github.com/mui/material-ui.git",
"directory": "packages/mui-icons-material"
},
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-joy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
],
"repository": {
"type": "git",
"url": "https://github.com/mui/material-ui.git",
"url": "git+https://github.com/mui/material-ui.git",
"directory": "packages/mui-joy"
},
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-lab/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
],
"repository": {
"type": "git",
"url": "https://github.com/mui/material-ui.git",
"url": "git+https://github.com/mui/material-ui.git",
"directory": "packages/mui-lab"
},
"license": "MIT",
Expand Down
Loading

0 comments on commit 662042f

Please sign in to comment.