diff --git a/.changeset/lazy-games-own.md b/.changeset/lazy-games-own.md new file mode 100644 index 00000000000..f60ca02c7f0 --- /dev/null +++ b/.changeset/lazy-games-own.md @@ -0,0 +1,5 @@ +--- +"@primer/react": major +--- + +Remove styled-components and styled-system from dependencies diff --git a/.changeset/small-yaks-own.md b/.changeset/small-yaks-own.md new file mode 100644 index 00000000000..4450ac67b65 --- /dev/null +++ b/.changeset/small-yaks-own.md @@ -0,0 +1,5 @@ +--- +"@primer/react": major +--- + +chore: remove theme get from @primer/react diff --git a/.changeset/tame-insects-think.md b/.changeset/tame-insects-think.md new file mode 100644 index 00000000000..e0031e8a484 --- /dev/null +++ b/.changeset/tame-insects-think.md @@ -0,0 +1,5 @@ +--- +"@primer/react": major +--- + +Remove styled-components from dependencies diff --git a/.changeset/tiny-parents-peel.md b/.changeset/tiny-parents-peel.md new file mode 100644 index 00000000000..b0cfb117f20 --- /dev/null +++ b/.changeset/tiny-parents-peel.md @@ -0,0 +1,5 @@ +--- +"@primer/styled-react": major +--- + +Remove feature flag to fall back to theming from primer/react diff --git a/.changeset/yellow-pens-kiss.md b/.changeset/yellow-pens-kiss.md new file mode 100644 index 00000000000..9a456505b25 --- /dev/null +++ b/.changeset/yellow-pens-kiss.md @@ -0,0 +1,5 @@ +--- +"@primer/react": major +--- + +ThemeProvider: Remove styled-components ThemeProvider diff --git a/.playwright/snapshots/components/UnderlineNav.test.ts-snapshots/UnderlineNav-Profile-Page-dark-colorblind-linux.png b/.playwright/snapshots/components/UnderlineNav.test.ts-snapshots/UnderlineNav-Profile-Page-dark-colorblind-linux.png index 87141d4d00b..7385f0d8a24 100644 Binary files a/.playwright/snapshots/components/UnderlineNav.test.ts-snapshots/UnderlineNav-Profile-Page-dark-colorblind-linux.png and b/.playwright/snapshots/components/UnderlineNav.test.ts-snapshots/UnderlineNav-Profile-Page-dark-colorblind-linux.png differ diff --git a/.playwright/snapshots/components/UnderlineNav.test.ts-snapshots/UnderlineNav-Profile-Page-dark-dimmed-linux.png b/.playwright/snapshots/components/UnderlineNav.test.ts-snapshots/UnderlineNav-Profile-Page-dark-dimmed-linux.png index 0f8b806de06..530da321881 100644 Binary files a/.playwright/snapshots/components/UnderlineNav.test.ts-snapshots/UnderlineNav-Profile-Page-dark-dimmed-linux.png and b/.playwright/snapshots/components/UnderlineNav.test.ts-snapshots/UnderlineNav-Profile-Page-dark-dimmed-linux.png differ diff --git a/.playwright/snapshots/components/UnderlineNav.test.ts-snapshots/UnderlineNav-Profile-Page-dark-high-contrast-linux.png b/.playwright/snapshots/components/UnderlineNav.test.ts-snapshots/UnderlineNav-Profile-Page-dark-high-contrast-linux.png index e82903e6799..94c5078cff1 100644 Binary files a/.playwright/snapshots/components/UnderlineNav.test.ts-snapshots/UnderlineNav-Profile-Page-dark-high-contrast-linux.png and b/.playwright/snapshots/components/UnderlineNav.test.ts-snapshots/UnderlineNav-Profile-Page-dark-high-contrast-linux.png differ diff --git a/.playwright/snapshots/components/UnderlineNav.test.ts-snapshots/UnderlineNav-Profile-Page-dark-linux.png b/.playwright/snapshots/components/UnderlineNav.test.ts-snapshots/UnderlineNav-Profile-Page-dark-linux.png index 87141d4d00b..7385f0d8a24 100644 Binary files a/.playwright/snapshots/components/UnderlineNav.test.ts-snapshots/UnderlineNav-Profile-Page-dark-linux.png and b/.playwright/snapshots/components/UnderlineNav.test.ts-snapshots/UnderlineNav-Profile-Page-dark-linux.png differ diff --git a/.playwright/snapshots/components/UnderlineNav.test.ts-snapshots/UnderlineNav-Profile-Page-dark-tritanopia-linux.png b/.playwright/snapshots/components/UnderlineNav.test.ts-snapshots/UnderlineNav-Profile-Page-dark-tritanopia-linux.png index 87141d4d00b..7385f0d8a24 100644 Binary files a/.playwright/snapshots/components/UnderlineNav.test.ts-snapshots/UnderlineNav-Profile-Page-dark-tritanopia-linux.png and b/.playwright/snapshots/components/UnderlineNav.test.ts-snapshots/UnderlineNav-Profile-Page-dark-tritanopia-linux.png differ diff --git a/.playwright/snapshots/components/UnderlineNav.test.ts-snapshots/UnderlineNav-Profile-Page-light-colorblind-linux.png b/.playwright/snapshots/components/UnderlineNav.test.ts-snapshots/UnderlineNav-Profile-Page-light-colorblind-linux.png index 3df823c2827..a288a970583 100644 Binary files a/.playwright/snapshots/components/UnderlineNav.test.ts-snapshots/UnderlineNav-Profile-Page-light-colorblind-linux.png and b/.playwright/snapshots/components/UnderlineNav.test.ts-snapshots/UnderlineNav-Profile-Page-light-colorblind-linux.png differ diff --git a/.playwright/snapshots/components/UnderlineNav.test.ts-snapshots/UnderlineNav-Profile-Page-light-high-contrast-linux.png b/.playwright/snapshots/components/UnderlineNav.test.ts-snapshots/UnderlineNav-Profile-Page-light-high-contrast-linux.png index b107bad5c71..3f7955e585e 100644 Binary files a/.playwright/snapshots/components/UnderlineNav.test.ts-snapshots/UnderlineNav-Profile-Page-light-high-contrast-linux.png and b/.playwright/snapshots/components/UnderlineNav.test.ts-snapshots/UnderlineNav-Profile-Page-light-high-contrast-linux.png differ diff --git a/.playwright/snapshots/components/UnderlineNav.test.ts-snapshots/UnderlineNav-Profile-Page-light-linux.png b/.playwright/snapshots/components/UnderlineNav.test.ts-snapshots/UnderlineNav-Profile-Page-light-linux.png index 3df823c2827..a288a970583 100644 Binary files a/.playwright/snapshots/components/UnderlineNav.test.ts-snapshots/UnderlineNav-Profile-Page-light-linux.png and b/.playwright/snapshots/components/UnderlineNav.test.ts-snapshots/UnderlineNav-Profile-Page-light-linux.png differ diff --git a/.playwright/snapshots/components/UnderlineNav.test.ts-snapshots/UnderlineNav-Profile-Page-light-tritanopia-linux.png b/.playwright/snapshots/components/UnderlineNav.test.ts-snapshots/UnderlineNav-Profile-Page-light-tritanopia-linux.png index 3df823c2827..a288a970583 100644 Binary files a/.playwright/snapshots/components/UnderlineNav.test.ts-snapshots/UnderlineNav-Profile-Page-light-tritanopia-linux.png and b/.playwright/snapshots/components/UnderlineNav.test.ts-snapshots/UnderlineNav-Profile-Page-light-tritanopia-linux.png differ diff --git a/examples/codesandbox/package.json b/examples/codesandbox/package.json index 4bc2af40ad5..8d8430f70a5 100644 --- a/examples/codesandbox/package.json +++ b/examples/codesandbox/package.json @@ -18,6 +18,7 @@ "@types/react-dom": "^18.3.0", "@vitejs/plugin-react": "^4.3.3", "@primer/react": "38.0.0-rc.9", + "@primer/styled-react": "1.0.0-rc.10", "styled-components": "5.x", "typescript": "^5.9.2", "vite": "^7.1.11" diff --git a/examples/codesandbox/src/main.tsx b/examples/codesandbox/src/main.tsx index ee4c9701ba6..c079068e829 100644 --- a/examples/codesandbox/src/main.tsx +++ b/examples/codesandbox/src/main.tsx @@ -1,4 +1,4 @@ -import {BaseStyles, ThemeProvider} from '@primer/react' +import {BaseStyles, ThemeProvider} from '@primer/styled-react' import React from 'react' import ReactDOM from 'react-dom/client' import App from './App.tsx' diff --git a/examples/theming/package.json b/examples/theming/package.json index ee8edcc6d62..eeee2acaf1e 100644 --- a/examples/theming/package.json +++ b/examples/theming/package.json @@ -12,6 +12,7 @@ "dependencies": { "@primer/octicons-react": "^19.14.0", "@primer/react": "38.0.0-rc.9", + "@primer/styled-react": "1.0.0-rc.10", "clsx": "^2.1.1", "next": "^15.2.3", "react": "18.3.1", diff --git a/examples/theming/src/app/components/ThemePreference/ThemePreference.tsx b/examples/theming/src/app/components/ThemePreference/ThemePreference.tsx index d33c3b503a7..63e8310d0d3 100644 --- a/examples/theming/src/app/components/ThemePreference/ThemePreference.tsx +++ b/examples/theming/src/app/components/ThemePreference/ThemePreference.tsx @@ -1,7 +1,9 @@ 'use client' import {SunIcon, MoonIcon} from '@primer/octicons-react' -import {Button, useTheme} from '@primer/react' +import {useTheme} from '@primer/styled-react' +import {Button} from '@primer/react' + import classes from './ThemePreference.module.css' export function ThemePreference() { diff --git a/examples/theming/src/app/layout.tsx b/examples/theming/src/app/layout.tsx index 91614eea628..3f632308872 100644 --- a/examples/theming/src/app/layout.tsx +++ b/examples/theming/src/app/layout.tsx @@ -1,6 +1,6 @@ import './global.css' import {cookies} from 'next/headers' -import {BaseStyles, ThemeProvider} from '@primer/react' +import {BaseStyles, ThemeProvider} from '@primer/styled-react' import {StyledComponentsRegistry} from './registry' export const metadata = { diff --git a/package-lock.json b/package-lock.json index b0f35787c2f..3836c29a746 100644 --- a/package-lock.json +++ b/package-lock.json @@ -75,7 +75,8 @@ "react-dom": "^18.3.1" }, "devDependencies": { - "@primer/react": "38.0.0-rc.8", + "@primer/react": "38.0.0-rc.9", + "@primer/styled-react": "1.0.0-rc.10", "@types/react": "^18.3.11", "@types/react-dom": "^18.3.0", "@vitejs/plugin-react": "^4.3.3", @@ -88,8 +89,8 @@ "name": "example-nextjs", "version": "0.0.0", "dependencies": { - "@primer/react": "38.0.0-rc.8", - "@primer/styled-react": "1.0.0-rc.9", + "@primer/react": "38.0.0-rc.9", + "@primer/styled-react": "1.0.0-rc.10", "next": "^15.2.3", "react": "18.3.1", "react-dom": "18.3.1", @@ -105,7 +106,8 @@ "version": "0.0.0", "dependencies": { "@primer/octicons-react": "^19.14.0", - "@primer/react": "38.0.0-rc.8", + "@primer/react": "38.0.0-rc.9", + "@primer/styled-react": "1.0.0-rc.10", "clsx": "^2.1.1", "next": "^15.2.3", "react": "18.3.1", @@ -7837,6 +7839,8 @@ }, "node_modules/@styled-system/theme-get": { "version": "5.1.2", + "resolved": "https://registry.npmjs.org/@styled-system/theme-get/-/theme-get-5.1.2.tgz", + "integrity": "sha512-afAYdRqrKfNIbVgmn/2Qet1HabxmpRnzhFwttbGr6F/mJ4RDS/Cmn+KHwHvNXangQsWw/5TfjpWV+rgcqqIcJQ==", "license": "MIT", "dependencies": { "@styled-system/core": "^5.1.2" @@ -8218,12 +8222,16 @@ } }, "node_modules/@types/hoist-non-react-statics": { - "version": "3.3.5", + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.7.tgz", + "integrity": "sha512-PQTyIulDkIDro8P+IHbKCsw7U2xxBYflVzW/FgWdCAePD9xGSidgA76/GeJ6lBKoblyhf9pBY763gbrN+1dI8g==", "dev": true, "license": "MIT", "dependencies": { - "@types/react": "*", "hoist-non-react-statics": "^3.3.0" + }, + "peerDependencies": { + "@types/react": "*" } }, "node_modules/@types/is-empty": { @@ -8383,6 +8391,8 @@ }, "node_modules/@types/styled-components": { "version": "5.1.34", + "resolved": "https://registry.npmjs.org/@types/styled-components/-/styled-components-5.1.34.tgz", + "integrity": "sha512-mmiVvwpYklFIv9E8qfxuPyIt/OuyIrn6gMOAMOFUO3WJfSrSE+sGUoa4PiZj77Ut7bKZpaa6o1fBKS/4TOEvnA==", "dev": true, "license": "MIT", "dependencies": { @@ -8392,7 +8402,9 @@ } }, "node_modules/@types/styled-system": { - "version": "5.1.23", + "version": "5.1.24", + "resolved": "https://registry.npmjs.org/@types/styled-system/-/styled-system-5.1.24.tgz", + "integrity": "sha512-bItgWb7lQsynxuSoyfPj2LZCNB9aeRCv70NYvMKZN1xbcQ/j6IS2PWsIlQqkIzDQgHbdcrRbWEIg9vKlbbgnGw==", "license": "MIT", "dependencies": { "csstype": "^3.0.2" @@ -8400,6 +8412,8 @@ }, "node_modules/@types/styled-system__css": { "version": "5.0.21", + "resolved": "https://registry.npmjs.org/@types/styled-system__css/-/styled-system__css-5.0.21.tgz", + "integrity": "sha512-8S1lPbUbrE8U/2btqjh9X6pK9//kQdbQDe9z3vQl4SWtxtqoAVnrFZE6Xs+IHM7NMZ1uC68XrF9nLdzRHm3VyA==", "license": "MIT", "dependencies": { "csstype": "^3.0.2" @@ -8407,6 +8421,8 @@ }, "node_modules/@types/styled-system__theme-get": { "version": "5.0.4", + "resolved": "https://registry.npmjs.org/@types/styled-system__theme-get/-/styled-system__theme-get-5.0.4.tgz", + "integrity": "sha512-dbzwxQ+8x6Bo3EKZMo9M3Knzo77ukwoC/isKW+GAuF5TenXlPkvgzx4t4+Lp0+fKs2M4owSef0KO3gtGW3Hpkw==", "license": "MIT" }, "node_modules/@types/supports-color": { @@ -26317,7 +26333,7 @@ }, "packages/react": { "name": "@primer/react", - "version": "38.0.0-rc.8", + "version": "38.0.0-rc.9", "license": "MIT", "dependencies": { "@github/mini-throttle": "^2.1.1", @@ -26329,12 +26345,6 @@ "@primer/live-region-element": "^0.7.1", "@primer/octicons-react": "^19.13.0", "@primer/primitives": "10.x || 11.x", - "@styled-system/css": "^5.1.5", - "@styled-system/props": "^5.1.5", - "@styled-system/theme-get": "^5.1.2", - "@types/styled-system": "^5.1.23", - "@types/styled-system__css": "^5.0.16", - "@types/styled-system__theme-get": "^5.0.1", "clsx": "^2.1.1", "color2k": "^2.0.3", "deepmerge": "^4.3.1", @@ -26344,8 +26354,7 @@ "lodash.isempty": "^4.4.0", "lodash.isobject": "^3.0.2", "react-compiler-runtime": "^19.1.0-rc.2", - "react-intersection-observer": "^9.16.0", - "styled-system": "^5.1.5" + "react-intersection-observer": "^9.16.0" }, "devDependencies": { "@actions/core": "1.11.1", @@ -26387,7 +26396,6 @@ "@types/react-dom": "18.3.1", "@types/react-is": "18.3.1", "@types/react-test-renderer": "18.3.1", - "@types/styled-components": "^5.1.26", "@vitejs/plugin-react": "^4.3.3", "afterframe": "^1.0.2", "ajv": "8.16.0", @@ -26398,7 +26406,6 @@ "babel-plugin-macros": "3.1.0", "babel-plugin-open-source": "1.3.4", "babel-plugin-react-compiler": "^19.1.0-rc.3", - "babel-plugin-styled-components": "2.1.4", "babel-plugin-transform-replace-expressions": "0.2.0", "babel-polyfill": "6.26.0", "chalk": "^5.4.1", @@ -26433,7 +26440,6 @@ "rollup-plugin-postcss": "4.0.2", "rollup-plugin-visualizer": "6.0.3", "storybook": "^9.1.10", - "styled-components": "5.3.11", "terser": "5.36.0", "ts-toolbelt": "9.6.0", "tsx": "4.20.3", @@ -26453,11 +26459,9 @@ "@types/react": "18.x || 19.x", "@types/react-dom": "18.x || 19.x", "@types/react-is": "18.x || 19.x", - "@types/styled-components": "^5.1.11", "react": "18.x || 19.x", "react-dom": "18.x || 19.x", - "react-is": "18.x || 19.x", - "styled-components": "5.x" + "react-is": "18.x || 19.x" }, "peerDependenciesMeta": { "@types/react": { @@ -26468,9 +26472,6 @@ }, "@types/react-is": { "optional": true - }, - "@types/styled-components": { - "optional": true } } }, @@ -26894,14 +26895,24 @@ }, "packages/styled-react": { "name": "@primer/styled-react", - "version": "1.0.0-rc.9", + "version": "1.0.0-rc.10", + "dependencies": { + "@styled-system/css": "^5.1.5", + "@styled-system/props": "^5.1.5", + "@styled-system/theme-get": "^5.1.2", + "@types/styled-system": "^5.1.23", + "@types/styled-system__css": "^5.0.16", + "@types/styled-system__theme-get": "^5.0.1", + "styled-system": "^5.1.5" + }, "devDependencies": { "@babel/preset-react": "^7.27.1", "@babel/preset-typescript": "^7.27.1", - "@primer/react": "^38.0.0-rc.8", + "@primer/react": "^38.0.0-rc.9", "@rollup/plugin-babel": "^6.0.4", "@types/react": "18.3.11", "@types/react-dom": "18.3.1", + "@types/styled-components": "^5.1.26", "@vitejs/plugin-react": "^4.3.3", "babel-plugin-styled-components": "2.1.4", "publint": "^0.3.12", @@ -26914,7 +26925,7 @@ "typescript": "^5.9.2" }, "peerDependencies": { - "@primer/react": "38.0.0-rc.8", + "@primer/react": "38.0.0-rc.9", "@types/react": "18.x || 19.x", "@types/react-dom": "18.x || 19.x", "@types/react-is": "18.x || 19.x", diff --git a/packages/react/.storybook/preview.jsx b/packages/react/.storybook/preview.jsx index eb783c3ce50..890987353b8 100644 --- a/packages/react/.storybook/preview.jsx +++ b/packages/react/.storybook/preview.jsx @@ -1,6 +1,6 @@ -import {PrimerBreakpoints} from '../src/utils/layout' import React, {useEffect} from 'react' -import {ThemeProvider, BaseStyles} from '../src' +import {ThemeProvider} from '../src/ThemeProvider' +import BaseStyles from '../src/BaseStyles' import {FeatureFlags} from '../src/FeatureFlags' import {DefaultFeatureFlags} from '../src/FeatureFlags/DefaultFeatureFlags' import {clsx} from 'clsx' @@ -9,6 +9,17 @@ import './storybook.css' import './primitives-v8.css' import {Profiler} from 'react' +// TODO: Update the hard-coded values when the primitives are ready +const breakpoints = ['544px', '768px', '1012px', '1280px'] +export const PrimerBreakpoints = { + xsmall: {width: '320px'}, + small: {width: breakpoints[0]}, + medium: {width: breakpoints[1]}, + large: {width: breakpoints[2]}, + xlarge: {width: breakpoints[3]}, + xxlarge: {width: '1400px'}, +} + let storybookViewports = {} Object.entries(PrimerBreakpoints).forEach(([viewport, value]) => { const {width} = value diff --git a/packages/react/@types/@styled-system/index.d.ts b/packages/react/@types/@styled-system/index.d.ts deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/packages/react/@types/@styled-system/prop-types/index.d.ts b/packages/react/@types/@styled-system/prop-types/index.d.ts deleted file mode 100644 index 26780a7cfb2..00000000000 --- a/packages/react/@types/@styled-system/prop-types/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -declare module '@styled-system/prop-types' diff --git a/packages/react/@types/@styled-system/props/index.d.ts b/packages/react/@types/@styled-system/props/index.d.ts deleted file mode 100644 index d1bbf5dad03..00000000000 --- a/packages/react/@types/@styled-system/props/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -declare module '@styled-system/props' diff --git a/packages/react/babel.config.cjs b/packages/react/babel.config.cjs index 28c28d6ea1c..90e32bd8d7f 100644 --- a/packages/react/babel.config.cjs +++ b/packages/react/babel.config.cjs @@ -16,7 +16,6 @@ const sharedPlugins = [ 'macros', 'dev-expression', 'add-react-displayname', - 'babel-plugin-styled-components', '@babel/plugin-proposal-nullish-coalescing-operator', '@babel/plugin-proposal-optional-chaining', ] diff --git a/packages/react/package.json b/packages/react/package.json index e77a17bebe3..380f0ade5b7 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -79,12 +79,6 @@ "@primer/live-region-element": "^0.7.1", "@primer/octicons-react": "^19.13.0", "@primer/primitives": "10.x || 11.x", - "@styled-system/css": "^5.1.5", - "@styled-system/props": "^5.1.5", - "@styled-system/theme-get": "^5.1.2", - "@types/styled-system": "^5.1.23", - "@types/styled-system__css": "^5.0.16", - "@types/styled-system__theme-get": "^5.0.1", "clsx": "^2.1.1", "color2k": "^2.0.3", "deepmerge": "^4.3.1", @@ -94,8 +88,7 @@ "lodash.isempty": "^4.4.0", "lodash.isobject": "^3.0.2", "react-compiler-runtime": "^19.1.0-rc.2", - "react-intersection-observer": "^9.16.0", - "styled-system": "^5.1.5" + "react-intersection-observer": "^9.16.0" }, "devDependencies": { "@actions/core": "1.11.1", @@ -137,7 +130,6 @@ "@types/react-dom": "18.3.1", "@types/react-is": "18.3.1", "@types/react-test-renderer": "18.3.1", - "@types/styled-components": "^5.1.26", "@vitejs/plugin-react": "^4.3.3", "afterframe": "^1.0.2", "ajv": "8.16.0", @@ -148,7 +140,6 @@ "babel-plugin-macros": "3.1.0", "babel-plugin-open-source": "1.3.4", "babel-plugin-react-compiler": "^19.1.0-rc.3", - "babel-plugin-styled-components": "2.1.4", "babel-plugin-transform-replace-expressions": "0.2.0", "babel-polyfill": "6.26.0", "chalk": "^5.4.1", @@ -183,7 +174,6 @@ "rollup-plugin-postcss": "4.0.2", "rollup-plugin-visualizer": "6.0.3", "storybook": "^9.1.10", - "styled-components": "5.3.11", "terser": "5.36.0", "ts-toolbelt": "9.6.0", "tsx": "4.20.3", @@ -199,11 +189,9 @@ "@types/react": "18.x || 19.x", "@types/react-dom": "18.x || 19.x", "@types/react-is": "18.x || 19.x", - "@types/styled-components": "^5.1.11", "react": "18.x || 19.x", "react-dom": "18.x || 19.x", - "react-is": "18.x || 19.x", - "styled-components": "5.x" + "react-is": "18.x || 19.x" }, "peerDependenciesMeta": { "@types/react": { @@ -214,9 +202,6 @@ }, "@types/react-is": { "optional": true - }, - "@types/styled-components": { - "optional": true } } } diff --git a/packages/react/src/ActionList/Group.test.tsx b/packages/react/src/ActionList/Group.test.tsx index 7bbb8d41a0f..83ae6ab53d0 100644 --- a/packages/react/src/ActionList/Group.test.tsx +++ b/packages/react/src/ActionList/Group.test.tsx @@ -1,7 +1,8 @@ import {describe, it, expect, vi} from 'vitest' import {render as HTMLRender} from '@testing-library/react' +import BaseStyles from '../BaseStyles' import {ActionList} from '.' -import {BaseStyles, ActionMenu} from '..' +import {ActionMenu} from '..' describe('ActionList.Group', () => { it('should throw an error when ActionList.GroupHeading has an `as` prop when it is used within ActionMenu context', async () => { diff --git a/packages/react/src/ActionList/Heading.test.tsx b/packages/react/src/ActionList/Heading.test.tsx index 3f3764432aa..0318c0e7bba 100644 --- a/packages/react/src/ActionList/Heading.test.tsx +++ b/packages/react/src/ActionList/Heading.test.tsx @@ -1,7 +1,8 @@ import {describe, it, expect, vi} from 'vitest' import {render as HTMLRender} from '@testing-library/react' +import BaseStyles from '../BaseStyles' import {ActionList} from '.' -import {BaseStyles, ActionMenu} from '..' +import {ActionMenu} from '..' describe('ActionList.Heading', () => { it('should render the ActionList.Heading component as a heading with the given heading level', async () => { diff --git a/packages/react/src/ActionMenu/ActionMenu.test.tsx b/packages/react/src/ActionMenu/ActionMenu.test.tsx index 9b25545f718..1fbd953005a 100644 --- a/packages/react/src/ActionMenu/ActionMenu.test.tsx +++ b/packages/react/src/ActionMenu/ActionMenu.test.tsx @@ -2,7 +2,8 @@ import {describe, expect, it, vi} from 'vitest' import {render as HTMLRender, waitFor, act, within} from '@testing-library/react' import userEvent from '@testing-library/user-event' import type React from 'react' -import {ActionMenu, ActionList, BaseStyles, Button, IconButton} from '..' +import BaseStyles from '../BaseStyles' +import {ActionMenu, ActionList, Button, IconButton} from '..' import Tooltip from '../Tooltip' import {Tooltip as TooltipV2} from '../TooltipV2/Tooltip' import {SingleSelect} from '../ActionMenu/ActionMenu.features.stories' diff --git a/packages/react/src/AnchoredOverlay/__snapshots__/AnchoredOverlay.test.tsx.snap b/packages/react/src/AnchoredOverlay/__snapshots__/AnchoredOverlay.test.tsx.snap index 9fe367c36f6..7442de16784 100644 --- a/packages/react/src/AnchoredOverlay/__snapshots__/AnchoredOverlay.test.tsx.snap +++ b/packages/react/src/AnchoredOverlay/__snapshots__/AnchoredOverlay.test.tsx.snap @@ -4,7 +4,6 @@ exports[`AnchoredOverlay > should render consistently when open 1`] = `