1b68695db7b096cfdc2c34c67a3aabc9.json 14 KB

1
  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 Typography from '../Typography';\nimport ListContext from '../List/ListContext';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n flex: '1 1 auto',\n minWidth: 0,\n marginTop: 4,\n marginBottom: 4\n },\n\n /* Styles applied to the `Typography` components if primary and secondary are set. */\n multiline: {\n marginTop: 6,\n marginBottom: 6\n },\n\n /* Styles applied to the `Typography` components if dense. */\n dense: {},\n\n /* Styles applied to the root element if `inset={true}`. */\n inset: {\n paddingLeft: 56\n },\n\n /* Styles applied to the primary `Typography` component. */\n primary: {},\n\n /* Styles applied to the secondary `Typography` component. */\n secondary: {}\n};\nvar ListItemText = /*#__PURE__*/React.forwardRef(function ListItemText(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n _props$disableTypogra = props.disableTypography,\n disableTypography = _props$disableTypogra === void 0 ? false : _props$disableTypogra,\n _props$inset = props.inset,\n inset = _props$inset === void 0 ? false : _props$inset,\n primaryProp = props.primary,\n primaryTypographyProps = props.primaryTypographyProps,\n secondaryProp = props.secondary,\n secondaryTypographyProps = props.secondaryTypographyProps,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"disableTypography\", \"inset\", \"primary\", \"primaryTypographyProps\", \"secondary\", \"secondaryTypographyProps\"]);\n\n var _React$useContext = React.useContext(ListContext),\n dense = _React$useContext.dense;\n\n var primary = primaryProp != null ? primaryProp : children;\n\n if (primary != null && primary.type !== Typography && !disableTypography) {\n primary = /*#__PURE__*/React.createElement(Typography, _extends({\n variant: dense ? 'body2' : 'body1',\n className: classes.primary,\n component: \"span\",\n display: \"block\"\n }, primaryTypographyProps), primary);\n }\n\n var secondary = secondaryProp;\n\n if (secondary != null && secondary.type !== Typography && !disableTypography) {\n secondary = /*#__PURE__*/React.createElement(Typography, _extends({\n variant: \"body2\",\n className: classes.secondary,\n color: \"textSecondary\",\n display: \"block\"\n }, secondaryTypographyProps), secondary);\n }\n\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, className, dense && classes.dense, inset && classes.inset, primary && secondary && classes.multiline),\n ref: ref\n }, other), primary, secondary);\n});\nprocess.env.NODE_ENV !== \"production\" ? ListItemText.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Alias for the `primary` prop.\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,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * If `true`, the children won't be wrapped by a Typography component.\n * This can be useful to render an alternative Typography variant by wrapping\n * the `children` (or `primary`) text, and optional `secondary` text\n * with the Typography component.\n */\n disableTypography: PropTypes.bool,\n\n /**\n * If `true`, the children will be indented.\n * This should be used if there is no left avatar or left icon.\n */\n inset: PropTypes.bool,\n\n /**\n * The main content element.\n */\n primary: PropTypes.node,\n\n /**\n * These props will be forwarded to the primary typography component\n * (as long as disableTypography is not `true`).\n */\n primaryTypographyProps: PropTypes.object,\n\n /**\n * The secondary content element.\n */\n secondary: PropTypes.node,\n\n /**\n * These props will be forwarded to the secondary typography component\n * (as long as disableTypography is not `true`).\n */\n secondaryTypographyProps: PropTypes.object\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiListItemText'\n})(ListItemText);","map":{"version":3,"sources":["/Users/holunyeung/Documents/GitHub/Photo_React/photo/node_modules/@material-ui/core/esm/ListItemText/ListItemText.js"],"names":["_extends","_objectWithoutProperties","React","PropTypes","clsx","withStyles","Typography","ListContext","styles","root","flex","minWidth","marginTop","marginBottom","multiline","dense","inset","paddingLeft","primary","secondary","ListItemText","forwardRef","props","ref","children","classes","className","_props$disableTypogra","disableTypography","_props$inset","primaryProp","primaryTypographyProps","secondaryProp","secondaryTypographyProps","other","_React$useContext","useContext","type","createElement","variant","component","display","color","process","env","NODE_ENV","propTypes","node","object","string","bool","name"],"mappings":"AAAA,OAAOA,QAAP,MAAqB,oCAArB;AACA,OAAOC,wBAAP,MAAqC,oDAArC;AACA,OAAO,KAAKC,KAAZ,MAAuB,OAAvB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,IAAP,MAAiB,MAAjB;AACA,OAAOC,UAAP,MAAuB,sBAAvB;AACA,OAAOC,UAAP,MAAuB,eAAvB;AACA,OAAOC,WAAP,MAAwB,qBAAxB;AACA,OAAO,IAAIC,MAAM,GAAG;AAClB;AACAC,EAAAA,IAAI,EAAE;AACJC,IAAAA,IAAI,EAAE,UADF;AAEJC,IAAAA,QAAQ,EAAE,CAFN;AAGJC,IAAAA,SAAS,EAAE,CAHP;AAIJC,IAAAA,YAAY,EAAE;AAJV,GAFY;;AASlB;AACAC,EAAAA,SAAS,EAAE;AACTF,IAAAA,SAAS,EAAE,CADF;AAETC,IAAAA,YAAY,EAAE;AAFL,GAVO;;AAelB;AACAE,EAAAA,KAAK,EAAE,EAhBW;;AAkBlB;AACAC,EAAAA,KAAK,EAAE;AACLC,IAAAA,WAAW,EAAE;AADR,GAnBW;;AAuBlB;AACAC,EAAAA,OAAO,EAAE,EAxBS;;AA0BlB;AACAC,EAAAA,SAAS,EAAE;AA3BO,CAAb;AA6BP,IAAIC,YAAY,GAAG,aAAalB,KAAK,CAACmB,UAAN,CAAiB,SAASD,YAAT,CAAsBE,KAAtB,EAA6BC,GAA7B,EAAkC;AACjF,MAAIC,QAAQ,GAAGF,KAAK,CAACE,QAArB;AAAA,MACIC,OAAO,GAAGH,KAAK,CAACG,OADpB;AAAA,MAEIC,SAAS,GAAGJ,KAAK,CAACI,SAFtB;AAAA,MAGIC,qBAAq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AAS,CAAC+C,IA5BkC;;AA8B/D;;;;AAIAlC,EAAAA,KAAK,EAAEb,SAAS,CAAC+C,IAlC8C;;AAoC/D;;;AAGAhC,EAAAA,OAAO,EAAEf,SAAS,CAAC4C,IAvC4C;;AAyC/D;;;;AAIAhB,EAAAA,sBAAsB,EAAE5B,SAAS,CAAC6C,MA7C6B;;AA+C/D;;;AAGA7B,EAAAA,SAAS,EAAEhB,SAAS,CAAC4C,IAlD0C;;AAoD/D;;;;AAIAd,EAAAA,wBAAwB,EAAE9B,SAAS,CAAC6C;AAxD2B,CAAjE,GAyDI,KAAK,CAzDT;AA0DA,eAAe3C,UAAU,CAACG,MAAD,EAAS;AAChC2C,EAAAA,IAAI,EAAE;AAD0B,CAAT,CAAV,CAEZ/B,YAFY,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 Typography from '../Typography';\nimport ListContext from '../List/ListContext';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n flex: '1 1 auto',\n minWidth: 0,\n marginTop: 4,\n marginBottom: 4\n },\n\n /* Styles applied to the `Typography` components if primary and secondary are set. */\n multiline: {\n marginTop: 6,\n marginBottom: 6\n },\n\n /* Styles applied to the `Typography` components if dense. */\n dense: {},\n\n /* Styles applied to the root element if `inset={true}`. */\n inset: {\n paddingLeft: 56\n },\n\n /* Styles applied to the primary `Typography` component. */\n primary: {},\n\n /* Styles applied to the secondary `Typography` component. */\n secondary: {}\n};\nvar ListItemText = /*#__PURE__*/React.forwardRef(function ListItemText(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n _props$disableTypogra = props.disableTypography,\n disableTypography = _props$disableTypogra === void 0 ? false : _props$disableTypogra,\n _props$inset = props.inset,\n inset = _props$inset === void 0 ? false : _props$inset,\n primaryProp = props.primary,\n primaryTypographyProps = props.primaryTypographyProps,\n secondaryProp = props.secondary,\n secondaryTypographyProps = props.secondaryTypographyProps,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"disableTypography\", \"inset\", \"primary\", \"primaryTypographyProps\", \"secondary\", \"secondaryTypographyProps\"]);\n\n var _React$useContext = React.useContext(ListContext),\n dense = _React$useContext.dense;\n\n var primary = primaryProp != null ? primaryProp : children;\n\n if (primary != null && primary.type !== Typography && !disableTypography) {\n primary = /*#__PURE__*/React.createElement(Typography, _extends({\n variant: dense ? 'body2' : 'body1',\n className: classes.primary,\n component: \"span\",\n display: \"block\"\n }, primaryTypographyProps), primary);\n }\n\n var secondary = secondaryProp;\n\n if (secondary != null && secondary.type !== Typography && !disableTypography) {\n secondary = /*#__PURE__*/React.createElement(Typography, _extends({\n variant: \"body2\",\n className: classes.secondary,\n color: \"textSecondary\",\n display: \"block\"\n }, secondaryTypographyProps), secondary);\n }\n\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, className, dense && classes.dense, inset && classes.inset, primary && secondary && classes.multiline),\n ref: ref\n }, other), primary, secondary);\n});\nprocess.env.NODE_ENV !== \"production\" ? ListItemText.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Alias for the `primary` prop.\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,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * If `true`, the children won't be wrapped by a Typography component.\n * This can be useful to render an alternative Typography variant by wrapping\n * the `children` (or `primary`) text, and optional `secondary` text\n * with the Typography component.\n */\n disableTypography: PropTypes.bool,\n\n /**\n * If `true`, the children will be indented.\n * This should be used if there is no left avatar or left icon.\n */\n inset: PropTypes.bool,\n\n /**\n * The main content element.\n */\n primary: PropTypes.node,\n\n /**\n * These props will be forwarded to the primary typography component\n * (as long as disableTypography is not `true`).\n */\n primaryTypographyProps: PropTypes.object,\n\n /**\n * The secondary content element.\n */\n secondary: PropTypes.node,\n\n /**\n * These props will be forwarded to the secondary typography component\n * (as long as disableTypography is not `true`).\n */\n secondaryTypographyProps: PropTypes.object\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiListItemText'\n})(ListItemText);"]},"metadata":{},"sourceType":"module"}