@primer/components 32.0.2-rc.859381a1 → 32.1.1-rc.b4502a34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -1
- package/dist/browser.esm.js +9 -2
- package/dist/browser.esm.js.map +1 -1
- package/dist/browser.umd.js +9 -2
- package/dist/browser.umd.js.map +1 -1
- package/docs/content/ActionList2.mdx +23 -3
- package/docs/content/Avatar.mdx +21 -1
- package/docs/content/AvatarStack.mdx +23 -3
- package/docs/content/BranchName.md +24 -4
- package/docs/content/Breadcrumbs.md +22 -1
- package/docs/content/Buttons.md +2 -1
- package/docs/content/Checkbox.md +118 -0
- package/docs/content/CircleBadge.md +1 -0
- package/docs/content/CircleOcticon.md +2 -1
- package/docs/content/CounterLabel.md +1 -1
- package/docs/content/Details.md +2 -1
- package/docs/content/Dialog.md +1 -0
- package/docs/content/Dialog2.mdx +1 -0
- package/docs/content/Dropdown.md +1 -0
- package/docs/content/DropdownMenu.mdx +1 -0
- package/docs/content/FilterList.md +1 -0
- package/docs/content/FilteredSearch.md +1 -0
- package/docs/content/Flash.md +1 -0
- package/docs/content/FormGroup.md +1 -0
- package/docs/content/Header.md +1 -0
- package/docs/content/Heading.md +8 -4
- package/docs/content/Label.md +1 -0
- package/docs/content/LabelGroup.md +1 -0
- package/docs/content/Link.md +1 -0
- package/docs/content/Overlay.mdx +1 -0
- package/docs/content/Pagehead.md +1 -0
- package/docs/content/Pagination.md +1 -0
- package/docs/content/PointerBox.md +1 -0
- package/docs/content/Popover.md +1 -0
- package/docs/content/Portal.mdx +1 -0
- package/docs/content/Position.md +2 -9
- package/docs/content/ProgressBar.mdx +1 -0
- package/docs/content/SelectMenu.md +1 -0
- package/docs/content/SideNav.md +1 -0
- package/docs/content/StateLabel.md +1 -0
- package/docs/content/StyledOcticon.md +1 -1
- package/docs/content/SubNav.md +1 -0
- package/docs/content/TabNav.md +1 -0
- package/docs/content/Text.md +10 -3
- package/docs/content/TextInput.md +9 -1
- package/docs/content/Timeline.md +1 -0
- package/docs/content/Tooltip.md +1 -0
- package/docs/content/Truncate.md +1 -0
- package/docs/content/UnderlineNav.md +1 -0
- package/docs/content/status.mdx +10 -0
- package/docs/src/@primer/gatsby-theme-doctocat/mdx-components.js +9 -0
- package/docs/src/@primer/gatsby-theme-doctocat/nav.yml +4 -0
- package/docs/src/component-statuses.js +74 -0
- package/lib/ActionList/Item.js +3 -3
- package/lib/ActionList2/Item.js +3 -1
- package/lib/ActionList2/List.js +1 -2
- package/lib/ActionList2/Selection.js +3 -1
- package/lib/Autocomplete/Autocomplete.d.ts +1 -0
- package/lib/Autocomplete/AutocompleteInput.d.ts +1 -0
- package/lib/Button/Button.d.ts +1 -0
- package/lib/Button/ButtonClose.d.ts +2 -1
- package/lib/Button/ButtonDanger.d.ts +1 -0
- package/lib/Button/ButtonInvisible.d.ts +1 -0
- package/lib/Button/ButtonOutline.d.ts +1 -0
- package/lib/Button/ButtonPrimary.d.ts +1 -0
- package/lib/Checkbox.d.ts +29 -0
- package/lib/Checkbox.js +64 -0
- package/lib/CircleOcticon.d.ts +1 -0
- package/lib/Dialog.d.ts +3 -2
- package/lib/Dropdown.d.ts +4 -0
- package/lib/DropdownMenu/DropdownButton.d.ts +2 -1
- package/lib/FilterList.d.ts +1 -0
- package/lib/Position.d.ts +4 -4
- package/lib/SelectMenu/SelectMenu.d.ts +10 -4
- package/lib/SelectMenu/SelectMenuItem.d.ts +1 -1
- package/lib/SelectMenu/SelectMenuModal.d.ts +1 -1
- package/lib/TextInputWithTokens.d.ts +1 -0
- package/lib/Token/AvatarToken.d.ts +1 -1
- package/lib/Token/IssueLabelToken.d.ts +1 -1
- package/lib/Token/Token.d.ts +1 -1
- package/lib/__tests__/ActionList2.test.d.ts +1 -0
- package/lib/__tests__/ActionList2.test.js +117 -0
- package/lib/__tests__/Checkbox.test.d.ts +2 -0
- package/lib/__tests__/Checkbox.test.js +189 -0
- package/lib/__tests__/themePreval.test.d.ts +1 -0
- package/lib/__tests__/themePreval.test.js +14 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +8 -0
- package/lib/stories/ActionList2.stories.js +20 -6
- package/lib/stories/Checkbox.stories.js +227 -0
- package/lib/utils/testing.d.ts +1 -0
- package/lib/utils/testing.js +29 -0
- package/lib-esm/ActionList/Item.js +3 -3
- package/lib-esm/ActionList2/Item.js +3 -1
- package/lib-esm/ActionList2/List.js +1 -2
- package/lib-esm/ActionList2/Selection.js +3 -1
- package/lib-esm/Autocomplete/Autocomplete.d.ts +1 -0
- package/lib-esm/Autocomplete/AutocompleteInput.d.ts +1 -0
- package/lib-esm/Button/Button.d.ts +1 -0
- package/lib-esm/Button/ButtonClose.d.ts +2 -1
- package/lib-esm/Button/ButtonDanger.d.ts +1 -0
- package/lib-esm/Button/ButtonInvisible.d.ts +1 -0
- package/lib-esm/Button/ButtonOutline.d.ts +1 -0
- package/lib-esm/Button/ButtonPrimary.d.ts +1 -0
- package/lib-esm/Checkbox.d.ts +29 -0
- package/lib-esm/Checkbox.js +44 -0
- package/lib-esm/CircleOcticon.d.ts +1 -0
- package/lib-esm/Dialog.d.ts +3 -2
- package/lib-esm/Dropdown.d.ts +4 -0
- package/lib-esm/DropdownMenu/DropdownButton.d.ts +2 -1
- package/lib-esm/FilterList.d.ts +1 -0
- package/lib-esm/Position.d.ts +4 -4
- package/lib-esm/SelectMenu/SelectMenu.d.ts +10 -4
- package/lib-esm/SelectMenu/SelectMenuItem.d.ts +1 -1
- package/lib-esm/SelectMenu/SelectMenuModal.d.ts +1 -1
- package/lib-esm/TextInputWithTokens.d.ts +1 -0
- package/lib-esm/Token/AvatarToken.d.ts +1 -1
- package/lib-esm/Token/IssueLabelToken.d.ts +1 -1
- package/lib-esm/Token/Token.d.ts +1 -1
- package/lib-esm/__tests__/ActionList2.test.d.ts +1 -0
- package/lib-esm/__tests__/ActionList2.test.js +105 -2
- package/lib-esm/__tests__/Checkbox.test.d.ts +2 -0
- package/lib-esm/__tests__/Checkbox.test.js +169 -0
- package/lib-esm/__tests__/themePreval.test.d.ts +1 -0
- package/lib-esm/__tests__/themePreval.test.js +7 -0
- package/lib-esm/index.d.ts +2 -0
- package/lib-esm/index.js +1 -0
- package/lib-esm/stories/ActionList2.stories.js +20 -6
- package/lib-esm/stories/Checkbox.stories.js +197 -0
- package/lib-esm/utils/testing.d.ts +1 -0
- package/lib-esm/utils/testing.js +24 -0
- package/package-lock.json +179 -20
- package/package.json +2 -2
- package/src/ActionList/Item.tsx +2 -1
- package/src/ActionList2/Item.tsx +3 -2
- package/src/ActionList2/List.tsx +1 -6
- package/src/ActionList2/Selection.tsx +2 -1
- package/src/Checkbox.tsx +75 -0
- package/src/__tests__/ActionList2.test.tsx +111 -2
- package/src/__tests__/Checkbox.test.tsx +155 -0
- package/src/__tests__/__snapshots__/Autocomplete.test.tsx.snap +13 -0
- package/src/__tests__/__snapshots__/Checkbox.test.tsx.snap +16 -0
- package/src/__tests__/__snapshots__/themePreval.test.ts.snap +3176 -0
- package/src/__tests__/themePreval.test.ts +8 -0
- package/src/index.ts +3 -0
- package/src/stories/ActionList2.stories.tsx +22 -8
- package/src/stories/Checkbox.stories.tsx +164 -0
- package/src/utils/testing.tsx +22 -0
- package/stats.html +1 -1
- package/docs/content/TextInputTokens.mdx +0 -89
- package/lib/ActionList2/Header.d.ts +0 -26
- package/lib/ActionList2/Header.js +0 -55
- package/lib-esm/ActionList2/Header.d.ts +0 -26
- package/lib-esm/ActionList2/Header.js +0 -44
- package/src/ActionList2/Header.tsx +0 -58
@@ -1,14 +1,14 @@
|
|
1
1
|
---
|
2
|
-
title: ActionList
|
2
|
+
title: ActionList v2
|
3
3
|
status: Alpha
|
4
4
|
source: https://github.com/primer/react/tree/main/src/ActionList2
|
5
5
|
storybook: '/react/storybook?path=/story/composite-components-actionlist2'
|
6
|
-
description: An ActionList is a list of items
|
6
|
+
description: An ActionList is a list of items that can be activated or selected. ActionList is the base component for many menu-type components, including DropdownMenu and ActionMenu.
|
7
7
|
---
|
8
8
|
|
9
9
|
import {BorderBox, Avatar} from '@primer/components'
|
10
10
|
import {ActionList} from '@primer/components/drafts'
|
11
|
-
import {
|
11
|
+
import {ComponentChecklist} from '../src/component-checklist'
|
12
12
|
|
13
13
|
import {ImageContainer} from '@primer/gatsby-theme-doctocat'
|
14
14
|
import {LinkIcon, AlertIcon, ArrowRightIcon} from '@primer/octicons-react'
|
@@ -357,3 +357,23 @@ render(<SelectFields />)
|
|
357
357
|
|
358
358
|
- [ActionMenu](/ActionMenu)
|
359
359
|
- [SelectPanel](/SelectPanel)
|
360
|
+
|
361
|
+
## Component status
|
362
|
+
|
363
|
+
<ComponentChecklist
|
364
|
+
items={{
|
365
|
+
propsDocumented: true,
|
366
|
+
noUnnecessaryDeps: true,
|
367
|
+
adaptsToThemes: true,
|
368
|
+
adaptsToScreenSizes: true,
|
369
|
+
fullTestCoverage: false,
|
370
|
+
usedInProduction: false,
|
371
|
+
usageExamplesDocumented: true,
|
372
|
+
designReviewed: false,
|
373
|
+
a11yReviewed: false,
|
374
|
+
stableApi: false,
|
375
|
+
addressedApiFeedback: false,
|
376
|
+
hasDesignGuidelines: true,
|
377
|
+
hasFigmaComponent: true
|
378
|
+
}}
|
379
|
+
/>
|
package/docs/content/Avatar.mdx
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
---
|
2
2
|
title: Avatar
|
3
|
+
status: Alpha
|
3
4
|
componentId: avatar
|
4
5
|
source: https://github.com/primer/react/blob/main/src/Avatar.tsx
|
5
6
|
---
|
6
7
|
|
7
|
-
import {Props} from '../src/props'
|
8
8
|
import {Avatar} from '@primer/components'
|
9
9
|
|
10
10
|
```jsx live
|
@@ -31,3 +31,23 @@ import {Avatar} from '@primer/components'
|
|
31
31
|
<Avatar src="https://avatars.githubusercontent.com/primer" />
|
32
32
|
</AvatarPair>
|
33
33
|
```
|
34
|
+
|
35
|
+
## Component status
|
36
|
+
|
37
|
+
<ComponentChecklist
|
38
|
+
items={{
|
39
|
+
propsDocumented: true,
|
40
|
+
noUnnecessaryDeps: true,
|
41
|
+
adaptsToThemes: true,
|
42
|
+
adaptsToScreenSizes: true,
|
43
|
+
fullTestCoverage: false,
|
44
|
+
usedInProduction: true,
|
45
|
+
usageExamplesDocumented: true,
|
46
|
+
designReviewed: false,
|
47
|
+
a11yReviewed: false,
|
48
|
+
stableApi: false,
|
49
|
+
addressedApiFeedback: false,
|
50
|
+
hasDesignGuidelines: false,
|
51
|
+
hasFigmaComponent: false
|
52
|
+
}}
|
53
|
+
/>
|
@@ -1,12 +1,12 @@
|
|
1
1
|
---
|
2
2
|
title: AvatarStack
|
3
|
+
status: Alpha
|
4
|
+
description: Use an avatar stack to display two or more avatars in an inline stack.
|
5
|
+
source: https://github.com/primer/react/blob/main/src/AvatarStack.tsx
|
3
6
|
---
|
4
7
|
|
5
|
-
import {Props} from '../src/props'
|
6
8
|
import {AvatarStack} from '@primer/components'
|
7
9
|
|
8
|
-
AvatarStack is used to display more than one Avatar in an inline stack.
|
9
|
-
|
10
10
|
### Default example
|
11
11
|
|
12
12
|
```jsx live
|
@@ -35,3 +35,23 @@ AvatarStack is used to display more than one Avatar in an inline stack.
|
|
35
35
|
| :--------- | :---------------- | :-----: | :----------------------------------- |
|
36
36
|
| alignRight | Boolean | | Creates right aligned AvatarStack |
|
37
37
|
| sx | SystemStyleObject | {} | Style to be applied to the component |
|
38
|
+
|
39
|
+
## Component status
|
40
|
+
|
41
|
+
<ComponentChecklist
|
42
|
+
items={{
|
43
|
+
propsDocumented: true,
|
44
|
+
noUnnecessaryDeps: true,
|
45
|
+
adaptsToThemes: true,
|
46
|
+
adaptsToScreenSizes: true,
|
47
|
+
fullTestCoverage: false,
|
48
|
+
usedInProduction: true,
|
49
|
+
usageExamplesDocumented: true,
|
50
|
+
designReviewed: false,
|
51
|
+
a11yReviewed: false,
|
52
|
+
stableApi: false,
|
53
|
+
addressedApiFeedback: false,
|
54
|
+
hasDesignGuidelines: false,
|
55
|
+
hasFigmaComponent: false
|
56
|
+
}}
|
57
|
+
/>
|
@@ -1,18 +1,38 @@
|
|
1
1
|
---
|
2
2
|
title: BranchName
|
3
|
+
status: Alpha
|
4
|
+
source: https://github.com/primer/react/blob/main/src/BranchName.tsx
|
3
5
|
---
|
4
6
|
|
5
7
|
BranchName is a label-type component rendered as an `<a>` tag by default with monospace font.
|
6
8
|
|
7
|
-
|
8
|
-
|
9
|
-
```jsx live live
|
9
|
+
```jsx live
|
10
10
|
<BranchName>a_new_feature_branch</BranchName>
|
11
11
|
```
|
12
12
|
|
13
|
-
##
|
13
|
+
## Props
|
14
14
|
|
15
15
|
| Name | Type | Default | Description |
|
16
16
|
| :--- | :----- | :-----: | :---------------------------------- |
|
17
17
|
| as | String | `<a>` | sets the HTML tag for the component |
|
18
18
|
| href | String | | a URL to link the component to |
|
19
|
+
|
20
|
+
## Component status
|
21
|
+
|
22
|
+
<ComponentChecklist
|
23
|
+
items={{
|
24
|
+
propsDocumented: true,
|
25
|
+
noUnnecessaryDeps: true,
|
26
|
+
adaptsToThemes: true,
|
27
|
+
adaptsToScreenSizes: true,
|
28
|
+
fullTestCoverage: true,
|
29
|
+
usedInProduction: false,
|
30
|
+
usageExamplesDocumented: true,
|
31
|
+
designReviewed: false,
|
32
|
+
a11yReviewed: false,
|
33
|
+
stableApi: false,
|
34
|
+
addressedApiFeedback: false,
|
35
|
+
hasDesignGuidelines: false,
|
36
|
+
hasFigmaComponent: false
|
37
|
+
}}
|
38
|
+
/>
|
@@ -1,6 +1,7 @@
|
|
1
1
|
---
|
2
2
|
title: Breadcrumbs
|
3
3
|
status: Alpha
|
4
|
+
description: Use breadcrumbs to show navigational context on pages that are many levels deep in a site’s hierarchy. Breadcrumbs show and link to parent, grandparent, and sometimes great-grandparent pages.
|
4
5
|
source: https://github.com/primer/react/blob/main/src/Breadcrumbs.tsx
|
5
6
|
---
|
6
7
|
|
@@ -27,7 +28,7 @@ This ensures that the NavLink gets `activeClassName='selected'`
|
|
27
28
|
</Breadcrumbs>
|
28
29
|
```
|
29
30
|
|
30
|
-
##
|
31
|
+
## Props
|
31
32
|
|
32
33
|
### Breadcrumbs
|
33
34
|
|
@@ -45,3 +46,23 @@ This ensures that the NavLink gets `activeClassName='selected'`
|
|
45
46
|
| href | string | | URL to be used for the Link |
|
46
47
|
| selected | boolean | `false` | Used to style the link as selected or unselected |
|
47
48
|
| sx | SystemStyleObject | `{}` | Style to be applied to the component |
|
49
|
+
|
50
|
+
## Component status
|
51
|
+
|
52
|
+
<ComponentChecklist
|
53
|
+
items={{
|
54
|
+
propsDocumented: true,
|
55
|
+
noUnnecessaryDeps: true,
|
56
|
+
adaptsToThemes: true,
|
57
|
+
adaptsToScreenSizes: false,
|
58
|
+
fullTestCoverage: false,
|
59
|
+
usedInProduction: true,
|
60
|
+
usageExamplesDocumented: true,
|
61
|
+
designReviewed: false,
|
62
|
+
a11yReviewed: false,
|
63
|
+
stableApi: false,
|
64
|
+
addressedApiFeedback: false,
|
65
|
+
hasDesignGuidelines: false,
|
66
|
+
hasFigmaComponent: false
|
67
|
+
}}
|
68
|
+
/>
|
package/docs/content/Buttons.md
CHANGED
@@ -0,0 +1,118 @@
|
|
1
|
+
---
|
2
|
+
title: Checkbox
|
3
|
+
description: Use checkboxes to toggle between checked and unchecked states in a list or as a standalone form field
|
4
|
+
status: Alpha
|
5
|
+
source: https://github.com/primer/react/blob/main/src/Checklist.tsx
|
6
|
+
storybook: '/react/storybook?path=/story/forms-checkbox--default'
|
7
|
+
---
|
8
|
+
|
9
|
+
import {ComponentChecklist} from '../src/component-checklist'
|
10
|
+
|
11
|
+
## Default example
|
12
|
+
|
13
|
+
The `Checkbox` component can be used in controlled and uncontrolled modes.
|
14
|
+
|
15
|
+
```jsx live
|
16
|
+
<>
|
17
|
+
<Box as="form" sx={{p: 3, pt: 0, display: 'flex', alignItems: 'center'}}>
|
18
|
+
<Checkbox id="default-checkbox" />
|
19
|
+
<Text as="label" htmlFor="default-checkbox" sx={{fontSize: 2, fontWeight: 'bold', marginLeft: 1}}>
|
20
|
+
Default checkbox
|
21
|
+
</Text>
|
22
|
+
</Box>
|
23
|
+
<Box as="form" sx={{p: 3, display: 'flex', alignItems: 'center'}}>
|
24
|
+
<Checkbox id="always-checked-checkbox" checked={true} />
|
25
|
+
<Text as="label" htmlFor="always-checked-checkbox" sx={{fontSize: 2, fontWeight: 'bold', marginLeft: 1}}>
|
26
|
+
Always checked
|
27
|
+
</Text>
|
28
|
+
</Box>
|
29
|
+
<Box as="form" sx={{p: 3, display: 'flex', alignItems: 'center'}}>
|
30
|
+
<Checkbox id="always-unchecked-checkbox" checked={false} />
|
31
|
+
<Text as="label" htmlFor="always-unchecked-checkbox" sx={{fontSize: 2, fontWeight: 'bold', marginLeft: 1}}>
|
32
|
+
Always unchecked
|
33
|
+
</Text>
|
34
|
+
</Box>
|
35
|
+
|
36
|
+
<Box as="form" sx={{p: 3, display: 'flex', alignItems: 'center'}}>
|
37
|
+
<Checkbox id="inactive-checkbox" checked={true} disabled />
|
38
|
+
<Text as="label" htmlFor="inactive-checkbox" sx={{fontSize: 2, fontWeight: 'bold', marginLeft: 1}}>
|
39
|
+
Inactive
|
40
|
+
</Text>
|
41
|
+
</Box>
|
42
|
+
</>
|
43
|
+
```
|
44
|
+
|
45
|
+
<Note variant="warning">
|
46
|
+
Checkbox components should always be accompanied by a corresponding label to improve support for assistive technologies.
|
47
|
+
</Note>
|
48
|
+
|
49
|
+
## Indeterminate example
|
50
|
+
|
51
|
+
An `indeterminate` checkbox state should be used if the input value is neither true nor false. This can be useful in situations where you are required to display an incomplete state, or one that is dependent on other input selections to determine a value.
|
52
|
+
|
53
|
+
```jsx live
|
54
|
+
<>
|
55
|
+
<Box as="form" sx={{p: 3, pt: 0, pb: 1, display: 'flex', alignItems: 'center'}}>
|
56
|
+
<Checkbox id="indeterminate-checkbox" onChange={() => {}} indeterminate={true} />
|
57
|
+
<Text as="label" sx={{fontSize: 2, fontWeight: 'bold', marginLeft: 1}} htmlFor="controlled-checkbox">
|
58
|
+
<Text sx={{display: 'block'}}>Default checkbox</Text>
|
59
|
+
</Text>
|
60
|
+
</Box>
|
61
|
+
<Box key={`sub-checkbox-0`} as="form" sx={{p: 1, pl: 6, display: 'flex', alignItems: 'center'}}>
|
62
|
+
<Checkbox id={`sub-checkbox-0`} checked={true} onChange={() => {}} />
|
63
|
+
<Text as="label" sx={{fontSize: 2, fontWeight: 'bold', marginLeft: 1}} htmlFor={`sub-checkbox-0`}>
|
64
|
+
<Text sx={{display: 'block'}}>Checkbox 1</Text>
|
65
|
+
</Text>
|
66
|
+
</Box>
|
67
|
+
<Box key={`sub-checkbox-1`} as="form" sx={{p: 1, pl: 6, display: 'flex', alignItems: 'center'}}>
|
68
|
+
<Checkbox id={`sub-checkbox-1`} checked={false} onChange={() => {}} />
|
69
|
+
<Text as="label" sx={{fontSize: 2, fontWeight: 'bold', marginLeft: 1}} htmlFor={`sub-checkbox-1`}>
|
70
|
+
<Text sx={{display: 'block'}}>Checkbox 2</Text>
|
71
|
+
</Text>
|
72
|
+
</Box>
|
73
|
+
<Box key={`sub-checkbox-2`} as="form" sx={{p: 1, pl: 6, display: 'flex', alignItems: 'center'}}>
|
74
|
+
<Checkbox id={`sub-checkbox-2`} checked={false} onChange={() => {}} />
|
75
|
+
<Text as="label" sx={{fontSize: 2, fontWeight: 'bold', marginLeft: 1}} htmlFor={`sub-checkbox-2`}>
|
76
|
+
<Text sx={{display: 'block'}}>Checkbox 3</Text>
|
77
|
+
</Text>
|
78
|
+
</Box>
|
79
|
+
<Box key={`sub-checkbox-3`} as="form" sx={{p: 1, pl: 6, display: 'flex', alignItems: 'center'}}>
|
80
|
+
<Checkbox id={`sub-checkbox-3`} checked={false} onChange={() => {}} />
|
81
|
+
<Text as="label" sx={{fontSize: 2, fontWeight: 'bold', marginLeft: 1}} htmlFor={`sub-checkbox-3`}>
|
82
|
+
<Text sx={{display: 'block'}}>Checkbox 4</Text>
|
83
|
+
</Text>
|
84
|
+
</Box>
|
85
|
+
</>
|
86
|
+
```
|
87
|
+
|
88
|
+
## Component props
|
89
|
+
|
90
|
+
Native `<input>` attributes are forwarded to the underlying React `input` component and are not listed below.
|
91
|
+
|
92
|
+
| Name | Type | Default | Description |
|
93
|
+
| :------------- | :---------- | :-------: | :------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
94
|
+
| checked | Boolean | undefined | Optional. Modifies true/false value of the native checkbox |
|
95
|
+
| defaultChecked | Boolean | undefined | Optional. Checks the input by default in uncontrolled mode |
|
96
|
+
| onChange | ChangeEvent | undefined | Optional. A callback function that is triggered when the checked state has been changed. |
|
97
|
+
| disabled | Boolean | undefined | Optional. Modifies the native disabled state of the native checkbox |
|
98
|
+
| indeterminate | Boolean | undefined | Optional. Applies an [indeterminate](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox#attr-indeterminate) state to the checkbox |
|
99
|
+
|
100
|
+
## Component status
|
101
|
+
|
102
|
+
<ComponentChecklist
|
103
|
+
items={{
|
104
|
+
propsDocumented: true,
|
105
|
+
noUnnecessaryDeps: true,
|
106
|
+
adaptsToThemes: true,
|
107
|
+
adaptsToScreenSizes: true,
|
108
|
+
fullTestCoverage: true,
|
109
|
+
usedInProduction: false,
|
110
|
+
usageExamplesDocumented: false,
|
111
|
+
designReviewed: false,
|
112
|
+
a11yReviewed: false,
|
113
|
+
stableApi: false,
|
114
|
+
addressedApiFeedback: false,
|
115
|
+
hasDesignGuidelines: false,
|
116
|
+
hasFigmaComponent: false
|
117
|
+
}}
|
118
|
+
/>
|
@@ -1,5 +1,6 @@
|
|
1
1
|
---
|
2
2
|
title: CircleOcticon
|
3
|
+
status: Alpha
|
3
4
|
---
|
4
5
|
|
5
6
|
CircleOcticon renders any Octicon with a circle background. CircleOcticons are most commonly used to represent the status of a pull request in the comment timeline.
|
@@ -7,7 +8,7 @@ CircleOcticon renders any Octicon with a circle background. CircleOcticons are m
|
|
7
8
|
## Default example
|
8
9
|
|
9
10
|
```jsx live
|
10
|
-
<CircleOcticon icon={CheckIcon} size={32} sx={{bg:
|
11
|
+
<CircleOcticon icon={CheckIcon} size={32} sx={{bg: 'success.fg', color: 'fg.onEmphasis'}} />
|
11
12
|
```
|
12
13
|
|
13
14
|
## Component props
|
package/docs/content/Details.md
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
---
|
2
|
-
title: Details
|
2
|
+
title: Details
|
3
|
+
status: Alpha
|
3
4
|
---
|
4
5
|
|
5
6
|
`Details` is a styled `details` element for use with the `useDetails` hook. The `useDetails` hook returns the `open` state, a `setOpen` function to manually change the open state, and **`getDetailsProps` which must be spread onto your `Details` element in order for `Details` to get receive the proper behaviors provided by the hook**. See Kent Dodd's article on this pattern [here](https://kentcdodds.com/blog/how-to-give-rendering-control-to-users-with-prop-getters).
|
package/docs/content/Dialog.md
CHANGED
package/docs/content/Dialog2.mdx
CHANGED
package/docs/content/Dropdown.md
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
---
|
2
2
|
title: DropdownMenu
|
3
|
+
status: Alpha
|
3
4
|
---
|
4
5
|
|
5
6
|
A `DropdownMenu` provides an anchor (button by default) that will open a floating menu of selectable items. The menu can be opened and navigated using keyboard or mouse. When an item is selected, the menu will close and the `onChange` callback will be called. If the default anchor button is used, the anchor contents will be updated with the selection.
|
package/docs/content/Flash.md
CHANGED
package/docs/content/Header.md
CHANGED
package/docs/content/Heading.md
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
---
|
2
2
|
title: Heading
|
3
|
+
status: Alpha
|
3
4
|
---
|
4
5
|
|
5
6
|
The Heading component will render an html `h2` tag without any default styling. Other heading level elements `h1-h6` are available through use of the `as` prop (see [System Props](/system-props) for additional explanation). Please reference the [w3 recommendations for headings](https://www.w3.org/WAI/tutorials/page-structure/headings/) to ensure your headings provide an accessible experience for screen reader users.
|
@@ -7,8 +8,11 @@ The Heading component will render an html `h2` tag without any default styling.
|
|
7
8
|
**Attention:** Make sure to include a valid heading element to render a Heading component other than `h2` (`<Heading as="h1">H1 Element</Heading>`).
|
8
9
|
|
9
10
|
## Default example
|
11
|
+
|
10
12
|
```jsx live
|
11
|
-
<Heading fontSize={1} mb={2}>
|
13
|
+
<Heading fontSize={1} mb={2}>
|
14
|
+
H2 heading with fontSize={1}
|
15
|
+
</Heading>
|
12
16
|
```
|
13
17
|
|
14
18
|
## System props
|
@@ -17,6 +21,6 @@ Heading components get `TYPOGRAPHY` and `COMMON` system props. Read our [System
|
|
17
21
|
|
18
22
|
## Component props
|
19
23
|
|
20
|
-
| Prop name | Type
|
21
|
-
| :-------- |
|
22
|
-
| as | String or React element
|
24
|
+
| Prop name | Type | Description |
|
25
|
+
| :-------- | :---------------------- | :---------------------------------- |
|
26
|
+
| as | String or React element | sets the HTML tag for the component |
|
package/docs/content/Label.md
CHANGED
package/docs/content/Link.md
CHANGED
package/docs/content/Overlay.mdx
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
---
|
2
2
|
title: Overlay
|
3
|
+
status: Alpha
|
3
4
|
---
|
4
5
|
|
5
6
|
An `Overlay` is a flexible floating surface, used to display transient content such as menus, selection options, dialogs, and more. Overlays use shadows to express elevation. The `Overlay` component handles all behaviors needed by overlay UIs as well as the common styles that all overlays should have. `Overlay` is the base component for many of our overlay-type components.
|
package/docs/content/Pagehead.md
CHANGED
package/docs/content/Popover.md
CHANGED
package/docs/content/Portal.mdx
CHANGED
package/docs/content/Position.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
---
|
2
|
-
title: Position
|
2
|
+
title: Position
|
3
3
|
status: Deprecated
|
4
4
|
---
|
5
5
|
|
@@ -69,14 +69,7 @@ Use [Box](/Box) instead.
|
|
69
69
|
|
70
70
|
<Heading my={2}>Sticky</Heading>
|
71
71
|
|
72
|
-
<Box
|
73
|
-
borderWidth="1px"
|
74
|
-
borderStyle="solid"
|
75
|
-
borderColor="success.emphasis"
|
76
|
-
borderRadius={2}
|
77
|
-
border={1}
|
78
|
-
height={500}
|
79
|
-
>
|
72
|
+
<Box borderWidth="1px" borderStyle="solid" borderColor="success.emphasis" borderRadius={2} border={1} height={500}>
|
80
73
|
<Sticky top={0} bg="success.subtle" p={6}>
|
81
74
|
I'm sticky!
|
82
75
|
</Sticky>
|
@@ -1,5 +1,6 @@
|
|
1
1
|
---
|
2
2
|
title: SelectMenu
|
3
|
+
status: Deprecated
|
3
4
|
---
|
4
5
|
|
5
6
|
The `SelectMenu` components are a suite of components which can be combined together to make several different variations of our GitHub select menu. At it's most basic form, a select menu is comprised of a `SelectMenu` wrapper, which contains a `summary` component of your choice and a `Select.Modal` which contains the select menu content. Use `SelectMenu.List` to wrap items in the select menu, and `SelectMenu.Item` to wrap each item.
|
package/docs/content/SideNav.md
CHANGED
package/docs/content/SubNav.md
CHANGED
package/docs/content/TabNav.md
CHANGED
package/docs/content/Text.md
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
---
|
2
2
|
title: Text
|
3
|
+
status: Alpha
|
3
4
|
---
|
4
5
|
|
5
6
|
The Text component is a wrapper component that will apply typography styles to the text inside.
|
@@ -8,9 +9,15 @@ The Text component is a wrapper component that will apply typography styles to t
|
|
8
9
|
|
9
10
|
```jsx live
|
10
11
|
<>
|
11
|
-
<Text as=
|
12
|
-
|
13
|
-
|
12
|
+
<Text as="p" fontWeight="bold">
|
13
|
+
bold
|
14
|
+
</Text>
|
15
|
+
<Text as="p" color="danger.fg">
|
16
|
+
danger color
|
17
|
+
</Text>
|
18
|
+
<Text as="p" color="fg.onEmphasis" bg="neutral.emphasis" p={2}>
|
19
|
+
inverse colors
|
20
|
+
</Text>
|
14
21
|
</>
|
15
22
|
```
|
16
23
|
|