Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
60ffc7e
chore: remove styled-system and useTheme from BaseStyles (#7010)
francinelucca Oct 17, 2025
b708776
Remove exports for theming in primer/react + remove feature flag from…
siddharthkp Oct 17, 2025
e33c559
Merge branch 'main' of github.com:primer/react into bye-bye-styled-co…
francinelucca Oct 17, 2025
d87fa90
package-lock fix
francinelucca Oct 17, 2025
4179116
Re add theme exports to primer/react (#7036)
siddharthkp Oct 20, 2025
c5e7ce3
reset UnderLineNav snapshots
siddharthkp Oct 20, 2025
226d289
chore: move Box test to @primer/styled-react (#7037)
francinelucca Oct 20, 2025
352d905
Merge branch 'main' of github.com:primer/react into bye-bye-styled-co…
francinelucca Oct 20, 2025
b8a5e5b
test(vrt): update snapshots
siddharthkp Oct 20, 2025
18c44d3
Merge branch 'main' into bye-bye-styled-components
francinelucca Oct 20, 2025
fb3edfa
primer/react: Remove StyledComponentsThemeProvider from ThemeProvider…
siddharthkp Oct 20, 2025
e4cc36a
Chore: remove Box, sx from primer react (#7042)
francinelucca Oct 20, 2025
5654ec4
Remove styled-components from dependencies for primer/react (#7039)
siddharthkp Oct 20, 2025
d8d8e2c
Remove styled-system from dependencies for primer/react (#7043)
siddharthkp Oct 21, 2025
496e4cc
Merge branch 'main' of github.com:primer/react into bye-bye-styled-co…
francinelucca Oct 21, 2025
9157fc6
Revert "Remove styled-system from dependencies for primer/react" (#7051)
francinelucca Oct 22, 2025
ec3a960
Merge branch 'main' into bye-bye-styled-components
francinelucca Oct 22, 2025
54f3b8c
Chore: remove themeGet from primer react (#7055)
francinelucca Oct 22, 2025
b7a05bf
Chore: remove styled system types (#7057)
francinelucca Oct 23, 2025
f75b624
Cleanup: Replace theme usage with css variables or their hardcoded va…
siddharthkp Oct 23, 2025
1c267ff
Chore: remove styled system dependencies (#7058)
francinelucca Oct 23, 2025
90fe65a
Merge branch 'main' of github.com:primer/react into bye-bye-styled-co…
francinelucca Oct 24, 2025
8bcb3d5
npm i
francinelucca Oct 24, 2025
9fca134
fix @primer/styled-react versions
francinelucca Oct 24, 2025
75140dd
Merge branch 'main' into bye-bye-styled-components
francinelucca Oct 24, 2025
8b7dbd1
Update small-yaks-own.md
francinelucca Oct 27, 2025
94612f3
Remove feature flag for theming fallback
francinelucca Oct 27, 2025
fb90a6e
Merge branch 'main' into bye-bye-styled-components
primer[bot] Oct 27, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/lazy-games-own.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/react": major
---

Remove styled-components and styled-system from dependencies
5 changes: 5 additions & 0 deletions .changeset/small-yaks-own.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/react": major
---

chore: remove theme get from @primer/react
5 changes: 5 additions & 0 deletions .changeset/tame-insects-think.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/react": major
---

Remove styled-components from dependencies
5 changes: 5 additions & 0 deletions .changeset/tiny-parents-peel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/styled-react": major
---

Remove feature flag to fall back to theming from primer/react
5 changes: 5 additions & 0 deletions .changeset/yellow-pens-kiss.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/react": major
---

ThemeProvider: Remove styled-components ThemeProvider
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions examples/codesandbox/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion examples/codesandbox/src/main.tsx
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
1 change: 1 addition & 0 deletions examples/theming/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
@@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion examples/theming/src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -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 = {
Expand Down
67 changes: 39 additions & 28 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 13 additions & 2 deletions packages/react/.storybook/preview.jsx
Original file line number Diff line number Diff line change
@@ -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'
Expand All @@ -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
Expand Down
Empty file.

This file was deleted.

1 change: 0 additions & 1 deletion packages/react/@types/@styled-system/props/index.d.ts

This file was deleted.

1 change: 0 additions & 1 deletion packages/react/babel.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -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',
]
Expand Down
19 changes: 2 additions & 17 deletions packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down Expand Up @@ -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",
Expand All @@ -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",
Expand Down Expand Up @@ -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",
Expand All @@ -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": {
Expand All @@ -214,9 +202,6 @@
},
"@types/react-is": {
"optional": true
},
"@types/styled-components": {
"optional": true
}
}
}
Loading
Loading