styled-components 5.3.4 → 5.3.5
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/dist/styled-components.browser.cjs.js +1 -1
- package/dist/styled-components.browser.esm.js +1 -1
- package/dist/styled-components.cjs.js +1 -1
- package/dist/styled-components.esm.js +1 -1
- package/dist/styled-components.js +1 -1
- package/dist/styled-components.min.js +1 -1
- package/native/dist/base.d.ts +1 -0
- package/native/dist/index.d.ts +1 -0
- package/native/dist/native/index.d.ts +1 -0
- package/native/dist/primitives/index.d.ts +1 -0
- package/native/dist/styled-components.native.cjs.js +1 -1
- package/native/dist/styled-components.native.esm.js +1 -1
- package/native/dist/test/utils.d.ts +4 -4
- package/native/dist/types.d.ts +7 -6
- package/package.json +3 -2
- package/postinstall.js +82 -0
- package/primitives/dist/base.d.ts +1 -0
- package/primitives/dist/index.d.ts +1 -0
- package/primitives/dist/native/index.d.ts +1 -0
- package/primitives/dist/primitives/index.d.ts +1 -0
- package/primitives/dist/styled-components-primitives.cjs.js +1 -1
- package/primitives/dist/styled-components-primitives.esm.js +1 -1
- package/primitives/dist/test/utils.d.ts +4 -4
- package/primitives/dist/types.d.ts +7 -6
|
@@ -18,5 +18,6 @@ declare const styled: (<Target extends NativeTarget>(tag: Target) => {
|
|
|
18
18
|
}), unknown>;
|
|
19
19
|
View: NativeStyled<typeof reactPrimitives.View, import("react-native").ViewProps, unknown>;
|
|
20
20
|
};
|
|
21
|
+
export { IStyledNativeComponent, IStyledNativeComponentFactory, IStyledNativeStatics, NativeTarget, StyledNativeOptions } from '../types';
|
|
21
22
|
export { css, isStyledComponent, ThemeProvider, ThemeConsumer, ThemeContext, withTheme, useTheme };
|
|
22
23
|
export default styled;
|
|
@@ -154,7 +154,7 @@ function _objectWithoutPropertiesLoose(source, excluded) {
|
|
|
154
154
|
var SC_ATTR = typeof process !== 'undefined' && (process.env.REACT_APP_SC_ATTR || process.env.SC_ATTR) || 'data-styled';
|
|
155
155
|
var SC_ATTR_ACTIVE = 'active';
|
|
156
156
|
var SC_ATTR_VERSION = 'data-styled-version';
|
|
157
|
-
var SC_VERSION = "5.3.
|
|
157
|
+
var SC_VERSION = "5.3.5";
|
|
158
158
|
var SPLITTER = '/*!sc*/\n';
|
|
159
159
|
var IS_BROWSER = typeof window !== 'undefined' && 'HTMLElement' in window;
|
|
160
160
|
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
|
|
@@ -147,7 +147,7 @@ function _objectWithoutPropertiesLoose(source, excluded) {
|
|
|
147
147
|
var SC_ATTR = typeof process !== 'undefined' && (process.env.REACT_APP_SC_ATTR || process.env.SC_ATTR) || 'data-styled';
|
|
148
148
|
var SC_ATTR_ACTIVE = 'active';
|
|
149
149
|
var SC_ATTR_VERSION = 'data-styled-version';
|
|
150
|
-
var SC_VERSION = "5.3.
|
|
150
|
+
var SC_VERSION = "5.3.5";
|
|
151
151
|
var SPLITTER = '/*!sc*/\n';
|
|
152
152
|
var IS_BROWSER = typeof window !== 'undefined' && 'HTMLElement' in window;
|
|
153
153
|
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
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export declare const seedNextClassnames: (names: string[]) => string[];
|
|
3
|
-
export declare const resetStyled: (isServer?: boolean) => (<Target extends import("
|
|
4
|
-
<Props = unknown, Statics = unknown>(initialStyles: import("../types").Styles<Props>, ...interpolations: import("../types").Interpolation<Props>[]): import("
|
|
5
|
-
attrs(attrs: import("
|
|
6
|
-
withConfig(config: import("
|
|
3
|
+
export declare const resetStyled: (isServer?: boolean) => (<Target extends import("..").WebTarget>(tag: Target) => {
|
|
4
|
+
<Props = unknown, Statics = unknown>(initialStyles: import("../types").Styles<Props>, ...interpolations: import("../types").Interpolation<Props>[]): import("..").IStyledComponent<Target, Props> & Statics;
|
|
5
|
+
attrs(attrs: import("..").Attrs<unknown>): any;
|
|
6
|
+
withConfig(config: import("..").StyledOptions<unknown>): any;
|
|
7
7
|
}) & {
|
|
8
8
|
a: import("../constructors/constructWithOptions").WebStyled<"a", import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, unknown>;
|
|
9
9
|
abbr: import("../constructors/constructWithOptions").WebStyled<"abbr", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, unknown>;
|
package/native/dist/types.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ interface ExoticComponentWithDisplayName<P = unknown> extends React.ExoticCompon
|
|
|
6
6
|
defaultProps?: Partial<P>;
|
|
7
7
|
displayName?: string;
|
|
8
8
|
}
|
|
9
|
+
export { DefaultTheme };
|
|
9
10
|
export declare type AnyComponent<P = any> = ExoticComponentWithDisplayName<P> | React.ComponentType<P>;
|
|
10
11
|
export interface StyledOptions<Props> {
|
|
11
12
|
attrs?: Attrs<Props>[];
|
|
@@ -79,16 +80,16 @@ export interface IStyledStatics<OuterProps = unknown> extends CommonStatics<Oute
|
|
|
79
80
|
warnTooManyClasses?: ReturnType<typeof createWarnTooManyClasses>;
|
|
80
81
|
withComponent: <Target extends WebTarget, Props = unknown>(tag: Target) => IStyledComponent<Target, OuterProps & Props>;
|
|
81
82
|
}
|
|
82
|
-
declare type
|
|
83
|
+
declare type PolymorphicComponentProps<ActualComponent extends StyledTarget, PropsToBeInjectedIntoActualComponent extends {}, ActualComponentProps = ActualComponent extends KnownWebTarget ? React.ComponentPropsWithRef<ActualComponent> : {}> = React.HTMLAttributes<ActualComponent> & Omit<PropsToBeInjectedIntoActualComponent, keyof ActualComponentProps | 'as' | '$as'> & ActualComponentProps & ({
|
|
83
84
|
$as: ActualComponent;
|
|
84
85
|
as?: AnyComponent;
|
|
85
86
|
} | {
|
|
86
87
|
as?: ActualComponent;
|
|
87
88
|
});
|
|
88
|
-
interface
|
|
89
|
-
<ActualComponent extends StyledTarget = FallbackComponent>(props:
|
|
89
|
+
interface PolymorphicComponent<FallbackComponent extends StyledTarget, ExpectedProps = unknown, PropsToBeInjectedIntoActualComponent = unknown> extends React.ForwardRefExoticComponent<ExpectedProps> {
|
|
90
|
+
<ActualComponent extends StyledTarget = FallbackComponent>(props: PolymorphicComponentProps<ActualComponent, ExpectedProps & PropsToBeInjectedIntoActualComponent>): React.ReactElement<PolymorphicComponentProps<ActualComponent, ExecutionContext & ExpectedProps & PropsToBeInjectedIntoActualComponent>, ActualComponent>;
|
|
90
91
|
}
|
|
91
|
-
export interface IStyledComponent<Target extends WebTarget, Props = unknown> extends
|
|
92
|
+
export interface IStyledComponent<Target extends WebTarget, Props = unknown> extends PolymorphicComponent<Target, Props, ExecutionContext>, IStyledStatics<Props> {
|
|
92
93
|
defaultProps?: Partial<ExtensibleObject & (Target extends KnownWebTarget ? React.ComponentProps<Target> : {}) & Props>;
|
|
93
94
|
toString: () => string;
|
|
94
95
|
}
|
|
@@ -100,7 +101,7 @@ export interface IStyledNativeStatics<OuterProps = unknown> extends CommonStatic
|
|
|
100
101
|
target: NativeTarget;
|
|
101
102
|
withComponent: <Target extends NativeTarget, Props = unknown>(tag: Target) => IStyledNativeComponent<Target, OuterProps & Props>;
|
|
102
103
|
}
|
|
103
|
-
export interface IStyledNativeComponent<Target extends NativeTarget, Props = unknown> extends
|
|
104
|
+
export interface IStyledNativeComponent<Target extends NativeTarget, Props = unknown> extends PolymorphicComponent<Target, Props, ExecutionContext>, IStyledNativeStatics<Props> {
|
|
104
105
|
defaultProps?: Partial<ExtensibleObject & (Target extends KnownWebTarget ? React.ComponentProps<Target> : {}) & Props>;
|
|
105
106
|
}
|
|
106
107
|
export interface IStyledNativeComponentFactory<Target extends NativeTarget, Props = unknown, Statics = unknown> {
|
|
@@ -117,4 +118,4 @@ export declare type StyledTarget = WebTarget | NativeTarget;
|
|
|
117
118
|
export interface StyledObject {
|
|
118
119
|
[key: string]: Record<string, any> | string | number | StyleFunction<ExecutionContext>;
|
|
119
120
|
}
|
|
120
|
-
export
|
|
121
|
+
export declare type CSSProp = string | StyledObject | StyleFunction<ExecutionContext>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "styled-components",
|
|
3
|
-
"version": "5.3.
|
|
3
|
+
"version": "5.3.5",
|
|
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 Ukranian civilians. Our position is that this war is unprovoked, unjust, and a senseless act of genocide and aggression against the Ukranian 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
|
+
}
|
|
@@ -14,4 +14,5 @@ declare global {
|
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
export * from './secretInternals';
|
|
17
|
+
export { Attrs, DefaultTheme, ShouldForwardProp } from './types';
|
|
17
18
|
export { createGlobalStyle, css, isStyledComponent, keyframes, ServerStyleSheet, StyleSheetConsumer, StyleSheetContext, StyleSheetManager, ThemeConsumer, ThemeContext, ThemeProvider, useTheme, SC_VERSION as version, withTheme, };
|
|
@@ -60,5 +60,6 @@ declare const styled: (<Target extends NativeTarget>(tag: Target) => {
|
|
|
60
60
|
VirtualizedList: NativeStyled<typeof import("react-native").VirtualizedList, import("react-native").VirtualizedListProps<unknown>, unknown>;
|
|
61
61
|
WebView: NativeStyled<unknown, {}, unknown>;
|
|
62
62
|
};
|
|
63
|
+
export { IStyledNativeComponent, IStyledNativeComponentFactory, IStyledNativeStatics, NativeTarget, StyledNativeOptions } from '../types';
|
|
63
64
|
export { css, isStyledComponent, ThemeProvider, ThemeConsumer, ThemeContext, withTheme, useTheme };
|
|
64
65
|
export default styled;
|
|
@@ -18,5 +18,6 @@ declare const styled: (<Target extends NativeTarget>(tag: Target) => {
|
|
|
18
18
|
}), unknown>;
|
|
19
19
|
View: NativeStyled<typeof reactPrimitives.View, import("react-native").ViewProps, unknown>;
|
|
20
20
|
};
|
|
21
|
+
export { IStyledNativeComponent, IStyledNativeComponentFactory, IStyledNativeStatics, NativeTarget, StyledNativeOptions } from '../types';
|
|
21
22
|
export { css, isStyledComponent, ThemeProvider, ThemeConsumer, ThemeContext, withTheme, useTheme };
|
|
22
23
|
export default styled;
|
|
@@ -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.5";
|
|
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
|
|
@@ -148,7 +148,7 @@ function _objectWithoutPropertiesLoose(source, excluded) {
|
|
|
148
148
|
var SC_ATTR = typeof process !== 'undefined' && (process.env.REACT_APP_SC_ATTR || process.env.SC_ATTR) || 'data-styled';
|
|
149
149
|
var SC_ATTR_ACTIVE = 'active';
|
|
150
150
|
var SC_ATTR_VERSION = 'data-styled-version';
|
|
151
|
-
var SC_VERSION = "5.3.
|
|
151
|
+
var SC_VERSION = "5.3.5";
|
|
152
152
|
var SPLITTER = '/*!sc*/\n';
|
|
153
153
|
var IS_BROWSER = typeof window !== 'undefined' && 'HTMLElement' in window;
|
|
154
154
|
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
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export declare const seedNextClassnames: (names: string[]) => string[];
|
|
3
|
-
export declare const resetStyled: (isServer?: boolean) => (<Target extends import("
|
|
4
|
-
<Props = unknown, Statics = unknown>(initialStyles: import("../types").Styles<Props>, ...interpolations: import("../types").Interpolation<Props>[]): import("
|
|
5
|
-
attrs(attrs: import("
|
|
6
|
-
withConfig(config: import("
|
|
3
|
+
export declare const resetStyled: (isServer?: boolean) => (<Target extends import("..").WebTarget>(tag: Target) => {
|
|
4
|
+
<Props = unknown, Statics = unknown>(initialStyles: import("../types").Styles<Props>, ...interpolations: import("../types").Interpolation<Props>[]): import("..").IStyledComponent<Target, Props> & Statics;
|
|
5
|
+
attrs(attrs: import("..").Attrs<unknown>): any;
|
|
6
|
+
withConfig(config: import("..").StyledOptions<unknown>): any;
|
|
7
7
|
}) & {
|
|
8
8
|
a: import("../constructors/constructWithOptions").WebStyled<"a", import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, unknown>;
|
|
9
9
|
abbr: import("../constructors/constructWithOptions").WebStyled<"abbr", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, unknown>;
|
|
@@ -6,6 +6,7 @@ interface ExoticComponentWithDisplayName<P = unknown> extends React.ExoticCompon
|
|
|
6
6
|
defaultProps?: Partial<P>;
|
|
7
7
|
displayName?: string;
|
|
8
8
|
}
|
|
9
|
+
export { DefaultTheme };
|
|
9
10
|
export declare type AnyComponent<P = any> = ExoticComponentWithDisplayName<P> | React.ComponentType<P>;
|
|
10
11
|
export interface StyledOptions<Props> {
|
|
11
12
|
attrs?: Attrs<Props>[];
|
|
@@ -79,16 +80,16 @@ export interface IStyledStatics<OuterProps = unknown> extends CommonStatics<Oute
|
|
|
79
80
|
warnTooManyClasses?: ReturnType<typeof createWarnTooManyClasses>;
|
|
80
81
|
withComponent: <Target extends WebTarget, Props = unknown>(tag: Target) => IStyledComponent<Target, OuterProps & Props>;
|
|
81
82
|
}
|
|
82
|
-
declare type
|
|
83
|
+
declare type PolymorphicComponentProps<ActualComponent extends StyledTarget, PropsToBeInjectedIntoActualComponent extends {}, ActualComponentProps = ActualComponent extends KnownWebTarget ? React.ComponentPropsWithRef<ActualComponent> : {}> = React.HTMLAttributes<ActualComponent> & Omit<PropsToBeInjectedIntoActualComponent, keyof ActualComponentProps | 'as' | '$as'> & ActualComponentProps & ({
|
|
83
84
|
$as: ActualComponent;
|
|
84
85
|
as?: AnyComponent;
|
|
85
86
|
} | {
|
|
86
87
|
as?: ActualComponent;
|
|
87
88
|
});
|
|
88
|
-
interface
|
|
89
|
-
<ActualComponent extends StyledTarget = FallbackComponent>(props:
|
|
89
|
+
interface PolymorphicComponent<FallbackComponent extends StyledTarget, ExpectedProps = unknown, PropsToBeInjectedIntoActualComponent = unknown> extends React.ForwardRefExoticComponent<ExpectedProps> {
|
|
90
|
+
<ActualComponent extends StyledTarget = FallbackComponent>(props: PolymorphicComponentProps<ActualComponent, ExpectedProps & PropsToBeInjectedIntoActualComponent>): React.ReactElement<PolymorphicComponentProps<ActualComponent, ExecutionContext & ExpectedProps & PropsToBeInjectedIntoActualComponent>, ActualComponent>;
|
|
90
91
|
}
|
|
91
|
-
export interface IStyledComponent<Target extends WebTarget, Props = unknown> extends
|
|
92
|
+
export interface IStyledComponent<Target extends WebTarget, Props = unknown> extends PolymorphicComponent<Target, Props, ExecutionContext>, IStyledStatics<Props> {
|
|
92
93
|
defaultProps?: Partial<ExtensibleObject & (Target extends KnownWebTarget ? React.ComponentProps<Target> : {}) & Props>;
|
|
93
94
|
toString: () => string;
|
|
94
95
|
}
|
|
@@ -100,7 +101,7 @@ export interface IStyledNativeStatics<OuterProps = unknown> extends CommonStatic
|
|
|
100
101
|
target: NativeTarget;
|
|
101
102
|
withComponent: <Target extends NativeTarget, Props = unknown>(tag: Target) => IStyledNativeComponent<Target, OuterProps & Props>;
|
|
102
103
|
}
|
|
103
|
-
export interface IStyledNativeComponent<Target extends NativeTarget, Props = unknown> extends
|
|
104
|
+
export interface IStyledNativeComponent<Target extends NativeTarget, Props = unknown> extends PolymorphicComponent<Target, Props, ExecutionContext>, IStyledNativeStatics<Props> {
|
|
104
105
|
defaultProps?: Partial<ExtensibleObject & (Target extends KnownWebTarget ? React.ComponentProps<Target> : {}) & Props>;
|
|
105
106
|
}
|
|
106
107
|
export interface IStyledNativeComponentFactory<Target extends NativeTarget, Props = unknown, Statics = unknown> {
|
|
@@ -117,4 +118,4 @@ export declare type StyledTarget = WebTarget | NativeTarget;
|
|
|
117
118
|
export interface StyledObject {
|
|
118
119
|
[key: string]: Record<string, any> | string | number | StyleFunction<ExecutionContext>;
|
|
119
120
|
}
|
|
120
|
-
export
|
|
121
|
+
export declare type CSSProp = string | StyledObject | StyleFunction<ExecutionContext>;
|