eb813bd3930ef86d3093204b65fc4221.json 15 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';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n position: 'absolute',\n left: 0,\n right: 0,\n height: 48,\n background: 'rgba(0, 0, 0, 0.5)',\n display: 'flex',\n alignItems: 'center',\n fontFamily: theme.typography.fontFamily\n },\n\n /* Styles applied to the root element if `titlePosition=\"bottom\"`. */\n titlePositionBottom: {\n bottom: 0\n },\n\n /* Styles applied to the root element if `titlePosition=\"top\"`. */\n titlePositionTop: {\n top: 0\n },\n\n /* Styles applied to the root element if a `subtitle` is provided. */\n rootSubtitle: {\n height: 68\n },\n\n /* Styles applied to the title and subtitle container element. */\n titleWrap: {\n flexGrow: 1,\n marginLeft: 16,\n marginRight: 16,\n color: theme.palette.common.white,\n overflow: 'hidden'\n },\n\n /* Styles applied to the container element if `actionPosition=\"left\"`. */\n titleWrapActionPosLeft: {\n marginLeft: 0\n },\n\n /* Styles applied to the container element if `actionPosition=\"right\"`. */\n titleWrapActionPosRight: {\n marginRight: 0\n },\n\n /* Styles applied to the title container element. */\n title: {\n fontSize: theme.typography.pxToRem(16),\n lineHeight: '24px',\n textOverflow: 'ellipsis',\n overflow: 'hidden',\n whiteSpace: 'nowrap'\n },\n\n /* Styles applied to the subtitle container element. */\n subtitle: {\n fontSize: theme.typography.pxToRem(12),\n lineHeight: 1,\n textOverflow: 'ellipsis',\n overflow: 'hidden',\n whiteSpace: 'nowrap'\n },\n\n /* Styles applied to the actionIcon if supplied. */\n actionIcon: {},\n\n /* Styles applied to the actionIcon if `actionPosition=\"left\"`. */\n actionIconActionPosLeft: {\n order: -1\n }\n };\n};\nvar GridListTileBar = /*#__PURE__*/React.forwardRef(function GridListTileBar(props, ref) {\n var actionIcon = props.actionIcon,\n _props$actionPosition = props.actionPosition,\n actionPosition = _props$actionPosition === void 0 ? 'right' : _props$actionPosition,\n classes = props.classes,\n className = props.className,\n subtitle = props.subtitle,\n title = props.title,\n _props$titlePosition = props.titlePosition,\n titlePosition = _props$titlePosition === void 0 ? 'bottom' : _props$titlePosition,\n other = _objectWithoutProperties(props, [\"actionIcon\", \"actionPosition\", \"classes\", \"className\", \"subtitle\", \"title\", \"titlePosition\"]);\n\n var actionPos = actionIcon && actionPosition;\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, className, titlePosition === 'top' ? classes.titlePositionTop : classes.titlePositionBottom, subtitle && classes.rootSubtitle),\n ref: ref\n }, other), /*#__PURE__*/React.createElement(\"div\", {\n className: clsx(classes.titleWrap, {\n 'left': classes.titleWrapActionPosLeft,\n 'right': classes.titleWrapActionPosRight\n }[actionPos])\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: classes.title\n }, title), subtitle ? /*#__PURE__*/React.createElement(\"div\", {\n className: classes.subtitle\n }, subtitle) : null), actionIcon ? /*#__PURE__*/React.createElement(\"div\", {\n className: clsx(classes.actionIcon, actionPos === 'left' && classes.actionIconActionPosLeft)\n }, actionIcon) : null);\n});\nprocess.env.NODE_ENV !== \"production\" ? GridListTileBar.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 * An IconButton element to be used as secondary action target\n * (primary action target is the tile itself).\n */\n actionIcon: PropTypes.node,\n\n /**\n * Position of secondary action IconButton.\n */\n actionPosition: PropTypes.oneOf(['left', 'right']),\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 * String or element serving as subtitle (support text).\n */\n subtitle: PropTypes.node,\n\n /**\n * Title to be displayed on tile.\n */\n title: PropTypes.node,\n\n /**\n * Position of the title bar.\n */\n titlePosition: PropTypes.oneOf(['bottom', 'top'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiGridListTileBar'\n})(GridListTileBar);","map":{"version":3,"sources":["/Users/holunyeung/Documents/GitHub/Photo_React/photo/node_modules/@material-ui/core/esm/GridListTileBar/GridListTileBar.js"],"names":["_extends","_objectWithoutProperties","React","PropTypes","clsx","withStyles","styles","theme","root","position","left","right","height","background","display","alignItems","fontFamily","typography","titlePositionBottom","bottom","titlePositionTop","top","rootSubtitle","titleWrap","flexGrow","marginLeft","marginRight","color","palette","common","white","overflow","titleWrapActionPosLeft","titleWrapActionPosRight","title","fontSize","pxToRem","lineHeight","textOverflow","whiteSpace","subtitle","actionIcon","actionIconActionPosLeft","order","GridListTileBar","forwardRef","props","ref","_props$actionPosition","actionPosition","classes","className","_props$titlePosition","titlePosition","other","actionPos","createElement","process","env","NODE_ENV","propTypes","node","oneOf","object","string","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,OAAO,IAAIC,MAAM,GAAG,SAASA,MAAT,CAAgBC,KAAhB,EAAuB;AACzC,SAAO;AACL;AACAC,IAAAA,IAAI,EAAE;AACJC,MAAAA,QAAQ,EAAE,UADN;AAEJC,MAAAA,IAAI,EAAE,CAFF;AAGJC,MAAAA,KAAK,EAAE,CAHH;AAIJC,MAAAA,MAAM,EAAE,EAJJ;AAKJC,MAAAA,UAAU,EAAE,oBALR;AAMJC,MAAAA,OAAO,EAAE,MANL;AAOJC,MAAAA,UAAU,EAAE,QAPR;AAQJC,MAAAA,UAAU,EAAET,KAAK,CAACU,UAAN,CAAiBD;AARzB,KAFD;;AA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IA/B8C;;AAiClE;;;AAGA3B,EAAAA,KAAK,EAAE/B,SAAS,CAAC0D,IApCiD;;AAsClE;;;AAGAR,EAAAA,aAAa,EAAElD,SAAS,CAAC2D,KAAV,CAAgB,CAAC,QAAD,EAAW,KAAX,CAAhB;AAzCmD,CAApE,GA0CI,KAAK,CA1CT;AA2CA,eAAezD,UAAU,CAACC,MAAD,EAAS;AAChC2D,EAAAA,IAAI,EAAE;AAD0B,CAAT,CAAV,CAEZrB,eAFY,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';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n position: 'absolute',\n left: 0,\n right: 0,\n height: 48,\n background: 'rgba(0, 0, 0, 0.5)',\n display: 'flex',\n alignItems: 'center',\n fontFamily: theme.typography.fontFamily\n },\n\n /* Styles applied to the root element if `titlePosition=\"bottom\"`. */\n titlePositionBottom: {\n bottom: 0\n },\n\n /* Styles applied to the root element if `titlePosition=\"top\"`. */\n titlePositionTop: {\n top: 0\n },\n\n /* Styles applied to the root element if a `subtitle` is provided. */\n rootSubtitle: {\n height: 68\n },\n\n /* Styles applied to the title and subtitle container element. */\n titleWrap: {\n flexGrow: 1,\n marginLeft: 16,\n marginRight: 16,\n color: theme.palette.common.white,\n overflow: 'hidden'\n },\n\n /* Styles applied to the container element if `actionPosition=\"left\"`. */\n titleWrapActionPosLeft: {\n marginLeft: 0\n },\n\n /* Styles applied to the container element if `actionPosition=\"right\"`. */\n titleWrapActionPosRight: {\n marginRight: 0\n },\n\n /* Styles applied to the title container element. */\n title: {\n fontSize: theme.typography.pxToRem(16),\n lineHeight: '24px',\n textOverflow: 'ellipsis',\n overflow: 'hidden',\n whiteSpace: 'nowrap'\n },\n\n /* Styles applied to the subtitle container element. */\n subtitle: {\n fontSize: theme.typography.pxToRem(12),\n lineHeight: 1,\n textOverflow: 'ellipsis',\n overflow: 'hidden',\n whiteSpace: 'nowrap'\n },\n\n /* Styles applied to the actionIcon if supplied. */\n actionIcon: {},\n\n /* Styles applied to the actionIcon if `actionPosition=\"left\"`. */\n actionIconActionPosLeft: {\n order: -1\n }\n };\n};\nvar GridListTileBar = /*#__PURE__*/React.forwardRef(function GridListTileBar(props, ref) {\n var actionIcon = props.actionIcon,\n _props$actionPosition = props.actionPosition,\n actionPosition = _props$actionPosition === void 0 ? 'right' : _props$actionPosition,\n classes = props.classes,\n className = props.className,\n subtitle = props.subtitle,\n title = props.title,\n _props$titlePosition = props.titlePosition,\n titlePosition = _props$titlePosition === void 0 ? 'bottom' : _props$titlePosition,\n other = _objectWithoutProperties(props, [\"actionIcon\", \"actionPosition\", \"classes\", \"className\", \"subtitle\", \"title\", \"titlePosition\"]);\n\n var actionPos = actionIcon && actionPosition;\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, className, titlePosition === 'top' ? classes.titlePositionTop : classes.titlePositionBottom, subtitle && classes.rootSubtitle),\n ref: ref\n }, other), /*#__PURE__*/React.createElement(\"div\", {\n className: clsx(classes.titleWrap, {\n 'left': classes.titleWrapActionPosLeft,\n 'right': classes.titleWrapActionPosRight\n }[actionPos])\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: classes.title\n }, title), subtitle ? /*#__PURE__*/React.createElement(\"div\", {\n className: classes.subtitle\n }, subtitle) : null), actionIcon ? /*#__PURE__*/React.createElement(\"div\", {\n className: clsx(classes.actionIcon, actionPos === 'left' && classes.actionIconActionPosLeft)\n }, actionIcon) : null);\n});\nprocess.env.NODE_ENV !== \"production\" ? GridListTileBar.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 * An IconButton element to be used as secondary action target\n * (primary action target is the tile itself).\n */\n actionIcon: PropTypes.node,\n\n /**\n * Position of secondary action IconButton.\n */\n actionPosition: PropTypes.oneOf(['left', 'right']),\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 * String or element serving as subtitle (support text).\n */\n subtitle: PropTypes.node,\n\n /**\n * Title to be displayed on tile.\n */\n title: PropTypes.node,\n\n /**\n * Position of the title bar.\n */\n titlePosition: PropTypes.oneOf(['bottom', 'top'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiGridListTileBar'\n})(GridListTileBar);"]},"metadata":{},"sourceType":"module"}