styled-components 6.0.8 → 6.1.0

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.
Files changed (33) hide show
  1. package/dist/constructors/constructWithOptions.d.ts +1 -1
  2. package/dist/constructors/styled.d.ts +15 -15
  3. package/dist/hoc/withTheme.d.ts +1 -1
  4. package/dist/styled-components.browser.cjs.js +1 -1
  5. package/dist/styled-components.browser.cjs.js.map +1 -1
  6. package/dist/styled-components.browser.esm.js +1 -1
  7. package/dist/styled-components.browser.esm.js.map +1 -1
  8. package/dist/styled-components.cjs.js +1 -1
  9. package/dist/styled-components.cjs.js.map +1 -1
  10. package/dist/styled-components.esm.js +1 -1
  11. package/dist/styled-components.esm.js.map +1 -1
  12. package/dist/styled-components.js +1 -1
  13. package/dist/styled-components.js.map +1 -1
  14. package/dist/styled-components.min.js +1 -1
  15. package/dist/styled-components.min.js.map +1 -1
  16. package/dist/test/utils.d.ts +15 -15
  17. package/dist/utils/domElements.d.ts +1 -1
  18. package/native/dist/constructors/constructWithOptions.d.ts +1 -1
  19. package/native/dist/constructors/styled.d.ts +15 -15
  20. package/native/dist/hoc/withTheme.d.ts +1 -1
  21. package/native/dist/styled-components.native.cjs.js +1 -1
  22. package/native/dist/styled-components.native.cjs.js.map +1 -1
  23. package/native/dist/styled-components.native.esm.js +1 -1
  24. package/native/dist/styled-components.native.esm.js.map +1 -1
  25. package/native/dist/test/utils.d.ts +15 -15
  26. package/native/dist/utils/domElements.d.ts +1 -1
  27. package/package.json +11 -24
  28. package/dist/macro/index.d.ts +0 -2
  29. package/dist/styled-components-macro.cjs.js +0 -47
  30. package/dist/styled-components-macro.cjs.js.map +0 -1
  31. package/dist/styled-components-macro.esm.js +0 -38
  32. package/dist/styled-components-macro.esm.js.map +0 -1
  33. package/macro/package.json +0 -8
@@ -1,6 +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
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>;
4
19
  a: import("../constructors/constructWithOptions").Styled<"web", "a", import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, import("../types").BaseObject>;
5
20
  abbr: import("../constructors/constructWithOptions").Styled<"web", "abbr", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
6
21
  address: import("../constructors/constructWithOptions").Styled<"web", "address", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
@@ -20,7 +35,6 @@ export declare const resetStyled: (isServer?: boolean) => (<Target extends impor
20
35
  canvas: import("../constructors/constructWithOptions").Styled<"web", "canvas", import("react").DetailedHTMLProps<import("react").CanvasHTMLAttributes<HTMLCanvasElement>, HTMLCanvasElement>, import("../types").BaseObject>;
21
36
  caption: import("../constructors/constructWithOptions").Styled<"web", "caption", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
22
37
  cite: import("../constructors/constructWithOptions").Styled<"web", "cite", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
23
- code: import("../constructors/constructWithOptions").Styled<"web", "code", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
24
38
  col: import("../constructors/constructWithOptions").Styled<"web", "col", import("react").DetailedHTMLProps<import("react").ColHTMLAttributes<HTMLTableColElement>, HTMLTableColElement>, import("../types").BaseObject>;
25
39
  colgroup: import("../constructors/constructWithOptions").Styled<"web", "colgroup", import("react").DetailedHTMLProps<import("react").ColgroupHTMLAttributes<HTMLTableColElement>, HTMLTableColElement>, import("../types").BaseObject>;
26
40
  data: import("../constructors/constructWithOptions").Styled<"web", "data", import("react").DetailedHTMLProps<import("react").DataHTMLAttributes<HTMLDataElement>, HTMLDataElement>, import("../types").BaseObject>;
@@ -39,14 +53,12 @@ export declare const resetStyled: (isServer?: boolean) => (<Target extends impor
39
53
  figcaption: import("../constructors/constructWithOptions").Styled<"web", "figcaption", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
40
54
  figure: import("../constructors/constructWithOptions").Styled<"web", "figure", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
41
55
  footer: import("../constructors/constructWithOptions").Styled<"web", "footer", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
42
- form: import("../constructors/constructWithOptions").Styled<"web", "form", import("react").DetailedHTMLProps<import("react").FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>, import("../types").BaseObject>;
43
56
  h1: import("../constructors/constructWithOptions").Styled<"web", "h1", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, import("../types").BaseObject>;
44
57
  h2: import("../constructors/constructWithOptions").Styled<"web", "h2", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, import("../types").BaseObject>;
45
58
  h3: import("../constructors/constructWithOptions").Styled<"web", "h3", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, import("../types").BaseObject>;
46
59
  h4: import("../constructors/constructWithOptions").Styled<"web", "h4", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, import("../types").BaseObject>;
47
60
  h5: import("../constructors/constructWithOptions").Styled<"web", "h5", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, import("../types").BaseObject>;
48
61
  h6: import("../constructors/constructWithOptions").Styled<"web", "h6", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, 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,14 +69,10 @@ 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>;
@@ -87,12 +95,10 @@ export declare const resetStyled: (isServer?: boolean) => (<Target extends impor
87
95
  samp: import("../constructors/constructWithOptions").Styled<"web", "samp", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
88
96
  script: import("../constructors/constructWithOptions").Styled<"web", "script", import("react").DetailedHTMLProps<import("react").ScriptHTMLAttributes<HTMLScriptElement>, HTMLScriptElement>, import("../types").BaseObject>;
89
97
  section: import("../constructors/constructWithOptions").Styled<"web", "section", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
90
- select: import("../constructors/constructWithOptions").Styled<"web", "select", import("react").DetailedHTMLProps<import("react").SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>, import("../types").BaseObject>;
91
98
  small: import("../constructors/constructWithOptions").Styled<"web", "small", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
92
99
  source: import("../constructors/constructWithOptions").Styled<"web", "source", import("react").DetailedHTMLProps<import("react").SourceHTMLAttributes<HTMLSourceElement>, HTMLSourceElement>, import("../types").BaseObject>;
93
100
  span: import("../constructors/constructWithOptions").Styled<"web", "span", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, import("../types").BaseObject>;
94
101
  strong: import("../constructors/constructWithOptions").Styled<"web", "strong", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
95
- style: import("../constructors/constructWithOptions").Styled<"web", "style", import("react").DetailedHTMLProps<import("react").StyleHTMLAttributes<HTMLStyleElement>, HTMLStyleElement>, import("../types").BaseObject>;
96
102
  sub: import("../constructors/constructWithOptions").Styled<"web", "sub", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
97
103
  summary: import("../constructors/constructWithOptions").Styled<"web", "summary", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
98
104
  sup: import("../constructors/constructWithOptions").Styled<"web", "sup", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
@@ -101,18 +107,14 @@ export declare const resetStyled: (isServer?: boolean) => (<Target extends impor
101
107
  td: import("../constructors/constructWithOptions").Styled<"web", "td", import("react").DetailedHTMLProps<import("react").TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>, import("../types").BaseObject>;
102
108
  textarea: import("../constructors/constructWithOptions").Styled<"web", "textarea", import("react").DetailedHTMLProps<import("react").TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, import("../types").BaseObject>;
103
109
  tfoot: import("../constructors/constructWithOptions").Styled<"web", "tfoot", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, import("../types").BaseObject>;
104
- th: import("../constructors/constructWithOptions").Styled<"web", "th", import("react").DetailedHTMLProps<import("react").ThHTMLAttributes<HTMLTableHeaderCellElement>, HTMLTableHeaderCellElement>, import("../types").BaseObject>;
105
110
  thead: import("../constructors/constructWithOptions").Styled<"web", "thead", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, import("../types").BaseObject>;
106
- time: import("../constructors/constructWithOptions").Styled<"web", "time", import("react").DetailedHTMLProps<import("react").TimeHTMLAttributes<HTMLTimeElement>, HTMLTimeElement>, import("../types").BaseObject>;
107
111
  tr: import("../constructors/constructWithOptions").Styled<"web", "tr", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>, import("../types").BaseObject>;
108
112
  track: import("../constructors/constructWithOptions").Styled<"web", "track", import("react").DetailedHTMLProps<import("react").TrackHTMLAttributes<HTMLTrackElement>, HTMLTrackElement>, import("../types").BaseObject>;
109
113
  u: import("../constructors/constructWithOptions").Styled<"web", "u", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
110
114
  ul: import("../constructors/constructWithOptions").Styled<"web", "ul", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLUListElement>, HTMLUListElement>, import("../types").BaseObject>;
111
115
  use: import("../constructors/constructWithOptions").Styled<"web", "use", import("react").SVGProps<SVGUseElement>, import("../types").BaseObject>;
112
116
  var: import("../constructors/constructWithOptions").Styled<"web", "var", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
113
- video: import("../constructors/constructWithOptions").Styled<"web", "video", import("react").DetailedHTMLProps<import("react").VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>, import("../types").BaseObject>;
114
117
  wbr: import("../constructors/constructWithOptions").Styled<"web", "wbr", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
115
- circle: import("../constructors/constructWithOptions").Styled<"web", "circle", import("react").SVGProps<SVGCircleElement>, import("../types").BaseObject>;
116
118
  clipPath: import("../constructors/constructWithOptions").Styled<"web", "clipPath", import("react").SVGProps<SVGClipPathElement>, import("../types").BaseObject>;
117
119
  defs: import("../constructors/constructWithOptions").Styled<"web", "defs", import("react").SVGProps<SVGDefsElement>, import("../types").BaseObject>;
118
120
  ellipse: import("../constructors/constructWithOptions").Styled<"web", "ellipse", import("react").SVGProps<SVGEllipseElement>, import("../types").BaseObject>;
@@ -123,13 +125,11 @@ export declare const resetStyled: (isServer?: boolean) => (<Target extends impor
123
125
  linearGradient: import("../constructors/constructWithOptions").Styled<"web", "linearGradient", import("react").SVGProps<SVGLinearGradientElement>, import("../types").BaseObject>;
124
126
  marker: import("../constructors/constructWithOptions").Styled<"web", "marker", import("react").SVGProps<SVGMarkerElement>, import("../types").BaseObject>;
125
127
  mask: import("../constructors/constructWithOptions").Styled<"web", "mask", import("react").SVGProps<SVGMaskElement>, import("../types").BaseObject>;
126
- path: import("../constructors/constructWithOptions").Styled<"web", "path", import("react").SVGProps<SVGPathElement>, import("../types").BaseObject>;
127
128
  pattern: import("../constructors/constructWithOptions").Styled<"web", "pattern", import("react").SVGProps<SVGPatternElement>, import("../types").BaseObject>;
128
129
  polygon: import("../constructors/constructWithOptions").Styled<"web", "polygon", import("react").SVGProps<SVGPolygonElement>, import("../types").BaseObject>;
129
130
  polyline: import("../constructors/constructWithOptions").Styled<"web", "polyline", import("react").SVGProps<SVGPolylineElement>, import("../types").BaseObject>;
130
131
  radialGradient: import("../constructors/constructWithOptions").Styled<"web", "radialGradient", import("react").SVGProps<SVGRadialGradientElement>, import("../types").BaseObject>;
131
132
  rect: import("../constructors/constructWithOptions").Styled<"web", "rect", import("react").SVGProps<SVGRectElement>, import("../types").BaseObject>;
132
- stop: import("../constructors/constructWithOptions").Styled<"web", "stop", import("react").SVGProps<SVGStopElement>, import("../types").BaseObject>;
133
133
  svg: import("../constructors/constructWithOptions").Styled<"web", "svg", import("react").SVGProps<SVGSVGElement>, import("../types").BaseObject>;
134
134
  text: import("../constructors/constructWithOptions").Styled<"web", "text", import("react").SVGTextElementAttributes<SVGTextElement>, import("../types").BaseObject>;
135
135
  tspan: import("../constructors/constructWithOptions").Styled<"web", "tspan", import("react").SVGProps<SVGTSpanElement>, import("../types").BaseObject>;
@@ -1,4 +1,4 @@
1
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
+ 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">;
3
3
  export default _default;
4
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.8",
3
+ "version": "6.1.0",
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",
@@ -35,16 +35,13 @@
35
35
  "README.md",
36
36
  "dist",
37
37
  "native",
38
- "test-utils",
39
- "macro"
38
+ "test-utils"
40
39
  ],
41
40
  "keywords": [
42
41
  "react",
43
42
  "css",
44
43
  "css-in-js",
45
44
  "styled-components",
46
- "babel-macro",
47
- "babel-macros",
48
45
  "styling"
49
46
  ],
50
47
  "author": "Glen Maddern",
@@ -58,40 +55,31 @@
58
55
  "@types/react-dom": "^17.0.0"
59
56
  },
60
57
  "dependencies": {
61
- "@babel/cli": "^7.21.0",
62
- "@babel/core": "^7.21.0",
63
- "@babel/helper-module-imports": "^7.18.6",
64
- "@babel/plugin-external-helpers": "^7.18.6",
65
- "@babel/plugin-proposal-class-properties": "^7.18.6",
66
- "@babel/plugin-proposal-object-rest-spread": "^7.20.7",
67
- "@babel/preset-env": "^7.20.2",
68
- "@babel/preset-react": "^7.18.6",
69
- "@babel/preset-typescript": "^7.21.0",
70
- "@babel/traverse": "^7.21.2",
71
58
  "@emotion/is-prop-valid": "^1.2.1",
72
59
  "@emotion/unitless": "^0.8.0",
73
60
  "@types/stylis": "^4.0.2",
74
61
  "css-to-react-native": "^3.2.0",
75
62
  "csstype": "^3.1.2",
76
- "postcss": "^8.4.23",
63
+ "postcss": "^8.4.31",
77
64
  "shallowequal": "^1.1.0",
78
65
  "stylis": "^4.3.0",
79
66
  "tslib": "^2.5.0"
80
67
  },
81
68
  "peerDependencies": {
82
- "babel-plugin-styled-components": ">= 2",
83
69
  "react": ">= 16.8.0",
84
70
  "react-dom": ">= 16.8.0"
85
71
  },
86
- "peerDependenciesMeta": {
87
- "babel-plugin-styled-components": {
88
- "optional": true
89
- }
90
- },
91
72
  "devDependencies": {
73
+ "@babel/core": "^7.21.0",
74
+ "@babel/helper-module-imports": "^7.18.6",
75
+ "@babel/plugin-external-helpers": "^7.18.6",
76
+ "@babel/plugin-proposal-class-properties": "^7.18.6",
77
+ "@babel/plugin-proposal-object-rest-spread": "^7.20.7",
92
78
  "@babel/plugin-transform-flow-strip-types": "^7.21.0",
79
+ "@babel/preset-env": "^7.20.2",
80
+ "@babel/preset-react": "^7.18.6",
81
+ "@babel/preset-typescript": "^7.21.0",
93
82
  "@rollup/plugin-typescript": "^11.0.0",
94
- "@types/babel-plugin-macros": "^2.8.4",
95
83
  "@types/enzyme": "^3.10.12",
96
84
  "@types/jest": "^29.4.0",
97
85
  "@types/js-beautify": "^1.13.1",
@@ -104,7 +92,6 @@
104
92
  "@types/shallowequal": "^1.1.1",
105
93
  "babel-jest": "^29.4.3",
106
94
  "babel-plugin-add-module-exports": "^1.0.4",
107
- "babel-plugin-macros": "^3.1.0",
108
95
  "babel-plugin-styled-components": "^2.0.7",
109
96
  "babel-plugin-tester": "^10.0.0",
110
97
  "bundlewatch": "^0.3.3",
@@ -1,2 +0,0 @@
1
- declare const _default: any;
2
- export default _default;
@@ -1,47 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var tslib = require('tslib');
6
- var helperModuleImports = require('@babel/helper-module-imports');
7
- var traverse = require('@babel/traverse');
8
- var babelPluginMacros = require('babel-plugin-macros');
9
- var babelPlugin = require('babel-plugin-styled-components');
10
-
11
- function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
12
-
13
- var traverse__default = /*#__PURE__*/_interopDefault(traverse);
14
- var babelPlugin__default = /*#__PURE__*/_interopDefault(babelPlugin);
15
-
16
- function styledComponentsMacro(_a) {
17
- var references = _a.references, state = _a.state, t = _a.babel.types, _b = _a.config, _c = _b === void 0 ? {} : _b, _d = _c.importModuleName, importModuleName = _d === void 0 ? 'styled-components' : _d, config = tslib.__rest(_c, ["importModuleName"]);
18
- var program = state.file.path;
19
- // FIRST STEP : replace `styled-components/macro` by `styled-components
20
- // references looks like this
21
- // { default: [path, path], css: [path], ... }
22
- var customImportName;
23
- Object.keys(references).forEach(function (refName) {
24
- // generate new identifier
25
- var id;
26
- if (refName === 'default') {
27
- id = helperModuleImports.addDefault(program, importModuleName, { nameHint: 'styled' });
28
- customImportName = id;
29
- }
30
- else {
31
- id = helperModuleImports.addNamed(program, refName, importModuleName, { nameHint: refName });
32
- }
33
- // update references with the new identifiers
34
- references[refName].forEach(function (referencePath) {
35
- referencePath.node.name = id.name;
36
- });
37
- });
38
- // SECOND STEP : apply babel-plugin-styled-components to the file
39
- var stateWithOpts = tslib.__assign(tslib.__assign({}, state), { opts: tslib.__assign(tslib.__assign({}, config), { topLevelImportPaths: (config.topLevelImportPaths || []).concat(importModuleName) }), customImportName: customImportName });
40
- traverse__default.default(program.parent, babelPlugin__default.default({ types: t }).visitor, undefined, stateWithOpts);
41
- }
42
- var index = babelPluginMacros.createMacro(styledComponentsMacro, {
43
- configName: 'styledComponents',
44
- });
45
-
46
- exports.default = index;
47
- //# sourceMappingURL=styled-components-macro.cjs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"styled-components-macro.cjs.js","sources":["../src/macro/index.ts"],"sourcesContent":["import { types } from '@babel/core';\nimport { addDefault, addNamed } from '@babel/helper-module-imports';\nimport traverse from '@babel/traverse';\nimport { createMacro, MacroParams } from 'babel-plugin-macros';\nimport babelPlugin from 'babel-plugin-styled-components';\n\nfunction styledComponentsMacro({\n references,\n state,\n babel: { types: t },\n config: { importModuleName = 'styled-components', ...config } = {},\n}: MacroParams) {\n const program = state.file.path;\n\n // FIRST STEP : replace `styled-components/macro` by `styled-components\n // references looks like this\n // { default: [path, path], css: [path], ... }\n let customImportName;\n Object.keys(references).forEach(refName => {\n // generate new identifier\n let id: types.Identifier;\n if (refName === 'default') {\n id = addDefault(program, importModuleName, { nameHint: 'styled' });\n customImportName = id;\n } else {\n id = addNamed(program, refName, importModuleName, { nameHint: refName });\n }\n\n // update references with the new identifiers\n references[refName].forEach(referencePath => {\n (referencePath.node as types.Identifier).name = id.name;\n });\n });\n\n // SECOND STEP : apply babel-plugin-styled-components to the file\n const stateWithOpts = {\n ...state,\n opts: {\n ...config,\n topLevelImportPaths: (config.topLevelImportPaths || []).concat(importModuleName),\n },\n customImportName,\n };\n traverse(program.parent, babelPlugin({ types: t }).visitor, undefined, stateWithOpts);\n}\n\nexport default createMacro(styledComponentsMacro, {\n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AAI,CAAC;AAC1D,SAAC,CAAC,CAAC;AACL,KAAC,CAAC,CAAC;;IAGH,IAAM,aAAa,GACdC,cAAA,CAAAA,cAAA,CAAA,EAAA,EAAA,KAAK,CACR,EAAA,EAAA,IAAI,EACCA,cAAA,CAAAA,cAAA,CAAA,EAAA,EAAA,MAAM,CACT,EAAA,EAAA,mBAAmB,EAAE,CAAC,MAAM,CAAC,mBAAmB,IAAI,EAAE,EAAE,MAAM,CAAC,gBAAgB,CAAC,EAElF,CAAA,EAAA,gBAAgB,EAAA,gBAAA,EAAA,CACjB,CAAC;IACFC,yBAAQ,CAAC,OAAO,CAAC,MAAM,EAAEC,4BAAW,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC,OAAO,EAAE,SAAS,EAAE,aAAa,CAAC,CAAC;AACxF,CAAC;AAED,YAAeC,6BAAW,CAAC,qBAAqB,EAAE;AAChD,IAAA,UAAU,EAAE,kBAAkB;AAC/B,CAAA,CAAC;;;;"}
@@ -1,38 +0,0 @@
1
- import { __rest, __assign } from 'tslib';
2
- import { addDefault, addNamed } from '@babel/helper-module-imports';
3
- import traverse from '@babel/traverse';
4
- import { createMacro } from 'babel-plugin-macros';
5
- import babelPlugin from 'babel-plugin-styled-components';
6
-
7
- function styledComponentsMacro(_a) {
8
- var references = _a.references, state = _a.state, t = _a.babel.types, _b = _a.config, _c = _b === void 0 ? {} : _b, _d = _c.importModuleName, importModuleName = _d === void 0 ? 'styled-components' : _d, config = __rest(_c, ["importModuleName"]);
9
- var program = state.file.path;
10
- // FIRST STEP : replace `styled-components/macro` by `styled-components
11
- // references looks like this
12
- // { default: [path, path], css: [path], ... }
13
- var customImportName;
14
- Object.keys(references).forEach(function (refName) {
15
- // generate new identifier
16
- var id;
17
- if (refName === 'default') {
18
- id = addDefault(program, importModuleName, { nameHint: 'styled' });
19
- customImportName = id;
20
- }
21
- else {
22
- id = addNamed(program, refName, importModuleName, { nameHint: refName });
23
- }
24
- // update references with the new identifiers
25
- references[refName].forEach(function (referencePath) {
26
- referencePath.node.name = id.name;
27
- });
28
- });
29
- // SECOND STEP : apply babel-plugin-styled-components to the file
30
- var stateWithOpts = __assign(__assign({}, state), { opts: __assign(__assign({}, config), { topLevelImportPaths: (config.topLevelImportPaths || []).concat(importModuleName) }), customImportName: customImportName });
31
- traverse(program.parent, babelPlugin({ types: t }).visitor, undefined, stateWithOpts);
32
- }
33
- var index = createMacro(styledComponentsMacro, {
34
- configName: 'styledComponents',
35
- });
36
-
37
- export { index as default };
38
- //# sourceMappingURL=styled-components-macro.esm.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"styled-components-macro.esm.js","sources":["../src/macro/index.ts"],"sourcesContent":["import { types } from '@babel/core';\nimport { addDefault, addNamed } from '@babel/helper-module-imports';\nimport traverse from '@babel/traverse';\nimport { createMacro, MacroParams } from 'babel-plugin-macros';\nimport babelPlugin from 'babel-plugin-styled-components';\n\nfunction styledComponentsMacro({\n references,\n state,\n babel: { types: t },\n config: { importModuleName = 'styled-components', ...config } = {},\n}: MacroParams) {\n const program = state.file.path;\n\n // FIRST STEP : replace `styled-components/macro` by `styled-components\n // references looks like this\n // { default: [path, path], css: [path], ... }\n let customImportName;\n Object.keys(references).forEach(refName => {\n // generate new identifier\n let id: types.Identifier;\n if (refName === 'default') {\n id = addDefault(program, importModuleName, { nameHint: 'styled' });\n customImportName = id;\n } else {\n id = addNamed(program, refName, importModuleName, { nameHint: refName });\n }\n\n // update references with the new identifiers\n references[refName].forEach(referencePath => {\n (referencePath.node as types.Identifier).name = id.name;\n });\n });\n\n // SECOND STEP : apply babel-plugin-styled-components to the file\n const stateWithOpts = {\n ...state,\n opts: {\n ...config,\n topLevelImportPaths: (config.topLevelImportPaths || []).concat(importModuleName),\n },\n customImportName,\n };\n traverse(program.parent, babelPlugin({ types: t }).visitor, undefined, stateWithOpts);\n}\n\nexport default createMacro(styledComponentsMacro, {\n configName: 'styledComponents',\n});\n"],"names":[],"mappings":";;;;;;AAMA,SAAS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AA,EAAA,KAAK,CACR,EAAA,EAAA,IAAI,EACC,QAAA,CAAA,QAAA,CAAA,EAAA,EAAA,MAAM,CACT,EAAA,EAAA,mBAAmB,EAAE,CAAC,MAAM,CAAC,mBAAmB,IAAI,EAAE,EAAE,MAAM,CAAC,gBAAgB,CAAC,EAElF,CAAA,EAAA,gBAAgB,EAAA,gBAAA,EAAA,CACjB,CAAC;IACF,QAAQ,CAAC,OAAO,CAAC,MAAM,EAAE,WAAW,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC,OAAO,EAAE,SAAS,EAAE,aAAa,CAAC,CAAC;AACxF,CAAC;AAED,YAAe,WAAW,CAAC,qBAAqB,EAAE;AAChD,IAAA,UAAU,EAAE,kBAAkB;AAC/B,CAAA,CAAC;;;;"}
@@ -1,8 +0,0 @@
1
- {
2
- "name": "styled-components/macro",
3
- "private": true,
4
- "types": "../dist/index.d.ts",
5
- "main": "../dist/styled-components-macro.cjs.js",
6
- "module": "../dist/styled-components-macro.esm.js",
7
- "jsnext:main": "../dist/styled-components-macro.esm.js"
8
- }