Skip to content

Commit

Permalink
Merge branch 'main' into fix-textinput-types
Browse files Browse the repository at this point in the history
  • Loading branch information
colebemis committed Mar 15, 2022
2 parents f0c2590 + d62ee0d commit 2678bbc
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 20 deletions.
5 changes: 0 additions & 5 deletions .changeset/bright-flowers-itch.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/funny-ears-add.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/old-schools-happen.md

This file was deleted.

13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# @primer/components

## 35.0.1

### Patch Changes

- [#1958](https://github.com/primer/react/pull/1958) [`be8f9014`](https://github.com/primer/react/commit/be8f9014cb532d122665c83a94035b0de8e0d300) Thanks [@siddharthkp](https://github.com/siddharthkp)! - ActionList: Add focus styles for Windows high contrast mode
ActionList: Fix incorrect role for ActionList.Group outside ActionMenu

* [#1949](https://github.com/primer/react/pull/1949) [`e430bd8b`](https://github.com/primer/react/commit/e430bd8b635d8cb25e73e4301a0fedc6c60a1e3a) Thanks [@colebemis](https://github.com/colebemis)! - `FormControl` now accepts a `ref` prop

- [#1960](https://github.com/primer/react/pull/1960) [`26c7784d`](https://github.com/primer/react/commit/26c7784d24a2c3d1e0b33457c42ac804ac1dcd64) Thanks [@colebemis](https://github.com/colebemis)! - Checkbox: `value` prop is now optional

* [#1935](https://github.com/primer/react/pull/1935) [`40c93d8b`](https://github.com/primer/react/commit/40c93d8bad64e3e5c906f0140978b8991d15be92) Thanks [@pksjce](https://github.com/pksjce)! - Add monospace prop to textinput

## 35.0.0

### Major Changes
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@primer/react",
"version": "35.0.0",
"version": "35.0.1",
"description": "An implementation of GitHub's Primer Design System using React",
"main": "lib/index.js",
"module": "lib-esm/index.js",
Expand Down
2 changes: 1 addition & 1 deletion src/ActionList/Group.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export const Group: React.FC<ActionListGroupProps> = ({
return (
<Box
as="li"
role="none"
role={listRole ? 'none' : undefined}
sx={{
'&:not(:first-child)': {marginTop: 2},
listStyle: 'none', // hide the ::marker inserted by browser's stylesheet
Expand Down
8 changes: 8 additions & 0 deletions src/ActionList/Item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,14 @@ export const Item = React.forwardRef<HTMLLIElement, ActionListItemProps>(
}
},

'@media (forced-colors: active)': {
':focus': {
// we set color to be transparent and let the high contrast rules
// decide what color with contrast should that be corrected to
outline: 'solid 1px transparent !important'
}
},

/** Divider styles */
'[data-component="ActionList.Item--DividerContainer"]': {
position: 'relative'
Expand Down
13 changes: 10 additions & 3 deletions src/stories/ActionList/examples.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
XIcon
} from '@primer/octicons-react'

import {ThemeProvider} from '../..'
import {Heading, ThemeProvider} from '../..'
import {ActionList} from '../../ActionList'
import BaseStyles from '../../BaseStyles'
import Avatar from '../../Avatar'
Expand Down Expand Up @@ -49,9 +49,16 @@ export function WithLinks(): JSX.Element {
<>
<h1>With Links</h1>

<p>This pattern can be seen in the repository sidebar, containing a list of links</p>
<p>This pattern can be seen in the repository sidebar, containing a list of links. </p>
<p>
The heading &quot;Details&quot; is outside the ActionList and needs to have an <code>id</code> which is passed
to ActionList with <code>aria-labelledby</code>.
</p>

<ActionList>
<Heading as="h1" id="list-heading" sx={{fontSize: 1}}>
Details
</Heading>
<ActionList aria-labelledby="list-heading">
<ActionList.LinkItem href="https://github.com/primer/react#readme">
<ActionList.LeadingVisual>
<BookIcon />
Expand Down

0 comments on commit 2678bbc

Please sign in to comment.