diff --git a/.changeset/violet-cougars-yawn.md b/.changeset/violet-cougars-yawn.md new file mode 100644 index 00000000000..3cc01e6e8d0 --- /dev/null +++ b/.changeset/violet-cougars-yawn.md @@ -0,0 +1,7 @@ +--- +"@primer/components": major +--- + +Remove deprecated color variables by upgrading to @primer/primitives [v5](https://github.com/primer/primitives/pull/251) + +**Note:** Install [`eslint-plugin-primer-react`](https://primer.style/react/linting) to ensure that you're not using any deprecated or removed color variables. diff --git a/.github/workflows/check_for_changeset.yml b/.github/workflows/check_for_changeset.yml deleted file mode 100644 index 49c165145e5..00000000000 --- a/.github/workflows/check_for_changeset.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: Check for changeset - -on: - pull_request: - types: - # On by default if you specify no types. - - "opened" - - "reopened" - - "synchronize" - # For `skip-label` only. - - "labeled" - - "unlabeled" - -jobs: - check-for-changeset: - name: Check for changeset - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: "Check for changeset" - uses: brettcannon/check-for-changed-files@v1 - with: - file-pattern: ".changeset/*.md" - skip-label: "skip changeset" - failure-message: "No changeset found. If these changes should not result in a new version, apply the ${skip-label} label to this pull request. If these changes should result in a version bump, please add a changeset https://git.io/J6QvQ" diff --git a/CHANGELOG.md b/CHANGELOG.md index aa0c9269de8..10ddaeaf334 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,17 +1,5 @@ # @primer/components -## 31.0.0 - -### Major Changes - -- [#1514](https://github.com/primer/react/pull/1514) [`dc789025`](https://github.com/primer/react/commit/dc789025d4976e2f0863e1f377c4a834aab88e3a) Thanks [@colebemis](https://github.com/colebemis)! - Remove deprecated color variables by upgrading to @primer/primitives [v5](https://github.com/primer/primitives/pull/251) - - **Note:** Install [`eslint-plugin-primer-react`](https://primer.style/react/linting) to ensure that you're not using any deprecated or removed color variables. - -### Patch Changes - -- [#1512](https://github.com/primer/react/pull/1512) [`1e5ac406`](https://github.com/primer/react/commit/1e5ac406f8558a20248157a9bfe13ee4709890c8) Thanks [@pksjce](https://github.com/pksjce)! - Change disabled color from muted to custom primer disabled color - ## 30.3.0 ### Minor Changes diff --git a/package.json b/package.json index 2b7127e96ef..378a1f6ded4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@primer/components", - "version": "31.0.0", + "version": "30.3.0", "description": "Primer react components", "main": "lib/index.js", "module": "lib-esm/index.js", diff --git a/src/ActionList/Item.tsx b/src/ActionList/Item.tsx index 706eff9f405..3920f0ff8ec 100644 --- a/src/ActionList/Item.tsx +++ b/src/ActionList/Item.tsx @@ -153,9 +153,9 @@ export interface ItemProps extends SxProp { const getItemVariant = (variant = 'default', disabled?: boolean) => { if (disabled) { return { - color: get('colors.primer.fg.disabled'), - iconColor: get('colors.primer.fg.disabled'), - annotationColor: get('colors.primer.fg.disabled'), + color: get('colors.fg.muted'), + iconColor: get('colors.fg.muted'), + annotationColor: get('colors.fg.muted'), hoverCursor: 'default' } } diff --git a/src/Button/Button.tsx b/src/Button/Button.tsx index 5ae1fb1a1e6..7080b93204b 100644 --- a/src/Button/Button.tsx +++ b/src/Button/Button.tsx @@ -27,7 +27,7 @@ const Button = styled(ButtonBase)` } &:disabled { - color: ${get('colors.primer.fg.disabled')}; + color: ${get('colors.fg.muted')}; background-color: ${get('colors.btn.bg')}; border-color: ${get('colors.btn.border')}; } diff --git a/src/Button/ButtonTableList.tsx b/src/Button/ButtonTableList.tsx index 49b9549e031..6e0db6112de 100644 --- a/src/Button/ButtonTableList.tsx +++ b/src/Button/ButtonTableList.tsx @@ -33,7 +33,7 @@ const ButtonTableList = styled.summary` &:disabled { &, &:hover { - color: ${get('colors.primer.fg.disabled')}; + color: rgba(${get('colors.fg.muted')}, 0.5); cursor: default; } } diff --git a/src/Pagination/Pagination.tsx b/src/Pagination/Pagination.tsx index 196b314daae..dda8ad9d98b 100644 --- a/src/Pagination/Pagination.tsx +++ b/src/Pagination/Pagination.tsx @@ -55,7 +55,7 @@ const Page = styled.a` &[aria-disabled], &[aria-disabled]:hover { - color: ${get('colors.primer.fg.disabled')}; // check + color: ${get('colors.fg.muted')}; // check cursor: default; border-color: transparent; } diff --git a/src/_TextInputWrapper.tsx b/src/_TextInputWrapper.tsx index 8173529b7c1..531d891412c 100644 --- a/src/_TextInputWrapper.tsx +++ b/src/_TextInputWrapper.tsx @@ -79,7 +79,7 @@ const TextInputWrapper = styled.span` ${props => props.disabled && css` - color: ${get('colors.primer.fg.disabled')}; + color: ${get('colors.fg.muted')}; background-color: ${get('colors.input.disabledBg')}; border-color: ${get('colors.border.default')}; `} diff --git a/src/__tests__/Pagination/__snapshots__/Pagination.test.tsx.snap b/src/__tests__/Pagination/__snapshots__/Pagination.test.tsx.snap index f0f13c18b48..5f6f42ce4d7 100644 --- a/src/__tests__/Pagination/__snapshots__/Pagination.test.tsx.snap +++ b/src/__tests__/Pagination/__snapshots__/Pagination.test.tsx.snap @@ -61,7 +61,7 @@ exports[`Pagination renders consistently 1`] = ` .c2[aria-disabled], .c2[aria-disabled]:hover { - color: #8c959f; + color: #57606a; cursor: default; border-color: transparent; } diff --git a/src/__tests__/__snapshots__/ActionMenu.test.tsx.snap b/src/__tests__/__snapshots__/ActionMenu.test.tsx.snap index 3fe19e10617..3dc709c2345 100644 --- a/src/__tests__/__snapshots__/ActionMenu.test.tsx.snap +++ b/src/__tests__/__snapshots__/ActionMenu.test.tsx.snap @@ -62,7 +62,7 @@ exports[`ActionMenu renders consistently 1`] = ` } .c0:disabled { - color: #8c959f; + color: #57606a; background-color: #f6f8fa; border-color: rgba(27,31,36,0.15); } diff --git a/src/__tests__/__snapshots__/AnchoredOverlay.test.tsx.snap b/src/__tests__/__snapshots__/AnchoredOverlay.test.tsx.snap index 285f69f5b8b..85ff1f9b4cb 100644 --- a/src/__tests__/__snapshots__/AnchoredOverlay.test.tsx.snap +++ b/src/__tests__/__snapshots__/AnchoredOverlay.test.tsx.snap @@ -68,7 +68,7 @@ exports[`AnchoredOverlay renders consistently 1`] = ` } .c1:disabled { - color: #8c959f; + color: #57606a; background-color: #f6f8fa; border-color: rgba(27,31,36,0.15); } @@ -163,7 +163,7 @@ Object { } .c1:disabled { - color: #8c959f; + color: #57606a; background-color: #f6f8fa; border-color: rgba(27,31,36,0.15); } @@ -243,7 +243,7 @@ Object { -} defaultButton.args = {variant: 'medium'} dangerButton.args = {variant: 'medium'}