styled-components 5.3.4 → 5.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/styled-components.browser.cjs.js +1 -1
- package/dist/styled-components.browser.cjs.js.map +1 -1
- package/dist/styled-components.browser.esm.js +1 -1
- package/dist/styled-components.browser.esm.js.map +1 -1
- package/dist/styled-components.cjs.js +1 -1
- package/dist/styled-components.cjs.js.map +1 -1
- package/dist/styled-components.esm.js +1 -1
- package/dist/styled-components.esm.js.map +1 -1
- package/dist/styled-components.js +1 -1
- package/dist/styled-components.js.map +1 -1
- package/dist/styled-components.min.js +1 -1
- package/dist/styled-components.min.js.map +1 -1
- package/native/dist/base.d.ts +1 -0
- package/native/dist/constructors/constructWithOptions.d.ts +11 -15
- package/native/dist/constructors/css.d.ts +3 -3
- package/native/dist/constructors/styled.d.ts +179 -179
- package/native/dist/hoc/withTheme.d.ts +1 -1
- package/native/dist/index.d.ts +1 -0
- package/native/dist/models/ComponentStyle.d.ts +1 -0
- package/native/dist/models/StyledComponent.d.ts +1 -1
- package/native/dist/models/StyledNativeComponent.d.ts +2 -2
- package/native/dist/models/ThemeProvider.d.ts +22 -0
- package/native/dist/native/index.d.ts +30 -53
- package/native/dist/primitives/index.d.ts +1 -0
- package/native/dist/sheet/Tag.d.ts +3 -3
- package/native/dist/sheet/dom.d.ts +1 -1
- package/native/dist/styled-components.native.cjs.js +2 -2
- package/native/dist/styled-components.native.cjs.js.map +1 -1
- package/native/dist/styled-components.native.esm.js +2 -2
- package/native/dist/styled-components.native.esm.js.map +1 -1
- package/native/dist/test/utils.d.ts +179 -179
- package/native/dist/types.d.ts +71 -61
- package/native/dist/utils/checkDynamicCreation.d.ts +1 -1
- package/native/dist/utils/flatten.d.ts +1 -1
- package/native/dist/utils/generateDisplayName.d.ts +1 -1
- package/native/dist/utils/getComponentName.d.ts +1 -1
- package/native/dist/utils/isStyledComponent.d.ts +1 -1
- package/native/dist/utils/isTag.d.ts +1 -1
- package/native/dist/utils/stylis.d.ts +2 -1
- package/package.json +3 -2
- package/postinstall.js +82 -0
- package/primitives/dist/styled-components-primitives.cjs.js +2 -2
- package/primitives/dist/styled-components-primitives.cjs.js.map +1 -1
- package/primitives/dist/styled-components-primitives.esm.js +2 -2
- package/primitives/dist/styled-components-primitives.esm.js.map +1 -1
- package/primitives/dist/base.d.ts +0 -17
- package/primitives/dist/base.d.ts.map +0 -1
- package/primitives/dist/constants.d.ts +0 -8
- package/primitives/dist/constants.d.ts.map +0 -1
- package/primitives/dist/constructors/constructWithOptions.d.ts +0 -19
- package/primitives/dist/constructors/constructWithOptions.d.ts.map +0 -1
- package/primitives/dist/constructors/createGlobalStyle.d.ts +0 -3
- package/primitives/dist/constructors/createGlobalStyle.d.ts.map +0 -1
- package/primitives/dist/constructors/css.d.ts +0 -4
- package/primitives/dist/constructors/css.d.ts.map +0 -1
- package/primitives/dist/constructors/keyframes.d.ts +0 -3
- package/primitives/dist/constructors/keyframes.d.ts.map +0 -1
- package/primitives/dist/constructors/styled.d.ts +0 -185
- package/primitives/dist/constructors/styled.d.ts.map +0 -1
- package/primitives/dist/dist/base.d.ts +0 -18
- package/primitives/dist/dist/base.d.ts.map +0 -1
- package/primitives/dist/dist/constants.d.ts +0 -9
- package/primitives/dist/dist/constants.d.ts.map +0 -1
- package/primitives/dist/dist/constructors/constructWithOptions.d.ts +0 -20
- package/primitives/dist/dist/constructors/constructWithOptions.d.ts.map +0 -1
- package/primitives/dist/dist/constructors/createGlobalStyle.d.ts +0 -4
- package/primitives/dist/dist/constructors/createGlobalStyle.d.ts.map +0 -1
- package/primitives/dist/dist/constructors/css.d.ts +0 -5
- package/primitives/dist/dist/constructors/css.d.ts.map +0 -1
- package/primitives/dist/dist/constructors/keyframes.d.ts +0 -4
- package/primitives/dist/dist/constructors/keyframes.d.ts.map +0 -1
- package/primitives/dist/dist/constructors/styled.d.ts +0 -186
- package/primitives/dist/dist/constructors/styled.d.ts.map +0 -1
- package/primitives/dist/dist/hoc/withTheme.d.ts +0 -4
- package/primitives/dist/dist/hoc/withTheme.d.ts.map +0 -1
- package/primitives/dist/dist/hoc/withTheme.spec.d.ts +0 -2
- package/primitives/dist/dist/hoc/withTheme.spec.d.ts.map +0 -1
- package/primitives/dist/dist/hooks/useTheme.d.ts +0 -4
- package/primitives/dist/dist/hooks/useTheme.d.ts.map +0 -1
- package/primitives/dist/dist/index-standalone.d.ts +0 -3
- package/primitives/dist/dist/index-standalone.d.ts.map +0 -1
- package/primitives/dist/dist/index.d.ts +0 -4
- package/primitives/dist/dist/index.d.ts.map +0 -1
- package/primitives/dist/dist/macro/index.d.ts +0 -3
- package/primitives/dist/dist/macro/index.d.ts.map +0 -1
- package/primitives/dist/dist/macro/test/babel.config.d.ts +0 -1
- package/primitives/dist/dist/macro/test/babel.config.d.ts.map +0 -1
- package/primitives/dist/dist/models/ComponentStyle.d.ts +0 -16
- package/primitives/dist/dist/models/ComponentStyle.d.ts.map +0 -1
- package/primitives/dist/dist/models/GlobalStyle.d.ts +0 -12
- package/primitives/dist/dist/models/GlobalStyle.d.ts.map +0 -1
- package/primitives/dist/dist/models/InlineStyle.d.ts +0 -7
- package/primitives/dist/dist/models/InlineStyle.d.ts.map +0 -1
- package/primitives/dist/dist/models/Keyframes.d.ts +0 -12
- package/primitives/dist/dist/models/Keyframes.d.ts.map +0 -1
- package/primitives/dist/dist/models/ServerStyleSheet.d.ts +0 -16
- package/primitives/dist/dist/models/ServerStyleSheet.d.ts.map +0 -1
- package/primitives/dist/dist/models/StyleSheetManager.d.ts +0 -22
- package/primitives/dist/dist/models/StyleSheetManager.d.ts.map +0 -1
- package/primitives/dist/dist/models/StyledComponent.d.ts +0 -4
- package/primitives/dist/dist/models/StyledComponent.d.ts.map +0 -1
- package/primitives/dist/dist/models/StyledNativeComponent.d.ts +0 -4
- package/primitives/dist/dist/models/StyledNativeComponent.d.ts.map +0 -1
- package/primitives/dist/dist/models/ThemeProvider.d.ts +0 -18
- package/primitives/dist/dist/models/ThemeProvider.d.ts.map +0 -1
- package/primitives/dist/dist/native/index.d.ts +0 -65
- package/primitives/dist/dist/native/index.d.ts.map +0 -1
- package/primitives/dist/dist/primitives/index.d.ts +0 -23
- package/primitives/dist/dist/primitives/index.d.ts.map +0 -1
- package/primitives/dist/dist/secretInternals.d.ts +0 -6
- package/primitives/dist/dist/secretInternals.d.ts.map +0 -1
- package/primitives/dist/dist/sheet/GroupIDAllocator.d.ts +0 -5
- package/primitives/dist/dist/sheet/GroupIDAllocator.d.ts.map +0 -1
- package/primitives/dist/dist/sheet/GroupedTag.d.ts +0 -12
- package/primitives/dist/dist/sheet/GroupedTag.d.ts.map +0 -1
- package/primitives/dist/dist/sheet/Rehydration.d.ts +0 -4
- package/primitives/dist/dist/sheet/Rehydration.d.ts.map +0 -1
- package/primitives/dist/dist/sheet/Sheet.d.ts +0 -41
- package/primitives/dist/dist/sheet/Sheet.d.ts.map +0 -1
- package/primitives/dist/dist/sheet/Tag.d.ts +0 -55
- package/primitives/dist/dist/sheet/Tag.d.ts.map +0 -1
- package/primitives/dist/dist/sheet/dom.d.ts +0 -5
- package/primitives/dist/dist/sheet/dom.d.ts.map +0 -1
- package/primitives/dist/dist/sheet/index.d.ts +0 -2
- package/primitives/dist/dist/sheet/index.d.ts.map +0 -1
- package/primitives/dist/dist/sheet/types.d.ts +0 -35
- package/primitives/dist/dist/sheet/types.d.ts.map +0 -1
- package/primitives/dist/dist/test/globals.d.ts +0 -3
- package/primitives/dist/dist/test/globals.d.ts.map +0 -1
- package/primitives/dist/dist/test/utils.d.ts +0 -192
- package/primitives/dist/dist/test/utils.d.ts.map +0 -1
- package/primitives/dist/dist/types.d.ts +0 -121
- package/primitives/dist/dist/types.d.ts.map +0 -1
- package/primitives/dist/dist/utils/addUnitIfNeeded.d.ts +0 -2
- package/primitives/dist/dist/utils/addUnitIfNeeded.d.ts.map +0 -1
- package/primitives/dist/dist/utils/checkDynamicCreation.d.ts +0 -2
- package/primitives/dist/dist/utils/checkDynamicCreation.d.ts.map +0 -1
- package/primitives/dist/dist/utils/createWarnTooManyClasses.d.ts +0 -4
- package/primitives/dist/dist/utils/createWarnTooManyClasses.d.ts.map +0 -1
- package/primitives/dist/dist/utils/determineTheme.d.ts +0 -3
- package/primitives/dist/dist/utils/determineTheme.d.ts.map +0 -1
- package/primitives/dist/dist/utils/domElements.d.ts +0 -3
- package/primitives/dist/dist/utils/domElements.d.ts.map +0 -1
- package/primitives/dist/dist/utils/empties.d.ts +0 -4
- package/primitives/dist/dist/utils/empties.d.ts.map +0 -1
- package/primitives/dist/dist/utils/error.d.ts +0 -6
- package/primitives/dist/dist/utils/error.d.ts.map +0 -1
- package/primitives/dist/dist/utils/errors.d.ts +0 -21
- package/primitives/dist/dist/utils/errors.d.ts.map +0 -1
- package/primitives/dist/dist/utils/escape.d.ts +0 -6
- package/primitives/dist/dist/utils/escape.d.ts.map +0 -1
- package/primitives/dist/dist/utils/flatten.d.ts +0 -5
- package/primitives/dist/dist/utils/flatten.d.ts.map +0 -1
- package/primitives/dist/dist/utils/generateAlphabeticName.d.ts +0 -2
- package/primitives/dist/dist/utils/generateAlphabeticName.d.ts.map +0 -1
- package/primitives/dist/dist/utils/generateComponentId.d.ts +0 -2
- package/primitives/dist/dist/utils/generateComponentId.d.ts.map +0 -1
- package/primitives/dist/dist/utils/generateDisplayName.d.ts +0 -3
- package/primitives/dist/dist/utils/generateDisplayName.d.ts.map +0 -1
- package/primitives/dist/dist/utils/getComponentName.d.ts +0 -3
- package/primitives/dist/dist/utils/getComponentName.d.ts.map +0 -1
- package/primitives/dist/dist/utils/hash.d.ts +0 -4
- package/primitives/dist/dist/utils/hash.d.ts.map +0 -1
- package/primitives/dist/dist/utils/hoist.d.ts +0 -52
- package/primitives/dist/dist/utils/hoist.d.ts.map +0 -1
- package/primitives/dist/dist/utils/hyphenateStyleName.d.ts +0 -15
- package/primitives/dist/dist/utils/hyphenateStyleName.d.ts.map +0 -1
- package/primitives/dist/dist/utils/interleave.d.ts +0 -3
- package/primitives/dist/dist/utils/interleave.d.ts.map +0 -1
- package/primitives/dist/dist/utils/isFunction.d.ts +0 -2
- package/primitives/dist/dist/utils/isFunction.d.ts.map +0 -1
- package/primitives/dist/dist/utils/isPlainObject.d.ts +0 -2
- package/primitives/dist/dist/utils/isPlainObject.d.ts.map +0 -1
- package/primitives/dist/dist/utils/isStatelessFunction.d.ts +0 -2
- package/primitives/dist/dist/utils/isStatelessFunction.d.ts.map +0 -1
- package/primitives/dist/dist/utils/isStaticRules.d.ts +0 -3
- package/primitives/dist/dist/utils/isStaticRules.d.ts.map +0 -1
- package/primitives/dist/dist/utils/isStyledComponent.d.ts +0 -3
- package/primitives/dist/dist/utils/isStyledComponent.d.ts.map +0 -1
- package/primitives/dist/dist/utils/isTag.d.ts +0 -3
- package/primitives/dist/dist/utils/isTag.d.ts.map +0 -1
- package/primitives/dist/dist/utils/joinStrings.d.ts +0 -5
- package/primitives/dist/dist/utils/joinStrings.d.ts.map +0 -1
- package/primitives/dist/dist/utils/mixinDeep.d.ts +0 -8
- package/primitives/dist/dist/utils/mixinDeep.d.ts.map +0 -1
- package/primitives/dist/dist/utils/nonce.d.ts +0 -2
- package/primitives/dist/dist/utils/nonce.d.ts.map +0 -1
- package/primitives/dist/dist/utils/stylis.d.ts +0 -10
- package/primitives/dist/dist/utils/stylis.d.ts.map +0 -1
- package/primitives/dist/hoc/withTheme.d.ts +0 -3
- package/primitives/dist/hoc/withTheme.d.ts.map +0 -1
- package/primitives/dist/hoc/withTheme.spec.d.ts +0 -1
- package/primitives/dist/hoc/withTheme.spec.d.ts.map +0 -1
- package/primitives/dist/hooks/useTheme.d.ts +0 -3
- package/primitives/dist/hooks/useTheme.d.ts.map +0 -1
- package/primitives/dist/index-standalone.d.ts +0 -2
- package/primitives/dist/index-standalone.d.ts.map +0 -1
- package/primitives/dist/index.d.ts +0 -3
- package/primitives/dist/index.d.ts.map +0 -1
- package/primitives/dist/macro/index.d.ts +0 -2
- package/primitives/dist/macro/index.d.ts.map +0 -1
- package/primitives/dist/macro/test/babel.config.d.ts +0 -1
- package/primitives/dist/macro/test/babel.config.d.ts.map +0 -1
- package/primitives/dist/models/ComponentStyle.d.ts +0 -15
- package/primitives/dist/models/ComponentStyle.d.ts.map +0 -1
- package/primitives/dist/models/GlobalStyle.d.ts +0 -11
- package/primitives/dist/models/GlobalStyle.d.ts.map +0 -1
- package/primitives/dist/models/InlineStyle.d.ts +0 -6
- package/primitives/dist/models/InlineStyle.d.ts.map +0 -1
- package/primitives/dist/models/Keyframes.d.ts +0 -11
- package/primitives/dist/models/Keyframes.d.ts.map +0 -1
- package/primitives/dist/models/ServerStyleSheet.d.ts +0 -15
- package/primitives/dist/models/ServerStyleSheet.d.ts.map +0 -1
- package/primitives/dist/models/StyleSheetManager.d.ts +0 -21
- package/primitives/dist/models/StyleSheetManager.d.ts.map +0 -1
- package/primitives/dist/models/StyledComponent.d.ts +0 -3
- package/primitives/dist/models/StyledComponent.d.ts.map +0 -1
- package/primitives/dist/models/StyledNativeComponent.d.ts +0 -3
- package/primitives/dist/models/StyledNativeComponent.d.ts.map +0 -1
- package/primitives/dist/models/ThemeProvider.d.ts +0 -17
- package/primitives/dist/models/ThemeProvider.d.ts.map +0 -1
- package/primitives/dist/native/index.d.ts +0 -64
- package/primitives/dist/native/index.d.ts.map +0 -1
- package/primitives/dist/primitives/index.d.ts +0 -22
- package/primitives/dist/primitives/index.d.ts.map +0 -1
- package/primitives/dist/secretInternals.d.ts +0 -5
- package/primitives/dist/secretInternals.d.ts.map +0 -1
- package/primitives/dist/sheet/GroupIDAllocator.d.ts +0 -4
- package/primitives/dist/sheet/GroupIDAllocator.d.ts.map +0 -1
- package/primitives/dist/sheet/GroupedTag.d.ts +0 -11
- package/primitives/dist/sheet/GroupedTag.d.ts.map +0 -1
- package/primitives/dist/sheet/Rehydration.d.ts +0 -3
- package/primitives/dist/sheet/Rehydration.d.ts.map +0 -1
- package/primitives/dist/sheet/Sheet.d.ts +0 -40
- package/primitives/dist/sheet/Sheet.d.ts.map +0 -1
- package/primitives/dist/sheet/Tag.d.ts +0 -54
- package/primitives/dist/sheet/Tag.d.ts.map +0 -1
- package/primitives/dist/sheet/dom.d.ts +0 -4
- package/primitives/dist/sheet/dom.d.ts.map +0 -1
- package/primitives/dist/sheet/index.d.ts +0 -1
- package/primitives/dist/sheet/index.d.ts.map +0 -1
- package/primitives/dist/sheet/types.d.ts +0 -34
- package/primitives/dist/sheet/types.d.ts.map +0 -1
- package/primitives/dist/test/globals.d.ts +0 -2
- package/primitives/dist/test/globals.d.ts.map +0 -1
- package/primitives/dist/test/utils.d.ts +0 -191
- package/primitives/dist/test/utils.d.ts.map +0 -1
- package/primitives/dist/types.d.ts +0 -120
- package/primitives/dist/types.d.ts.map +0 -1
- package/primitives/dist/utils/addUnitIfNeeded.d.ts +0 -1
- package/primitives/dist/utils/addUnitIfNeeded.d.ts.map +0 -1
- package/primitives/dist/utils/checkDynamicCreation.d.ts +0 -1
- package/primitives/dist/utils/checkDynamicCreation.d.ts.map +0 -1
- package/primitives/dist/utils/createWarnTooManyClasses.d.ts +0 -3
- package/primitives/dist/utils/createWarnTooManyClasses.d.ts.map +0 -1
- package/primitives/dist/utils/determineTheme.d.ts +0 -2
- package/primitives/dist/utils/determineTheme.d.ts.map +0 -1
- package/primitives/dist/utils/domElements.d.ts +0 -2
- package/primitives/dist/utils/domElements.d.ts.map +0 -1
- package/primitives/dist/utils/empties.d.ts +0 -3
- package/primitives/dist/utils/empties.d.ts.map +0 -1
- package/primitives/dist/utils/error.d.ts +0 -5
- package/primitives/dist/utils/error.d.ts.map +0 -1
- package/primitives/dist/utils/errors.d.ts +0 -20
- package/primitives/dist/utils/errors.d.ts.map +0 -1
- package/primitives/dist/utils/escape.d.ts +0 -5
- package/primitives/dist/utils/escape.d.ts.map +0 -1
- package/primitives/dist/utils/flatten.d.ts +0 -4
- package/primitives/dist/utils/flatten.d.ts.map +0 -1
- package/primitives/dist/utils/generateAlphabeticName.d.ts +0 -1
- package/primitives/dist/utils/generateAlphabeticName.d.ts.map +0 -1
- package/primitives/dist/utils/generateComponentId.d.ts +0 -1
- package/primitives/dist/utils/generateComponentId.d.ts.map +0 -1
- package/primitives/dist/utils/generateDisplayName.d.ts +0 -2
- package/primitives/dist/utils/generateDisplayName.d.ts.map +0 -1
- package/primitives/dist/utils/getComponentName.d.ts +0 -2
- package/primitives/dist/utils/getComponentName.d.ts.map +0 -1
- package/primitives/dist/utils/hash.d.ts +0 -3
- package/primitives/dist/utils/hash.d.ts.map +0 -1
- package/primitives/dist/utils/hoist.d.ts +0 -51
- package/primitives/dist/utils/hoist.d.ts.map +0 -1
- package/primitives/dist/utils/hyphenateStyleName.d.ts +0 -14
- package/primitives/dist/utils/hyphenateStyleName.d.ts.map +0 -1
- package/primitives/dist/utils/interleave.d.ts +0 -2
- package/primitives/dist/utils/interleave.d.ts.map +0 -1
- package/primitives/dist/utils/isFunction.d.ts +0 -1
- package/primitives/dist/utils/isFunction.d.ts.map +0 -1
- package/primitives/dist/utils/isPlainObject.d.ts +0 -1
- package/primitives/dist/utils/isPlainObject.d.ts.map +0 -1
- package/primitives/dist/utils/isStatelessFunction.d.ts +0 -1
- package/primitives/dist/utils/isStatelessFunction.d.ts.map +0 -1
- package/primitives/dist/utils/isStaticRules.d.ts +0 -2
- package/primitives/dist/utils/isStaticRules.d.ts.map +0 -1
- package/primitives/dist/utils/isStyledComponent.d.ts +0 -2
- package/primitives/dist/utils/isStyledComponent.d.ts.map +0 -1
- package/primitives/dist/utils/isTag.d.ts +0 -2
- package/primitives/dist/utils/isTag.d.ts.map +0 -1
- package/primitives/dist/utils/joinStrings.d.ts +0 -4
- package/primitives/dist/utils/joinStrings.d.ts.map +0 -1
- package/primitives/dist/utils/mixinDeep.d.ts +0 -7
- package/primitives/dist/utils/mixinDeep.d.ts.map +0 -1
- package/primitives/dist/utils/nonce.d.ts +0 -1
- package/primitives/dist/utils/nonce.d.ts.map +0 -1
- package/primitives/dist/utils/stylis.d.ts +0 -9
- package/primitives/dist/utils/stylis.d.ts.map +0 -1
package/native/dist/types.d.ts
CHANGED
|
@@ -6,46 +6,43 @@ interface ExoticComponentWithDisplayName<P = unknown> extends React.ExoticCompon
|
|
|
6
6
|
defaultProps?: Partial<P>;
|
|
7
7
|
displayName?: string;
|
|
8
8
|
}
|
|
9
|
+
export declare type OmitNever<T> = {
|
|
10
|
+
[K in keyof T as T[K] extends never ? never : K]: T[K];
|
|
11
|
+
};
|
|
12
|
+
export declare type Runtime = 'web' | 'native';
|
|
13
|
+
export { DefaultTheme };
|
|
9
14
|
export declare type AnyComponent<P = any> = ExoticComponentWithDisplayName<P> | React.ComponentType<P>;
|
|
10
|
-
export interface StyledOptions<Props> {
|
|
15
|
+
export interface StyledOptions<R extends Runtime, Props> {
|
|
11
16
|
attrs?: Attrs<Props>[];
|
|
12
|
-
componentId?: string;
|
|
17
|
+
componentId?: R extends 'web' ? string : never;
|
|
13
18
|
displayName?: string;
|
|
14
|
-
parentComponentId?: string;
|
|
15
|
-
shouldForwardProp?: ShouldForwardProp
|
|
19
|
+
parentComponentId?: R extends 'web' ? string : never;
|
|
20
|
+
shouldForwardProp?: ShouldForwardProp<R>;
|
|
16
21
|
}
|
|
17
|
-
export
|
|
18
|
-
|
|
19
|
-
displayName?: string;
|
|
20
|
-
shouldForwardProp?: ShouldForwardProp;
|
|
21
|
-
}
|
|
22
|
-
export declare type KnownWebTarget = keyof JSX.IntrinsicElements | AnyComponent;
|
|
23
|
-
export declare type WebTarget = string | KnownWebTarget;
|
|
22
|
+
export declare type KnownTarget = keyof JSX.IntrinsicElements | AnyComponent;
|
|
23
|
+
export declare type WebTarget = string | KnownTarget;
|
|
24
24
|
export declare type NativeTarget = AnyComponent;
|
|
25
25
|
export interface BaseExtensibleObject {
|
|
26
26
|
[key: string]: any;
|
|
27
27
|
}
|
|
28
28
|
export interface ExtensibleObject extends BaseExtensibleObject {
|
|
29
|
-
$as?:
|
|
30
|
-
$forwardedAs?:
|
|
31
|
-
as?:
|
|
32
|
-
forwardedAs?:
|
|
29
|
+
$as?: KnownTarget;
|
|
30
|
+
$forwardedAs?: KnownTarget;
|
|
31
|
+
as?: KnownTarget;
|
|
32
|
+
forwardedAs?: KnownTarget;
|
|
33
33
|
theme?: DefaultTheme;
|
|
34
34
|
}
|
|
35
35
|
export interface ExecutionContext extends ExtensibleObject {
|
|
36
36
|
theme: DefaultTheme;
|
|
37
37
|
}
|
|
38
|
-
export interface StyleFunction<Props> {
|
|
39
|
-
(executionContext: ExecutionContext & Props):
|
|
38
|
+
export interface StyleFunction<Props = BaseExtensibleObject> {
|
|
39
|
+
(executionContext: ExecutionContext & Props): Interpolation<Props>;
|
|
40
40
|
}
|
|
41
|
-
export declare type Interpolation<Props> = StyleFunction<Props> | StyledObject | string | number | Keyframes | IStyledComponent<any, any> | Interpolation<Props>[];
|
|
42
|
-
export declare type Attrs<Props> = (ExtensibleObject & Props) | ((props: ExecutionContext & Props) =>
|
|
41
|
+
export declare type Interpolation<Props> = StyleFunction<Props> | StyledObject<Props> | TemplateStringsArray | string | number | false | undefined | null | Keyframes | IStyledComponent<'web', any, any> | Interpolation<Props>[];
|
|
42
|
+
export declare type Attrs<Props> = (ExtensibleObject & Props) | ((props: ExecutionContext & Props) => Partial<Props>);
|
|
43
43
|
export declare type RuleSet<Props> = Interpolation<Props>[];
|
|
44
|
-
export declare type Styles<Props> = TemplateStringsArray | StyledObject | StyleFunction<Props>;
|
|
44
|
+
export declare type Styles<Props> = TemplateStringsArray | StyledObject<Props> | StyleFunction<Props>;
|
|
45
45
|
export declare type NameGenerator = (hash: number) => string;
|
|
46
|
-
export interface CSSConstructor<Props> {
|
|
47
|
-
(strings: string[], ...interpolations: Interpolation<Props>[]): RuleSet<Props>;
|
|
48
|
-
}
|
|
49
46
|
export interface StyleSheet {
|
|
50
47
|
create: Function;
|
|
51
48
|
}
|
|
@@ -57,54 +54,45 @@ export interface Keyframes {
|
|
|
57
54
|
export interface Flattener<Props> {
|
|
58
55
|
(chunks: Interpolation<Props>[], executionContext: Object | null | undefined, styleSheet: Object | null | undefined): Interpolation<Props>[];
|
|
59
56
|
}
|
|
60
|
-
export declare type FlattenerResult<Props> = RuleSet<Props> | number | string | string[] | IStyledComponent<any, any> | Keyframes;
|
|
57
|
+
export declare type FlattenerResult<Props> = RuleSet<Props> | number | string | string[] | IStyledComponent<any, any, any> | Keyframes;
|
|
61
58
|
export interface Stringifier {
|
|
62
|
-
(css: string, selector?: string, prefix?: string, componentId?: string): string;
|
|
59
|
+
(css: string, selector?: string, prefix?: string, componentId?: string): string[];
|
|
63
60
|
hash: string;
|
|
64
61
|
}
|
|
65
|
-
export interface ShouldForwardProp {
|
|
66
|
-
(prop: string,
|
|
62
|
+
export interface ShouldForwardProp<R extends Runtime> {
|
|
63
|
+
(prop: string, elementToBeCreated?: StyledTarget<R>): boolean;
|
|
67
64
|
}
|
|
68
|
-
export interface CommonStatics<Props> {
|
|
65
|
+
export interface CommonStatics<R extends Runtime, Props> {
|
|
69
66
|
attrs: Attrs<Props>[];
|
|
70
|
-
target: StyledTarget
|
|
71
|
-
shouldForwardProp?: ShouldForwardProp
|
|
67
|
+
target: StyledTarget<R>;
|
|
68
|
+
shouldForwardProp?: ShouldForwardProp<R>;
|
|
72
69
|
withComponent: any;
|
|
73
70
|
}
|
|
74
|
-
export interface IStyledStatics<OuterProps
|
|
75
|
-
componentStyle: ComponentStyle;
|
|
76
|
-
foldedComponentIds: Array<string
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
71
|
+
export interface IStyledStatics<R extends Runtime, OuterProps extends {}> extends CommonStatics<R, OuterProps> {
|
|
72
|
+
componentStyle: R extends 'web' ? ComponentStyle : never;
|
|
73
|
+
foldedComponentIds: R extends 'web' ? Array<string> : never;
|
|
74
|
+
inlineStyle: R extends 'native' ? InstanceType<IInlineStyleConstructor<OuterProps>> : never;
|
|
75
|
+
target: StyledTarget<R>;
|
|
76
|
+
styledComponentId: R extends 'web' ? string : never;
|
|
77
|
+
warnTooManyClasses?: R extends 'web' ? ReturnType<typeof createWarnTooManyClasses> : never;
|
|
78
|
+
withComponent: <Target extends StyledTarget<R>, Props = unknown>(tag: Target) => IStyledComponent<R, Target, OuterProps & Props>;
|
|
81
79
|
}
|
|
82
|
-
declare type
|
|
80
|
+
declare type PolymorphicComponentProps<R extends Runtime, ActualComponent extends StyledTarget<R>, PropsToBeInjectedIntoActualComponent extends {}, ActualComponentProps = ActualComponent extends KnownTarget ? React.ComponentPropsWithRef<ActualComponent> : {}> = React.HTMLAttributes<ActualComponent> & Omit<PropsToBeInjectedIntoActualComponent, keyof ActualComponentProps | 'as' | '$as'> & ActualComponentProps & ({
|
|
83
81
|
$as: ActualComponent;
|
|
84
|
-
as?:
|
|
82
|
+
as?: never;
|
|
85
83
|
} | {
|
|
84
|
+
$as?: never;
|
|
86
85
|
as?: ActualComponent;
|
|
87
86
|
});
|
|
88
|
-
interface
|
|
89
|
-
<ActualComponent extends StyledTarget = FallbackComponent>(props:
|
|
87
|
+
interface PolymorphicComponent<R extends Runtime, FallbackComponent extends StyledTarget<R>, ExpectedProps extends {}, PropsToBeInjectedIntoActualComponent extends {}> extends React.ForwardRefExoticComponent<ExpectedProps> {
|
|
88
|
+
<ActualComponent extends StyledTarget<R> = FallbackComponent>(props: PolymorphicComponentProps<R, ActualComponent, ExpectedProps & PropsToBeInjectedIntoActualComponent>): React.ReactElement<PolymorphicComponentProps<R, ActualComponent, ExecutionContext & ExpectedProps & PropsToBeInjectedIntoActualComponent>, ActualComponent>;
|
|
90
89
|
}
|
|
91
|
-
export interface IStyledComponent<
|
|
92
|
-
defaultProps?: Partial<ExtensibleObject & (Target extends
|
|
90
|
+
export interface IStyledComponent<R extends Runtime, Target extends StyledTarget<R>, Props extends {}> extends PolymorphicComponent<R, Target, Props, ExecutionContext>, IStyledStatics<R, Props> {
|
|
91
|
+
defaultProps?: Partial<ExtensibleObject & (Target extends KnownTarget ? React.ComponentProps<Target> : {}) & Props>;
|
|
93
92
|
toString: () => string;
|
|
94
93
|
}
|
|
95
|
-
export interface IStyledComponentFactory<
|
|
96
|
-
(target: Target, options: StyledOptions<Props>, rules: RuleSet<Props>): IStyledComponent<Target, Props> & Statics;
|
|
97
|
-
}
|
|
98
|
-
export interface IStyledNativeStatics<OuterProps = unknown> extends CommonStatics<OuterProps> {
|
|
99
|
-
inlineStyle: InstanceType<IInlineStyleConstructor<OuterProps>>;
|
|
100
|
-
target: NativeTarget;
|
|
101
|
-
withComponent: <Target extends NativeTarget, Props = unknown>(tag: Target) => IStyledNativeComponent<Target, OuterProps & Props>;
|
|
102
|
-
}
|
|
103
|
-
export interface IStyledNativeComponent<Target extends NativeTarget, Props = unknown> extends CustomComponent<Target, Props, ExecutionContext>, IStyledNativeStatics<Props> {
|
|
104
|
-
defaultProps?: Partial<ExtensibleObject & (Target extends KnownWebTarget ? React.ComponentProps<Target> : {}) & Props>;
|
|
105
|
-
}
|
|
106
|
-
export interface IStyledNativeComponentFactory<Target extends NativeTarget, Props = unknown, Statics = unknown> {
|
|
107
|
-
(target: Target, options: StyledNativeOptions<Props>, rules: RuleSet<Props>): IStyledNativeComponent<Target, Props> & Statics;
|
|
94
|
+
export interface IStyledComponentFactory<R extends Runtime, Target extends StyledTarget<R>, Props extends {}, Statics = unknown> {
|
|
95
|
+
(target: Target, options: StyledOptions<R, Props>, rules: RuleSet<Props>): IStyledComponent<R, Target, Props> & Statics;
|
|
108
96
|
}
|
|
109
97
|
export interface IInlineStyleConstructor<Props = unknown> {
|
|
110
98
|
new (rules: RuleSet<Props>): IInlineStyle<Props>;
|
|
@@ -113,8 +101,30 @@ export interface IInlineStyle<Props = unknown> {
|
|
|
113
101
|
rules: RuleSet<Props>;
|
|
114
102
|
generateStyleObject(executionContext: Object): Object;
|
|
115
103
|
}
|
|
116
|
-
export declare type StyledTarget = WebTarget
|
|
117
|
-
export interface StyledObject {
|
|
118
|
-
[key: string]:
|
|
119
|
-
}
|
|
120
|
-
|
|
104
|
+
export declare type StyledTarget<R extends Runtime> = R extends 'web' ? WebTarget : NativeTarget;
|
|
105
|
+
export interface StyledObject<Props = ExecutionContext> {
|
|
106
|
+
[key: string]: BaseExtensibleObject | string | number | StyleFunction<Props>;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Override DefaultTheme to get accurate typings for your project.
|
|
110
|
+
*
|
|
111
|
+
* ```
|
|
112
|
+
* // create styled-components.d.ts in your project source
|
|
113
|
+
* // if it isn't being picked up, check tsconfig compilerOptions.types
|
|
114
|
+
* import type { CSSProp } from "styled-components";
|
|
115
|
+
* import Theme from './theme';
|
|
116
|
+
*
|
|
117
|
+
* type ThemeType = typeof Theme;
|
|
118
|
+
*
|
|
119
|
+
* declare module "styled-components" {
|
|
120
|
+
* export interface DefaultTheme extends ThemeType {}
|
|
121
|
+
* }
|
|
122
|
+
*
|
|
123
|
+
* declare module "react" {
|
|
124
|
+
* interface DOMAttributes<T> {
|
|
125
|
+
* css?: CSSProp;
|
|
126
|
+
* }
|
|
127
|
+
* }
|
|
128
|
+
* ```
|
|
129
|
+
*/
|
|
130
|
+
export declare type CSSProp = string | StyledObject | StyleFunction;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const checkDynamicCreation: (displayName: string, componentId?: string
|
|
1
|
+
export declare const checkDynamicCreation: (displayName: string, componentId?: string) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import StyleSheet from '../sheet';
|
|
2
2
|
import { ExecutionContext, ExtensibleObject, Interpolation, Stringifier } from '../types';
|
|
3
|
-
export declare const objToCssArray: (obj: ExtensibleObject, prevKey?: string
|
|
3
|
+
export declare const objToCssArray: (obj: ExtensibleObject, prevKey?: string) => string[];
|
|
4
4
|
export default function flatten<Props = unknown>(chunk: Interpolation<Props>, executionContext?: ExecutionContext & Props, styleSheet?: StyleSheet, stylisInstance?: Stringifier): Interpolation<Props>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { StyledTarget } from '../types';
|
|
2
|
-
export default function generateDisplayName(target: StyledTarget): string;
|
|
2
|
+
export default function generateDisplayName(target: StyledTarget<any>): string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { StyledTarget } from '../types';
|
|
2
|
-
export default function getComponentName(target: StyledTarget): string;
|
|
2
|
+
export default function getComponentName(target: StyledTarget<any>): string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { IStyledComponent } from '../types';
|
|
2
|
-
export default function isStyledComponent(target: any): target is IStyledComponent<any>;
|
|
2
|
+
export default function isStyledComponent(target: any): target is IStyledComponent<'web', any, any>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { StyledTarget } from '../types';
|
|
2
|
-
export default function isTag(target: StyledTarget):
|
|
2
|
+
export default function isTag(target: StyledTarget<'web'>): target is string;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { Middleware } from 'stylis';
|
|
1
2
|
import { Stringifier } from '../types';
|
|
2
3
|
declare type StylisInstanceConstructorArgs = {
|
|
3
4
|
options?: {
|
|
4
5
|
prefix?: boolean;
|
|
5
6
|
};
|
|
6
|
-
plugins?:
|
|
7
|
+
plugins?: Middleware[];
|
|
7
8
|
};
|
|
8
9
|
export default function createStylisInstance({ options, plugins, }?: StylisInstanceConstructorArgs): Stringifier;
|
|
9
10
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "styled-components",
|
|
3
|
-
"version": "5.3.
|
|
3
|
+
"version": "5.3.6",
|
|
4
4
|
"description": "Visual primitives for the component age. Use the best bits of ES6 and CSS to style your apps without stress",
|
|
5
5
|
"main": "dist/styled-components.cjs.js",
|
|
6
6
|
"jsnext:main": "dist/styled-components.esm.js",
|
|
@@ -46,7 +46,8 @@
|
|
|
46
46
|
"primitives",
|
|
47
47
|
"scripts",
|
|
48
48
|
"test-utils",
|
|
49
|
-
"macro"
|
|
49
|
+
"macro",
|
|
50
|
+
"postinstall.js"
|
|
50
51
|
],
|
|
51
52
|
"keywords": [
|
|
52
53
|
"react",
|
package/postinstall.js
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
const statement = `
|
|
2
|
+
A message from the styled-components core team:
|
|
3
|
+
|
|
4
|
+
If you are seeing this, your environment is set to Russian locale. By now, it is our hope that you have seen the devastation, horrors, and complete disregard the Russian military has for Ukrainian civilians. Our position is that this war is unprovoked, unjust, and a senseless act of genocide and aggression against the Ukrainian people.
|
|
5
|
+
|
|
6
|
+
As of March 24, 2022 the following has been reported (based on the Kyiv Independent @kyivindependent news publication):
|
|
7
|
+
|
|
8
|
+
87 residential buildings damaged in Kyiv since Feb. 24.
|
|
9
|
+
|
|
10
|
+
According to the Kyiv City State Administration, Russian attacks have also damaged 10 private houses, 12 schools, and 6 kindergartens in the Ukrainian capital since the beginning of the full-scale invasion.
|
|
11
|
+
|
|
12
|
+
Russia launched 1,200 missiles on Ukraine.
|
|
13
|
+
|
|
14
|
+
Half of all Ukrainian children have been displaced since Feb. 24, according to UNICEF.
|
|
15
|
+
|
|
16
|
+
“Since the start of the war a month ago, out of every boy and girl in the country, one out of two now has had to flee their homes,” UNICEF spokesperson James Elder told CNN.
|
|
17
|
+
|
|
18
|
+
The Institute of Mass Information reported that one journalist also went missing. Overall, Russia has committed 148 crimes against journalists and media in Ukraine, according to the report.
|
|
19
|
+
|
|
20
|
+
Mariupol city council: Russian occupiers forcibly move 6,000 Mariupol residents to Russia.
|
|
21
|
+
|
|
22
|
+
The local authorities in the besieged seaport said on March 24 that Russian occupiers are now forcibly moving more of its residents to Russia, confiscating their Ukrainian passports.
|
|
23
|
+
|
|
24
|
+
“We’ve seen numerous credible reports of indiscriminate attacks and attacks deliberately targeting civilians, as well as other atrocities,” reads the March 23 statement by U.S. Secretary of State Antony Blinken.
|
|
25
|
+
|
|
26
|
+
1,143 buildings have been destroyed in Kharkiv since the beginning of the full-scale invasion of Ukraine.
|
|
27
|
+
|
|
28
|
+
According to Kharkiv Mayor Ihor Terekhov, Russian forces destroyed 1,143 buildings in Ukraine’s second-biggest city, 998 of which are residential buildings.
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
This is a small sampling of the things being reported on the ground in Ukraine. If you are in a position to do something, have connections, or can spread the word, this is the time to do so. Don't let Vladimir Putin permanently stain the souls of all Russian people with these atrocities. He must be removed from power immediately.
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
russian via google translate (sorry, I'm sure it's not perfect):
|
|
37
|
+
|
|
38
|
+
Сообщение от команды styled-components:
|
|
39
|
+
|
|
40
|
+
Если вы видете это, ваша среда разработки настроена на русский язык. Мы надеемся, что вы уже видели разруху, ужасы и полное неуважение российских военных к гражданскому населению Украины. Наша позиция заключается в том, что эта война является неспровоцированной, несправедливой и бессмысленным актом геноцида и агрессии против украинского народа.
|
|
41
|
+
|
|
42
|
+
По состоянию на 24 марта 2022 года сообщалось следующее (по материалам новостного издания Kyiv Independent @kyivindependent):
|
|
43
|
+
|
|
44
|
+
С 24 февраля в Киеве повреждено 87 жилых домов.
|
|
45
|
+
|
|
46
|
+
По данным Киевской городской государственной администрации, с начала полномасштабного вторжения российские обстрелы также повредили 10 частных домов, 12 школ и 6 детских садов в украинской столице.
|
|
47
|
+
|
|
48
|
+
Россия запустила 1200 ракет по Украине.
|
|
49
|
+
|
|
50
|
+
По данным ЮНИСЕФ, половина всех украинских детей покинули свои дома с 24 февраля.
|
|
51
|
+
|
|
52
|
+
«С начала войны, за месяц, из всех девочек и мальчиков, каждый второй был вынужден покинуть свой дом», — сказал CNN представитель ЮНИСЕФ Джеймс Элдер.
|
|
53
|
+
|
|
54
|
+
Институт массовой информации сообщил, что также пропал один журналист. Всего Россия совершила 148 преступлений против журналистов и СМИ в Украине, говорится в отчете.
|
|
55
|
+
|
|
56
|
+
Мариупольский горсовет: российские оккупанты насильно переселяют в Россию 6 тысяч мариупольцев.
|
|
57
|
+
|
|
58
|
+
24 марта местные власти осажденного морского порта заявили, что российские оккупанты сейчас насильственно переселяют в Россию все больше его жителей, отбирая у них украинские паспорта.
|
|
59
|
+
|
|
60
|
+
«Мы получили многочисленные заслуживающие доверия сообщения о неизбирательных нападениях и нападениях, преднамеренно направленных против гражданских лиц, а также о других зверствах», — говорится в заявлении госсекретаря США Энтони Блинкена от 23 марта.
|
|
61
|
+
|
|
62
|
+
В Харькове с начала полномасштабного вторжения в Украину разрушено 1143 дома.
|
|
63
|
+
|
|
64
|
+
По словам мэра Харькова Игоря Терехова, российские войска разрушили 1143 здания во втором по величине городе Украины, 998 из которых являются жилыми домами.
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
Это небольшая выборка того, что сообщается на местах в Украине. Если у вас есть возможность что-то сделать, у вас есть связи или вы можете распространить информацию, сейчас самое время это сделать. Не позволяйте Владимиру Путину навсегда запятнать души всех русских людей этими зверствами. Он должен быть немедленно отстранен от власти.
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
Slava Ukraini 🇺🇦
|
|
73
|
+
`;
|
|
74
|
+
|
|
75
|
+
if (
|
|
76
|
+
Intl.DateTimeFormat()
|
|
77
|
+
.resolvedOptions()
|
|
78
|
+
.locale.startsWith('ru')
|
|
79
|
+
) {
|
|
80
|
+
// eslint-disable-next-line
|
|
81
|
+
console.warn(statement);
|
|
82
|
+
}
|
|
@@ -155,7 +155,7 @@ function _objectWithoutPropertiesLoose(source, excluded) {
|
|
|
155
155
|
var SC_ATTR = typeof process !== 'undefined' && (process.env.REACT_APP_SC_ATTR || process.env.SC_ATTR) || 'data-styled';
|
|
156
156
|
var SC_ATTR_ACTIVE = 'active';
|
|
157
157
|
var SC_ATTR_VERSION = 'data-styled-version';
|
|
158
|
-
var SC_VERSION = "5.3.
|
|
158
|
+
var SC_VERSION = "5.3.6";
|
|
159
159
|
var SPLITTER = '/*!sc*/\n';
|
|
160
160
|
var IS_BROWSER = typeof window !== 'undefined' && 'HTMLElement' in window;
|
|
161
161
|
var DISABLE_SPEEDY = Boolean(typeof SC_DISABLE_SPEEDY === 'boolean' ? SC_DISABLE_SPEEDY : typeof process !== 'undefined' && typeof process.env.REACT_APP_SC_DISABLE_SPEEDY !== 'undefined' && process.env.REACT_APP_SC_DISABLE_SPEEDY !== '' ? process.env.REACT_APP_SC_DISABLE_SPEEDY === 'false' ? false : process.env.REACT_APP_SC_DISABLE_SPEEDY : typeof process !== 'undefined' && typeof process.env.SC_DISABLE_SPEEDY !== 'undefined' && process.env.SC_DISABLE_SPEEDY !== '' ? process.env.SC_DISABLE_SPEEDY === 'false' ? false : process.env.SC_DISABLE_SPEEDY : process.env.NODE_ENV !== 'production'); // Shared empty execution context when generating static styles
|
|
@@ -445,7 +445,7 @@ var rehydrateSheet = function rehydrateSheet(sheet) {
|
|
|
445
445
|
|
|
446
446
|
/* eslint-disable camelcase, no-undef */
|
|
447
447
|
var getNonce = function getNonce() {
|
|
448
|
-
return typeof
|
|
448
|
+
return typeof __webpack_nonce__ !== 'undefined' ? __webpack_nonce__ : null;
|
|
449
449
|
};
|
|
450
450
|
|
|
451
451
|
//
|