Skip to content

Commit 56ff1c0

Browse files
authored
Manually corrects .docs.json files (#5316)
* manually corrects prop docs * tweaks
1 parent 1d4116d commit 56ff1c0

File tree

68 files changed

+2239
-158
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+2239
-158
lines changed

packages/react/src/ActionBar/ActionBar.docs.json

Lines changed: 31 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,45 @@
33
"name": "ActionBar",
44
"status": "alpha",
55
"a11yReviewed": true,
6-
"stories": [],
6+
"stories": [
7+
{
8+
"id": "components-actionbar--default"
9+
}
10+
],
711
"importPath": "@primer/react",
812
"props": [
913
{
10-
"name": "size",
11-
"type": "'small' | 'medium' | 'large'",
14+
"name": "aria-label",
15+
"type": "string",
1216
"required": false,
13-
"description": "Size of the action bar"
17+
"description": "When provided, a label is added to the action bar",
18+
"defaultValue": ""
1419
},
1520
{
16-
"name": "aria-label",
21+
"name": "aria-labelledby",
1722
"type": "string",
18-
"description": "When provided, a label is added to the action bar"
23+
"required": false,
24+
"description": "When provided, uses the element with that ID as the accessible name for the ActionBar",
25+
"defaultValue": ""
1926
},
2027
{
2128
"name": "children",
22-
"type": "React.ReactElement",
23-
"required": true
29+
"type": "ReactNode",
30+
"required": false,
31+
"description": "Buttons in the action bar",
32+
"defaultValue": ""
33+
},
34+
{
35+
"name": "size",
36+
"type": "'small' | 'large' | 'medium'",
37+
"required": false,
38+
"description": "Size of the action bar",
39+
"defaultValue": ""
2440
}
2541
],
2642
"subcomponents": [
2743
{
28-
"name": "ActionBar.Icon",
44+
"name": "ActionBar.IconButton",
2945
"props": [
3046
{
3147
"name": "children",
@@ -38,19 +54,19 @@
3854
"name": "icon",
3955
"type": "Component",
4056
"defaultValue": "",
41-
"description": "provide an octicon. It will be placed in the center of the button"
57+
"description": "Provide an octicon. It will be placed in the center of the button"
4258
},
4359
{
4460
"name": "aria-label",
4561
"type": "string",
4662
"defaultValue": "",
4763
"description": "Use an aria label to describe the functionality of the button. Please refer to [our guidance on alt text](https://primer.style/guides/accessibility/alternative-text-for-images) for tips on writing good alternative text."
48-
},
49-
{
50-
"name": "sx",
51-
"type": "SystemStyleObject"
5264
}
53-
]
65+
],
66+
"passthrough": {
67+
"element": "IconButton",
68+
"url": "/react/IconButton"
69+
}
5470
},
5571
{
5672
"name": "ActionBar.Divider",

packages/react/src/ActionList/ActionList.docs.json

Lines changed: 50 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@
2626
"description": "Whether multiple items or a single item can be selected."
2727
},
2828
{
29-
"name": "showDivider",
29+
"name": "showDividers",
3030
"type": "boolean",
31-
"defaultValue": "false",
32-
"description": "Display a divider above each item in this list when it does not follow a header or divider."
31+
"description": "Display a divider above each `Item` in this `List` when it does not follow a `Header` or `Divider`.",
32+
"defaultValue": ""
3333
},
3434
{
3535
"name": "role",
@@ -51,7 +51,7 @@
5151
"type": "React.ReactNode | ActionList.LeadingVisual | ActionList.Description | ActionList.TrailingVisual",
5252
"defaultValue": "",
5353
"required": true,
54-
"description": ""
54+
"description": "Primary content for an Item"
5555
},
5656
{
5757
"name": "variant",
@@ -100,6 +100,13 @@
100100
"defaultValue": "",
101101
"description": "ARIA role describing the function of the item. `option` is a common value."
102102
},
103+
{
104+
"name": "id",
105+
"type": "string",
106+
"required": false,
107+
"description": "id to attach to the root element of the Item",
108+
"defaultValue": ""
109+
},
103110
{
104111
"name": "sx",
105112
"type": "SystemStyleObject"
@@ -123,6 +130,13 @@
123130
"required": false,
124131
"description": "The level of the heading"
125132
},
133+
{
134+
"name": "visuallyHidden",
135+
"type": "boolean",
136+
"required": false,
137+
"description": "",
138+
"defaultValue": ""
139+
},
126140
{
127141
"name": "sx",
128142
"type": "SystemStyleObject"
@@ -154,6 +168,13 @@
154168
"type": "React.ElementType",
155169
"defaultValue": "\"a\""
156170
},
171+
{
172+
"name": "inactiveText",
173+
"type": "string",
174+
"required": false,
175+
"description": "Text describing why the item is inactive. This may be used when an item's usual functionality\nis unavailable due to a system error such as a database outage.",
176+
"defaultValue": ""
177+
},
157178
{
158179
"name": "sx",
159180
"type": "SystemStyleObject"
@@ -277,6 +298,20 @@
277298
"defaultValue": "'subtle'",
278299
"description": "`filled` style has a background color and top and bottom borders. Subtle style has no background or borders."
279300
},
301+
{
302+
"name": "auxiliaryText",
303+
"type": "string",
304+
"required": false,
305+
"description": "Secondary text which provides additional information about a `Group`.",
306+
"defaultValue": ""
307+
},
308+
{
309+
"name": "visuallyHidden",
310+
"type": "boolean",
311+
"required": false,
312+
"description": "",
313+
"defaultValue": ""
314+
},
280315
{
281316
"name": "as",
282317
"type": "h1 | h2 | h3 | h4 | h5 | h6",
@@ -336,6 +371,16 @@
336371
"type": "SystemStyleObject"
337372
}
338373
]
374+
},
375+
{
376+
"filePath": "/Users/mperrotti/work-dir/react/packages/react/src/ActionList/Divider.tsx",
377+
"name": "ActionList.Divider",
378+
"props": [
379+
{
380+
"name": "sx",
381+
"type": "SystemStyleObject"
382+
}
383+
]
339384
}
340385
]
341-
}
386+
}

packages/react/src/ActionMenu/ActionMenu.docs.json

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,29 @@
33
"name": "ActionMenu",
44
"status": "beta",
55
"a11yReviewed": false,
6-
"stories": [],
6+
"stories": [
7+
{
8+
"id": "components-actionmenu--default"
9+
},
10+
{
11+
"id": "components-actionmenu-features--links-and-actions"
12+
},
13+
{
14+
"id": "components-actionmenu-features--single-select"
15+
},
16+
{
17+
"id": "components-actionmenu-features--multi-select"
18+
},
19+
{
20+
"id": "components-actionmenu-features--inactive-items"
21+
},
22+
{
23+
"id": "components-actionmenu-features--loading-items"
24+
},
25+
{
26+
"id": "components-actionmenu-features--submenus"
27+
}
28+
],
729
"importPath": "@primer/react",
830
"props": [
931
{
@@ -58,6 +80,12 @@
5880
"defaultValue": "",
5981
"required": true,
6082
"description": "Accepts a single child element"
83+
},
84+
{
85+
"name": "id",
86+
"type": "string",
87+
"description": "",
88+
"defaultValue": ""
6189
}
6290
]
6391
},
@@ -82,6 +110,13 @@
82110
"type": "| 'inside-top' | 'inside-bottom' | 'inside-left' | 'inside-right' | 'inside-center' | 'outside-top' | 'outside-bottom' | 'outside-left' | 'outside-right'",
83111
"defaultValue": "'outside-bottom'",
84112
"description": "Controls which side of the anchor the menu will appear"
113+
},
114+
{
115+
"name": "data-test-id",
116+
"type": "unknown",
117+
"required": false,
118+
"description": "ID to use for React testing utilities.",
119+
"defaultValue": ""
85120
}
86121
],
87122
"passthrough": {

packages/react/src/AnchoredOverlay/AnchoredOverlay.docs.json

Lines changed: 54 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,56 @@
33
"name": "AnchoredOverlay",
44
"status": "alpha",
55
"a11yReviewed": false,
6-
"stories": [],
6+
"stories": [
7+
{
8+
"id": "components-anchoredoverlay--default"
9+
},
10+
{
11+
"id": "components-anchoredoverlay-features--portal-inside-scrolling-element"
12+
},
13+
{
14+
"id": "components-anchoredoverlay-features--custom-anchor-id"
15+
},
16+
{
17+
"id": "components-anchoredoverlay-features--height"
18+
},
19+
{
20+
"id": "components-anchoredoverlay-features--width"
21+
},
22+
{
23+
"id": "components-anchoredoverlay-features--anchor-alignment"
24+
},
25+
{
26+
"id": "components-anchoredoverlay-features--anchor-side"
27+
},
28+
{
29+
"id": "components-anchoredoverlay-features--offset-position-from-anchor"
30+
},
31+
{
32+
"id": "components-anchoredoverlay-features--offset-alignment-from-anchor"
33+
},
34+
{
35+
"id": "components-anchoredoverlay-features--focus-trap-overrides"
36+
},
37+
{
38+
"id": "components-anchoredoverlay-features--focus-zone-overrides"
39+
},
40+
{
41+
"id": "components-anchoredoverlay-features--overlay-props-overrides"
42+
}
43+
],
744
"importPath": "@primer/react",
845
"props": [
946
{
1047
"name": "open",
1148
"type": "boolean",
49+
"required": true,
1250
"defaultValue": "false",
1351
"description": "Determines whether the overlay portion of the component should be shown or not."
1452
},
1553
{
1654
"name": "onOpen",
17-
"type": "(gesture: 'anchor-click' | 'anchor-key-press') => unknown",
55+
"type": "(gesture: 'anchor-click' | 'anchor-key-press', event?: KeyboardEvent<HTMLElement> | undefined) => unknown",
1856
"defaultValue": "",
1957
"description": "A callback that is called whenever the overlay is currently closed and an \"open gesture\" is detected."
2058
},
@@ -95,6 +133,20 @@
95133
"type": "boolean",
96134
"defaultValue": "true",
97135
"description": "Determines if the Overlay width should be adjusted responsively if there is not enough space to display the Overlay. If `preventOverflow` is set to `false`, the Overlay will be displayed at the maximum width that fits within the viewport."
136+
},
137+
{
138+
"name": "height",
139+
"type": "'small' | 'initial' | 'large' | 'medium' | 'auto' | 'fit-content' | 'xsmall' | 'xlarge'",
140+
"required": false,
141+
"description": "",
142+
"defaultValue": ""
143+
},
144+
{
145+
"name": "width",
146+
"type": "'small' | 'large' | 'medium' | 'auto' | 'xlarge' | 'xxlarge'",
147+
"required": false,
148+
"description": "",
149+
"defaultValue": ""
98150
}
99151
]
100152
}

packages/react/src/Autocomplete/Autocomplete.docs.json

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,52 @@
33
"name": "Autocomplete",
44
"status": "alpha",
55
"a11yReviewed": false,
6-
"stories": [],
6+
"stories": [
7+
{
8+
"id": "components-autocomplete--default"
9+
},
10+
{
11+
"id": "components-autocomplete-features--with-token-input"
12+
},
13+
{
14+
"id": "components-autocomplete-features--add-new-item"
15+
},
16+
{
17+
"id": "components-autocomplete-features--custom-search-filter-fn"
18+
},
19+
{
20+
"id": "components-autocomplete-features--custom-sort-after-menu-close"
21+
},
22+
{
23+
"id": "components-autocomplete-features--with-callback-when-overlay-open-state-changes"
24+
},
25+
{
26+
"id": "components-autocomplete-features--async-loading-of-items"
27+
},
28+
{
29+
"id": "components-autocomplete-features--rendering-the-menu-outside-an-overlay"
30+
},
31+
{
32+
"id": "components-autocomplete-features--custom-overlay-menu-anchor"
33+
},
34+
{
35+
"id": "components-autocomplete-features--in-overlay-with-custom-scroll-container-ref"
36+
},
37+
{
38+
"id": "components-autocomplete-features--in-a-dialog"
39+
}
40+
],
741
"importPath": "@primer/react",
842
"props": [
943
{
1044
"name": "children",
1145
"type": "React.ReactNode"
46+
},
47+
{
48+
"name": "id",
49+
"type": "string",
50+
"description": "May be used to customize how the ID is set on the text input to be used by ARIA attributes on related elements.",
51+
"defaultValue": ""
1252
}
1353
],
1454
"subcomponents": [
@@ -68,7 +108,7 @@
68108
{
69109
"name": "selectedItemIds",
70110
"required": true,
71-
"type": "(string | number)[]",
111+
"type": "string[]",
72112
"description": "The IDs of the selected items"
73113
},
74114
{

0 commit comments

Comments
 (0)