styled-components 6.0.6 → 6.0.8
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/base.d.ts +1 -1
- package/dist/constructors/constructWithOptions.d.ts +1 -1
- package/dist/constructors/styled.d.ts +3 -45
- package/dist/hoc/withTheme.d.ts +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/models/ComponentStyle.d.ts +1 -1
- package/dist/models/StyleSheetManager.d.ts +1 -1
- package/dist/models/ThemeProvider.d.ts +1 -1
- package/dist/native/index.d.ts +4 -4
- package/dist/sheet/Sheet.d.ts +3 -3
- package/dist/sheet/Tag.d.ts +7 -7
- package/dist/sheet/dom.d.ts +1 -1
- package/dist/sheet/types.d.ts +1 -1
- 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 +18 -18
- 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/dist/test/utils.d.ts +3 -46
- package/dist/types.d.ts +41 -19
- package/dist/utils/checkDynamicCreation.d.ts +1 -1
- package/dist/utils/determineTheme.d.ts +2 -2
- package/dist/utils/domElements.d.ts +3 -1
- package/dist/utils/flatten.d.ts +1 -1
- package/dist/utils/hoist.d.ts +1 -1
- package/dist/utils/joinStrings.d.ts +2 -2
- package/dist/utils/stylis.d.ts +4 -4
- package/native/dist/base.d.ts +1 -1
- package/native/dist/constructors/constructWithOptions.d.ts +1 -1
- package/native/dist/constructors/styled.d.ts +3 -45
- package/native/dist/hoc/withTheme.d.ts +1 -1
- package/native/dist/index.d.ts +2 -2
- package/native/dist/models/ComponentStyle.d.ts +1 -1
- package/native/dist/models/StyleSheetManager.d.ts +1 -1
- package/native/dist/models/ThemeProvider.d.ts +1 -1
- package/native/dist/native/index.d.ts +4 -4
- package/native/dist/sheet/Sheet.d.ts +3 -3
- package/native/dist/sheet/Tag.d.ts +7 -7
- package/native/dist/sheet/dom.d.ts +1 -1
- package/native/dist/sheet/types.d.ts +1 -1
- package/native/dist/styled-components.native.cjs.js +1 -1
- package/native/dist/styled-components.native.cjs.js.map +1 -1
- package/native/dist/styled-components.native.esm.js +1 -1
- package/native/dist/styled-components.native.esm.js.map +1 -1
- package/native/dist/test/utils.d.ts +3 -46
- package/native/dist/types.d.ts +41 -19
- package/native/dist/utils/checkDynamicCreation.d.ts +1 -1
- package/native/dist/utils/determineTheme.d.ts +2 -2
- package/native/dist/utils/domElements.d.ts +3 -1
- package/native/dist/utils/flatten.d.ts +1 -1
- package/native/dist/utils/hoist.d.ts +1 -1
- package/native/dist/utils/joinStrings.d.ts +2 -2
- package/native/dist/utils/stylis.d.ts +4 -4
- package/package.json +3 -2
package/dist/test/utils.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
export declare const seedNextClassnames: (names: string[]) => string[];
|
|
3
2
|
export declare const resetStyled: (isServer?: boolean) => (<Target extends import("..").WebTarget>(tag: Target) => import("../constructors/constructWithOptions").Styled<"web", Target, Target extends import("../types").KnownTarget ? import("react").ComponentPropsWithRef<Target> : import("../types").BaseObject, import("../types").BaseObject>) & {
|
|
3
|
+
object: import("../constructors/constructWithOptions").Styled<"web", "object", import("react").DetailedHTMLProps<import("react").ObjectHTMLAttributes<HTMLObjectElement>, HTMLObjectElement>, import("../types").BaseObject>;
|
|
4
4
|
a: import("../constructors/constructWithOptions").Styled<"web", "a", import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, import("../types").BaseObject>;
|
|
5
5
|
abbr: import("../constructors/constructWithOptions").Styled<"web", "abbr", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
6
6
|
address: import("../constructors/constructWithOptions").Styled<"web", "address", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
@@ -46,7 +46,6 @@ export declare const resetStyled: (isServer?: boolean) => (<Target extends impor
|
|
|
46
46
|
h4: import("../constructors/constructWithOptions").Styled<"web", "h4", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, import("../types").BaseObject>;
|
|
47
47
|
h5: import("../constructors/constructWithOptions").Styled<"web", "h5", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, import("../types").BaseObject>;
|
|
48
48
|
h6: import("../constructors/constructWithOptions").Styled<"web", "h6", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, import("../types").BaseObject>;
|
|
49
|
-
head: import("../constructors/constructWithOptions").Styled<"web", "head", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadElement>, HTMLHeadElement>, import("../types").BaseObject>;
|
|
50
49
|
header: import("../constructors/constructWithOptions").Styled<"web", "header", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
51
50
|
hgroup: import("../constructors/constructWithOptions").Styled<"web", "hgroup", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
52
51
|
hr: import("../constructors/constructWithOptions").Styled<"web", "hr", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHRElement>, HTMLHRElement>, import("../types").BaseObject>;
|
|
@@ -70,9 +69,7 @@ export declare const resetStyled: (isServer?: boolean) => (<Target extends impor
|
|
|
70
69
|
meta: import("../constructors/constructWithOptions").Styled<"web", "meta", import("react").DetailedHTMLProps<import("react").MetaHTMLAttributes<HTMLMetaElement>, HTMLMetaElement>, import("../types").BaseObject>;
|
|
71
70
|
meter: import("../constructors/constructWithOptions").Styled<"web", "meter", import("react").DetailedHTMLProps<import("react").MeterHTMLAttributes<HTMLMeterElement>, HTMLMeterElement>, import("../types").BaseObject>;
|
|
72
71
|
nav: import("../constructors/constructWithOptions").Styled<"web", "nav", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
73
|
-
noindex: import("../constructors/constructWithOptions").Styled<"web", "noindex", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
74
72
|
noscript: import("../constructors/constructWithOptions").Styled<"web", "noscript", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
75
|
-
object: import("../constructors/constructWithOptions").Styled<"web", "object", import("react").DetailedHTMLProps<import("react").ObjectHTMLAttributes<HTMLObjectElement>, HTMLObjectElement>, import("../types").BaseObject>;
|
|
76
73
|
ol: import("../constructors/constructWithOptions").Styled<"web", "ol", import("react").DetailedHTMLProps<import("react").OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>, import("../types").BaseObject>;
|
|
77
74
|
optgroup: import("../constructors/constructWithOptions").Styled<"web", "optgroup", import("react").DetailedHTMLProps<import("react").OptgroupHTMLAttributes<HTMLOptGroupElement>, HTMLOptGroupElement>, import("../types").BaseObject>;
|
|
78
75
|
option: import("../constructors/constructWithOptions").Styled<"web", "option", import("react").DetailedHTMLProps<import("react").OptionHTMLAttributes<HTMLOptionElement>, HTMLOptionElement>, import("../types").BaseObject>;
|
|
@@ -88,7 +85,6 @@ export declare const resetStyled: (isServer?: boolean) => (<Target extends impor
|
|
|
88
85
|
ruby: import("../constructors/constructWithOptions").Styled<"web", "ruby", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
89
86
|
s: import("../constructors/constructWithOptions").Styled<"web", "s", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
90
87
|
samp: import("../constructors/constructWithOptions").Styled<"web", "samp", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
91
|
-
slot: import("../constructors/constructWithOptions").Styled<"web", "slot", import("react").DetailedHTMLProps<import("react").SlotHTMLAttributes<HTMLSlotElement>, HTMLSlotElement>, import("../types").BaseObject>;
|
|
92
88
|
script: import("../constructors/constructWithOptions").Styled<"web", "script", import("react").DetailedHTMLProps<import("react").ScriptHTMLAttributes<HTMLScriptElement>, HTMLScriptElement>, import("../types").BaseObject>;
|
|
93
89
|
section: import("../constructors/constructWithOptions").Styled<"web", "section", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
94
90
|
select: import("../constructors/constructWithOptions").Styled<"web", "select", import("react").DetailedHTMLProps<import("react").SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>, import("../types").BaseObject>;
|
|
@@ -101,7 +97,6 @@ export declare const resetStyled: (isServer?: boolean) => (<Target extends impor
|
|
|
101
97
|
summary: import("../constructors/constructWithOptions").Styled<"web", "summary", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
102
98
|
sup: import("../constructors/constructWithOptions").Styled<"web", "sup", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
103
99
|
table: import("../constructors/constructWithOptions").Styled<"web", "table", import("react").DetailedHTMLProps<import("react").TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>, import("../types").BaseObject>;
|
|
104
|
-
template: import("../constructors/constructWithOptions").Styled<"web", "template", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTemplateElement>, HTMLTemplateElement>, import("../types").BaseObject>;
|
|
105
100
|
tbody: import("../constructors/constructWithOptions").Styled<"web", "tbody", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, import("../types").BaseObject>;
|
|
106
101
|
td: import("../constructors/constructWithOptions").Styled<"web", "td", import("react").DetailedHTMLProps<import("react").TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>, import("../types").BaseObject>;
|
|
107
102
|
textarea: import("../constructors/constructWithOptions").Styled<"web", "textarea", import("react").DetailedHTMLProps<import("react").TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, import("../types").BaseObject>;
|
|
@@ -109,50 +104,18 @@ export declare const resetStyled: (isServer?: boolean) => (<Target extends impor
|
|
|
109
104
|
th: import("../constructors/constructWithOptions").Styled<"web", "th", import("react").DetailedHTMLProps<import("react").ThHTMLAttributes<HTMLTableHeaderCellElement>, HTMLTableHeaderCellElement>, import("../types").BaseObject>;
|
|
110
105
|
thead: import("../constructors/constructWithOptions").Styled<"web", "thead", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, import("../types").BaseObject>;
|
|
111
106
|
time: import("../constructors/constructWithOptions").Styled<"web", "time", import("react").DetailedHTMLProps<import("react").TimeHTMLAttributes<HTMLTimeElement>, HTMLTimeElement>, import("../types").BaseObject>;
|
|
112
|
-
title: import("../constructors/constructWithOptions").Styled<"web", "title", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTitleElement>, HTMLTitleElement>, import("../types").BaseObject>;
|
|
113
107
|
tr: import("../constructors/constructWithOptions").Styled<"web", "tr", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>, import("../types").BaseObject>;
|
|
114
108
|
track: import("../constructors/constructWithOptions").Styled<"web", "track", import("react").DetailedHTMLProps<import("react").TrackHTMLAttributes<HTMLTrackElement>, HTMLTrackElement>, import("../types").BaseObject>;
|
|
115
109
|
u: import("../constructors/constructWithOptions").Styled<"web", "u", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
116
110
|
ul: import("../constructors/constructWithOptions").Styled<"web", "ul", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLUListElement>, HTMLUListElement>, import("../types").BaseObject>;
|
|
111
|
+
use: import("../constructors/constructWithOptions").Styled<"web", "use", import("react").SVGProps<SVGUseElement>, import("../types").BaseObject>;
|
|
117
112
|
var: import("../constructors/constructWithOptions").Styled<"web", "var", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
118
113
|
video: import("../constructors/constructWithOptions").Styled<"web", "video", import("react").DetailedHTMLProps<import("react").VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>, import("../types").BaseObject>;
|
|
119
114
|
wbr: import("../constructors/constructWithOptions").Styled<"web", "wbr", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
120
|
-
webview: import("../constructors/constructWithOptions").Styled<"web", "webview", import("react").DetailedHTMLProps<import("react").WebViewHTMLAttributes<HTMLWebViewElement>, HTMLWebViewElement>, import("../types").BaseObject>;
|
|
121
|
-
svg: import("../constructors/constructWithOptions").Styled<"web", "svg", import("react").SVGProps<SVGSVGElement>, import("../types").BaseObject>;
|
|
122
|
-
animate: import("../constructors/constructWithOptions").Styled<"web", "animate", import("react").SVGProps<SVGElement>, import("../types").BaseObject>;
|
|
123
|
-
animateMotion: import("../constructors/constructWithOptions").Styled<"web", "animateMotion", import("react").SVGProps<SVGElement>, import("../types").BaseObject>;
|
|
124
|
-
animateTransform: import("../constructors/constructWithOptions").Styled<"web", "animateTransform", import("react").SVGProps<SVGElement>, import("../types").BaseObject>;
|
|
125
115
|
circle: import("../constructors/constructWithOptions").Styled<"web", "circle", import("react").SVGProps<SVGCircleElement>, import("../types").BaseObject>;
|
|
126
116
|
clipPath: import("../constructors/constructWithOptions").Styled<"web", "clipPath", import("react").SVGProps<SVGClipPathElement>, import("../types").BaseObject>;
|
|
127
117
|
defs: import("../constructors/constructWithOptions").Styled<"web", "defs", import("react").SVGProps<SVGDefsElement>, import("../types").BaseObject>;
|
|
128
|
-
desc: import("../constructors/constructWithOptions").Styled<"web", "desc", import("react").SVGProps<SVGDescElement>, import("../types").BaseObject>;
|
|
129
118
|
ellipse: import("../constructors/constructWithOptions").Styled<"web", "ellipse", import("react").SVGProps<SVGEllipseElement>, import("../types").BaseObject>;
|
|
130
|
-
feBlend: import("../constructors/constructWithOptions").Styled<"web", "feBlend", import("react").SVGProps<SVGFEBlendElement>, import("../types").BaseObject>;
|
|
131
|
-
feColorMatrix: import("../constructors/constructWithOptions").Styled<"web", "feColorMatrix", import("react").SVGProps<SVGFEColorMatrixElement>, import("../types").BaseObject>;
|
|
132
|
-
feComponentTransfer: import("../constructors/constructWithOptions").Styled<"web", "feComponentTransfer", import("react").SVGProps<SVGFEComponentTransferElement>, import("../types").BaseObject>;
|
|
133
|
-
feComposite: import("../constructors/constructWithOptions").Styled<"web", "feComposite", import("react").SVGProps<SVGFECompositeElement>, import("../types").BaseObject>;
|
|
134
|
-
feConvolveMatrix: import("../constructors/constructWithOptions").Styled<"web", "feConvolveMatrix", import("react").SVGProps<SVGFEConvolveMatrixElement>, import("../types").BaseObject>;
|
|
135
|
-
feDiffuseLighting: import("../constructors/constructWithOptions").Styled<"web", "feDiffuseLighting", import("react").SVGProps<SVGFEDiffuseLightingElement>, import("../types").BaseObject>;
|
|
136
|
-
feDisplacementMap: import("../constructors/constructWithOptions").Styled<"web", "feDisplacementMap", import("react").SVGProps<SVGFEDisplacementMapElement>, import("../types").BaseObject>;
|
|
137
|
-
feDistantLight: import("../constructors/constructWithOptions").Styled<"web", "feDistantLight", import("react").SVGProps<SVGFEDistantLightElement>, import("../types").BaseObject>;
|
|
138
|
-
feDropShadow: import("../constructors/constructWithOptions").Styled<"web", "feDropShadow", import("react").SVGProps<SVGFEDropShadowElement>, import("../types").BaseObject>;
|
|
139
|
-
feFlood: import("../constructors/constructWithOptions").Styled<"web", "feFlood", import("react").SVGProps<SVGFEFloodElement>, import("../types").BaseObject>;
|
|
140
|
-
feFuncA: import("../constructors/constructWithOptions").Styled<"web", "feFuncA", import("react").SVGProps<SVGFEFuncAElement>, import("../types").BaseObject>;
|
|
141
|
-
feFuncB: import("../constructors/constructWithOptions").Styled<"web", "feFuncB", import("react").SVGProps<SVGFEFuncBElement>, import("../types").BaseObject>;
|
|
142
|
-
feFuncG: import("../constructors/constructWithOptions").Styled<"web", "feFuncG", import("react").SVGProps<SVGFEFuncGElement>, import("../types").BaseObject>;
|
|
143
|
-
feFuncR: import("../constructors/constructWithOptions").Styled<"web", "feFuncR", import("react").SVGProps<SVGFEFuncRElement>, import("../types").BaseObject>;
|
|
144
|
-
feGaussianBlur: import("../constructors/constructWithOptions").Styled<"web", "feGaussianBlur", import("react").SVGProps<SVGFEGaussianBlurElement>, import("../types").BaseObject>;
|
|
145
|
-
feImage: import("../constructors/constructWithOptions").Styled<"web", "feImage", import("react").SVGProps<SVGFEImageElement>, import("../types").BaseObject>;
|
|
146
|
-
feMerge: import("../constructors/constructWithOptions").Styled<"web", "feMerge", import("react").SVGProps<SVGFEMergeElement>, import("../types").BaseObject>;
|
|
147
|
-
feMergeNode: import("../constructors/constructWithOptions").Styled<"web", "feMergeNode", import("react").SVGProps<SVGFEMergeNodeElement>, import("../types").BaseObject>;
|
|
148
|
-
feMorphology: import("../constructors/constructWithOptions").Styled<"web", "feMorphology", import("react").SVGProps<SVGFEMorphologyElement>, import("../types").BaseObject>;
|
|
149
|
-
feOffset: import("../constructors/constructWithOptions").Styled<"web", "feOffset", import("react").SVGProps<SVGFEOffsetElement>, import("../types").BaseObject>;
|
|
150
|
-
fePointLight: import("../constructors/constructWithOptions").Styled<"web", "fePointLight", import("react").SVGProps<SVGFEPointLightElement>, import("../types").BaseObject>;
|
|
151
|
-
feSpecularLighting: import("../constructors/constructWithOptions").Styled<"web", "feSpecularLighting", import("react").SVGProps<SVGFESpecularLightingElement>, import("../types").BaseObject>;
|
|
152
|
-
feSpotLight: import("../constructors/constructWithOptions").Styled<"web", "feSpotLight", import("react").SVGProps<SVGFESpotLightElement>, import("../types").BaseObject>;
|
|
153
|
-
feTile: import("../constructors/constructWithOptions").Styled<"web", "feTile", import("react").SVGProps<SVGFETileElement>, import("../types").BaseObject>;
|
|
154
|
-
feTurbulence: import("../constructors/constructWithOptions").Styled<"web", "feTurbulence", import("react").SVGProps<SVGFETurbulenceElement>, import("../types").BaseObject>;
|
|
155
|
-
filter: import("../constructors/constructWithOptions").Styled<"web", "filter", import("react").SVGProps<SVGFilterElement>, import("../types").BaseObject>;
|
|
156
119
|
foreignObject: import("../constructors/constructWithOptions").Styled<"web", "foreignObject", import("react").SVGProps<SVGForeignObjectElement>, import("../types").BaseObject>;
|
|
157
120
|
g: import("../constructors/constructWithOptions").Styled<"web", "g", import("react").SVGProps<SVGGElement>, import("../types").BaseObject>;
|
|
158
121
|
image: import("../constructors/constructWithOptions").Styled<"web", "image", import("react").SVGProps<SVGImageElement>, import("../types").BaseObject>;
|
|
@@ -160,8 +123,6 @@ export declare const resetStyled: (isServer?: boolean) => (<Target extends impor
|
|
|
160
123
|
linearGradient: import("../constructors/constructWithOptions").Styled<"web", "linearGradient", import("react").SVGProps<SVGLinearGradientElement>, import("../types").BaseObject>;
|
|
161
124
|
marker: import("../constructors/constructWithOptions").Styled<"web", "marker", import("react").SVGProps<SVGMarkerElement>, import("../types").BaseObject>;
|
|
162
125
|
mask: import("../constructors/constructWithOptions").Styled<"web", "mask", import("react").SVGProps<SVGMaskElement>, import("../types").BaseObject>;
|
|
163
|
-
metadata: import("../constructors/constructWithOptions").Styled<"web", "metadata", import("react").SVGProps<SVGMetadataElement>, import("../types").BaseObject>;
|
|
164
|
-
mpath: import("../constructors/constructWithOptions").Styled<"web", "mpath", import("react").SVGProps<SVGElement>, import("../types").BaseObject>;
|
|
165
126
|
path: import("../constructors/constructWithOptions").Styled<"web", "path", import("react").SVGProps<SVGPathElement>, import("../types").BaseObject>;
|
|
166
127
|
pattern: import("../constructors/constructWithOptions").Styled<"web", "pattern", import("react").SVGProps<SVGPatternElement>, import("../types").BaseObject>;
|
|
167
128
|
polygon: import("../constructors/constructWithOptions").Styled<"web", "polygon", import("react").SVGProps<SVGPolygonElement>, import("../types").BaseObject>;
|
|
@@ -169,13 +130,9 @@ export declare const resetStyled: (isServer?: boolean) => (<Target extends impor
|
|
|
169
130
|
radialGradient: import("../constructors/constructWithOptions").Styled<"web", "radialGradient", import("react").SVGProps<SVGRadialGradientElement>, import("../types").BaseObject>;
|
|
170
131
|
rect: import("../constructors/constructWithOptions").Styled<"web", "rect", import("react").SVGProps<SVGRectElement>, import("../types").BaseObject>;
|
|
171
132
|
stop: import("../constructors/constructWithOptions").Styled<"web", "stop", import("react").SVGProps<SVGStopElement>, import("../types").BaseObject>;
|
|
172
|
-
|
|
173
|
-
symbol: import("../constructors/constructWithOptions").Styled<"web", "symbol", import("react").SVGProps<SVGSymbolElement>, import("../types").BaseObject>;
|
|
133
|
+
svg: import("../constructors/constructWithOptions").Styled<"web", "svg", import("react").SVGProps<SVGSVGElement>, import("../types").BaseObject>;
|
|
174
134
|
text: import("../constructors/constructWithOptions").Styled<"web", "text", import("react").SVGTextElementAttributes<SVGTextElement>, import("../types").BaseObject>;
|
|
175
|
-
textPath: import("../constructors/constructWithOptions").Styled<"web", "textPath", import("react").SVGProps<SVGTextPathElement>, import("../types").BaseObject>;
|
|
176
135
|
tspan: import("../constructors/constructWithOptions").Styled<"web", "tspan", import("react").SVGProps<SVGTSpanElement>, import("../types").BaseObject>;
|
|
177
|
-
use: import("../constructors/constructWithOptions").Styled<"web", "use", import("react").SVGProps<SVGUseElement>, import("../types").BaseObject>;
|
|
178
|
-
view: import("../constructors/constructWithOptions").Styled<"web", "view", import("react").SVGProps<SVGViewElement>, import("../types").BaseObject>;
|
|
179
136
|
};
|
|
180
137
|
export declare const rehydrateTestStyles: () => void;
|
|
181
138
|
export declare const stripComments: (str: string) => string;
|
package/dist/types.d.ts
CHANGED
|
@@ -3,10 +3,11 @@ import React from 'react';
|
|
|
3
3
|
import ComponentStyle from './models/ComponentStyle';
|
|
4
4
|
import { DefaultTheme } from './models/ThemeProvider';
|
|
5
5
|
import createWarnTooManyClasses from './utils/createWarnTooManyClasses';
|
|
6
|
-
|
|
6
|
+
import type { SupportedHTMLElements } from './utils/domElements';
|
|
7
|
+
export { CSS, DefaultTheme, SupportedHTMLElements };
|
|
7
8
|
interface ExoticComponentWithDisplayName<P extends object = {}> extends React.ExoticComponent<P> {
|
|
8
|
-
defaultProps?: Partial<P
|
|
9
|
-
displayName?: string;
|
|
9
|
+
defaultProps?: Partial<P> | undefined;
|
|
10
|
+
displayName?: string | undefined;
|
|
10
11
|
}
|
|
11
12
|
/**
|
|
12
13
|
* Use this type to disambiguate between a styled-component instance
|
|
@@ -24,20 +25,33 @@ type FastOmit<T extends object, U extends string | number | symbol> = {
|
|
|
24
25
|
};
|
|
25
26
|
export type Runtime = 'web' | 'native';
|
|
26
27
|
export type AnyComponent<P extends object = any> = ExoticComponentWithDisplayName<P> | React.ComponentType<P>;
|
|
27
|
-
export type KnownTarget =
|
|
28
|
+
export type KnownTarget = SupportedHTMLElements | AnyComponent;
|
|
28
29
|
export type WebTarget = string | KnownTarget;
|
|
29
30
|
export type NativeTarget = AnyComponent;
|
|
30
31
|
export type StyledTarget<R extends Runtime> = R extends 'web' ? WebTarget : NativeTarget;
|
|
31
32
|
export interface StyledOptions<R extends Runtime, Props extends object> {
|
|
32
|
-
attrs?: Attrs<Props>[];
|
|
33
|
-
componentId?: R extends 'web' ? string : never;
|
|
34
|
-
displayName?: string;
|
|
35
|
-
parentComponentId?: R extends 'web' ? string : never;
|
|
36
|
-
shouldForwardProp?: ShouldForwardProp<R
|
|
33
|
+
attrs?: Attrs<Props>[] | undefined;
|
|
34
|
+
componentId?: (R extends 'web' ? string : never) | undefined;
|
|
35
|
+
displayName?: string | undefined;
|
|
36
|
+
parentComponentId?: (R extends 'web' ? string : never) | undefined;
|
|
37
|
+
shouldForwardProp?: ShouldForwardProp<R> | undefined;
|
|
37
38
|
}
|
|
38
39
|
export type Dict<T = any> = {
|
|
39
40
|
[key: string]: T;
|
|
40
41
|
};
|
|
42
|
+
/**
|
|
43
|
+
* This type is intended for when data attributes are composed via
|
|
44
|
+
* the `.attrs` API:
|
|
45
|
+
*
|
|
46
|
+
* ```tsx
|
|
47
|
+
* styled.div.attrs<DataAttributes>({ 'data-testid': 'foo' })``
|
|
48
|
+
* ```
|
|
49
|
+
*
|
|
50
|
+
* Would love to figure out how to support this natively without having to
|
|
51
|
+
* manually compose the type, but haven't figured out a way to do so yet that
|
|
52
|
+
* doesn't cause specificity loss (see `test/types.tsx` if you attempt to embed
|
|
53
|
+
* `DataAttributes` directly in the `Attrs<>` type.)
|
|
54
|
+
*/
|
|
41
55
|
export type DataAttributes = {
|
|
42
56
|
[key: `data-${string}`]: any;
|
|
43
57
|
};
|
|
@@ -52,9 +66,9 @@ export type ExecutionProps = {
|
|
|
52
66
|
* </StyledButton>
|
|
53
67
|
* ```
|
|
54
68
|
*/
|
|
55
|
-
as?: KnownTarget;
|
|
56
|
-
forwardedAs?: KnownTarget;
|
|
57
|
-
theme?: DefaultTheme;
|
|
69
|
+
as?: KnownTarget | undefined;
|
|
70
|
+
forwardedAs?: KnownTarget | undefined;
|
|
71
|
+
theme?: DefaultTheme | undefined;
|
|
58
72
|
};
|
|
59
73
|
/**
|
|
60
74
|
* ExecutionProps but with `theme` required.
|
|
@@ -82,7 +96,7 @@ export interface Flattener<Props extends object> {
|
|
|
82
96
|
(chunks: Interpolation<Props>[], executionContext: object | null | undefined, styleSheet: StyleSheet | null | undefined): Interpolation<Props>[];
|
|
83
97
|
}
|
|
84
98
|
export interface Stringifier {
|
|
85
|
-
(css: string, selector?: string, prefix?: string, componentId?: string): string[];
|
|
99
|
+
(css: string, selector?: string | undefined, prefix?: string | undefined, componentId?: string | undefined): string[];
|
|
86
100
|
hash: string;
|
|
87
101
|
}
|
|
88
102
|
export interface ShouldForwardProp<R extends Runtime> {
|
|
@@ -91,7 +105,7 @@ export interface ShouldForwardProp<R extends Runtime> {
|
|
|
91
105
|
export interface CommonStatics<R extends Runtime, Props extends object> {
|
|
92
106
|
attrs: Attrs<Props>[];
|
|
93
107
|
target: StyledTarget<R>;
|
|
94
|
-
shouldForwardProp?: ShouldForwardProp<R
|
|
108
|
+
shouldForwardProp?: ShouldForwardProp<R> | undefined;
|
|
95
109
|
}
|
|
96
110
|
export interface IStyledStatics<R extends Runtime, OuterProps extends object> extends CommonStatics<R, OuterProps> {
|
|
97
111
|
componentStyle: R extends 'web' ? ComponentStyle : never;
|
|
@@ -99,12 +113,12 @@ export interface IStyledStatics<R extends Runtime, OuterProps extends object> ex
|
|
|
99
113
|
inlineStyle: R extends 'native' ? InstanceType<IInlineStyleConstructor<OuterProps>> : never;
|
|
100
114
|
target: StyledTarget<R>;
|
|
101
115
|
styledComponentId: R extends 'web' ? string : never;
|
|
102
|
-
warnTooManyClasses?: R extends 'web' ? ReturnType<typeof createWarnTooManyClasses> : never;
|
|
116
|
+
warnTooManyClasses?: (R extends 'web' ? ReturnType<typeof createWarnTooManyClasses> : never) | undefined;
|
|
103
117
|
}
|
|
104
118
|
/**
|
|
105
119
|
* Used by PolymorphicComponent to define prop override cascading order.
|
|
106
120
|
*/
|
|
107
|
-
export type PolymorphicComponentProps<R extends Runtime, BaseProps extends object, AsTarget extends StyledTarget<R> | void, ForwardedAsTarget extends StyledTarget<R> | void, AsTargetProps extends object = AsTarget extends KnownTarget ? React.ComponentPropsWithRef<AsTarget> : {}, ForwardedAsTargetProps extends object = ForwardedAsTarget extends KnownTarget ? React.
|
|
121
|
+
export type PolymorphicComponentProps<R extends Runtime, BaseProps extends object, AsTarget extends StyledTarget<R> | void, ForwardedAsTarget extends StyledTarget<R> | void, AsTargetProps extends object = AsTarget extends KnownTarget ? React.ComponentPropsWithRef<AsTarget> : {}, ForwardedAsTargetProps extends object = ForwardedAsTarget extends KnownTarget ? React.ComponentPropsWithRef<ForwardedAsTarget> : {}> = NoInfer<FastOmit<Substitute<BaseProps, Substitute<ForwardedAsTargetProps, AsTargetProps>>, keyof ExecutionProps>> & FastOmit<ExecutionProps, 'as' | 'forwardedAs'> & {
|
|
108
122
|
as?: AsTarget;
|
|
109
123
|
forwardedAs?: ForwardedAsTarget;
|
|
110
124
|
};
|
|
@@ -119,7 +133,7 @@ export interface PolymorphicComponent<R extends Runtime, BaseProps extends objec
|
|
|
119
133
|
<AsTarget extends StyledTarget<R> | void = void, ForwardedAsTarget extends StyledTarget<R> | void = void>(props: PolymorphicComponentProps<R, BaseProps, AsTarget, ForwardedAsTarget>): JSX.Element;
|
|
120
134
|
}
|
|
121
135
|
export interface IStyledComponent<R extends Runtime, Props extends object = BaseObject> extends PolymorphicComponent<R, Props>, IStyledStatics<R, Props>, StyledComponentBrand {
|
|
122
|
-
defaultProps?: ExecutionProps & Partial<Props
|
|
136
|
+
defaultProps?: (ExecutionProps & Partial<Props>) | undefined;
|
|
123
137
|
toString: () => string;
|
|
124
138
|
}
|
|
125
139
|
export interface IStyledComponentFactory<R extends Runtime, Target extends StyledTarget<R>, OuterProps extends object, OuterStatics extends object = BaseObject> {
|
|
@@ -132,8 +146,16 @@ export interface IInlineStyle<Props extends object> {
|
|
|
132
146
|
rules: RuleSet<Props>;
|
|
133
147
|
generateStyleObject(executionContext: ExecutionContext & Props): object;
|
|
134
148
|
}
|
|
135
|
-
export type
|
|
136
|
-
|
|
149
|
+
export type CSSProperties = CSS.Properties<number | (string & {})>;
|
|
150
|
+
export type CSSPseudos = {
|
|
151
|
+
[K in CSS.Pseudos]?: CSSObject;
|
|
152
|
+
};
|
|
153
|
+
export type CSSKeyframes = object & {
|
|
154
|
+
[key: string]: CSSObject;
|
|
155
|
+
};
|
|
156
|
+
export type CSSObject<Props extends object = BaseObject> = StyledObject<Props>;
|
|
157
|
+
export type StyledObject<Props extends object = BaseObject> = CSSProperties & CSSPseudos & {
|
|
158
|
+
[key: string]: StyledObject<Props> | string | number | StyleFunction<Props> | StyledObject<Props> | RuleSet<any> | undefined;
|
|
137
159
|
};
|
|
138
160
|
/**
|
|
139
161
|
* The `css` prop is not declared by default in the types as it would cause `css` to be present
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const checkDynamicCreation: (displayName: string, componentId?: string) => void;
|
|
1
|
+
export declare const checkDynamicCreation: (displayName: string, componentId?: string | undefined) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { DefaultTheme, ExecutionProps } from '../types';
|
|
2
|
-
export default function determineTheme(props: ExecutionProps, providedTheme?: DefaultTheme, defaultProps?: {
|
|
3
|
-
theme?: DefaultTheme;
|
|
2
|
+
export default function determineTheme(props: ExecutionProps, providedTheme?: DefaultTheme | undefined, defaultProps?: {
|
|
3
|
+
theme?: DefaultTheme | undefined;
|
|
4
4
|
}): DefaultTheme | undefined;
|
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
declare const
|
|
1
|
+
declare const elements: readonly ["a", "abbr", "address", "area", "article", "aside", "audio", "b", "base", "bdi", "bdo", "big", "blockquote", "body", "br", "button", "canvas", "caption", "cite", "code", "col", "colgroup", "data", "datalist", "dd", "del", "details", "dfn", "dialog", "div", "dl", "dt", "em", "embed", "fieldset", "figcaption", "figure", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "header", "hgroup", "hr", "html", "i", "iframe", "img", "input", "ins", "kbd", "keygen", "label", "legend", "li", "link", "main", "map", "mark", "menu", "menuitem", "meta", "meter", "nav", "noscript", "object", "ol", "optgroup", "option", "output", "p", "param", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "script", "section", "select", "small", "source", "span", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "u", "ul", "use", "var", "video", "wbr", "circle", "clipPath", "defs", "ellipse", "foreignObject", "g", "image", "line", "linearGradient", "marker", "mask", "path", "pattern", "polygon", "polyline", "radialGradient", "rect", "stop", "svg", "text", "tspan"];
|
|
2
|
+
declare const _default: Set<"object" | "big" | "link" | "small" | "sub" | "sup" | "a" | "abbr" | "address" | "area" | "article" | "aside" | "audio" | "b" | "base" | "bdi" | "bdo" | "blockquote" | "body" | "br" | "button" | "canvas" | "caption" | "cite" | "code" | "col" | "colgroup" | "data" | "datalist" | "dd" | "del" | "details" | "dfn" | "dialog" | "div" | "dl" | "dt" | "em" | "embed" | "fieldset" | "figcaption" | "figure" | "footer" | "form" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "header" | "hgroup" | "hr" | "html" | "i" | "iframe" | "img" | "input" | "ins" | "kbd" | "keygen" | "label" | "legend" | "li" | "main" | "map" | "mark" | "menu" | "menuitem" | "meta" | "meter" | "nav" | "noscript" | "ol" | "optgroup" | "option" | "output" | "p" | "param" | "picture" | "pre" | "progress" | "q" | "rp" | "rt" | "ruby" | "s" | "samp" | "script" | "section" | "select" | "source" | "span" | "strong" | "style" | "summary" | "table" | "tbody" | "td" | "textarea" | "tfoot" | "th" | "thead" | "time" | "tr" | "track" | "u" | "ul" | "var" | "video" | "wbr" | "svg" | "circle" | "clipPath" | "defs" | "ellipse" | "foreignObject" | "g" | "image" | "line" | "linearGradient" | "marker" | "mask" | "path" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "stop" | "text" | "tspan" | "use">;
|
|
2
3
|
export default _default;
|
|
4
|
+
export type SupportedHTMLElements = (typeof elements)[number];
|
package/dist/utils/flatten.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import StyleSheet from '../sheet';
|
|
2
2
|
import { Dict, ExecutionContext, Interpolation, RuleSet, Stringifier } from '../types';
|
|
3
3
|
export declare const objToCssArray: (obj: Dict<any>) => string[];
|
|
4
|
-
export default function flatten<Props extends object>(chunk: Interpolation<object>, executionContext?: ExecutionContext & Props, styleSheet?: StyleSheet, stylisInstance?: Stringifier): RuleSet<Props>;
|
|
4
|
+
export default function flatten<Props extends object>(chunk: Interpolation<object>, executionContext?: (ExecutionContext & Props) | undefined, styleSheet?: StyleSheet | undefined, stylisInstance?: Stringifier | undefined): RuleSet<Props>;
|
package/dist/utils/hoist.d.ts
CHANGED
|
@@ -47,5 +47,5 @@ type ExcludeList = {
|
|
|
47
47
|
type NonReactStatics<S extends OmniComponent, C extends ExcludeList = {}> = {
|
|
48
48
|
[key in Exclude<keyof S, S extends React.MemoExoticComponent<any> ? keyof typeof MEMO_STATICS | keyof C : S extends React.ForwardRefExoticComponent<any> ? keyof typeof FORWARD_REF_STATICS | keyof C : keyof typeof REACT_STATICS | keyof typeof KNOWN_STATICS | keyof C>]: S[key];
|
|
49
49
|
};
|
|
50
|
-
export default function hoistNonReactStatics<T extends OmniComponent, S extends OmniComponent, C extends ExcludeList = {}>(targetComponent: T, sourceComponent: S, excludelist?: C): T & NonReactStatics<S, C>;
|
|
50
|
+
export default function hoistNonReactStatics<T extends OmniComponent, S extends OmniComponent, C extends ExcludeList = {}>(targetComponent: T, sourceComponent: S, excludelist?: C | undefined): T & NonReactStatics<S, C>;
|
|
51
51
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Convenience function for joining strings to form className chains
|
|
3
3
|
*/
|
|
4
|
-
export declare function joinStrings(a?: string, b?: string): string;
|
|
5
|
-
export declare function joinStringArray(arr: string[], sep?: string): string;
|
|
4
|
+
export declare function joinStrings(a?: string | undefined, b?: string | undefined): string;
|
|
5
|
+
export declare function joinStringArray(arr: string[], sep?: string | undefined): string;
|
package/dist/utils/stylis.d.ts
CHANGED
|
@@ -2,9 +2,9 @@ import * as stylis from 'stylis';
|
|
|
2
2
|
import { Stringifier } from '../types';
|
|
3
3
|
export type ICreateStylisInstance = {
|
|
4
4
|
options?: {
|
|
5
|
-
namespace?: string;
|
|
6
|
-
prefix?: boolean;
|
|
7
|
-
};
|
|
8
|
-
plugins?: stylis.Middleware[];
|
|
5
|
+
namespace?: string | undefined;
|
|
6
|
+
prefix?: boolean | undefined;
|
|
7
|
+
} | undefined;
|
|
8
|
+
plugins?: stylis.Middleware[] | undefined;
|
|
9
9
|
};
|
|
10
10
|
export default function createStylisInstance({ options, plugins, }?: ICreateStylisInstance): Stringifier;
|
package/native/dist/base.d.ts
CHANGED
|
@@ -9,4 +9,4 @@ import ThemeProvider, { ThemeConsumer, ThemeContext, useTheme } from './models/T
|
|
|
9
9
|
import isStyledComponent from './utils/isStyledComponent';
|
|
10
10
|
export * from './secretInternals';
|
|
11
11
|
export { Attrs, DefaultTheme, ShouldForwardProp } from './types';
|
|
12
|
-
export {
|
|
12
|
+
export { IStyleSheetContext, IStyleSheetManager, IStylisContext, ServerStyleSheet, StyleSheetConsumer, StyleSheetContext, StyleSheetManager, ThemeConsumer, ThemeContext, ThemeProvider, createGlobalStyle, css, isStyledComponent, keyframes, useTheme, SC_VERSION as version, withTheme, };
|
|
@@ -10,7 +10,7 @@ type AttrsTarget<R extends Runtime, T extends Attrs<any>, FallbackTarget extends
|
|
|
10
10
|
as: infer RuntimeTarget;
|
|
11
11
|
} ? RuntimeTarget extends KnownTarget ? RuntimeTarget : FallbackTarget : FallbackTarget;
|
|
12
12
|
export interface Styled<R extends Runtime, Target extends StyledTarget<R>, OuterProps extends object, OuterStatics extends object = BaseObject> {
|
|
13
|
-
<Props extends object = BaseObject, Statics extends object = BaseObject>(initialStyles: Styles<Substitute<OuterProps, NoInfer<Props>>>, ...interpolations: Interpolation<Substitute<OuterProps, NoInfer<Props>>>[]): IStyledComponent<R, Substitute<OuterProps, Props>> & OuterStatics & Statics;
|
|
13
|
+
<Props extends object = BaseObject, Statics extends object = BaseObject>(initialStyles: Styles<Substitute<OuterProps, NoInfer<Props>>>, ...interpolations: Interpolation<Substitute<OuterProps, NoInfer<Props>>>[]): IStyledComponent<R, Substitute<OuterProps, Props>> & OuterStatics & Statics & (Target extends string ? {} : Target);
|
|
14
14
|
attrs: <Props extends object = BaseObject, PrivateMergedProps extends object = Substitute<OuterProps, Props>, PrivateAttrsArg extends Attrs<PrivateMergedProps> = Attrs<PrivateMergedProps>, PrivateResolvedTarget extends StyledTarget<R> = AttrsTarget<R, PrivateAttrsArg, Target>>(attrs: PrivateAttrsArg) => Styled<R, PrivateResolvedTarget, PrivateResolvedTarget extends KnownTarget ? Substitute<Substitute<OuterProps, React.ComponentPropsWithRef<PrivateResolvedTarget>>, Props> : PrivateMergedProps, OuterStatics>;
|
|
15
15
|
withConfig: (config: StyledOptions<R, OuterProps>) => Styled<R, Target, OuterProps, OuterStatics>;
|
|
16
16
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { WebTarget } from '../types';
|
|
2
2
|
import { Styled } from './constructWithOptions';
|
|
3
3
|
declare const styled: (<Target extends WebTarget>(tag: Target) => Styled<"web", Target, Target extends import("../types").KnownTarget ? import("react").ComponentPropsWithRef<Target> : import("../types").BaseObject, import("../types").BaseObject>) & {
|
|
4
|
+
object: Styled<"web", "object", import("react").DetailedHTMLProps<import("react").ObjectHTMLAttributes<HTMLObjectElement>, HTMLObjectElement>, import("../types").BaseObject>;
|
|
4
5
|
a: Styled<"web", "a", import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, import("../types").BaseObject>;
|
|
5
6
|
abbr: Styled<"web", "abbr", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
6
7
|
address: Styled<"web", "address", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
@@ -46,7 +47,6 @@ declare const styled: (<Target extends WebTarget>(tag: Target) => Styled<"web",
|
|
|
46
47
|
h4: Styled<"web", "h4", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, import("../types").BaseObject>;
|
|
47
48
|
h5: Styled<"web", "h5", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, import("../types").BaseObject>;
|
|
48
49
|
h6: Styled<"web", "h6", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, import("../types").BaseObject>;
|
|
49
|
-
head: Styled<"web", "head", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadElement>, HTMLHeadElement>, import("../types").BaseObject>;
|
|
50
50
|
header: Styled<"web", "header", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
51
51
|
hgroup: Styled<"web", "hgroup", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
52
52
|
hr: Styled<"web", "hr", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHRElement>, HTMLHRElement>, import("../types").BaseObject>;
|
|
@@ -70,9 +70,7 @@ declare const styled: (<Target extends WebTarget>(tag: Target) => Styled<"web",
|
|
|
70
70
|
meta: Styled<"web", "meta", import("react").DetailedHTMLProps<import("react").MetaHTMLAttributes<HTMLMetaElement>, HTMLMetaElement>, import("../types").BaseObject>;
|
|
71
71
|
meter: Styled<"web", "meter", import("react").DetailedHTMLProps<import("react").MeterHTMLAttributes<HTMLMeterElement>, HTMLMeterElement>, import("../types").BaseObject>;
|
|
72
72
|
nav: Styled<"web", "nav", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
73
|
-
noindex: Styled<"web", "noindex", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
74
73
|
noscript: Styled<"web", "noscript", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
75
|
-
object: Styled<"web", "object", import("react").DetailedHTMLProps<import("react").ObjectHTMLAttributes<HTMLObjectElement>, HTMLObjectElement>, import("../types").BaseObject>;
|
|
76
74
|
ol: Styled<"web", "ol", import("react").DetailedHTMLProps<import("react").OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>, import("../types").BaseObject>;
|
|
77
75
|
optgroup: Styled<"web", "optgroup", import("react").DetailedHTMLProps<import("react").OptgroupHTMLAttributes<HTMLOptGroupElement>, HTMLOptGroupElement>, import("../types").BaseObject>;
|
|
78
76
|
option: Styled<"web", "option", import("react").DetailedHTMLProps<import("react").OptionHTMLAttributes<HTMLOptionElement>, HTMLOptionElement>, import("../types").BaseObject>;
|
|
@@ -88,7 +86,6 @@ declare const styled: (<Target extends WebTarget>(tag: Target) => Styled<"web",
|
|
|
88
86
|
ruby: Styled<"web", "ruby", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
89
87
|
s: Styled<"web", "s", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
90
88
|
samp: Styled<"web", "samp", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
91
|
-
slot: Styled<"web", "slot", import("react").DetailedHTMLProps<import("react").SlotHTMLAttributes<HTMLSlotElement>, HTMLSlotElement>, import("../types").BaseObject>;
|
|
92
89
|
script: Styled<"web", "script", import("react").DetailedHTMLProps<import("react").ScriptHTMLAttributes<HTMLScriptElement>, HTMLScriptElement>, import("../types").BaseObject>;
|
|
93
90
|
section: Styled<"web", "section", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
94
91
|
select: Styled<"web", "select", import("react").DetailedHTMLProps<import("react").SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>, import("../types").BaseObject>;
|
|
@@ -101,7 +98,6 @@ declare const styled: (<Target extends WebTarget>(tag: Target) => Styled<"web",
|
|
|
101
98
|
summary: Styled<"web", "summary", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
102
99
|
sup: Styled<"web", "sup", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
103
100
|
table: Styled<"web", "table", import("react").DetailedHTMLProps<import("react").TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>, import("../types").BaseObject>;
|
|
104
|
-
template: Styled<"web", "template", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTemplateElement>, HTMLTemplateElement>, import("../types").BaseObject>;
|
|
105
101
|
tbody: Styled<"web", "tbody", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, import("../types").BaseObject>;
|
|
106
102
|
td: Styled<"web", "td", import("react").DetailedHTMLProps<import("react").TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>, import("../types").BaseObject>;
|
|
107
103
|
textarea: Styled<"web", "textarea", import("react").DetailedHTMLProps<import("react").TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, import("../types").BaseObject>;
|
|
@@ -109,50 +105,18 @@ declare const styled: (<Target extends WebTarget>(tag: Target) => Styled<"web",
|
|
|
109
105
|
th: Styled<"web", "th", import("react").DetailedHTMLProps<import("react").ThHTMLAttributes<HTMLTableHeaderCellElement>, HTMLTableHeaderCellElement>, import("../types").BaseObject>;
|
|
110
106
|
thead: Styled<"web", "thead", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, import("../types").BaseObject>;
|
|
111
107
|
time: Styled<"web", "time", import("react").DetailedHTMLProps<import("react").TimeHTMLAttributes<HTMLTimeElement>, HTMLTimeElement>, import("../types").BaseObject>;
|
|
112
|
-
title: Styled<"web", "title", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTitleElement>, HTMLTitleElement>, import("../types").BaseObject>;
|
|
113
108
|
tr: Styled<"web", "tr", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>, import("../types").BaseObject>;
|
|
114
109
|
track: Styled<"web", "track", import("react").DetailedHTMLProps<import("react").TrackHTMLAttributes<HTMLTrackElement>, HTMLTrackElement>, import("../types").BaseObject>;
|
|
115
110
|
u: Styled<"web", "u", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
116
111
|
ul: Styled<"web", "ul", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLUListElement>, HTMLUListElement>, import("../types").BaseObject>;
|
|
112
|
+
use: Styled<"web", "use", import("react").SVGProps<SVGUseElement>, import("../types").BaseObject>;
|
|
117
113
|
var: Styled<"web", "var", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
118
114
|
video: Styled<"web", "video", import("react").DetailedHTMLProps<import("react").VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>, import("../types").BaseObject>;
|
|
119
115
|
wbr: Styled<"web", "wbr", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
120
|
-
webview: Styled<"web", "webview", import("react").DetailedHTMLProps<import("react").WebViewHTMLAttributes<HTMLWebViewElement>, HTMLWebViewElement>, import("../types").BaseObject>;
|
|
121
|
-
svg: Styled<"web", "svg", import("react").SVGProps<SVGSVGElement>, import("../types").BaseObject>;
|
|
122
|
-
animate: Styled<"web", "animate", import("react").SVGProps<SVGElement>, import("../types").BaseObject>;
|
|
123
|
-
animateMotion: Styled<"web", "animateMotion", import("react").SVGProps<SVGElement>, import("../types").BaseObject>;
|
|
124
|
-
animateTransform: Styled<"web", "animateTransform", import("react").SVGProps<SVGElement>, import("../types").BaseObject>;
|
|
125
116
|
circle: Styled<"web", "circle", import("react").SVGProps<SVGCircleElement>, import("../types").BaseObject>;
|
|
126
117
|
clipPath: Styled<"web", "clipPath", import("react").SVGProps<SVGClipPathElement>, import("../types").BaseObject>;
|
|
127
118
|
defs: Styled<"web", "defs", import("react").SVGProps<SVGDefsElement>, import("../types").BaseObject>;
|
|
128
|
-
desc: Styled<"web", "desc", import("react").SVGProps<SVGDescElement>, import("../types").BaseObject>;
|
|
129
119
|
ellipse: Styled<"web", "ellipse", import("react").SVGProps<SVGEllipseElement>, import("../types").BaseObject>;
|
|
130
|
-
feBlend: Styled<"web", "feBlend", import("react").SVGProps<SVGFEBlendElement>, import("../types").BaseObject>;
|
|
131
|
-
feColorMatrix: Styled<"web", "feColorMatrix", import("react").SVGProps<SVGFEColorMatrixElement>, import("../types").BaseObject>;
|
|
132
|
-
feComponentTransfer: Styled<"web", "feComponentTransfer", import("react").SVGProps<SVGFEComponentTransferElement>, import("../types").BaseObject>;
|
|
133
|
-
feComposite: Styled<"web", "feComposite", import("react").SVGProps<SVGFECompositeElement>, import("../types").BaseObject>;
|
|
134
|
-
feConvolveMatrix: Styled<"web", "feConvolveMatrix", import("react").SVGProps<SVGFEConvolveMatrixElement>, import("../types").BaseObject>;
|
|
135
|
-
feDiffuseLighting: Styled<"web", "feDiffuseLighting", import("react").SVGProps<SVGFEDiffuseLightingElement>, import("../types").BaseObject>;
|
|
136
|
-
feDisplacementMap: Styled<"web", "feDisplacementMap", import("react").SVGProps<SVGFEDisplacementMapElement>, import("../types").BaseObject>;
|
|
137
|
-
feDistantLight: Styled<"web", "feDistantLight", import("react").SVGProps<SVGFEDistantLightElement>, import("../types").BaseObject>;
|
|
138
|
-
feDropShadow: Styled<"web", "feDropShadow", import("react").SVGProps<SVGFEDropShadowElement>, import("../types").BaseObject>;
|
|
139
|
-
feFlood: Styled<"web", "feFlood", import("react").SVGProps<SVGFEFloodElement>, import("../types").BaseObject>;
|
|
140
|
-
feFuncA: Styled<"web", "feFuncA", import("react").SVGProps<SVGFEFuncAElement>, import("../types").BaseObject>;
|
|
141
|
-
feFuncB: Styled<"web", "feFuncB", import("react").SVGProps<SVGFEFuncBElement>, import("../types").BaseObject>;
|
|
142
|
-
feFuncG: Styled<"web", "feFuncG", import("react").SVGProps<SVGFEFuncGElement>, import("../types").BaseObject>;
|
|
143
|
-
feFuncR: Styled<"web", "feFuncR", import("react").SVGProps<SVGFEFuncRElement>, import("../types").BaseObject>;
|
|
144
|
-
feGaussianBlur: Styled<"web", "feGaussianBlur", import("react").SVGProps<SVGFEGaussianBlurElement>, import("../types").BaseObject>;
|
|
145
|
-
feImage: Styled<"web", "feImage", import("react").SVGProps<SVGFEImageElement>, import("../types").BaseObject>;
|
|
146
|
-
feMerge: Styled<"web", "feMerge", import("react").SVGProps<SVGFEMergeElement>, import("../types").BaseObject>;
|
|
147
|
-
feMergeNode: Styled<"web", "feMergeNode", import("react").SVGProps<SVGFEMergeNodeElement>, import("../types").BaseObject>;
|
|
148
|
-
feMorphology: Styled<"web", "feMorphology", import("react").SVGProps<SVGFEMorphologyElement>, import("../types").BaseObject>;
|
|
149
|
-
feOffset: Styled<"web", "feOffset", import("react").SVGProps<SVGFEOffsetElement>, import("../types").BaseObject>;
|
|
150
|
-
fePointLight: Styled<"web", "fePointLight", import("react").SVGProps<SVGFEPointLightElement>, import("../types").BaseObject>;
|
|
151
|
-
feSpecularLighting: Styled<"web", "feSpecularLighting", import("react").SVGProps<SVGFESpecularLightingElement>, import("../types").BaseObject>;
|
|
152
|
-
feSpotLight: Styled<"web", "feSpotLight", import("react").SVGProps<SVGFESpotLightElement>, import("../types").BaseObject>;
|
|
153
|
-
feTile: Styled<"web", "feTile", import("react").SVGProps<SVGFETileElement>, import("../types").BaseObject>;
|
|
154
|
-
feTurbulence: Styled<"web", "feTurbulence", import("react").SVGProps<SVGFETurbulenceElement>, import("../types").BaseObject>;
|
|
155
|
-
filter: Styled<"web", "filter", import("react").SVGProps<SVGFilterElement>, import("../types").BaseObject>;
|
|
156
120
|
foreignObject: Styled<"web", "foreignObject", import("react").SVGProps<SVGForeignObjectElement>, import("../types").BaseObject>;
|
|
157
121
|
g: Styled<"web", "g", import("react").SVGProps<SVGGElement>, import("../types").BaseObject>;
|
|
158
122
|
image: Styled<"web", "image", import("react").SVGProps<SVGImageElement>, import("../types").BaseObject>;
|
|
@@ -160,8 +124,6 @@ declare const styled: (<Target extends WebTarget>(tag: Target) => Styled<"web",
|
|
|
160
124
|
linearGradient: Styled<"web", "linearGradient", import("react").SVGProps<SVGLinearGradientElement>, import("../types").BaseObject>;
|
|
161
125
|
marker: Styled<"web", "marker", import("react").SVGProps<SVGMarkerElement>, import("../types").BaseObject>;
|
|
162
126
|
mask: Styled<"web", "mask", import("react").SVGProps<SVGMaskElement>, import("../types").BaseObject>;
|
|
163
|
-
metadata: Styled<"web", "metadata", import("react").SVGProps<SVGMetadataElement>, import("../types").BaseObject>;
|
|
164
|
-
mpath: Styled<"web", "mpath", import("react").SVGProps<SVGElement>, import("../types").BaseObject>;
|
|
165
127
|
path: Styled<"web", "path", import("react").SVGProps<SVGPathElement>, import("../types").BaseObject>;
|
|
166
128
|
pattern: Styled<"web", "pattern", import("react").SVGProps<SVGPatternElement>, import("../types").BaseObject>;
|
|
167
129
|
polygon: Styled<"web", "polygon", import("react").SVGProps<SVGPolygonElement>, import("../types").BaseObject>;
|
|
@@ -169,12 +131,8 @@ declare const styled: (<Target extends WebTarget>(tag: Target) => Styled<"web",
|
|
|
169
131
|
radialGradient: Styled<"web", "radialGradient", import("react").SVGProps<SVGRadialGradientElement>, import("../types").BaseObject>;
|
|
170
132
|
rect: Styled<"web", "rect", import("react").SVGProps<SVGRectElement>, import("../types").BaseObject>;
|
|
171
133
|
stop: Styled<"web", "stop", import("react").SVGProps<SVGStopElement>, import("../types").BaseObject>;
|
|
172
|
-
|
|
173
|
-
symbol: Styled<"web", "symbol", import("react").SVGProps<SVGSymbolElement>, import("../types").BaseObject>;
|
|
134
|
+
svg: Styled<"web", "svg", import("react").SVGProps<SVGSVGElement>, import("../types").BaseObject>;
|
|
174
135
|
text: Styled<"web", "text", import("react").SVGTextElementAttributes<SVGTextElement>, import("../types").BaseObject>;
|
|
175
|
-
textPath: Styled<"web", "textPath", import("react").SVGProps<SVGTextPathElement>, import("../types").BaseObject>;
|
|
176
136
|
tspan: Styled<"web", "tspan", import("react").SVGProps<SVGTSpanElement>, import("../types").BaseObject>;
|
|
177
|
-
use: Styled<"web", "use", import("react").SVGProps<SVGUseElement>, import("../types").BaseObject>;
|
|
178
|
-
view: Styled<"web", "view", import("react").SVGProps<SVGViewElement>, import("../types").BaseObject>;
|
|
179
137
|
};
|
|
180
138
|
export default styled;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { AnyComponent, ExecutionProps } from '../types';
|
|
3
|
-
export default function withTheme<T extends AnyComponent>(Component: T): React.ForwardRefExoticComponent<React.PropsWithoutRef<JSX.LibraryManagedAttributes<T, ExecutionProps>> & React.RefAttributes<T>> & { [key in Exclude<keyof T, T extends React.MemoExoticComponent<any> ? "defaultProps" | "displayName" | "$$typeof" | "
|
|
3
|
+
export default function withTheme<T extends AnyComponent>(Component: T): React.ForwardRefExoticComponent<React.PropsWithoutRef<JSX.LibraryManagedAttributes<T, ExecutionProps>> & React.RefAttributes<T>> & { [key in Exclude<keyof T, T extends React.MemoExoticComponent<any> ? "propTypes" | "defaultProps" | "displayName" | "$$typeof" | "type" | "compare" : T extends React.ForwardRefExoticComponent<any> ? "propTypes" | "defaultProps" | "displayName" | "$$typeof" | "render" : "length" | "propTypes" | "contextType" | "contextTypes" | "childContextTypes" | "defaultProps" | "displayName" | "getDerivedStateFromProps" | "getDerivedStateFromError" | "name" | "type" | "prototype" | "arguments" | "caller" | "getDefaultProps" | "mixins" | "callee" | "arity">]: T[key]; };
|
package/native/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import styled from './constructors/styled';
|
|
2
2
|
export * from './base';
|
|
3
|
-
export { CSSProp, DefaultTheme, ExecutionContext, ExecutionProps, IStyledComponent, IStyledComponentFactory, IStyledStatics, PolymorphicComponent, PolymorphicComponentProps, RuleSet, Runtime, StyledObject, StyledOptions, WebTarget, } from './types';
|
|
4
|
-
export { styled
|
|
3
|
+
export { CSSKeyframes, CSSObject, CSSProp, CSSProperties, CSSPseudos, DataAttributes, DefaultTheme, ExecutionContext, ExecutionProps, IStyledComponent, IStyledComponentFactory, IStyledStatics, Interpolation, PolymorphicComponent, PolymorphicComponentProps, RuleSet, Runtime, StyleFunction, StyledObject, StyledOptions, SupportedHTMLElements, WebTarget, } from './types';
|
|
4
|
+
export { styled as default, styled };
|
|
@@ -10,6 +10,6 @@ export default class ComponentStyle {
|
|
|
10
10
|
isStatic: boolean;
|
|
11
11
|
rules: RuleSet<any>;
|
|
12
12
|
staticRulesId: string;
|
|
13
|
-
constructor(rules: RuleSet<any>, componentId: string, baseStyle?: ComponentStyle);
|
|
13
|
+
constructor(rules: RuleSet<any>, componentId: string, baseStyle?: ComponentStyle | undefined);
|
|
14
14
|
generateAndInjectStyles(executionContext: ExecutionContext, styleSheet: StyleSheet, stylis: Stringifier): string;
|
|
15
15
|
}
|
|
@@ -5,7 +5,7 @@ import { ShouldForwardProp, Stringifier } from '../types';
|
|
|
5
5
|
export declare const mainSheet: StyleSheet;
|
|
6
6
|
export declare const mainStylis: Stringifier;
|
|
7
7
|
export type IStyleSheetContext = {
|
|
8
|
-
shouldForwardProp?: ShouldForwardProp<'web'
|
|
8
|
+
shouldForwardProp?: ShouldForwardProp<'web'> | undefined;
|
|
9
9
|
styleSheet: StyleSheet;
|
|
10
10
|
stylis: Stringifier;
|
|
11
11
|
};
|
|
@@ -24,7 +24,7 @@ import React from 'react';
|
|
|
24
24
|
export interface DefaultTheme {
|
|
25
25
|
[key: string]: any;
|
|
26
26
|
}
|
|
27
|
-
type ThemeFn = (outerTheme?: DefaultTheme) => DefaultTheme;
|
|
27
|
+
type ThemeFn = (outerTheme?: DefaultTheme | undefined) => DefaultTheme;
|
|
28
28
|
type ThemeArgument = DefaultTheme | ThemeFn;
|
|
29
29
|
type Props = {
|
|
30
30
|
children?: React.ReactNode;
|
|
@@ -3,7 +3,7 @@ import { Styled } from '../constructors/constructWithOptions';
|
|
|
3
3
|
import css from '../constructors/css';
|
|
4
4
|
import withTheme from '../hoc/withTheme';
|
|
5
5
|
import ThemeProvider, { ThemeConsumer, ThemeContext, useTheme } from '../models/ThemeProvider';
|
|
6
|
-
import { NativeTarget } from '../types';
|
|
6
|
+
import { NativeTarget, RuleSet } from '../types';
|
|
7
7
|
import isStyledComponent from '../utils/isStyledComponent';
|
|
8
8
|
declare const styled: (<Target extends NativeTarget>(tag: Target) => Styled<"native", Target, Target extends import("../types").KnownTarget ? React.ComponentPropsWithRef<Target> : import("../types").BaseObject, import("../types").BaseObject>) & {
|
|
9
9
|
ActivityIndicator: Styled<"native", typeof import("react-native").ActivityIndicator, import("react-native").ActivityIndicatorProps, import("../types").BaseObject>;
|
|
@@ -31,6 +31,6 @@ declare const styled: (<Target extends NativeTarget>(tag: Target) => Styled<"nat
|
|
|
31
31
|
View: Styled<"native", typeof import("react-native").View, import("react-native").ViewProps, import("../types").BaseObject>;
|
|
32
32
|
VirtualizedList: Styled<"native", typeof import("react-native").VirtualizedList, import("react-native").VirtualizedListProps<unknown>, import("../types").BaseObject>;
|
|
33
33
|
};
|
|
34
|
-
|
|
35
|
-
export {
|
|
36
|
-
export {
|
|
34
|
+
declare const toStyleSheet: (rules: RuleSet<object>) => import("css-to-react-native").Style;
|
|
35
|
+
export { CSSKeyframes, CSSObject, CSSProperties, CSSPseudos, DefaultTheme, ExecutionContext, ExecutionProps, IStyledComponent, IStyledComponentFactory, IStyledStatics, NativeTarget, PolymorphicComponent, PolymorphicComponentProps, Runtime, StyledObject, StyledOptions, } from '../types';
|
|
36
|
+
export { ThemeConsumer, ThemeContext, ThemeProvider, css, styled as default, isStyledComponent, styled, toStyleSheet, useTheme, withTheme, };
|