Commit Graph

50 Commits

Author SHA1 Message Date
Samuli Ulmanen
e2e93a635e [styled-components] add ThemeProvider to Example (#2856) 2019-11-07 16:10:19 -05:00
Samuli Ulmanen
02aaba9b70 [styled-components] streaming ssr example to devServer (#2855) 2019-11-07 16:09:50 -05:00
Evan Jacobs
1cea00d470 v4.4.1 2019-10-30 14:14:08 -04:00
Evan Jacobs
4c8afc8f03 Revert "add console.error to catch theme references wo prop present (#2657)"
This reverts commit 7fb63b2371.
2019-10-28 18:21:01 -04:00
Juwan Wheatley
4cf2c5af04 [bugfix] fix imports for react-native-web (#2797)
* [bugfix] fix imports for react-native-web
React Native Web doesn't use default exports, so importing using ES6 imports breaks it for that react-native renderer. Using require creates the same behavior in react-native and react-native-web without tripping up the navigator invariant that pops up when trying to import  * as reactNative from 'react-native'.

* add entry to changelog
2019-10-28 12:00:32 -04:00
Evan Jacobs
98eb2ef013 v4.4.0 2019-09-23 09:33:03 -04:00
ShoM
e3020f6b95 fix: add check for style tag detached - sheet in the style tag is null in this case (#2707) 2019-09-23 09:22:22 -04:00
Evan Jacobs
2ef3a3ad43 backport classname ordering fix from canary (#2760) 2019-09-22 18:56:45 -04:00
yamachi
f3e2266003 Use ownerDocument instead of global document (#2721) 2019-09-09 19:18:58 -04:00
Anton Lazarev
06d1ae25a6 remove deprecated attrs suggestion from too many classes warning (#2740) 2019-09-09 16:22:06 -04:00
Evan Jacobs
009dc3672b fix attrs not properly taking precedence over props (#2738) 2019-09-09 16:21:06 -04:00
Evan Jacobs
e4cd50c715 backport dev SSR classname mismatch fix from canary (#2701)
* backport dev SSR classname mismatch fix from canary

* changelog entry
2019-08-21 13:55:12 -04:00
Veniamin Krol
5602131558 Get rid of the ThemeProvider single child context restriction (#2706)
We can get rid of that restriction because ThemeProvider uses
stable React Context API and children cannot be top-level element.
Fixes #1325.
2019-08-07 17:35:24 -04:00
Kyle Pollock
acdc5d49fc Update error message with clickable link. (#2694) 2019-08-06 22:16:29 -04:00
Haldun Anil
7fb63b2371 add console.error to catch theme references wo prop present (#2657) 2019-06-29 10:21:36 -05:00
Evan Jacobs
43f6fbe1d9 v4.3.2 2019-06-19 23:44:42 -05:00
James K Nelson
d088d689fc fix css props when using babel macro with babel-plugin-styled-components 1.10.1 (#2633)
* fix macro on create-react-app

* add tests

* changelog entry

* fix linting error
2019-06-19 23:42:46 -05:00
Ajay Poshak
c369ad7fbf Bump version for @emotion/is-valid-props (#2617) 2019-06-12 12:44:44 -05:00
Evan Jacobs
3f7eb57d59 v4.3.1 2019-06-06 16:17:36 -05:00
Evan Jacobs
7002c1e4a5 Revert "prevent component folding when interim HOCs are present (#2586)" (#2606)
This reverts commit 2b1d01e889.
2019-06-06 16:15:15 -05:00
Evan Jacobs
04d4858d72 v4.3.0 (#2603) 2019-06-05 15:41:34 -05:00
Evan Jacobs
b7d94195c9 implement folding of defaultProps (#2597)
* update flow stubs

* implement folding of defaultProps

specifically chose the merge-anything library because of its
default handling for non plain-object types (replace, not merge)

* changelog entry
2019-06-05 15:33:19 -05:00
Oliver Lazoroski
4ca4e62d2a Make it possible to initialize SC_ATTR via REACT_APP_SC_ATTR env variable (#2501)
* make possible to set SC_ATTR via REACT_APP_SC_ATTR env variable

this increases the compatibility with CRA as it filters out any env
variables which don't follow the REACT_APP_* pattern

* add changelog entry for REACT_APP_SC_ATTR

* make possible to set SC_DISABLE_SPEEDY via REACT_APP_SC_DISABLE_SPEEDY env variable

this increases the compatibility with CRA as it filters out any env
variables which don't follow the REACT_APP_* pattern

* extra line for making travis-ci run again

* Revert "make possible to set SC_DISABLE_SPEEDY via REACT_APP_SC_DISABLE_SPEEDY env variable"

This reverts commit 861054e7

* wire up SC_DISABLE_SPEEDY and REACT_APP_SC_DISABLE_SPEEDY env vars
2019-06-04 11:35:32 -05:00
Evan Jacobs
2b1d01e889 prevent component folding when interim HOCs are present (#2586)
* add failing test and fix some linting errors

* prevent component folding when interim HOCs are present

fixes #2531

* changelog entry

* same patch for rn version
2019-06-04 11:02:36 -05:00
Evan Jacobs
34ce31d42a implement forwardedAs (#2580)
same as the canary PR but this is a simple-enough change that
we can ship it in a 4.x minor release
2019-06-01 14:23:19 -05:00
Jelte Fennema
4f1a923293 Fix theme prop usage in StyledNativeComponent (#2567) 2019-05-31 12:58:11 -05:00
Evan Jacobs
46b137988d v4.2.1 (#2574) 2019-05-30 11:42:40 -05:00
James DiGioia
28f561ddd0 Fix macro with ts (#2427)
* Add test for multiple imports

Check that the imports are split up normally.

* Fix macro usage with TypeScript

Fixes #2378.
2019-05-29 09:11:22 -05:00
Abdel-Rhman
f1c8feb530 Fix objects with functions - replace (objToCss) with (objToCssArray) (#2489)
* Fix objects with methods - replace ObjectToCss => ObjectToArray

* edit name to match naming convention

* more unit tests for style objects with functions - handle more cases in objToCssArray

* better writing for objToCssArray

* semicolon after object function - add unit test - better flow type

* consistent quotes

* bring the ternary baack

* update CHANGELOG
2019-05-29 05:30:08 -05:00
Alberto Leal
6f2ec31e5b Improve error message for StyledComponentsError (#2551)
* StyledComponentsError: Improve error message when no additional arguments are provided.

* update snapshots
2019-05-29 03:18:00 -05:00
Evan Jacobs
07bbcba891 remove related tests 2019-05-28 22:10:37 -05:00
Evan Jacobs
623be89b12 remove now-unused suppression prop 2019-05-28 22:03:15 -05:00
Tobias Lohse
772280915f attach displayName to forwardRef function as described in React docs (#2508)
* add displayName to forwardRef

* Update StyledComponent.js
2019-05-11 12:21:14 -05:00
Tobias Lohse
75aa1b6786 Compatibility with react-native-web 0.11 (#2453)
* Change react-native default import for compatibility with react-native-web 0.11

* minimal solution for RNW compatibility
2019-05-11 12:17:34 -05:00
Abdel-Rhman
c098fd7deb Add stack trace to .attrs warning (#2486) 2019-04-08 18:48:22 -05:00
Evan Jacobs
df2c947e0a Publish
- sandbox@4.2.0
 - styled-components@4.2.0
2019-03-23 11:40:38 -05:00
Danny Sanchez
80ca302cf3 try to handle React's streaming renderer yielding at inopportune times (#2413)
* Styled Components test interleaveWithNodeStream

Added a test for interleaveWithNodeStream.  The niche case where the
style tag gets interleaved into a textarea causes the style tag to be
rendered as text in the text area.

* when streaming try to inject outside the nearest element

this helps for some edge cases like <textarea> where the
element accepts children but has weird behavior for the children
compared to typical HTML elements

* remove enzyme stuff in favor of a simpler check

* changelog entry
2019-03-23 11:26:49 -05:00
Evan Jacobs
cc0f5d2e83 expose StyleSheetContext and StyleSheetConsumer (#2456)
We're doing it for theme, so why not.
2019-03-21 14:14:57 -05:00
studio_4
e6f1b85726 #2080 forgot to replace \n to '' in className (#2333) (#2338) 2019-03-20 22:49:12 -05:00
Yoshihiro Nakamura
822d9c93bb Filter suppressClassNameWarning to not to pass down to wrapped components (#2365)
* Do not pass suppressClassNameWarning to wrapped components

* Update CHANGELOG

* move key checking to the proper line
2019-03-20 22:48:31 -05:00
Alan Souza
c22b95f137 Reduce GC pressure by avoiding to create new object types (#2428)
* Fixed memory leak by avoiding to create a bunch of new object types without references.

* Added changelog for memory leak issue.

* Simplified try catch logic.

* Add warning for component selector only in development mode.

* Fixed test for warn.
2019-03-20 21:46:41 -05:00
studio_4
563941e375 #2080 forgot to replace \n to '' in className (#2333) 2019-03-17 21:48:16 -04:00
Vitaly Yastremsky
0ed5eb69cc Add svg marker tag to domElements.js (#2389)
* Add svg marker tag to domElements.js

`TypeError: styled_components__WEBPACK_IMPORTED_MODULE_8__.default.marker is not a function`

https://developer.mozilla.org/en-US/docs/Web/SVG/Element/marker

* Add new changelog entry (updated domElements.js)
2019-03-17 21:47:24 -04:00
Steve Sims
78e412dc6e Some small linting fixes (#2395) 2019-03-17 21:47:02 -04:00
Max Stoiber
9b81695d35 Merge pull request #2359 from malimccalla/fix-broken-error-link
Fix errors.md link
2019-01-30 11:17:30 +01:00
Mali Michael
13cfad01ab Update snapshots for error.md link 2019-01-29 16:25:26 +00:00
Mali Michael
b96980e9cc Fix broken errors.md link 2019-01-29 16:14:37 +00:00
Alexander Nanberg
557b5b31b0 fix: use webpack .hooks API instead of deprecated Tapable.plugin 2019-01-28 08:06:44 +01:00
Alexander Nanberg
cbcffa4f77 chore: upgrade sandbox dependencies 2019-01-24 13:56:34 +01:00
Bhargav Ponnapalli
4aa2fdbb3b Move to a mono-repo structure
wip

Add gitignore and edit rollup config

Update gitignore

Wip

WIP

Get rid of older json files and use js files to extend across pkgs later

Make test:native work again, thanks to @SimenB

No haste and get integration test to work

Update husky

Update package.json

Update travis and appveyor

Add lint script

Update sandbox

Update yarn version

Move eslint into sc package

Remove unnecessary files

Update lint-staged

Update CONTRIBUTING.md

Update version in lerna.json

Update contributing

Update scripts

Update contributing

Update contributing

Update contributing.md and publish script

Update contributing

v4.1.4-alpha.0

Update package json

Update lerna version

v4.1.4-alpha.0

v4.1.4-alpha.1

Independent version for sandbox and styled-components

Yarn instead of npm

Add readme to styled-components package to show up on npm

Publish

 - styled-components@4.1.4-alpha.2

Update prepublisOnly and contributing

Update gitignore

Publish

 - styled-components@4.1.4-alpha.3

Test without readme

Remove readme

Publish

 - styled-components@4.1.4-alpha.4

Copy readme prepublishOnly

Publish

 - styled-components@4.1.4-alpha.5
2019-01-18 21:04:15 +05:30