From f59f000377d5f3cd7a625e111b75987a3899501d Mon Sep 17 00:00:00 2001 From: Ky Vong Date: Sat, 19 Aug 2023 22:16:34 -0700 Subject: [PATCH 1/2] Fix Theme import for Typescript module resolution modes that support the `exports` field --- packages/react/types/css-prop.d.ts | 2 +- packages/react/types/jsx-namespace.d.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/react/types/css-prop.d.ts b/packages/react/types/css-prop.d.ts index 6f35b6bfa..f0fb0361b 100644 --- a/packages/react/types/css-prop.d.ts +++ b/packages/react/types/css-prop.d.ts @@ -1,6 +1,6 @@ import {} from 'react' import { Interpolation } from '@emotion/serialize' -import { Theme } from '.' +import { Theme } from '@emotion/react' declare module 'react' { interface Attributes { diff --git a/packages/react/types/jsx-namespace.d.ts b/packages/react/types/jsx-namespace.d.ts index 101c582ac..f054601e5 100644 --- a/packages/react/types/jsx-namespace.d.ts +++ b/packages/react/types/jsx-namespace.d.ts @@ -1,6 +1,6 @@ import 'react' import { Interpolation } from '@emotion/serialize' -import { Theme } from './index' +import { Theme } from '@emotion/react' type WithConditionalCSSProp

= 'className' extends keyof P ? string extends P['className' & keyof P] From 9248af4f13d41f10b2a552a7056e83ef4c60d015 Mon Sep 17 00:00:00 2001 From: Ky Vong Date: Sat, 19 Aug 2023 22:54:48 -0700 Subject: [PATCH 2/2] Add changeset --- .changeset/light-seals-judge.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/light-seals-judge.md diff --git a/.changeset/light-seals-judge.md b/.changeset/light-seals-judge.md new file mode 100644 index 000000000..1b94d4247 --- /dev/null +++ b/.changeset/light-seals-judge.md @@ -0,0 +1,5 @@ +--- +'@emotion/react': patch +--- + +Fix Theme import for newer Typescript module resolution modes