path
stringlengths
5
195
repo_name
stringlengths
5
79
content
stringlengths
25
1.01M
packages/material-ui-icons/src/CheckBoxOutlineBlank.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <path d="M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z" /> , 'CheckBoxOutlineBlank');
packages/material-ui-icons/src/RefreshRounded.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <path d="M17.65 6.35c-1.63-1.63-3.94-2.57-6.48-2.31-3.67.37-6.69 3.35-7.1 7.02C3.52 15.91 7.27 20 12 20c3.19 0 5.93-1.87 7.21-4.56.32-.67-.16-1.44-.9-1.44-.37 0-.72.2-.88.53-1.13 2.43-3.84 3.97-6.8 3.31-2.22-.49-4.01-2.3-4.48-4.52C5.31 9.44 8.26 6 12 6c1.66 0 3.14.69 4.22 1.78l-1.51 1.51c-.63.63-.19 1.71.7 1.71H19c.55 0 1-.45 1-1V6.41c0-.89-1.08-1.34-1.71-.71l-.64.65z" /> , 'RefreshRounded');
packages/material-ui-icons/src/FullscreenExitOutlined.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <path d="M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z" /> , 'FullscreenExitOutlined');
packages/material-ui-icons/legacy/LocationOff.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <React.Fragment><path fill="none" d="M0 0h24v24H0zm11.75 11.47l-.11-.11z" /><path d="M12 6.5c1.38 0 2.5 1.12 2.5 2.5 0 .74-.33 1.39-.83 1.85l3.63 3.63c.98-1.86 1.7-3.8 1.7-5.48 0-3.87-3.13-7-7-7-1.98 0-3.76.83-5.04 2.15l3.19 3.19c.46-.52 1.11-.84 1.85-.84zm4.37 9.6l-4.63-4.63-.11-.11L3.27 3 2 4.27l3.18 3.18C5.07 7.95 5 8.47 5 9c0 5.25 7 13 7 13s1.67-1.85 3.38-4.35L18.73 21 20 19.73l-3.63-3.63z" /></React.Fragment> , 'LocationOff');
packages/material-ui-icons/src/WcTwoTone.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <React.Fragment><path fill="none" d="M.01 0h24v24h-24V0z" /><path d="M5.5 22v-7.5H4V9c0-1.1.9-2 2-2h3c1.1 0 2 .9 2 2v5.5H9.5V22h-4zM18 22v-6h3l-2.54-7.63C18.18 7.55 17.42 7 16.56 7h-.12c-.86 0-1.63.55-1.9 1.37L12 16h3v6h3zM7.5 6c1.11 0 2-.89 2-2s-.89-2-2-2-2 .89-2 2 .89 2 2 2zm9 0c1.11 0 2-.89 2-2s-.89-2-2-2-2 .89-2 2 .89 2 2 2z" /></React.Fragment> , 'WcTwoTone');
packages/material-ui-icons/src/CameraFrontRounded.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <path d="M17 0H7C5.9 0 5 .9 5 2v14c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V2c0-1.1-.9-2-2-2zm0 12.5c0-1.67-3.33-2.5-5-2.5s-5 .83-5 2.5V3c0-.55.45-1 1-1h8c.55 0 1 .45 1 1v9.5zm-6.15 6.35c-.31-.31-.85-.09-.85.36V20H6c-.55 0-1 .45-1 1s.45 1 1 1h4v.79c0 .45.54.67.85.35l1.79-1.79c.2-.2.2-.51 0-.71l-1.79-1.79zM18 20h-3c-.55 0-1 .45-1 1s.45 1 1 1h3c.55 0 1-.45 1-1s-.45-1-1-1zM12 8c1.1 0 2-.9 2-2s-.9-2-2-2-1.99.9-1.99 2S10.9 8 12 8z" /> , 'CameraFrontRounded');
docs/src/pages/discover-more/showcase/Showcase.js
kybarg/material-ui
import React from 'react'; import PropTypes from 'prop-types'; import { useSelector } from 'react-redux'; import { withStyles } from '@material-ui/core/styles'; import InputLabel from '@material-ui/core/InputLabel'; import MenuItem from '@material-ui/core/MenuItem'; import FormControl from '@material-ui/core/FormControl'; import Select from '@material-ui/core/Select'; import Card from '@material-ui/core/Card'; import CardMedia from '@material-ui/core/CardMedia'; import Typography from '@material-ui/core/Typography'; import IconButton from '@material-ui/core/IconButton'; import { GitHub as GithubIcon } from '@material-ui/docs'; import Link from 'docs/src/modules/components/Link'; import appList from './appList'; const styles = theme => ({ root: { flexGrow: 1, backgroundColor: theme.palette.background.default, // Hide the demo container padding margin: -theme.spacing(3), // Maintain alignment with the markdown text [theme.breakpoints.down('xs')]: { padding: 30, }, }, formControl: { marginBottom: theme.spacing(4), minWidth: 120, }, title: { marginBottom: theme.spacing(2), }, card: { marginBottom: theme.spacing(1), maxWidth: 600, }, description: { marginBottom: theme.spacing(6), maxWidth: 600, }, cardMedia: { paddingTop: '75%', // 4:3 }, }); function stableSort(array, cmp) { const stabilizedThis = array.map((el, index) => [el, index]); stabilizedThis.sort((a, b) => { const order = cmp(a[0], b[0]); if (order !== 0) return order; return a[1] - b[1]; }); return stabilizedThis.map(el => el[0]); } // Returns a function that sorts reverse numerically by value of `key` function sortFactory(key) { return function sortNumeric(a, b) { if (b[key] < a[key]) { return -1; } if (b[key] > a[key]) { return 1; } return 0; }; } const sortFunctions = { dateAdded: sortFactory('dateAdded'), similarWebVisits: sortFactory('similarWebVisits'), stars: sortFactory('stars'), }; function Showcase(props) { const { classes } = props; const [sortFunctionName, setSortFunctionName] = React.useState('dateAdded'); const sortFunction = sortFunctions[sortFunctionName]; const t = useSelector(state => state.options.t); const handleChangeSort = event => { setSortFunctionName(event.target.value); }; return ( <div className={classes.root}> <FormControl className={classes.formControl}> <InputLabel htmlFor="sort">Sort by</InputLabel> <Select value={sortFunctionName} onChange={handleChangeSort} inputProps={{ id: 'sort' }}> <MenuItem value="dateAdded">{t('newest')}</MenuItem> <MenuItem value="similarWebVisits">{t('traffic')}</MenuItem> <MenuItem value="stars">{t('stars')}</MenuItem> </Select> </FormControl> {stableSort(appList.filter(item => item[sortFunctionName] !== undefined), sortFunction).map( app => ( <div key={app.title}> <Typography component="h2" variant="h4" gutterBottom className={classes.title}> <span>{app.title}</span> {app.source ? ( <IconButton href={app.source} target="_blank" aria-label={`${app.title} ${t('sourceCode')}`} > <GithubIcon /> </IconButton> ) : null} </Typography> {app.image ? ( <Card className={classes.card}> <CardMedia component="a" href={app.link} rel="noopener" target="_blank" className={classes.cardMedia} image={`/static/images/showcase/${app.image}`} title={app.title} /> </Card> ) : ( <Link variant="body2" target="_blank" rel="noopener nofollow" href={app.link} gutterBottom > {t('visit')} </Link> )} <Typography gutterBottom>{app.description}</Typography> <Typography variant="caption" display="block" color="textSecondary" className={classes.description} > {app.dateAdded} </Typography> </div> ), )} </div> ); } Showcase.propTypes = { classes: PropTypes.object.isRequired, }; export default withStyles(styles)(Showcase);
packages/material-ui-icons/src/VpnLockRounded.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <path d="M18.92 12c.04.33.08.66.08 1 0 2.08-.8 3.97-2.1 5.39-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H7v-2h2c.55 0 1-.45 1-1V8h2c1.1 0 2-.9 2-2V3.46c-.95-.3-1.95-.46-3-.46C5.48 3 1 7.48 1 13s4.48 10 10 10 10-4.48 10-10c0-.34-.02-.67-.05-1h-2.03zM10 20.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L8 16v1c0 1.1.9 2 2 2v1.93zM22 4v-.5C22 2.12 20.88 1 19.5 1S17 2.12 17 3.5V4c-.55 0-1 .45-1 1v4c0 .55.45 1 1 1h5c.55 0 1-.45 1-1V5c0-.55-.45-1-1-1zm-1 0h-3v-.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5V4z" /> , 'VpnLockRounded');
packages/material-ui-icons/src/AttachmentTwoTone.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <path d="M18.5 16H7c-2.21 0-4-1.79-4-4s1.79-4 4-4h12.5c1.38 0 2.5 1.12 2.5 2.5S20.88 13 19.5 13H9c-.55 0-1-.45-1-1s.45-1 1-1h9.5V9.5H9c-1.38 0-2.5 1.12-2.5 2.5s1.12 2.5 2.5 2.5h10.5c2.21 0 4-1.79 4-4s-1.79-4-4-4H7c-3.04 0-5.5 2.46-5.5 5.5s2.46 5.5 5.5 5.5h11.5V16z" /> , 'AttachmentTwoTone');
packages/material-ui-icons/src/AddBoxRounded.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <path d="M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-3 10h-3v3c0 .55-.45 1-1 1s-1-.45-1-1v-3H8c-.55 0-1-.45-1-1s.45-1 1-1h3V8c0-.55.45-1 1-1s1 .45 1 1v3h3c.55 0 1 .45 1 1s-.45 1-1 1z" /> , 'AddBoxRounded');
packages/material-ui-icons/src/SubdirectoryArrowRightSharp.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <React.Fragment><path fill="none" d="M24 24H0V0h24v24z" opacity=".87" /><path d="M19 15l-6 6-1.42-1.42L15.17 16H4V4h2v10h9.17l-3.59-3.58L13 9l6 6z" /></React.Fragment> , 'SubdirectoryArrowRightSharp');
packages/material-ui-icons/src/MeetingRoom.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <path d="M14 6v15H3v-2h2V3h9v1h5v15h2v2h-4V6h-3zm-4 5v2h2v-2h-2z" /> , 'MeetingRoom');
packages/material-ui-icons/src/NoteRounded.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <path d="M21.41 9.41l-4.83-4.83c-.37-.37-.88-.58-1.41-.58H4c-1.1 0-2 .9-2 2v12.01c0 1.1.89 1.99 1.99 1.99H20c1.1 0 2-.9 2-2v-7.17c0-.53-.21-1.04-.59-1.42zM15 5.5l5.5 5.5H16c-.55 0-1-.45-1-1V5.5z" /> , 'NoteRounded');
packages/material-ui-icons/src/NightsStayRounded.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <React.Fragment><path d="M11.1 12.08c-2-3.88-.92-7.36.07-9.27.19-.36-.12-.77-.53-.72-5.02.68-8.86 5.07-8.65 10.32.01 0 .01 0 .01.01.62-.27 1.29-.42 2-.42 1.66 0 3.18.83 4.1 2.15 1.67.48 2.9 2.02 2.9 3.85 0 1.52-.87 2.83-2.12 3.51.98.32 2.03.5 3.11.5 3.13 0 5.92-1.44 7.76-3.69.26-.32.04-.79-.37-.82-2.49-.13-6.28-1.53-8.28-5.42z" /><path d="M7 16h-.18C6.4 14.84 5.3 14 4 14c-1.66 0-3 1.34-3 3s1.34 3 3 3h3c1.1 0 2-.9 2-2s-.9-2-2-2z" /></React.Fragment> , 'NightsStayRounded');
packages/material-ui-icons/src/FormatColorResetTwoTone.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <React.Fragment><path fill="none" d="m0 0h24v24H0V0z" /><path d="M10.93 7.83l4.77 4.77c-.62-1.81-2.17-4.24-3.71-6.24-.35.47-.71.96-1.06 1.47zM12 18c.96 0 1.83-.36 2.53-.92l-5.72-5.72C8.32 12.38 8 13.31 8 14c0 2.21 1.79 4 4 4z" opacity=".3" /><path d="M12 6.36c1.53 2 3.08 4.43 3.71 6.24l2.23 2.23c.03-.27.06-.55.06-.83 0-3.98-6-10.8-6-10.8s-1.18 1.35-2.5 3.19l1.44 1.44c.34-.51.7-1 1.06-1.47zM5.41 5.14L4 6.55l3.32 3.32C6.55 11.33 6 12.79 6 14c0 3.31 2.69 6 6 6 1.52 0 2.9-.57 3.95-1.5l2.63 2.63L20 19.72 5.41 5.14zM12 18c-2.21 0-4-1.79-4-4 0-.69.32-1.62.81-2.64l5.72 5.72c-.7.56-1.57.92-2.53.92z" /></React.Fragment> , 'FormatColorResetTwoTone');
packages/material-ui-icons/src/SettingsVoiceSharp.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <path d="M7 24h2v-2H7v2zm5-11c1.66 0 2.99-1.34 2.99-3L15 4c0-1.66-1.34-3-3-3S9 2.34 9 4v6c0 1.66 1.34 3 3 3zm-1 11h2v-2h-2v2zm4 0h2v-2h-2v2zm4-14h-1.7c0 3-2.54 5.1-5.3 5.1S6.7 13 6.7 10H5c0 3.41 2.72 6.23 6 6.72V20h2v-3.28c3.28-.49 6-3.31 6-6.72z" /> , 'SettingsVoiceSharp');
packages/material-ui-icons/src/ImportContactsTwoTone.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <React.Fragment><path d="M21 5c-1.11-.35-2.33-.5-3.5-.5-1.95 0-4.05.4-5.5 1.5-1.45-1.1-3.55-1.5-5.5-1.5S2.45 4.9 1 6v14.65c0 .25.25.5.5.5.1 0 .15-.05.25-.05C3.1 20.45 5.05 20 6.5 20c1.95 0 4.05.4 5.5 1.5 1.35-.85 3.8-1.5 5.5-1.5 1.65 0 3.35.3 4.75 1.05.1.05.15.05.25.05.25 0 .5-.25.5-.5V6c-.6-.45-1.25-.75-2-1zM3 18.5V7c1.1-.35 2.3-.5 3.5-.5 1.34 0 3.13.41 4.5.99v11.5C9.63 18.41 7.84 18 6.5 18c-1.2 0-2.4.15-3.5.5zm18 0c-1.1-.35-2.3-.5-3.5-.5-1.34 0-3.13.41-4.5.99V7.49c1.37-.59 3.16-.99 4.5-.99 1.2 0 2.4.15 3.5.5v11.5z" /><path d="M11 7.49c-1.37-.58-3.16-.99-4.5-.99-1.2 0-2.4.15-3.5.5v11.5c1.1-.35 2.3-.5 3.5-.5 1.34 0 3.13.41 4.5.99V7.49z" opacity=".3" /></React.Fragment> , 'ImportContactsTwoTone');
packages/material-ui-icons/src/Filter2.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <path d="M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm18-4H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14zm-4-4h-4v-2h2c1.1 0 2-.89 2-2V7c0-1.11-.9-2-2-2h-4v2h4v2h-2c-1.1 0-2 .89-2 2v4h6v-2z" /> , 'Filter2');
packages/material-ui-icons/src/AirplanemodeInactiveTwoTone.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <path d="M21 16v-2l-8-5V3.5c0-.83-.67-1.5-1.5-1.5S10 2.67 10 3.5v3.11l8.65 8.65L21 16zm-2.27 5l1.41-1.41L4.41 3.86 3 5.27l4.99 4.99L2 14v2l8-2.5V19l-2 1.5V22l3.5-1 3.5 1v-1.5L13 19v-3.73z" /> , 'AirplanemodeInactiveTwoTone');
packages/material-ui-icons/src/AssignmentReturn.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <path d="M19 3h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm4 12h-4v3l-5-5 5-5v3h4v4z" /> , 'AssignmentReturn');
docs/pages/api/list-item.js
kybarg/material-ui
import React from 'react'; import MarkdownDocs from 'docs/src/modules/components/MarkdownDocs'; import markdown from './list-item.md'; export default function Page() { return <MarkdownDocs markdown={markdown} />; }
docs/pages/system/api.js
kybarg/material-ui
import React from 'react'; import MarkdownDocs from 'docs/src/modules/components/MarkdownDocs'; const req = require.context('docs/src/pages/system/api', false, /\.(md|js|tsx)$/); const reqSource = require.context('!raw-loader!../../src/pages/system/api', false, /\.(js|tsx)$/); const reqPrefix = 'pages/system/api'; export default function Page() { return <MarkdownDocs req={req} reqSource={reqSource} reqPrefix={reqPrefix} />; }
packages/material-ui-icons/src/ClearOutlined.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z" /> , 'ClearOutlined');
docs/pages/discover-more/showcase.js
kybarg/material-ui
import React from 'react'; import MarkdownDocs from 'docs/src/modules/components/MarkdownDocs'; const req = require.context('docs/src/pages/discover-more/showcase', false, /\.(md|js|tsx)$/); const reqSource = require.context( '!raw-loader!../../src/pages/discover-more/showcase', false, /\.(js|tsx)$/, ); const reqPrefix = 'pages/discover-more/showcase'; function Page() { return <MarkdownDocs disableToc req={req} reqSource={reqSource} reqPrefix={reqPrefix} />; } export default Page;
packages/material-ui/src/BottomNavigationAction/BottomNavigationAction.js
kybarg/material-ui
import React from 'react'; import PropTypes from 'prop-types'; import clsx from 'clsx'; import withStyles from '../styles/withStyles'; import ButtonBase from '../ButtonBase'; import unsupportedProp from '../utils/unsupportedProp'; export const styles = theme => ({ /* Styles applied to the root element. */ root: { transition: theme.transitions.create(['color', 'padding-top'], { duration: theme.transitions.duration.short, }), padding: '6px 12px 8px', minWidth: 80, maxWidth: 168, color: theme.palette.text.secondary, flex: '1', '&$iconOnly': { paddingTop: 16, }, '&$selected': { paddingTop: 6, color: theme.palette.primary.main, }, }, /* Pseudo-class applied to the root element if selected. */ selected: {}, /* Pseudo-class applied to the root element if `showLabel={false}` and not selected. */ iconOnly: {}, /* Styles applied to the span element that wraps the icon and label. */ wrapper: { display: 'inline-flex', alignItems: 'center', justifyContent: 'center', width: '100%', flexDirection: 'column', }, /* Styles applied to the label's span element. */ label: { fontFamily: theme.typography.fontFamily, fontSize: theme.typography.pxToRem(12), opacity: 1, transition: 'font-size 0.2s, opacity 0.2s', transitionDelay: '0.1s', '&$iconOnly': { opacity: 0, transitionDelay: '0s', }, '&$selected': { fontSize: theme.typography.pxToRem(14), }, }, }); const BottomNavigationAction = React.forwardRef(function BottomNavigationAction(props, ref) { const { classes, className, icon, label, onChange, onClick, selected, showLabel, value, ...other } = props; const handleChange = event => { if (onChange) { onChange(event, value); } if (onClick) { onClick(event); } }; return ( <ButtonBase ref={ref} className={clsx( classes.root, { [classes.selected]: selected, [classes.iconOnly]: !showLabel && !selected, }, className, )} focusRipple onClick={handleChange} {...other} > <span className={classes.wrapper}> {icon} <span className={clsx(classes.label, { [classes.selected]: selected, [classes.iconOnly]: !showLabel && !selected, })} > {label} </span> </span> </ButtonBase> ); }); BottomNavigationAction.propTypes = { /** * This prop isn't supported. * Use the `component` prop if you need to change the children structure. */ children: unsupportedProp, /** * Override or extend the styles applied to the component. * See [CSS API](#css) below for more details. */ classes: PropTypes.object.isRequired, /** * @ignore */ className: PropTypes.string, /** * The icon element. */ icon: PropTypes.node, /** * The label element. */ label: PropTypes.node, /** * @ignore */ onChange: PropTypes.func, /** * @ignore */ onClick: PropTypes.func, /** * @ignore */ selected: PropTypes.bool, /** * If `true`, the `BottomNavigationAction` will show its label. * By default, only the selected `BottomNavigationAction` * inside `BottomNavigation` will show its label. */ showLabel: PropTypes.bool, /** * You can provide your own value. Otherwise, we fallback to the child position index. */ value: PropTypes.any, }; export default withStyles(styles, { name: 'MuiBottomNavigationAction' })(BottomNavigationAction);
packages/material-ui/src/Popper/Popper.js
kybarg/material-ui
import React from 'react'; import PropTypes from 'prop-types'; import PopperJS from 'popper.js'; import { chainPropTypes, refType } from '@material-ui/utils'; import Portal from '../Portal'; import { createChainedFunction } from '../utils/helpers'; import { setRef, useForkRef } from '../utils/reactHelpers'; import ownerWindow from '../utils/ownerWindow'; /** * Flips placement if in <body dir="rtl" /> * @param {string} placement */ function flipPlacement(placement) { const direction = (typeof window !== 'undefined' && document.body.getAttribute('dir')) || 'ltr'; if (direction !== 'rtl') { return placement; } switch (placement) { case 'bottom-end': return 'bottom-start'; case 'bottom-start': return 'bottom-end'; case 'top-end': return 'top-start'; case 'top-start': return 'top-end'; default: return placement; } } function getAnchorEl(anchorEl) { return typeof anchorEl === 'function' ? anchorEl() : anchorEl; } const useEnhancedEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect; const defaultPopperOptions = {}; /** * Poppers rely on the 3rd party library [Popper.js](https://github.com/FezVrasta/popper.js) for positioning. */ const Popper = React.forwardRef(function Popper(props, ref) { const { anchorEl, children, container, disablePortal = false, keepMounted = false, modifiers, open, placement: initialPlacement = 'bottom', popperOptions = defaultPopperOptions, popperRef: popperRefProp, transition = false, ...other } = props; const tooltipRef = React.useRef(null); const ownRef = useForkRef(tooltipRef, ref); const popperRef = React.useRef(null); const handlePopperRef = useForkRef(popperRef, popperRefProp); const handlePopperRefRef = React.useRef(handlePopperRef); useEnhancedEffect(() => { handlePopperRefRef.current = handlePopperRef; }, [handlePopperRef]); React.useImperativeHandle(popperRefProp, () => popperRef.current, []); const [exited, setExited] = React.useState(true); const rtlPlacement = flipPlacement(initialPlacement); /** * placement initialized from prop but can change during lifetime if modifiers.flip. * modifiers.flip is essentially a flip for controlled/uncontrolled behavior */ const [placement, setPlacement] = React.useState(rtlPlacement); if (rtlPlacement !== placement) { setPlacement(rtlPlacement); } const handleOpen = React.useCallback(() => { const popperNode = tooltipRef.current; if (!popperNode || !anchorEl || !open) { return; } if (popperRef.current) { popperRef.current.destroy(); handlePopperRefRef.current(null); } const handlePopperUpdate = data => { setPlacement(data.placement); }; const popper = new PopperJS(getAnchorEl(anchorEl), popperNode, { placement: rtlPlacement, ...popperOptions, modifiers: { ...(disablePortal ? {} : { // It's using scrollParent by default, we can use the viewport when using a portal. preventOverflow: { boundariesElement: 'window', }, }), ...modifiers, ...popperOptions.modifiers, }, // We could have been using a custom modifier like react-popper is doing. // But it seems this is the best public API for this use case. onUpdate: createChainedFunction(handlePopperUpdate, popperOptions.onUpdate), }); handlePopperRefRef.current(popper); }, [anchorEl, disablePortal, modifiers, open, rtlPlacement, popperOptions]); const handleRef = React.useCallback( node => { setRef(ownRef, node); handleOpen(); }, [ownRef, handleOpen], ); const handleEnter = () => { setExited(false); }; const handleClose = () => { if (!popperRef.current) { return; } popperRef.current.destroy(); handlePopperRefRef.current(null); }; const handleExited = () => { setExited(true); handleClose(); }; React.useEffect(() => { // Let's update the popper position. handleOpen(); }, [handleOpen]); React.useEffect(() => { return () => { handleClose(); }; }, []); React.useEffect(() => { if (!open && !transition) { // Otherwise handleExited will call this. handleClose(); } }, [open, transition]); if (!keepMounted && !open && (!transition || exited)) { return null; } const childProps = { placement }; if (transition) { childProps.TransitionProps = { in: open, onEnter: handleEnter, onExited: handleExited, }; } return ( <Portal disablePortal={disablePortal} container={container}> <div ref={handleRef} role="tooltip" style={{ // Prevents scroll issue, waiting for Popper.js to add this style once initiated. position: 'fixed', }} {...other} > {typeof children === 'function' ? children(childProps) : children} </div> </Portal> ); }); Popper.propTypes = { /** * This is the reference element, or a function that returns the reference element, * that may be used to set the position of the popover. * The return value will passed as the reference object of the Popper * instance. * * The reference element should be an HTML Element instance or a referenceObject: * https://popper.js.org/popper-documentation.html#referenceObject. */ anchorEl: chainPropTypes(PropTypes.oneOfType([PropTypes.object, PropTypes.func]), props => { if (props.open) { const resolvedAnchorEl = getAnchorEl(props.anchorEl); const containerWindow = ownerWindow(resolvedAnchorEl); if (resolvedAnchorEl instanceof containerWindow.Element) { const box = resolvedAnchorEl.getBoundingClientRect(); if ( process.env.NODE_ENV !== 'test' && box.top === 0 && box.left === 0 && box.right === 0 && box.bottom === 0 ) { return new Error( [ 'Material-UI: the `anchorEl` prop provided to the component is invalid.', 'The anchor element should be part of the document layout.', "Make sure the element is present in the document or that it's not display none.", ].join('\n'), ); } } else if ( !resolvedAnchorEl || typeof resolvedAnchorEl.clientWidth !== 'number' || typeof resolvedAnchorEl.clientHeight !== 'number' || typeof resolvedAnchorEl.getBoundingClientRect !== 'function' ) { return new Error( [ 'Material-UI: the `anchorEl` prop provided to the component is invalid.', 'It should be an HTML Element instance or a referenceObject:', 'https://popper.js.org/popper-documentation.html#referenceObject.', ].join('\n'), ); } } return null; }), /** * Popper render function or node. */ children: PropTypes.oneOfType([PropTypes.node, PropTypes.func]).isRequired, /** * A node, component instance, or function that returns either. * The `container` will passed to the Modal component. * By default, it uses the body of the anchorEl's top-level document object, * so it's simply `document.body` most of the time. */ container: PropTypes.oneOfType([PropTypes.object, PropTypes.func]), /** * Disable the portal behavior. * The children stay within it's parent DOM hierarchy. */ disablePortal: PropTypes.bool, /** * Always keep the children in the DOM. * This prop can be useful in SEO situation or * when you want to maximize the responsiveness of the Popper. */ keepMounted: PropTypes.bool, /** * Popper.js is based on a "plugin-like" architecture, * most of its features are fully encapsulated "modifiers". * * A modifier is a function that is called each time Popper.js needs to * compute the position of the popper. * For this reason, modifiers should be very performant to avoid bottlenecks. * To learn how to create a modifier, [read the modifiers documentation](https://github.com/FezVrasta/popper.js/blob/master/docs/_includes/popper-documentation.md#modifiers--object). */ modifiers: PropTypes.object, /** * If `true`, the popper is visible. */ open: PropTypes.bool.isRequired, /** * Popper placement. */ placement: PropTypes.oneOf([ 'bottom-end', 'bottom-start', 'bottom', 'left-end', 'left-start', 'left', 'right-end', 'right-start', 'right', 'top-end', 'top-start', 'top', ]), /** * Options provided to the [`popper.js`](https://github.com/FezVrasta/popper.js) instance. */ popperOptions: PropTypes.object, /** * A ref that points to the used popper instance. */ popperRef: refType, /** * Help supporting a react-transition-group/Transition component. */ transition: PropTypes.bool, }; export default Popper;
docs/pages/api/radio.js
kybarg/material-ui
import React from 'react'; import MarkdownDocs from 'docs/src/modules/components/MarkdownDocs'; import markdown from './radio.md'; export default function Page() { return <MarkdownDocs markdown={markdown} />; }
packages/material-ui-icons/src/NotificationsOffRounded.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <path d="M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2zm6-11c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68c-.24.06-.47.15-.69.23L18 13.1V11zM5.41 3.35L4 4.76l2.81 2.81C6.29 8.57 6 9.73 6 11v5l-1.29 1.29c-.63.63-.19 1.71.7 1.71h12.83l1.74 1.74 1.41-1.41L5.41 3.35z" /> , 'NotificationsOffRounded');
packages/material-ui-icons/src/FilterFramesRounded.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <path d="M20 4h-4L12.71.71a.9959.9959 0 00-1.41 0L8 4H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-1 16H5c-.55 0-1-.45-1-1V7c0-.55.45-1 1-1h3.52l3.52-3.5L15.52 6H19c.55 0 1 .45 1 1v12c0 .55-.45 1-1 1zM17 8H7c-.55 0-1 .45-1 1v8c0 .55.45 1 1 1h10c.55 0 1-.45 1-1V9c0-.55-.45-1-1-1z" /> , 'FilterFramesRounded');
packages/material-ui-icons/src/PanoramaTwoTone.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <React.Fragment><path d="M3 18h18V6H3v12zm5.5-5.5l2.5 3.01L14.5 11l4.5 6H5l3.5-4.5z" opacity=".3" /><path d="M21 4H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 14H3V6h18v12zm-6.5-7L11 15.51 8.5 12.5 5 17h14z" /></React.Fragment> , 'PanoramaTwoTone');
docs/pages/discover-more/backers.js
kybarg/material-ui
import React from 'react'; import MarkdownDocs from 'docs/src/modules/components/MarkdownDocs'; const req = require.context('docs/src/pages/discover-more/backers', false, /\.(md|js|tsx)$/); const reqSource = require.context( '!raw-loader!../../src/pages/discover-more/backers', false, /\.(js|tsx)$/, ); const reqPrefix = 'pages/discover-more/backers'; export default function Page() { return <MarkdownDocs req={req} reqSource={reqSource} reqPrefix={reqPrefix} />; }
packages/material-ui-icons/src/PlayArrowRounded.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <path d="M8 6.82v10.36c0 .79.87 1.27 1.54.84l8.14-5.18c.62-.39.62-1.29 0-1.69L9.54 5.98C8.87 5.55 8 6.03 8 6.82z" /> , 'PlayArrowRounded');
packages/material-ui-icons/src/WorkSharp.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <path d="M22 6h-6V4c0-1.1-.9-2-2-2h-4c-1.1 0-2 .9-2 2v2H2v15h20V6zm-8 0h-4V4h4v2z" /> , 'WorkSharp');
packages/material-ui-icons/src/SyncAltOutlined.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <path d="M22 8l-4-4v3H3v2h15v3l4-4zM2 16l4 4v-3h15v-2H6v-3l-4 4z" /> , 'SyncAltOutlined');
docs/src/pages/getting-started/templates/sign-up/SignUp.js
kybarg/material-ui
import React from 'react'; import Avatar from '@material-ui/core/Avatar'; import Button from '@material-ui/core/Button'; import CssBaseline from '@material-ui/core/CssBaseline'; import TextField from '@material-ui/core/TextField'; import FormControlLabel from '@material-ui/core/FormControlLabel'; import Checkbox from '@material-ui/core/Checkbox'; import Link from '@material-ui/core/Link'; import Grid from '@material-ui/core/Grid'; import Box from '@material-ui/core/Box'; import LockOutlinedIcon from '@material-ui/icons/LockOutlined'; import Typography from '@material-ui/core/Typography'; import { makeStyles } from '@material-ui/core/styles'; import Container from '@material-ui/core/Container'; function Copyright() { return ( <Typography variant="body2" color="textSecondary" align="center"> {'Copyright © '} <Link color="inherit" href="https://material-ui.com/"> Your Website </Link>{' '} {new Date().getFullYear()} {'.'} </Typography> ); } const useStyles = makeStyles(theme => ({ '@global': { body: { backgroundColor: theme.palette.common.white, }, }, paper: { marginTop: theme.spacing(8), display: 'flex', flexDirection: 'column', alignItems: 'center', }, avatar: { margin: theme.spacing(1), backgroundColor: theme.palette.secondary.main, }, form: { width: '100%', // Fix IE 11 issue. marginTop: theme.spacing(3), }, submit: { margin: theme.spacing(3, 0, 2), }, })); export default function SignUp() { const classes = useStyles(); return ( <Container component="main" maxWidth="xs"> <CssBaseline /> <div className={classes.paper}> <Avatar className={classes.avatar}> <LockOutlinedIcon /> </Avatar> <Typography component="h1" variant="h5"> Sign up </Typography> <form className={classes.form} noValidate> <Grid container spacing={2}> <Grid item xs={12} sm={6}> <TextField autoComplete="fname" name="firstName" variant="outlined" required fullWidth id="firstName" label="First Name" autoFocus /> </Grid> <Grid item xs={12} sm={6}> <TextField variant="outlined" required fullWidth id="lastName" label="Last Name" name="lastName" autoComplete="lname" /> </Grid> <Grid item xs={12}> <TextField variant="outlined" required fullWidth id="email" label="Email Address" name="email" autoComplete="email" /> </Grid> <Grid item xs={12}> <TextField variant="outlined" required fullWidth name="password" label="Password" type="password" id="password" autoComplete="current-password" /> </Grid> <Grid item xs={12}> <FormControlLabel control={<Checkbox value="allowExtraEmails" color="primary" />} label="I want to receive inspiration, marketing promotions and updates via email." /> </Grid> </Grid> <Button type="submit" fullWidth variant="contained" color="primary" className={classes.submit} > Sign Up </Button> <Grid container justify="flex-end"> <Grid item> <Link href="#" variant="body2"> Already have an account? Sign in </Link> </Grid> </Grid> </form> </div> <Box mt={5}> <Copyright /> </Box> </Container> ); }
packages/material-ui-icons/src/RecordVoiceOverTwoTone.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <React.Fragment><g opacity=".3"><circle cx="9" cy="9" r="2" /><path d="M9 17c-2.69 0-5.77 1.28-6 2h12c-.2-.71-3.3-2-6-2z" /></g><path d="M9 13c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0-6c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2zm0 8c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4zm-6 4c.22-.72 3.31-2 6-2 2.7 0 5.8 1.29 6 2H3zM16.76 5.36l-1.68 1.69c.84 1.18.84 2.71 0 3.89l1.68 1.69c2.02-2.02 2.02-5.07 0-7.27zM20.07 2l-1.63 1.63c2.77 3.02 2.77 7.56 0 10.74L20.07 16c3.9-3.89 3.91-9.95 0-14z" /></React.Fragment> , 'RecordVoiceOverTwoTone');
packages/material-ui-icons/src/MoneySharp.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <path d="M14 16h5V8h-5v8zm2-6h1v4h-1v-4zm-8 6h5V8H8v8zm2-6h1v4h-1v-4zM5 8h2v8H5zM2 4v16h20V4H2zm18 14H4V6h16v12z" /> , 'MoneySharp');
packages/material-ui-icons/src/MobileFriendlyRounded.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <path d="M19 1H9c-1.1 0-2 .9-2 2v2c0 .55.45 1 1 1s1-.45 1-1V4h10v16H9v-1c0-.55-.45-1-1-1s-1 .45-1 1v2c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zM7.01 13.47l-1.92-1.92c-.35-.35-.92-.35-1.27 0s-.35.92 0 1.27l2.47 2.47c.39.39 1.02.39 1.41 0l5.85-5.85c.35-.35.35-.92 0-1.27s-.92-.35-1.27 0l-5.27 5.3z" /> , 'MobileFriendlyRounded');
packages/material-ui-icons/src/HourglassEmpty.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <path d="M6 2v6h.01L6 8.01 10 12l-4 4 .01.01H6V22h12v-5.99h-.01L18 16l-4-4 4-3.99-.01-.01H18V2H6zm10 14.5V20H8v-3.5l4-4 4 4zm-4-5l-4-4V4h8v3.5l-4 4z" /> , 'HourglassEmpty');
packages/material-ui-icons/src/AirplanemodeInactiveRounded.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <path d="M19.64 15.58c.67.21 1.36-.29 1.36-1 0-.36-.19-.69-.49-.89L13 9V3.5c0-.83-.67-1.5-1.5-1.5S10 2.67 10 3.5v3.11l8.65 8.65.99.32zM18.73 21l1.41-1.41L4.41 3.86 3 5.27l4.99 4.99-5.5 3.44c-.3.18-.49.52-.49.88 0 .7.68 1.21 1.36 1L10 13.5V19l-1.8 1.35c-.13.09-.2.24-.2.4v.59c0 .33.32.57.64.48L11.5 21l2.86.82c.32.09.64-.15.64-.48v-.59c0-.16-.07-.31-.2-.4L13 19v-3.73L18.73 21z" /> , 'AirplanemodeInactiveRounded');
packages/material-ui-icons/src/Replay10TwoTone.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <path d="M11.99 5V1l-5 5 5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6h-2c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8zm-1.1 11h-.85v-3.26l-1.01.31v-.69l1.77-.63h.09V16zm4.28-1.76c0 .32-.03.6-.1.82s-.17.42-.29.57-.28.26-.45.33-.37.1-.59.1-.41-.03-.59-.1-.33-.18-.46-.33-.23-.34-.3-.57-.11-.5-.11-.82v-.74c0-.32.03-.6.1-.82s.17-.42.29-.57.28-.26.45-.33.37-.1.59-.1.41.03.59.1.33.18.46.33.23.34.3.57.11.5.11.82v.74zm-.85-.86c0-.19-.01-.35-.04-.48s-.07-.23-.12-.31-.11-.14-.19-.17-.16-.05-.25-.05-.18.02-.25.05-.14.09-.19.17-.09.18-.12.31-.04.29-.04.48v.97c0 .19.01.35.04.48s.07.24.12.32.11.14.19.17.16.05.25.05.18-.02.25-.05.14-.09.19-.17.09-.19.11-.32.04-.29.04-.48v-.97z" /> , 'Replay10TwoTone');
packages/material-ui-icons/src/StrikethroughSRounded.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <path d="M14.59 7.52c0-.31-.05-.59-.15-.85-.09-.27-.24-.49-.44-.68-.2-.19-.45-.33-.75-.44-.3-.1-.66-.16-1.06-.16-.39 0-.74.04-1.03.13s-.53.21-.72.36c-.19.16-.34.34-.44.55-.1.21-.15.43-.15.66 0 .48.25.88.74 1.21.38.25.77.48 1.41.7H7.39c-.05-.08-.11-.17-.15-.25-.26-.48-.39-1.03-.39-1.67 0-.61.13-1.16.4-1.67.26-.5.63-.93 1.11-1.29.48-.35 1.05-.63 1.7-.83.66-.19 1.39-.29 2.18-.29.81 0 1.54.11 2.21.34.66.22 1.23.54 1.69.94.47.4.83.88 1.08 1.43s.38 1.15.38 1.81h-3.01M20 10H4c-.55 0-1 .45-1 1s.45 1 1 1h8.62c.18.07.4.14.55.2.37.17.66.34.87.51s.35.36.43.57c.07.2.11.43.11.69 0 .23-.05.45-.14.66-.09.2-.23.38-.42.53-.19.15-.42.26-.71.35-.29.08-.63.13-1.01.13-.43 0-.83-.04-1.18-.13s-.66-.23-.91-.42c-.25-.19-.45-.44-.59-.75s-.25-.76-.25-1.21H6.4c0 .55.08 1.13.24 1.58s.37.85.65 1.21c.28.35.6.66.98.92.37.26.78.48 1.22.65.44.17.9.3 1.38.39.48.08.96.13 1.44.13.8 0 1.53-.09 2.18-.28s1.21-.45 1.67-.79c.46-.34.82-.77 1.07-1.27s.38-1.07.38-1.71c0-.6-.1-1.14-.31-1.61-.05-.11-.11-.23-.17-.33H20c.55 0 1-.45 1-1V11c0-.55-.45-1-1-1z" /> , 'StrikethroughSRounded');
packages/material-ui-icons/src/HttpOutlined.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <React.Fragment><path fill="none" d="M24 24H0V0h24v24z" opacity=".87" /><path d="M4.5 11h-2V9H1v6h1.5v-2.5h2V15H6V9H4.5v2zm2.5-.5h1.5V15H10v-4.5h1.5V9H7v1.5zm5.5 0H14V15h1.5v-4.5H17V9h-4.5v1.5zm9-1.5H18v6h1.5v-2h2c.8 0 1.5-.7 1.5-1.5v-1c0-.8-.7-1.5-1.5-1.5zm0 2.5h-2v-1h2v1z" /></React.Fragment> , 'HttpOutlined');
packages/material-ui-icons/src/GetAppTwoTone.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <React.Fragment><path d="M14.17 11H13V5h-2v6H9.83L12 13.17z" opacity=".3" /><path d="M19 9h-4V3H9v6H5l7 7 7-7zm-8 2V5h2v6h1.17L12 13.17 9.83 11H11zm-6 7h14v2H5z" /></React.Fragment> , 'GetAppTwoTone');
packages/material-ui-icons/src/RvHookupSharp.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <path d="M20 17V9H7V7l-3 3 3 3v-2h4v3H4v5h4c0 1.66 1.34 3 3 3s3-1.34 3-3h8v-2h-2zm-9 3c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm7-6h-4v-3h4v3zM17 2v2H9v2h8v2l3-3-3-3z" /> , 'RvHookupSharp');
packages/material-ui-icons/src/LooksOneSharp.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <path d="M21 3H3v18h18V3zm-7 14h-2V9h-2V7h4v10z" /> , 'LooksOneSharp');
packages/material-ui-icons/src/KeyboardTabOutlined.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <path d="M11.59 7.41L15.17 11H1v2h14.17l-3.59 3.59L13 18l6-6-6-6-1.41 1.41zM20 6v12h2V6h-2z" /> , 'KeyboardTabOutlined');
packages/material-ui-icons/src/ThumbUpAltRounded.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <React.Fragment><path fill="none" d="M0 0h24v24H0V0z" opacity=".87" /><path d="M13.12 2.06L7.58 7.6c-.37.37-.58.88-.58 1.41V19c0 1.1.9 2 2 2h9c.8 0 1.52-.48 1.84-1.21l3.26-7.61C23.94 10.2 22.49 8 20.34 8h-5.65l.95-4.58c.1-.5-.05-1.01-.41-1.37-.59-.58-1.53-.58-2.11.01zM3 21c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2s-2 .9-2 2v8c0 1.1.9 2 2 2z" /></React.Fragment> , 'ThumbUpAltRounded');
packages/material-ui-icons/src/LoupeSharp.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <path d="M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4V7zm-.27-4.97c-6.08-.44-11.14 4.62-10.7 10.7.38 5.28 5 9.27 10.29 9.27H22v-9.68c0-5.3-3.98-9.91-9.27-10.29zM12 20c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z" /> , 'LoupeSharp');
packages/material-ui-icons/src/Warning.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <path d="M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z" /> , 'Warning');
packages/material-ui-icons/src/PageviewSharp.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <path d="M11.5 9C10.12 9 9 10.12 9 11.5s1.12 2.5 2.5 2.5 2.5-1.12 2.5-2.5S12.88 9 11.5 9zM22 4H2v16h20V4zm-5.21 14.21l-2.91-2.91c-.69.44-1.51.7-2.39.7C9.01 16 7 13.99 7 11.5S9.01 7 11.5 7 16 9.01 16 11.5c0 .88-.26 1.69-.7 2.39l2.91 2.9-1.42 1.42z" /> , 'PageviewSharp');
packages/material-ui-icons/src/CloudDoneTwoTone.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <React.Fragment><path d="M19.21 12.04l-1.53-.11-.3-1.5C16.88 7.86 14.62 6 12 6 9.94 6 8.08 7.14 7.12 8.96l-.5.95-1.07.11C3.53 10.24 2 11.95 2 14c0 2.21 1.79 4 4 4h13c1.65 0 3-1.35 3-3 0-1.55-1.22-2.86-2.79-2.96zM10 17l-3.5-3.5 1.41-1.41L10 14.18l4.6-4.6 1.41 1.41L10 17z" opacity=".3" /><path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM19 18H6c-2.21 0-4-1.79-4-4 0-2.05 1.53-3.76 3.56-3.97l1.07-.11.5-.95C8.08 7.14 9.94 6 12 6c2.62 0 4.88 1.86 5.39 4.43l.3 1.5 1.53.11c1.56.1 2.78 1.41 2.78 2.96 0 1.65-1.35 3-3 3zm-9-3.82l-2.09-2.09L6.5 13.5 10 17l6.01-6.01-1.41-1.41z" /></React.Fragment> , 'CloudDoneTwoTone');
packages/material-ui-icons/legacy/SignalWifi2BarOutlined.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <React.Fragment><path fillOpacity=".3" d="M23.64 7c-.45-.34-4.93-4-11.64-4C5.28 3 .81 6.66.36 7L12 21.5 23.64 7z" /><path d="M4.79 12.52L12 21.5l7.21-8.99C18.85 12.24 16.1 10 12 10s-6.85 2.24-7.21 2.52z" /></React.Fragment> , 'SignalWifi2BarOutlined');
examples/ssr/client.js
kybarg/material-ui
import React from 'react'; import ReactDOM from 'react-dom'; import CssBaseline from '@material-ui/core/CssBaseline'; import { ThemeProvider } from '@material-ui/styles'; import App from './App'; import theme from './theme'; function Main() { React.useEffect(() => { const jssStyles = document.querySelector('#jss-server-side'); if (jssStyles) { jssStyles.parentNode.removeChild(jssStyles); } }, []); return ( <ThemeProvider theme={theme}> {/* CssBaseline kickstart an elegant, consistent, and simple baseline to build upon. */} <CssBaseline /> <App /> </ThemeProvider> ); } ReactDOM.hydrate(<Main />, document.querySelector('#root'));
packages/material-ui/src/test-utils/getClasses.js
kybarg/material-ui
import React from 'react'; import createShallow from './createShallow'; const shallow = createShallow(); // Helper function to extract the classes from a styleSheet. export default function getClasses(element) { const { useStyles } = element.type; let classes; function Listener() { classes = useStyles(element.props); return null; } shallow(<Listener />); return classes; }
docs/src/pages/components/progress/CircularUnderLoad.js
kybarg/material-ui
import React from 'react'; import CircularProgress from '@material-ui/core/CircularProgress'; export default function CircularUnderLoad() { return <CircularProgress disableShrink />; }
packages/material-ui-icons/src/ArrowForwardIosSharp.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <React.Fragment><path fill="none" d="M24 24H0V0h24v24z" opacity=".87" /><path d="M6.49 20.13l1.77 1.77 9.9-9.9-9.9-9.9-1.77 1.77L14.62 12l-8.13 8.13z" /></React.Fragment> , 'ArrowForwardIosSharp');
packages/material-ui-icons/src/PhoneEnabled.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <path d="M17.38 10.79l-2.2-2.2c-.28-.28-.36-.67-.25-1.02.37-1.12.57-2.32.57-3.57 0-.55.45-1 1-1H20c.55 0 1 .45 1 1 0 9.39-7.61 17-17 17-.55 0-1-.45-1-1v-3.49c0-.55.45-1 1-1 1.24 0 2.45-.2 3.57-.57.35-.12.75-.03 1.02.24l2.2 2.2c2.83-1.45 5.15-3.76 6.59-6.59z" /> , 'PhoneEnabled');
packages/material-ui-icons/src/TapAndPlayRounded.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <path d="M3.14 16.09c-.6-.1-1.14.39-1.14 1 0 .49.36.9.85.98 2.08.36 3.72 2 4.08 4.08.08.49.49.85.98.85.61 0 1.09-.54 1-1.14-.48-2.95-2.81-5.29-5.77-5.77zM2 20v3h3c0-1.66-1.34-3-3-3zm1.11-7.94c-.59-.06-1.11.4-1.11.99 0 .5.37.94.87.99 4.27.41 7.67 3.81 8.08 8.08.05.5.48.88.99.88.59 0 1.06-.51 1-1.1-.51-5.2-4.63-9.32-9.83-9.84zM17 1.01L7 1c-1.1 0-2 .9-2 2v7.37c.69.16 1.36.37 2 .64V5h10v13h-3.03c.52 1.25.84 2.59.95 4H17c1.1 0 2-.9 2-2V3c0-1.1-.9-1.99-2-1.99z" /> , 'TapAndPlayRounded');
packages/material-ui-icons/src/ExpandLessTwoTone.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <path d="M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14l-6-6z" /> , 'ExpandLessTwoTone');
packages/material-ui-icons/src/CalendarViewDay.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <path d="M3 17h18v2H3zm0-7h18v5H3zm0-4h18v2H3z" /> , 'CalendarViewDay');
packages/material-ui-icons/src/DeleteOutlineSharp.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <path d="M6 21h12V7H6v14zM8 9h8v10H8V9zm7.5-5l-1-1h-5l-1 1H5v2h14V4h-3.5z" /> , 'DeleteOutlineSharp');
docs/pages/components/transfer-list.js
kybarg/material-ui
import React from 'react'; import MarkdownDocs from 'docs/src/modules/components/MarkdownDocs'; const req = require.context('docs/src/pages/components/transfer-list', false, /\.(md|js|tsx)$/); const reqSource = require.context( '!raw-loader!../../src/pages/components/transfer-list', false, /\.(js|tsx)$/, ); const reqPrefix = 'pages/components/transfer-list'; export default function Page() { return <MarkdownDocs req={req} reqSource={reqSource} reqPrefix={reqPrefix} />; }
packages/material-ui-icons/src/MenuBookTwoTone.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <React.Fragment><path d="M21 5c-1.11-.35-2.33-.5-3.5-.5-1.95 0-4.05.4-5.5 1.5-1.45-1.1-3.55-1.5-5.5-1.5S2.45 4.9 1 6v14.65c0 .25.25.5.5.5.1 0 .15-.05.25-.05C3.1 20.45 5.05 20 6.5 20c1.95 0 4.05.4 5.5 1.5 1.35-.85 3.8-1.5 5.5-1.5 1.65 0 3.35.3 4.75 1.05.1.05.15.05.25.05.25 0 .5-.25.5-.5V6c-.6-.45-1.25-.75-2-1zM3 18.5V7c1.1-.35 2.3-.5 3.5-.5 1.34 0 3.13.41 4.5.99v11.5C9.63 18.41 7.84 18 6.5 18c-1.2 0-2.4.15-3.5.5zm18 0c-1.1-.35-2.3-.5-3.5-.5-1.34 0-3.13.41-4.5.99V7.49c1.37-.59 3.16-.99 4.5-.99 1.2 0 2.4.15 3.5.5v11.5z" /><path d="M11 7.49c-1.37-.58-3.16-.99-4.5-.99-1.2 0-2.4.15-3.5.5v11.5c1.1-.35 2.3-.5 3.5-.5 1.34 0 3.13.41 4.5.99V7.49z" opacity=".3" /><g><path d="M17.5 10.5c.88 0 1.73.09 2.5.26V9.24c-.79-.15-1.64-.24-2.5-.24-1.28 0-2.46.16-3.5.47v1.57c.99-.35 2.18-.54 3.5-.54zM17.5 13.16c.88 0 1.73.09 2.5.26V11.9c-.79-.15-1.64-.24-2.5-.24-1.28 0-2.46.16-3.5.47v1.57c.99-.34 2.18-.54 3.5-.54zM17.5 15.83c.88 0 1.73.09 2.5.26v-1.52c-.79-.15-1.64-.24-2.5-.24-1.28 0-2.46.16-3.5.47v1.57c.99-.35 2.18-.54 3.5-.54z" /></g></React.Fragment> , 'MenuBookTwoTone');
docs/pages/components/badges.js
kybarg/material-ui
import React from 'react'; import MarkdownDocs from 'docs/src/modules/components/MarkdownDocs'; const req = require.context('docs/src/pages/components/badges', false, /\.(md|js|tsx)$/); const reqSource = require.context( '!raw-loader!../../src/pages/components/badges', false, /\.(js|tsx)$/, ); const reqPrefix = 'pages/components/badges'; export default function Page() { return <MarkdownDocs req={req} reqSource={reqSource} reqPrefix={reqPrefix} />; }
packages/material-ui-icons/src/FormatTextdirectionRToL.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <path d="M10 10v5h2V4h2v11h2V4h2V2h-8C7.79 2 6 3.79 6 6s1.79 4 4 4zm-2 7v-3l-4 4 4 4v-3h12v-2H8z" /> , 'FormatTextdirectionRToL');
packages/material-ui-icons/src/BorderStyle.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <path d="M15 21h2v-2h-2v2zm4 0h2v-2h-2v2zM7 21h2v-2H7v2zm4 0h2v-2h-2v2zm8-4h2v-2h-2v2zm0-4h2v-2h-2v2zM3 3v18h2V5h16V3H3zm16 6h2V7h-2v2z" /> , 'BorderStyle');
packages/material-ui-icons/src/TripOriginTwoTone.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 16c-3.31 0-6-2.69-6-6s2.69-6 6-6 6 2.69 6 6-2.69 6-6 6z" /> , 'TripOriginTwoTone');
docs/src/pages/components/buttons/ContainedButtons.js
kybarg/material-ui
import React from 'react'; import { makeStyles } from '@material-ui/core/styles'; import Button from '@material-ui/core/Button'; const useStyles = makeStyles(theme => ({ button: { margin: theme.spacing(1), }, input: { display: 'none', }, })); export default function ContainedButtons() { const classes = useStyles(); return ( <div> <Button variant="contained" className={classes.button}> Default </Button> <Button variant="contained" color="primary" className={classes.button}> Primary </Button> <Button variant="contained" color="secondary" className={classes.button}> Secondary </Button> <Button variant="contained" color="secondary" disabled className={classes.button}> Disabled </Button> <Button variant="contained" href="#contained-buttons" className={classes.button}> Link </Button> <input accept="image/*" className={classes.input} id="contained-button-file" multiple type="file" /> <label htmlFor="contained-button-file"> <Button variant="contained" component="span" className={classes.button}> Upload </Button> </label> </div> ); }
packages/material-ui-icons/src/ChromeReaderMode.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <React.Fragment><path fill="none" d="M-74 29h48v48h-48V29zM0 0h24v24H0V0zm0 0h24v24H0V0z" /><path d="M13 12h7v1.5h-7zm0-2.5h7V11h-7zm0 5h7V16h-7zM21 4H3c-1.1 0-2 .9-2 2v13c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 15h-9V6h9v13z" /></React.Fragment> , 'ChromeReaderMode');
packages/material-ui-icons/src/EuroTwoTone.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <path d="M15 18.5c-2.51 0-4.68-1.42-5.76-3.5H15l1-2H8.58c-.05-.33-.08-.66-.08-1s.03-.67.08-1H15l1-2H9.24C10.32 6.92 12.5 5.5 15 5.5c1.61 0 3.09.59 4.23 1.57L21 5.3C19.41 3.87 17.3 3 15 3c-3.92 0-7.24 2.51-8.48 6H3l-1 2h4.06c-.04.33-.06.66-.06 1s.02.67.06 1H3l-1 2h4.52c1.24 3.49 4.56 6 8.48 6 2.31 0 4.41-.87 6-2.3l-1.78-1.77c-1.13.98-2.6 1.57-4.22 1.57z" /> , 'EuroTwoTone');
packages/material-ui-icons/src/Fireplace.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <path d="M2 2v20h20V2H2zm9.86 14.96c.76-.24 1.4-1.04 1.53-1.63.13-.56-.1-1.05-.2-1.6-.08-.46-.07-.85.08-1.28.54 1.21 2.15 1.64 1.98 3.18-.19 1.7-2.11 2.38-3.39 1.33zM20 20h-2v-2h-2.02c.63-.84 1.02-1.87 1.02-3 0-1.89-1.09-2.85-1.85-3.37C12.2 9.61 13 7 13 7c-6.73 3.57-6.02 7.47-6 8 .03.96.49 2.07 1.23 3H6v2H4V4h16v16z" /> , 'Fireplace');
packages/material-ui-icons/src/Smartphone.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <path d="M17 1.01L7 1c-1.1 0-2 .9-2 2v18c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V3c0-1.1-.9-1.99-2-1.99zM17 19H7V5h10v14z" /> , 'Smartphone');
packages/material-ui-icons/src/SignalWifi4BarLockOutlined.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <path d="M20.5 9.5c.36 0 .71.04 1.05.11L23.64 7c-.45-.34-4.93-4-11.64-4C5.28 3 .81 6.66.36 7L12 21.5l3.5-4.36V14.5c0-2.8 2.2-5 5-5zM23 16v-1.5c0-1.4-1.1-2.5-2.5-2.5S18 13.1 18 14.5V16c-.5 0-1 .5-1 1v4c0 .5.5 1 1 1h5c.5 0 1-.5 1-1v-4c0-.5-.5-1-1-1zm-1 0h-3v-1.5c0-.8.7-1.5 1.5-1.5s1.5.7 1.5 1.5V16z" /> , 'SignalWifi4BarLockOutlined');
packages/material-ui-icons/src/AlarmAddTwoTone.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <React.Fragment><path d="M12 6c-3.86 0-7 3.14-7 7s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm4 8h-3v3h-2v-3H8v-2h3V9h2v3h3v2z" opacity=".3" /><path d="M17.337 1.81l4.607 3.845-1.28 1.535-4.61-3.843zm-10.674 0l1.282 1.536L3.337 7.19l-1.28-1.536zM12 4c-4.97 0-9 4.03-9 9s4.03 9 9 9 9-4.03 9-9-4.03-9-9-9zm0 16c-3.86 0-7-3.14-7-7s3.14-7 7-7 7 3.14 7 7-3.14 7-7 7zm1-11h-2v3H8v2h3v3h2v-3h3v-2h-3z" /></React.Fragment> , 'AlarmAddTwoTone');
packages/material-ui-icons/src/CommuteSharp.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <path d="M12 4H5C3.34 4 2 5.34 2 7v8c0 1.66 1.34 3 3 3l-1 1v1h1l2-2h2v-5H4V6h9v2h2V7c0-1.66-1.34-3-3-3zM5 14c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm15.57-4.34c-.14-.4-.52-.66-.97-.66h-7.19c-.46 0-.83.26-.98.66l-1.42 4.11v5.51c0 .38.31.72.69.72h.62c.38 0 .68-.38.68-.76V18h8v1.24c0 .38.31.76.69.76h.61c.38 0 .69-.34.69-.72l.01-1.37v-4.14l-1.43-4.11zm-8.16.34h7.19l1.03 3h-9.25l1.03-3zM12 16c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm8 0c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1z" /> , 'CommuteSharp');
packages/material-ui-icons/legacy/SignalCellular0Bar.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <path fillOpacity=".3" d="M2 22h20V2z" /> , 'SignalCellular0Bar');
packages/material-ui-icons/src/LocalCarWashOutlined.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <React.Fragment><path d="M17 5c.83 0 1.5-.67 1.5-1.5 0-1-1.5-2.7-1.5-2.7s-1.5 1.7-1.5 2.7c0 .83.67 1.5 1.5 1.5zm-5 0c.83 0 1.5-.67 1.5-1.5 0-1-1.5-2.7-1.5-2.7s-1.5 1.7-1.5 2.7c0 .83.67 1.5 1.5 1.5zM7 5c.83 0 1.5-.67 1.5-1.5C8.5 2.5 7 .8 7 .8S5.5 2.5 5.5 3.5C5.5 4.33 6.17 5 7 5zm11.92 3.01C18.72 7.42 18.16 7 17.5 7h-11c-.66 0-1.21.42-1.42 1.01L3 14v8c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-1h12v1c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-8l-2.08-5.99zM6.85 9h10.29l1.04 3H5.81l1.04-3zM19 19H5v-4.66l.12-.34h13.77l.11.34V19z" /><circle cx="7.5" cy="16.5" r="1.5" /><circle cx="16.5" cy="16.5" r="1.5" /></React.Fragment> , 'LocalCarWashOutlined');
packages/material-ui-icons/src/SyncOutlined.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <React.Fragment><path fill="none" d="M.01 0h24v24h-24V0z" /><path d="M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3z" /></React.Fragment> , 'SyncOutlined');
packages/material-ui-icons/src/KeyboardArrowUp.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <path d="M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z" /> , 'KeyboardArrowUp');
packages/material-ui-icons/src/AccessTimeTwoTone.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <React.Fragment><path d="M12 4c-4.42 0-8 3.58-8 8s3.58 8 8 8 8-3.58 8-8-3.58-8-8-8zm4.25 12.15L11 13V7h1.5v5.25l4.5 2.67-.75 1.23z" opacity=".3" /><path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67z" /></React.Fragment> , 'AccessTimeTwoTone');
packages/material-ui-icons/src/ReplayTwoTone.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <path d="M7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8V1L7 6z" /> , 'ReplayTwoTone');
packages/material-ui-icons/src/Work.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <path d="M20 6h-4V4c0-1.11-.89-2-2-2h-4c-1.11 0-2 .89-2 2v2H4c-1.11 0-1.99.89-1.99 2L2 19c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V8c0-1.11-.89-2-2-2zm-6 0h-4V4h4v2z" /> , 'Work');
packages/material-ui-icons/src/AspectRatioTwoTone.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <React.Fragment><path d="M3 19.01h18V4.99H3v14.02zM14 15h3v-3h2v5h-5v-2zM5 7h5v2H7v3H5V7z" opacity=".3" /><path d="M21 3H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16.01H3V4.99h18v14.02zM7 9h3V7H5v5h2zm12 3h-2v3h-3v2h5z" /></React.Fragment> , 'AspectRatioTwoTone');
packages/material-ui-icons/src/WrapTextTwoTone.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <path d="M4 17h6v2H4zm13-6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3 3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4zM4 5h16v2H4z" /> , 'WrapTextTwoTone');
packages/material-ui-icons/src/Hotel.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <path d="M7 13c1.66 0 3-1.34 3-3S8.66 7 7 7s-3 1.34-3 3 1.34 3 3 3zm12-6h-8v7H3V5H1v15h2v-3h18v3h2v-9c0-2.21-1.79-4-4-4z" /> , 'Hotel');
packages/material-ui-icons/src/BlurCircularSharp.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <path d="M10 9c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm0 4c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zM7 9.5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm3 7c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm-3-3c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm3-6c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5zM14 9c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm0-1.5c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5zm3 6c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm0-4c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm2-3.5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm0-3.5c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1z" /> , 'BlurCircularSharp');
docs/src/pages/components/tree-view/GmailTreeView.js
kybarg/material-ui
import React from 'react'; import PropTypes from 'prop-types'; import { makeStyles } from '@material-ui/core/styles'; import TreeView from '@material-ui/lab/TreeView'; import TreeItem from '@material-ui/lab/TreeItem'; import Typography from '@material-ui/core/Typography'; import MailIcon from '@material-ui/icons/Mail'; import DeleteIcon from '@material-ui/icons/Delete'; import Label from '@material-ui/icons/Label'; import SupervisorAccountIcon from '@material-ui/icons/SupervisorAccount'; import InfoIcon from '@material-ui/icons/Info'; import ForumIcon from '@material-ui/icons/Forum'; import LocalOfferIcon from '@material-ui/icons/LocalOffer'; import ArrowDropDownIcon from '@material-ui/icons/ArrowDropDown'; import ArrowRightIcon from '@material-ui/icons/ArrowRight'; const useTreeItemStyles = makeStyles(theme => ({ root: { color: theme.palette.text.secondary, '&:focus > $content': { backgroundColor: `var(--tree-view-bg-color, ${theme.palette.grey[400]})`, color: 'var(--tree-view-color)', }, }, content: { color: theme.palette.text.secondary, borderTopRightRadius: theme.spacing(2), borderBottomRightRadius: theme.spacing(2), paddingRight: theme.spacing(1), fontWeight: theme.typography.fontWeightMedium, '$expanded > &': { fontWeight: theme.typography.fontWeightRegular, }, }, group: { marginLeft: 0, '& $content': { paddingLeft: theme.spacing(2), }, }, expanded: {}, label: { fontWeight: 'inherit', color: 'inherit', }, labelRoot: { display: 'flex', alignItems: 'center', padding: theme.spacing(0.5, 0), }, labelIcon: { marginRight: theme.spacing(1), }, labelText: { fontWeight: 'inherit', flexGrow: 1, }, })); function StyledTreeItem(props) { const classes = useTreeItemStyles(); const { labelText, labelIcon: LabelIcon, labelInfo, color, bgColor, ...other } = props; return ( <TreeItem label={ <div className={classes.labelRoot}> <LabelIcon color="inherit" className={classes.labelIcon} /> <Typography variant="body2" className={classes.labelText}> {labelText} </Typography> <Typography variant="caption" color="inherit"> {labelInfo} </Typography> </div> } style={{ '--tree-view-color': color, '--tree-view-bg-color': bgColor, }} classes={{ root: classes.root, content: classes.content, expanded: classes.expanded, group: classes.group, label: classes.label, }} {...other} /> ); } StyledTreeItem.propTypes = { bgColor: PropTypes.string, color: PropTypes.string, labelIcon: PropTypes.elementType.isRequired, labelInfo: PropTypes.string, labelText: PropTypes.string.isRequired, }; const useStyles = makeStyles({ root: { height: 264, flexGrow: 1, maxWidth: 400, }, }); export default function GmailTreeView() { const classes = useStyles(); return ( <TreeView className={classes.root} defaultExpanded={['3']} defaultCollapseIcon={<ArrowDropDownIcon />} defaultExpandIcon={<ArrowRightIcon />} defaultEndIcon={<div style={{ width: 24 }} />} > <StyledTreeItem nodeId="1" labelText="All Mail" labelIcon={MailIcon} /> <StyledTreeItem nodeId="2" labelText="Trash" labelIcon={DeleteIcon} /> <StyledTreeItem nodeId="3" labelText="Categories" labelIcon={Label}> <StyledTreeItem nodeId="5" labelText="Social" labelIcon={SupervisorAccountIcon} labelInfo="90" color="#1a73e8" bgColor="#e8f0fe" /> <StyledTreeItem nodeId="6" labelText="Updates" labelIcon={InfoIcon} labelInfo="2,294" color="#e3742f" bgColor="#fcefe3" /> <StyledTreeItem nodeId="7" labelText="Forums" labelIcon={ForumIcon} labelInfo="3,566" color="#a250f5" bgColor="#f3e8fd" /> <StyledTreeItem nodeId="8" labelText="Promotions" labelIcon={LocalOfferIcon} labelInfo="733" color="#3c8039" bgColor="#e6f4ea" /> </StyledTreeItem> <StyledTreeItem nodeId="4" labelText="History" labelIcon={Label} /> </TreeView> ); }
packages/material-ui-icons/src/QueueMusic.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <path d="M15 6H3v2h12V6zm0 4H3v2h12v-2zM3 16h8v-2H3v2zM17 6v8.18c-.31-.11-.65-.18-1-.18-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3V8h3V6h-5z" /> , 'QueueMusic');
packages/material-ui-icons/src/ReportRounded.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <path d="M15.32 3H8.68c-.26 0-.52.11-.7.29L3.29 7.98c-.18.18-.29.44-.29.7v6.63c0 .27.11.52.29.71l4.68 4.68c.19.19.45.3.71.3h6.63c.27 0 .52-.11.71-.29l4.68-4.68c.19-.19.29-.44.29-.71V8.68c0-.27-.11-.52-.29-.71l-4.68-4.68c-.18-.18-.44-.29-.7-.29zM12 17.3c-.72 0-1.3-.58-1.3-1.3s.58-1.3 1.3-1.3 1.3.58 1.3 1.3-.58 1.3-1.3 1.3zm0-4.3c-.55 0-1-.45-1-1V8c0-.55.45-1 1-1s1 .45 1 1v4c0 .55-.45 1-1 1z" /> , 'ReportRounded');
packages/material-ui-icons/src/MoreHoriz.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <path d="M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z" /> , 'MoreHoriz');
packages/material-ui-icons/src/DeleteOutlineOutlined.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <path d="M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM8 9h8v10H8V9zm7.5-5l-1-1h-5l-1 1H5v2h14V4h-3.5z" /> , 'DeleteOutlineOutlined');
docs/src/pages/components/snackbars/SimpleSnackbar.js
kybarg/material-ui
import React from 'react'; import { makeStyles } from '@material-ui/core/styles'; import Button from '@material-ui/core/Button'; import Snackbar from '@material-ui/core/Snackbar'; import IconButton from '@material-ui/core/IconButton'; import CloseIcon from '@material-ui/icons/Close'; const useStyles = makeStyles(theme => ({ close: { padding: theme.spacing(0.5), }, })); export default function SimpleSnackbar() { const classes = useStyles(); const [open, setOpen] = React.useState(false); const handleClick = () => { setOpen(true); }; const handleClose = (event, reason) => { if (reason === 'clickaway') { return; } setOpen(false); }; return ( <div> <Button onClick={handleClick}>Open simple snackbar</Button> <Snackbar anchorOrigin={{ vertical: 'bottom', horizontal: 'left', }} open={open} autoHideDuration={6000} onClose={handleClose} ContentProps={{ 'aria-describedby': 'message-id', }} message={<span id="message-id">Note archived</span>} action={[ <Button key="undo" color="secondary" size="small" onClick={handleClose}> UNDO </Button>, <IconButton key="close" aria-label="close" color="inherit" className={classes.close} onClick={handleClose} > <CloseIcon /> </IconButton>, ]} /> </div> ); }
packages/material-ui-icons/legacy/BatteryCharging50Outlined.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <React.Fragment><path d="M14.47 13.5L11 20v-5.5H9l.53-1H7v7.17C7 21.4 7.6 22 8.33 22h7.33c.74 0 1.34-.6 1.34-1.33V13.5h-2.53z" /><path fillOpacity=".3" d="M15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33v8.17h2.53L13 7v5.5h2l-.53 1H17V5.33C17 4.6 16.4 4 15.67 4z" /></React.Fragment> , 'BatteryCharging50Outlined');
packages/material-ui-icons/src/AmpStories.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <path d="M7 4h10v15H7zM3 6h2v11H3zM19 6h2v11h-2z" /> , 'AmpStories');
docs/src/pages/getting-started/templates/sticky-footer/StickyFooter.js
kybarg/material-ui
import React from 'react'; import CssBaseline from '@material-ui/core/CssBaseline'; import Typography from '@material-ui/core/Typography'; import { makeStyles } from '@material-ui/core/styles'; import Container from '@material-ui/core/Container'; import Link from '@material-ui/core/Link'; function Copyright() { return ( <Typography variant="body2" color="textSecondary" align="center"> {'Copyright © '} <Link color="inherit" href="https://material-ui.com/"> Your Website </Link>{' '} {new Date().getFullYear()} {'.'} </Typography> ); } const useStyles = makeStyles(theme => ({ root: { display: 'flex', flexDirection: 'column', minHeight: '100vh', }, main: { marginTop: theme.spacing(8), marginBottom: theme.spacing(2), }, footer: { padding: theme.spacing(2), marginTop: 'auto', backgroundColor: 'white', }, })); export default function StickyFooter() { const classes = useStyles(); return ( <div className={classes.root}> <CssBaseline /> <Container component="main" className={classes.main} maxWidth="sm"> <Typography variant="h2" component="h1" gutterBottom> Sticky footer </Typography> <Typography variant="h5" component="h2" gutterBottom> {'Pin a footer to the bottom of the viewport.'} {'The footer will move as the main element of the page grows.'} </Typography> <Typography variant="body1">Sticky footer placeholder.</Typography> </Container> <footer className={classes.footer}> <Container maxWidth="sm"> <Typography variant="body1">My sticky footer can be found here.</Typography> <Copyright /> </Container> </footer> </div> ); }
docs/src/pages/components/radio-buttons/CustomizedRadios.js
kybarg/material-ui
import React from 'react'; import clsx from 'clsx'; import { makeStyles } from '@material-ui/core/styles'; import Radio from '@material-ui/core/Radio'; import RadioGroup from '@material-ui/core/RadioGroup'; import FormControlLabel from '@material-ui/core/FormControlLabel'; import FormControl from '@material-ui/core/FormControl'; import FormLabel from '@material-ui/core/FormLabel'; const useStyles = makeStyles({ root: { '&:hover': { backgroundColor: 'transparent', }, }, icon: { borderRadius: '50%', width: 16, height: 16, boxShadow: 'inset 0 0 0 1px rgba(16,22,26,.2), inset 0 -1px 0 rgba(16,22,26,.1)', backgroundColor: '#f5f8fa', backgroundImage: 'linear-gradient(180deg,hsla(0,0%,100%,.8),hsla(0,0%,100%,0))', '$root.Mui-focusVisible &': { outline: '2px auto rgba(19,124,189,.6)', outlineOffset: 2, }, 'input:hover ~ &': { backgroundColor: '#ebf1f5', }, 'input:disabled ~ &': { boxShadow: 'none', background: 'rgba(206,217,224,.5)', }, }, checkedIcon: { backgroundColor: '#137cbd', backgroundImage: 'linear-gradient(180deg,hsla(0,0%,100%,.1),hsla(0,0%,100%,0))', '&:before': { display: 'block', width: 16, height: 16, backgroundImage: 'radial-gradient(#fff,#fff 28%,transparent 32%)', content: '""', }, 'input:hover ~ &': { backgroundColor: '#106ba3', }, }, }); // Inspired by blueprintjs function StyledRadio(props) { const classes = useStyles(); return ( <Radio className={classes.root} disableRipple color="default" checkedIcon={<span className={clsx(classes.icon, classes.checkedIcon)} />} icon={<span className={classes.icon} />} {...props} /> ); } export default function CustomizedRadios() { return ( <FormControl component="fieldset"> <FormLabel component="legend">Gender</FormLabel> <RadioGroup defaultValue="female" aria-label="gender" name="customized-radios"> <FormControlLabel value="female" control={<StyledRadio />} label="Female" /> <FormControlLabel value="male" control={<StyledRadio />} label="Male" /> <FormControlLabel value="other" control={<StyledRadio />} label="Other" /> <FormControlLabel value="disabled" disabled control={<StyledRadio />} label="(Disabled option)" /> </RadioGroup> </FormControl> ); }
examples/ssr/App.js
kybarg/material-ui
import React from 'react'; import Container from '@material-ui/core/Container'; import Typography from '@material-ui/core/Typography'; import Box from '@material-ui/core/Box'; import ProTip from './ProTip'; import Link from '@material-ui/core/Link'; function Copyright() { return ( <Typography variant="body2" color="textSecondary" align="center"> {'Copyright © '} <Link color="inherit" href="https://material-ui.com/"> Your Website </Link>{' '} {new Date().getFullYear()} {'.'} </Typography> ); } export default function App() { return ( <Container maxWidth="sm"> <Box my={4}> <Typography variant="h4" component="h1" gutterBottom> Server Rendering v4-beta example </Typography> <ProTip /> <Copyright /> </Box> </Container> ); }
packages/material-ui-icons/src/Looks.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <path d="M12 10c-3.86 0-7 3.14-7 7h2c0-2.76 2.24-5 5-5s5 2.24 5 5h2c0-3.86-3.14-7-7-7zm0-4C5.93 6 1 10.93 1 17h2c0-4.96 4.04-9 9-9s9 4.04 9 9h2c0-6.07-4.93-11-11-11z" /> , 'Looks');
packages/material-ui-icons/src/Markunread.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z" /> , 'Markunread');