react-jss
Advanced tools
Comparing version 10.0.2 to 10.0.3
{ | ||
"name": "react-jss", | ||
"description": "JSS integration with React", | ||
"version": "10.0.2", | ||
"version": "10.0.3", | ||
"license": "MIT", | ||
@@ -43,7 +43,7 @@ "main": "dist/react-jss.cjs.js", | ||
"@emotion/is-prop-valid": "^0.7.3", | ||
"css-jss": "10.0.2", | ||
"css-jss": "^10.0.3", | ||
"hoist-non-react-statics": "^3.2.0", | ||
"is-in-browser": "^1.1.3", | ||
"jss": "10.0.2", | ||
"jss-preset-default": "10.0.2", | ||
"jss": "^10.0.3", | ||
"jss-preset-default": "^10.0.3", | ||
"prop-types": "^15.6.0", | ||
@@ -59,3 +59,3 @@ "shallow-equal": "^1.2.0", | ||
}, | ||
"gitHead": "4fb859cceef620d0e54d7039fc5db65dd6012ebc" | ||
"gitHead": "a35ce5a662af8682c6336faa2830b60b5ae9a326" | ||
} |
@@ -12,3 +12,3 @@ # react-jss | ||
See our website [react-jss](https://cssinjs.org/react-jss?v=v10.0.2) for more information. | ||
See our website [react-jss](https://cssinjs.org/react-jss?v=v10.0.3) for more information. | ||
@@ -15,0 +15,0 @@ ## Install |
@@ -10,4 +10,3 @@ import {ComponentType, ReactNode, Context} from 'react' | ||
CreateGenerateIdOptions, | ||
Classes, | ||
Style | ||
Classes | ||
} from 'jss' | ||
@@ -42,6 +41,4 @@ import {createTheming, useTheme, withTheme, ThemeProvider, Theming} from 'theming' | ||
type ThemedStyles<Theme> = (theme: Theme) => Styles<string> | ||
interface WithStyles<S extends Styles<string> | ThemedStyles<any>> { | ||
classes: Classes<S extends ThemedStyles<any> ? keyof ReturnType<S> : keyof S> | ||
interface WithStylesProps<S extends Styles | ((theme: unknown) => Styles)> { | ||
classes: Classes<S extends ((theme: unknown) => Styles) ? keyof ReturnType<S> : keyof S> | ||
} | ||
@@ -58,25 +55,29 @@ | ||
export {Styles} | ||
interface CreateUseStylesOptions extends StyleSheetFactoryOptions { | ||
name?: string | ||
} | ||
declare function createUseStyles<C extends string>( | ||
styles: Record<C, Style | string>, | ||
options?: { | ||
index?: number | ||
name?: string | ||
} & StyleSheetFactoryOptions | ||
): (data?: any) => Record<C, string> | ||
declare function createUseStyles<C extends string = string>( | ||
styles: Styles<C>, | ||
options?: CreateUseStylesOptions | ||
): (data?: unknown) => Classes<C> | ||
declare function createUseStyles<T, C extends string>( | ||
styles: (theme: T) => Record<C, Style | string>, | ||
options?: { | ||
index?: number | ||
name?: string | ||
theming?: Theming<T> | ||
} & StyleSheetFactoryOptions | ||
): (data?: any) => Record<C, string> | ||
declare function createUseStyles<C extends string = string>( | ||
styles: ((theme: any) => Styles<C>), | ||
options?: CreateUseStylesOptions | ||
): (data?: unknown) => Classes<C> | ||
declare function withStyles<S extends Styles<string> | ThemedStyles<any>>( | ||
declare function withStyles< | ||
ClassNames extends string | number | symbol, | ||
S extends Styles<ClassNames> | ((theme: any) => Styles<ClassNames>) | ||
>( | ||
styles: S, | ||
options?: WithStylesOptions | ||
): <Props extends WithStyles<S>>( | ||
): < | ||
Props extends { | ||
classes: S extends (theme: any) => Styles<ClassNames> | ||
? Classes<keyof ReturnType<S>> | ||
: Classes<ClassNames> | ||
} | ||
>( | ||
comp: ComponentType<Props> | ||
@@ -90,3 +91,3 @@ ) => ComponentType<Omit<Props, 'classes'> & {classes?: Partial<Props['classes']>}> | ||
JssProvider, | ||
WithStyles, | ||
WithStylesProps, | ||
ThemeProvider, | ||
@@ -97,5 +98,6 @@ withTheme, | ||
JssContext, | ||
createUseStyles | ||
createUseStyles, | ||
Styles | ||
} | ||
export default withStyles |
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
918695
16072
+ Addedcss-jss@10.10.0(transitive)
+ Addedcsstype@3.1.3(transitive)
+ Addedjss@10.10.0(transitive)
+ Addedjss-plugin-camel-case@10.10.0(transitive)
+ Addedjss-plugin-compose@10.10.0(transitive)
+ Addedjss-plugin-default-unit@10.10.0(transitive)
+ Addedjss-plugin-expand@10.10.0(transitive)
+ Addedjss-plugin-extend@10.10.0(transitive)
+ Addedjss-plugin-global@10.10.0(transitive)
+ Addedjss-plugin-nested@10.10.0(transitive)
+ Addedjss-plugin-props-sort@10.10.0(transitive)
+ Addedjss-plugin-rule-value-function@10.10.0(transitive)
+ Addedjss-plugin-rule-value-observable@10.10.0(transitive)
+ Addedjss-plugin-template@10.10.0(transitive)
+ Addedjss-plugin-vendor-prefixer@10.10.0(transitive)
+ Addedjss-preset-default@10.10.0(transitive)
- Removedcss-jss@10.0.2(transitive)
- Removedcsstype@2.6.21(transitive)
- Removedjss@10.0.2(transitive)
- Removedjss-plugin-camel-case@10.0.2(transitive)
- Removedjss-plugin-compose@10.0.2(transitive)
- Removedjss-plugin-default-unit@10.0.2(transitive)
- Removedjss-plugin-expand@10.0.2(transitive)
- Removedjss-plugin-extend@10.0.2(transitive)
- Removedjss-plugin-global@10.0.2(transitive)
- Removedjss-plugin-nested@10.0.2(transitive)
- Removedjss-plugin-props-sort@10.0.2(transitive)
- Removedjss-plugin-rule-value-function@10.0.2(transitive)
- Removedjss-plugin-rule-value-observable@10.0.2(transitive)
- Removedjss-plugin-template@10.0.2(transitive)
- Removedjss-plugin-vendor-prefixer@10.0.2(transitive)
- Removedjss-preset-default@10.0.2(transitive)
Updatedcss-jss@^10.0.3
Updatedjss@^10.0.3
Updatedjss-preset-default@^10.0.3