diff --git a/.changeset/seven-hornets-jam.md b/.changeset/seven-hornets-jam.md
new file mode 100644
index 00000000000..2699e13c8dd
--- /dev/null
+++ b/.changeset/seven-hornets-jam.md
@@ -0,0 +1,5 @@
+---
+'@primer/react': minor
+---
+
+Adds button element selector to FilteredSearch button styles
diff --git a/docs/content/CheckboxGroup.mdx b/docs/content/CheckboxGroup.mdx
index a0eb1fcee03..a18bb96daaf 100644
--- a/docs/content/CheckboxGroup.mdx
+++ b/docs/content/CheckboxGroup.mdx
@@ -1,5 +1,6 @@
---
title: CheckboxGroup
+componentId: checkbox_group
description: Renders a set of checkboxes to let users make one or more selections from a short list of options
status: Alpha
source: https://github.com/primer/react/blob/main/src/CheckboxGroup/CheckboxGroup.tsx
diff --git a/docs/content/Dialog2.mdx b/docs/content/Dialog.mdx
similarity index 99%
rename from docs/content/Dialog2.mdx
rename to docs/content/Dialog.mdx
index f10a2788dd3..3a6ad2eee77 100644
--- a/docs/content/Dialog2.mdx
+++ b/docs/content/Dialog.mdx
@@ -1,5 +1,6 @@
---
-title: Dialog v2
+title: Dialog
+componentId: dialog
status: Alpha
---
@@ -53,7 +54,7 @@ By default, the Dialog component implements the design and interactions defined
<>
{isOpen && (
-
@@ -64,7 +65,7 @@ By default, the Dialog component implements the design and interactions defined
onClose={closeDialog}
>
Some content
-
+
)}
>
)
diff --git a/docs/content/FilteredSearch.md b/docs/content/FilteredSearch.md
index 77ba62fcae7..d94eef2bd86 100644
--- a/docs/content/FilteredSearch.md
+++ b/docs/content/FilteredSearch.md
@@ -12,14 +12,16 @@ The FilteredSearch component helps style a Dropdown and a TextInput side-by-side
```jsx live
-
- Filter
-
- Item 1
- Item 2
- Item 3
-
-
+
+ Filter
+
+
+ Item 1
+ Item 2
+ Item 3
+
+
+
```
diff --git a/docs/content/IconButton.mdx b/docs/content/IconButton.mdx
index 68409d6d40e..0edea279283 100644
--- a/docs/content/IconButton.mdx
+++ b/docs/content/IconButton.mdx
@@ -1,5 +1,6 @@
---
title: IconButton
+componentId: icon_button
status: Alpha
source: https://github.com/primer/react/tree/main/src/Button2
storybook: '/react/storybook?path=/story/composite-components-button2'
diff --git a/docs/content/LinkButton.mdx b/docs/content/LinkButton.mdx
deleted file mode 100644
index 4ba5ad8d208..00000000000
--- a/docs/content/LinkButton.mdx
+++ /dev/null
@@ -1,107 +0,0 @@
----
-title: LinkButton
-status: Alpha
-source: https://github.com/primer/react/tree/main/src/Button2
-storybook: '/react/storybook?path=/story/composite-components-button2'
-description: It is a combination of a button and link. Use this to make your link look like a button.
----
-
-## Usage
-
-### Installation
-
-```js
-import {LinkButton} from '@primer/react/drafts'
-```
-
-### Default
-
-The `LinkButton` can be considered an extension of `Button` component. It accepts all of the same props along with new link specific props like `to` and `href`.
-
-```jsx live drafts
-
- Link to Primer
-
-```
-
-### Other examples of using a LinkButton
-
-`LinkButton` also
-
-- supports the three different sizes. `small`, `medium`, `large`.
-- supports the different variants in [Button]('../Button2')
-- supports leadingIcon and trailingIcon
-
-```jsx live drafts
-
- Small link
-
- Large link
-
-
- Invisible link
-
-
- Danger link
-
-
- Link with arrow
-
-
-```
-
-## API reference
-
-Native `
)}
placeholderText="Filter Labels"
open={open}
diff --git a/docs/content/SubNav.md b/docs/content/SubNav.md
index 7fecd4f8454..701dc47e262 100644
--- a/docs/content/SubNav.md
+++ b/docs/content/SubNav.md
@@ -48,20 +48,22 @@ This ensures that the NavLink gets `activeClassName='selected'`
```jsx live
-
- Filter
-
-
- Item 1
-
-
- Item 2
-
-
- Item 3
-
-
-
+
+ Filter
+
+
+
+ Item 1
+
+
+ Item 2
+
+
+ Item 3
+
+
+
+
diff --git a/docs/content/deprecated/ActionList.mdx b/docs/content/deprecated/ActionList.mdx
index 1bcf8880fc0..c25de07a382 100644
--- a/docs/content/deprecated/ActionList.mdx
+++ b/docs/content/deprecated/ActionList.mdx
@@ -1,6 +1,5 @@
---
-componentId: action_list
-title: ActionList
+title: ActionList (legacy)
status: Deprecated
source: https://github.com/primer/react/tree/main/src/deprecated/ActionList
---
diff --git a/docs/content/deprecated/ActionMenu.mdx b/docs/content/deprecated/ActionMenu.mdx
index 0fa65bbc4b9..967d91761c6 100644
--- a/docs/content/deprecated/ActionMenu.mdx
+++ b/docs/content/deprecated/ActionMenu.mdx
@@ -1,6 +1,5 @@
---
-componentId: action_menu
-title: ActionMenu
+title: ActionMenu (legacy)
status: Deprecated
source: https://github.com/primer/react/tree/main/src/deprecated/ActionMenu.tsx
---
diff --git a/docs/content/deprecated/BorderBox.md b/docs/content/deprecated/BorderBox.md
index 2be97d6e22a..3a978b1c2e4 100644
--- a/docs/content/deprecated/BorderBox.md
+++ b/docs/content/deprecated/BorderBox.md
@@ -1,5 +1,4 @@
---
-componentId: border_box
title: BorderBox
status: Deprecated
---
diff --git a/docs/content/deprecated/Buttons.mdx b/docs/content/deprecated/Buttons.mdx
index c16aeb384b5..592d6cd58ed 100644
--- a/docs/content/deprecated/Buttons.mdx
+++ b/docs/content/deprecated/Buttons.mdx
@@ -1,6 +1,5 @@
---
-componentId: button
-title: Button
+title: Button (legacy)
status: deprecated
source: https://github.com/primer/react/blob/main/src/Button
storybook: '/react/storybook?path=/story/composite-components-button--default-button'
diff --git a/docs/content/deprecated/ChoiceInputField.mdx b/docs/content/deprecated/ChoiceInputField.mdx
index d4c9b640c31..7ad92201e56 100644
--- a/docs/content/deprecated/ChoiceInputField.mdx
+++ b/docs/content/deprecated/ChoiceInputField.mdx
@@ -1,5 +1,4 @@
---
-componentId: choiceInputField
title: ChoiceInputField
status: Deprecated
description: The ChoiceInputField component is used to render a labelled checkbox or radio inputs with optional hint text.
diff --git a/docs/content/deprecated/Dialog.md b/docs/content/deprecated/Dialog.md
index dcd79b30623..feabc4ac1f9 100644
--- a/docs/content/deprecated/Dialog.md
+++ b/docs/content/deprecated/Dialog.md
@@ -1,11 +1,11 @@
---
-title: Dialog
+title: Dialog (legacy)
status: Deprecated
---
## Deprecation
-Use [Dialog2](/Dialog2) instead.
+Use the [new version of Dialog](/Dialog) instead.
**Before**
@@ -23,7 +23,7 @@ Use [Dialog2](/Dialog2) instead.
```jsx deprecated
{
open && (
-
@@ -34,13 +34,11 @@ Use [Dialog2](/Dialog2) instead.
onClose={() => setOpen(false)}
>
Some content
-
+
)
}
```
-import State from '../../components/State'
-
The dialog component is used for all modals. It renders on top of the rest of the app with an overlay.
You'll need to manage the `isOpen` state in a wrapper component of your own and pass in a function to be used to close the Dialog. For documentation purposes only we've created a mock `State` to handle this, but you should handle the state in the component you consume `Dialog` in or in a wrapper component.
@@ -111,7 +109,7 @@ You can also pass any non-text content into the header:
Cancel
- Delete
+ Delete
diff --git a/docs/content/deprecated/DropdownMenu.mdx b/docs/content/deprecated/DropdownMenu.mdx
index df48fbc532c..7b03ceb72c5 100644
--- a/docs/content/deprecated/DropdownMenu.mdx
+++ b/docs/content/deprecated/DropdownMenu.mdx
@@ -1,5 +1,4 @@
---
-componentId: dropdown_menu
title: DropdownMenu
status: Deprecated
---
diff --git a/docs/content/deprecated/Flex.md b/docs/content/deprecated/Flex.md
index 5ad6838dfc8..631e973a3ef 100644
--- a/docs/content/deprecated/Flex.md
+++ b/docs/content/deprecated/Flex.md
@@ -1,5 +1,4 @@
---
-componentId: flex
title: Flex
status: Deprecated
---
diff --git a/docs/content/deprecated/FormGroup.md b/docs/content/deprecated/FormGroup.md
index 143c750db0e..cb0a3143274 100644
--- a/docs/content/deprecated/FormGroup.md
+++ b/docs/content/deprecated/FormGroup.md
@@ -1,5 +1,4 @@
---
-componentId: form_group
title: FormGroup
status: Deprecated
---
diff --git a/docs/content/deprecated/Grid.md b/docs/content/deprecated/Grid.md
index 905630fe9e7..7f1d6810a3e 100644
--- a/docs/content/deprecated/Grid.md
+++ b/docs/content/deprecated/Grid.md
@@ -1,5 +1,4 @@
---
-componentId: grid
title: Grid
status: Deprecated
---
diff --git a/docs/content/deprecated/InputField.mdx b/docs/content/deprecated/InputField.mdx
index 6da7689f800..5a613bfa5bc 100644
--- a/docs/content/deprecated/InputField.mdx
+++ b/docs/content/deprecated/InputField.mdx
@@ -1,5 +1,4 @@
---
-componentId: inputField
title: InputField
status: Deprecated
description: The InputField component is used to render a labelled text input and, optionally, associated validation text and hint text.
diff --git a/docs/content/deprecated/Label.mdx b/docs/content/deprecated/Label.mdx
index 6546cc905ec..e8ce7b7dbef 100644
--- a/docs/content/deprecated/Label.mdx
+++ b/docs/content/deprecated/Label.mdx
@@ -1,5 +1,5 @@
---
-title: Label
+title: Label (legacy)
description: Use Label components to add contextual metadata to a design.
status: Deprecated
source: https://github.com/primer/react/blob/main/src/Label.tsx
diff --git a/docs/content/deprecated/Position.md b/docs/content/deprecated/Position.md
index fb2006117ca..8faae3c9475 100644
--- a/docs/content/deprecated/Position.md
+++ b/docs/content/deprecated/Position.md
@@ -1,5 +1,4 @@
---
-componentId: position
title: Position
status: Deprecated
---
diff --git a/docs/src/@primer/gatsby-theme-doctocat/live-code-scope.js b/docs/src/@primer/gatsby-theme-doctocat/live-code-scope.js
index 6532f85324d..f89af5a7a60 100644
--- a/docs/src/@primer/gatsby-theme-doctocat/live-code-scope.js
+++ b/docs/src/@primer/gatsby-theme-doctocat/live-code-scope.js
@@ -1,46 +1,10 @@
import * as doctocatComponents from '@primer/gatsby-theme-doctocat'
-import {
- AlertIcon,
- ArchiveIcon,
- ArrowRightIcon,
- CalendarIcon,
- CheckIcon,
- DotIcon,
- FilterIcon,
- FlameIcon,
- GearIcon,
- GitCommitIcon,
- IterationsIcon,
- KebabHorizontalIcon,
- LawIcon,
- LinkIcon,
- MailIcon,
- MarkGithubIcon,
- NoteIcon,
- NumberIcon,
- SmileyIcon,
- PencilIcon,
- PersonIcon,
- ProjectIcon,
- SearchIcon,
- SingleSelectIcon,
- StarIcon,
- TrashIcon,
- TypographyIcon,
- VersionsIcon,
- XIcon,
- ZapIcon,
- TriangleDownIcon
-} from '@primer/octicons-react'
+import * as octicons from '@primer/octicons-react'
import * as primerComponents from '@primer/react'
import * as drafts from '@primer/react/drafts'
import * as deprecated from '@primer/react/deprecated'
import {Placeholder} from '@primer/react/Placeholder'
import React from 'react'
-import {AnchoredOverlay} from '../../../../src/AnchoredOverlay'
-import {ConfirmationDialog, useConfirm} from '../../../../src/Dialog/ConfirmationDialog'
-import {Dialog as Dialog2} from '../../../../src/Dialog/Dialog'
-import {SelectPanel} from '../../../../src/SelectPanel/SelectPanel'
import State from '../../../components/State'
const ReactRouterLink = ({to, ...props}) => {
@@ -52,46 +16,11 @@ export default function resolveScope(metastring) {
return {
...doctocatComponents,
...primerComponents,
+ ...octicons,
...(metastring.includes('drafts') ? drafts : {}),
...(metastring.includes('deprecated') ? deprecated : {}),
ReactRouterLink,
State,
- CheckIcon,
- SearchIcon,
- ZapIcon,
- XIcon,
- DotIcon,
- SmileyIcon,
- PersonIcon,
- MailIcon,
- GitCommitIcon,
- FlameIcon,
- MarkGithubIcon,
- NoteIcon,
- ProjectIcon,
- FilterIcon,
- GearIcon,
- TypographyIcon,
- VersionsIcon,
- LinkIcon,
- LawIcon,
- StarIcon,
- AlertIcon,
- ArrowRightIcon,
- KebabHorizontalIcon,
- PencilIcon,
- ArchiveIcon,
- TrashIcon,
- CalendarIcon,
- IterationsIcon,
- NumberIcon,
- SingleSelectIcon,
- TriangleDownIcon,
- Dialog2,
- ConfirmationDialog,
- useConfirm,
- AnchoredOverlay,
- SelectPanel,
Placeholder
}
}
diff --git a/docs/src/@primer/gatsby-theme-doctocat/nav.yml b/docs/src/@primer/gatsby-theme-doctocat/nav.yml
index 30143970b9c..59369018686 100644
--- a/docs/src/@primer/gatsby-theme-doctocat/nav.yml
+++ b/docs/src/@primer/gatsby-theme-doctocat/nav.yml
@@ -65,8 +65,10 @@
url: /CircleOcticon
- title: CounterLabel
url: /CounterLabel
- - title: Details & useDetails
+ - title: Details
url: /Details
+ - title: Dialog
+ url: /Dialog
- title: FilteredSearch
url: /FilteredSearch
- title: FilterList
@@ -143,23 +145,23 @@
url: /Truncate
- title: UnderlineNav
url: /UnderlineNav
-- title: Drafts
- children:
+# - title: Drafts
+# children:
- title: Deprecated
children:
- - title: ActionList
+ - title: ActionList (legacy)
url: /deprecated/ActionList
- - title: ActionMenu
+ - title: ActionMenu (legacy)
url: /deprecated/ActionMenu
- title: BorderBox
url: /deprecated/BorderBox
- - title: Buttons
+ - title: Buttons (legacy)
url: /deprecated/Buttons
- title: ChoiceFieldset
url: /deprecated/ChoiceFieldset
- title: ChoiceInputField
url: /deprecated/ChoiceInputField
- - title: Dialog
+ - title: Dialog (legacy)
url: /deprecated/Dialog
- title: Dropdown
url: /deprecated/Dropdown
diff --git a/src/FilteredSearch.tsx b/src/FilteredSearch.tsx
index 2e7bf8de368..888a9cc7ade 100644
--- a/src/FilteredSearch.tsx
+++ b/src/FilteredSearch.tsx
@@ -7,7 +7,8 @@ const FilteredSearch = styled.div`
display: flex;
align-items: stretch;
- summary {
+ summary,
+ > button {
border-radius: 0;
border-top-left-radius: ${get('radii.2')};
border-bottom-left-radius: ${get('radii.2')};
diff --git a/src/__tests__/__snapshots__/FilteredSearch.test.tsx.snap b/src/__tests__/__snapshots__/FilteredSearch.test.tsx.snap
index c1e3a865678..b093bbf8a7f 100644
--- a/src/__tests__/__snapshots__/FilteredSearch.test.tsx.snap
+++ b/src/__tests__/__snapshots__/FilteredSearch.test.tsx.snap
@@ -12,7 +12,8 @@ exports[`FilteredSearch renders consistently 1`] = `
align-items: stretch;
}
-.c0 summary {
+.c0 summary,
+.c0 > button {
border-radius: 0;
border-top-left-radius: 6px;
border-bottom-left-radius: 6px;