styled-components 6.0.7 → 6.0.9
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-macro.cjs.js.map +1 -1
- package/dist/styled-components-macro.esm.js.map +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 +25 -9
- 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 -1
- package/native/dist/constructors/constructWithOptions.d.ts +1 -1
- package/native/dist/constructors/styled.d.ts +18 -60
- package/native/dist/hoc/withTheme.d.ts +1 -1
- package/native/dist/index.d.ts +2 -2
- package/native/dist/native/index.d.ts +4 -4
- 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 +18 -60
- package/native/dist/types.d.ts +27 -5
- package/native/dist/utils/domElements.d.ts +3 -1
- package/package.json +3 -2
- package/dist/base.d.ts +0 -12
- package/dist/constants.d.ts +0 -8
- package/dist/constructors/constructWithOptions.d.ts +0 -18
- package/dist/constructors/createGlobalStyle.d.ts +0 -3
- package/dist/constructors/css.d.ts +0 -4
- package/dist/constructors/keyframes.d.ts +0 -3
- package/dist/constructors/styled.d.ts +0 -180
- package/dist/hoc/withTheme.d.ts +0 -3
- package/dist/hoc/withTheme.spec.d.ts +0 -1
- package/dist/index-standalone.d.ts +0 -2
- package/dist/index.d.ts +0 -4
- package/dist/macro/index.d.ts +0 -2
- package/dist/models/ComponentStyle.d.ts +0 -15
- package/dist/models/GlobalStyle.d.ts +0 -11
- package/dist/models/InlineStyle.d.ts +0 -6
- package/dist/models/Keyframes.d.ts +0 -10
- package/dist/models/ServerStyleSheet.d.ts +0 -16
- package/dist/models/StyleSheetManager.d.ts +0 -65
- package/dist/models/StyledComponent.d.ts +0 -3
- package/dist/models/StyledNativeComponent.d.ts +0 -3
- package/dist/models/ThemeProvider.d.ts +0 -47
- package/dist/native/index.d.ts +0 -36
- package/dist/secretInternals.d.ts +0 -5
- package/dist/sheet/GroupIDAllocator.d.ts +0 -4
- package/dist/sheet/GroupedTag.d.ts +0 -11
- package/dist/sheet/Rehydration.d.ts +0 -3
- package/dist/sheet/Sheet.d.ts +0 -38
- package/dist/sheet/Tag.d.ts +0 -54
- package/dist/sheet/dom.d.ts +0 -4
- package/dist/sheet/index.d.ts +0 -1
- package/dist/sheet/types.d.ts +0 -34
- package/dist/test/globals.d.ts +0 -2
- package/dist/test/utils.d.ts +0 -186
- package/dist/test/veryLargeUnionType.d.ts +0 -1
- package/dist/types.d.ts +0 -161
- package/dist/utils/addUnitIfNeeded.d.ts +0 -1
- package/dist/utils/checkDynamicCreation.d.ts +0 -1
- package/dist/utils/createWarnTooManyClasses.d.ts +0 -3
- package/dist/utils/determineTheme.d.ts +0 -4
- package/dist/utils/domElements.d.ts +0 -2
- package/dist/utils/empties.d.ts +0 -3
- package/dist/utils/error.d.ts +0 -5
- package/dist/utils/errors.d.ts +0 -21
- package/dist/utils/escape.d.ts +0 -5
- package/dist/utils/flatten.d.ts +0 -4
- package/dist/utils/generateAlphabeticName.d.ts +0 -1
- package/dist/utils/generateComponentId.d.ts +0 -1
- package/dist/utils/generateDisplayName.d.ts +0 -2
- package/dist/utils/getComponentName.d.ts +0 -2
- package/dist/utils/hash.d.ts +0 -3
- package/dist/utils/hoist.d.ts +0 -51
- package/dist/utils/hyphenateStyleName.d.ts +0 -14
- package/dist/utils/interleave.d.ts +0 -2
- package/dist/utils/isFunction.d.ts +0 -1
- package/dist/utils/isPlainObject.d.ts +0 -1
- package/dist/utils/isStatelessFunction.d.ts +0 -1
- package/dist/utils/isStaticRules.d.ts +0 -2
- package/dist/utils/isStyledComponent.d.ts +0 -2
- package/dist/utils/isTag.d.ts +0 -2
- package/dist/utils/joinStrings.d.ts +0 -5
- package/dist/utils/mixinDeep.d.ts +0 -6
- package/dist/utils/nonce.d.ts +0 -1
- package/dist/utils/setToString.d.ts +0 -17
- package/dist/utils/stylis.d.ts +0 -10
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
export declare const seedNextClassnames: (names: string[]) => string[];
|
|
2
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
|
+
circle: import("../constructors/constructWithOptions").Styled<"web", "circle", import("react").SVGProps<SVGCircleElement>, import("../types").BaseObject>;
|
|
5
|
+
code: import("../constructors/constructWithOptions").Styled<"web", "code", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
6
|
+
form: import("../constructors/constructWithOptions").Styled<"web", "form", import("react").DetailedHTMLProps<import("react").FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>, import("../types").BaseObject>;
|
|
7
|
+
header: import("../constructors/constructWithOptions").Styled<"web", "header", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
8
|
+
label: import("../constructors/constructWithOptions").Styled<"web", "label", import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, import("../types").BaseObject>;
|
|
9
|
+
link: import("../constructors/constructWithOptions").Styled<"web", "link", import("react").DetailedHTMLProps<import("react").LinkHTMLAttributes<HTMLLinkElement>, HTMLLinkElement>, import("../types").BaseObject>;
|
|
10
|
+
map: import("../constructors/constructWithOptions").Styled<"web", "map", import("react").DetailedHTMLProps<import("react").MapHTMLAttributes<HTMLMapElement>, HTMLMapElement>, import("../types").BaseObject>;
|
|
11
|
+
menu: import("../constructors/constructWithOptions").Styled<"web", "menu", import("react").DetailedHTMLProps<import("react").MenuHTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
12
|
+
path: import("../constructors/constructWithOptions").Styled<"web", "path", import("react").SVGProps<SVGPathElement>, import("../types").BaseObject>;
|
|
13
|
+
select: import("../constructors/constructWithOptions").Styled<"web", "select", import("react").DetailedHTMLProps<import("react").SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>, import("../types").BaseObject>;
|
|
14
|
+
stop: import("../constructors/constructWithOptions").Styled<"web", "stop", import("react").SVGProps<SVGStopElement>, import("../types").BaseObject>;
|
|
15
|
+
style: import("../constructors/constructWithOptions").Styled<"web", "style", import("react").DetailedHTMLProps<import("react").StyleHTMLAttributes<HTMLStyleElement>, HTMLStyleElement>, import("../types").BaseObject>;
|
|
16
|
+
th: import("../constructors/constructWithOptions").Styled<"web", "th", import("react").DetailedHTMLProps<import("react").ThHTMLAttributes<HTMLTableHeaderCellElement>, HTMLTableHeaderCellElement>, import("../types").BaseObject>;
|
|
17
|
+
time: import("../constructors/constructWithOptions").Styled<"web", "time", import("react").DetailedHTMLProps<import("react").TimeHTMLAttributes<HTMLTimeElement>, HTMLTimeElement>, import("../types").BaseObject>;
|
|
18
|
+
video: import("../constructors/constructWithOptions").Styled<"web", "video", import("react").DetailedHTMLProps<import("react").VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>, import("../types").BaseObject>;
|
|
3
19
|
a: import("../constructors/constructWithOptions").Styled<"web", "a", import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, import("../types").BaseObject>;
|
|
4
20
|
abbr: import("../constructors/constructWithOptions").Styled<"web", "abbr", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
5
21
|
address: import("../constructors/constructWithOptions").Styled<"web", "address", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
@@ -19,7 +35,6 @@ export declare const resetStyled: (isServer?: boolean) => (<Target extends impor
|
|
|
19
35
|
canvas: import("../constructors/constructWithOptions").Styled<"web", "canvas", import("react").DetailedHTMLProps<import("react").CanvasHTMLAttributes<HTMLCanvasElement>, HTMLCanvasElement>, import("../types").BaseObject>;
|
|
20
36
|
caption: import("../constructors/constructWithOptions").Styled<"web", "caption", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
21
37
|
cite: import("../constructors/constructWithOptions").Styled<"web", "cite", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
22
|
-
code: import("../constructors/constructWithOptions").Styled<"web", "code", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
23
38
|
col: import("../constructors/constructWithOptions").Styled<"web", "col", import("react").DetailedHTMLProps<import("react").ColHTMLAttributes<HTMLTableColElement>, HTMLTableColElement>, import("../types").BaseObject>;
|
|
24
39
|
colgroup: import("../constructors/constructWithOptions").Styled<"web", "colgroup", import("react").DetailedHTMLProps<import("react").ColgroupHTMLAttributes<HTMLTableColElement>, HTMLTableColElement>, import("../types").BaseObject>;
|
|
25
40
|
data: import("../constructors/constructWithOptions").Styled<"web", "data", import("react").DetailedHTMLProps<import("react").DataHTMLAttributes<HTMLDataElement>, HTMLDataElement>, import("../types").BaseObject>;
|
|
@@ -38,15 +53,12 @@ export declare const resetStyled: (isServer?: boolean) => (<Target extends impor
|
|
|
38
53
|
figcaption: import("../constructors/constructWithOptions").Styled<"web", "figcaption", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
39
54
|
figure: import("../constructors/constructWithOptions").Styled<"web", "figure", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
40
55
|
footer: import("../constructors/constructWithOptions").Styled<"web", "footer", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
41
|
-
form: import("../constructors/constructWithOptions").Styled<"web", "form", import("react").DetailedHTMLProps<import("react").FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>, import("../types").BaseObject>;
|
|
42
56
|
h1: import("../constructors/constructWithOptions").Styled<"web", "h1", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, import("../types").BaseObject>;
|
|
43
57
|
h2: import("../constructors/constructWithOptions").Styled<"web", "h2", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, import("../types").BaseObject>;
|
|
44
58
|
h3: import("../constructors/constructWithOptions").Styled<"web", "h3", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, import("../types").BaseObject>;
|
|
45
59
|
h4: import("../constructors/constructWithOptions").Styled<"web", "h4", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, import("../types").BaseObject>;
|
|
46
60
|
h5: import("../constructors/constructWithOptions").Styled<"web", "h5", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, import("../types").BaseObject>;
|
|
47
61
|
h6: import("../constructors/constructWithOptions").Styled<"web", "h6", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, import("../types").BaseObject>;
|
|
48
|
-
head: import("../constructors/constructWithOptions").Styled<"web", "head", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadElement>, HTMLHeadElement>, import("../types").BaseObject>;
|
|
49
|
-
header: import("../constructors/constructWithOptions").Styled<"web", "header", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
50
62
|
hgroup: import("../constructors/constructWithOptions").Styled<"web", "hgroup", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
51
63
|
hr: import("../constructors/constructWithOptions").Styled<"web", "hr", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHRElement>, HTMLHRElement>, import("../types").BaseObject>;
|
|
52
64
|
html: import("../constructors/constructWithOptions").Styled<"web", "html", import("react").DetailedHTMLProps<import("react").HtmlHTMLAttributes<HTMLHtmlElement>, HTMLHtmlElement>, import("../types").BaseObject>;
|
|
@@ -57,21 +69,15 @@ export declare const resetStyled: (isServer?: boolean) => (<Target extends impor
|
|
|
57
69
|
ins: import("../constructors/constructWithOptions").Styled<"web", "ins", import("react").DetailedHTMLProps<import("react").InsHTMLAttributes<HTMLModElement>, HTMLModElement>, import("../types").BaseObject>;
|
|
58
70
|
kbd: import("../constructors/constructWithOptions").Styled<"web", "kbd", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
59
71
|
keygen: import("../constructors/constructWithOptions").Styled<"web", "keygen", import("react").DetailedHTMLProps<import("react").KeygenHTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
60
|
-
label: import("../constructors/constructWithOptions").Styled<"web", "label", import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, import("../types").BaseObject>;
|
|
61
72
|
legend: import("../constructors/constructWithOptions").Styled<"web", "legend", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLLegendElement>, HTMLLegendElement>, import("../types").BaseObject>;
|
|
62
73
|
li: import("../constructors/constructWithOptions").Styled<"web", "li", import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, import("../types").BaseObject>;
|
|
63
|
-
link: import("../constructors/constructWithOptions").Styled<"web", "link", import("react").DetailedHTMLProps<import("react").LinkHTMLAttributes<HTMLLinkElement>, HTMLLinkElement>, import("../types").BaseObject>;
|
|
64
74
|
main: import("../constructors/constructWithOptions").Styled<"web", "main", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
65
|
-
map: import("../constructors/constructWithOptions").Styled<"web", "map", import("react").DetailedHTMLProps<import("react").MapHTMLAttributes<HTMLMapElement>, HTMLMapElement>, import("../types").BaseObject>;
|
|
66
75
|
mark: import("../constructors/constructWithOptions").Styled<"web", "mark", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
67
|
-
menu: import("../constructors/constructWithOptions").Styled<"web", "menu", import("react").DetailedHTMLProps<import("react").MenuHTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
68
76
|
menuitem: import("../constructors/constructWithOptions").Styled<"web", "menuitem", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
69
77
|
meta: import("../constructors/constructWithOptions").Styled<"web", "meta", import("react").DetailedHTMLProps<import("react").MetaHTMLAttributes<HTMLMetaElement>, HTMLMetaElement>, import("../types").BaseObject>;
|
|
70
78
|
meter: import("../constructors/constructWithOptions").Styled<"web", "meter", import("react").DetailedHTMLProps<import("react").MeterHTMLAttributes<HTMLMeterElement>, HTMLMeterElement>, import("../types").BaseObject>;
|
|
71
79
|
nav: import("../constructors/constructWithOptions").Styled<"web", "nav", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
72
|
-
noindex: import("../constructors/constructWithOptions").Styled<"web", "noindex", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
73
80
|
noscript: import("../constructors/constructWithOptions").Styled<"web", "noscript", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
74
|
-
object: import("../constructors/constructWithOptions").Styled<"web", "object", import("react").DetailedHTMLProps<import("react").ObjectHTMLAttributes<HTMLObjectElement>, HTMLObjectElement>, import("../types").BaseObject>;
|
|
75
81
|
ol: import("../constructors/constructWithOptions").Styled<"web", "ol", import("react").DetailedHTMLProps<import("react").OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>, import("../types").BaseObject>;
|
|
76
82
|
optgroup: import("../constructors/constructWithOptions").Styled<"web", "optgroup", import("react").DetailedHTMLProps<import("react").OptgroupHTMLAttributes<HTMLOptGroupElement>, HTMLOptGroupElement>, import("../types").BaseObject>;
|
|
77
83
|
option: import("../constructors/constructWithOptions").Styled<"web", "option", import("react").DetailedHTMLProps<import("react").OptionHTMLAttributes<HTMLOptionElement>, HTMLOptionElement>, import("../types").BaseObject>;
|
|
@@ -87,71 +93,31 @@ export declare const resetStyled: (isServer?: boolean) => (<Target extends impor
|
|
|
87
93
|
ruby: import("../constructors/constructWithOptions").Styled<"web", "ruby", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
88
94
|
s: import("../constructors/constructWithOptions").Styled<"web", "s", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
89
95
|
samp: import("../constructors/constructWithOptions").Styled<"web", "samp", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
90
|
-
slot: import("../constructors/constructWithOptions").Styled<"web", "slot", import("react").DetailedHTMLProps<import("react").SlotHTMLAttributes<HTMLSlotElement>, HTMLSlotElement>, import("../types").BaseObject>;
|
|
91
96
|
script: import("../constructors/constructWithOptions").Styled<"web", "script", import("react").DetailedHTMLProps<import("react").ScriptHTMLAttributes<HTMLScriptElement>, HTMLScriptElement>, import("../types").BaseObject>;
|
|
92
97
|
section: import("../constructors/constructWithOptions").Styled<"web", "section", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
93
|
-
select: import("../constructors/constructWithOptions").Styled<"web", "select", import("react").DetailedHTMLProps<import("react").SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>, import("../types").BaseObject>;
|
|
94
98
|
small: import("../constructors/constructWithOptions").Styled<"web", "small", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
95
99
|
source: import("../constructors/constructWithOptions").Styled<"web", "source", import("react").DetailedHTMLProps<import("react").SourceHTMLAttributes<HTMLSourceElement>, HTMLSourceElement>, import("../types").BaseObject>;
|
|
96
100
|
span: import("../constructors/constructWithOptions").Styled<"web", "span", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, import("../types").BaseObject>;
|
|
97
101
|
strong: import("../constructors/constructWithOptions").Styled<"web", "strong", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
98
|
-
style: import("../constructors/constructWithOptions").Styled<"web", "style", import("react").DetailedHTMLProps<import("react").StyleHTMLAttributes<HTMLStyleElement>, HTMLStyleElement>, import("../types").BaseObject>;
|
|
99
102
|
sub: import("../constructors/constructWithOptions").Styled<"web", "sub", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
100
103
|
summary: import("../constructors/constructWithOptions").Styled<"web", "summary", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
101
104
|
sup: import("../constructors/constructWithOptions").Styled<"web", "sup", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
102
105
|
table: import("../constructors/constructWithOptions").Styled<"web", "table", import("react").DetailedHTMLProps<import("react").TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>, import("../types").BaseObject>;
|
|
103
|
-
template: import("../constructors/constructWithOptions").Styled<"web", "template", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTemplateElement>, HTMLTemplateElement>, import("../types").BaseObject>;
|
|
104
106
|
tbody: import("../constructors/constructWithOptions").Styled<"web", "tbody", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, import("../types").BaseObject>;
|
|
105
107
|
td: import("../constructors/constructWithOptions").Styled<"web", "td", import("react").DetailedHTMLProps<import("react").TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>, import("../types").BaseObject>;
|
|
106
108
|
textarea: import("../constructors/constructWithOptions").Styled<"web", "textarea", import("react").DetailedHTMLProps<import("react").TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, import("../types").BaseObject>;
|
|
107
109
|
tfoot: import("../constructors/constructWithOptions").Styled<"web", "tfoot", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, import("../types").BaseObject>;
|
|
108
|
-
th: import("../constructors/constructWithOptions").Styled<"web", "th", import("react").DetailedHTMLProps<import("react").ThHTMLAttributes<HTMLTableHeaderCellElement>, HTMLTableHeaderCellElement>, import("../types").BaseObject>;
|
|
109
110
|
thead: import("../constructors/constructWithOptions").Styled<"web", "thead", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, import("../types").BaseObject>;
|
|
110
|
-
time: import("../constructors/constructWithOptions").Styled<"web", "time", import("react").DetailedHTMLProps<import("react").TimeHTMLAttributes<HTMLTimeElement>, HTMLTimeElement>, import("../types").BaseObject>;
|
|
111
|
-
title: import("../constructors/constructWithOptions").Styled<"web", "title", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTitleElement>, HTMLTitleElement>, import("../types").BaseObject>;
|
|
112
111
|
tr: import("../constructors/constructWithOptions").Styled<"web", "tr", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>, import("../types").BaseObject>;
|
|
113
112
|
track: import("../constructors/constructWithOptions").Styled<"web", "track", import("react").DetailedHTMLProps<import("react").TrackHTMLAttributes<HTMLTrackElement>, HTMLTrackElement>, import("../types").BaseObject>;
|
|
114
113
|
u: import("../constructors/constructWithOptions").Styled<"web", "u", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
115
114
|
ul: import("../constructors/constructWithOptions").Styled<"web", "ul", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLUListElement>, HTMLUListElement>, import("../types").BaseObject>;
|
|
115
|
+
use: import("../constructors/constructWithOptions").Styled<"web", "use", import("react").SVGProps<SVGUseElement>, import("../types").BaseObject>;
|
|
116
116
|
var: import("../constructors/constructWithOptions").Styled<"web", "var", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
117
|
-
video: import("../constructors/constructWithOptions").Styled<"web", "video", import("react").DetailedHTMLProps<import("react").VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>, import("../types").BaseObject>;
|
|
118
117
|
wbr: import("../constructors/constructWithOptions").Styled<"web", "wbr", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
|
|
119
|
-
webview: import("../constructors/constructWithOptions").Styled<"web", "webview", import("react").DetailedHTMLProps<import("react").WebViewHTMLAttributes<HTMLWebViewElement>, HTMLWebViewElement>, import("../types").BaseObject>;
|
|
120
|
-
svg: import("../constructors/constructWithOptions").Styled<"web", "svg", import("react").SVGProps<SVGSVGElement>, import("../types").BaseObject>;
|
|
121
|
-
animate: import("../constructors/constructWithOptions").Styled<"web", "animate", import("react").SVGProps<SVGElement>, import("../types").BaseObject>;
|
|
122
|
-
animateMotion: import("../constructors/constructWithOptions").Styled<"web", "animateMotion", import("react").SVGProps<SVGElement>, import("../types").BaseObject>;
|
|
123
|
-
animateTransform: import("../constructors/constructWithOptions").Styled<"web", "animateTransform", import("react").SVGProps<SVGElement>, import("../types").BaseObject>;
|
|
124
|
-
circle: import("../constructors/constructWithOptions").Styled<"web", "circle", import("react").SVGProps<SVGCircleElement>, import("../types").BaseObject>;
|
|
125
118
|
clipPath: import("../constructors/constructWithOptions").Styled<"web", "clipPath", import("react").SVGProps<SVGClipPathElement>, import("../types").BaseObject>;
|
|
126
119
|
defs: import("../constructors/constructWithOptions").Styled<"web", "defs", import("react").SVGProps<SVGDefsElement>, import("../types").BaseObject>;
|
|
127
|
-
desc: import("../constructors/constructWithOptions").Styled<"web", "desc", import("react").SVGProps<SVGDescElement>, import("../types").BaseObject>;
|
|
128
120
|
ellipse: import("../constructors/constructWithOptions").Styled<"web", "ellipse", import("react").SVGProps<SVGEllipseElement>, import("../types").BaseObject>;
|
|
129
|
-
feBlend: import("../constructors/constructWithOptions").Styled<"web", "feBlend", import("react").SVGProps<SVGFEBlendElement>, import("../types").BaseObject>;
|
|
130
|
-
feColorMatrix: import("../constructors/constructWithOptions").Styled<"web", "feColorMatrix", import("react").SVGProps<SVGFEColorMatrixElement>, import("../types").BaseObject>;
|
|
131
|
-
feComponentTransfer: import("../constructors/constructWithOptions").Styled<"web", "feComponentTransfer", import("react").SVGProps<SVGFEComponentTransferElement>, import("../types").BaseObject>;
|
|
132
|
-
feComposite: import("../constructors/constructWithOptions").Styled<"web", "feComposite", import("react").SVGProps<SVGFECompositeElement>, import("../types").BaseObject>;
|
|
133
|
-
feConvolveMatrix: import("../constructors/constructWithOptions").Styled<"web", "feConvolveMatrix", import("react").SVGProps<SVGFEConvolveMatrixElement>, import("../types").BaseObject>;
|
|
134
|
-
feDiffuseLighting: import("../constructors/constructWithOptions").Styled<"web", "feDiffuseLighting", import("react").SVGProps<SVGFEDiffuseLightingElement>, import("../types").BaseObject>;
|
|
135
|
-
feDisplacementMap: import("../constructors/constructWithOptions").Styled<"web", "feDisplacementMap", import("react").SVGProps<SVGFEDisplacementMapElement>, import("../types").BaseObject>;
|
|
136
|
-
feDistantLight: import("../constructors/constructWithOptions").Styled<"web", "feDistantLight", import("react").SVGProps<SVGFEDistantLightElement>, import("../types").BaseObject>;
|
|
137
|
-
feDropShadow: import("../constructors/constructWithOptions").Styled<"web", "feDropShadow", import("react").SVGProps<SVGFEDropShadowElement>, import("../types").BaseObject>;
|
|
138
|
-
feFlood: import("../constructors/constructWithOptions").Styled<"web", "feFlood", import("react").SVGProps<SVGFEFloodElement>, import("../types").BaseObject>;
|
|
139
|
-
feFuncA: import("../constructors/constructWithOptions").Styled<"web", "feFuncA", import("react").SVGProps<SVGFEFuncAElement>, import("../types").BaseObject>;
|
|
140
|
-
feFuncB: import("../constructors/constructWithOptions").Styled<"web", "feFuncB", import("react").SVGProps<SVGFEFuncBElement>, import("../types").BaseObject>;
|
|
141
|
-
feFuncG: import("../constructors/constructWithOptions").Styled<"web", "feFuncG", import("react").SVGProps<SVGFEFuncGElement>, import("../types").BaseObject>;
|
|
142
|
-
feFuncR: import("../constructors/constructWithOptions").Styled<"web", "feFuncR", import("react").SVGProps<SVGFEFuncRElement>, import("../types").BaseObject>;
|
|
143
|
-
feGaussianBlur: import("../constructors/constructWithOptions").Styled<"web", "feGaussianBlur", import("react").SVGProps<SVGFEGaussianBlurElement>, import("../types").BaseObject>;
|
|
144
|
-
feImage: import("../constructors/constructWithOptions").Styled<"web", "feImage", import("react").SVGProps<SVGFEImageElement>, import("../types").BaseObject>;
|
|
145
|
-
feMerge: import("../constructors/constructWithOptions").Styled<"web", "feMerge", import("react").SVGProps<SVGFEMergeElement>, import("../types").BaseObject>;
|
|
146
|
-
feMergeNode: import("../constructors/constructWithOptions").Styled<"web", "feMergeNode", import("react").SVGProps<SVGFEMergeNodeElement>, import("../types").BaseObject>;
|
|
147
|
-
feMorphology: import("../constructors/constructWithOptions").Styled<"web", "feMorphology", import("react").SVGProps<SVGFEMorphologyElement>, import("../types").BaseObject>;
|
|
148
|
-
feOffset: import("../constructors/constructWithOptions").Styled<"web", "feOffset", import("react").SVGProps<SVGFEOffsetElement>, import("../types").BaseObject>;
|
|
149
|
-
fePointLight: import("../constructors/constructWithOptions").Styled<"web", "fePointLight", import("react").SVGProps<SVGFEPointLightElement>, import("../types").BaseObject>;
|
|
150
|
-
feSpecularLighting: import("../constructors/constructWithOptions").Styled<"web", "feSpecularLighting", import("react").SVGProps<SVGFESpecularLightingElement>, import("../types").BaseObject>;
|
|
151
|
-
feSpotLight: import("../constructors/constructWithOptions").Styled<"web", "feSpotLight", import("react").SVGProps<SVGFESpotLightElement>, import("../types").BaseObject>;
|
|
152
|
-
feTile: import("../constructors/constructWithOptions").Styled<"web", "feTile", import("react").SVGProps<SVGFETileElement>, import("../types").BaseObject>;
|
|
153
|
-
feTurbulence: import("../constructors/constructWithOptions").Styled<"web", "feTurbulence", import("react").SVGProps<SVGFETurbulenceElement>, import("../types").BaseObject>;
|
|
154
|
-
filter: import("../constructors/constructWithOptions").Styled<"web", "filter", import("react").SVGProps<SVGFilterElement>, import("../types").BaseObject>;
|
|
155
121
|
foreignObject: import("../constructors/constructWithOptions").Styled<"web", "foreignObject", import("react").SVGProps<SVGForeignObjectElement>, import("../types").BaseObject>;
|
|
156
122
|
g: import("../constructors/constructWithOptions").Styled<"web", "g", import("react").SVGProps<SVGGElement>, import("../types").BaseObject>;
|
|
157
123
|
image: import("../constructors/constructWithOptions").Styled<"web", "image", import("react").SVGProps<SVGImageElement>, import("../types").BaseObject>;
|
|
@@ -159,22 +125,14 @@ export declare const resetStyled: (isServer?: boolean) => (<Target extends impor
|
|
|
159
125
|
linearGradient: import("../constructors/constructWithOptions").Styled<"web", "linearGradient", import("react").SVGProps<SVGLinearGradientElement>, import("../types").BaseObject>;
|
|
160
126
|
marker: import("../constructors/constructWithOptions").Styled<"web", "marker", import("react").SVGProps<SVGMarkerElement>, import("../types").BaseObject>;
|
|
161
127
|
mask: import("../constructors/constructWithOptions").Styled<"web", "mask", import("react").SVGProps<SVGMaskElement>, import("../types").BaseObject>;
|
|
162
|
-
metadata: import("../constructors/constructWithOptions").Styled<"web", "metadata", import("react").SVGProps<SVGMetadataElement>, import("../types").BaseObject>;
|
|
163
|
-
mpath: import("../constructors/constructWithOptions").Styled<"web", "mpath", import("react").SVGProps<SVGElement>, import("../types").BaseObject>;
|
|
164
|
-
path: import("../constructors/constructWithOptions").Styled<"web", "path", import("react").SVGProps<SVGPathElement>, import("../types").BaseObject>;
|
|
165
128
|
pattern: import("../constructors/constructWithOptions").Styled<"web", "pattern", import("react").SVGProps<SVGPatternElement>, import("../types").BaseObject>;
|
|
166
129
|
polygon: import("../constructors/constructWithOptions").Styled<"web", "polygon", import("react").SVGProps<SVGPolygonElement>, import("../types").BaseObject>;
|
|
167
130
|
polyline: import("../constructors/constructWithOptions").Styled<"web", "polyline", import("react").SVGProps<SVGPolylineElement>, import("../types").BaseObject>;
|
|
168
131
|
radialGradient: import("../constructors/constructWithOptions").Styled<"web", "radialGradient", import("react").SVGProps<SVGRadialGradientElement>, import("../types").BaseObject>;
|
|
169
132
|
rect: import("../constructors/constructWithOptions").Styled<"web", "rect", import("react").SVGProps<SVGRectElement>, import("../types").BaseObject>;
|
|
170
|
-
|
|
171
|
-
switch: import("../constructors/constructWithOptions").Styled<"web", "switch", import("react").SVGProps<SVGSwitchElement>, import("../types").BaseObject>;
|
|
172
|
-
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>;
|
|
173
134
|
text: import("../constructors/constructWithOptions").Styled<"web", "text", import("react").SVGTextElementAttributes<SVGTextElement>, import("../types").BaseObject>;
|
|
174
|
-
textPath: import("../constructors/constructWithOptions").Styled<"web", "textPath", import("react").SVGProps<SVGTextPathElement>, import("../types").BaseObject>;
|
|
175
135
|
tspan: import("../constructors/constructWithOptions").Styled<"web", "tspan", import("react").SVGProps<SVGTSpanElement>, import("../types").BaseObject>;
|
|
176
|
-
use: import("../constructors/constructWithOptions").Styled<"web", "use", import("react").SVGProps<SVGUseElement>, import("../types").BaseObject>;
|
|
177
|
-
view: import("../constructors/constructWithOptions").Styled<"web", "view", import("react").SVGProps<SVGViewElement>, import("../types").BaseObject>;
|
|
178
136
|
};
|
|
179
137
|
export declare const rehydrateTestStyles: () => void;
|
|
180
138
|
export declare const stripComments: (str: string) => string;
|
package/native/dist/types.d.ts
CHANGED
|
@@ -3,7 +3,8 @@ 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
9
|
defaultProps?: Partial<P> | undefined;
|
|
9
10
|
displayName?: string | undefined;
|
|
@@ -24,7 +25,7 @@ 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;
|
|
@@ -38,6 +39,19 @@ export interface StyledOptions<R extends Runtime, Props extends object> {
|
|
|
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
|
};
|
|
@@ -104,7 +118,7 @@ export interface IStyledStatics<R extends Runtime, OuterProps extends object> ex
|
|
|
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
|
};
|
|
@@ -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,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" | "circle" | "code" | "form" | "header" | "label" | "link" | "map" | "menu" | "path" | "select" | "stop" | "style" | "th" | "time" | "video" | "a" | "abbr" | "address" | "area" | "article" | "aside" | "audio" | "b" | "base" | "bdi" | "bdo" | "big" | "blockquote" | "body" | "br" | "button" | "canvas" | "caption" | "cite" | "col" | "colgroup" | "data" | "datalist" | "dd" | "del" | "details" | "dfn" | "dialog" | "div" | "dl" | "dt" | "em" | "embed" | "fieldset" | "figcaption" | "figure" | "footer" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "hgroup" | "hr" | "html" | "i" | "iframe" | "img" | "input" | "ins" | "kbd" | "keygen" | "legend" | "li" | "main" | "mark" | "menuitem" | "meta" | "meter" | "nav" | "noscript" | "ol" | "optgroup" | "option" | "output" | "p" | "param" | "picture" | "pre" | "progress" | "q" | "rp" | "rt" | "ruby" | "s" | "samp" | "script" | "section" | "small" | "source" | "span" | "strong" | "sub" | "summary" | "sup" | "table" | "tbody" | "td" | "textarea" | "tfoot" | "thead" | "tr" | "track" | "u" | "ul" | "use" | "var" | "wbr" | "clipPath" | "defs" | "ellipse" | "foreignObject" | "g" | "image" | "line" | "linearGradient" | "marker" | "mask" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "svg" | "text" | "tspan">;
|
|
2
3
|
export default _default;
|
|
4
|
+
export type SupportedHTMLElements = (typeof elements)[number];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "styled-components",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.9",
|
|
4
4
|
"description": "CSS for the <Component> Age. Style components your way with speed, strong typing, and flexibility.",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/styled-components.cjs.js",
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
"test:integration": "jest -c jest.config.integration.js --runInBand --forceExit",
|
|
24
24
|
"size": "bundlewatch",
|
|
25
25
|
"prettier": "prettier src/** --write",
|
|
26
|
+
"prettier:check": "prettier src/** --check",
|
|
26
27
|
"prepublishOnly": "cp ../../README.md . && yarn build"
|
|
27
28
|
},
|
|
28
29
|
"repository": {
|
|
@@ -112,7 +113,7 @@
|
|
|
112
113
|
"jest-serializer-html": "^7.0.0",
|
|
113
114
|
"jest-watch-typeahead": "^2.2.2",
|
|
114
115
|
"js-beautify": "^1.14.7",
|
|
115
|
-
"prettier": "^
|
|
116
|
+
"prettier": "^3.0.1",
|
|
116
117
|
"prop-types": "^15.8.1",
|
|
117
118
|
"react": "^17.0.2",
|
|
118
119
|
"react-dom": "^17.0.2",
|
package/dist/base.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { SC_VERSION } from './constants';
|
|
2
|
-
import createGlobalStyle from './constructors/createGlobalStyle';
|
|
3
|
-
import css from './constructors/css';
|
|
4
|
-
import keyframes from './constructors/keyframes';
|
|
5
|
-
import withTheme from './hoc/withTheme';
|
|
6
|
-
import ServerStyleSheet from './models/ServerStyleSheet';
|
|
7
|
-
import { IStyleSheetContext, IStyleSheetManager, IStylisContext, StyleSheetConsumer, StyleSheetContext, StyleSheetManager } from './models/StyleSheetManager';
|
|
8
|
-
import ThemeProvider, { ThemeConsumer, ThemeContext, useTheme } from './models/ThemeProvider';
|
|
9
|
-
import isStyledComponent from './utils/isStyledComponent';
|
|
10
|
-
export * from './secretInternals';
|
|
11
|
-
export { Attrs, DefaultTheme, ShouldForwardProp } from './types';
|
|
12
|
-
export { createGlobalStyle, css, isStyledComponent, IStyleSheetManager, IStyleSheetContext, IStylisContext, keyframes, ServerStyleSheet, StyleSheetConsumer, StyleSheetContext, StyleSheetManager, ThemeConsumer, ThemeContext, ThemeProvider, useTheme, SC_VERSION as version, withTheme, };
|
package/dist/constants.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export declare const SC_ATTR: string;
|
|
2
|
-
export declare const SC_ATTR_ACTIVE = "active";
|
|
3
|
-
export declare const SC_ATTR_VERSION = "data-styled-version";
|
|
4
|
-
export declare const SC_VERSION: string;
|
|
5
|
-
export declare const SPLITTER = "/*!sc*/\n";
|
|
6
|
-
export declare const IS_BROWSER: boolean;
|
|
7
|
-
export declare const DISABLE_SPEEDY: boolean;
|
|
8
|
-
export declare const STATIC_EXECUTION_CONTEXT: {};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { Attrs, BaseObject, ExecutionProps, Interpolation, IStyledComponent, IStyledComponentFactory, KnownTarget, NoInfer, Runtime, StyledOptions, StyledTarget, Styles, Substitute } from '../types';
|
|
3
|
-
type AttrsResult<T extends Attrs<any>> = T extends (...args: any) => infer P ? P extends object ? P : never : T extends object ? T : never;
|
|
4
|
-
/**
|
|
5
|
-
* Based on Attrs being a simple object or function that returns
|
|
6
|
-
* a prop object, inspect the attrs result and attempt to extract
|
|
7
|
-
* any "as" prop usage to modify the runtime target.
|
|
8
|
-
*/
|
|
9
|
-
type AttrsTarget<R extends Runtime, T extends Attrs<any>, FallbackTarget extends StyledTarget<R>, Result extends ExecutionProps = AttrsResult<T>> = Result extends {
|
|
10
|
-
as: infer RuntimeTarget;
|
|
11
|
-
} ? RuntimeTarget extends KnownTarget ? RuntimeTarget : FallbackTarget : FallbackTarget;
|
|
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;
|
|
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
|
-
withConfig: (config: StyledOptions<R, OuterProps>) => Styled<R, Target, OuterProps, OuterStatics>;
|
|
16
|
-
}
|
|
17
|
-
export default function constructWithOptions<R extends Runtime, Target extends StyledTarget<R>, OuterProps extends object = Target extends KnownTarget ? React.ComponentPropsWithRef<Target> : BaseObject, OuterStatics extends object = BaseObject>(componentConstructor: IStyledComponentFactory<R, StyledTarget<R>, object, any>, tag: StyledTarget<R>, options?: StyledOptions<R, OuterProps>): Styled<R, Target, OuterProps, OuterStatics>;
|
|
18
|
-
export {};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ExecutionProps, Interpolation, Styles } from '../types';
|
|
3
|
-
export default function createGlobalStyle<Props extends object>(strings: Styles<Props>, ...interpolations: Array<Interpolation<Props>>): React.NamedExoticComponent<ExecutionProps & Props>;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { Interpolation, NoInfer, RuleSet, Styles } from '../types';
|
|
2
|
-
declare function css(styles: Styles<object>, ...interpolations: Interpolation<object>[]): RuleSet<object>;
|
|
3
|
-
declare function css<Props extends object>(styles: Styles<NoInfer<Props>>, ...interpolations: Interpolation<NoInfer<Props>>[]): RuleSet<NoInfer<Props>>;
|
|
4
|
-
export default css;
|