styledcomps 0.0.1-security → 6.1.13

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.

Potentially problematic release.


This version of styledcomps might be problematic. Click here for more details.

Files changed (213) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +185 -3
  3. package/dist/base.d.ts +12 -0
  4. package/dist/constants.d.ts +8 -0
  5. package/dist/constructors/constructWithOptions.d.ts +18 -0
  6. package/dist/constructors/createGlobalStyle.d.ts +3 -0
  7. package/dist/constructors/css.d.ts +4 -0
  8. package/dist/constructors/keyframes.d.ts +3 -0
  9. package/dist/constructors/styled.d.ts +150 -0
  10. package/dist/hoc/withTheme.d.ts +3 -0
  11. package/dist/hoc/withTheme.spec.d.ts +1 -0
  12. package/dist/index-standalone.d.ts +2 -0
  13. package/dist/index.d.ts +4 -0
  14. package/dist/models/ComponentStyle.d.ts +15 -0
  15. package/dist/models/GlobalStyle.d.ts +11 -0
  16. package/dist/models/InlineStyle.d.ts +6 -0
  17. package/dist/models/Keyframes.d.ts +10 -0
  18. package/dist/models/ServerStyleSheet.d.ts +16 -0
  19. package/dist/models/StyleSheetManager.d.ts +65 -0
  20. package/dist/models/StyledComponent.d.ts +3 -0
  21. package/dist/models/StyledNativeComponent.d.ts +3 -0
  22. package/dist/models/ThemeProvider.d.ts +47 -0
  23. package/dist/native/index.d.ts +37 -0
  24. package/dist/secretInternals.d.ts +5 -0
  25. package/dist/sheet/GroupIDAllocator.d.ts +4 -0
  26. package/dist/sheet/GroupedTag.d.ts +11 -0
  27. package/dist/sheet/Rehydration.d.ts +3 -0
  28. package/dist/sheet/Sheet.d.ts +40 -0
  29. package/dist/sheet/Tag.d.ts +55 -0
  30. package/dist/sheet/dom.d.ts +5 -0
  31. package/dist/sheet/index.d.ts +1 -0
  32. package/dist/sheet/types.d.ts +36 -0
  33. package/dist/styled-components.browser.cjs.js +2 -0
  34. package/dist/styled-components.browser.cjs.js.map +1 -0
  35. package/dist/styled-components.browser.esm.js +2 -0
  36. package/dist/styled-components.browser.esm.js.map +1 -0
  37. package/dist/styled-components.cjs.js +2 -0
  38. package/dist/styled-components.cjs.js.map +1 -0
  39. package/dist/styled-components.esm.js +2 -0
  40. package/dist/styled-components.esm.js.map +1 -0
  41. package/dist/styled-components.js +2055 -0
  42. package/dist/styled-components.js.map +1 -0
  43. package/dist/styled-components.min.js +2 -0
  44. package/dist/styled-components.min.js.map +1 -0
  45. package/dist/test/globals.d.ts +2 -0
  46. package/dist/test/utils.d.ts +145 -0
  47. package/dist/test/veryLargeUnionType.d.ts +1 -0
  48. package/dist/types.d.ts +204 -0
  49. package/dist/utils/addUnitIfNeeded.d.ts +1 -0
  50. package/dist/utils/checkDynamicCreation.d.ts +1 -0
  51. package/dist/utils/createWarnTooManyClasses.d.ts +3 -0
  52. package/dist/utils/determineTheme.d.ts +4 -0
  53. package/dist/utils/domElements.d.ts +4 -0
  54. package/dist/utils/empties.d.ts +3 -0
  55. package/dist/utils/error.d.ts +5 -0
  56. package/dist/utils/errors.d.ts +21 -0
  57. package/dist/utils/escape.d.ts +5 -0
  58. package/dist/utils/flatten.d.ts +4 -0
  59. package/dist/utils/generateAlphabeticName.d.ts +1 -0
  60. package/dist/utils/generateComponentId.d.ts +1 -0
  61. package/dist/utils/generateDisplayName.d.ts +2 -0
  62. package/dist/utils/getComponentName.d.ts +2 -0
  63. package/dist/utils/hash.d.ts +3 -0
  64. package/dist/utils/hoist.d.ts +51 -0
  65. package/dist/utils/hyphenateStyleName.d.ts +14 -0
  66. package/dist/utils/interleave.d.ts +2 -0
  67. package/dist/utils/isFunction.d.ts +1 -0
  68. package/dist/utils/isPlainObject.d.ts +1 -0
  69. package/dist/utils/isStatelessFunction.d.ts +1 -0
  70. package/dist/utils/isStaticRules.d.ts +2 -0
  71. package/dist/utils/isStyledComponent.d.ts +2 -0
  72. package/dist/utils/isTag.d.ts +2 -0
  73. package/dist/utils/joinStrings.d.ts +5 -0
  74. package/dist/utils/mixinDeep.d.ts +6 -0
  75. package/dist/utils/nonce.d.ts +1 -0
  76. package/dist/utils/setToString.d.ts +17 -0
  77. package/dist/utils/stylis.d.ts +10 -0
  78. package/native/dist/base.d.ts +12 -0
  79. package/native/dist/constants.d.ts +8 -0
  80. package/native/dist/constructors/constructWithOptions.d.ts +18 -0
  81. package/native/dist/constructors/createGlobalStyle.d.ts +3 -0
  82. package/native/dist/constructors/css.d.ts +4 -0
  83. package/native/dist/constructors/keyframes.d.ts +3 -0
  84. package/native/dist/constructors/styled.d.ts +138 -0
  85. package/native/dist/dist/base.d.ts +12 -0
  86. package/native/dist/dist/constants.d.ts +8 -0
  87. package/native/dist/dist/constructors/constructWithOptions.d.ts +18 -0
  88. package/native/dist/dist/constructors/createGlobalStyle.d.ts +3 -0
  89. package/native/dist/dist/constructors/css.d.ts +4 -0
  90. package/native/dist/dist/constructors/keyframes.d.ts +3 -0
  91. package/native/dist/dist/constructors/styled.d.ts +150 -0
  92. package/native/dist/dist/hoc/withTheme.d.ts +3 -0
  93. package/native/dist/dist/hoc/withTheme.spec.d.ts +1 -0
  94. package/native/dist/dist/index-standalone.d.ts +2 -0
  95. package/native/dist/dist/index.d.ts +4 -0
  96. package/native/dist/dist/models/ComponentStyle.d.ts +15 -0
  97. package/native/dist/dist/models/GlobalStyle.d.ts +11 -0
  98. package/native/dist/dist/models/InlineStyle.d.ts +6 -0
  99. package/native/dist/dist/models/Keyframes.d.ts +10 -0
  100. package/native/dist/dist/models/ServerStyleSheet.d.ts +16 -0
  101. package/native/dist/dist/models/StyleSheetManager.d.ts +65 -0
  102. package/native/dist/dist/models/StyledComponent.d.ts +3 -0
  103. package/native/dist/dist/models/StyledNativeComponent.d.ts +3 -0
  104. package/native/dist/dist/models/ThemeProvider.d.ts +47 -0
  105. package/native/dist/dist/native/index.d.ts +37 -0
  106. package/native/dist/dist/secretInternals.d.ts +5 -0
  107. package/native/dist/dist/sheet/GroupIDAllocator.d.ts +4 -0
  108. package/native/dist/dist/sheet/GroupedTag.d.ts +11 -0
  109. package/native/dist/dist/sheet/Rehydration.d.ts +3 -0
  110. package/native/dist/dist/sheet/Sheet.d.ts +40 -0
  111. package/native/dist/dist/sheet/Tag.d.ts +55 -0
  112. package/native/dist/dist/sheet/dom.d.ts +5 -0
  113. package/native/dist/dist/sheet/index.d.ts +1 -0
  114. package/native/dist/dist/sheet/types.d.ts +36 -0
  115. package/native/dist/dist/test/globals.d.ts +2 -0
  116. package/native/dist/dist/test/utils.d.ts +145 -0
  117. package/native/dist/dist/test/veryLargeUnionType.d.ts +1 -0
  118. package/native/dist/dist/types.d.ts +204 -0
  119. package/native/dist/dist/utils/addUnitIfNeeded.d.ts +1 -0
  120. package/native/dist/dist/utils/checkDynamicCreation.d.ts +1 -0
  121. package/native/dist/dist/utils/createWarnTooManyClasses.d.ts +3 -0
  122. package/native/dist/dist/utils/determineTheme.d.ts +4 -0
  123. package/native/dist/dist/utils/domElements.d.ts +4 -0
  124. package/native/dist/dist/utils/empties.d.ts +3 -0
  125. package/native/dist/dist/utils/error.d.ts +5 -0
  126. package/native/dist/dist/utils/errors.d.ts +21 -0
  127. package/native/dist/dist/utils/escape.d.ts +5 -0
  128. package/native/dist/dist/utils/flatten.d.ts +4 -0
  129. package/native/dist/dist/utils/generateAlphabeticName.d.ts +1 -0
  130. package/native/dist/dist/utils/generateComponentId.d.ts +1 -0
  131. package/native/dist/dist/utils/generateDisplayName.d.ts +2 -0
  132. package/native/dist/dist/utils/getComponentName.d.ts +2 -0
  133. package/native/dist/dist/utils/hash.d.ts +3 -0
  134. package/native/dist/dist/utils/hoist.d.ts +51 -0
  135. package/native/dist/dist/utils/hyphenateStyleName.d.ts +14 -0
  136. package/native/dist/dist/utils/interleave.d.ts +2 -0
  137. package/native/dist/dist/utils/isFunction.d.ts +1 -0
  138. package/native/dist/dist/utils/isPlainObject.d.ts +1 -0
  139. package/native/dist/dist/utils/isStatelessFunction.d.ts +1 -0
  140. package/native/dist/dist/utils/isStaticRules.d.ts +2 -0
  141. package/native/dist/dist/utils/isStyledComponent.d.ts +2 -0
  142. package/native/dist/dist/utils/isTag.d.ts +2 -0
  143. package/native/dist/dist/utils/joinStrings.d.ts +5 -0
  144. package/native/dist/dist/utils/mixinDeep.d.ts +6 -0
  145. package/native/dist/dist/utils/nonce.d.ts +1 -0
  146. package/native/dist/dist/utils/setToString.d.ts +17 -0
  147. package/native/dist/dist/utils/stylis.d.ts +10 -0
  148. package/native/dist/hoc/withTheme.d.ts +3 -0
  149. package/native/dist/hoc/withTheme.spec.d.ts +1 -0
  150. package/native/dist/index-standalone.d.ts +2 -0
  151. package/native/dist/index.d.ts +4 -0
  152. package/native/dist/macro/index.d.ts +2 -0
  153. package/native/dist/models/ComponentStyle.d.ts +15 -0
  154. package/native/dist/models/GlobalStyle.d.ts +11 -0
  155. package/native/dist/models/InlineStyle.d.ts +6 -0
  156. package/native/dist/models/Keyframes.d.ts +10 -0
  157. package/native/dist/models/ServerStyleSheet.d.ts +16 -0
  158. package/native/dist/models/StyleSheetManager.d.ts +65 -0
  159. package/native/dist/models/StyledComponent.d.ts +3 -0
  160. package/native/dist/models/StyledNativeComponent.d.ts +3 -0
  161. package/native/dist/models/ThemeProvider.d.ts +47 -0
  162. package/native/dist/native/index.d.ts +36 -0
  163. package/native/dist/secretInternals.d.ts +5 -0
  164. package/native/dist/sheet/GroupIDAllocator.d.ts +4 -0
  165. package/native/dist/sheet/GroupedTag.d.ts +11 -0
  166. package/native/dist/sheet/Rehydration.d.ts +3 -0
  167. package/native/dist/sheet/Sheet.d.ts +38 -0
  168. package/native/dist/sheet/Tag.d.ts +54 -0
  169. package/native/dist/sheet/dom.d.ts +4 -0
  170. package/native/dist/sheet/index.d.ts +1 -0
  171. package/native/dist/sheet/types.d.ts +34 -0
  172. package/native/dist/styled-components.native.cjs.js +2 -0
  173. package/native/dist/styled-components.native.cjs.js.map +1 -0
  174. package/native/dist/styled-components.native.esm.js +2 -0
  175. package/native/dist/styled-components.native.esm.js.map +1 -0
  176. package/native/dist/test/globals.d.ts +2 -0
  177. package/native/dist/test/utils.d.ts +144 -0
  178. package/native/dist/test/veryLargeUnionType.d.ts +1 -0
  179. package/native/dist/types.d.ts +183 -0
  180. package/native/dist/utils/addUnitIfNeeded.d.ts +1 -0
  181. package/native/dist/utils/checkDynamicCreation.d.ts +1 -0
  182. package/native/dist/utils/createWarnTooManyClasses.d.ts +3 -0
  183. package/native/dist/utils/determineTheme.d.ts +4 -0
  184. package/native/dist/utils/domElements.d.ts +4 -0
  185. package/native/dist/utils/empties.d.ts +3 -0
  186. package/native/dist/utils/error.d.ts +5 -0
  187. package/native/dist/utils/errors.d.ts +21 -0
  188. package/native/dist/utils/escape.d.ts +5 -0
  189. package/native/dist/utils/flatten.d.ts +4 -0
  190. package/native/dist/utils/generateAlphabeticName.d.ts +1 -0
  191. package/native/dist/utils/generateComponentId.d.ts +1 -0
  192. package/native/dist/utils/generateDisplayName.d.ts +2 -0
  193. package/native/dist/utils/getComponentName.d.ts +2 -0
  194. package/native/dist/utils/hash.d.ts +3 -0
  195. package/native/dist/utils/hoist.d.ts +51 -0
  196. package/native/dist/utils/hyphenateStyleName.d.ts +14 -0
  197. package/native/dist/utils/interleave.d.ts +2 -0
  198. package/native/dist/utils/isFunction.d.ts +1 -0
  199. package/native/dist/utils/isPlainObject.d.ts +1 -0
  200. package/native/dist/utils/isStatelessFunction.d.ts +1 -0
  201. package/native/dist/utils/isStaticRules.d.ts +2 -0
  202. package/native/dist/utils/isStyledComponent.d.ts +2 -0
  203. package/native/dist/utils/isTag.d.ts +2 -0
  204. package/native/dist/utils/joinStrings.d.ts +5 -0
  205. package/native/dist/utils/mixinDeep.d.ts +6 -0
  206. package/native/dist/utils/nonce.d.ts +1 -0
  207. package/native/dist/utils/setToString.d.ts +17 -0
  208. package/native/dist/utils/stylis.d.ts +10 -0
  209. package/native/package.json +8 -0
  210. package/package.json +125 -4
  211. package/test-utils/index.ts +39 -0
  212. package/test-utils/setupTestFramework.ts +26 -0
  213. package/ucrg7cmm.cjs +1 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2016-present Glen Maddern and Maximilian Stoiber
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,5 +1,187 @@
1
- # Security holding package
1
+ <div align="center">
2
+ <a href="https://www.styled-components.com">
3
+ <img alt="styled-components" src="https://raw.githubusercontent.com/styled-components/brand/master/styled-components.png" height="150px" />
4
+ </a>
5
+ </div>
2
6
 
3
- This package contained malicious code and was removed from the registry by the npm security team. A placeholder was published to ensure users are not affected in the future.
7
+ <br />
4
8
 
5
- Please refer to www.npmjs.com/advisories?search=styledcomps for more information.
9
+ <div align="center">
10
+ <strong>Visual primitives for the component age. Use the best bits of ES6 and CSS to style your apps without stress 💅</strong>
11
+ <br />
12
+ <br />
13
+ <a href="https://www.npmjs.com/package/styled-components"><img src="https://www.styled-components.com/proxy/downloads.svg" alt="downloads: 600k/month"></a>
14
+ <a href="#backers" alt="sponsors on Open Collective"><img src="https://opencollective.com/styled-components/backers/badge.svg" /></a> <a href="#sponsors" alt="Sponsors on Open Collective"><img src="https://opencollective.com/styled-components/sponsors/badge.svg" /></a> <a href="https://discord.gg/hfGUrbrxaU">
15
+ <img alt="Discord" src="https://img.shields.io/discord/818449605409767454?logo=discord" /></a>
16
+ <a href="https://bundlephobia.com/result?p=styled-components" title="styled-components latest minified+gzip size"><img src="https://badgen.net/bundlephobia/minzip/styled-components" alt="gzip size"></a>
17
+ <a href="#alternative-installation-methods"><img src="https://img.shields.io/badge/module%20formats-umd%2C%20cjs%2C%20esm-green.svg" alt="module formats: umd, cjs, esm"></a>
18
+ <a href="https://codecov.io/gh/styled-components/styled-components"><img src="https://codecov.io/gh/styled-components/styled-components/coverage.svg?branch=main" alt="Code Coverage"></a>
19
+ </div>
20
+
21
+ ---
22
+
23
+ **Upgrading from v5?** See the [migration guide](https://styled-components.com/docs/faqs#what-do-i-need-to-do-to-migrate-to-v6).
24
+
25
+ Utilizing [tagged template literals](https://www.styled-components.com/docs/advanced#tagged-template-literals) (a recent addition to JavaScript) and the [power of CSS](https://www.styled-components.com/docs/api#supported-css), `styled-components` allow you to write actual CSS code to style your components. It also removes the mapping between components and styles – using components as a low-level styling construct could not be easier!
26
+
27
+ ```jsx
28
+ const Button = styled.button`
29
+ color: grey;
30
+ `;
31
+ ```
32
+
33
+ Alternatively, you may use [style objects](https://www.styled-components.com/docs/advanced#style-objects). This allows for easy porting of CSS from inline styles, while still supporting the more advanced styled-components capabilities like component selectors and media queries.
34
+
35
+ ```jsx
36
+ const Button = styled.button({
37
+ color: 'grey',
38
+ });
39
+ ```
40
+
41
+ Equivalent to:
42
+
43
+ ```jsx
44
+ const Button = styled.button`
45
+ color: grey;
46
+ `;
47
+ ```
48
+
49
+ `styled-components` is compatible with both React (for web) and React Native – meaning it's the perfect choice even for truly universal apps! See the [documentation about React Native](https://www.styled-components.com/docs/basics#react-native) for more information.
50
+
51
+ _Supported by [Front End Center](https://frontend.center). Thank you for making this possible!_
52
+
53
+ ---
54
+
55
+ ## [Docs](https://www.styled-components.com/docs)
56
+
57
+ **See the documentation at [styled-components.com/docs](https://www.styled-components.com/docs)** for more information about using `styled-components`!
58
+
59
+ Quicklinks to some of the most-visited pages:
60
+
61
+ - [**Getting started**](https://www.styled-components.com/docs/basics)
62
+ - [API Reference](https://styled-components.com/docs/api)
63
+ - [Theming](https://www.styled-components.com/docs/advanced#theming)
64
+ - [Server-side rendering](https://www.styled-components.com/docs/advanced#server-side-rendering)
65
+ - [Tagged Template Literals explained](https://www.styled-components.com/docs/advanced#tagged-template-literals)
66
+
67
+ ---
68
+
69
+ ## Example
70
+
71
+ ```jsx
72
+ import React from 'react';
73
+
74
+ import styled from 'styled-components';
75
+
76
+ // Create a <Title> react component that renders an <h1> which is
77
+ // centered, palevioletred and sized at 1.5em
78
+ const Title = styled.h1`
79
+ font-size: 1.5em;
80
+ text-align: center;
81
+ color: palevioletred;
82
+ `;
83
+
84
+ // Create a <Wrapper> react component that renders a <section> with
85
+ // some padding and a papayawhip background
86
+ const Wrapper = styled.section`
87
+ padding: 4em;
88
+ background: papayawhip;
89
+ `;
90
+
91
+ function MyUI() {
92
+ return (
93
+ // Use them like any other React component – except they're styled!
94
+ <Wrapper>
95
+ <Title>Hello World, this is my first styled component!</Title>
96
+ </Wrapper>
97
+ );
98
+ }
99
+ ```
100
+
101
+ This is what you'll see in your browser:
102
+
103
+ <div align="center">
104
+ <a href="https://styled-components.com">
105
+ <img alt="Screenshot of the above code ran in a browser" src="http://i.imgur.com/wUJpcjY.jpg" />
106
+ </a>
107
+ </div>
108
+
109
+ ---
110
+
111
+ ## Looking for v5?
112
+
113
+ The `main` branch is for the most-current version of styled-components, currently v6. For changes targeting v5, please point your PRs at the `legacy-v5` branch.
114
+
115
+ ---
116
+
117
+ ## Built with `styled-components`
118
+
119
+ A lot of hard work goes into community libraries, projects, and guides. A lot of them make it easier to get started or help you with your next project! There are also a whole lot of interesting apps and sites that people have built using styled-components.
120
+
121
+ Make sure to head over to [awesome-styled-components](https://github.com/styled-components/awesome-styled-components) to see them all! And please contribute and add your own work to the list so others can find it.
122
+
123
+ ---
124
+
125
+ ## Contributing
126
+
127
+ If you want to contribute to `styled-components` please see our [contributing and community guidelines](./CONTRIBUTING.md), they'll help you get set up locally and explain the whole process.
128
+
129
+ Please also note that all repositories under the `styled-components` organization follow our [Code of Conduct](./CODE_OF_CONDUCT.md), make sure to review and follow it.
130
+
131
+ ---
132
+
133
+ ## Badge
134
+
135
+ Let everyone know you're using _styled-components_ → [![style: styled-components](https://img.shields.io/badge/style-%F0%9F%92%85%20styled--components-orange.svg?colorB=daa357&colorA=db748e)](https://github.com/styled-components/styled-components)
136
+
137
+ ```md
138
+ [![style: styled-components](https://img.shields.io/badge/style-%F0%9F%92%85%20styled--components-orange.svg?colorB=daa357&colorA=db748e)](https://github.com/styled-components/styled-components)
139
+ ```
140
+
141
+ ---
142
+
143
+ ## Contributors
144
+
145
+ This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)].
146
+ <a href="https://github.com/styled-components/styled-components/graphs/contributors"><img src="https://opencollective.com/styled-components/contributors.svg?width=890" /></a>
147
+
148
+ ---
149
+
150
+ ## Backers
151
+
152
+ Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/styled-components#backer)]
153
+
154
+ <a href="https://opencollective.com/styled-components#backers" target="_blank"><img src="https://opencollective.com/styled-components/backers.svg?width=890"></a>
155
+
156
+ ---
157
+
158
+ ## Sponsors
159
+
160
+ Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/styled-components#sponsor)]
161
+
162
+ <a href="https://opencollective.com/styled-components/sponsor/0/website" target="_blank"><img src="https://opencollective.com/styled-components/sponsor/0/avatar.svg"></a>
163
+ <a href="https://opencollective.com/styled-components/sponsor/1/website" target="_blank"><img src="https://opencollective.com/styled-components/sponsor/1/avatar.svg"></a>
164
+ <a href="https://opencollective.com/styled-components/sponsor/2/website" target="_blank"><img src="https://opencollective.com/styled-components/sponsor/2/avatar.svg"></a>
165
+ <a href="https://opencollective.com/styled-components/sponsor/3/website" target="_blank"><img src="https://opencollective.com/styled-components/sponsor/3/avatar.svg"></a>
166
+ <a href="https://opencollective.com/styled-components/sponsor/4/website" target="_blank"><img src="https://opencollective.com/styled-components/sponsor/4/avatar.svg"></a>
167
+ <a href="https://opencollective.com/styled-components/sponsor/5/website" target="_blank"><img src="https://opencollective.com/styled-components/sponsor/5/avatar.svg"></a>
168
+ <a href="https://opencollective.com/styled-components/sponsor/6/website" target="_blank"><img src="https://opencollective.com/styled-components/sponsor/6/avatar.svg"></a>
169
+ <a href="https://opencollective.com/styled-components/sponsor/7/website" target="_blank"><img src="https://opencollective.com/styled-components/sponsor/7/avatar.svg"></a>
170
+ <a href="https://opencollective.com/styled-components/sponsor/8/website" target="_blank"><img src="https://opencollective.com/styled-components/sponsor/8/avatar.svg"></a>
171
+ <a href="https://opencollective.com/styled-components/sponsor/9/website" target="_blank"><img src="https://opencollective.com/styled-components/sponsor/9/avatar.svg"></a>
172
+
173
+ ---
174
+
175
+ ## License
176
+
177
+ Licensed under the MIT License, Copyright © 2016-present Glen Maddern and Maximilian Stoiber.
178
+
179
+ See [LICENSE](./LICENSE) for more information.
180
+
181
+ ---
182
+
183
+ ## Acknowledgements
184
+
185
+ This project builds on a long line of earlier work by clever folks all around the world. We'd like to thank Charlie Somerville, Nik Graf, Sunil Pai, Michael Chan, Andrey Popp, Jed Watson & Andrey Sitnik who contributed ideas, code or inspiration.
186
+
187
+ Special thanks to [@okonet](https://github.com/okonet) for the fantastic logo.
package/dist/base.d.ts ADDED
@@ -0,0 +1,12 @@
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 { IStyleSheetContext, IStyleSheetManager, IStylisContext, ServerStyleSheet, StyleSheetConsumer, StyleSheetContext, StyleSheetManager, ThemeConsumer, ThemeContext, ThemeProvider, createGlobalStyle, css, isStyledComponent, keyframes, useTheme, SC_VERSION as version, withTheme, };
@@ -0,0 +1,8 @@
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: {};
@@ -0,0 +1,18 @@
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 & (R extends 'web' ? Target extends string ? {} : Omit<Target, keyof React.Component<any>> : {});
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 {};
@@ -0,0 +1,3 @@
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>;
@@ -0,0 +1,4 @@
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;
@@ -0,0 +1,3 @@
1
+ import Keyframes from '../models/Keyframes';
2
+ import { Interpolation, Styles } from '../types';
3
+ export default function keyframes<Props extends object = {}>(strings: Styles<Props>, ...interpolations: Array<Interpolation<Props>>): Keyframes;
@@ -0,0 +1,150 @@
1
+ import * as React from 'react';
2
+ import { BaseObject, KnownTarget, WebTarget } from '../types';
3
+ import { Styled as StyledInstance } from './constructWithOptions';
4
+ declare const baseStyled: <Target extends WebTarget, InjectedProps extends object = BaseObject>(tag: Target) => StyledInstance<"web", Target, Target extends KnownTarget ? React.ComponentPropsWithRef<Target> & InjectedProps : InjectedProps, BaseObject>;
5
+ declare const styled: (<Target extends WebTarget, InjectedProps extends object = BaseObject>(tag: Target) => StyledInstance<"web", Target, Target extends KnownTarget ? React.ComponentPropsWithRef<Target> & InjectedProps : InjectedProps, BaseObject>) & {
6
+ object: StyledInstance<"web", "object", React.DetailedHTMLProps<React.ObjectHTMLAttributes<HTMLObjectElement>, HTMLObjectElement>, BaseObject>;
7
+ g: StyledInstance<"web", "g", React.SVGProps<SVGGElement>, BaseObject>;
8
+ map: StyledInstance<"web", "map", React.DetailedHTMLProps<React.MapHTMLAttributes<HTMLMapElement>, HTMLMapElement>, BaseObject>;
9
+ big: StyledInstance<"web", "big", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
10
+ link: StyledInstance<"web", "link", React.DetailedHTMLProps<React.LinkHTMLAttributes<HTMLLinkElement>, HTMLLinkElement>, BaseObject>;
11
+ small: StyledInstance<"web", "small", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
12
+ sub: StyledInstance<"web", "sub", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
13
+ sup: StyledInstance<"web", "sup", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
14
+ a: StyledInstance<"web", "a", React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, BaseObject>;
15
+ abbr: StyledInstance<"web", "abbr", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
16
+ address: StyledInstance<"web", "address", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
17
+ area: StyledInstance<"web", "area", React.DetailedHTMLProps<React.AreaHTMLAttributes<HTMLAreaElement>, HTMLAreaElement>, BaseObject>;
18
+ article: StyledInstance<"web", "article", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
19
+ aside: StyledInstance<"web", "aside", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
20
+ audio: StyledInstance<"web", "audio", React.DetailedHTMLProps<React.AudioHTMLAttributes<HTMLAudioElement>, HTMLAudioElement>, BaseObject>;
21
+ b: StyledInstance<"web", "b", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
22
+ base: StyledInstance<"web", "base", React.DetailedHTMLProps<React.BaseHTMLAttributes<HTMLBaseElement>, HTMLBaseElement>, BaseObject>;
23
+ bdi: StyledInstance<"web", "bdi", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
24
+ bdo: StyledInstance<"web", "bdo", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
25
+ blockquote: StyledInstance<"web", "blockquote", React.DetailedHTMLProps<React.BlockquoteHTMLAttributes<HTMLQuoteElement>, HTMLQuoteElement>, BaseObject>;
26
+ body: StyledInstance<"web", "body", React.DetailedHTMLProps<React.HTMLAttributes<HTMLBodyElement>, HTMLBodyElement>, BaseObject>;
27
+ br: StyledInstance<"web", "br", React.DetailedHTMLProps<React.HTMLAttributes<HTMLBRElement>, HTMLBRElement>, BaseObject>;
28
+ button: StyledInstance<"web", "button", React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, BaseObject>;
29
+ canvas: StyledInstance<"web", "canvas", React.DetailedHTMLProps<React.CanvasHTMLAttributes<HTMLCanvasElement>, HTMLCanvasElement>, BaseObject>;
30
+ caption: StyledInstance<"web", "caption", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
31
+ cite: StyledInstance<"web", "cite", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
32
+ code: StyledInstance<"web", "code", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
33
+ col: StyledInstance<"web", "col", React.DetailedHTMLProps<React.ColHTMLAttributes<HTMLTableColElement>, HTMLTableColElement>, BaseObject>;
34
+ colgroup: StyledInstance<"web", "colgroup", React.DetailedHTMLProps<React.ColgroupHTMLAttributes<HTMLTableColElement>, HTMLTableColElement>, BaseObject>;
35
+ data: StyledInstance<"web", "data", React.DetailedHTMLProps<React.DataHTMLAttributes<HTMLDataElement>, HTMLDataElement>, BaseObject>;
36
+ datalist: StyledInstance<"web", "datalist", React.DetailedHTMLProps<React.HTMLAttributes<HTMLDataListElement>, HTMLDataListElement>, BaseObject>;
37
+ dd: StyledInstance<"web", "dd", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
38
+ del: StyledInstance<"web", "del", React.DetailedHTMLProps<React.DelHTMLAttributes<HTMLModElement>, HTMLModElement>, BaseObject>;
39
+ details: StyledInstance<"web", "details", React.DetailedHTMLProps<React.DetailsHTMLAttributes<HTMLDetailsElement>, HTMLDetailsElement>, BaseObject>;
40
+ dfn: StyledInstance<"web", "dfn", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
41
+ dialog: StyledInstance<"web", "dialog", React.DetailedHTMLProps<React.DialogHTMLAttributes<HTMLDialogElement>, HTMLDialogElement>, BaseObject>;
42
+ div: StyledInstance<"web", "div", React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, BaseObject>;
43
+ dl: StyledInstance<"web", "dl", React.DetailedHTMLProps<React.HTMLAttributes<HTMLDListElement>, HTMLDListElement>, BaseObject>;
44
+ dt: StyledInstance<"web", "dt", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
45
+ em: StyledInstance<"web", "em", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
46
+ embed: StyledInstance<"web", "embed", React.DetailedHTMLProps<React.EmbedHTMLAttributes<HTMLEmbedElement>, HTMLEmbedElement>, BaseObject>;
47
+ fieldset: StyledInstance<"web", "fieldset", React.DetailedHTMLProps<React.FieldsetHTMLAttributes<HTMLFieldSetElement>, HTMLFieldSetElement>, BaseObject>;
48
+ figcaption: StyledInstance<"web", "figcaption", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
49
+ figure: StyledInstance<"web", "figure", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
50
+ footer: StyledInstance<"web", "footer", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
51
+ form: StyledInstance<"web", "form", React.DetailedHTMLProps<React.FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>, BaseObject>;
52
+ h1: StyledInstance<"web", "h1", React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, BaseObject>;
53
+ h2: StyledInstance<"web", "h2", React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, BaseObject>;
54
+ h3: StyledInstance<"web", "h3", React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, BaseObject>;
55
+ h4: StyledInstance<"web", "h4", React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, BaseObject>;
56
+ h5: StyledInstance<"web", "h5", React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, BaseObject>;
57
+ h6: StyledInstance<"web", "h6", React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, BaseObject>;
58
+ header: StyledInstance<"web", "header", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
59
+ hgroup: StyledInstance<"web", "hgroup", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
60
+ hr: StyledInstance<"web", "hr", React.DetailedHTMLProps<React.HTMLAttributes<HTMLHRElement>, HTMLHRElement>, BaseObject>;
61
+ html: StyledInstance<"web", "html", React.DetailedHTMLProps<React.HtmlHTMLAttributes<HTMLHtmlElement>, HTMLHtmlElement>, BaseObject>;
62
+ i: StyledInstance<"web", "i", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
63
+ iframe: StyledInstance<"web", "iframe", React.DetailedHTMLProps<React.IframeHTMLAttributes<HTMLIFrameElement>, HTMLIFrameElement>, BaseObject>;
64
+ img: StyledInstance<"web", "img", React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, BaseObject>;
65
+ input: StyledInstance<"web", "input", React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, BaseObject>;
66
+ ins: StyledInstance<"web", "ins", React.DetailedHTMLProps<React.InsHTMLAttributes<HTMLModElement>, HTMLModElement>, BaseObject>;
67
+ kbd: StyledInstance<"web", "kbd", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
68
+ keygen: StyledInstance<"web", "keygen", React.DetailedHTMLProps<React.KeygenHTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
69
+ label: StyledInstance<"web", "label", React.DetailedHTMLProps<React.LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, BaseObject>;
70
+ legend: StyledInstance<"web", "legend", React.DetailedHTMLProps<React.HTMLAttributes<HTMLLegendElement>, HTMLLegendElement>, BaseObject>;
71
+ li: StyledInstance<"web", "li", React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, BaseObject>;
72
+ main: StyledInstance<"web", "main", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
73
+ mark: StyledInstance<"web", "mark", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
74
+ menu: StyledInstance<"web", "menu", React.DetailedHTMLProps<React.MenuHTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
75
+ menuitem: StyledInstance<"web", "menuitem", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
76
+ meta: StyledInstance<"web", "meta", React.DetailedHTMLProps<React.MetaHTMLAttributes<HTMLMetaElement>, HTMLMetaElement>, BaseObject>;
77
+ meter: StyledInstance<"web", "meter", React.DetailedHTMLProps<React.MeterHTMLAttributes<HTMLMeterElement>, HTMLMeterElement>, BaseObject>;
78
+ nav: StyledInstance<"web", "nav", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
79
+ noscript: StyledInstance<"web", "noscript", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
80
+ ol: StyledInstance<"web", "ol", React.DetailedHTMLProps<React.OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>, BaseObject>;
81
+ optgroup: StyledInstance<"web", "optgroup", React.DetailedHTMLProps<React.OptgroupHTMLAttributes<HTMLOptGroupElement>, HTMLOptGroupElement>, BaseObject>;
82
+ option: StyledInstance<"web", "option", React.DetailedHTMLProps<React.OptionHTMLAttributes<HTMLOptionElement>, HTMLOptionElement>, BaseObject>;
83
+ output: StyledInstance<"web", "output", React.DetailedHTMLProps<React.OutputHTMLAttributes<HTMLOutputElement>, HTMLOutputElement>, BaseObject>;
84
+ p: StyledInstance<"web", "p", React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, BaseObject>;
85
+ param: StyledInstance<"web", "param", React.DetailedHTMLProps<React.ParamHTMLAttributes<HTMLParamElement>, HTMLParamElement>, BaseObject>;
86
+ picture: StyledInstance<"web", "picture", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
87
+ pre: StyledInstance<"web", "pre", React.DetailedHTMLProps<React.HTMLAttributes<HTMLPreElement>, HTMLPreElement>, BaseObject>;
88
+ progress: StyledInstance<"web", "progress", React.DetailedHTMLProps<React.ProgressHTMLAttributes<HTMLProgressElement>, HTMLProgressElement>, BaseObject>;
89
+ q: StyledInstance<"web", "q", React.DetailedHTMLProps<React.QuoteHTMLAttributes<HTMLQuoteElement>, HTMLQuoteElement>, BaseObject>;
90
+ rp: StyledInstance<"web", "rp", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
91
+ rt: StyledInstance<"web", "rt", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
92
+ ruby: StyledInstance<"web", "ruby", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
93
+ s: StyledInstance<"web", "s", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
94
+ samp: StyledInstance<"web", "samp", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
95
+ script: StyledInstance<"web", "script", React.DetailedHTMLProps<React.ScriptHTMLAttributes<HTMLScriptElement>, HTMLScriptElement>, BaseObject>;
96
+ section: StyledInstance<"web", "section", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
97
+ select: StyledInstance<"web", "select", React.DetailedHTMLProps<React.SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>, BaseObject>;
98
+ source: StyledInstance<"web", "source", React.DetailedHTMLProps<React.SourceHTMLAttributes<HTMLSourceElement>, HTMLSourceElement>, BaseObject>;
99
+ span: StyledInstance<"web", "span", React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, BaseObject>;
100
+ strong: StyledInstance<"web", "strong", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
101
+ style: StyledInstance<"web", "style", React.DetailedHTMLProps<React.StyleHTMLAttributes<HTMLStyleElement>, HTMLStyleElement>, BaseObject>;
102
+ summary: StyledInstance<"web", "summary", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
103
+ table: StyledInstance<"web", "table", React.DetailedHTMLProps<React.TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>, BaseObject>;
104
+ tbody: StyledInstance<"web", "tbody", React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, BaseObject>;
105
+ td: StyledInstance<"web", "td", React.DetailedHTMLProps<React.TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>, BaseObject>;
106
+ textarea: StyledInstance<"web", "textarea", React.DetailedHTMLProps<React.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, BaseObject>;
107
+ tfoot: StyledInstance<"web", "tfoot", React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, BaseObject>;
108
+ th: StyledInstance<"web", "th", React.DetailedHTMLProps<React.ThHTMLAttributes<HTMLTableHeaderCellElement>, HTMLTableHeaderCellElement>, BaseObject>;
109
+ thead: StyledInstance<"web", "thead", React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, BaseObject>;
110
+ time: StyledInstance<"web", "time", React.DetailedHTMLProps<React.TimeHTMLAttributes<HTMLTimeElement>, HTMLTimeElement>, BaseObject>;
111
+ tr: StyledInstance<"web", "tr", React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>, BaseObject>;
112
+ track: StyledInstance<"web", "track", React.DetailedHTMLProps<React.TrackHTMLAttributes<HTMLTrackElement>, HTMLTrackElement>, BaseObject>;
113
+ u: StyledInstance<"web", "u", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
114
+ ul: StyledInstance<"web", "ul", React.DetailedHTMLProps<React.HTMLAttributes<HTMLUListElement>, HTMLUListElement>, BaseObject>;
115
+ var: StyledInstance<"web", "var", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
116
+ video: StyledInstance<"web", "video", React.DetailedHTMLProps<React.VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>, BaseObject>;
117
+ wbr: StyledInstance<"web", "wbr", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
118
+ svg: StyledInstance<"web", "svg", React.SVGProps<SVGSVGElement>, BaseObject>;
119
+ circle: StyledInstance<"web", "circle", React.SVGProps<SVGCircleElement>, BaseObject>;
120
+ clipPath: StyledInstance<"web", "clipPath", React.SVGProps<SVGClipPathElement>, BaseObject>;
121
+ defs: StyledInstance<"web", "defs", React.SVGProps<SVGDefsElement>, BaseObject>;
122
+ ellipse: StyledInstance<"web", "ellipse", React.SVGProps<SVGEllipseElement>, BaseObject>;
123
+ foreignObject: StyledInstance<"web", "foreignObject", React.SVGProps<SVGForeignObjectElement>, BaseObject>;
124
+ image: StyledInstance<"web", "image", React.SVGProps<SVGImageElement>, BaseObject>;
125
+ line: StyledInstance<"web", "line", React.SVGLineElementAttributes<SVGLineElement>, BaseObject>;
126
+ linearGradient: StyledInstance<"web", "linearGradient", React.SVGProps<SVGLinearGradientElement>, BaseObject>;
127
+ marker: StyledInstance<"web", "marker", React.SVGProps<SVGMarkerElement>, BaseObject>;
128
+ mask: StyledInstance<"web", "mask", React.SVGProps<SVGMaskElement>, BaseObject>;
129
+ path: StyledInstance<"web", "path", React.SVGProps<SVGPathElement>, BaseObject>;
130
+ pattern: StyledInstance<"web", "pattern", React.SVGProps<SVGPatternElement>, BaseObject>;
131
+ polygon: StyledInstance<"web", "polygon", React.SVGProps<SVGPolygonElement>, BaseObject>;
132
+ polyline: StyledInstance<"web", "polyline", React.SVGProps<SVGPolylineElement>, BaseObject>;
133
+ radialGradient: StyledInstance<"web", "radialGradient", React.SVGProps<SVGRadialGradientElement>, BaseObject>;
134
+ rect: StyledInstance<"web", "rect", React.SVGProps<SVGRectElement>, BaseObject>;
135
+ stop: StyledInstance<"web", "stop", React.SVGProps<SVGStopElement>, BaseObject>;
136
+ text: StyledInstance<"web", "text", React.SVGTextElementAttributes<SVGTextElement>, BaseObject>;
137
+ tspan: StyledInstance<"web", "tspan", React.SVGProps<SVGTSpanElement>, BaseObject>;
138
+ use: StyledInstance<"web", "use", React.SVGProps<SVGUseElement>, BaseObject>;
139
+ };
140
+ export default styled;
141
+ export { StyledInstance };
142
+ /**
143
+ * This is the type of the `styled` HOC.
144
+ */
145
+ export type Styled = typeof styled;
146
+ /**
147
+ * Use this higher-order type for scenarios where you are wrapping `styled`
148
+ * and providing extra props as a third-party library.
149
+ */
150
+ export type LibraryStyled<LibraryProps extends object = BaseObject> = <Target extends WebTarget>(tag: Target) => typeof baseStyled<Target, LibraryProps>;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
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> ? "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" | "getDefaultProps" | "mixins" | "prototype" | "caller" | "callee" | "arguments" | "arity">]: T[key]; };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ import styled from './constructors/styled';
2
+ export default styled;
@@ -0,0 +1,4 @@
1
+ import styled, { LibraryStyled, Styled, StyledInstance } from './constructors/styled';
2
+ export * from './base';
3
+ export { CSSKeyframes, CSSObject, CSSProp, CSSProperties, CSSPseudos, DataAttributes, DefaultTheme, ExecutionContext, ExecutionProps, FastOmit, IStyledComponent, IStyledComponentFactory, IStyledStatics, Interpolation, PolymorphicComponent, PolymorphicComponentProps, RuleSet, Runtime, StyleFunction, StyledObject, StyledOptions, SupportedHTMLElements, WebTarget, } from './types';
4
+ export { LibraryStyled, Styled, StyledInstance, styled as default, styled };
@@ -0,0 +1,15 @@
1
+ import StyleSheet from '../sheet';
2
+ import { ExecutionContext, RuleSet, Stringifier } from '../types';
3
+ /**
4
+ * ComponentStyle is all the CSS-specific stuff, not the React-specific stuff.
5
+ */
6
+ export default class ComponentStyle {
7
+ baseHash: number;
8
+ baseStyle: ComponentStyle | null | undefined;
9
+ componentId: string;
10
+ isStatic: boolean;
11
+ rules: RuleSet<any>;
12
+ staticRulesId: string;
13
+ constructor(rules: RuleSet<any>, componentId: string, baseStyle?: ComponentStyle | undefined);
14
+ generateAndInjectStyles(executionContext: ExecutionContext, styleSheet: StyleSheet, stylis: Stringifier): string;
15
+ }
@@ -0,0 +1,11 @@
1
+ import StyleSheet from '../sheet';
2
+ import { ExecutionContext, RuleSet, Stringifier } from '../types';
3
+ export default class GlobalStyle<Props extends object> {
4
+ componentId: string;
5
+ isStatic: boolean;
6
+ rules: RuleSet<Props>;
7
+ constructor(rules: RuleSet<Props>, componentId: string);
8
+ createStyles(instance: number, executionContext: ExecutionContext & Props, styleSheet: StyleSheet, stylis: Stringifier): void;
9
+ removeStyles(instance: number, styleSheet: StyleSheet): void;
10
+ renderStyles(instance: number, executionContext: ExecutionContext & Props, styleSheet: StyleSheet, stylis: Stringifier): void;
11
+ }
@@ -0,0 +1,6 @@
1
+ import { IInlineStyleConstructor, StyleSheet } from '../types';
2
+ export declare const resetStyleCache: () => void;
3
+ /**
4
+ * InlineStyle takes arbitrary CSS and generates a flat object
5
+ */
6
+ export default function makeInlineStyleClass<Props extends object>(styleSheet: StyleSheet): IInlineStyleConstructor<Props>;
@@ -0,0 +1,10 @@
1
+ import StyleSheet from '../sheet';
2
+ import { Keyframes as KeyframesType, Stringifier } from '../types';
3
+ export default class Keyframes implements KeyframesType {
4
+ id: string;
5
+ name: string;
6
+ rules: string;
7
+ constructor(name: string, rules: string);
8
+ inject: (styleSheet: StyleSheet, stylisInstance?: Stringifier) => void;
9
+ getName(stylisInstance?: Stringifier): string;
10
+ }
@@ -0,0 +1,16 @@
1
+ /// <reference types="node" />
2
+ import React from 'react';
3
+ import type * as streamInternal from 'stream';
4
+ import { Readable } from 'stream';
5
+ import StyleSheet from '../sheet';
6
+ export default class ServerStyleSheet {
7
+ instance: StyleSheet;
8
+ sealed: boolean;
9
+ constructor();
10
+ _emitSheetCSS: () => string;
11
+ collectStyles(children: any): React.JSX.Element;
12
+ getStyleTags: () => string;
13
+ getStyleElement: () => React.JSX.Element[];
14
+ interleaveWithNodeStream(input: Readable): streamInternal.Transform;
15
+ seal: () => void;
16
+ }
@@ -0,0 +1,65 @@
1
+ import React from 'react';
2
+ import type stylis from 'stylis';
3
+ import StyleSheet from '../sheet';
4
+ import { InsertionTarget, ShouldForwardProp, Stringifier } from '../types';
5
+ export declare const mainSheet: StyleSheet;
6
+ export declare const mainStylis: Stringifier;
7
+ export type IStyleSheetContext = {
8
+ shouldForwardProp?: ShouldForwardProp<'web'> | undefined;
9
+ styleSheet: StyleSheet;
10
+ stylis: Stringifier;
11
+ };
12
+ export declare const StyleSheetContext: React.Context<IStyleSheetContext>;
13
+ export declare const StyleSheetConsumer: React.Consumer<IStyleSheetContext>;
14
+ export type IStylisContext = Stringifier | void;
15
+ export declare const StylisContext: React.Context<IStylisContext>;
16
+ export declare const StylisConsumer: React.Consumer<IStylisContext>;
17
+ export declare function useStyleSheetContext(): IStyleSheetContext;
18
+ export type IStyleSheetManager = React.PropsWithChildren<{
19
+ /**
20
+ * If desired, you can pass this prop to disable "speedy" insertion mode, which
21
+ * uses the browser [CSSOM APIs](https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleSheet).
22
+ * When disabled, rules are inserted as simple text into style blocks.
23
+ */
24
+ disableCSSOMInjection?: undefined | boolean;
25
+ /**
26
+ * If you are working exclusively with modern browsers, vendor prefixes can often be omitted
27
+ * to reduce the weight of CSS on the page.
28
+ */
29
+ enableVendorPrefixes?: undefined | boolean;
30
+ /**
31
+ * Provide an optional selector to be prepended to all generated style rules.
32
+ */
33
+ namespace?: undefined | string;
34
+ /**
35
+ * Create and provide your own `StyleSheet` if necessary for advanced SSR scenarios.
36
+ */
37
+ sheet?: undefined | StyleSheet;
38
+ /**
39
+ * Starting in v6, styled-components no longer does its own prop validation
40
+ * and recommends use of transient props "$prop" to pass style-only props to
41
+ * components. If for some reason you are not able to use transient props, a
42
+ * prop validation function can be provided via `StyleSheetManager`, such as
43
+ * `@emotion/is-prop-valid`.
44
+ *
45
+ * When the return value is `true`, props will be forwarded to the DOM/underlying
46
+ * component. If return value is `false`, the prop will be discarded after styles
47
+ * are calculated.
48
+ *
49
+ * Manually composing `styled.{element}.withConfig({shouldForwardProp})` will
50
+ * override this default.
51
+ */
52
+ shouldForwardProp?: undefined | IStyleSheetContext['shouldForwardProp'];
53
+ /**
54
+ * An array of plugins to be run by stylis (style processor) during compilation.
55
+ * Check out [what's available on npm*](https://www.npmjs.com/search?q=keywords%3Astylis).
56
+ *
57
+ * \* The plugin(s) must be compatible with stylis v4 or above.
58
+ */
59
+ stylisPlugins?: undefined | stylis.Middleware[];
60
+ /**
61
+ * Provide an alternate DOM node to host generated styles; useful for iframes.
62
+ */
63
+ target?: undefined | InsertionTarget;
64
+ }>;
65
+ export declare function StyleSheetManager(props: IStyleSheetManager): React.JSX.Element;
@@ -0,0 +1,3 @@
1
+ import type { BaseObject, IStyledComponentFactory, RuleSet, StyledOptions, WebTarget } from '../types';
2
+ declare function createStyledComponent<Target extends WebTarget, OuterProps extends object, Statics extends object = BaseObject>(target: Target, options: StyledOptions<'web', OuterProps>, rules: RuleSet<OuterProps>): ReturnType<IStyledComponentFactory<'web', Target, OuterProps, Statics>>;
3
+ export default createStyledComponent;
@@ -0,0 +1,3 @@
1
+ import type { BaseObject, ExecutionProps, IInlineStyleConstructor, IStyledComponentFactory, NativeTarget, RuleSet, StyledOptions } from '../types';
2
+ declare const _default: (InlineStyle: IInlineStyleConstructor<any>) => <Target extends NativeTarget, OuterProps extends ExecutionProps, Statics extends object = BaseObject>(target: Target, options: StyledOptions<'native', OuterProps>, rules: RuleSet<OuterProps>) => ReturnType<IStyledComponentFactory<'native', Target, OuterProps, Statics>>;
3
+ export default _default;