@material-ui/styles
Advanced tools
Comparing version 4.10.0 to 4.11.1
@@ -79,3 +79,3 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; | ||
const options = _extends(_extends(_extends({}, stylesCreator.options), stylesOptions), {}, { | ||
const options = _extends({}, stylesCreator.options, stylesOptions, { | ||
theme, | ||
@@ -221,3 +221,3 @@ flip: typeof stylesOptions.flip === 'boolean' ? stylesOptions.flip : theme.direction === 'rtl' | ||
const stylesOptions = _extends(_extends({}, React.useContext(StylesContext)), stylesOptions2); | ||
const stylesOptions = _extends({}, React.useContext(StylesContext), stylesOptions2); | ||
@@ -224,0 +224,0 @@ const instance = React.useRef(); |
@@ -30,3 +30,3 @@ import _extends from "@babel/runtime/helpers/esm/extends"; | ||
getStyleElement(props) { | ||
return React.createElement('style', _extends({ | ||
return /*#__PURE__*/React.createElement('style', _extends({ | ||
id: 'jss-server-side', | ||
@@ -33,0 +33,0 @@ key: 'jss-server-side', |
@@ -75,3 +75,3 @@ import _extends from "@babel/runtime/helpers/esm/extends"; | ||
const StyledComponent = React.forwardRef(function StyledComponent(props, ref) { | ||
const StyledComponent = /*#__PURE__*/React.forwardRef(function StyledComponent(props, ref) { | ||
const { | ||
@@ -94,3 +94,3 @@ children, | ||
if (clone) { | ||
return React.cloneElement(children, _extends({ | ||
return /*#__PURE__*/React.cloneElement(children, _extends({ | ||
className: clsx(children.props.className, className) | ||
@@ -141,3 +141,5 @@ }, spread)); | ||
*/ | ||
component: PropTypes.elementType | ||
component: PropTypes | ||
/* @typescript-to-proptypes-ignore */ | ||
.elementType | ||
}, propTypes) : void 0; | ||
@@ -144,0 +146,0 @@ |
@@ -43,3 +43,3 @@ import _extends from "@babel/runtime/helpers/esm/extends"; | ||
const context = _extends(_extends({}, outerOptions), {}, { | ||
const context = _extends({}, outerOptions, { | ||
disableGeneration | ||
@@ -46,0 +46,0 @@ }, localOptions); |
@@ -22,3 +22,3 @@ import _extends from "@babel/runtime/helpers/esm/extends"; | ||
return _extends(_extends({}, outerTheme), localTheme); | ||
return _extends({}, outerTheme, localTheme); | ||
} | ||
@@ -25,0 +25,0 @@ /** |
@@ -46,3 +46,3 @@ import _extends from "@babel/runtime/helpers/esm/extends"; | ||
}, stylesOptions)); | ||
const WithStyles = React.forwardRef(function WithStyles(props, ref) { | ||
const WithStyles = /*#__PURE__*/React.forwardRef(function WithStyles(props, ref) { | ||
const { | ||
@@ -56,3 +56,3 @@ innerRef | ||
const classes = useStyles(_extends(_extends({}, Component.defaultProps), props)); | ||
const classes = useStyles(_extends({}, Component.defaultProps, props)); | ||
let theme; | ||
@@ -59,0 +59,0 @@ let more = other; |
@@ -20,3 +20,3 @@ import _extends from "@babel/runtime/helpers/esm/extends"; | ||
const WithTheme = React.forwardRef(function WithTheme(props, ref) { | ||
const WithTheme = /*#__PURE__*/React.forwardRef(function WithTheme(props, ref) { | ||
const { | ||
@@ -23,0 +23,0 @@ innerRef |
@@ -1,2 +0,2 @@ | ||
/** @license Material-UI v4.10.0 | ||
/** @license Material-UI v4.11.1 | ||
* | ||
@@ -3,0 +3,0 @@ * This source code is licensed under the MIT license found in the |
@@ -79,3 +79,3 @@ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties"; | ||
var options = _extends(_extends(_extends({}, stylesCreator.options), stylesOptions), {}, { | ||
var options = _extends({}, stylesCreator.options, stylesOptions, { | ||
theme: theme, | ||
@@ -225,3 +225,3 @@ flip: typeof stylesOptions.flip === 'boolean' ? stylesOptions.flip : theme.direction === 'rtl' | ||
var stylesOptions = _extends(_extends({}, React.useContext(StylesContext)), stylesOptions2); | ||
var stylesOptions = _extends({}, React.useContext(StylesContext), stylesOptions2); | ||
@@ -228,0 +228,0 @@ var instance = React.useRef(); |
@@ -41,3 +41,3 @@ import _extends from "@babel/runtime/helpers/esm/extends"; | ||
value: function getStyleElement(props) { | ||
return React.createElement('style', _extends({ | ||
return /*#__PURE__*/React.createElement('style', _extends({ | ||
id: 'jss-server-side', | ||
@@ -44,0 +44,0 @@ key: 'jss-server-side', |
@@ -79,3 +79,3 @@ import _extends from "@babel/runtime/helpers/esm/extends"; | ||
var StyledComponent = React.forwardRef(function StyledComponent(props, ref) { | ||
var StyledComponent = /*#__PURE__*/React.forwardRef(function StyledComponent(props, ref) { | ||
var children = props.children, | ||
@@ -96,3 +96,3 @@ classNameProp = props.className, | ||
if (clone) { | ||
return React.cloneElement(children, _extends({ | ||
return /*#__PURE__*/React.cloneElement(children, _extends({ | ||
className: clsx(children.props.className, className) | ||
@@ -143,3 +143,5 @@ }, spread)); | ||
*/ | ||
component: PropTypes.elementType | ||
component: PropTypes | ||
/* @typescript-to-proptypes-ignore */ | ||
.elementType | ||
}, propTypes) : void 0; | ||
@@ -146,0 +148,0 @@ |
@@ -43,3 +43,3 @@ import _extends from "@babel/runtime/helpers/esm/extends"; | ||
var context = _extends(_extends({}, outerOptions), {}, { | ||
var context = _extends({}, outerOptions, { | ||
disableGeneration: disableGeneration | ||
@@ -46,0 +46,0 @@ }, localOptions); |
@@ -22,3 +22,3 @@ import _extends from "@babel/runtime/helpers/esm/extends"; | ||
return _extends(_extends({}, outerTheme), localTheme); | ||
return _extends({}, outerTheme, localTheme); | ||
} | ||
@@ -25,0 +25,0 @@ /** |
@@ -47,3 +47,3 @@ import _extends from "@babel/runtime/helpers/esm/extends"; | ||
}, stylesOptions)); | ||
var WithStyles = React.forwardRef(function WithStyles(props, ref) { | ||
var WithStyles = /*#__PURE__*/React.forwardRef(function WithStyles(props, ref) { | ||
var classesProp = props.classes, | ||
@@ -56,3 +56,3 @@ innerRef = props.innerRef, | ||
var classes = useStyles(_extends(_extends({}, Component.defaultProps), props)); | ||
var classes = useStyles(_extends({}, Component.defaultProps, props)); | ||
var theme; | ||
@@ -59,0 +59,0 @@ var more = other; |
@@ -19,3 +19,3 @@ import _extends from "@babel/runtime/helpers/esm/extends"; | ||
var WithTheme = React.forwardRef(function WithTheme(props, ref) { | ||
var WithTheme = /*#__PURE__*/React.forwardRef(function WithTheme(props, ref) { | ||
var innerRef = props.innerRef, | ||
@@ -22,0 +22,0 @@ other = _objectWithoutProperties(props, ["innerRef"]); |
@@ -1,2 +0,2 @@ | ||
/** @license Material-UI v4.10.0 | ||
/** @license Material-UI v4.11.1 | ||
* | ||
@@ -3,0 +3,0 @@ * This source code is licensed under the MIT license found in the |
@@ -10,15 +10,5 @@ import { | ||
/** | ||
* `makeStyles` where the passed `styles` do not depend on props | ||
*/ | ||
export default function makeStyles<Theme = DefaultTheme, ClassKey extends string = string>( | ||
style: Styles<Theme, {}, ClassKey>, | ||
options?: Omit<WithStylesOptions<Theme>, 'withTheme'> | ||
): (props?: any) => ClassNameMap<ClassKey>; | ||
/** | ||
* `makeStyles` where the passed `styles` do depend on props | ||
*/ | ||
export default function makeStyles< | ||
Theme = DefaultTheme, | ||
Props extends {} = {}, | ||
Props extends object = {}, | ||
ClassKey extends string = string | ||
@@ -28,2 +18,4 @@ >( | ||
options?: Omit<WithStylesOptions<Theme>, 'withTheme'> | ||
): (props: Props) => ClassNameMap<ClassKey>; | ||
): keyof Props extends never // `makeStyles` where the passed `styles` do not depend on props | ||
? (props?: any) => ClassNameMap<ClassKey> // `makeStyles` where the passed `styles` do depend on props | ||
: (props: Props) => ClassNameMap<ClassKey>; |
@@ -99,3 +99,3 @@ "use strict"; | ||
var options = (0, _extends2.default)((0, _extends2.default)((0, _extends2.default)({}, stylesCreator.options), stylesOptions), {}, { | ||
var options = (0, _extends2.default)({}, stylesCreator.options, stylesOptions, { | ||
theme: theme, | ||
@@ -245,3 +245,3 @@ flip: typeof stylesOptions.flip === 'boolean' ? stylesOptions.flip : theme.direction === 'rtl' | ||
var theme = (0, _useTheme.default)() || defaultTheme; | ||
var stylesOptions = (0, _extends2.default)((0, _extends2.default)({}, _react.default.useContext(_StylesProvider.StylesContext)), stylesOptions2); | ||
var stylesOptions = (0, _extends2.default)({}, _react.default.useContext(_StylesProvider.StylesContext), stylesOptions2); | ||
@@ -248,0 +248,0 @@ var instance = _react.default.useRef(); |
{ | ||
"name": "@material-ui/styles", | ||
"version": "4.10.0", | ||
"version": "4.11.1", | ||
"private": false, | ||
@@ -5,0 +5,0 @@ "author": "Material-UI Team", |
@@ -54,3 +54,3 @@ "use strict"; | ||
value: function getStyleElement(props) { | ||
return _react.default.createElement('style', (0, _extends2.default)({ | ||
return /*#__PURE__*/_react.default.createElement('style', (0, _extends2.default)({ | ||
id: 'jss-server-side', | ||
@@ -57,0 +57,0 @@ key: 'jss-server-side', |
@@ -94,3 +94,3 @@ "use strict"; | ||
var StyledComponent = _react.default.forwardRef(function StyledComponent(props, ref) { | ||
var StyledComponent = /*#__PURE__*/_react.default.forwardRef(function StyledComponent(props, ref) { | ||
var children = props.children, | ||
@@ -110,3 +110,3 @@ classNameProp = props.className, | ||
if (clone) { | ||
return _react.default.cloneElement(children, (0, _extends2.default)({ | ||
return /*#__PURE__*/_react.default.cloneElement(children, (0, _extends2.default)({ | ||
className: (0, _clsx.default)(children.props.className, className) | ||
@@ -158,3 +158,5 @@ }, spread)); | ||
*/ | ||
component: _propTypes.default.elementType | ||
component: _propTypes.default | ||
/* @typescript-to-proptypes-ignore */ | ||
.elementType | ||
}, propTypes) : void 0; | ||
@@ -161,0 +163,0 @@ |
@@ -66,3 +66,3 @@ "use strict"; | ||
var context = (0, _extends2.default)((0, _extends2.default)({}, outerOptions), {}, { | ||
var context = (0, _extends2.default)({}, outerOptions, { | ||
disableGeneration: disableGeneration | ||
@@ -69,0 +69,0 @@ }, localOptions); |
@@ -38,3 +38,3 @@ "use strict"; | ||
return (0, _extends2.default)((0, _extends2.default)({}, outerTheme), localTheme); | ||
return (0, _extends2.default)({}, outerTheme, localTheme); | ||
} | ||
@@ -41,0 +41,0 @@ /** |
@@ -12,3 +12,3 @@ import * as React from 'react'; | ||
type PropsFunc<Props extends object, T> = (props: Props) => T; | ||
export type PropsFunc<Props extends object, T> = (props: Props) => T; | ||
@@ -15,0 +15,0 @@ /** |
@@ -66,3 +66,3 @@ "use strict"; | ||
var WithStyles = _react.default.forwardRef(function WithStyles(props, ref) { | ||
var WithStyles = /*#__PURE__*/_react.default.forwardRef(function WithStyles(props, ref) { | ||
var classesProp = props.classes, | ||
@@ -74,3 +74,3 @@ innerRef = props.innerRef, | ||
var classes = useStyles((0, _extends2.default)((0, _extends2.default)({}, Component.defaultProps), props)); | ||
var classes = useStyles((0, _extends2.default)({}, Component.defaultProps, props)); | ||
var theme; | ||
@@ -77,0 +77,0 @@ var more = other; |
@@ -36,3 +36,3 @@ "use strict"; | ||
var WithTheme = _react.default.forwardRef(function WithTheme(props, ref) { | ||
var WithTheme = /*#__PURE__*/_react.default.forwardRef(function WithTheme(props, ref) { | ||
var innerRef = props.innerRef, | ||
@@ -39,0 +39,0 @@ other = (0, _objectWithoutProperties2.default)(props, ["innerRef"]); |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
742128
3970