Skip to content

Commit dcf693f

Browse files
committed
Revert "Merge branch 'main' of github.com:primer/react into api/actionlist-trailing-visual"
This reverts commit ddb6a6f, reversing changes made to 1f18ad6.
1 parent 5d2fbec commit dcf693f

19 files changed

+28
-62
lines changed

.changeset/violet-cougars-yawn.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"@primer/components": major
3+
---
4+
5+
Remove deprecated color variables by upgrading to @primer/primitives [v5](https://github.com/primer/primitives/pull/251)
6+
7+
**Note:** Install [`eslint-plugin-primer-react`](https://primer.style/react/linting) to ensure that you're not using any deprecated or removed color variables.

.github/workflows/check_for_changeset.yml

Lines changed: 0 additions & 25 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,5 @@
11
# @primer/components
22

3-
## 31.0.0
4-
5-
### Major Changes
6-
7-
- [#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)
8-
9-
**Note:** Install [`eslint-plugin-primer-react`](https://primer.style/react/linting) to ensure that you're not using any deprecated or removed color variables.
10-
11-
### Patch Changes
12-
13-
- [#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
14-
153
## 30.3.0
164

175
### Minor Changes

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@primer/components",
3-
"version": "31.0.0",
3+
"version": "30.3.0",
44
"description": "Primer react components",
55
"main": "lib/index.js",
66
"module": "lib-esm/index.js",

src/ActionList/Item.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,9 @@ export interface ItemProps extends SxProp {
153153
const getItemVariant = (variant = 'default', disabled?: boolean) => {
154154
if (disabled) {
155155
return {
156-
color: get('colors.primer.fg.disabled'),
157-
iconColor: get('colors.primer.fg.disabled'),
158-
annotationColor: get('colors.primer.fg.disabled'),
156+
color: get('colors.fg.muted'),
157+
iconColor: get('colors.fg.muted'),
158+
annotationColor: get('colors.fg.muted'),
159159
hoverCursor: 'default'
160160
}
161161
}

src/Button/Button.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const Button = styled(ButtonBase)<ButtonBaseProps & ButtonSystemProps & SxProp>`
2727
}
2828
2929
&:disabled {
30-
color: ${get('colors.primer.fg.disabled')};
30+
color: ${get('colors.fg.muted')};
3131
background-color: ${get('colors.btn.bg')};
3232
border-color: ${get('colors.btn.border')};
3333
}

src/Button/ButtonTableList.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const ButtonTableList = styled.summary<StyledButtonTableListProps>`
3333
&:disabled {
3434
&,
3535
&:hover {
36-
color: ${get('colors.primer.fg.disabled')};
36+
color: rgba(${get('colors.fg.muted')}, 0.5);
3737
cursor: default;
3838
}
3939
}

src/Pagination/Pagination.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ const Page = styled.a`
5555
5656
&[aria-disabled],
5757
&[aria-disabled]:hover {
58-
color: ${get('colors.primer.fg.disabled')}; // check
58+
color: ${get('colors.fg.muted')}; // check
5959
cursor: default;
6060
border-color: transparent;
6161
}

src/_TextInputWrapper.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ const TextInputWrapper = styled.span<StyledWrapperProps>`
7979
${props =>
8080
props.disabled &&
8181
css`
82-
color: ${get('colors.primer.fg.disabled')};
82+
color: ${get('colors.fg.muted')};
8383
background-color: ${get('colors.input.disabledBg')};
8484
border-color: ${get('colors.border.default')};
8585
`}

src/__tests__/Pagination/__snapshots__/Pagination.test.tsx.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ exports[`Pagination renders consistently 1`] = `
6161
6262
.c2[aria-disabled],
6363
.c2[aria-disabled]:hover {
64-
color: #8c959f;
64+
color: #57606a;
6565
cursor: default;
6666
border-color: transparent;
6767
}

src/__tests__/__snapshots__/ActionMenu.test.tsx.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ exports[`ActionMenu renders consistently 1`] = `
6262
}
6363
6464
.c0:disabled {
65-
color: #8c959f;
65+
color: #57606a;
6666
background-color: #f6f8fa;
6767
border-color: rgba(27,31,36,0.15);
6868
}

src/__tests__/__snapshots__/AnchoredOverlay.test.tsx.snap

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ exports[`AnchoredOverlay renders consistently 1`] = `
6868
}
6969
7070
.c1:disabled {
71-
color: #8c959f;
71+
color: #57606a;
7272
background-color: #f6f8fa;
7373
border-color: rgba(27,31,36,0.15);
7474
}
@@ -163,7 +163,7 @@ Object {
163163
}
164164
165165
.c1:disabled {
166-
color: #8c959f;
166+
color: #57606a;
167167
background-color: #f6f8fa;
168168
border-color: rgba(27,31,36,0.15);
169169
}
@@ -243,7 +243,7 @@ Object {
243243
<button
244244
aria-haspopup="true"
245245
aria-labelledby="react-aria-1"
246-
class="ButtonBase-sc-181ps9o-0 Button-xjtz72-0 iRqJHc"
246+
class="ButtonBase-sc-181ps9o-0 Button-xjtz72-0 jPURef"
247247
id="react-aria-1"
248248
tabindex="0"
249249
>

src/__tests__/__snapshots__/Button.test.tsx.snap

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ exports[`Button renders consistently 1`] = `
6262
}
6363
6464
.c0:disabled {
65-
color: #8c959f;
65+
color: #57606a;
6666
background-color: #f6f8fa;
6767
border-color: rgba(27,31,36,0.15);
6868
}
@@ -134,7 +134,7 @@ exports[`Button respects the "disabled" prop 1`] = `
134134
}
135135
136136
.c0:disabled {
137-
color: #8c959f;
137+
color: #57606a;
138138
background-color: #f6f8fa;
139139
border-color: rgba(27,31,36,0.15);
140140
}
@@ -819,7 +819,7 @@ exports[`ButtonTableList renders consistently 1`] = `
819819
820820
.c0:disabled,
821821
.c0:disabled:hover {
822-
color: #8c959f;
822+
color: rgba(#57606a,0.5);
823823
cursor: default;
824824
}
825825

src/__tests__/__snapshots__/ConfirmationDialog.test.tsx.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ exports[`ConfirmationDialog renders consistently 1`] = `
6868
}
6969
7070
.c1:disabled {
71-
color: #8c959f;
71+
color: #57606a;
7272
background-color: #f6f8fa;
7373
border-color: rgba(27,31,36,0.15);
7474
}

src/__tests__/__snapshots__/Dropdown.test.tsx.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ exports[`Dropdown.Button renders consistently 1`] = `
8484
}
8585
8686
.c0:disabled {
87-
color: #8c959f;
87+
color: #57606a;
8888
background-color: #f6f8fa;
8989
border-color: rgba(27,31,36,0.15);
9090
}

src/__tests__/__snapshots__/DropdownMenu.test.tsx.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ exports[`DropdownMenu renders consistently 1`] = `
6262
}
6363
6464
.c0:disabled {
65-
color: #8c959f;
65+
color: #57606a;
6666
background-color: #f6f8fa;
6767
border-color: rgba(27,31,36,0.15);
6868
}

src/__tests__/__snapshots__/SelectMenu.test.tsx.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ exports[`SelectMenu right-aligned modal has right: 0px 1`] = `
6262
}
6363
6464
.c1:disabled {
65-
color: #8c959f;
65+
color: #57606a;
6666
background-color: #f6f8fa;
6767
border-color: rgba(27,31,36,0.15);
6868
}

src/__tests__/__snapshots__/SelectPanel.test.tsx.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ exports[`SelectPanel renders consistently 1`] = `
6868
}
6969
7070
.c1:disabled {
71-
color: #8c959f;
71+
color: #57606a;
7272
background-color: #f6f8fa;
7373
border-color: rgba(27,31,36,0.15);
7474
}

src/stories/Button.stories.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,6 @@ export const buttonGroup = (args: StrictButtonStyleProps) => (
7777
export const buttonTableList = (args: ButtonStyleProps) => (
7878
<ButtonTableList {...args}>Button Table List</ButtonTableList>
7979
)
80-
export const disabledButton = (args: ButtonStyleProps) => {
81-
const props = {disabled: true, ...args}
82-
return <Button {...props}>Disabled</Button>
83-
}
8480

8581
defaultButton.args = {variant: 'medium'}
8682
dangerButton.args = {variant: 'medium'}

0 commit comments

Comments
 (0)