From cc4a4eacb1f55d9eb018df4377c7dca7255b5c25 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 4 Nov 2024 03:10:20 +0000 Subject: [PATCH 1/2] Version Packages --- .changeset/blue-eggs-suffer.md | 5 - .changeset/chilly-phones-explode.md | 5 - .changeset/clean-mails-accept.md | 5 - .changeset/few-zebras-drive.md | 8 - .changeset/fifty-suns-smoke.md | 5 - .changeset/forty-olives-lay.md | 5 - .changeset/four-schools-grin.md | 5 - .changeset/gentle-doors-sell.md | 5 - .changeset/gold-items-shave.md | 5 - .changeset/grumpy-lamps-behave.md | 5 - .changeset/hungry-avocados-remember.md | 5 - .changeset/itchy-paws-bake.md | 5 - .changeset/loud-spoons-explode.md | 5 - .changeset/lucky-horses-kiss.md | 5 - .changeset/modern-icons-clean.md | 5 - .changeset/nice-shoes-fail.md | 5 - .changeset/odd-frogs-listen.md | 5 - .changeset/old-boxes-clap.md | 5 - .changeset/old-plums-explode.md | 5 - .changeset/quiet-seahorses-yawn.md | 5 - .changeset/shy-seahorses-mix.md | 5 - .changeset/six-colts-admire.md | 5 - .changeset/slow-snails-swim.md | 5 - .changeset/sour-flies-camp.md | 5 - .changeset/twelve-kings-confess.md | 5 - .changeset/wild-maps-grow.md | 5 - .changeset/wise-llamas-exist.md | 5 - examples/app-router/package.json | 2 +- examples/codesandbox/package.json | 2 +- examples/consumer-test/package.json | 2 +- examples/theming/package.json | 2 +- packages/react/CHANGELOG.md | 332 +++++++++++++++++-------- packages/react/package.json | 2 +- 33 files changed, 231 insertions(+), 249 deletions(-) delete mode 100644 .changeset/blue-eggs-suffer.md delete mode 100644 .changeset/chilly-phones-explode.md delete mode 100644 .changeset/clean-mails-accept.md delete mode 100644 .changeset/few-zebras-drive.md delete mode 100644 .changeset/fifty-suns-smoke.md delete mode 100644 .changeset/forty-olives-lay.md delete mode 100644 .changeset/four-schools-grin.md delete mode 100644 .changeset/gentle-doors-sell.md delete mode 100644 .changeset/gold-items-shave.md delete mode 100644 .changeset/grumpy-lamps-behave.md delete mode 100644 .changeset/hungry-avocados-remember.md delete mode 100644 .changeset/itchy-paws-bake.md delete mode 100644 .changeset/loud-spoons-explode.md delete mode 100644 .changeset/lucky-horses-kiss.md delete mode 100644 .changeset/modern-icons-clean.md delete mode 100644 .changeset/nice-shoes-fail.md delete mode 100644 .changeset/odd-frogs-listen.md delete mode 100644 .changeset/old-boxes-clap.md delete mode 100644 .changeset/old-plums-explode.md delete mode 100644 .changeset/quiet-seahorses-yawn.md delete mode 100644 .changeset/shy-seahorses-mix.md delete mode 100644 .changeset/six-colts-admire.md delete mode 100644 .changeset/slow-snails-swim.md delete mode 100644 .changeset/sour-flies-camp.md delete mode 100644 .changeset/twelve-kings-confess.md delete mode 100644 .changeset/wild-maps-grow.md delete mode 100644 .changeset/wise-llamas-exist.md diff --git a/.changeset/blue-eggs-suffer.md b/.changeset/blue-eggs-suffer.md deleted file mode 100644 index 7f2aba3a444..00000000000 --- a/.changeset/blue-eggs-suffer.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@primer/react": minor ---- - -feat(LabelGroup): render as list by default diff --git a/.changeset/chilly-phones-explode.md b/.changeset/chilly-phones-explode.md deleted file mode 100644 index 1733d38765a..00000000000 --- a/.changeset/chilly-phones-explode.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@primer/react": patch ---- - -Bug fix: `ButtonBase` sx base styles leaking into CSS modules feat flag diff --git a/.changeset/clean-mails-accept.md b/.changeset/clean-mails-accept.md deleted file mode 100644 index 00d788b60fc..00000000000 --- a/.changeset/clean-mails-accept.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@primer/react": minor ---- - -Convert Details to css module behind feature flag diff --git a/.changeset/few-zebras-drive.md b/.changeset/few-zebras-drive.md deleted file mode 100644 index d283c99f98b..00000000000 --- a/.changeset/few-zebras-drive.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -"@primer/react": minor ---- - -* Convert SkeletonAvatar to CSS modules behind the feature flag -* Convert SkeletonBox to CSS modules behind the feature flag -* Convert SkeletonText to CSS modules behind the feature flag - diff --git a/.changeset/fifty-suns-smoke.md b/.changeset/fifty-suns-smoke.md deleted file mode 100644 index 749aa264863..00000000000 --- a/.changeset/fifty-suns-smoke.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@primer/react": minor ---- - -Convert Radio to css modules behind feature flag diff --git a/.changeset/forty-olives-lay.md b/.changeset/forty-olives-lay.md deleted file mode 100644 index d3e44460ed5..00000000000 --- a/.changeset/forty-olives-lay.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@primer/react': minor ---- - -Overlay: Adds `min-width` to container to improve responsiveness diff --git a/.changeset/four-schools-grin.md b/.changeset/four-schools-grin.md deleted file mode 100644 index 72c447d1a85..00000000000 --- a/.changeset/four-schools-grin.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@primer/react': minor ---- - -Update BranchName to use CSS Modules behind feature flag diff --git a/.changeset/gentle-doors-sell.md b/.changeset/gentle-doors-sell.md deleted file mode 100644 index 795c99d1078..00000000000 --- a/.changeset/gentle-doors-sell.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@primer/react": patch ---- - -Convert Stack to CSS modules behind feature flag diff --git a/.changeset/gold-items-shave.md b/.changeset/gold-items-shave.md deleted file mode 100644 index 3d45affb5f7..00000000000 --- a/.changeset/gold-items-shave.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@primer/react": patch ---- - -Move Checkbox css module feature flag to staff diff --git a/.changeset/grumpy-lamps-behave.md b/.changeset/grumpy-lamps-behave.md deleted file mode 100644 index 9ee089cb00e..00000000000 --- a/.changeset/grumpy-lamps-behave.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@primer/react': patch ---- - -catch TooltipV2 errors in old browsers as a temp fix for unnecessary Sentry reports diff --git a/.changeset/hungry-avocados-remember.md b/.changeset/hungry-avocados-remember.md deleted file mode 100644 index ffe0993061d..00000000000 --- a/.changeset/hungry-avocados-remember.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@primer/react': minor ---- - -Migrated `Spinner` component to use support CSS modules diff --git a/.changeset/itchy-paws-bake.md b/.changeset/itchy-paws-bake.md deleted file mode 100644 index 532507c7a46..00000000000 --- a/.changeset/itchy-paws-bake.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@primer/react": patch ---- - -fix(SegmentedControl): set global focus styles diff --git a/.changeset/loud-spoons-explode.md b/.changeset/loud-spoons-explode.md deleted file mode 100644 index a34200c9342..00000000000 --- a/.changeset/loud-spoons-explode.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@primer/react': minor ---- - -Migrated `VisuallyHidden` to CSS Modules diff --git a/.changeset/lucky-horses-kiss.md b/.changeset/lucky-horses-kiss.md deleted file mode 100644 index 5233032f1e3..00000000000 --- a/.changeset/lucky-horses-kiss.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@primer/react': minor ---- - -Move `aria-*` attributes to `ProgressBar.Item` and marks `ProgressBar.Item` as `role="progressbar". diff --git a/.changeset/modern-icons-clean.md b/.changeset/modern-icons-clean.md deleted file mode 100644 index ac697326b5e..00000000000 --- a/.changeset/modern-icons-clean.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@primer/react': minor ---- - -Migrate `Select` component to css modules diff --git a/.changeset/nice-shoes-fail.md b/.changeset/nice-shoes-fail.md deleted file mode 100644 index be9aa60e94a..00000000000 --- a/.changeset/nice-shoes-fail.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@primer/react": patch ---- - -Update the foreground color for FormControl.Caption to use the control tokens when disabled diff --git a/.changeset/odd-frogs-listen.md b/.changeset/odd-frogs-listen.md deleted file mode 100644 index 9e89ad0a991..00000000000 --- a/.changeset/odd-frogs-listen.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@primer/react': minor ---- - -Update `Header` component to use CSS modules behind the feature flag primer_react_css_modules_team diff --git a/.changeset/old-boxes-clap.md b/.changeset/old-boxes-clap.md deleted file mode 100644 index 27abb9698ec..00000000000 --- a/.changeset/old-boxes-clap.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@primer/react": minor ---- - -feat(Details): Add summary subcomponent diff --git a/.changeset/old-plums-explode.md b/.changeset/old-plums-explode.md deleted file mode 100644 index 494da343cbb..00000000000 --- a/.changeset/old-plums-explode.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@primer/react": patch ---- - -fix(DataTable): export datatable utility types diff --git a/.changeset/quiet-seahorses-yawn.md b/.changeset/quiet-seahorses-yawn.md deleted file mode 100644 index 58b0af858f1..00000000000 --- a/.changeset/quiet-seahorses-yawn.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@primer/react": minor ---- - -Convert `Pagehead` to CSS Modules diff --git a/.changeset/shy-seahorses-mix.md b/.changeset/shy-seahorses-mix.md deleted file mode 100644 index 1819269fecf..00000000000 --- a/.changeset/shy-seahorses-mix.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@primer/react': minor ---- - -AvatarStack: Adds keyboard support to `AvatarStack` diff --git a/.changeset/six-colts-admire.md b/.changeset/six-colts-admire.md deleted file mode 100644 index 91cdb94123e..00000000000 --- a/.changeset/six-colts-admire.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@primer/react": minor ---- - -Remove CSS modules feature flag from Label component diff --git a/.changeset/slow-snails-swim.md b/.changeset/slow-snails-swim.md deleted file mode 100644 index 0e366fd6e38..00000000000 --- a/.changeset/slow-snails-swim.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@primer/react": minor ---- - -SelectPanel: Allow using SelectPanel in FormControl diff --git a/.changeset/sour-flies-camp.md b/.changeset/sour-flies-camp.md deleted file mode 100644 index 11c1801e7a0..00000000000 --- a/.changeset/sour-flies-camp.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@primer/react": minor ---- - -Remove the CSS modules feature flag from the Link component diff --git a/.changeset/twelve-kings-confess.md b/.changeset/twelve-kings-confess.md deleted file mode 100644 index 7d55fca5497..00000000000 --- a/.changeset/twelve-kings-confess.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@primer/react': minor ---- - -Adds NavList.GroupHeading component that can be used instead of the ActionList.Group 'title' prop if you need to render something besides a string diff --git a/.changeset/wild-maps-grow.md b/.changeset/wild-maps-grow.md deleted file mode 100644 index e3b514572c5..00000000000 --- a/.changeset/wild-maps-grow.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@primer/react": patch ---- - -fix(FormControl): allow required check boxes in CheckboxGroup diff --git a/.changeset/wise-llamas-exist.md b/.changeset/wise-llamas-exist.md deleted file mode 100644 index dbd3aeb645d..00000000000 --- a/.changeset/wise-llamas-exist.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@primer/react": patch ---- - -Move CounterLabel css modules feature flag to staff diff --git a/examples/app-router/package.json b/examples/app-router/package.json index 485665f95d0..25fe7dcc5c8 100644 --- a/examples/app-router/package.json +++ b/examples/app-router/package.json @@ -10,7 +10,7 @@ "type-check": "tsc --noEmit" }, "dependencies": { - "@primer/react": "37.0.1", + "@primer/react": "37.1.0", "next": "^14.2.10", "react": "^18.3.1", "react-dom": "^18.3.1", diff --git a/examples/codesandbox/package.json b/examples/codesandbox/package.json index f483b600c7c..95f9c60febd 100644 --- a/examples/codesandbox/package.json +++ b/examples/codesandbox/package.json @@ -20,7 +20,7 @@ "@typescript-eslint/eslint-plugin": "^7.11.0", "@typescript-eslint/parser": "^7.3.1", "@vitejs/plugin-react": "^4.2.1", - "@primer/react": "37.0.1", + "@primer/react": "37.1.0", "eslint": "^8.56.0", "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-refresh": "^0.4.7", diff --git a/examples/consumer-test/package.json b/examples/consumer-test/package.json index ac945c97926..848d2f117ff 100644 --- a/examples/consumer-test/package.json +++ b/examples/consumer-test/package.json @@ -9,7 +9,7 @@ "@types/react": "^18.3.11", "@types/react-dom": "^18.2.19", "@types/styled-components": "^5.1.11", - "@primer/react": "37.0.1", + "@primer/react": "37.1.0", "react": "^18.0.0", "react-dom": "^18.0.0", "styled-components": "^5.3.11", diff --git a/examples/theming/package.json b/examples/theming/package.json index 461b31ea605..1a08ef0eb92 100644 --- a/examples/theming/package.json +++ b/examples/theming/package.json @@ -11,7 +11,7 @@ }, "dependencies": { "@primer/octicons-react": "^19.9.0", - "@primer/react": "37.0.1", + "@primer/react": "37.1.0", "clsx": "^1.2.1", "next": "^14.2.10", "react": "^18.3.1", diff --git a/packages/react/CHANGELOG.md b/packages/react/CHANGELOG.md index fba871e038d..a33d177a7c2 100644 --- a/packages/react/CHANGELOG.md +++ b/packages/react/CHANGELOG.md @@ -1,5 +1,68 @@ # @primer/react +## 37.1.0 + +### Minor Changes + +- [#5156](https://github.com/primer/react/pull/5156) [`8e58e4d`](https://github.com/primer/react/commit/8e58e4d1fc8a6ec9e9329b152f3d43d15d6dd5d5) Thanks [@francinelucca](https://github.com/francinelucca)! - feat(LabelGroup): render as list by default + +- [#5167](https://github.com/primer/react/pull/5167) [`07b75e7`](https://github.com/primer/react/commit/07b75e78f6842713fff12dad1e7a0502596e30bf) Thanks [@jonrohan](https://github.com/jonrohan)! - Convert Details to css module behind feature flag + +- [#5195](https://github.com/primer/react/pull/5195) [`d349cfc`](https://github.com/primer/react/commit/d349cfcb3fca9982040a1389c0fabcaafca5b85e) Thanks [@jonrohan](https://github.com/jonrohan)! - \* Convert SkeletonAvatar to CSS modules behind the feature flag + + - Convert SkeletonBox to CSS modules behind the feature flag + - Convert SkeletonText to CSS modules behind the feature flag + +- [#5187](https://github.com/primer/react/pull/5187) [`2ab7b9e`](https://github.com/primer/react/commit/2ab7b9e649cc2f6a1c290bdbfcf48d3e635d998f) Thanks [@jonrohan](https://github.com/jonrohan)! - Convert Radio to css modules behind feature flag + +- [#5129](https://github.com/primer/react/pull/5129) [`e27decd`](https://github.com/primer/react/commit/e27decdae5fcff3b25c9c58194709abbf4de85f8) Thanks [@TylerJDev](https://github.com/TylerJDev)! - Overlay: Adds `min-width` to container to improve responsiveness + +- [#5040](https://github.com/primer/react/pull/5040) [`8d9a357`](https://github.com/primer/react/commit/8d9a357db49dbf1f00e19c7aa489bd963a0d3dd5) Thanks [@joshblack](https://github.com/joshblack)! - Update BranchName to use CSS Modules behind feature flag + +- [#5188](https://github.com/primer/react/pull/5188) [`573ae51`](https://github.com/primer/react/commit/573ae5168879998946ba1aa3e21af8ddf54351af) Thanks [@randall-krauskopf](https://github.com/randall-krauskopf)! - Migrated `Spinner` component to use support CSS modules + +- [#5193](https://github.com/primer/react/pull/5193) [`ed3d8c1`](https://github.com/primer/react/commit/ed3d8c1d0825502293b7a772a26e2e3865c9c162) Thanks [@randall-krauskopf](https://github.com/randall-krauskopf)! - Migrated `VisuallyHidden` to CSS Modules + +- [#4878](https://github.com/primer/react/pull/4878) [`73312d8`](https://github.com/primer/react/commit/73312d8ceb98ae84c0291f05b0b30f7f06975d3c) Thanks [@TylerJDev](https://github.com/TylerJDev)! - Move `aria-*` attributes to `ProgressBar.Item` and marks `ProgressBar.Item` as `role="progressbar". + +- [#5194](https://github.com/primer/react/pull/5194) [`719def7`](https://github.com/primer/react/commit/719def7ea83f5212dc6ba888fe22d29b6620ce37) Thanks [@randall-krauskopf](https://github.com/randall-krauskopf)! - Migrate `Select` component to css modules + +- [#5192](https://github.com/primer/react/pull/5192) [`cbeed21`](https://github.com/primer/react/commit/cbeed2111c02c6e4457228acdb7d83f11e866197) Thanks [@hussam-i-am](https://github.com/hussam-i-am)! - Update `Header` component to use CSS modules behind the feature flag primer_react_css_modules_team + +- [#5015](https://github.com/primer/react/pull/5015) [`1473c26`](https://github.com/primer/react/commit/1473c26abb37b2de2af5f4ff848107971ee557c7) Thanks [@francinelucca](https://github.com/francinelucca)! - feat(Details): Add summary subcomponent + +- [#5197](https://github.com/primer/react/pull/5197) [`ad84d4f`](https://github.com/primer/react/commit/ad84d4f494cb424b307ed3fa7eb77aec21c2ad40) Thanks [@randall-krauskopf](https://github.com/randall-krauskopf)! - Convert `Pagehead` to CSS Modules + +- [#5134](https://github.com/primer/react/pull/5134) [`6713e72`](https://github.com/primer/react/commit/6713e72124f4b9e594b31d5abc7dda258940c9cc) Thanks [@TylerJDev](https://github.com/TylerJDev)! - AvatarStack: Adds keyboard support to `AvatarStack` + +- [#5060](https://github.com/primer/react/pull/5060) [`33396ea`](https://github.com/primer/react/commit/33396ead24bb25dc042004cd82bbdbe235403c61) Thanks [@jonrohan](https://github.com/jonrohan)! - Remove CSS modules feature flag from Label component + +- [#5185](https://github.com/primer/react/pull/5185) [`461ae57`](https://github.com/primer/react/commit/461ae57b4efd1053449643fe4dbd8c18ff86ddd0) Thanks [@broccolinisoup](https://github.com/broccolinisoup)! - SelectPanel: Allow using SelectPanel in FormControl + +- [#5148](https://github.com/primer/react/pull/5148) [`002be35`](https://github.com/primer/react/commit/002be358676c2a882893dfbe518e1eafbd38db55) Thanks [@jonrohan](https://github.com/jonrohan)! - Remove the CSS modules feature flag from the Link component + +- [#5106](https://github.com/primer/react/pull/5106) [`851c857`](https://github.com/primer/react/commit/851c857f1a69541b6b8b77dac714f2de51419936) Thanks [@mperrotti](https://github.com/mperrotti)! - Adds NavList.GroupHeading component that can be used instead of the ActionList.Group 'title' prop if you need to render something besides a string + +### Patch Changes + +- [#5213](https://github.com/primer/react/pull/5213) [`a5d7fe3`](https://github.com/primer/react/commit/a5d7fe34a20c9eeffe879e10b4f0165b8f1a6da8) Thanks [@langermank](https://github.com/langermank)! - Bug fix: `ButtonBase` sx base styles leaking into CSS modules feat flag + +- [#5214](https://github.com/primer/react/pull/5214) [`916ed95`](https://github.com/primer/react/commit/916ed952d38502b72640dcb07dac69005cb176e3) Thanks [@jonrohan](https://github.com/jonrohan)! - Convert Stack to CSS modules behind feature flag + +- [#5146](https://github.com/primer/react/pull/5146) [`ad554da`](https://github.com/primer/react/commit/ad554da1ed3907e5764f68190c0a3dd1cf7529b7) Thanks [@jonrohan](https://github.com/jonrohan)! - Move Checkbox css module feature flag to staff + +- [#5171](https://github.com/primer/react/pull/5171) [`8138dee`](https://github.com/primer/react/commit/8138dee8d8235475ec8135591c52abf3df90d50b) Thanks [@alondahari](https://github.com/alondahari)! - catch TooltipV2 errors in old browsers as a temp fix for unnecessary Sentry reports + +- [#5140](https://github.com/primer/react/pull/5140) [`73796d3`](https://github.com/primer/react/commit/73796d3b249ade8b69adb5aa720432d77a433103) Thanks [@francinelucca](https://github.com/francinelucca)! - fix(SegmentedControl): set global focus styles + +- [#5201](https://github.com/primer/react/pull/5201) [`29a9770`](https://github.com/primer/react/commit/29a9770ead42b01026e8277f6c30d18d2ccaaf84) Thanks [@joshblack](https://github.com/joshblack)! - Update the foreground color for FormControl.Caption to use the control tokens when disabled + +- [#5182](https://github.com/primer/react/pull/5182) [`31d9a05`](https://github.com/primer/react/commit/31d9a0587eb76f8d786404881b1727213c55fdbc) Thanks [@francinelucca](https://github.com/francinelucca)! - fix(DataTable): export datatable utility types + +- [#5027](https://github.com/primer/react/pull/5027) [`9a30c63`](https://github.com/primer/react/commit/9a30c63dc8e0c2923952f7ffea831446d0ed6122) Thanks [@francinelucca](https://github.com/francinelucca)! - fix(FormControl): allow required check boxes in CheckboxGroup + +- [#5147](https://github.com/primer/react/pull/5147) [`e421f32`](https://github.com/primer/react/commit/e421f32002ad07582d0221862f7afb6e8afbbc51) Thanks [@jonrohan](https://github.com/jonrohan)! - Move CounterLabel css modules feature flag to staff + ## 37.0.1 ### Patch Changes @@ -2368,7 +2431,7 @@ ```jsx // Hide pane on narrow viewports - + ``` - [#2199](https://github.com/primer/react/pull/2199) [`fb385b63`](https://github.com/primer/react/commit/fb385b63f22c1eb76193e42e92ea2a056e61fdbb) Thanks [@colebemis](https://github.com/colebemis)! - \* Updated the `position` prop in `PageLayout.Pane` to use the new responsive prop API introduced in https://github.com/primer/react/pull/2174. @@ -2529,7 +2592,7 @@ - [#2112](https://github.com/primer/react/pull/2112) [`74e1d138`](https://github.com/primer/react/commit/74e1d1386bc6bb6326c3c2b64b5e31146f9cc56b) Thanks [@colebemis](https://github.com/colebemis)! - [NavList](https://primer.style/NavList) is ready to use. You can now import it from the main bundle: ```js - import {NavList} from '@primer/react' + import { NavList } from "@primer/react"; ``` ### Patch Changes @@ -2670,11 +2733,11 @@ ```jsx ``` @@ -2702,21 +2765,21 @@ showItemDividers items={[ { - key: '0', + key: "0", leadingVisual: LinkIcon, - text: 'github/primer', + text: "github/primer", }, { - key: '1', + key: "1", leadingVisual: () => , - text: 'mona', - description: 'Monalisa Octocat', - descriptionVariant: 'block', + text: "mona", + description: "Monalisa Octocat", + descriptionVariant: "block", }, { - key: '2', + key: "2", leadingVisual: GearIcon, - text: 'View Settings', + text: "View Settings", trailingVisual: ArrowRightIcon, }, ]} @@ -2739,7 +2802,9 @@ mona - Monalisa Octocat + + Monalisa Octocat + @@ -2761,14 +2826,14 @@ ```jsx ``` @@ -2800,7 +2865,7 @@ To continue to use the deprecated API for now, change the import path to `@primer/react/deprecated`: ```js - import {ActionList} from '@primer/react/deprecated' + import { ActionList } from "@primer/react/deprecated"; ``` You can use the [one-time codemod](https://github.com/primer/react-migrate#readme) to change your import statements automatically. @@ -2851,13 +2916,13 @@ anchorContent="Menu" onAction={fn} items={[ - {text: 'New file'}, - {text: 'Copy link'}, - {text: 'Edit file'}, + { text: "New file" }, + { text: "Copy link" }, + { text: "Edit file" }, ActionMenu.Divider, - {text: 'Delete file', variant: 'danger'}, + { text: "Delete file", variant: "danger" }, ]} - overlayProps={{width: 'small'}} + overlayProps={{ width: "small" }} /> ``` @@ -2886,7 +2951,7 @@ To continue to use the deprecated API for now, change the import path to `@primer/react/deprecated`: ```js - import {ActionMenu} from '@primer/react/deprecated' + import { ActionMenu } from "@primer/react/deprecated"; ``` You can use the [one-time codemod](https://github.com/primer/react-migrate#readme) to change your import statements automatically. @@ -2918,19 +2983,19 @@ ```js const fieldTypes = [ - {key: 0, text: 'Text'}, - {key: 1, text: 'Number'}, - {key: 3, text: 'Date'}, - {key: 4, text: 'Single select'}, - {key: 5, text: 'Iteration'}, - ] + { key: 0, text: "Text" }, + { key: 1, text: "Number" }, + { key: 3, text: "Date" }, + { key: 4, text: "Single select" }, + { key: 5, text: "Iteration" }, + ]; const Example = () => { - const [selectedType, setSelectedType] = React.useState() + const [selectedType, setSelectedType] = React.useState(); return ( ( + renderAnchor={({ children, ...anchorProps }) => ( {children} @@ -2939,10 +3004,10 @@ items={fieldTypes} selectedItem={selectedType} onChange={setSelectedType} - overlayProps={{width: 'medium'}} + overlayProps={{ width: "medium" }} /> - ) - } + ); + }; ``` @@ -2950,22 +3015,24 @@ ```jsx const fieldTypes = [ - {id: 0, text: 'Text'}, - {id: 1, text: 'Number'}, - {id: 3, text: 'Date'}, - {id: 4, text: 'Single select'}, - {id: 5, text: 'Iteration'}, - ] + { id: 0, text: "Text" }, + { id: 1, text: "Number" }, + { id: 3, text: "Date" }, + { id: 4, text: "Single select" }, + { id: 5, text: "Iteration" }, + ]; const Example = () => { - const [selectedType, setSelectedType] = React.useState() + const [selectedType, setSelectedType] = React.useState(); render( - {selectedType.name || 'Field type'} + + {selectedType.name || "Field type"} + - {fieldTypes.map(type => ( + {fieldTypes.map((type) => ( , - ) - } + ); + }; ``` @@ -2988,7 +3055,7 @@ To continue to use the deprecated API for now, change the import path to `@primer/react/deprecated`: ```js - import {DropdownMenu} from '@primer/react/deprecated' + import { DropdownMenu } from "@primer/react/deprecated"; ``` You can use the [one-time codemod](https://github.com/primer/react-migrate#readme) to change your import statements automatically. @@ -3019,17 +3086,21 @@ ```jsx - import {Label} from '@primer/react' + import { Label } from "@primer/react"; function Example() { return ( <> - - ) + ); } ``` @@ -3058,7 +3129,7 @@ To continue to use the deprecated API for now, change the import path to `@primer/react/deprecated`: ```js - import {Label} from '@primer/react/deprecated' + import { Label } from "@primer/react/deprecated"; ``` You can use the [one-time codemod](https://github.com/primer/react-migrate#readme) to change your import statements automatically. @@ -3081,7 +3152,12 @@ ```jsx - import {ButtonPrimary, ButtonInvisible, ButtonOutline, ButtonDanger} from '@primer/react' + import { + ButtonPrimary, + ButtonInvisible, + ButtonOutline, + ButtonDanger, + } from "@primer/react"; function Example() { return ( @@ -3091,7 +3167,7 @@ Outline Button Danger Button - ) + ); } ``` @@ -3099,7 +3175,7 @@ ```jsx - import {Button} from '@primer/react' + import { Button } from "@primer/react"; function Example() { return ( @@ -3109,7 +3185,7 @@ - ) + ); } ``` @@ -3216,34 +3292,50 @@ ```jsx - import {ChoiceFieldset} from '@primer/react' + import { ChoiceFieldset } from "@primer/react"; function Example() { return ( <> {/* Multi-select */} - Preferred Primer component interface + + Preferred Primer component interface + - Figma library + + Figma library + Primer CSS - Primer React components - Primer ViewComponents + + Primer React components + + + Primer ViewComponents + {/* Single select */} - Preferred Primer component interface + + Preferred Primer component interface + - Figma library + + Figma library + Primer CSS - Primer React components - Primer ViewComponents + + Primer React components + + + Primer ViewComponents + - ) + ); } ``` @@ -3251,14 +3343,22 @@ ```jsx - import {CheckboxGroup, RadioGroup, FormControl, Checkbox, Radio} from '@primer/react' + import { + CheckboxGroup, + RadioGroup, + FormControl, + Checkbox, + Radio, + } from "@primer/react"; function Example() { return ( <> {/* Multi-select */} - Preferred Primer component interface + + Preferred Primer component interface + Figma @@ -3279,7 +3379,9 @@ {/* Single select */} - Preferred Primer component interface + + Preferred Primer component interface + Figma @@ -3298,7 +3400,7 @@ - ) + ); } ``` @@ -3309,7 +3411,7 @@ To continue to use the deprecated API for now, change the import path to `@primer/react/deprecated`: ```js - import {ChoiceFieldset} from '@primer/react/deprecated' + import { ChoiceFieldset } from "@primer/react/deprecated"; ``` You can use the [one-time codemod](https://github.com/primer/react-migrate#readme) to change your import statements automatically. @@ -3341,7 +3443,7 @@ ```jsx - import {FormControl, Checkbox, TextInput} from '@primer/react' + import { FormControl, Checkbox, TextInput } from "@primer/react"; function Example() { return ( @@ -3361,7 +3463,7 @@ - ) + ); } ``` @@ -3369,7 +3471,7 @@ ```jsx - import {FormGroup, TextInput} from '@primer/react' + import { FormGroup, TextInput } from "@primer/react"; function Example() { return ( @@ -3384,7 +3486,7 @@ - ) + ); } ``` @@ -3394,7 +3496,7 @@ ```jsx - import {InputField, TextInput} from '@primer/react' + import { InputField, TextInput } from "@primer/react"; function Example() { return ( @@ -3402,7 +3504,7 @@ Example text - ) + ); } ``` @@ -3410,7 +3512,7 @@ ```jsx - import {FormControl, TextInput} from '@primer/react' + import { FormControl, TextInput } from "@primer/react"; function Example() { return ( @@ -3418,7 +3520,7 @@ Example text - ) + ); } ``` @@ -3429,7 +3531,11 @@ To continue to use the deprecated API for now, change the import path to `@primer/react/deprecated`: ```js - import {FormGroup, ChoiceInputField, InputField} from '@primer/react/deprecated' + import { + FormGroup, + ChoiceInputField, + InputField, + } from "@primer/react/deprecated"; ``` You can use the [one-time codemod](https://github.com/primer/react-migrate#readme) to change your import statements automatically. @@ -3500,23 +3606,25 @@ ```jsx const fieldTypes = [ - {leadingVisual: TypographyIcon, text: 'Text'}, - {leadingVisual: NumberIcon, text: 'Number'}, - ] + { leadingVisual: TypographyIcon, text: "Text" }, + { leadingVisual: NumberIcon, text: "Number" }, + ]; const Example = () => { - const [selectedItem, setSelectedItem] = React.useState() + const [selectedItem, setSelectedItem] = React.useState(); return ( {children}} + renderAnchor={({ children, ...anchorProps }) => ( + {children} + )} placeholder="Select a field type" items={fieldTypes} selectedItem={selectedItem} onChange={() => setSelectedIndex(index)} /> - ) - } + ); + }; ``` @@ -3524,29 +3632,36 @@ ```jsx const fieldTypes = [ - {icon: , name: 'Text'}, - {icon: , name: 'Number'}, - ] + { icon: , name: "Text" }, + { icon: , name: "Number" }, + ]; const Example = () => { - const [selectedItem, setSelectedItem] = React.useState() + const [selectedItem, setSelectedItem] = React.useState(); return ( - {selectedItem ? selectedItem.name : 'Select a field type'} + + {selectedItem ? selectedItem.name : "Select a field type"} + - {fieldTypes.map(field => ( - setSelectedItem(field)} key={field.name}> - {field.icon} + {fieldTypes.map((field) => ( + setSelectedItem(field)} + key={field.name} + > + + {field.icon} + {field.name} ))} - ) - } + ); + }; ``` @@ -3648,7 +3763,12 @@ ```jsx - + Item 1 ``` @@ -4692,8 +4812,8 @@ * [`beef075e`](https://github.com/primer/react/commit/beef075e0274396b77887adf0b912583fe564b3f) [#1094](https://github.com/primer/react/pull/1094) Thanks [@colebemis](https://github.com/colebemis)! - Components no longer have a default `theme` prop. To ensure components still render correctly, you'll need pass the Primer theme to a [styled-components](https://styled-components.com/) `` at the root of your application: ```jsx - import {ThemeProvider} from 'styled-components' - import {theme} from '@primer/react' + import { ThemeProvider } from "styled-components"; + import { theme } from "@primer/react"; function App(props) { return ( @@ -4702,7 +4822,7 @@
your app here
- ) + ); } ``` diff --git a/packages/react/package.json b/packages/react/package.json index 81165d3d9c0..856e1fa609f 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,6 +1,6 @@ { "name": "@primer/react", - "version": "37.0.1", + "version": "37.1.0", "description": "An implementation of GitHub's Primer Design System using React", "main": "lib/index.js", "module": "lib-esm/index.js", From 1f7628fd4bee2facdd005a3070fbcd0e1c58b91d Mon Sep 17 00:00:00 2001 From: Siddharth Kshetrapal Date: Mon, 4 Nov 2024 14:25:07 +0100 Subject: [PATCH 2/2] undo formatting changes for CHANGELOG.md --- packages/react/CHANGELOG.md | 269 ++++++++++++++---------------------- 1 file changed, 106 insertions(+), 163 deletions(-) diff --git a/packages/react/CHANGELOG.md b/packages/react/CHANGELOG.md index a33d177a7c2..9766e813765 100644 --- a/packages/react/CHANGELOG.md +++ b/packages/react/CHANGELOG.md @@ -2431,7 +2431,7 @@ ```jsx // Hide pane on narrow viewports - + ``` - [#2199](https://github.com/primer/react/pull/2199) [`fb385b63`](https://github.com/primer/react/commit/fb385b63f22c1eb76193e42e92ea2a056e61fdbb) Thanks [@colebemis](https://github.com/colebemis)! - \* Updated the `position` prop in `PageLayout.Pane` to use the new responsive prop API introduced in https://github.com/primer/react/pull/2174. @@ -2592,7 +2592,7 @@ - [#2112](https://github.com/primer/react/pull/2112) [`74e1d138`](https://github.com/primer/react/commit/74e1d1386bc6bb6326c3c2b64b5e31146f9cc56b) Thanks [@colebemis](https://github.com/colebemis)! - [NavList](https://primer.style/NavList) is ready to use. You can now import it from the main bundle: ```js - import { NavList } from "@primer/react"; + import {NavList} from '@primer/react' ``` ### Patch Changes @@ -2733,11 +2733,11 @@ ```jsx ``` @@ -2765,21 +2765,21 @@ showItemDividers items={[ { - key: "0", + key: '0', leadingVisual: LinkIcon, - text: "github/primer", + text: 'github/primer', }, { - key: "1", + key: '1', leadingVisual: () => , - text: "mona", - description: "Monalisa Octocat", - descriptionVariant: "block", + text: 'mona', + description: 'Monalisa Octocat', + descriptionVariant: 'block', }, { - key: "2", + key: '2', leadingVisual: GearIcon, - text: "View Settings", + text: 'View Settings', trailingVisual: ArrowRightIcon, }, ]} @@ -2802,9 +2802,7 @@
mona - - Monalisa Octocat - + Monalisa Octocat
@@ -2826,14 +2824,14 @@ ```jsx ``` @@ -2865,7 +2863,7 @@ To continue to use the deprecated API for now, change the import path to `@primer/react/deprecated`: ```js - import { ActionList } from "@primer/react/deprecated"; + import {ActionList} from '@primer/react/deprecated' ``` You can use the [one-time codemod](https://github.com/primer/react-migrate#readme) to change your import statements automatically. @@ -2916,13 +2914,13 @@ anchorContent="Menu" onAction={fn} items={[ - { text: "New file" }, - { text: "Copy link" }, - { text: "Edit file" }, + {text: 'New file'}, + {text: 'Copy link'}, + {text: 'Edit file'}, ActionMenu.Divider, - { text: "Delete file", variant: "danger" }, + {text: 'Delete file', variant: 'danger'}, ]} - overlayProps={{ width: "small" }} + overlayProps={{width: 'small'}} /> ``` @@ -2951,7 +2949,7 @@ To continue to use the deprecated API for now, change the import path to `@primer/react/deprecated`: ```js - import { ActionMenu } from "@primer/react/deprecated"; + import {ActionMenu} from '@primer/react/deprecated' ``` You can use the [one-time codemod](https://github.com/primer/react-migrate#readme) to change your import statements automatically. @@ -2983,19 +2981,19 @@ ```js const fieldTypes = [ - { key: 0, text: "Text" }, - { key: 1, text: "Number" }, - { key: 3, text: "Date" }, - { key: 4, text: "Single select" }, - { key: 5, text: "Iteration" }, - ]; + {key: 0, text: 'Text'}, + {key: 1, text: 'Number'}, + {key: 3, text: 'Date'}, + {key: 4, text: 'Single select'}, + {key: 5, text: 'Iteration'}, + ] const Example = () => { - const [selectedType, setSelectedType] = React.useState(); + const [selectedType, setSelectedType] = React.useState() return ( ( + renderAnchor={({children, ...anchorProps}) => ( {children} @@ -3004,10 +3002,10 @@ items={fieldTypes} selectedItem={selectedType} onChange={setSelectedType} - overlayProps={{ width: "medium" }} + overlayProps={{width: 'medium'}} /> - ); - }; + ) + } ``` @@ -3015,24 +3013,22 @@ ```jsx const fieldTypes = [ - { id: 0, text: "Text" }, - { id: 1, text: "Number" }, - { id: 3, text: "Date" }, - { id: 4, text: "Single select" }, - { id: 5, text: "Iteration" }, - ]; + {id: 0, text: 'Text'}, + {id: 1, text: 'Number'}, + {id: 3, text: 'Date'}, + {id: 4, text: 'Single select'}, + {id: 5, text: 'Iteration'}, + ] const Example = () => { - const [selectedType, setSelectedType] = React.useState(); + const [selectedType, setSelectedType] = React.useState() render( - - {selectedType.name || "Field type"} - + {selectedType.name || 'Field type'} - {fieldTypes.map((type) => ( + {fieldTypes.map(type => ( , - ); - }; + ) + } ``` @@ -3055,7 +3051,7 @@ To continue to use the deprecated API for now, change the import path to `@primer/react/deprecated`: ```js - import { DropdownMenu } from "@primer/react/deprecated"; + import {DropdownMenu} from '@primer/react/deprecated' ``` You can use the [one-time codemod](https://github.com/primer/react-migrate#readme) to change your import statements automatically. @@ -3086,21 +3082,17 @@ ```jsx - import { Label } from "@primer/react"; + import {Label} from '@primer/react' function Example() { return ( <> - - ); + ) } ``` @@ -3129,7 +3121,7 @@ To continue to use the deprecated API for now, change the import path to `@primer/react/deprecated`: ```js - import { Label } from "@primer/react/deprecated"; + import {Label} from '@primer/react/deprecated' ``` You can use the [one-time codemod](https://github.com/primer/react-migrate#readme) to change your import statements automatically. @@ -3152,12 +3144,7 @@ ```jsx - import { - ButtonPrimary, - ButtonInvisible, - ButtonOutline, - ButtonDanger, - } from "@primer/react"; + import {ButtonPrimary, ButtonInvisible, ButtonOutline, ButtonDanger} from '@primer/react' function Example() { return ( @@ -3167,7 +3154,7 @@ Outline Button Danger Button - ); + ) } ``` @@ -3175,7 +3162,7 @@ ```jsx - import { Button } from "@primer/react"; + import {Button} from '@primer/react' function Example() { return ( @@ -3185,7 +3172,7 @@ - ); + ) } ``` @@ -3292,50 +3279,34 @@ ```jsx - import { ChoiceFieldset } from "@primer/react"; + import {ChoiceFieldset} from '@primer/react' function Example() { return ( <> {/* Multi-select */} - - Preferred Primer component interface - + Preferred Primer component interface - - Figma library - + Figma library Primer CSS - - Primer React components - - - Primer ViewComponents - + Primer React components + Primer ViewComponents {/* Single select */} - - Preferred Primer component interface - + Preferred Primer component interface - - Figma library - + Figma library Primer CSS - - Primer React components - - - Primer ViewComponents - + Primer React components + Primer ViewComponents - ); + ) } ``` @@ -3343,22 +3314,14 @@ ```jsx - import { - CheckboxGroup, - RadioGroup, - FormControl, - Checkbox, - Radio, - } from "@primer/react"; + import {CheckboxGroup, RadioGroup, FormControl, Checkbox, Radio} from '@primer/react' function Example() { return ( <> {/* Multi-select */} - - Preferred Primer component interface - + Preferred Primer component interface Figma @@ -3379,9 +3342,7 @@ {/* Single select */} - - Preferred Primer component interface - + Preferred Primer component interface Figma @@ -3400,7 +3361,7 @@ - ); + ) } ``` @@ -3411,7 +3372,7 @@ To continue to use the deprecated API for now, change the import path to `@primer/react/deprecated`: ```js - import { ChoiceFieldset } from "@primer/react/deprecated"; + import {ChoiceFieldset} from '@primer/react/deprecated' ``` You can use the [one-time codemod](https://github.com/primer/react-migrate#readme) to change your import statements automatically. @@ -3443,7 +3404,7 @@ ```jsx - import { FormControl, Checkbox, TextInput } from "@primer/react"; + import {FormControl, Checkbox, TextInput} from '@primer/react' function Example() { return ( @@ -3463,7 +3424,7 @@ - ); + ) } ``` @@ -3471,7 +3432,7 @@ ```jsx - import { FormGroup, TextInput } from "@primer/react"; + import {FormGroup, TextInput} from '@primer/react' function Example() { return ( @@ -3486,7 +3447,7 @@ - ); + ) } ``` @@ -3496,7 +3457,7 @@ ```jsx - import { InputField, TextInput } from "@primer/react"; + import {InputField, TextInput} from '@primer/react' function Example() { return ( @@ -3504,7 +3465,7 @@ Example text - ); + ) } ``` @@ -3512,7 +3473,7 @@ ```jsx - import { FormControl, TextInput } from "@primer/react"; + import {FormControl, TextInput} from '@primer/react' function Example() { return ( @@ -3520,7 +3481,7 @@ Example text - ); + ) } ``` @@ -3531,11 +3492,7 @@ To continue to use the deprecated API for now, change the import path to `@primer/react/deprecated`: ```js - import { - FormGroup, - ChoiceInputField, - InputField, - } from "@primer/react/deprecated"; + import {FormGroup, ChoiceInputField, InputField} from '@primer/react/deprecated' ``` You can use the [one-time codemod](https://github.com/primer/react-migrate#readme) to change your import statements automatically. @@ -3606,25 +3563,23 @@ ```jsx const fieldTypes = [ - { leadingVisual: TypographyIcon, text: "Text" }, - { leadingVisual: NumberIcon, text: "Number" }, - ]; + {leadingVisual: TypographyIcon, text: 'Text'}, + {leadingVisual: NumberIcon, text: 'Number'}, + ] const Example = () => { - const [selectedItem, setSelectedItem] = React.useState(); + const [selectedItem, setSelectedItem] = React.useState() return ( ( - {children} - )} + renderAnchor={({children, ...anchorProps}) => {children}} placeholder="Select a field type" items={fieldTypes} selectedItem={selectedItem} onChange={() => setSelectedIndex(index)} /> - ); - }; + ) + } ``` @@ -3632,36 +3587,29 @@ ```jsx const fieldTypes = [ - { icon: , name: "Text" }, - { icon: , name: "Number" }, - ]; + {icon: , name: 'Text'}, + {icon: , name: 'Number'}, + ] const Example = () => { - const [selectedItem, setSelectedItem] = React.useState(); + const [selectedItem, setSelectedItem] = React.useState() return ( - - {selectedItem ? selectedItem.name : "Select a field type"} - + {selectedItem ? selectedItem.name : 'Select a field type'} - {fieldTypes.map((field) => ( - setSelectedItem(field)} - key={field.name} - > - - {field.icon} - + {fieldTypes.map(field => ( + setSelectedItem(field)} key={field.name}> + {field.icon} {field.name} ))} - ); - }; + ) + } ``` @@ -3763,12 +3711,7 @@ ```jsx - + Item 1 ``` @@ -4812,8 +4755,8 @@ * [`beef075e`](https://github.com/primer/react/commit/beef075e0274396b77887adf0b912583fe564b3f) [#1094](https://github.com/primer/react/pull/1094) Thanks [@colebemis](https://github.com/colebemis)! - Components no longer have a default `theme` prop. To ensure components still render correctly, you'll need pass the Primer theme to a [styled-components](https://styled-components.com/) `` at the root of your application: ```jsx - import { ThemeProvider } from "styled-components"; - import { theme } from "@primer/react"; + import {ThemeProvider} from 'styled-components' + import {theme} from '@primer/react' function App(props) { return ( @@ -4822,7 +4765,7 @@
your app here
- ); + ) } ```