Skip to content

Commit 83d66a1

Browse files
authored
Merge branch 'main' into dependabot/npm_and_yarn/github/combobox-nav-2.1.7
2 parents ad70e1d + 9f731ee commit 83d66a1

File tree

11 files changed

+1657
-11
lines changed

11 files changed

+1657
-11
lines changed

.changeset/ten-peaches-breathe.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"@primer/react": patch
3+
---
4+
5+
Fix `useDynamicTextareaHeight` not taking into account top padding of `textarea`
6+
7+
Also makes the hook accept a `RefObject` instead of an element instance

.storybook/preview.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ export const parameters = {
2929
root: '#html-addon-root',
3030
removeEmptyComments: true,
3131
},
32+
controls: {
33+
hideNoControlsWarning: true,
34+
},
3235
options: {
3336
storySort: (a, b) => {
3437
const defaultOrder = [

docs/content/drafts/DataTable.mdx

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
---
2+
title: DataTable
3+
componentId: data_table
4+
status: Draft
5+
---
6+
7+
import data from '../../../src/DataTable/DataTable.docs.json'
8+
9+
## Examples
10+
11+
```jsx
12+
<DataTable
13+
title="Repositories"
14+
data={[
15+
{
16+
id: 1,
17+
name: 'codeql-dca-worker',
18+
type: 'internal',
19+
securityFeatures: {
20+
dependabot: ['alerts', 'security updates'],
21+
},
22+
},
23+
{
24+
id: 2,
25+
name: 'aegir',
26+
type: 'public',
27+
securityFeatures: {
28+
dependabot: ['alerts'],
29+
},
30+
},
31+
{
32+
id: 3,
33+
name: 'strapi',
34+
type: 'public',
35+
securityFeatures: {
36+
dependabot: [],
37+
},
38+
},
39+
]}
40+
columns={[
41+
{
42+
header: 'Repository',
43+
field: 'name',
44+
rowHeader: true,
45+
},
46+
{
47+
header: 'Type',
48+
field: 'type',
49+
renderCell: row => {
50+
return <Label>{uppercase(row.type)}</Label>
51+
},
52+
},
53+
{
54+
header: 'Dependabot',
55+
renderCell: row => {
56+
return row.securityFeatures.dependabot.length > 0 ? (
57+
<LabelGroup>
58+
{row.securityFeatures.dependabot.map(feature => {
59+
return <Label key={feature}>{uppercase(feature)}</Label>
60+
})}
61+
</LabelGroup>
62+
) : null
63+
},
64+
},
65+
]}
66+
/>
67+
```
68+
69+
## Props
70+
71+
<ComponentProps data={data} />
72+
73+
## Status
74+
75+
<ComponentChecklist
76+
items={{
77+
propsDocumented: false,
78+
noUnnecessaryDeps: false,
79+
adaptsToThemes: false,
80+
adaptsToScreenSizes: false,
81+
fullTestCoverage: false,
82+
usedInProduction: false,
83+
usageExamplesDocumented: false,
84+
hasStorybookStories: false,
85+
designReviewed: false,
86+
a11yReviewed: false,
87+
stableApi: false,
88+
addressedApiFeedback: false,
89+
hasDesignGuidelines: false,
90+
hasFigmaComponent: false,
91+
}}
92+
/>

generated/components.json

Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2586,6 +2586,153 @@
25862586
],
25872587
"subcomponents": []
25882588
},
2589+
"data_table": {
2590+
"id": "data_table",
2591+
"name": "DataTable",
2592+
"status": "draft",
2593+
"a11yReviewed": false,
2594+
"stories": [],
2595+
"props": [
2596+
{
2597+
"name": "aria-describedby",
2598+
"type": "string",
2599+
"description": "Provide an id to an element which uniquely describes this table"
2600+
},
2601+
{
2602+
"name": "aria-labelledby",
2603+
"type": "string",
2604+
"description": "Provide an id to an element which uniquely labels this table"
2605+
},
2606+
{
2607+
"name": "data",
2608+
"type": "Array<Data>",
2609+
"description": "Provide a collection of the rows which will be rendered inside of the table"
2610+
},
2611+
{
2612+
"name": "columns",
2613+
"type": "Array<Column<Data>>",
2614+
"description": "Provide the columns for the table and the fields in `data` to which they correspond"
2615+
},
2616+
{
2617+
"name": "cellPadding",
2618+
"type": "'condensed' | 'normal' | 'spacious'",
2619+
"description": "Specify the amount of space that should be available around the contents of a cell"
2620+
}
2621+
],
2622+
"subcomponents": [
2623+
{
2624+
"name": "Table",
2625+
"props": [
2626+
{
2627+
"name": "aria-describedby",
2628+
"type": "string",
2629+
"description": "Provide an id to an element which uniquely describes this table"
2630+
},
2631+
{
2632+
"name": "aria-labelledby",
2633+
"type": "string",
2634+
"description": "Provide an id to an element which uniquely labels this table"
2635+
},
2636+
{
2637+
"name": "children",
2638+
"type": "React.ReactNode"
2639+
},
2640+
{
2641+
"name": "cellPadding",
2642+
"type": "'condensed' | 'normal' | 'spacious'",
2643+
"description": "Specify the amount of space that should be available around the contents of a cell"
2644+
}
2645+
]
2646+
},
2647+
{
2648+
"name": "TableHead",
2649+
"props": [
2650+
{
2651+
"name": "children",
2652+
"type": "React.ReactNode"
2653+
}
2654+
]
2655+
},
2656+
{
2657+
"name": "TableBody",
2658+
"props": [
2659+
{
2660+
"name": "children",
2661+
"type": "React.ReactNode"
2662+
}
2663+
]
2664+
},
2665+
{
2666+
"name": "TableRow",
2667+
"props": [
2668+
{
2669+
"name": "children",
2670+
"type": "React.ReactNode"
2671+
}
2672+
]
2673+
},
2674+
{
2675+
"name": "TableHeader",
2676+
"props": [
2677+
{
2678+
"name": "children",
2679+
"type": "React.ReactNode"
2680+
}
2681+
]
2682+
},
2683+
{
2684+
"name": "TableCell",
2685+
"props": [
2686+
{
2687+
"name": "children",
2688+
"type": "React.ReactNode"
2689+
},
2690+
{
2691+
"name": "scope",
2692+
"type": "string",
2693+
"description": "Provide the scope for a table cell, useful for defining a row header using `scope=\"row\"`"
2694+
}
2695+
]
2696+
},
2697+
{
2698+
"name": "TableContainer",
2699+
"props": [
2700+
{
2701+
"name": "children",
2702+
"type": "React.ReactNode"
2703+
}
2704+
]
2705+
},
2706+
{
2707+
"name": "TableTitle",
2708+
"props": [
2709+
{
2710+
"name": "children",
2711+
"type": "React.ReactNode"
2712+
},
2713+
{
2714+
"name": "id",
2715+
"type": "string",
2716+
"required": true
2717+
}
2718+
]
2719+
},
2720+
{
2721+
"name": "TableSubtitle",
2722+
"props": [
2723+
{
2724+
"name": "children",
2725+
"type": "React.ReactNode"
2726+
},
2727+
{
2728+
"name": "id",
2729+
"type": "string",
2730+
"required": true
2731+
}
2732+
]
2733+
}
2734+
]
2735+
},
25892736
"drafts_dialog": {
25902737
"id": "drafts_dialog",
25912738
"name": "Dialog",

0 commit comments

Comments
 (0)