1 |
- {"ast":null,"code":"import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport capitalize from '../utils/capitalize';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n userSelect: 'none',\n fontSize: theme.typography.pxToRem(24),\n width: '1em',\n height: '1em',\n // Chrome fix for https://bugs.chromium.org/p/chromium/issues/detail?id=820541\n // To remove at some point.\n overflow: 'hidden',\n flexShrink: 0\n },\n\n /* Styles applied to the root element if `color=\"primary\"`. */\n colorPrimary: {\n color: theme.palette.primary.main\n },\n\n /* Styles applied to the root element if `color=\"secondary\"`. */\n colorSecondary: {\n color: theme.palette.secondary.main\n },\n\n /* Styles applied to the root element if `color=\"action\"`. */\n colorAction: {\n color: theme.palette.action.active\n },\n\n /* Styles applied to the root element if `color=\"error\"`. */\n colorError: {\n color: theme.palette.error.main\n },\n\n /* Styles applied to the root element if `color=\"disabled\"`. */\n colorDisabled: {\n color: theme.palette.action.disabled\n },\n\n /* Styles applied to the root element if `fontSize=\"inherit\"`. */\n fontSizeInherit: {\n fontSize: 'inherit'\n },\n\n /* Styles applied to the root element if `fontSize=\"small\"`. */\n fontSizeSmall: {\n fontSize: theme.typography.pxToRem(20)\n },\n\n /* Styles applied to the root element if `fontSize=\"large\"`. */\n fontSizeLarge: {\n fontSize: theme.typography.pxToRem(36)\n }\n };\n};\nvar Icon = /*#__PURE__*/React.forwardRef(function Icon(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'inherit' : _props$color,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'span' : _props$component,\n _props$fontSize = props.fontSize,\n fontSize = _props$fontSize === void 0 ? 'default' : _props$fontSize,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"color\", \"component\", \"fontSize\"]);\n\n return /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx('material-icons', classes.root, className, color !== 'inherit' && classes[\"color\".concat(capitalize(color))], fontSize !== 'default' && classes[\"fontSize\".concat(capitalize(fontSize))]),\n \"aria-hidden\": true,\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? Icon.propTypes = {\n /**\n * The name of the icon font ligature.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['inherit', 'primary', 'secondary', 'action', 'error', 'disabled']),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * The fontSize applied to the icon. Defaults to 24px, but can be configure to inherit font size.\n */\n fontSize: PropTypes.oneOf(['inherit', 'default', 'small', 'large'])\n} : void 0;\nIcon.muiName = 'Icon';\nexport default withStyles(styles, {\n name: 'MuiIcon'\n})(Icon);","map":{"version":3,"sources":["/Users/holunyeung/Documents/GitHub/Photo_React/photo/node_modules/@material-ui/core/esm/Icon/Icon.js"],"names":["_extends","_objectWithoutProperties","React","PropTypes","clsx","withStyles","capitalize","styles","theme","root","userSelect","fontSize","typography","pxToRem","width","height","overflow","flexShrink","colorPrimary","color","palette","primary","main","colorSecondary","secondary","colorAction","action","active","colorError","error","colorDisabled","disabled","fontSizeInherit","fontSizeSmall","fontSizeLarge","Icon","forwardRef","props","ref","classes","className","_props$color","_props$component","component","Component","_props$fontSize","other","createElement","concat","process","env","NODE_ENV","propTypes","children","node","object","isRequired","string","oneOf","elementType","muiName","name"],"mappings":"AAAA,OAAOA,QAAP,MAAqB,oCAArB;AACA,OAAOC,wBAAP,MAAqC,oDAArC;AACA,OAAO,KAAKC,KAAZ,MAAuB,OAAvB;AAC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,CAAC,WAAWS,MAAX,CAAkB1C,UAAU,CAACK,QAAD,CAA5B,CAAD,CAAhJ,CAD2C;AAE1D,mBAAe,IAF2C;AAG1D2B,IAAAA,GAAG,EAAEA;AAHqD,GAAD,EAIxDQ,KAJwD,CAAvC,CAApB;AAKD,CAhBuB,CAAxB;AAiBAG,OAAO,CAACC,GAAR,CAAYC,QAAZ,KAAyB,YAAzB,GAAwChB,IAAI,CAACiB,SAAL,GAAiB;AACvD;;;AAGAC,EAAAA,QAAQ,EAAElD,SAAS,CAACmD,IAJmC;;AAMvD;;;;AAIAf,EAAAA,OAAO,EAAEpC,SAAS,CAACoD,MAAV,CAAiBC,UAV6B;;AAYvD;;;AAGAhB,EAAAA,SAAS,EAAErC,SAAS,CAACsD,MAfkC;;AAiBvD;;;AAGAtC,EAAAA,KAAK,EAAEhB,SAAS,CAACuD,KAAV,CAAgB,CAAC,SAAD,EAAY,SAAZ,EAAuB,WAAvB,EAAoC,QAApC,EAA8C,OAA9C,EAAuD,UAAvD,CAAhB,CApBgD;;AAsBvD;;;;AAIAf,EAAAA,SAAS,EAAExC;AACX;AADoB,GAEnBwD,WA5BsD;;AA8BvD;;;AAGAhD,EAAAA,QAAQ,EAAER,SAAS,CAACuD,KAAV,CAAgB,CAAC,SAAD,EAAY,SAAZ,EAAuB,OAAvB,EAAgC,OAAhC,CAAhB;AAjC6C,CAAzD,GAkCI,KAAK,CAlCT;AAmCAvB,IAAI,CAACyB,OAAL,GAAe,MAAf;AACA,eAAevD,UAAU,CAACE,MAAD,EAAS;AAChCsD,EAAAA,IAAI,EAAE;AAD0B,CAAT,CAAV,CAEZ1B,IAFY,CAAf","sourcesContent":["import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport capitalize from '../utils/capitalize';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n userSelect: 'none',\n fontSize: theme.typography.pxToRem(24),\n width: '1em',\n height: '1em',\n // Chrome fix for https://bugs.chromium.org/p/chromium/issues/detail?id=820541\n // To remove at some point.\n overflow: 'hidden',\n flexShrink: 0\n },\n\n /* Styles applied to the root element if `color=\"primary\"`. */\n colorPrimary: {\n color: theme.palette.primary.main\n },\n\n /* Styles applied to the root element if `color=\"secondary\"`. */\n colorSecondary: {\n color: theme.palette.secondary.main\n },\n\n /* Styles applied to the root element if `color=\"action\"`. */\n colorAction: {\n color: theme.palette.action.active\n },\n\n /* Styles applied to the root element if `color=\"error\"`. */\n colorError: {\n color: theme.palette.error.main\n },\n\n /* Styles applied to the root element if `color=\"disabled\"`. */\n colorDisabled: {\n color: theme.palette.action.disabled\n },\n\n /* Styles applied to the root element if `fontSize=\"inherit\"`. */\n fontSizeInherit: {\n fontSize: 'inherit'\n },\n\n /* Styles applied to the root element if `fontSize=\"small\"`. */\n fontSizeSmall: {\n fontSize: theme.typography.pxToRem(20)\n },\n\n /* Styles applied to the root element if `fontSize=\"large\"`. */\n fontSizeLarge: {\n fontSize: theme.typography.pxToRem(36)\n }\n };\n};\nvar Icon = /*#__PURE__*/React.forwardRef(function Icon(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'inherit' : _props$color,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'span' : _props$component,\n _props$fontSize = props.fontSize,\n fontSize = _props$fontSize === void 0 ? 'default' : _props$fontSize,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"color\", \"component\", \"fontSize\"]);\n\n return /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx('material-icons', classes.root, className, color !== 'inherit' && classes[\"color\".concat(capitalize(color))], fontSize !== 'default' && classes[\"fontSize\".concat(capitalize(fontSize))]),\n \"aria-hidden\": true,\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? Icon.propTypes = {\n /**\n * The name of the icon font ligature.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['inherit', 'primary', 'secondary', 'action', 'error', 'disabled']),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * The fontSize applied to the icon. Defaults to 24px, but can be configure to inherit font size.\n */\n fontSize: PropTypes.oneOf(['inherit', 'default', 'small', 'large'])\n} : void 0;\nIcon.muiName = 'Icon';\nexport default withStyles(styles, {\n name: 'MuiIcon'\n})(Icon);"]},"metadata":{},"sourceType":"module"}
|