styled-components 5.3.9 → 5.3.11

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 (236) hide show
  1. package/dist/styled-components.browser.cjs.js +1 -1
  2. package/dist/styled-components.browser.cjs.js.map +1 -1
  3. package/dist/styled-components.browser.esm.js +1 -1
  4. package/dist/styled-components.browser.esm.js.map +1 -1
  5. package/dist/styled-components.cjs.js +1 -1
  6. package/dist/styled-components.cjs.js.map +1 -1
  7. package/dist/styled-components.esm.js +1 -1
  8. package/dist/styled-components.esm.js.map +1 -1
  9. package/dist/styled-components.js +1 -1
  10. package/dist/styled-components.js.map +1 -1
  11. package/dist/styled-components.min.js +1 -1
  12. package/dist/styled-components.min.js.map +1 -1
  13. package/native/dist/base.d.ts +2 -3
  14. package/native/dist/constructors/constructWithOptions.d.ts +18 -3
  15. package/native/dist/index.d.ts +1 -1
  16. package/native/dist/models/ComponentStyle.d.ts +0 -1
  17. package/native/dist/models/StyleSheetManager.d.ts +6 -7
  18. package/native/dist/models/ThemeProvider.d.ts +1 -0
  19. package/native/dist/native/index.d.ts +25 -26
  20. package/native/dist/sheet/GroupedTag.d.ts +1 -1
  21. package/native/dist/styled-components.native.cjs.js +3 -3
  22. package/native/dist/styled-components.native.cjs.js.map +1 -1
  23. package/native/dist/styled-components.native.esm.js +3 -3
  24. package/native/dist/styled-components.native.esm.js.map +1 -1
  25. package/native/dist/test/types.d.ts +9 -1
  26. package/native/dist/test/veryLargeUnionType.d.ts +1 -0
  27. package/native/dist/types.d.ts +28 -23
  28. package/native/dist/utils/determineTheme.d.ts +4 -2
  29. package/native/dist/utils/domElements.d.ts +1 -1
  30. package/native/dist/utils/flatten.d.ts +1 -1
  31. package/native/dist/utils/isPlainObject.d.ts +1 -1
  32. package/native/dist/utils/isStatelessFunction.d.ts +1 -1
  33. package/native/dist/utils/joinStrings.d.ts +2 -1
  34. package/package.json +1 -1
  35. package/primitives/dist/styled-components-primitives.cjs.js +3 -3
  36. package/primitives/dist/styled-components-primitives.cjs.js.map +1 -1
  37. package/primitives/dist/styled-components-primitives.esm.js +3 -3
  38. package/primitives/dist/styled-components-primitives.esm.js.map +1 -1
  39. package/native/dist/base.d.ts.map +0 -1
  40. package/native/dist/constants.d.ts.map +0 -1
  41. package/native/dist/constructors/constructWithOptions.d.ts.map +0 -1
  42. package/native/dist/constructors/createGlobalStyle.d.ts.map +0 -1
  43. package/native/dist/constructors/css.d.ts.map +0 -1
  44. package/native/dist/constructors/keyframes.d.ts.map +0 -1
  45. package/native/dist/constructors/styled.d.ts.map +0 -1
  46. package/native/dist/dist/base.d.ts +0 -18
  47. package/native/dist/dist/base.d.ts.map +0 -1
  48. package/native/dist/dist/constants.d.ts +0 -9
  49. package/native/dist/dist/constants.d.ts.map +0 -1
  50. package/native/dist/dist/constructors/constructWithOptions.d.ts +0 -20
  51. package/native/dist/dist/constructors/constructWithOptions.d.ts.map +0 -1
  52. package/native/dist/dist/constructors/createGlobalStyle.d.ts +0 -4
  53. package/native/dist/dist/constructors/createGlobalStyle.d.ts.map +0 -1
  54. package/native/dist/dist/constructors/css.d.ts +0 -5
  55. package/native/dist/dist/constructors/css.d.ts.map +0 -1
  56. package/native/dist/dist/constructors/keyframes.d.ts +0 -4
  57. package/native/dist/dist/constructors/keyframes.d.ts.map +0 -1
  58. package/native/dist/dist/constructors/styled.d.ts +0 -186
  59. package/native/dist/dist/constructors/styled.d.ts.map +0 -1
  60. package/native/dist/dist/hoc/withTheme.d.ts +0 -4
  61. package/native/dist/dist/hoc/withTheme.d.ts.map +0 -1
  62. package/native/dist/dist/hoc/withTheme.spec.d.ts +0 -2
  63. package/native/dist/dist/hoc/withTheme.spec.d.ts.map +0 -1
  64. package/native/dist/dist/hooks/useTheme.d.ts +0 -4
  65. package/native/dist/dist/hooks/useTheme.d.ts.map +0 -1
  66. package/native/dist/dist/index-standalone.d.ts +0 -3
  67. package/native/dist/dist/index-standalone.d.ts.map +0 -1
  68. package/native/dist/dist/index.d.ts +0 -4
  69. package/native/dist/dist/index.d.ts.map +0 -1
  70. package/native/dist/dist/macro/index.d.ts +0 -3
  71. package/native/dist/dist/macro/index.d.ts.map +0 -1
  72. package/native/dist/dist/macro/test/babel.config.d.ts +0 -1
  73. package/native/dist/dist/macro/test/babel.config.d.ts.map +0 -1
  74. package/native/dist/dist/models/ComponentStyle.d.ts +0 -16
  75. package/native/dist/dist/models/ComponentStyle.d.ts.map +0 -1
  76. package/native/dist/dist/models/GlobalStyle.d.ts +0 -12
  77. package/native/dist/dist/models/GlobalStyle.d.ts.map +0 -1
  78. package/native/dist/dist/models/InlineStyle.d.ts +0 -7
  79. package/native/dist/dist/models/InlineStyle.d.ts.map +0 -1
  80. package/native/dist/dist/models/Keyframes.d.ts +0 -12
  81. package/native/dist/dist/models/Keyframes.d.ts.map +0 -1
  82. package/native/dist/dist/models/ServerStyleSheet.d.ts +0 -16
  83. package/native/dist/dist/models/ServerStyleSheet.d.ts.map +0 -1
  84. package/native/dist/dist/models/StyleSheetManager.d.ts +0 -22
  85. package/native/dist/dist/models/StyleSheetManager.d.ts.map +0 -1
  86. package/native/dist/dist/models/StyledComponent.d.ts +0 -4
  87. package/native/dist/dist/models/StyledComponent.d.ts.map +0 -1
  88. package/native/dist/dist/models/StyledNativeComponent.d.ts +0 -4
  89. package/native/dist/dist/models/StyledNativeComponent.d.ts.map +0 -1
  90. package/native/dist/dist/models/ThemeProvider.d.ts +0 -18
  91. package/native/dist/dist/models/ThemeProvider.d.ts.map +0 -1
  92. package/native/dist/dist/native/index.d.ts +0 -65
  93. package/native/dist/dist/native/index.d.ts.map +0 -1
  94. package/native/dist/dist/primitives/index.d.ts +0 -23
  95. package/native/dist/dist/primitives/index.d.ts.map +0 -1
  96. package/native/dist/dist/secretInternals.d.ts +0 -6
  97. package/native/dist/dist/secretInternals.d.ts.map +0 -1
  98. package/native/dist/dist/sheet/GroupIDAllocator.d.ts +0 -5
  99. package/native/dist/dist/sheet/GroupIDAllocator.d.ts.map +0 -1
  100. package/native/dist/dist/sheet/GroupedTag.d.ts +0 -12
  101. package/native/dist/dist/sheet/GroupedTag.d.ts.map +0 -1
  102. package/native/dist/dist/sheet/Rehydration.d.ts +0 -4
  103. package/native/dist/dist/sheet/Rehydration.d.ts.map +0 -1
  104. package/native/dist/dist/sheet/Sheet.d.ts +0 -41
  105. package/native/dist/dist/sheet/Sheet.d.ts.map +0 -1
  106. package/native/dist/dist/sheet/Tag.d.ts +0 -55
  107. package/native/dist/dist/sheet/Tag.d.ts.map +0 -1
  108. package/native/dist/dist/sheet/dom.d.ts +0 -5
  109. package/native/dist/dist/sheet/dom.d.ts.map +0 -1
  110. package/native/dist/dist/sheet/index.d.ts +0 -2
  111. package/native/dist/dist/sheet/index.d.ts.map +0 -1
  112. package/native/dist/dist/sheet/types.d.ts +0 -35
  113. package/native/dist/dist/sheet/types.d.ts.map +0 -1
  114. package/native/dist/dist/test/globals.d.ts +0 -3
  115. package/native/dist/dist/test/globals.d.ts.map +0 -1
  116. package/native/dist/dist/test/utils.d.ts +0 -192
  117. package/native/dist/dist/test/utils.d.ts.map +0 -1
  118. package/native/dist/dist/types.d.ts +0 -121
  119. package/native/dist/dist/types.d.ts.map +0 -1
  120. package/native/dist/dist/utils/addUnitIfNeeded.d.ts +0 -2
  121. package/native/dist/dist/utils/addUnitIfNeeded.d.ts.map +0 -1
  122. package/native/dist/dist/utils/checkDynamicCreation.d.ts +0 -2
  123. package/native/dist/dist/utils/checkDynamicCreation.d.ts.map +0 -1
  124. package/native/dist/dist/utils/createWarnTooManyClasses.d.ts +0 -4
  125. package/native/dist/dist/utils/createWarnTooManyClasses.d.ts.map +0 -1
  126. package/native/dist/dist/utils/determineTheme.d.ts +0 -3
  127. package/native/dist/dist/utils/determineTheme.d.ts.map +0 -1
  128. package/native/dist/dist/utils/domElements.d.ts +0 -3
  129. package/native/dist/dist/utils/domElements.d.ts.map +0 -1
  130. package/native/dist/dist/utils/empties.d.ts +0 -4
  131. package/native/dist/dist/utils/empties.d.ts.map +0 -1
  132. package/native/dist/dist/utils/error.d.ts +0 -6
  133. package/native/dist/dist/utils/error.d.ts.map +0 -1
  134. package/native/dist/dist/utils/errors.d.ts +0 -21
  135. package/native/dist/dist/utils/errors.d.ts.map +0 -1
  136. package/native/dist/dist/utils/escape.d.ts +0 -6
  137. package/native/dist/dist/utils/escape.d.ts.map +0 -1
  138. package/native/dist/dist/utils/flatten.d.ts +0 -5
  139. package/native/dist/dist/utils/flatten.d.ts.map +0 -1
  140. package/native/dist/dist/utils/generateAlphabeticName.d.ts +0 -2
  141. package/native/dist/dist/utils/generateAlphabeticName.d.ts.map +0 -1
  142. package/native/dist/dist/utils/generateComponentId.d.ts +0 -2
  143. package/native/dist/dist/utils/generateComponentId.d.ts.map +0 -1
  144. package/native/dist/dist/utils/generateDisplayName.d.ts +0 -3
  145. package/native/dist/dist/utils/generateDisplayName.d.ts.map +0 -1
  146. package/native/dist/dist/utils/getComponentName.d.ts +0 -3
  147. package/native/dist/dist/utils/getComponentName.d.ts.map +0 -1
  148. package/native/dist/dist/utils/hash.d.ts +0 -4
  149. package/native/dist/dist/utils/hash.d.ts.map +0 -1
  150. package/native/dist/dist/utils/hoist.d.ts +0 -52
  151. package/native/dist/dist/utils/hoist.d.ts.map +0 -1
  152. package/native/dist/dist/utils/hyphenateStyleName.d.ts +0 -15
  153. package/native/dist/dist/utils/hyphenateStyleName.d.ts.map +0 -1
  154. package/native/dist/dist/utils/interleave.d.ts +0 -3
  155. package/native/dist/dist/utils/interleave.d.ts.map +0 -1
  156. package/native/dist/dist/utils/isFunction.d.ts +0 -2
  157. package/native/dist/dist/utils/isFunction.d.ts.map +0 -1
  158. package/native/dist/dist/utils/isPlainObject.d.ts +0 -2
  159. package/native/dist/dist/utils/isPlainObject.d.ts.map +0 -1
  160. package/native/dist/dist/utils/isStatelessFunction.d.ts +0 -2
  161. package/native/dist/dist/utils/isStatelessFunction.d.ts.map +0 -1
  162. package/native/dist/dist/utils/isStaticRules.d.ts +0 -3
  163. package/native/dist/dist/utils/isStaticRules.d.ts.map +0 -1
  164. package/native/dist/dist/utils/isStyledComponent.d.ts +0 -3
  165. package/native/dist/dist/utils/isStyledComponent.d.ts.map +0 -1
  166. package/native/dist/dist/utils/isTag.d.ts +0 -3
  167. package/native/dist/dist/utils/isTag.d.ts.map +0 -1
  168. package/native/dist/dist/utils/joinStrings.d.ts +0 -5
  169. package/native/dist/dist/utils/joinStrings.d.ts.map +0 -1
  170. package/native/dist/dist/utils/mixinDeep.d.ts +0 -8
  171. package/native/dist/dist/utils/mixinDeep.d.ts.map +0 -1
  172. package/native/dist/dist/utils/nonce.d.ts +0 -2
  173. package/native/dist/dist/utils/nonce.d.ts.map +0 -1
  174. package/native/dist/dist/utils/stylis.d.ts +0 -10
  175. package/native/dist/dist/utils/stylis.d.ts.map +0 -1
  176. package/native/dist/hoc/withTheme.d.ts.map +0 -1
  177. package/native/dist/hoc/withTheme.spec.d.ts.map +0 -1
  178. package/native/dist/hooks/useTheme.d.ts +0 -3
  179. package/native/dist/hooks/useTheme.d.ts.map +0 -1
  180. package/native/dist/index-standalone.d.ts.map +0 -1
  181. package/native/dist/index.d.ts.map +0 -1
  182. package/native/dist/macro/index.d.ts.map +0 -1
  183. package/native/dist/macro/test/babel.config.d.ts +0 -1
  184. package/native/dist/macro/test/babel.config.d.ts.map +0 -1
  185. package/native/dist/models/ComponentStyle.d.ts.map +0 -1
  186. package/native/dist/models/GlobalStyle.d.ts.map +0 -1
  187. package/native/dist/models/InlineStyle.d.ts.map +0 -1
  188. package/native/dist/models/Keyframes.d.ts.map +0 -1
  189. package/native/dist/models/ServerStyleSheet.d.ts.map +0 -1
  190. package/native/dist/models/StyleSheetManager.d.ts.map +0 -1
  191. package/native/dist/models/StyledComponent.d.ts.map +0 -1
  192. package/native/dist/models/StyledNativeComponent.d.ts.map +0 -1
  193. package/native/dist/models/ThemeProvider.d.ts.map +0 -1
  194. package/native/dist/native/index.d.ts.map +0 -1
  195. package/native/dist/primitives/index.d.ts +0 -23
  196. package/native/dist/primitives/index.d.ts.map +0 -1
  197. package/native/dist/secretInternals.d.ts.map +0 -1
  198. package/native/dist/sheet/GroupIDAllocator.d.ts.map +0 -1
  199. package/native/dist/sheet/GroupedTag.d.ts.map +0 -1
  200. package/native/dist/sheet/Rehydration.d.ts.map +0 -1
  201. package/native/dist/sheet/Sheet.d.ts.map +0 -1
  202. package/native/dist/sheet/Tag.d.ts.map +0 -1
  203. package/native/dist/sheet/dom.d.ts.map +0 -1
  204. package/native/dist/sheet/index.d.ts.map +0 -1
  205. package/native/dist/sheet/types.d.ts.map +0 -1
  206. package/native/dist/test/globals.d.ts.map +0 -1
  207. package/native/dist/test/utils.d.ts.map +0 -1
  208. package/native/dist/types.d.ts.map +0 -1
  209. package/native/dist/utils/addUnitIfNeeded.d.ts.map +0 -1
  210. package/native/dist/utils/checkDynamicCreation.d.ts.map +0 -1
  211. package/native/dist/utils/createWarnTooManyClasses.d.ts.map +0 -1
  212. package/native/dist/utils/determineTheme.d.ts.map +0 -1
  213. package/native/dist/utils/domElements.d.ts.map +0 -1
  214. package/native/dist/utils/empties.d.ts.map +0 -1
  215. package/native/dist/utils/error.d.ts.map +0 -1
  216. package/native/dist/utils/errors.d.ts.map +0 -1
  217. package/native/dist/utils/escape.d.ts.map +0 -1
  218. package/native/dist/utils/flatten.d.ts.map +0 -1
  219. package/native/dist/utils/generateAlphabeticName.d.ts.map +0 -1
  220. package/native/dist/utils/generateComponentId.d.ts.map +0 -1
  221. package/native/dist/utils/generateDisplayName.d.ts.map +0 -1
  222. package/native/dist/utils/getComponentName.d.ts.map +0 -1
  223. package/native/dist/utils/hash.d.ts.map +0 -1
  224. package/native/dist/utils/hoist.d.ts.map +0 -1
  225. package/native/dist/utils/hyphenateStyleName.d.ts.map +0 -1
  226. package/native/dist/utils/interleave.d.ts.map +0 -1
  227. package/native/dist/utils/isFunction.d.ts.map +0 -1
  228. package/native/dist/utils/isPlainObject.d.ts.map +0 -1
  229. package/native/dist/utils/isStatelessFunction.d.ts.map +0 -1
  230. package/native/dist/utils/isStaticRules.d.ts.map +0 -1
  231. package/native/dist/utils/isStyledComponent.d.ts.map +0 -1
  232. package/native/dist/utils/isTag.d.ts.map +0 -1
  233. package/native/dist/utils/joinStrings.d.ts.map +0 -1
  234. package/native/dist/utils/mixinDeep.d.ts.map +0 -1
  235. package/native/dist/utils/nonce.d.ts.map +0 -1
  236. package/native/dist/utils/stylis.d.ts.map +0 -1
@@ -1 +1,9 @@
1
- export {};
1
+ import { CSSProp } from '../index';
2
+ /**
3
+ * `css` prop
4
+ */
5
+ declare module 'react' {
6
+ interface Attributes {
7
+ css?: CSSProp;
8
+ }
9
+ }
@@ -0,0 +1 @@
1
+ export type VeryLargeUnionType = "add-clip" | "add-column-left" | "add-column-right" | "add-location" | "add-row-bottom" | "add-row-top" | "add-to-artifact" | "add-to-folder" | "add" | "aimpoints-target" | "airplane" | "align-center" | "align-justify" | "align-left" | "align-right" | "alignment-bottom" | "alignment-horizontal-center" | "alignment-left" | "alignment-right" | "alignment-top" | "alignment-vertical-center" | "anchor" | "annotation" | "antenna" | "app-header" | "application" | "applications" | "archive" | "area-of-interest" | "array-boolean" | "array-date" | "array-floating-point" | "array-numeric" | "array-string" | "array-timestamp" | "array" | "arrow-bottom-left" | "arrow-bottom-right" | "arrow-down" | "arrow-left" | "arrow-right" | "arrow-top-left" | "arrow-top-right" | "arrow-up" | "arrows-horizontal" | "arrows-vertical" | "asterisk" | "at" | "automatic-updates" | "axle" | "backlink" | "badge" | "ban-circle" | "bank-account" | "barcode" | "blank" | "blocked-person" | "bold" | "book" | "bookmark" | "box" | "briefcase" | "bring-data" | "bug" | "buggy" | "build" | "calculator" | "calendar" | "camera" | "caret-down" | "caret-left" | "caret-right" | "caret-up" | "cargo-ship" | "cell-tower" | "changes" | "chart" | "chat" | "chevron-backward" | "chevron-down" | "chevron-forward" | "chevron-left" | "chevron-right" | "chevron-up" | "circle-arrow-down" | "circle-arrow-left" | "circle-arrow-right" | "circle-arrow-up" | "circle" | "citation" | "clean" | "clip" | "clipboard" | "cloud-download" | "cloud-upload" | "cloud" | "code-block" | "code" | "cog" | "collapse-all" | "color-fill" | "column-layout" | "comment" | "comparison" | "compass" | "compressed" | "confirm" | "console" | "contrast" | "control" | "credit-card" | "cross-circle" | "cross" | "crown" | "cube-add" | "cube-remove" | "cube" | "curved-range-chart" | "cut" | "cycle" | "dashboard" | "data-connection" | "data-lineage" | "database" | "delete" | "delta" | "derive-column" | "desktop" | "diagnosis" | "diagram-tree" | "direction-left" | "direction-right" | "disable" | "divide" | "document-open" | "document-share" | "document" | "dollar" | "dot" | "double-caret-horizontal" | "double-caret-vertical" | "double-chevron-down" | "double-chevron-left" | "double-chevron-right" | "double-chevron-up" | "doughnut-chart" | "download" | "drag-handle-horizontal" | "drag-handle-vertical" | "draw" | "drawer-left-filled" | "drawer-left" | "drawer-right-filled" | "drawer-right" | "drive-time" | "duplicate" | "edit" | "eject" | "emoji" | "endorsed" | "envelope" | "equals" | "eraser" | "error" | "euro" | "exchange" | "exclude-row" | "expand-all" | "export" | "eye-off" | "eye-on" | "eye-open" | "fast-backward" | "fast-forward" | "feed-subscribed" | "feed" | "film" | "filter-keep" | "filter-list" | "filter-open" | "filter-remove" | "filter" | "flag" | "flame" | "flash" | "floating-point" | "floppy-disk" | "flow-branch" | "flow-end" | "flow-linear" | "flow-review-branch" | "flow-review" | "flows" | "folder-close" | "folder-new" | "folder-open" | "folder-shared-open" | "folder-shared" | "follower" | "following" | "font" | "fork" | "form" | "fuel" | "full-circle" | "full-stacked-chart" | "fullscreen" | "function" | "gantt-chart" | "geofence" | "geolocation" | "geosearch" | "git-branch" | "git-commit" | "git-merge" | "git-new-branch" | "git-pull" | "git-push" | "git-repo" | "glass" | "globe-network" | "globe" | "graph-remove" | "graph" | "greater-than-or-equal-to" | "greater-than" | "grid-view" | "grid" | "group-objects" | "grouped-bar-chart" | "hand-down" | "hand-left" | "hand-right" | "hand-up" | "hand" | "hat" | "header-one" | "header-three" | "header-two" | "header" | "headset" | "heart-broken" | "heart" | "heat-grid" | "heatmap" | "helicopter" | "help" | "helper-management" | "high-priority" | "high-voltage-pole" | "highlight" | "history" | "home" | "horizontal-bar-chart-asc" | "horizontal-bar-chart-desc" | "horizontal-bar-chart" | "horizontal-distribution" | "horizontal-inbetween" | "hurricane" | "id-number" | "image-rotate-left" | "image-rotate-right" | "import" | "inbox-filtered" | "inbox-geo" | "inbox-search" | "inbox-update" | "inbox" | "info-sign" | "inheritance" | "inherited-group" | "inner-join" | "insert" | "intelligence" | "intersection" | "ip-address" | "issue-closed" | "issue-new" | "issue" | "italic" | "join-table" | "key-backspace" | "key-command" | "key-control" | "key-delete" | "key-enter" | "key-escape" | "key-option" | "key-shift" | "key-tab" | "key" | "known-vehicle" | "lab-test" | "label" | "layer-outline" | "layer" | "layers" | "layout-auto" | "layout-balloon" | "layout-circle" | "layout-grid" | "layout-group-by" | "layout-hierarchy" | "layout-linear" | "layout-skew-grid" | "layout-sorted-clusters" | "layout" | "learning" | "left-join" | "less-than-or-equal-to" | "less-than" | "lifesaver" | "lightbulb" | "lightning" | "link" | "list-columns" | "list-detail-view" | "list" | "locate" | "lock" | "locomotive" | "log-in" | "log-out" | "low-voltage-pole" | "manual" | "manually-entered-data" | "many-to-many" | "many-to-one" | "map-create" | "map-marker" | "map" | "maximize" | "media" | "menu-closed" | "menu-open" | "menu" | "merge-columns" | "merge-links" | "minimize" | "minus" | "mobile-phone" | "mobile-video" | "modal-filled" | "modal" | "model" | "moon" | "more" | "mountain" | "move" | "mugshot" | "multi-select" | "music" | "nest" | "new-drawing" | "new-grid-item" | "new-layer" | "new-layers" | "new-link" | "new-object" | "new-person" | "new-prescription" | "new-text-box" | "ninja" | "not-equal-to" | "notifications-snooze" | "notifications-updated" | "notifications" | "numbered-list" | "numerical" | "office" | "offline" | "oil-field" | "one-column" | "one-to-many" | "one-to-one" | "open-application" | "outdated" | "page-layout" | "panel-stats" | "panel-table" | "paperclip" | "paragraph" | "path-search" | "path" | "pause" | "people" | "percentage" | "person" | "phone" | "pie-chart" | "pin" | "pivot-table" | "pivot" | "play" | "playbook" | "plus" | "polygon-filter" | "power" | "predictive-analysis" | "prescription" | "presentation" | "print" | "projects" | "properties" | "property" | "publish-function" | "pulse" | "rain" | "random" | "record" | "rect-height" | "rect-width" | "rectangle" | "redo" | "refresh" | "regex" | "regression-chart" | "remove-column-left" | "remove-column-right" | "remove-column" | "remove-row-bottom" | "remove-row-top" | "remove" | "repeat" | "reset" | "resolve" | "rig" | "right-join" | "ring" | "rocket-slant" | "rocket" | "rotate-document" | "rotate-page" | "route" | "satellite" | "saved" | "scatter-plot" | "search-around" | "search-template" | "search-text" | "search" | "segmented-control" | "select" | "selection" | "send-message" | "send-to-graph" | "send-to-map" | "send-to" | "sensor" | "series-add" | "series-configuration" | "series-derived" | "series-filtered" | "series-search" | "settings" | "shapes" | "share" | "shared-filter" | "shield" | "ship" | "shop" | "shopping-cart" | "signal-search" | "sim-card" | "slash" | "small-cross" | "small-info-sign" | "small-minus" | "small-plus" | "small-square" | "small-tick" | "snowflake" | "social-media" | "sort-alphabetical-desc" | "sort-alphabetical" | "sort-asc" | "sort-desc" | "sort-numerical-desc" | "sort-numerical" | "sort" | "split-columns" | "square" | "stacked-chart" | "stadium-geometry" | "star-empty" | "star" | "step-backward" | "step-chart" | "step-forward" | "stop" | "stopwatch" | "strikethrough" | "style" | "subscript" | "superscript" | "swap-horizontal" | "swap-vertical" | "switch" | "symbol-circle" | "symbol-cross" | "symbol-diamond" | "symbol-rectangle" | "symbol-square" | "symbol-triangle-down" | "symbol-triangle-up" | "syringe" | "tag" | "take-action" | "tank" | "target" | "taxi" | "temperature" | "text-highlight" | "th-derived" | "th-disconnect" | "th-filtered" | "th-list" | "th" | "third-party" | "thumbs-down" | "thumbs-up" | "tick-circle" | "tick" | "time" | "timeline-area-chart" | "timeline-bar-chart" | "timeline-events" | "timeline-line-chart" | "tint" | "torch" | "tractor" | "train" | "translate" | "trash" | "tree" | "trending-down" | "trending-up" | "truck" | "two-columns" | "unarchive" | "underline" | "undo" | "ungroup-objects" | "unknown-vehicle" | "unlock" | "unpin" | "unresolve" | "updated" | "upload" | "user" | "variable" | "vertical-bar-chart-asc" | "vertical-bar-chart-desc" | "vertical-distribution" | "vertical-inbetween" | "video" | "virus" | "volume-down" | "volume-off" | "volume-up" | "walk" | "warning-sign" | "waterfall-chart" | "waves" | "widget-button" | "widget-footer" | "widget-header" | "widget" | "wind" | "wrench" | "zoom-in" | "zoom-out" | "zoom-to-fit";
@@ -17,7 +17,7 @@ export type WebTarget = string | KnownTarget;
17
17
  export type NativeTarget = AnyComponent;
18
18
  export type StyledTarget<R extends Runtime> = R extends 'web' ? WebTarget : NativeTarget;
19
19
  export interface StyledOptions<R extends Runtime, Props extends object> {
20
- attrs?: AttrsArg<Props>[];
20
+ attrs?: Attrs<Props>[];
21
21
  componentId?: R extends 'web' ? string : never;
22
22
  displayName?: string;
23
23
  parentComponentId?: R extends 'web' ? string : never;
@@ -26,6 +26,9 @@ export interface StyledOptions<R extends Runtime, Props extends object> {
26
26
  export type Dict<T> = {
27
27
  [key: string]: T;
28
28
  };
29
+ export interface DataAttributes {
30
+ [key: `data-${string}`]: unknown;
31
+ }
29
32
  export interface ExecutionProps {
30
33
  /**
31
34
  * Dynamically adjust the rendered component or HTML tag, e.g.
@@ -48,11 +51,10 @@ export interface ExecutionContext extends ExecutionProps {
48
51
  theme: DefaultTheme;
49
52
  }
50
53
  export interface StyleFunction<Props extends object> {
51
- (executionContext: ExecutionContext & Omit<Props, keyof ExecutionContext>): Interpolation<Props>;
54
+ (executionContext: ExecutionContext & Props): Interpolation<Props>;
52
55
  }
53
- export type Interpolation<Props extends object> = StyleFunction<Props> | StyledObject<Props> | TemplateStringsArray | string | number | false | undefined | null | Keyframes | IStyledComponent<'web', any, any> | Interpolation<Props>[];
54
- export type AttrsArg<Props extends object> = (Omit<ExecutionProps, keyof Props> & Props) | ((props: Omit<ExecutionContext, keyof Props> & Props) => Partial<Props>);
55
- export type Attrs = object | ((...args: any) => object);
56
+ export type Interpolation<Props extends object> = StyleFunction<Props> | StyledObject<Props> | TemplateStringsArray | string | number | false | undefined | null | Keyframes | IStyledComponent<'web', any> | Interpolation<Props>[];
57
+ export type Attrs<Props extends object = object> = (ExecutionProps & Props) | ((props: ExecutionContext & Props) => Props);
56
58
  export type RuleSet<Props extends object> = Interpolation<Props>[];
57
59
  export type Styles<Props extends object> = TemplateStringsArray | StyledObject<Props> | StyleFunction<Props>;
58
60
  export type NameGenerator = (hash: number) => string;
@@ -76,13 +78,13 @@ export interface ShouldForwardProp<R extends Runtime> {
76
78
  (prop: string, elementToBeCreated: StyledTarget<R>): boolean;
77
79
  }
78
80
  export interface CommonStatics<R extends Runtime, Props extends object> {
79
- attrs: AttrsArg<Props>[];
81
+ attrs: Attrs<Props>[];
80
82
  target: StyledTarget<R>;
81
83
  shouldForwardProp?: ShouldForwardProp<R>;
82
84
  }
83
85
  export interface IStyledStatics<R extends Runtime, OuterProps extends object> extends CommonStatics<R, OuterProps> {
84
86
  componentStyle: R extends 'web' ? ComponentStyle : never;
85
- foldedComponentIds: R extends 'web' ? Array<string> : never;
87
+ foldedComponentIds: R extends 'web' ? string : never;
86
88
  inlineStyle: R extends 'native' ? InstanceType<IInlineStyleConstructor<OuterProps>> : never;
87
89
  target: StyledTarget<R>;
88
90
  styledComponentId: R extends 'web' ? string : never;
@@ -91,7 +93,7 @@ export interface IStyledStatics<R extends Runtime, OuterProps extends object> ex
91
93
  /**
92
94
  * Used by PolymorphicComponent to define prop override cascading order.
93
95
  */
94
- export type PolymorphicComponentProps<R extends Runtime, E extends StyledTarget<R>, P extends object> = Omit<E extends KnownTarget ? P & Omit<React.ComponentPropsWithRef<E>, keyof P> : P, 'as' | 'theme'> & {
96
+ export type PolymorphicComponentProps<R extends Runtime, E extends StyledTarget<R>, P extends object> = Omit<E extends KnownTarget ? Omit<P, keyof React.ComponentPropsWithRef<E>> & React.ComponentPropsWithRef<E> : P, 'as' | 'theme'> & {
95
97
  as?: P extends {
96
98
  as?: string | AnyComponent;
97
99
  } ? P['as'] : E;
@@ -106,7 +108,7 @@ export type PolymorphicComponentProps<R extends Runtime, E extends StyledTarget<
106
108
  export interface PolymorphicComponent<R extends Runtime, P extends object, FallbackComponent extends StyledTarget<R>> extends React.ForwardRefExoticComponent<P> {
107
109
  <E extends StyledTarget<R> = FallbackComponent>(props: PolymorphicComponentProps<R, E, P>): React.ReactElement | null;
108
110
  }
109
- export interface IStyledComponent<R extends Runtime, Target extends StyledTarget<R>, Props extends object> extends PolymorphicComponent<R, Props, Target>, IStyledStatics<R, Props> {
111
+ export interface IStyledComponent<R extends Runtime, Target extends StyledTarget<R>, Props extends object = Target extends KnownTarget ? React.ComponentPropsWithRef<Target> : object> extends PolymorphicComponent<R, Props, Target>, IStyledStatics<R, Props> {
110
112
  defaultProps?: Partial<(Target extends KnownTarget ? ExecutionProps & Omit<React.ComponentProps<Target>, keyof ExecutionProps> : ExecutionProps) & Props>;
111
113
  toString: () => string;
112
114
  }
@@ -121,28 +123,31 @@ export interface IInlineStyle<Props extends object> {
121
123
  generateStyleObject(executionContext: Object): Object;
122
124
  }
123
125
  export interface StyledObject<Props extends object> {
124
- [key: string]: Dict<any> | string | number | StyleFunction<Props> | StyledObject<Props>;
126
+ [key: string]: string | number | StyleFunction<Props> | StyledObject<Props> | undefined;
125
127
  }
126
128
  /**
127
- * Override DefaultTheme to get accurate typings for your project.
128
- *
129
- * ```
130
- * // create styled-components.d.ts in your project source
131
- * // if it isn't being picked up, check tsconfig compilerOptions.types
132
- * import type { CSSProp } from "styled-components";
133
- * import Theme from './theme';
129
+ * The `css` prop is not declared by default in the types as it would cause `css` to be present
130
+ * on the types of anything that uses styled-components indirectly, even if they do not use the
131
+ * babel plugin.
134
132
  *
135
- * type ThemeType = typeof Theme;
133
+ * To enable support for the `css` prop in TypeScript, create a `styled-components.d.ts` file in
134
+ * your project source with the following contents:
136
135
  *
137
- * declare module "styled-components" {
138
- * export interface DefaultTheme extends ThemeType {}
139
- * }
136
+ * ```ts
137
+ * import type { CSSProp } from "styled-components";
140
138
  *
141
139
  * declare module "react" {
142
- * interface DOMAttributes<T> {
140
+ * interface Attributes {
143
141
  * css?: CSSProp;
144
142
  * }
145
143
  * }
146
144
  * ```
145
+ *
146
+ * In order to get accurate typings for `props.theme` in `css` interpolations, see
147
+ * {@link DefaultTheme}.
147
148
  */
148
- export type CSSProp = string | StyledObject<any> | StyleFunction<any>;
149
+ export type CSSProp = RuleSet<any>;
150
+ export type NoInfer<T> = [T][T extends any ? 0 : never];
151
+ export type SubsetOnly<A, B> = {
152
+ [K in keyof A]: K extends keyof B ? A[K] : never;
153
+ };
@@ -1,2 +1,4 @@
1
- import { ExecutionProps } from '../types';
2
- export default function determineTheme(props: ExecutionProps, providedTheme: any, defaultProps?: any): any;
1
+ import { DefaultTheme, ExecutionProps } from '../types';
2
+ export default function determineTheme(props: ExecutionProps, providedTheme?: DefaultTheme, defaultProps?: {
3
+ theme?: DefaultTheme;
4
+ }): DefaultTheme | undefined;
@@ -1,2 +1,2 @@
1
- declare const _default: 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", "head", "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", "title", "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"];
1
+ declare const _default: Set<"object" | "g" | "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" | "head" | "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" | "title" | "tr" | "track" | "u" | "ul" | "var" | "video" | "wbr" | "svg" | "circle" | "clipPath" | "defs" | "ellipse" | "foreignObject" | "image" | "line" | "linearGradient" | "marker" | "mask" | "path" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "stop" | "text" | "tspan" | "use">;
2
2
  export default _default;
@@ -1,4 +1,4 @@
1
1
  import StyleSheet from '../sheet';
2
2
  import { Dict, ExecutionContext, Interpolation, RuleSet, Stringifier } from '../types';
3
- export declare const objToCssArray: (obj: Dict<any>, prevKey?: string) => string[];
3
+ export declare const objToCssArray: (obj: Dict<any>) => string[];
4
4
  export default function flatten<Props extends object>(chunk: Interpolation<Props>, executionContext?: ExecutionContext & Props, styleSheet?: StyleSheet, stylisInstance?: Stringifier): RuleSet<Props>;
@@ -1 +1 @@
1
- export default function isPlainObject(x: any): boolean;
1
+ export default function isPlainObject(x: any): x is Record<any, any>;
@@ -1 +1 @@
1
- export default function isStatelessFunction(test: any): boolean;
1
+ export default function isStatelessFunction(test: any): test is Function;
@@ -1,4 +1,5 @@
1
1
  /**
2
2
  * Convenience function for joining strings to form className chains
3
3
  */
4
- export default function joinStrings(a: string | undefined, b: string): string;
4
+ export declare function joinStrings(a?: string | null, b?: string | null): string;
5
+ export declare function joinStringArray(arr: string[], sep?: string): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "styled-components",
3
- "version": "5.3.9",
3
+ "version": "5.3.11",
4
4
  "description": "Visual primitives for the component age. Use the best bits of ES6 and CSS to style your apps without stress",
5
5
  "main": "dist/styled-components.cjs.js",
6
6
  "jsnext:main": "dist/styled-components.esm.js",
@@ -155,7 +155,7 @@ function _objectWithoutPropertiesLoose(source, excluded) {
155
155
  var SC_ATTR = typeof process !== 'undefined' && typeof process.env !== 'undefined' && (process.env.REACT_APP_SC_ATTR || process.env.SC_ATTR) || 'data-styled';
156
156
  var SC_ATTR_ACTIVE = 'active';
157
157
  var SC_ATTR_VERSION = 'data-styled-version';
158
- var SC_VERSION = "5.3.9";
158
+ var SC_VERSION = "5.3.11";
159
159
  var SPLITTER = '/*!sc*/\n';
160
160
  var IS_BROWSER = typeof window !== 'undefined' && 'HTMLElement' in window;
161
161
  var DISABLE_SPEEDY = Boolean(typeof SC_DISABLE_SPEEDY === 'boolean' ? SC_DISABLE_SPEEDY : typeof process !== 'undefined' && typeof process.env !== 'undefined' ? typeof process.env.REACT_APP_SC_DISABLE_SPEEDY !== 'undefined' && process.env.REACT_APP_SC_DISABLE_SPEEDY !== '' ? process.env.REACT_APP_SC_DISABLE_SPEEDY === 'false' ? false : process.env.REACT_APP_SC_DISABLE_SPEEDY : typeof process.env.SC_DISABLE_SPEEDY !== 'undefined' && process.env.SC_DISABLE_SPEEDY !== '' ? process.env.SC_DISABLE_SPEEDY === 'false' ? false : process.env.SC_DISABLE_SPEEDY : process.env.NODE_ENV !== 'production' : false); // Shared empty execution context when generating static styles
@@ -998,8 +998,8 @@ function addUnitIfNeeded(name, value) {
998
998
  return '';
999
999
  }
1000
1000
 
1001
- if (typeof value === 'number' && value !== 0 && !(name in unitless)) {
1002
- return value + "px"; // Presumes implicit 'px' suffix for unitless numbers
1001
+ if (typeof value === 'number' && value !== 0 && !(name in unitless) && !name.startsWith('--')) {
1002
+ return value + "px"; // Presumes implicit 'px' suffix for unitless numbers except for CSS variables
1003
1003
  }
1004
1004
 
1005
1005
  return String(value).trim();