Skip to content

Latest commit

Β 

History

History
772 lines (469 loc) Β· 61.3 KB

CHANGELOG.md

File metadata and controls

772 lines (469 loc) Β· 61.3 KB

@emotion/react

11.13.3

Patch Changes

  • #3232 0ce3ed0 Thanks @ENvironmentSet! - Distribute css prop attachment over props that are union types

  • Updated dependencies []:

    • @emotion/serialize@1.3.1

11.13.0

Minor Changes

  • #3198 d8ff8a5 Thanks @Andarist! - Migrated away from relying on process.env.NODE_ENV checks to differentiate between production and development builds.

    Development builds (and other environment-specific builds) can be used by using proper conditions (see here). Most modern bundlers/frameworks already preconfigure those for the user so no action has to be taken.

    Default files should continue to work in all environments.

  • #3215 a9f6912 Thanks @Andarist! - Added edge-light and workerd conditions to package.json manifest to better serve users using Vercel Edge and Cloudflare Workers.

Patch Changes

  • Updated dependencies [d8ff8a5, a9f6912]:
    • @emotion/cache@11.13.0
    • @emotion/serialize@1.3.0
    • @emotion/use-insertion-effect-with-fallbacks@1.1.0
    • @emotion/utils@1.4.0

11.12.0

Minor Changes

  • #2815 65a1eea Thanks @srmagura! - Automatic labeling at runtime is now an opt-in feature. Define globalThis.EMOTION_RUNTIME_AUTO_LABEL = true before Emotion gets initialized to enable it.

Patch Changes

  • #3206 d1994c4 Thanks @DiegoAndai! - Improved compatibility with the upcoming @types/react for React 19 where the global JSX namespace doesn't exist anymore

  • #3208 56109e7 Thanks @Andarist! - Only forward defined refs to improve compatibility with the upcoming React 19

  • Updated dependencies [9ca22c6, b1d16b0, 16d8a8c]:

    • @emotion/serialize@1.2.0
    • @emotion/weak-memoize@0.4.0
    • @emotion/utils@1.3.0
    • @emotion/babel-plugin@11.12.0
    • @emotion/cache@11.12.0

11.11.4

Patch Changes

  • #3159 5b82631d Thanks @iegik! - Renamed an internal hasOwnProperty to hasOwn. This avoids problems in CommonJS environments when the consumer tries to prevent prototype pollution with Object.freeze(Object.prototype).

11.11.3

Patch Changes

  • #3101 49c20b4f Thanks @kyvong! - Fix Theme import for newer Typescript module resolution modes

  • Updated dependencies [45c440fb]:

    • @emotion/serialize@1.1.3

11.11.1

Patch Changes

  • #3048 9357f337 Thanks @naari3! - Added ElementType to the Emotion's JSX namespace. It's defined in the same way as the one in @types/react and should make it possible to use components that return strings, Promises and other types that are valid in React.

11.11.0

Minor Changes

Patch Changes

  • #3029 eed5e6cf Thanks @Andarist! - Fixed importing in Node ESM

  • Updated dependencies [336f3d50, eed5e6cf, 336f3d50]:

    • @emotion/babel-plugin@11.11.0
    • @emotion/cache@11.11.0
    • @emotion/serialize@1.1.2
    • @emotion/use-insertion-effect-with-fallbacks@1.0.1
    • @emotion/utils@1.2.1
    • @emotion/weak-memoize@0.3.1

11.10.8

Patch Changes

  • #3025 6bd13425 Thanks @Andarist! - Fixed a parsing issue with & within nested functions in declaration values by updating the underlying parser (stylis).

  • Updated dependencies [6bd13425, 6bd13425]:

    • @emotion/babel-plugin@11.10.8
    • @emotion/cache@11.10.8

11.10.6

Patch Changes

11.10.5

Patch Changes

  • #2905 4c0005f6 Thanks @p-m-p! - Do not warn about @emotion/react being loaded twice in Vitest as that might easily happen with mocked modules.
  • #2929 13afe030 Thanks @Andarist! - The support for @container queries has been added by updating the underlying parser (stylis) .

  • Updated dependencies [13afe030, c02b1214, d8a13bca]:

    • @emotion/babel-plugin@11.10.5
    • @emotion/serialize@1.1.1
    • @emotion/cache@11.10.5

11.10.4

Patch Changes

  • #2867 89b6dbb3 Thanks @Andarist! - Externalized code referencing React.useInsertionEffect to a separate @emotion/use-insertion-effect-with-fallbacks package. This package should be used in your defined externals if you bundle Emotion for whatever reason. It references useInsertionEffect in a very specific way that allows us to use it conditionally. However, if the code consuming Emotion is bundled as a library with Emotion in it then some bundlers might change the way in which we reference useInsertionEffect and that might create problems for bundlers used to consume the said library code. By externalizing this new package you can still bundle Emotion if you want to without running into this problem as you won't "destroy" the carefully crafted reference to useInsertionEffect in the process.

    Note that we don't recommend bundling Emotion. You should have very specific reasons to do so.

  • Updated dependencies [89b6dbb3]:

    • @emotion/use-insertion-effect-with-fallbacks@1.0.0

11.10.0

Minor Changes

  • #2819 bbad8c79 Thanks @nicksrandall! - exports field has been added to the package.json manifest. It limits what files can be imported from a package but we've tried our best to allow importing all the files that were considered to be a part of the public API.
  • #2819 bbad8c79 Thanks @nicksrandall! - Thanks to the added exports field, the package now includes a worker condition that can be utilized by properly configured bundlers when targeting worker-like environments. It fixes the issue with browser-specific files being prioritized by some bundlers when targeting workers.

Patch Changes

  • Updated dependencies [bbad8c79, bbad8c79]:
    • @emotion/babel-plugin@11.10.0
    • @emotion/cache@11.10.0
    • @emotion/serialize@1.1.0
    • @emotion/utils@1.2.0
    • @emotion/weak-memoize@0.3.0

11.9.3

Patch Changes

  • #2766 5b3f4d78 Thanks @Andarist! - ThemeProviderProps["children"] was marked as a required prop as ThemeProvider should always wrap some subtree.

  • Updated dependencies [26e4e3e8, 6c2d7a60, 5e81f213]:

    • @emotion/serialize@1.0.4
    • @emotion/cache@11.9.3

11.9.0

Patch Changes

  • #2700 d9357621 Thanks @arturmuller! - Fixed a false positive warning for content properties that included var().

  • Updated dependencies [d9357621]:

    • @emotion/serialize@1.0.3

11.8.2

Patch Changes

  • #2677 ff3cb164 Thanks @Jack-Works! - Change Global component to use the StyleSheet constructor of the current cache.sheet. This is useful when cache.sheet is not the default implementation. Thanks to that the inner sheet constructed by Global can share the behavior with its "main" sheet that is hold by the cache.

11.8.1

Patch Changes

  • #2651 39ac5b99 Thanks @Andarist! - Fixed a transpilation issue that caused useInsertionEffect to be referenced directly in the specifiers list of the import statement. This has caused build errors in the consuming tools since the import statement can only reference known exports of a module.

11.8.0

Minor Changes

  • #2600 2f27156a Thanks @Andarist! - Refactored code to use the upcoming React.useInsertionEffect when it's available (this is a new hook that is going to be introduced in React 18). This shouldn't have any effect on existing codebases and the change should be transparent.

Patch Changes

  • #2609 242f7d8c Thanks @Andarist! - Added @emotion/babel-plugin as a dependency - this is an actual dependency of the @emotion/react/macro entrypoint and it has to be explicitly declared to fix compatibility with strict package managers.
  • #2615 3d672acd Thanks @srmagura! - Fix an edge case where runtime label extraction in class components led to invalid class names in Firefox. This only affected the development build of Emotion.

  • Updated dependencies [2f27156a]:

    • @emotion/utils@1.1.0

11.7.1

Patch Changes

  • #2577 04681a5f Thanks @Methuselah96! - Export Keyframes type to avoid TypeScript inserting import("@emotion/serialize").Keyframes references into declaration files emitted based on a source files exporting keyframes result. This avoids issues with strict package managers that don't allow accessing undeclared dependencies.
  • #2590 1554a7e2 Thanks @Andarist! - Upgraded and pinned the version of Stylis - the CSS parser that Emotion uses under the hood.

  • Updated dependencies [1554a7e2]:

    • @emotion/cache@11.7.1

11.7.0

Patch Changes

  • #2534 57be9e8c Thanks @srmagura! - Changed the implementation of the runtime label extraction in elements using the css prop (that only happens in development) to one that should yield more consistent results across browsers. This fixes some minor issues with React reporting hydration mismatches that wouldn't happen in production.

11.6.0

Minor Changes

  • #2542 eb013d25 Thanks @eps1lon! - Fixed hydration mismatches if React.useId (an upcoming API in React 18) is used within a tree below our components.

Patch Changes

  • #2551 99fcea04 Thanks @Andarist! - Shorten the path of the "private" isolated-hoist-non-react-statics-do-not-use-this-in-your-code entrypoint to avoid exeeding path limitations on Windows.

  • Updated dependencies [9e82a991, 516fe458]:

    • @emotion/sheet@1.1.0
    • @emotion/cache@11.6.0

11.5.0

Patch Changes

  • #2498 e5beae8e Thanks @Andarist! - Fixed an edge case issue with incorrect rules being generated. When a context selector (&) was used not at the beginning of a selector (which is not valid SCSS but is allowed by the Stylis parser that we are using) within a group of selectors containing a pseudoclass then it was not replaced correctly with the current context selector.

11.4.1

Patch Changes

  • #2441 24557d9d Thanks @garronej! - Exposed __unsafe_useEmotionCache which can be used to access the current Emotion's cache in an easier way than before. Using this might break 0-config SSR and is not recommended to be used unless there you know what you are doing and you are OK with the mentioned downside.
  • #2424 cd25b62d Thanks @tills13! - Use theme context when rendering components at all times. This removes a conditional usage of a React hook that could break Rules of Hooks in some scenarios.
  • #2428 a69929d6 Thanks @eps1lon! - Added display names to public React contexts in development builds. This helps to recognize them in React Developer Tools.

  • Updated dependencies [405af5ca]:

    • @emotion/sheet@1.0.2

11.4.0

Patch Changes

  • #2334 7d9e74f8 Thanks @Andarist! - The Global component no longer replaces style elements from server-rendering on first mount and instead reuses the server-side rendered style element

  • Updated dependencies [38f9d44f]:

    • @emotion/cache@11.4.0

11.1.5

Patch Changes

11.1.4

Patch Changes

  • 71ca9be3 #2181 Thanks @101arrowz! - Fixed some typing issues with React components with custom generic render functions.

11.1.3

Patch Changes

  • 704b0092 #2180 Thanks @Andarist! - Fixed an issue with global styles containing pseudo selectors in at-rules not being able to be inserted.

  • Updated dependencies [704b0092]:

    • @emotion/cache@11.1.3

11.1.2

Patch Changes

  • 3f8bf70e #2132 Thanks @dcastil! - displayNames have been added to Global and ClassNames components so React Developer Tools should display those better now.
  • 1ee34005 #2122 Thanks @dcastil! - Improved label extraction from the stack traces to handle components with numbers in their names.
  • e5843530 #2140 Thanks @hasparus! - Fixed an issue with css prop type not being added to all components that accept a string className correctly.

  • Updated dependencies [5469d003]:

    • @emotion/sheet@1.0.1

11.1.1

Patch Changes

  • fdd46bdf #2112 Thanks @Andarist! - Fixed the latest tree-shakeability improvements by adding "sideEffects": false to all internal package.json files as well. This fixes hoist-non-react-statics not being dropped correctly despite of the latest improvements.

11.1.0

Patch Changes

11.0.0

Major Changes

  • b8476e08 #1675 Thanks @emmatown! - Rename @emotion/core to @emotion/react. Please change any imports of @emotion/core to import @emotion/react or use the @emotion/pkg-renaming ESLint rule from @emotion/eslint-plugin.
  • cbb8b796 #1628 Thanks @Andarist! - emotion-theming has been removed and all its exports were moved to @emotion/react package. Please import them like this import { useTheme, ThemeProvider, withTheme } from '@emotion/react' from now on.
  • a72e6dc #1501 Thanks @JakeGinnivan! - TypeScript types have been significantly restructured. These changes:

    • reduce build times when using Emotion, especially in larger projects
    • it's no longer necessary to manually specify generic parameters for your Emotion components in many cases
    • union types as props are better supported and should be inferred properly
    • the css function has been restricted to prevent passing invalid types
    • styled's generic parameter has been changed, if you were specifying the ComponentType you will need to remove that generic parameter
    • styled no longer takes a second ExtraProps parameter - instead of that move it to after the styled call. So instead of writing styled<typeof MyComponent, ExtraProps>(MyComponent)({}) you should now be writing styled(MyComponent)<ExtraProps>({})

    If you encounter build issues after upgrade, try removing any manually specified generic types and let them be inferred.

  • c6431074 #1609 Thanks @tomsseisums! - It's now easier to provide a type for Theme. Instead of creating custom instances (like before) you can augment the builtin Theme interface like this:

    import '@emotion/react'
    
    declare module '@emotion/react' {
      export interface Theme {
        primaryColor: string
        secondaryColor: string
      }
    }
  • f57a7229 #1941 Thanks @Andarist! - The way in which we provide TypeScript support for the css prop has changed. Based on the usage of our JSX factories, we can add support for css prop only for components that support className prop (as our JSX factory functions take the provided css prop, resolve it and pass the generated className to the rendered component).

    For the classic runtime this has been implemented using technique described here. What is important - we no longer extend any global interfaces, so people shouldn't bump anymore into type conflicts for the css prop when using different libraries with css prop support, such as styled-components.

    For the automatic runtime this has been implemented by exporting JSX namespace from the appropriate entries but this is only supported in TypeScript 4.1 or higher.

    However, if you are stuck with older version of TypeScript or using the classic runtime implicitly by using our @emotion/babel-preset-css-prop then it's not possible to leverage leverage css prop support being added conditionally based on a type of rendered component. For those cases we have added a special file that can be imported once to add support for the css prop globally, for all components. Use it like this:

    /// <reference types="@emotion/react/types/css-prop" />

    In this particular case we are forced to extend the existing React.Attributes interface. Previously we've been extending both React.DOMAttributes<T> and JSX.IntrinsicAttributes. This change is really minor and shouldn't affect any consuming code.

  • 843bfb11 #1630 Thanks @Andarist! - Removed default export from @emotion/css - it's main purpose was to allow css to be a Babel macro, but since babel-plugin-macros allows us to keep imports nowadays this is no longer needed. @emotion/react/macro has been added to account for this use case and appropriate changes has been made to @emotion/babel-plugin to facilitate those changes.

    If you have used @emotion/css directly (it was always reexported from @emotion/react) or you have been using its macro then you should update your code like this:

    -import css from '@emotion/css'
    +import { css } from '@emotion/react'
    
    // or
    -import css from '@emotion/css/macro'
    +import { css } from '@emotion/react/macro'

    You can also use the @emotion/pkg-renaming ESLint rule from @emotion/eslint-plugin to do this for you.

  • 79036056 #967 Thanks @emmatown! - Use hooks internally for improved bundle size and a better tree in React DevTools
  • 9e998e37 #1817 Thanks @Andarist! - The parser we use (Stylis) got upgraded. It fixes some long-standing parsing edge cases while being smaller and faster πŸš€

    It has been completely rewritten and comes with some breaking changes. The most notable ones that might affect Emotion users are:

    • plugins written for the former Stylis v3 are not compatible with the new version. To learn more on how to write a plugin for Stylis v4 you can check out its README and the source code of core plugins.
    • vendor-prefixing was previously customizable using prefix option. This was always limited to turning off all of some of the prefixes as all available prefixes were on by default. The prefix option is gone and to customize which prefixes are applied you need to fork (copy-paste) the prefixer plugin and adjust it to your needs. While this being somewhat more problematic to setup at first we believe that the vast majority of users were not customizing this anyway. By not including the possibility to customize this through an extra option the final solution is more performant because there is no extra overhead of checking if a particular property should be prefixed or not.
    • the prefixer is now just a plugin which happens to be included in the default stylisPlugins. If you plan to use custom stylisPlugins and you want to have your styles prefixed automatically you must include prefixer in your custom stylisPlugins. You can import prefixer from the stylis module to do that.
    • @import rules are no longer special-cased. The responsibility to put them first has been moved to the author of the styles. They also can't be nested within other rules now. It's only possible to write them at the top level of global styles.

Minor Changes

  • c672175b #1130 Thanks @jtmthf! - Support functions in arrays passed to css prop and Global's styles prop. This allows for composition of theme-accepting functions.
  • 828111cd #1639 Thanks @Andarist! - Global imported from macro entry (@emotion/react/macro) gets source maps generated now when inline css-less expression is used as value of the styles prop.
  • 5d692a6a #1956 Thanks @eps1lon! - Upgraded csstype dependency to its v3. This is what we use to provide TypeScript typings for object styles. The upgrade should not affect any consuming code but it's worth mentioning if any edge case scenarios arise.

Patch Changes

  • 7dea6d7a #1734 Thanks @Andarist! - Fixed styles inserted by <Global/> component not inheriting speedy option from a cache passed to a wrapping <CacheProvider/>.

  • 5c55fd17 #1653 Thanks @Andarist! - Fix to what location generated source maps are pointing in case of composed styles.

  • 75e2f9e1 #1810 Thanks @Andarist! - Add a dev-only warning about styles created with css from @emotion/react being passed to cx from <ClassNames/>.
  • 58dc08a6 #1837 Thanks @arcanis! - Fixed TS compatibility under PnP environments by making @types/react an optional peer dependency.

11.0.0-rc.0

Major Changes

Patch Changes

  • Updated dependencies [9c4ebc16]:
    • @emotion/cache@11.0.0-rc.0
    • @emotion/serialize@1.0.0-rc.0
    • @emotion/sheet@1.0.0-rc.0
    • @emotion/utils@1.0.0-rc.0

11.0.0-next.19

Patch Changes

  • Updated dependencies [42df3f3b, 42df3f3b]:
    • @emotion/sheet@1.0.0-next.5
    • @emotion/cache@11.0.0-next.19

11.0.0-next.17

Patch Changes

  • Updated dependencies [76e3dc4d]:
    • @emotion/serialize@1.0.0-next.5

11.0.0-next.16

Patch Changes

  • 58b2bbca #1981 Thanks @Andarist! - Changed the key of the global flag that helps us identify that @emotion/react has been loaded more than once to include the current major version of @emotion/react.

  • Updated dependencies [a8eb4e75, dfe98028, debaad9a, 39be057b, 39be057b]:

    • @emotion/cache@11.0.0-next.16
    • @emotion/utils@1.0.0-next.1
    • @emotion/sheet@1.0.0-next.4
    • @emotion/serialize@0.11.15-next.4

11.0.0-next.15

Minor Changes

  • 5d692a6a #1956 Thanks @eps1lon! - Upgraded csstype dependency to its v3. This is what we use to provide TypeScript typings for object styles. The upgrade should not affect any consuming code but it's worth mentioning if any edge case scenarios arise.

Patch Changes

  • Updated dependencies [dc1a0c5e, 5d692a6a]:
    • @emotion/sheet@1.0.0-next.3
    • @emotion/serialize@1.0.0-next.3
    • @emotion/cache@11.0.0-next.15

11.0.0-next.14

Patch Changes

  • 58dc08a6 #1837 Thanks @arcanis! - Fixed TS compatibility under PnP environments by making @types/react an optional peer dependency.
  • f57a7229 #1941 Thanks @Andarist! - The way in which we provide TypeScript support for css prop has changed. Based on usage of our jsx pragma we are able to add support for css prop only for components that support className prop (as our jsx factory function takes provided css prop, resolves it and pass the generated className to the rendered component). This has been implemented using technique described here. What is important - we no longer extend any global interfaces, so people shouldn't bump anymore into type conflicts for the css prop when using different libraries with the css prop support, such as styled-components.

    However, it's not possible to leverage css prop support being added conditionally based on a type of rendered component when one is not using our jsx pragma. For those cases when people use our pragma implicitly (for example when using our @emotion/babel-preset-css-prop) we have added special file that can be imported once to add support for the css prop globally, for all components. Use it like this:

    import {} from '@emotion/react/types/css-prop'

    In this particular case we are forced to extend the existing React.Attributes interface. Previously we've been extending both React.DOMAttributes<T> and JSX.IntrinsicAttributes. This change is really minor and shouldn't affect any consuming code.

  • Updated dependencies [4d3b60d0, 58dc08a6, 6d32d82b]:

    • @emotion/styled@11.0.0-next.14
    • @emotion/css@11.0.0-next.14
    • @emotion/server@11.0.0-next.14

11.0.0-next.13

Major Changes

  • 9e998e37 #1817 Thanks @Andarist! - The parser we use (Stylis) got upgraded. It fixes some long-standing parsing edge cases while being smaller and faster πŸš€

    It has been completely rewritten and comes with some breaking changes. Most notable ones that might affect Emotion users are:

    • plugins written for the former Stylis v3 are not compatible with the new version. To learn more on how to write a plugin for Stylis v4 you can check out its README and the source code of core plugins.
    • vendor-prefixing was previously customizable using prefix option. This was always limited to turning off all of some of the prefixes as all available prefixes were on by default. The prefix option is gone and to customize which prefixes are applied you need to fork (copy-paste) the prefixer plugin and adjust it to your needs. While this being somewhat more problematic to setup at first we believe that the vast majority of users were not customizing this anyway. By not including the possibility to customize this through an extra option the final solution is more performant because there is no extra overhead of checking if a particular property should be prefixed or not.
    • Prefixer is now just a plugin which happens to be put in default stylisPlugins. If you plan to use custom stylisPlugins and you want to have your styles prefixed automatically you must include prefixer in your custom stylisPlugins. You can import prefixer from the stylis module to do that.
    • @import rules are no longer special-cased. The responsibility to put them first has been moved to the author of the styles. They also can't be nested within other rules now. It's only possible to write them at the top level of global styles.

Patch Changes

  • Updated dependencies [91046a8c, 9e998e37, 9e998e37, 9e998e37]:
    • @emotion/sheet@1.0.0-next.2
    • @emotion/cache@11.0.0-next.13
    • @emotion/css@11.0.0-next.13
    • @emotion/styled@11.0.0-next.13
    • @emotion/utils@1.0.0-next.0
    • @emotion/server@11.0.0-next.13
    • @emotion/serialize@0.11.15-next.2

11.0.0-next.12

Major Changes

  • 105de5c8 #1572 Thanks @Andarist! - [data-emotion] attribute on SSRed styled has changed. You should never rely on it though.

Patch Changes

  • 7dea6d7a #1734 Thanks @Andarist! - Fixed styles inserted by <Global/> component not inheriting speedy option from a cache passed to a wrapping <CacheProvider/>.
  • be2eb614 #1806 Thanks @Andarist! - Do not warn about @emotion/react being loaded twice in Jest. For some reason Jest sometimes evaluates modules twice when jest.mock is being called.
  • 75e2f9e1 #1810 Thanks @Andarist! - Add a dev-only warning about styles created with css from @emotion/react being passed to cx from <ClassNames/>.

  • Updated dependencies [e3d7db87, 105de5c8, 105de5c8, 5bea60b1, 105de5c8, 105de5c8]:

    • @emotion/serialize@1.0.0-next.1
    • @emotion/server@11.0.0-next.12
    • @emotion/styled@11.0.0-next.12
    • @emotion/cache@11.0.0-next.12
    • @emotion/css@11.0.0-next.12

11.0.0-next.11

Patch Changes

  • Updated dependencies [f08ef5a3, b79781f8]:
    • @emotion/serialize@0.11.15-next.4
    • @emotion/styled@11.0.0-next.11
    • @emotion/css@11.0.0-next.11

11.0.0-next.10

Major Changes

  • b8476e08 #1675 Thanks @emmatown! - Rename @emotion/core to @emotion/react. Please change any imports of @emotion/core to import @emotion/react or use the @emotion/pkg-renaming ESLint rule from @emotion/eslint-plugin.

Patch Changes

  • affed3dd #1702 Thanks @Andarist! - Fix issue with published TypeScript test files augmenting Theme interface.

11.0.0-next.7

Patch Changes

  • 5c55fd17 #1653 Thanks @Andarist! - Fix to what location generated source maps are pointing in case of composed styles.
  • Updated dependencies [5c55fd17, 729ef9d8]:
    • @emotion/serialize@0.11.15-next.2
    • @emotion/styled@11.0.0-next.7

11.0.0-next.6

Major Changes

  • 843bfb11 #1630 Thanks @Andarist! - Removed @emotion/css - it's main purpose was to allow css to be a Babel macro, but since babel-plugin-macros allows us to keep imports nowadays this is no longer needed. @emotion/core/macro has been added to account for this use case and appropriate changes has been made to babel-plugin-emotion to facilitate those changes.

    If you have used @emotion/css directly (it was always reexported from @emotion/core) or you have been using its macro then you should update your code like this:

    -import css from '@emotion/css'
    +import { css } from '@emotion/core'
    
    // or
    -import css from '@emotion/css/macro'
    +import { css } from '@emotion/core/macro'
  • cbb8b796 #1628 Thanks @Andarist! - emotion-theming has been removed and all its exports were moved to @emotion/core package. Please import them like this import { useTheme, ThemeProvider, withTheme } from '@emotion/core' from now on.

Minor Changes

  • 828111cd #1639 Thanks @Andarist! - Global imported from macro entry (@emotion/core/macro) gets source maps generated now when inline css-less expression is used as value of the styles prop.

Patch Changes

  • Updated dependencies [923ded01, 4a891bf6, 843bfb11]:
    • @emotion/styled@11.0.0-next.6
    • @emotion/cache@11.0.0-next.6
    • @emotion/sheet@0.10.0-next.0
    • @emotion/css@11.0.0-next.6

11.0.0-next.5

Patch Changes

  • Updated dependencies [ad77ed24, 99c6b7e2]:
    • @emotion/styled@11.0.0-next.5
    • emotion-theming@11.0.0-next.5

11.0.0-next.4

Patch Changes

  • Updated dependencies [e6e079c3]:
    • @emotion/styled@11.0.0-next.4
    • emotion-theming@11.0.0-next.4

11.0.0-next.3

Patch Changes

  • a085003d #1613 Thanks @Andarist! - Add missing #__PURE__ annotations
  • Updated dependencies [8a896a31, a085003d, f9feab1a]:
    • @emotion/serialize@0.11.15-next.1
    • @emotion/styled@11.0.0-next.3
    • @emotion/css@11.0.0-next.3
    • emotion-theming@11.0.0-next.3

11.0.0-next.2

Major Changes

  • 79036056 #967 Thanks @emmatown! - Use hooks internally for improved bundle size and a better tree in React DevTools

Patch Changes

  • Updated dependencies [79036056, 79036056]:
    • @emotion/styled@11.0.0-next.2
    • emotion-theming@11.0.0-next.2

11.0.0-next.1

Patch Changes

  • Updated dependencies [1eaa3a38, 22935470]:
    • @emotion/css@11.0.0-next.1
    • emotion-theming@11.0.0-next.1
    • @emotion/serialize@1.0.0-next.0
    • @emotion/styled@11.0.0-next.1

11.0.0-next.0

Major Changes

  • 302bdba1 #1600 Thanks @emmatown! - Ensure packages are major bumped so that pre-release versions of the linked packages are consistent in the major number

Patch Changes

  • Updated dependencies [302bdba1]:
    • @emotion/cache@11.0.0-next.0
    • @emotion/css@11.0.0-next.0
    • emotion@11.0.0-next.0
    • emotion-server@11.0.0-next.0
    • emotion-theming@11.0.0-next.0
    • @emotion/styled@11.0.0-next.0

10.1.1

Patch Changes

  • fe30cbd6 #2066 Thanks @Andarist! - Fixed an issue with React giving warning about static children not having unique keys when using the classic jsx factory. This example illustrates the situation in which this has been incorrectly happening:

    <div css={{ color: 'hotpink' }}>
      <div />
      <div />
    </div>

10.1.0

Minor Changes

  • 71514b06 #1970 Thanks @FLGMwt! - Support for the new JSX runtimes has been added. They require compatible React versions and shouldn't be manually used.

    To use them you can use the new @jsxImportSource @emotion/core pragma instead of the old @jsx jsx or you can use @emotion/babel-preset-css-prop with { runtime: 'automatic' } option to have it handled automatically for you for the whole project.

10.0.35

Patch Changes

  • 2cf3b16b #1973 Thanks @santialbo! - Fixed label extraction from the stack traces in node for components wrapped in React.forwardRef. This has affected only development builds.

10.0.34

Patch Changes

  • 4979ebb2 #1966 Thanks @chnakamura! - Fixed label extraction from the stack traces in Chrome in certain scenarios. This has affected only development builds.

10.0.28

Patch Changes

  • d0b2a94 #1714 Thanks @Andarist! - Fixed label extraction from the stack traces in FireFox and Safari. We have failed to match a label in Emotion wrappers like Theme UI which caused SSR mismatches in mentioned browsers. This has affected only development builds.

10.0.27

Patch Changes

  • 4c62ae9 #1698 Thanks @Andarist! - Add LICENSE file
  • Updated dependencies [4c62ae9]:
    • @emotion/cache@10.0.27
    • @emotion/css@10.0.27
    • emotion-server@10.0.27
    • emotion-theming@10.0.27
    • emotion@10.0.27
    • @emotion/serialize@0.11.15
    • @emotion/sheet@0.9.4
    • @emotion/styled@10.0.27
    • @emotion/utils@0.11.3

10.0.22

Patch Changes

  • 2fc75f26 #1548 Thanks @Andarist! - Accept objects as className in jsx-created components (they are stringified) to match React behavior

10.0.21

Patch Changes

  • 7855db4a #1537 Thanks @Andarist! - Add missing /* #__PURE__ */ annotation to creation of EmotionCssPropInternal

10.0.20

Patch Changes

  • 38bb2b19 #1530 Thanks @Andarist! - Fix class not being applied when putting nil as css prop value on wrapper component

10.0.17

Patch Changes

10.0.16

Patch Changes

  • 47262b64 - Fix labels from stack traces in some cases

10.0.15

Patch Changes

10.0.14

Patch Changes