Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v11 #1600

Merged
merged 191 commits into from
Nov 12, 2020
Merged

v11 #1600

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
191 commits
Select commit Hold shift + click to select a range
4b313e4
Enter pre
emmatown Nov 2, 2019
b0ad4f0
Avoid transpiling vanilla emotion calls in already transpiled code to…
Andarist Nov 3, 2019
302bdba
Add a changeset
emmatown Nov 3, 2019
720eb06
Version Packages (#1603)
github-actions[bot] Nov 3, 2019
e67a5be
Jest emotion/improvements (#1604)
Andarist Nov 4, 2019
a72e6dc
Restructured types to greatly reduce number of types created during c…
Nov 4, 2019
2293547
Make StyledComponent polymorphic (#1588)
FezVrasta Nov 5, 2019
1eaa3a3
Update changes.json
emmatown Nov 5, 2019
40beaad
Version Packages (#1605)
github-actions[bot] Nov 5, 2019
70bc4ef
Add CodeSandbox CI Config (#1608)
Andarist Nov 5, 2019
7903605
Use Hooks (#967)
emmatown Nov 5, 2019
e808fd4
Version Packages (#1610)
github-actions[bot] Nov 5, 2019
8a896a3
Throw error about invalid content property values instead of just log…
Andarist Nov 6, 2019
ddf30f0
Upgrade to @preconstruct/cli
emmatown Nov 6, 2019
9f2e6ac
Revert "Upgrade to @preconstruct/cli"
emmatown Nov 6, 2019
a085003
Add missing #__PURE__ annotations (#1613)
Andarist Nov 7, 2019
794d4c1
Add babel-plugin-emotion to CodeSandbox CI config
Andarist Nov 7, 2019
c5b12d9
Add import mapping to babel plugin (#1220)
emmatown Nov 8, 2019
dfec4b6
Update release workflow
emmatown Nov 8, 2019
a91a3de
Merge branch 'master' into next
emmatown Nov 8, 2019
1ab8ec2
Update changesets
emmatown Nov 8, 2019
f9feab1
Move @emotion/styled-base to @emotion/styled/base (#1575)
emmatown Nov 8, 2019
541ebf2
Tweak styled-base deprecation error message
Andarist Nov 8, 2019
fd4b227
Upgrade Babel-related deps (#1621)
Andarist Nov 9, 2019
5fcc4dc
Version Packages (#1612)
github-actions[bot] Nov 9, 2019
22e05c6
Upgrade jest-watch-typeahead
Andarist Nov 9, 2019
fc4852c
Add preinstall script checking if yarn is being used for installation…
Andarist Nov 9, 2019
c65c5d8
Drop Babel 6 support (#1622)
Andarist Nov 11, 2019
702f3fd
Added the `T` parameter to the `Matchers` interface
spudly Nov 12, 2019
e6e079c
Fix for TypeScript error when importing `@emotion/styled/base` in com…
frankwallis Nov 13, 2019
6fd588f
Version Packages (next) (#1625)
github-actions[bot] Nov 13, 2019
99c6b7e
Fixed missing type from the interpolation intersection type (#1632)
Nov 14, 2019
ad77ed2
Create new overload for CreateStyled which supports shouldForwardProp…
JakeGinnivan Nov 14, 2019
4f5450c
Version Packages (#1633)
github-actions[bot] Nov 15, 2019
843bfb1
Add @emotion/core/macro, remove @emotion/css (#1630)
Andarist Nov 15, 2019
828111c
Handle `Global` with Babel (#1639)
Andarist Nov 17, 2019
f1b7c9d
Added basic support for accepting custom `shouldForwardProp` option i…
Andarist Nov 18, 2019
8ad4af4
Update jest-emotion installation instructions (#1645)
ajs139 Nov 18, 2019
cbb8b79
Move theming APIs to core (#1628)
Andarist Nov 18, 2019
923ded0
Relaxed types for shouldForwardProp (#1643)
JakeGinnivan Nov 19, 2019
4a891bf
Allow for pre-pending style tags to container element (#1473)
jcharry Nov 25, 2019
0a4a22f
Allow `labelFormat` option to be a function (#1651)
Andarist Nov 25, 2019
3b9cb9e
Version Packages (#1638)
github-actions[bot] Nov 25, 2019
5c55fd1
Fix to what location generated source maps are pointing in case of co…
Andarist Nov 26, 2019
729ef9d
Update csstype dep
Andarist Nov 26, 2019
0b817da
Version Packages (#1654)
github-actions[bot] Nov 26, 2019
14745a5
Fix repository link for utils package (#1658)
sindreij Nov 28, 2019
c6d2b80
Merge branch 'master' into next
Andarist Nov 28, 2019
c5e91b0
Merge branch 'master' into next
Andarist Nov 29, 2019
c672175
Added support for passing theme to functions in array css prop (#1130)
jtmthf Dec 2, 2019
0b7ebdf
Merge branch 'master' into next
Andarist Dec 4, 2019
c643107
Refactor TS types to use builtin Theme interface which can be augment…
tomsseisums Dec 7, 2019
0362fd2
Version Packages (#1663)
github-actions[bot] Dec 7, 2019
0f3a2d3
Created additional overload to prevent AdditionalProps getting inferr…
JakeGinnivan Dec 8, 2019
8b59959
Add handling of the css prop in syntax-preference rule (#1659)
Andarist Dec 8, 2019
ba105a5
Version Packages (#1679)
github-actions[bot] Dec 10, 2019
2fa7a21
Remove no longer needed StyleProps type parameter (#1685)
Andarist Dec 14, 2019
456be9a
Added TS types to @emotion/native (#1634)
patsissons Dec 16, 2019
8c519e0
Merge branch 'master' into next
emmatown Dec 19, 2019
dfe79ac
Fix issue with rehydrated style tags not taking into account prepend …
Andarist Dec 20, 2019
1e4a741
Removed mentions of `maxLength` option (#1697)
Andarist Dec 20, 2019
4a89042
Fix issue with sheet hydration in cache creation (#1699)
Andarist Dec 22, 2019
d62d910
Add warning if multiple versions are running (addresses #1470) (#1677)
ajs139 Dec 24, 2019
affed3d
Fix issue with published TypeScript test files augmenting Theme inter…
Andarist Dec 28, 2019
c7850e6
Optimize Babel output a little bit (#1656)
Andarist Jan 5, 2020
5936812
Improve support for Enzyme's shallow rendering (#1672)
ajs139 Jan 5, 2020
b8476e0
Rename packages (#1675)
emmatown Jan 5, 2020
31e610f
Version Packages (next) (#1691)
github-actions[bot] Jan 5, 2020
b79781f
Fix the type of `props.theme` for StyledComponent without AdditionalP…
fabien0102 Jan 9, 2020
cb637e6
Add types folder to published files for native (#1716)
META-DREAMER Jan 14, 2020
f08ef5a
Removed leftover `@emotion/react` import from type definition file (#…
Andarist Jan 16, 2020
d950d7d
Version Packages (next) (#1711)
github-actions[bot] Jan 16, 2020
7dea6d7
Fixed styles inserted by `<Global/>` component not inheriting `speedy…
Andarist Jan 22, 2020
4aacba5
Update jest-related deps (#1733)
Andarist Jan 22, 2020
11fc27f
Match supported components to what is exported from the latest versio…
Zn4rK Feb 27, 2020
c693d8a
Merge branch 'master' into next
Andarist Feb 27, 2020
e3d7db8
Fixed some composition issues with styles not containing a final semi…
Andarist Feb 29, 2020
c2fc3cc
Merge branch 'master' into next
Andarist Mar 2, 2020
fbf9ad2
Fix manypkg errors
Andarist Mar 2, 2020
5c63a0e
Upgrade changesets deps
Andarist Mar 2, 2020
a8c9942
Migrate v1 changesets to v2 ones
Andarist Mar 2, 2020
9e833ba
Fix UMD name for @emotion/react package
Andarist Mar 12, 2020
9e3315d
Remove unnecessary @emotion/styled import from theming declaration fi…
Andarist Mar 14, 2020
1a7c9a8
Merge branch 'master' into next
Andarist Mar 14, 2020
994402e
Bring back accidentally removed tests
Andarist Mar 14, 2020
d9829aa
Merge branch 'master' into next
Andarist Mar 14, 2020
5bea60b
Drop support for interpolating generated class names (#1807)
Andarist Mar 15, 2020
3370dd5
Improve docs around augmenting the Theme interface (#1803)
Andarist Mar 15, 2020
3e08486
Removed a test which was removed as part of #1807
Andarist Mar 15, 2020
be2eb61
Do not warn about @emotion/react being loaded twice in Jest (#1806)
Andarist Mar 16, 2020
105de5c
Fixed issue with cache created in render crashing SSRed site (#1572)
Andarist Mar 16, 2020
6e5e4eb
Change a console.warn to console.error for reporting bad rule inserti…
Andarist Mar 16, 2020
75e2f9e
Add a dev-only warning about opaque styles being passed to `cx` (#1810)
Andarist Mar 16, 2020
5c7ec85
Relax requirement for label extraction - containing functions dont ha…
Andarist Mar 16, 2020
2ae1069
Bump version of @emotion/serialize to fixup repo/npm/changesets mismatch
Andarist Mar 17, 2020
ff9746b
ci(changeset): generate PR with changelog & (next) version updates (#…
github-actions[bot] Mar 17, 2020
4ed12cb
Add TS test to check for excessive instantiation regressions
Andarist Mar 28, 2020
fc11976
Fix advanced SSR docs
Andarist May 20, 2020
5e80310
Added support for converting assignment expressions to labels (#1893)
Andarist Jun 9, 2020
91046a8
Rename sheet.rehydrate method to sheet.hydrate (#1900)
Andarist Jun 13, 2020
ec2bfbf
Fix the links fixer (#1903)
Andarist Jun 15, 2020
9e998e3
Upgrade Stylis to v4 (#1817)
Andarist Jun 22, 2020
ca599c5
Jest serializer new api (#1901)
Andarist Jun 22, 2020
9391227
Upgrade Stylis version
Andarist Jun 22, 2020
420bd67
Version Packages (next) (#1896)
github-actions[bot] Jun 22, 2020
7d475c3
Update testing reference. (#1445)
jonearley Jun 27, 2020
25ea45f
Remove invalid argument in favor of using @emotion/css over @emotion/…
pcowgill Jun 28, 2020
cd77efb
Cleanup @emotion/jest entrypoints (#1920)
Andarist Jul 2, 2020
97d1f97
Warn about incompatibility with @babel/plugin-transform-react-inline-…
slapbox Jul 2, 2020
5ad3e44
Mention in the docs that `theme` prop is not forwarded to custom comp…
blicksky Jul 2, 2020
d484252
Bump Stylis version
Andarist Jul 5, 2020
c7ae475
Change which interface gets extended with css prop support (#1762)
Andarist Jul 5, 2020
a19acbd
Upgrade Flow to 0.128.0 (#1925)
Andarist Jul 5, 2020
62d579e
Merge branch 'master' into next
Andarist Jul 5, 2020
ab09e9e
Fix outdated reference to @emotion/core (#1926)
Andarist Jul 6, 2020
58dc08a
Adds @types/react as optional peer deps (#1837)
arcanis Jul 7, 2020
6d32d82
Add speedy method to the TS type declaration of the sheet object avai…
osdiab Jul 8, 2020
4d3b60d
Added basic TS type support for `as` prop on styled components (#1874)
connor-baer Jul 9, 2020
1e10d8c
Remove not needed files in jest package extra entrypoints
Andarist Jul 12, 2020
f57a722
Localized jsx namespace (#1941)
Andarist Jul 30, 2020
4c2601e
Fix v11 jsx factory type not allowing children when implictly in comp…
emmatown Aug 1, 2020
d083a76
Minor TS types tweak in @emotion/styled (#1951)
Andarist Aug 1, 2020
93c27e0
Version Packages (next) (#1923)
github-actions[bot] Aug 1, 2020
dc1a0c5
Insert empty style elements eagerly in dev (#1962)
Andarist Aug 7, 2020
9072e78
Small docs tweaks after changes related to Stylis v4 work (#1949)
Andarist Aug 7, 2020
e07873b
Upgrade changesets, manypkg & preconstruct deps
Andarist Aug 8, 2020
8a88e77
Improved reliability of snapshots by having consistent order of extra…
Jimmydalecleveland Aug 9, 2020
ae8c1d9
Fixed `@emotion/jest` toHaveStyleRule on react.elements (#1902)
Andarist Aug 9, 2020
ce3ae19
Merge branch 'master' into next
Andarist Aug 9, 2020
5d692a6
Upgrade csstype dependency (#1956)
eps1lon Aug 9, 2020
620f732
Add TS types support for `ref` on class components (including host co…
Andarist Aug 9, 2020
62fc844
Add Pressable to the list of supported react-native components (#1958)
sanpoChew Aug 9, 2020
aeb15ef
Merge branch 'master' into next
Andarist Aug 18, 2020
aa5f6c9
Fix changeset header, target `@emotion/react` instead of `@emotion/core`
Andarist Aug 18, 2020
908a264
Version Packages (next) (#1963)
github-actions[bot] Aug 18, 2020
c510d9d
Change some changeset bump types and do a few changeset cleanups (#1980)
Andarist Aug 21, 2020
58b2bbc
Change the key of a global key (indicating the @emotion/react has bee…
Andarist Aug 21, 2020
24e5109
Add Browser Requirements section to the docs (#1979)
Andarist Aug 21, 2020
8db5c32
Document caveat with css prop and React.cloneElement (#1985)
Andarist Sep 3, 2020
18c0d5f
Custom `shouldForwardProp` is being preserved now when using `.withCo…
animecyc Sep 4, 2020
0895f1f
Fixed an issue with type for as prop not being available for prebound…
Andarist Sep 5, 2020
debaad9
Fixed TypeScript definition of the `EmotionCache` by replacing the no…
RoystonS Sep 6, 2020
39be057
Insert empty rule in dev (#1997)
Andarist Sep 8, 2020
a8eb4e7
Styles are now correctly extracted from the correct cache (`key`-sens…
Andarist Sep 8, 2020
dfe9802
Fixed an issue with orphaned pseudos having their selector doubled fo…
Andarist Sep 8, 2020
23faf9e
Fixed an issue with wrapped class components not having a type for th…
Andarist Sep 8, 2020
8307133
Version Packages (next) (#1982)
github-actions[bot] Sep 8, 2020
691aedb
Upgrade Changesets, Manypkg & Preconstruct
Andarist Sep 9, 2020
76e3dc4
Trigger re-release of @emotion/serialize package (#2009)
Andarist Sep 9, 2020
1ee8b44
Version Packages (next) (#2010)
github-actions[bot] Sep 9, 2020
db16ac3
Fixed an issue with internal buffer being lost for nested factory cal…
Andarist Sep 15, 2020
19df60b
Fixed an issue with rules nested in orphaned pseudo selectors not bei…
Andarist Sep 15, 2020
d949a37
Upgrade stylis dependency ranges
Andarist Sep 15, 2020
95ea283
Disallow functions as value of style prop in libs related to React Na…
Andarist Sep 20, 2020
0c4c051
Version Packages (next) (#2018)
github-actions[bot] Sep 20, 2020
d55556e
Partial changesets cleanup (#2016)
Andarist Sep 21, 2020
5d094b5
Fixed an issue with serializing Enzyme's `ReactWrapper` (what is retu…
Andarist Oct 1, 2020
42df3f3
Fixed an issue with multiple Emotion caches moving SSRed styles to he…
Andarist Oct 3, 2020
3b460da
Version Packages (next) (#2029)
github-actions[bot] Oct 3, 2020
6ad4cb0
Cleanup some changesets that were only relevant during premode
Andarist Oct 3, 2020
9c4ebc1
Prepare first RC release (#2030)
Andarist Oct 3, 2020
a775ddc
Upgrade testing related deps (#2033)
Andarist Oct 3, 2020
a425902
Use caret dependency ranges when possible (#2032)
Andarist Oct 10, 2020
69446cb
Adds translate to the list of the valid props (#1971)
mjcampagna Oct 11, 2020
58e8c11
Allow ESLint 7 as peer dep of @emotion/eslint-plugin (#2034)
Andarist Oct 11, 2020
ff4ee9d
Version Packages (rc) (#2031)
github-actions[bot] Oct 11, 2020
3b29839
Upgrade Preconstruct
Andarist Oct 18, 2020
5a73355
Downgrade Preconstruct to 1.1.29
Andarist Oct 18, 2020
3abcf67
`@types/jest` has been moved from the dependencies to the optional pe…
Andarist Oct 18, 2020
6e157aa
Remove missing key error from production environments (#2042)
Andarist Oct 18, 2020
082e970
Remove patch for @changesets/cli
Andarist Nov 7, 2020
f02507c
Upgrade chalk and escape-string-regexp (#2044)
TrySound Nov 7, 2020
2d59785
Add support for the `as` prop in React Native related packages (#2058)
efoken Nov 7, 2020
d627db4
Merge branch 'master' into next
Andarist Nov 8, 2020
0d34200
Fix flow error
Andarist Nov 9, 2020
30ddee1
Merge branch 'master' into next
Andarist Nov 9, 2020
9e3671c
Remove the `runtime` option from `@emotion/babel-preset-css-prop` (#2…
Andarist Nov 9, 2020
74ec012
Export JSX namespace from automatic runtime entries (#2078)
Andarist Nov 9, 2020
688586d
Fixed an issue with dev-only labels not being added when source maps …
Andarist Nov 9, 2020
b7d2137
Make `cssPropOptimization`'s default always `true` (regardless of the…
Andarist Nov 9, 2020
db32e5a
Merge branch 'master' into next
Andarist Nov 10, 2020
cf56694
Preconstruct upgrade (#2088)
Andarist Nov 10, 2020
a293f90
Add changeset about UMD filenames being renamed
Andarist Nov 10, 2020
3c3bc41
Exit pre mode
Andarist Nov 10, 2020
20d2249
Remove unnecessary changeset
Andarist Nov 10, 2020
139ea33
Use `StyleSheet.create` in React Native (#2060)
efoken Nov 11, 2020
27b2357
Fixed `@emotion/server/create-instance` entrypoint configuration
Andarist Nov 11, 2020
e6e209c
Remove unnecessary changesets and fixup old changelogs entries
Andarist Nov 11, 2020
5b7f4b5
Update README.md
emmatown Nov 11, 2020
4e1c94c
Emotion 11 post (#2089)
Andarist Nov 12, 2020
b99c44c
Version Packages (#2046)
github-actions[bot] Nov 12, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 6 additions & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://unpkg.com/@changesets/config@0.2.1/schema.json",
"$schema": "https://unpkg.com/@changesets/config@1.3.0/schema.json",
"changelog": [
"@changesets/changelog-github",
{ "repo": "emotion-js/emotion" }
Expand All @@ -8,21 +8,26 @@
"linked": [
[
"@emotion/core",
"@emotion/react",
"@emotion/styled",
"@emotion/styled-base",
"@emotion/cache",
"@emotion/css",
"create-emotion",
"emotion",
"emotion-server",
"@emotion/server",
"create-emotion-server",
"babel-plugin-emotion",
"@emotion/babel-plugin",
"@emotion/babel-preset-css-prop",
"jest-emotion",
"@emotion/jest",
"@emotion/native",
"@emotion/primitives",
"@emotion/primitives-core",
"eslint-plugin-emotion",
"@emotion/eslint-plugin",
"emotion-theming"
]
],
Expand Down
9 changes: 5 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 2
jobs:
flow:
docker:
- image: circleci/node:10.13.0-browsers
- image: circleci/node:10.16.3-browsers
working_directory: ~/repo
steps:
- checkout
Expand All @@ -25,7 +25,7 @@ jobs:

test:
docker:
- image: circleci/node:10.13.0
- image: circleci/node:10.16.3
working_directory: ~/repo
steps:
- checkout
Expand All @@ -48,7 +48,7 @@ jobs:

test_dist:
docker:
- image: circleci/node:10.13.0
- image: circleci/node:10.16.3
working_directory: ~/repo
steps:
- checkout
Expand All @@ -66,7 +66,7 @@ jobs:

lint_and_typescript:
docker:
- image: circleci/node:10.13.0
- image: circleci/node:10.16.3
working_directory: ~/repo
steps:
- checkout
Expand All @@ -77,6 +77,7 @@ jobs:
- v4-dependencies-
- run: yarn install --pure-lockfile
- run: yarn lint:check
- run: yarn test:typescript

workflows:
version: 2
Expand Down
4 changes: 4 additions & 0 deletions .codesandbox/ci.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"packages": ["packages/*"],
"sandboxes": ["pk1qjqpw67"]
}
5 changes: 1 addition & 4 deletions .flowconfig
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[version]
0.110.0
0.128.0

[ignore]
.*/node_modules/config-chain/.*
Expand All @@ -20,8 +20,5 @@
[declarations]
.*/node_modules/react-native/.*


[options]
suppress_comment=.*\\$FlowFixMe
suppress_comment=.*\\$FlowExpectError
sharedmemory.hash_table_pow=21
4 changes: 1 addition & 3 deletions .flowconfig-ci
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[version]
0.110.0
0.128.0

[ignore]
.*/node_modules/config-chain/.*
Expand All @@ -23,7 +23,5 @@


[options]
suppress_comment=.*\\$FlowFixMe
suppress_comment=.*\\$FlowExpectError
server.max_workers=1
sharedmemory.hash_table_pow=21
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/--bug-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ assignees: ''

**Environment information:**

<!-- Provide the `react` and `emotion` or `@emotion/*` packages versions -->
<!-- Provide the `react` and `@emotion/*` packages versions -->

- `react` version:
- `emotion` version:
- `@emotion/react` version:
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/--documentation-issue.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ assignees: ''

<!--
If existing documentation is available, but needs to be improved,
is wrong, or unclear, please post here the relevant
is wrong, or unclear, please post here the relevant
https://emotion.sh/docs URLs
-->
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/--feature-request.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ labels: feature request, needs triage
assignees: ''
---


**The problem**

<!-- A clear and concise description of what the problem is. e.g. I'm always frustrated when [...] -->
Expand Down
7 changes: 6 additions & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,27 @@ merge of your pull request!
-->

<!-- What changes are being made? (What feature/bug is being fixed here?) -->

**What**:

<!-- Why are these changes necessary? -->

**Why**:

<!-- How were these changes implemented? -->

**How**:

<!-- Have you done all of these things? -->

**Checklist**:

<!-- add "N/A" to the end of each line that's irrelevant to your changes -->
<!-- to check an item, place an "x" in the box like so: "- [x] Documentation" -->

- [ ] Documentation
- [ ] Tests
- [ ] Code complete
- [ ] Changeset <!-- This is necessary if your changes should release any packages. Run `yarn changeset` to create a changeset -->


<!-- feel free to add additional comments -->
3 changes: 3 additions & 0 deletions .prettierrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ overrides:
- files: "docs/*.md"
options:
printWidth: 60
- files: "*.js"
options:
parser: flow
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ Frequently viewed docs:
Get up and running with a single import.

```bash
npm install --save @emotion/core
npm install --save @emotion/react
```

```jsx
/** @jsx jsx */
import { jsx } from '@emotion/core'
import { jsx } from '@emotion/react'

let SomeComponent = props => {
return (
Expand All @@ -60,7 +60,7 @@ let SomeComponent = props => {

The babel plugin is not required, but enables some optimizations and customizations that could be beneficial for your project.

Look here 👉 _[emotion babel plugin feature table and documentation](https://github.com/emotion-js/emotion/tree/master/packages/babel-plugin-emotion)_
Look here 👉 _[emotion babel plugin feature table and documentation](https://github.com/emotion-js/emotion/tree/master/packages/babel-plugin)_

### Demo Sandbox

Expand Down
8 changes: 1 addition & 7 deletions __mocks__/react-primitives.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,2 @@
// @flow
/* eslint-env jest */
module.exports = {
...jest.requireActual('react-primitives'),
View: 'View',
Image: 'Image',
Text: 'Text'
}
export * from 'react-primitives/lib/index.web'
9 changes: 7 additions & 2 deletions babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,20 @@ module.exports = api => {
filename &&
isTestFile(filename) &&
filename.includes('automatic-runtime'),
presets: [[emotionDevPreset, { runtime: 'automatic' }]]
presets: [
[emotionDevPreset, { runtime: 'automatic', useEmotionPlugin: true }]
]
},
{
test: filename =>
filename &&
isTestFile(filename) &&
filename.includes('automatic-dev-runtime'),
presets: [
[emotionDevPreset, { runtime: 'automatic', development: true }]
[
emotionDevPreset,
{ runtime: 'automatic', development: true, useEmotionPlugin: true }
]
]
}
]
Expand Down
8 changes: 4 additions & 4 deletions docs/babel-macros.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ title: 'Babel Macros'

[Create React App recently added support for Babel Macros](https://reactjs.org/blog/2018/10/01/create-react-app-v2.html) which makes it possible to run Babel transforms without changing a Babel config.

Most of Emotion's Babel Macros are available by adding `/macro` to the end of the import you'd normally use. (assuming you're using Create React App v2 or you've added babel-plugin-macros to your .babelrc) For example, to use the macro for styled, use `@emotion/styled/macro`. The one exception to this is `@emotion/core`, `@emotion/core` doesn't have a Babel Macro because Babel Macros doesn't support macros for custom JSX pragmas. There is a Babel macro available for `css` from `@emotion/core` if you import it from `@emotion/css/macro` though.
All of Emotion's Babel Macros are available by adding `/macro` to the end of the import you'd normally use. (assuming you're using Create React App v2 or you've added babel-plugin-macros to your .babelrc) For example, to use the macro for styled, use `@emotion/styled/macro`.

```jsx
import styled from '@emotion/styled/macro'
import css from '@emotion/css/macro'
import { css, keyframes, injectGlobal } from 'emotion/macro'
import { jsx, css, Global, keyframes } from '@emotion/react/macro'
import { css, keyframes, injectGlobal } from '@emotion/css/macro'
```

> Note
>
> There are some optimisations which aren't possible with Babel Macros, so if it's possible, we still recommend using babel-plugin-emotion
> There are some optimisations which aren't possible with Babel Macros, so if it's possible, we still recommend using @emotion/babel-plugin
2 changes: 1 addition & 1 deletion docs/babel.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: 'Babel Plugin'
---

`babel-plugin-emotion` is highly recommended. All of the options that can be provided to `babel-plugin-emotion` are documented in [`babel-plugin-emotion`'s README](https://github.com/emotion-js/emotion/tree/master/packages/babel-plugin-emotion).
`@emotion/babel-plugin` is highly recommended. All of the options that can be provided to `@emotion/babel-plugin` are documented in [`@emotion/babel-plugin`'s README](https://github.com/emotion-js/emotion/tree/master/packages/babel-plugin).

### Install

Expand Down
17 changes: 5 additions & 12 deletions docs/cache-provider.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,17 @@ It can be useful to customize emotion's options - i.e. to add custom Stylis plug
```jsx
// @live
/** @jsx jsx */
import { CacheProvider, jsx, css } from '@emotion/core'
import { CacheProvider, jsx, css } from '@emotion/react'
import createCache from '@emotion/cache'
import { prefixer } from 'stylis'

const myCache = createCache({
key: 'my-prefix-key',
stylisPlugins: [
/* your plugins here */
customPlugin,
// has to be included manually when customizing `stylisPlugins` if you want to have vendor prefixes added automatically
prefixer
],
// prefix based on the css property
prefix: key => {
switch (key) {
case 'flex':
return false
case 'transform':
default:
return true
}
}
})

render(
Expand Down
2 changes: 1 addition & 1 deletion docs/class-names.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ It can be useful to create a className that is not passed to a component, for ex

```jsx
// @live
import { ClassNames } from '@emotion/core'
import { ClassNames } from '@emotion/react'

// this might be a component from npm that accepts a wrapperClassName prop
let SomeComponent = props => (
Expand Down
4 changes: 2 additions & 2 deletions docs/composition.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Composition is one of the most powerful and useful patterns in Emotion. You can
```jsx
// @live
/** @jsx jsx */
import { jsx, css } from '@emotion/core'
import { jsx, css } from '@emotion/react'

const base = css`
color: hotpink;
Expand Down Expand Up @@ -55,7 +55,7 @@ With Emotion though, you can create styles and combine them.
```jsx
// @live
/** @jsx jsx */
import { css, jsx } from '@emotion/core'
import { css, jsx } from '@emotion/react'

const danger = css`
color: red;
Expand Down
Loading