@primer/react 38.47.0-rc.6f1dd6463 → 38.47.0-rc.bc5d8a965

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 CHANGED
@@ -4,6 +4,8 @@
4
4
 
5
5
  ### Minor Changes
6
6
 
7
+ - [#8688](https://github.com/primer/react/pull/8688) [`92a1fca`](https://github.com/primer/react/commit/92a1fca80cd63c2b729141a38a4a93ec27c47a43) Thanks [@rickyzhangca](https://github.com/rickyzhangca)! - DataTable: Describe group selection checkboxes with the member count. Add count-label formatters for localizing checkbox and disclosure descriptions in DataTable and Table.Group.
8
+
7
9
  - [#8563](https://github.com/primer/react/pull/8563) [`998b471`](https://github.com/primer/react/commit/998b471a4ad78c7c23426038ef0c4a5261fc41cf) Thanks [@joshblack](https://github.com/joshblack)! - ActionMenu: Improve rendering performance with React Compiler support.
8
10
 
9
11
  ### Patch Changes
@@ -90,6 +90,7 @@ type DataTableBaseProps<Data extends UniqueRow> = {
90
90
  * Whether groups have disclosure controls. Groups are expanded by default.
91
91
  */
92
92
  collapsibleGroups?: boolean;
93
+ getGroupRowCountLabel?: (rowCount: number) => string;
93
94
  /**
94
95
  * Controls the expanded group IDs.
95
96
  */
@@ -12,8 +12,8 @@ function defaultGetRowId(row) {
12
12
  return row.id;
13
13
  }
14
14
  function DataTableImplementation(t0) {
15
- const $ = c(72);
16
- const { "aria-labelledby": labelledby, "aria-describedby": describedby, cellPadding, columns, data, initialSortColumn, initialSortDirection, externalSorting, getRowId: t1, onToggleSort, rowSelection: t2, selectedRows, defaultSelectedRows, onSelectionChange, isRowSelectable, collapsibleGroups: t3, expandedGroups, defaultExpandedGroups, onExpandedGroupsChange, renderBulkActions, bulkActionsProps, bulkActionsReturnFocusRef } = t0;
15
+ const $ = c(74);
16
+ const { "aria-labelledby": labelledby, "aria-describedby": describedby, cellPadding, columns, data, initialSortColumn, initialSortDirection, externalSorting, getRowId: t1, onToggleSort, rowSelection: t2, selectedRows, defaultSelectedRows, onSelectionChange, isRowSelectable, collapsibleGroups: t3, getGroupRowCountLabel, expandedGroups, defaultExpandedGroups, onExpandedGroupsChange, renderBulkActions, bulkActionsProps, bulkActionsReturnFocusRef } = t0;
17
17
  const getRowId = t1 === void 0 ? defaultGetRowId : t1;
18
18
  const rowSelection = t2 === void 0 ? false : t2;
19
19
  const collapsibleGroups = t3 === void 0 ? false : t3;
@@ -215,13 +215,14 @@ function DataTableImplementation(t0) {
215
215
  $[50] = t12;
216
216
  } else t12 = $[50];
217
217
  let t13;
218
- if ($[51] !== actions || $[52] !== bodies || $[53] !== collapsibleGroups || $[54] !== headers.length || $[55] !== renderRow || $[56] !== rowSelection) {
218
+ if ($[51] !== actions || $[52] !== bodies || $[53] !== collapsibleGroups || $[54] !== getGroupRowCountLabel || $[55] !== headers.length || $[56] !== renderRow || $[57] !== rowSelection) {
219
219
  let t14;
220
- if ($[58] !== actions || $[59] !== collapsibleGroups || $[60] !== headers.length || $[61] !== renderRow || $[62] !== rowSelection) {
220
+ if ($[59] !== actions || $[60] !== collapsibleGroups || $[61] !== getGroupRowCountLabel || $[62] !== headers.length || $[63] !== renderRow || $[64] !== rowSelection) {
221
221
  t14 = (body) => body.type === "row-group" ? /* @__PURE__ */ jsx(TableGroup, {
222
222
  id: body.id,
223
223
  label: body.label,
224
224
  rowCount: body.rows.length,
225
+ getRowCountLabel: getGroupRowCountLabel,
225
226
  colSpan: headers.length + (rowSelection ? 1 : 0),
226
227
  "aria-label": body["aria-label"],
227
228
  collapsible: collapsibleGroups,
@@ -236,24 +237,26 @@ function DataTableImplementation(t0) {
236
237
  },
237
238
  children: body.rows.map(renderRow)
238
239
  }, body.key) : /* @__PURE__ */ jsx(TableBody, { children: body.rows.map(renderRow) }, body.key);
239
- $[58] = actions;
240
- $[59] = collapsibleGroups;
241
- $[60] = headers.length;
242
- $[61] = renderRow;
243
- $[62] = rowSelection;
244
- $[63] = t14;
245
- } else t14 = $[63];
240
+ $[59] = actions;
241
+ $[60] = collapsibleGroups;
242
+ $[61] = getGroupRowCountLabel;
243
+ $[62] = headers.length;
244
+ $[63] = renderRow;
245
+ $[64] = rowSelection;
246
+ $[65] = t14;
247
+ } else t14 = $[65];
246
248
  t13 = bodies.map(t14);
247
249
  $[51] = actions;
248
250
  $[52] = bodies;
249
251
  $[53] = collapsibleGroups;
250
- $[54] = headers.length;
251
- $[55] = renderRow;
252
- $[56] = rowSelection;
253
- $[57] = t13;
254
- } else t13 = $[57];
252
+ $[54] = getGroupRowCountLabel;
253
+ $[55] = headers.length;
254
+ $[56] = renderRow;
255
+ $[57] = rowSelection;
256
+ $[58] = t13;
257
+ } else t13 = $[58];
255
258
  let t14;
256
- if ($[64] !== cellPadding || $[65] !== describedby || $[66] !== gridTemplateColumns || $[67] !== labelledby || $[68] !== t12 || $[69] !== t13 || $[70] !== t6) {
259
+ if ($[66] !== cellPadding || $[67] !== describedby || $[68] !== gridTemplateColumns || $[69] !== labelledby || $[70] !== t12 || $[71] !== t13 || $[72] !== t6) {
257
260
  t14 = /* @__PURE__ */ jsxs(Table, {
258
261
  ref: tableRef,
259
262
  tabIndex: t6,
@@ -263,15 +266,15 @@ function DataTableImplementation(t0) {
263
266
  gridTemplateColumns,
264
267
  children: [t12, t13]
265
268
  });
266
- $[64] = cellPadding;
267
- $[65] = describedby;
268
- $[66] = gridTemplateColumns;
269
- $[67] = labelledby;
270
- $[68] = t12;
271
- $[69] = t13;
272
- $[70] = t6;
273
- $[71] = t14;
274
- } else t14 = $[71];
269
+ $[66] = cellPadding;
270
+ $[67] = describedby;
271
+ $[68] = gridTemplateColumns;
272
+ $[69] = labelledby;
273
+ $[70] = t12;
274
+ $[71] = t13;
275
+ $[72] = t6;
276
+ $[73] = t14;
277
+ } else t14 = $[73];
275
278
  return t14;
276
279
  }
277
280
  const DataTable = DataTableImplementation;
@@ -18,6 +18,7 @@ type TableGroupProps = {
18
18
  * Specify the number of member rows in the group
19
19
  */
20
20
  rowCount: number;
21
+ getRowCountLabel?: (rowCount: number) => string;
21
22
  /**
22
23
  * Provide an accessible name for the group header
23
24
  */
@@ -56,6 +57,7 @@ declare function TableGroup({
56
57
  id,
57
58
  label,
58
59
  rowCount,
60
+ getRowCountLabel,
59
61
  colSpan,
60
62
  children,
61
63
  'aria-label': ariaLabel,
@@ -11,90 +11,97 @@ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
11
11
  import { clsx } from "clsx";
12
12
  import { ChevronRightIcon } from "@primer/octicons-react";
13
13
  //#region src/DataTable/TableGroup.tsx
14
+ function defaultRowCountLabel(rowCount) {
15
+ return `${rowCount} ${rowCount === 1 ? "row" : "rows"}`;
16
+ }
14
17
  function TableGroup(t0) {
15
- const $ = c(71);
16
- const { className, id, label, rowCount, colSpan, children, "aria-label": ariaLabel, collapsible: t1, expanded: controlledExpanded, defaultExpanded: t2, onExpandedChange, selection, selectionDisabled, onToggleSelect } = t0;
17
- const collapsible = t1 === void 0 ? false : t1;
18
- const defaultExpanded = t2 === void 0 ? true : t2;
18
+ const $ = c(79);
19
+ const { className, id, label, rowCount, getRowCountLabel: t1, colSpan, children, "aria-label": ariaLabel, collapsible: t2, expanded: controlledExpanded, defaultExpanded: t3, onExpandedChange, selection, selectionDisabled, onToggleSelect } = t0;
20
+ const getRowCountLabel = t1 === void 0 ? defaultRowCountLabel : t1;
21
+ const collapsible = t2 === void 0 ? false : t2;
22
+ const defaultExpanded = t3 === void 0 ? true : t3;
19
23
  const headerId = useId();
20
24
  const bodyId = useId();
25
+ const countId = useId();
21
26
  const headerRef = useRef(null);
22
- let t3;
27
+ let t4;
23
28
  if ($[0] !== onExpandedChange) {
24
- t3 = (value) => onExpandedChange === null || onExpandedChange === void 0 ? void 0 : onExpandedChange({ expanded: value });
29
+ t4 = (value) => onExpandedChange === null || onExpandedChange === void 0 ? void 0 : onExpandedChange({ expanded: value });
25
30
  $[0] = onExpandedChange;
26
- $[1] = t3;
27
- } else t3 = $[1];
28
- let t4;
29
- if ($[2] !== controlledExpanded || $[3] !== defaultExpanded || $[4] !== t3) {
30
- t4 = {
31
+ $[1] = t4;
32
+ } else t4 = $[1];
33
+ let t5;
34
+ if ($[2] !== controlledExpanded || $[3] !== defaultExpanded || $[4] !== t4) {
35
+ t5 = {
31
36
  name: "Table.Group expanded",
32
37
  value: controlledExpanded,
33
38
  defaultValue: defaultExpanded,
34
- onChange: t3
39
+ onChange: t4
35
40
  };
36
41
  $[2] = controlledExpanded;
37
42
  $[3] = defaultExpanded;
38
- $[4] = t3;
39
- $[5] = t4;
40
- } else t4 = $[5];
41
- const [expanded, setExpanded] = useControllableState(t4);
43
+ $[4] = t4;
44
+ $[5] = t5;
45
+ } else t5 = $[5];
46
+ const [expanded, setExpanded] = useControllableState(t5);
42
47
  const isExpanded = !collapsible || expanded;
43
- let t5;
48
+ let t6;
44
49
  if ($[6] !== headerId) {
45
- t5 = { headerId };
50
+ t6 = { headerId };
46
51
  $[6] = headerId;
47
- $[7] = t5;
48
- } else t5 = $[7];
49
- const contextValue = t5;
50
- let t6;
52
+ $[7] = t6;
53
+ } else t6 = $[7];
54
+ const contextValue = t6;
55
+ let t7;
51
56
  if ($[8] !== isExpanded) {
52
- t6 = (body) => {
57
+ t7 = (body) => {
53
58
  if (!isExpanded && body !== null && body !== void 0 && body.contains(body.ownerDocument.activeElement)) {
54
59
  var _headerRef$current;
55
60
  (_headerRef$current = headerRef.current) === null || _headerRef$current === void 0 || (_headerRef$current = _headerRef$current.querySelector("button")) === null || _headerRef$current === void 0 || _headerRef$current.focus();
56
61
  }
57
62
  };
58
63
  $[8] = isExpanded;
59
- $[9] = t6;
60
- } else t6 = $[9];
61
- const bodyRef = t6;
62
- let t7;
64
+ $[9] = t7;
65
+ } else t7 = $[9];
66
+ const bodyRef = t7;
67
+ let t8;
63
68
  if ($[10] !== className) {
64
- t7 = clsx("TableGroupHeaderBody", Table_module_css_default.TableGroupHeaderBody, className);
69
+ t8 = clsx("TableGroupHeaderBody", Table_module_css_default.TableGroupHeaderBody, className);
65
70
  $[10] = className;
66
- $[11] = t7;
67
- } else t7 = $[11];
68
- let t8;
71
+ $[11] = t8;
72
+ } else t8 = $[11];
73
+ let t9;
69
74
  if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
70
- t8 = clsx("TableGroupHeaderCell", Table_module_css_default.TableGroupHeaderCell);
71
- $[12] = t8;
72
- } else t8 = $[12];
73
- const t9 = collapsible || selection !== void 0 ? ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : label : ariaLabel;
74
- let t10;
75
- if ($[13] !== ariaLabel || $[14] !== label || $[15] !== onToggleSelect || $[16] !== selection || $[17] !== selectionDisabled) {
76
- t10 = selection !== void 0 ? /* @__PURE__ */ jsx(Checkbox, {
75
+ t9 = clsx("TableGroupHeaderCell", Table_module_css_default.TableGroupHeaderCell);
76
+ $[12] = t9;
77
+ } else t9 = $[12];
78
+ const t10 = collapsible || selection !== void 0 ? ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : label : ariaLabel;
79
+ let t11;
80
+ if ($[13] !== ariaLabel || $[14] !== countId || $[15] !== label || $[16] !== onToggleSelect || $[17] !== selection || $[18] !== selectionDisabled) {
81
+ t11 = selection !== void 0 ? /* @__PURE__ */ jsx(Checkbox, {
77
82
  className: Table_module_css_default.TableGroupSelection,
78
83
  checked: selection === "all",
79
84
  indeterminate: selection === "some",
80
85
  disabled: selectionDisabled || !onToggleSelect,
81
86
  "aria-label": `Select ${ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : label}`,
87
+ "aria-describedby": countId,
82
88
  onChange: () => onToggleSelect === null || onToggleSelect === void 0 ? void 0 : onToggleSelect()
83
89
  }) : null;
84
90
  $[13] = ariaLabel;
85
- $[14] = label;
86
- $[15] = onToggleSelect;
87
- $[16] = selection;
88
- $[17] = selectionDisabled;
89
- $[18] = t10;
90
- } else t10 = $[18];
91
- let t11;
92
- if ($[19] !== ariaLabel || $[20] !== bodyId || $[21] !== collapsible || $[22] !== expanded || $[23] !== isExpanded || $[24] !== label || $[25] !== rowCount || $[26] !== setExpanded) {
93
- t11 = collapsible ? /* @__PURE__ */ jsx(Button, {
91
+ $[14] = countId;
92
+ $[15] = label;
93
+ $[16] = onToggleSelect;
94
+ $[17] = selection;
95
+ $[18] = selectionDisabled;
96
+ $[19] = t11;
97
+ } else t11 = $[19];
98
+ let t12;
99
+ if ($[20] !== ariaLabel || $[21] !== bodyId || $[22] !== collapsible || $[23] !== countId || $[24] !== expanded || $[25] !== isExpanded || $[26] !== label || $[27] !== setExpanded) {
100
+ t12 = collapsible ? /* @__PURE__ */ jsx(Button, {
94
101
  className: Table_module_css_default.TableGroupToggle,
95
102
  "data-component": "Table.Group.Toggle",
96
103
  "aria-label": ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : label,
97
- "aria-description": `${rowCount} ${rowCount === 1 ? "row" : "rows"}`,
104
+ "aria-describedby": countId,
98
105
  "aria-expanded": isExpanded,
99
106
  "aria-controls": bodyId,
100
107
  onClick: () => {
@@ -102,167 +109,185 @@ function TableGroup(t0) {
102
109
  },
103
110
  children: /* @__PURE__ */ jsx(ChevronRightIcon, { "aria-hidden": "true" })
104
111
  }) : null;
105
- $[19] = ariaLabel;
106
- $[20] = bodyId;
107
- $[21] = collapsible;
108
- $[22] = expanded;
109
- $[23] = isExpanded;
110
- $[24] = label;
111
- $[25] = rowCount;
112
- $[26] = setExpanded;
113
- $[27] = t11;
114
- } else t11 = $[27];
115
- let t12;
116
- if ($[28] === Symbol.for("react.memo_cache_sentinel")) {
117
- t12 = clsx("TableGroupHeaderContent", Table_module_css_default.TableGroupHeaderContent);
112
+ $[20] = ariaLabel;
113
+ $[21] = bodyId;
114
+ $[22] = collapsible;
115
+ $[23] = countId;
116
+ $[24] = expanded;
117
+ $[25] = isExpanded;
118
+ $[26] = label;
119
+ $[27] = setExpanded;
118
120
  $[28] = t12;
119
121
  } else t12 = $[28];
120
- const t13 = collapsible || void 0;
121
- let t14;
122
+ let t13;
122
123
  if ($[29] === Symbol.for("react.memo_cache_sentinel")) {
123
- t14 = clsx("TableGroupHeaderLabel", Table_module_css_default.TableGroupHeaderLabel);
124
- $[29] = t14;
125
- } else t14 = $[29];
124
+ t13 = clsx("TableGroupHeaderContent", Table_module_css_default.TableGroupHeaderContent);
125
+ $[29] = t13;
126
+ } else t13 = $[29];
127
+ const t14 = collapsible || void 0;
126
128
  let t15;
127
129
  if ($[30] === Symbol.for("react.memo_cache_sentinel")) {
128
- t15 = /* @__PURE__ */ jsx(VisuallyHidden, { children: "," });
130
+ t15 = clsx("TableGroupHeaderLabel", Table_module_css_default.TableGroupHeaderLabel);
129
131
  $[30] = t15;
130
132
  } else t15 = $[30];
131
133
  let t16;
132
- if ($[31] !== label) {
133
- t16 = /* @__PURE__ */ jsxs("span", {
134
- className: t14,
135
- children: [label, t15]
136
- });
137
- $[31] = label;
138
- $[32] = t16;
139
- } else t16 = $[32];
134
+ if ($[31] === Symbol.for("react.memo_cache_sentinel")) {
135
+ t16 = /* @__PURE__ */ jsx(VisuallyHidden, { children: "," });
136
+ $[31] = t16;
137
+ } else t16 = $[31];
140
138
  let t17;
141
- if ($[33] === Symbol.for("react.memo_cache_sentinel")) {
142
- t17 = clsx("TableGroupHeaderCount", Table_module_css_default.TableGroupHeaderCount);
139
+ if ($[32] !== label) {
140
+ t17 = /* @__PURE__ */ jsxs("span", {
141
+ className: t15,
142
+ children: [label, t16]
143
+ });
144
+ $[32] = label;
143
145
  $[33] = t17;
144
146
  } else t17 = $[33];
145
- const t18 = rowCount === 1 ? " row" : " rows";
146
- let t19;
147
- if ($[34] !== t18) {
148
- t19 = /* @__PURE__ */ jsx(VisuallyHidden, { children: t18 });
147
+ let t18;
148
+ if ($[34] === Symbol.for("react.memo_cache_sentinel")) {
149
+ t18 = clsx("TableGroupHeaderCount", Table_module_css_default.TableGroupHeaderCount);
149
150
  $[34] = t18;
150
- $[35] = t19;
151
- } else t19 = $[35];
151
+ } else t18 = $[34];
152
+ const t19 = rowCount === 1 ? " row" : " rows";
152
153
  let t20;
153
- if ($[36] !== rowCount || $[37] !== t19) {
154
- t20 = /* @__PURE__ */ jsxs("span", {
155
- className: t17,
156
- children: [rowCount, t19]
157
- });
158
- $[36] = rowCount;
159
- $[37] = t19;
160
- $[38] = t20;
161
- } else t20 = $[38];
154
+ if ($[35] !== t19) {
155
+ t20 = /* @__PURE__ */ jsx(VisuallyHidden, { children: t19 });
156
+ $[35] = t19;
157
+ $[36] = t20;
158
+ } else t20 = $[36];
162
159
  let t21;
163
- if ($[39] !== t13 || $[40] !== t16 || $[41] !== t20) {
160
+ if ($[37] !== rowCount || $[38] !== t20) {
164
161
  t21 = /* @__PURE__ */ jsxs("span", {
165
- className: t12,
166
- "aria-hidden": t13,
167
- children: [t16, t20]
162
+ className: t18,
163
+ children: [rowCount, t20]
168
164
  });
169
- $[39] = t13;
170
- $[40] = t16;
171
- $[41] = t20;
172
- $[42] = t21;
173
- } else t21 = $[42];
165
+ $[37] = rowCount;
166
+ $[38] = t20;
167
+ $[39] = t21;
168
+ } else t21 = $[39];
174
169
  let t22;
175
- if ($[43] !== selection || $[44] !== t11 || $[45] !== t21) {
170
+ if ($[40] !== t14 || $[41] !== t17 || $[42] !== t21) {
176
171
  t22 = /* @__PURE__ */ jsxs("span", {
172
+ className: t13,
173
+ "aria-hidden": t14,
174
+ children: [t17, t21]
175
+ });
176
+ $[40] = t14;
177
+ $[41] = t17;
178
+ $[42] = t21;
179
+ $[43] = t22;
180
+ } else t22 = $[43];
181
+ let t23;
182
+ if ($[44] !== selection || $[45] !== t12 || $[46] !== t22) {
183
+ t23 = /* @__PURE__ */ jsxs("span", {
177
184
  className: Table_module_css_default.TableGroupHeaderTitle,
178
185
  "data-selection": selection,
179
- children: [t11, t21]
186
+ children: [t12, t22]
180
187
  });
181
- $[43] = selection;
182
- $[44] = t11;
183
- $[45] = t21;
188
+ $[44] = selection;
189
+ $[45] = t12;
184
190
  $[46] = t22;
185
- } else t22 = $[46];
186
- let t23;
187
- if ($[47] !== colSpan || $[48] !== headerId || $[49] !== t10 || $[50] !== t22 || $[51] !== t9) {
188
- t23 = /* @__PURE__ */ jsx(TableRow, { children: /* @__PURE__ */ jsxs("th", {
191
+ $[47] = t23;
192
+ } else t23 = $[47];
193
+ let t24;
194
+ if ($[48] !== collapsible || $[49] !== countId || $[50] !== getRowCountLabel || $[51] !== rowCount || $[52] !== selection) {
195
+ t24 = collapsible || selection !== void 0 ? /* @__PURE__ */ jsx(VisuallyHidden, {
196
+ id: countId,
197
+ children: getRowCountLabel(rowCount)
198
+ }) : null;
199
+ $[48] = collapsible;
200
+ $[49] = countId;
201
+ $[50] = getRowCountLabel;
202
+ $[51] = rowCount;
203
+ $[52] = selection;
204
+ $[53] = t24;
205
+ } else t24 = $[53];
206
+ let t25;
207
+ if ($[54] !== colSpan || $[55] !== headerId || $[56] !== t10 || $[57] !== t11 || $[58] !== t23 || $[59] !== t24) {
208
+ t25 = /* @__PURE__ */ jsx(TableRow, { children: /* @__PURE__ */ jsxs("th", {
189
209
  id: headerId,
190
210
  ref: headerRef,
191
- className: t8,
211
+ className: t9,
192
212
  scope: "colgroup",
193
213
  colSpan,
194
214
  role: "columnheader",
195
- "aria-label": t9,
215
+ "aria-label": t10,
196
216
  "data-component": "Table.Group.Header",
197
- children: [t10, t22]
217
+ children: [
218
+ t11,
219
+ t23,
220
+ t24
221
+ ]
198
222
  }) });
199
- $[47] = colSpan;
200
- $[48] = headerId;
201
- $[49] = t10;
202
- $[50] = t22;
203
- $[51] = t9;
204
- $[52] = t23;
205
- } else t23 = $[52];
206
- let t24;
207
- if ($[53] !== id || $[54] !== t23 || $[55] !== t7) {
208
- t24 = /* @__PURE__ */ jsx("tbody", {
209
- className: t7,
223
+ $[54] = colSpan;
224
+ $[55] = headerId;
225
+ $[56] = t10;
226
+ $[57] = t11;
227
+ $[58] = t23;
228
+ $[59] = t24;
229
+ $[60] = t25;
230
+ } else t25 = $[60];
231
+ let t26;
232
+ if ($[61] !== id || $[62] !== t25 || $[63] !== t8) {
233
+ t26 = /* @__PURE__ */ jsx("tbody", {
234
+ className: t8,
210
235
  role: "rowgroup",
211
236
  "data-component": "Table.Group",
212
237
  "data-group-id": id,
213
- children: t23
238
+ children: t25
214
239
  });
215
- $[53] = id;
216
- $[54] = t23;
217
- $[55] = t7;
218
- $[56] = t24;
219
- } else t24 = $[56];
220
- const t25 = !isExpanded;
221
- let t26;
222
- if ($[57] === Symbol.for("react.memo_cache_sentinel")) {
223
- t26 = clsx("TableBody", Table_module_css_default.TableBody);
224
- $[57] = t26;
225
- } else t26 = $[57];
226
- const t27 = collapsible ? selection : void 0;
240
+ $[61] = id;
241
+ $[62] = t25;
242
+ $[63] = t8;
243
+ $[64] = t26;
244
+ } else t26 = $[64];
245
+ const t27 = !isExpanded;
227
246
  let t28;
228
- if ($[58] !== children || $[59] !== contextValue) {
229
- t28 = /* @__PURE__ */ jsx(TableGroupContext.Provider, {
247
+ if ($[65] === Symbol.for("react.memo_cache_sentinel")) {
248
+ t28 = clsx("TableBody", Table_module_css_default.TableBody);
249
+ $[65] = t28;
250
+ } else t28 = $[65];
251
+ const t29 = collapsible ? selection : void 0;
252
+ let t30;
253
+ if ($[66] !== children || $[67] !== contextValue) {
254
+ t30 = /* @__PURE__ */ jsx(TableGroupContext.Provider, {
230
255
  value: contextValue,
231
256
  children
232
257
  });
233
- $[58] = children;
234
- $[59] = contextValue;
235
- $[60] = t28;
236
- } else t28 = $[60];
237
- let t29;
238
- if ($[61] !== bodyId || $[62] !== bodyRef || $[63] !== id || $[64] !== t25 || $[65] !== t27 || $[66] !== t28) {
239
- t29 = /* @__PURE__ */ jsx("tbody", {
258
+ $[66] = children;
259
+ $[67] = contextValue;
260
+ $[68] = t30;
261
+ } else t30 = $[68];
262
+ let t31;
263
+ if ($[69] !== bodyId || $[70] !== bodyRef || $[71] !== id || $[72] !== t27 || $[73] !== t29 || $[74] !== t30) {
264
+ t31 = /* @__PURE__ */ jsx("tbody", {
240
265
  id: bodyId,
241
266
  ref: bodyRef,
242
- hidden: t25,
243
- className: t26,
267
+ hidden: t27,
268
+ className: t28,
244
269
  role: "rowgroup",
245
270
  "data-component": "Table.Group.Body",
246
271
  "data-group-id": id,
247
- "data-selection": t27,
248
- children: t28
272
+ "data-selection": t29,
273
+ children: t30
249
274
  });
250
- $[61] = bodyId;
251
- $[62] = bodyRef;
252
- $[63] = id;
253
- $[64] = t25;
254
- $[65] = t27;
255
- $[66] = t28;
256
- $[67] = t29;
257
- } else t29 = $[67];
258
- let t30;
259
- if ($[68] !== t24 || $[69] !== t29) {
260
- t30 = /* @__PURE__ */ jsxs(Fragment$1, { children: [t24, t29] });
261
- $[68] = t24;
262
- $[69] = t29;
263
- $[70] = t30;
264
- } else t30 = $[70];
265
- return t30;
275
+ $[69] = bodyId;
276
+ $[70] = bodyRef;
277
+ $[71] = id;
278
+ $[72] = t27;
279
+ $[73] = t29;
280
+ $[74] = t30;
281
+ $[75] = t31;
282
+ } else t31 = $[75];
283
+ let t32;
284
+ if ($[76] !== t26 || $[77] !== t31) {
285
+ t32 = /* @__PURE__ */ jsxs(Fragment$1, { children: [t26, t31] });
286
+ $[76] = t26;
287
+ $[77] = t31;
288
+ $[78] = t32;
289
+ } else t32 = $[78];
290
+ return t32;
266
291
  }
267
292
  //#endregion
268
293
  export { TableGroup };
@@ -2941,6 +2941,11 @@
2941
2941
  "defaultValue": "false",
2942
2942
  "description": "Enable group disclosures. Collapsing only hides members; selection and select-all still include them."
2943
2943
  },
2944
+ {
2945
+ "name": "getGroupRowCountLabel",
2946
+ "type": "(rowCount: number) => string",
2947
+ "description": "Localize the description shared by each group checkbox and disclosure. The count includes all members, including non-selectable rows, and defaults to 1 row or N rows."
2948
+ },
2944
2949
  {
2945
2950
  "name": "expandedGroups",
2946
2951
  "type": "ReadonlySet<DataTableRowId>",
@@ -3156,12 +3161,17 @@
3156
3161
  {
3157
3162
  "name": "rowCount",
3158
3163
  "type": "number",
3159
- "description": "The number of member rows in the group. Combined with `label` to build the group header's accessible name, for example \"Admins, 2 rows\"."
3164
+ "description": "The total number of member rows, including non-selectable rows. Shown in the header and described separately on the checkbox and disclosure."
3165
+ },
3166
+ {
3167
+ "name": "getRowCountLabel",
3168
+ "type": "(rowCount: number) => string",
3169
+ "description": "Localize the count description shared by the checkbox and disclosure. Defaults to 1 row or N rows."
3160
3170
  },
3161
3171
  {
3162
3172
  "name": "aria-label",
3163
3173
  "type": "string",
3164
- "description": "Override the group header's accessible name, for example to localize its row count description."
3174
+ "description": "Override the group name used by the header, checkbox, and disclosure. Use getRowCountLabel to localize the controls' separate count description."
3165
3175
  },
3166
3176
  {
3167
3177
  "name": "colSpan",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@primer/react",
3
3
  "type": "module",
4
- "version": "38.47.0-rc.6f1dd6463",
4
+ "version": "38.47.0-rc.bc5d8a965",
5
5
  "description": "An implementation of GitHub's Primer Design System using React",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist/index.js",