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';\nimport Paper from '../Paper';\nexport var styles = function styles(theme) {\n var backgroundColorDefault = theme.palette.type === 'light' ? theme.palette.grey[100] : theme.palette.grey[900];\n return {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n flexDirection: 'column',\n width: '100%',\n boxSizing: 'border-box',\n // Prevent padding issue with the Modal and fixed positioned AppBar.\n zIndex: theme.zIndex.appBar,\n flexShrink: 0\n },\n\n /* Styles applied to the root element if `position=\"fixed\"`. */\n positionFixed: {\n position: 'fixed',\n top: 0,\n left: 'auto',\n right: 0,\n '@media print': {\n // Prevent the app bar to be visible on each printed page.\n position: 'absolute'\n }\n },\n\n /* Styles applied to the root element if `position=\"absolute\"`. */\n positionAbsolute: {\n position: 'absolute',\n top: 0,\n left: 'auto',\n right: 0\n },\n\n /* Styles applied to the root element if `position=\"sticky\"`. */\n positionSticky: {\n // ⚠️ sticky is not supported by IE 11.\n position: 'sticky',\n top: 0,\n left: 'auto',\n right: 0\n },\n\n /* Styles applied to the root element if `position=\"static\"`. */\n positionStatic: {\n position: 'static'\n },\n\n /* Styles applied to the root element if `position=\"relative\"`. */\n positionRelative: {\n position: 'relative'\n },\n\n /* Styles applied to the root element if `color=\"default\"`. */\n colorDefault: {\n backgroundColor: backgroundColorDefault,\n color: theme.palette.getContrastText(backgroundColorDefault)\n },\n\n /* Styles applied to the root element if `color=\"primary\"`. */\n colorPrimary: {\n backgroundColor: theme.palette.primary.main,\n color: theme.palette.primary.contrastText\n },\n\n /* Styles applied to the root element if `color=\"secondary\"`. */\n colorSecondary: {\n backgroundColor: theme.palette.secondary.main,\n color: theme.palette.secondary.contrastText\n },\n\n /* Styles applied to the root element if `color=\"inherit\"`. */\n colorInherit: {\n color: 'inherit'\n },\n\n /* Styles applied to the root element if `color=\"transparent\"`. */\n colorTransparent: {\n backgroundColor: 'transparent',\n color: 'inherit'\n }\n };\n};\nvar AppBar = /*#__PURE__*/React.forwardRef(function AppBar(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'primary' : _props$color,\n _props$position = props.position,\n position = _props$position === void 0 ? 'fixed' : _props$position,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"color\", \"position\"]);\n\n return /*#__PURE__*/React.createElement(Paper, _extends({\n square: true,\n component: \"header\",\n elevation: 4,\n className: clsx(classes.root, classes[\"position\".concat(capitalize(position))], classes[\"color\".concat(capitalize(color))], className, position === 'fixed' && 'mui-fixed'),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? AppBar.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 * The content of the component.\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 * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['default', 'inherit', 'primary', 'secondary', 'transparent']),\n\n /**\n * The positioning type. The behavior of the different options is described\n * [in the MDN web docs](https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layout/Positioning).\n * Note: `sticky` is not universally supported and will fall back to `static` when unavailable.\n */\n position: PropTypes.oneOf(['absolute', 'fixed', 'relative', 'static', 'sticky'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiAppBar'\n})(AppBar);","map":{"version":3,"sources":["/Users/holunyeung/Documents/GitHub/Photo_React/photo/node_modules/@material-ui/core/esm/AppBar/AppBar.js"],"names":["_extends","_objectWithoutProperties","React","PropTypes","clsx","withStyles","capitalize","Paper","styles","theme","backgroundColorDefault","palette","type","grey","root","display","flexDirection","width","boxSizing","zIndex","appBar","flexShrink","positionFixed","position","top","left","right","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","backgroundColor","color","getContrastText","colorPrimary","primary","main","contrastText","colorSecondary","secondary","colorInherit","colorTransparent","AppBar","forwardRef","props","ref","classes","className","_props$color","_props$position","other","createElement","square","component","elevation","concat","process","env","NODE_ENV","propTypes","children","node","object","string","oneOf","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,qBAAvB;AACA,OAAOC,KAAP,MAAkB,UAAlB;AACA,OAAO,IAAIC,MAAM,GAAG,SAASA,MAAT,CAAgBC,KAAhB,EAAuB;AACzC,MAAIC,sBAAsB,GAAGD,KAAK,CAACE,OAAN,CAAcC,IAAd,KAAuB,OAAvB,GAAiCH,KAAK,CAACE,OAAN,CAAcE,IAAd,CAAmB,GAAnB,CAAjC,GAA2DJ,KAAK,CAACE,OAAN,CAAcE,IAAd,CAAmB,GAAnB,CAAxF;AACA,SAAO;AACL;AACAC,IAAAA,IAAI,EAAE;AACJC,MAAAA,OAAO,EAAE,MADL;AAEJC,MAAAA,aAAa,EAAE,QAFX;AAGJC,MAAAA,KAAK,EAAE,MAHH;AAIJC,MAAAA,SAAS,EAAE,YAJP;AAKJ;AACAC,MAAAA,MAAM,EAAEV,KAAK,CAACU,MAAN,CAAaC,MANjB;AAOJC,MAAAA,UAAU,EAAE;AAPR,KAFD;;AAYL;AACAC,IAAAA,aAAa,EAAE;AACbC,MAAAA,QAAQ,EAAE,OADG;AAEbC,MAAAA,GAAG,EAAE,CAFQ;AAGbC,M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A;AALiD,GAAD,EAMpDK,KANoD,CAAnC,CAApB;AAOD,CAhByB,CAA1B;AAiBAM,OAAO,CAACC,GAAR,CAAYC,QAAZ,KAAyB,YAAzB,GAAwChB,MAAM,CAACiB,SAAP,GAAmB;AACzD;AACA;AACA;AACA;;AAEA;;;AAGAC,EAAAA,QAAQ,EAAE1D,SAAS,CAAC2D,IATqC;;AAWzD;;;;AAIAf,EAAAA,OAAO,EAAE5C,SAAS,CAAC4D,MAfsC;;AAiBzD;;;AAGAf,EAAAA,SAAS,EAAE7C,SAAS,CAAC6D,MApBoC;;AAsBzD;;;AAGA/B,EAAAA,KAAK,EAAE9B,SAAS,CAAC8D,KAAV,CAAgB,CAAC,SAAD,EAAY,SAAZ,EAAuB,SAAvB,EAAkC,WAAlC,EAA+C,aAA/C,CAAhB,CAzBkD;;AA2BzD;;;;;AAKA1C,EAAAA,QAAQ,EAAEpB,SAAS,CAAC8D,KAAV,CAAgB,CAAC,UAAD,EAAa,OAAb,EAAsB,UAAtB,EAAkC,QAAlC,EAA4C,QAA5C,CAAhB;AAhC+C,CAA3D,GAiCI,KAAK,CAjCT;AAkCA,eAAe5D,UAAU,CAACG,MAAD,EAAS;AAChC0D,EAAAA,IAAI,EAAE;AAD0B,CAAT,CAAV,CAEZvB,MAFY,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';\nimport Paper from '../Paper';\nexport var styles = function styles(theme) {\n var backgroundColorDefault = theme.palette.type === 'light' ? theme.palette.grey[100] : theme.palette.grey[900];\n return {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n flexDirection: 'column',\n width: '100%',\n boxSizing: 'border-box',\n // Prevent padding issue with the Modal and fixed positioned AppBar.\n zIndex: theme.zIndex.appBar,\n flexShrink: 0\n },\n\n /* Styles applied to the root element if `position=\"fixed\"`. */\n positionFixed: {\n position: 'fixed',\n top: 0,\n left: 'auto',\n right: 0,\n '@media print': {\n // Prevent the app bar to be visible on each printed page.\n position: 'absolute'\n }\n },\n\n /* Styles applied to the root element if `position=\"absolute\"`. */\n positionAbsolute: {\n position: 'absolute',\n top: 0,\n left: 'auto',\n right: 0\n },\n\n /* Styles applied to the root element if `position=\"sticky\"`. */\n positionSticky: {\n // ⚠️ sticky is not supported by IE 11.\n position: 'sticky',\n top: 0,\n left: 'auto',\n right: 0\n },\n\n /* Styles applied to the root element if `position=\"static\"`. */\n positionStatic: {\n position: 'static'\n },\n\n /* Styles applied to the root element if `position=\"relative\"`. */\n positionRelative: {\n position: 'relative'\n },\n\n /* Styles applied to the root element if `color=\"default\"`. */\n colorDefault: {\n backgroundColor: backgroundColorDefault,\n color: theme.palette.getContrastText(backgroundColorDefault)\n },\n\n /* Styles applied to the root element if `color=\"primary\"`. */\n colorPrimary: {\n backgroundColor: theme.palette.primary.main,\n color: theme.palette.primary.contrastText\n },\n\n /* Styles applied to the root element if `color=\"secondary\"`. */\n colorSecondary: {\n backgroundColor: theme.palette.secondary.main,\n color: theme.palette.secondary.contrastText\n },\n\n /* Styles applied to the root element if `color=\"inherit\"`. */\n colorInherit: {\n color: 'inherit'\n },\n\n /* Styles applied to the root element if `color=\"transparent\"`. */\n colorTransparent: {\n backgroundColor: 'transparent',\n color: 'inherit'\n }\n };\n};\nvar AppBar = /*#__PURE__*/React.forwardRef(function AppBar(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'primary' : _props$color,\n _props$position = props.position,\n position = _props$position === void 0 ? 'fixed' : _props$position,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"color\", \"position\"]);\n\n return /*#__PURE__*/React.createElement(Paper, _extends({\n square: true,\n component: \"header\",\n elevation: 4,\n className: clsx(classes.root, classes[\"position\".concat(capitalize(position))], classes[\"color\".concat(capitalize(color))], className, position === 'fixed' && 'mui-fixed'),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? AppBar.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 * The content of the component.\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 * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['default', 'inherit', 'primary', 'secondary', 'transparent']),\n\n /**\n * The positioning type. The behavior of the different options is described\n * [in the MDN web docs](https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layout/Positioning).\n * Note: `sticky` is not universally supported and will fall back to `static` when unavailable.\n */\n position: PropTypes.oneOf(['absolute', 'fixed', 'relative', 'static', 'sticky'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiAppBar'\n})(AppBar);"]},"metadata":{},"sourceType":"module"}
|