mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-25 09:55:15 +00:00
1 line
13 KiB
JSON
1 line
13 KiB
JSON
{"ast":null,"code":"import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport hoistNonReactStatics from 'hoist-non-react-statics';\nimport { chainPropTypes, getDisplayName } from '@material-ui/utils';\nimport makeStyles from '../makeStyles';\nimport getThemeProps from '../getThemeProps';\nimport useTheme from '../useTheme'; // Link a style sheet with a component.\n// It does not modify the component passed to it;\n// instead, it returns a new component, with a `classes` property.\n\nvar withStyles = function withStyles(stylesOrCreator) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return function (Component) {\n var defaultTheme = options.defaultTheme,\n _options$withTheme = options.withTheme,\n withTheme = _options$withTheme === void 0 ? false : _options$withTheme,\n name = options.name,\n stylesOptions = _objectWithoutProperties(options, [\"defaultTheme\", \"withTheme\", \"name\"]);\n\n if (process.env.NODE_ENV !== 'production') {\n if (Component === undefined) {\n throw new Error(['You are calling withStyles(styles)(Component) with an undefined component.', 'You may have forgotten to import it.'].join('\\n'));\n }\n }\n\n var classNamePrefix = name;\n\n if (process.env.NODE_ENV !== 'production') {\n if (!name) {\n // Provide a better DX outside production.\n var displayName = getDisplayName(Component);\n\n if (displayName !== undefined) {\n classNamePrefix = displayName;\n }\n }\n }\n\n var useStyles = makeStyles(stylesOrCreator, _extends({\n defaultTheme: defaultTheme,\n Component: Component,\n name: name || Component.displayName,\n classNamePrefix: classNamePrefix\n }, stylesOptions));\n var WithStyles = /*#__PURE__*/React.forwardRef(function WithStyles(props, ref) {\n var classesProp = props.classes,\n innerRef = props.innerRef,\n other = _objectWithoutProperties(props, [\"classes\", \"innerRef\"]); // The wrapper receives only user supplied props, which could be a subset of\n // the actual props Component might receive due to merging with defaultProps.\n // So copying it here would give us the same result in the wrapper as well.\n\n\n var classes = useStyles(_extends({}, Component.defaultProps, props));\n var theme;\n var more = other;\n\n if (typeof name === 'string' || withTheme) {\n // name and withTheme are invariant in the outer scope\n // eslint-disable-next-line react-hooks/rules-of-hooks\n theme = useTheme() || defaultTheme;\n\n if (name) {\n more = getThemeProps({\n theme: theme,\n name: name,\n props: other\n });\n } // Provide the theme to the wrapped component.\n // So we don't have to use the `withTheme()` Higher-order Component.\n\n\n if (withTheme && !more.theme) {\n more.theme = theme;\n }\n }\n\n return /*#__PURE__*/React.createElement(Component, _extends({\n ref: innerRef || ref,\n classes: classes\n }, more));\n });\n process.env.NODE_ENV !== \"production\" ? WithStyles.propTypes = {\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * Use that prop to pass a ref to the decorated component.\n * @deprecated\n */\n innerRef: chainPropTypes(PropTypes.oneOfType([PropTypes.func, PropTypes.object]), function (props) {\n if (props.innerRef == null) {\n return null;\n }\n\n return null; // return new Error(\n // 'Material-UI: The `innerRef` prop is deprecated and will be removed in v5. ' +\n // 'Refs are now automatically forwarded to the inner component.',\n // );\n })\n } : void 0;\n\n if (process.env.NODE_ENV !== 'production') {\n WithStyles.displayName = \"WithStyles(\".concat(getDisplayName(Component), \")\");\n }\n\n hoistNonReactStatics(WithStyles, Component);\n\n if (process.env.NODE_ENV !== 'production') {\n // Exposed for test purposes.\n WithStyles.Naked = Component;\n WithStyles.options = options;\n WithStyles.useStyles = useStyles;\n }\n\n return WithStyles;\n };\n};\n\nexport default withStyles;","map":{"version":3,"sources":["/app/node_modules/@material-ui/styles/esm/withStyles/withStyles.js"],"names":["_extends","_objectWithoutProperties","React","PropTypes","hoistNonReactStatics","chainPropTypes","getDisplayName","makeStyles","getThemeProps","useTheme","withStyles","stylesOrCreator","options","arguments","length","undefined","Component","defaultTheme","_options$withTheme","withTheme","name","stylesOptions","process","env","NODE_ENV","Error","join","classNamePrefix","displayName","useStyles","WithStyles","forwardRef","props","ref","classesProp","classes","innerRef","other","defaultProps","the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,CAAYC,QAAZ,KAAyB,YAA7B,EAA2C;AACzC;AACAM,MAAAA,UAAU,CAACiB,KAAX,GAAmB/B,SAAnB;AACAc,MAAAA,UAAU,CAAClB,OAAX,GAAqBA,OAArB;AACAkB,MAAAA,UAAU,CAACD,SAAX,GAAuBA,SAAvB;AACD;;AAED,WAAOC,UAAP;AACD,GAzGD;AA0GD,CA5GD;;AA8GA,eAAepB,UAAf","sourcesContent":["import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport hoistNonReactStatics from 'hoist-non-react-statics';\nimport { chainPropTypes, getDisplayName } from '@material-ui/utils';\nimport makeStyles from '../makeStyles';\nimport getThemeProps from '../getThemeProps';\nimport useTheme from '../useTheme'; // Link a style sheet with a component.\n// It does not modify the component passed to it;\n// instead, it returns a new component, with a `classes` property.\n\nvar withStyles = function withStyles(stylesOrCreator) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return function (Component) {\n var defaultTheme = options.defaultTheme,\n _options$withTheme = options.withTheme,\n withTheme = _options$withTheme === void 0 ? false : _options$withTheme,\n name = options.name,\n stylesOptions = _objectWithoutProperties(options, [\"defaultTheme\", \"withTheme\", \"name\"]);\n\n if (process.env.NODE_ENV !== 'production') {\n if (Component === undefined) {\n throw new Error(['You are calling withStyles(styles)(Component) with an undefined component.', 'You may have forgotten to import it.'].join('\\n'));\n }\n }\n\n var classNamePrefix = name;\n\n if (process.env.NODE_ENV !== 'production') {\n if (!name) {\n // Provide a better DX outside production.\n var displayName = getDisplayName(Component);\n\n if (displayName !== undefined) {\n classNamePrefix = displayName;\n }\n }\n }\n\n var useStyles = makeStyles(stylesOrCreator, _extends({\n defaultTheme: defaultTheme,\n Component: Component,\n name: name || Component.displayName,\n classNamePrefix: classNamePrefix\n }, stylesOptions));\n var WithStyles = /*#__PURE__*/React.forwardRef(function WithStyles(props, ref) {\n var classesProp = props.classes,\n innerRef = props.innerRef,\n other = _objectWithoutProperties(props, [\"classes\", \"innerRef\"]); // The wrapper receives only user supplied props, which could be a subset of\n // the actual props Component might receive due to merging with defaultProps.\n // So copying it here would give us the same result in the wrapper as well.\n\n\n var classes = useStyles(_extends({}, Component.defaultProps, props));\n var theme;\n var more = other;\n\n if (typeof name === 'string' || withTheme) {\n // name and withTheme are invariant in the outer scope\n // eslint-disable-next-line react-hooks/rules-of-hooks\n theme = useTheme() || defaultTheme;\n\n if (name) {\n more = getThemeProps({\n theme: theme,\n name: name,\n props: other\n });\n } // Provide the theme to the wrapped component.\n // So we don't have to use the `withTheme()` Higher-order Component.\n\n\n if (withTheme && !more.theme) {\n more.theme = theme;\n }\n }\n\n return /*#__PURE__*/React.createElement(Component, _extends({\n ref: innerRef || ref,\n classes: classes\n }, more));\n });\n process.env.NODE_ENV !== \"production\" ? WithStyles.propTypes = {\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * Use that prop to pass a ref to the decorated component.\n * @deprecated\n */\n innerRef: chainPropTypes(PropTypes.oneOfType([PropTypes.func, PropTypes.object]), function (props) {\n if (props.innerRef == null) {\n return null;\n }\n\n return null; // return new Error(\n // 'Material-UI: The `innerRef` prop is deprecated and will be removed in v5. ' +\n // 'Refs are now automatically forwarded to the inner component.',\n // );\n })\n } : void 0;\n\n if (process.env.NODE_ENV !== 'production') {\n WithStyles.displayName = \"WithStyles(\".concat(getDisplayName(Component), \")\");\n }\n\n hoistNonReactStatics(WithStyles, Component);\n\n if (process.env.NODE_ENV !== 'production') {\n // Exposed for test purposes.\n WithStyles.Naked = Component;\n WithStyles.options = options;\n WithStyles.useStyles = useStyles;\n }\n\n return WithStyles;\n };\n};\n\nexport default withStyles;"]},"metadata":{},"sourceType":"module"} |