@wallarm-org/design-system 2.5.0 → 2.6.0

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.
@@ -17,16 +17,17 @@ const toTanStackPinning = (p, pinnedLeft)=>({
17
17
  });
18
18
  const TableProvider = (props)=>{
19
19
  const $ = compiler_runtime_c(168);
20
- const { data, columns, isLoading: t0, isLoadingPrevious: t1, skeletonCount: t2, children, getRowId, sorting: sortingProp, onSortingChange, manualSorting: t3, rowSelection: rowSelectionProp, onRowSelectionChange, enableSelectAllRows: t4, onSelectAllRows, columnSizing: columnSizingProp, onColumnSizingChange, columnPinning: columnPinningProp, onColumnPinningChange, columnOrder: columnOrderProp, onColumnOrderChange, grouping: groupingProp, onGroupingChange, expanded: expandedProp, onExpandedChange, renderGroupRow, groupRowSpan: t5, getSubRows, showEmptyGroups: t6, renderExpandedRow, columnVisibility: columnVisibilityProp, onColumnVisibilityChange, defaultColumnVisibility, defaultColumnOrder, columnGroups, virtualized, stretch: t7, estimateRowHeight, overscan: t8, onEndReached, onEndReachedThreshold, onStartReached, onStartReachedThreshold, initialScrollToRowId, onRowReorder, getRowCanDrag, renderFullWidthRow, onMasterCellClick, activeRowId: activeRowIdProp, onSettingsOpenChange } = props;
20
+ const { data, columns, isLoading: t0, isLoadingPrevious: t1, skeletonCount: t2, children, getRowId, sorting: sortingProp, onSortingChange, manualSorting: t3, rowSelection: rowSelectionProp, onRowSelectionChange, enableSelectAllRows: t4, onSelectAllRows, columnSizing: columnSizingProp, onColumnSizingChange, columnPinning: columnPinningProp, onColumnPinningChange, columnOrder: columnOrderProp, onColumnOrderChange, grouping: groupingProp, onGroupingChange, expanded: expandedProp, onExpandedChange, renderGroupRow, groupRowSpan: t5, groupExpandColumn: t6, getSubRows, showEmptyGroups: t7, renderExpandedRow, columnVisibility: columnVisibilityProp, onColumnVisibilityChange, defaultColumnVisibility, defaultColumnOrder, columnGroups, virtualized, stretch: t8, estimateRowHeight, overscan: t9, onEndReached, onEndReachedThreshold, onStartReached, onStartReachedThreshold, initialScrollToRowId, onRowReorder, getRowCanDrag, renderFullWidthRow, onMasterCellClick, activeRowId: activeRowIdProp, onSettingsOpenChange } = props;
21
21
  const isLoading = void 0 === t0 ? false : t0;
22
22
  const isLoadingPrevious = void 0 === t1 ? false : t1;
23
23
  const skeletonCount = void 0 === t2 ? TABLE_SKELETON_ROWS : t2;
24
24
  const manualSorting = void 0 === t3 ? false : t3;
25
25
  const enableSelectAllRows = void 0 === t4 ? true : t4;
26
26
  const groupRowSpan = void 0 === t5 ? "master" : t5;
27
- const showEmptyGroups = void 0 === t6 ? false : t6;
28
- const stretch = void 0 === t7 ? true : t7;
29
- const overscan = void 0 === t8 ? TABLE_VIRTUALIZATION_OVERSCAN : t8;
27
+ const groupExpandColumn = void 0 === t6 ? false : t6;
28
+ const showEmptyGroups = void 0 === t7 ? false : t7;
29
+ const stretch = void 0 === t8 ? true : t8;
30
+ const overscan = void 0 === t9 ? TABLE_VIRTUALIZATION_OVERSCAN : t9;
30
31
  const masterCellActiveRowId = activeRowIdProp ?? null;
31
32
  const sortingEnabled = !!onSortingChange;
32
33
  const selectionEnabled = !!onRowSelectionChange;
@@ -38,47 +39,51 @@ const TableProvider = (props)=>{
38
39
  const rowDndEnabled = !!onRowReorder;
39
40
  const expandingEnabled = !!renderExpandedRow || !!onExpandedChange || subRowGroupingEnabled;
40
41
  const visibilityEnabled = !!onColumnVisibilityChange;
41
- let t9;
42
- if ($[0] !== columns || $[1] !== data[0] || $[2] !== expandingEnabled || $[3] !== rowDndEnabled || $[4] !== selectionEnabled || $[5] !== subRowGroupingEnabled) {
42
+ const expandColumnEnabled = expandingEnabled && (!subRowGroupingEnabled || groupExpandColumn);
43
+ let t10;
44
+ if ($[0] !== columns || $[1] !== data[0] || $[2] !== expandColumnEnabled || $[3] !== rowDndEnabled || $[4] !== selectionEnabled || $[5] !== subRowGroupingEnabled) {
43
45
  bb0: {
44
46
  const cols = columns;
45
47
  let prefix;
46
- if ($[7] !== expandingEnabled || $[8] !== rowDndEnabled || $[9] !== selectionEnabled || $[10] !== subRowGroupingEnabled) {
48
+ if ($[7] !== expandColumnEnabled || $[8] !== rowDndEnabled || $[9] !== selectionEnabled || $[10] !== subRowGroupingEnabled) {
47
49
  prefix = [];
48
- if (expandingEnabled && !subRowGroupingEnabled) {
49
- let t10;
50
- if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
51
- t10 = createExpandColumn();
52
- $[12] = t10;
53
- } else t10 = $[12];
54
- prefix.push(t10);
50
+ if (expandColumnEnabled) {
51
+ let t11;
52
+ if ($[12] !== subRowGroupingEnabled) {
53
+ t11 = createExpandColumn({
54
+ groupsOnly: subRowGroupingEnabled
55
+ });
56
+ $[12] = subRowGroupingEnabled;
57
+ $[13] = t11;
58
+ } else t11 = $[13];
59
+ prefix.push(t11);
55
60
  }
56
61
  if (selectionEnabled) {
57
- let t10;
58
- if ($[13] === Symbol.for("react.memo_cache_sentinel")) {
59
- t10 = createSelectionColumn();
60
- $[13] = t10;
61
- } else t10 = $[13];
62
- prefix.push(t10);
62
+ let t11;
63
+ if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
64
+ t11 = createSelectionColumn();
65
+ $[14] = t11;
66
+ } else t11 = $[14];
67
+ prefix.push(t11);
63
68
  }
64
69
  if (rowDndEnabled) {
65
- let t10;
66
- if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
67
- t10 = createDragHandleColumn();
68
- $[14] = t10;
69
- } else t10 = $[14];
70
- prefix.push(t10);
70
+ let t11;
71
+ if ($[15] === Symbol.for("react.memo_cache_sentinel")) {
72
+ t11 = createDragHandleColumn();
73
+ $[15] = t11;
74
+ } else t11 = $[15];
75
+ prefix.push(t11);
71
76
  }
72
- $[7] = expandingEnabled;
77
+ $[7] = expandColumnEnabled;
73
78
  $[8] = rowDndEnabled;
74
79
  $[9] = selectionEnabled;
75
80
  $[10] = subRowGroupingEnabled;
76
81
  $[11] = prefix;
77
82
  } else prefix = $[11];
78
83
  const firstRow = data[0];
79
- let t10;
80
- if ($[15] !== firstRow) {
81
- t10 = (col)=>{
84
+ let t11;
85
+ if ($[16] !== firstRow) {
86
+ t11 = (col)=>{
82
87
  if (!firstRow || !("accessorKey" in col) || col.meta?.sortType) return col;
83
88
  const value = firstRow[col.accessorKey];
84
89
  if ("number" == typeof value) return {
@@ -90,17 +95,17 @@ const TableProvider = (props)=>{
90
95
  };
91
96
  return col;
92
97
  };
93
- $[15] = firstRow;
94
- $[16] = t10;
95
- } else t10 = $[16];
96
- const withAutoMeta = cols.map(t10);
98
+ $[16] = firstRow;
99
+ $[17] = t11;
100
+ } else t11 = $[17];
101
+ const withAutoMeta = cols.map(t11);
97
102
  const masterOverrides = {
98
103
  enableColumnPinning: false,
99
104
  enableHiding: false
100
105
  };
101
106
  if (0 === prefix.length) {
102
107
  if (withAutoMeta.length > 0) {
103
- t9 = [
108
+ t10 = [
104
109
  {
105
110
  ...withAutoMeta[0],
106
111
  ...masterOverrides
@@ -109,118 +114,117 @@ const TableProvider = (props)=>{
109
114
  ];
110
115
  break bb0;
111
116
  }
112
- t9 = withAutoMeta;
117
+ t10 = withAutoMeta;
113
118
  break bb0;
114
119
  }
115
120
  const userCols = withAutoMeta.length > 0 ? withAutoMeta.map((col_0, index)=>0 === index ? {
116
121
  ...col_0,
117
122
  ...masterOverrides
118
123
  } : col_0) : withAutoMeta;
119
- t9 = [
124
+ t10 = [
120
125
  ...prefix,
121
126
  ...userCols
122
127
  ];
123
128
  }
124
129
  $[0] = columns;
125
130
  $[1] = data[0];
126
- $[2] = expandingEnabled;
131
+ $[2] = expandColumnEnabled;
127
132
  $[3] = rowDndEnabled;
128
133
  $[4] = selectionEnabled;
129
134
  $[5] = subRowGroupingEnabled;
130
- $[6] = t9;
131
- } else t9 = $[6];
132
- const mergedColumns = t9;
133
- let t10;
135
+ $[6] = t10;
136
+ } else t10 = $[6];
137
+ const mergedColumns = t10;
138
+ let t11;
134
139
  bb1: {
135
140
  if (0 === columns.length) {
136
- t10 = null;
141
+ t11 = null;
137
142
  break bb1;
138
143
  }
139
144
  const firstCol = columns[0];
140
145
  if (!firstCol) {
141
- t10 = null;
146
+ t11 = null;
142
147
  break bb1;
143
148
  }
144
- t10 = ("accessorKey" in firstCol ? String(firstCol.accessorKey) : firstCol.id) ?? null;
149
+ t11 = ("accessorKey" in firstCol ? String(firstCol.accessorKey) : firstCol.id) ?? null;
145
150
  }
146
- const masterColumnId = t10;
151
+ const masterColumnId = t11;
147
152
  let ids;
148
- if ($[17] !== expandingEnabled || $[18] !== masterColumnId || $[19] !== rowDndEnabled || $[20] !== selectionEnabled || $[21] !== subRowGroupingEnabled) {
153
+ if ($[18] !== expandColumnEnabled || $[19] !== masterColumnId || $[20] !== rowDndEnabled || $[21] !== selectionEnabled) {
149
154
  ids = [];
150
- if (expandingEnabled && !subRowGroupingEnabled) ids.push(TABLE_EXPAND_COLUMN_ID);
155
+ if (expandColumnEnabled) ids.push(TABLE_EXPAND_COLUMN_ID);
151
156
  if (selectionEnabled) ids.push(TABLE_SELECT_COLUMN_ID);
152
157
  if (rowDndEnabled) ids.push(TABLE_DRAG_HANDLE_COLUMN_ID);
153
158
  if (masterColumnId) ids.push(masterColumnId);
154
- $[17] = expandingEnabled;
155
- $[18] = masterColumnId;
156
- $[19] = rowDndEnabled;
157
- $[20] = selectionEnabled;
158
- $[21] = subRowGroupingEnabled;
159
+ $[18] = expandColumnEnabled;
160
+ $[19] = masterColumnId;
161
+ $[20] = rowDndEnabled;
162
+ $[21] = selectionEnabled;
159
163
  $[22] = ids;
160
164
  } else ids = $[22];
161
165
  const alwaysPinnedLeft = ids;
162
- let t11;
163
- if ($[23] === Symbol.for("react.memo_cache_sentinel")) {
164
- t11 = [];
165
- $[23] = t11;
166
- } else t11 = $[23];
167
- const [sorting, handleSortingChange] = useTableState(sortingProp, t11, onSortingChange);
168
166
  let t12;
169
- if ($[24] === Symbol.for("react.memo_cache_sentinel")) {
170
- t12 = {};
171
- $[24] = t12;
172
- } else t12 = $[24];
173
- const [rowSelection, handleRowSelectionChange] = useTableState(rowSelectionProp, t12, onRowSelectionChange);
167
+ if ($[23] === Symbol.for("react.memo_cache_sentinel")) {
168
+ t12 = [];
169
+ $[23] = t12;
170
+ } else t12 = $[23];
171
+ const [sorting, handleSortingChange] = useTableState(sortingProp, t12, onSortingChange);
174
172
  let t13;
175
- if ($[25] === Symbol.for("react.memo_cache_sentinel")) {
173
+ if ($[24] === Symbol.for("react.memo_cache_sentinel")) {
176
174
  t13 = {};
177
- $[25] = t13;
178
- } else t13 = $[25];
179
- const [columnSizing, handleColumnSizingChange] = useTableState(columnSizingProp, t13, onColumnSizingChange);
175
+ $[24] = t13;
176
+ } else t13 = $[24];
177
+ const [rowSelection, handleRowSelectionChange] = useTableState(rowSelectionProp, t13, onRowSelectionChange);
180
178
  let t14;
179
+ if ($[25] === Symbol.for("react.memo_cache_sentinel")) {
180
+ t14 = {};
181
+ $[25] = t14;
182
+ } else t14 = $[25];
183
+ const [columnSizing, handleColumnSizingChange] = useTableState(columnSizingProp, t14, onColumnSizingChange);
184
+ let t15;
181
185
  if ($[26] !== defaultColumnOrder) {
182
- t14 = defaultColumnOrder ?? [];
186
+ t15 = defaultColumnOrder ?? [];
183
187
  $[26] = defaultColumnOrder;
184
- $[27] = t14;
185
- } else t14 = $[27];
186
- const [columnOrder, handleColumnOrderChange] = useTableState(columnOrderProp, t14, onColumnOrderChange);
187
- let t15;
188
- if ($[28] === Symbol.for("react.memo_cache_sentinel")) {
189
- t15 = [];
190
- $[28] = t15;
191
- } else t15 = $[28];
192
- const [grouping, handleGroupingChange] = useTableState(groupingProp, t15, onGroupingChange);
188
+ $[27] = t15;
189
+ } else t15 = $[27];
190
+ const [columnOrder, handleColumnOrderChange] = useTableState(columnOrderProp, t15, onColumnOrderChange);
193
191
  let t16;
194
- if ($[29] === Symbol.for("react.memo_cache_sentinel")) {
195
- t16 = {};
196
- $[29] = t16;
197
- } else t16 = $[29];
198
- const [expanded, handleExpandedChange] = useTableState(expandedProp, t16, onExpandedChange);
192
+ if ($[28] === Symbol.for("react.memo_cache_sentinel")) {
193
+ t16 = [];
194
+ $[28] = t16;
195
+ } else t16 = $[28];
196
+ const [grouping, handleGroupingChange] = useTableState(groupingProp, t16, onGroupingChange);
199
197
  let t17;
198
+ if ($[29] === Symbol.for("react.memo_cache_sentinel")) {
199
+ t17 = {};
200
+ $[29] = t17;
201
+ } else t17 = $[29];
202
+ const [expanded, handleExpandedChange] = useTableState(expandedProp, t17, onExpandedChange);
203
+ let t18;
200
204
  if ($[30] !== defaultColumnVisibility) {
201
- t17 = defaultColumnVisibility ?? {};
205
+ t18 = defaultColumnVisibility ?? {};
202
206
  $[30] = defaultColumnVisibility;
203
- $[31] = t17;
204
- } else t17 = $[31];
205
- const [columnVisibility, handleColumnVisibilityChange] = useTableState(columnVisibilityProp, t17, onColumnVisibilityChange);
206
- let t18;
207
- if ($[32] === Symbol.for("react.memo_cache_sentinel")) {
208
- t18 = {};
209
- $[32] = t18;
210
- } else t18 = $[32];
207
+ $[31] = t18;
208
+ } else t18 = $[31];
209
+ const [columnVisibility, handleColumnVisibilityChange] = useTableState(columnVisibilityProp, t18, onColumnVisibilityChange);
211
210
  let t19;
211
+ if ($[32] === Symbol.for("react.memo_cache_sentinel")) {
212
+ t19 = {};
213
+ $[32] = t19;
214
+ } else t19 = $[32];
215
+ let t20;
212
216
  if ($[33] !== columnPinningProp) {
213
- t19 = {
217
+ t20 = {
214
218
  controlled: columnPinningProp,
215
- default: t18
219
+ default: t19
216
220
  };
217
221
  $[33] = columnPinningProp;
218
- $[34] = t19;
219
- } else t19 = $[34];
220
- const [columnPinning, setColumnPinningInternal] = useControlled(t19);
221
- let t20;
222
+ $[34] = t20;
223
+ } else t20 = $[34];
224
+ const [columnPinning, setColumnPinningInternal] = useControlled(t20);
225
+ let t21;
222
226
  if ($[35] !== alwaysPinnedLeft || $[36] !== columnPinning || $[37] !== onColumnPinningChange || $[38] !== setColumnPinningInternal) {
223
- t20 = (updater)=>{
227
+ t21 = (updater)=>{
224
228
  const prevTanStackShape = toTanStackPinning(columnPinning, alwaysPinnedLeft);
225
229
  const newValue = "function" == typeof updater ? updater(prevTanStackShape) : updater;
226
230
  const enforcedStart = [
@@ -238,12 +242,12 @@ const TableProvider = (props)=>{
238
242
  $[36] = columnPinning;
239
243
  $[37] = onColumnPinningChange;
240
244
  $[38] = setColumnPinningInternal;
241
- $[39] = t20;
242
- } else t20 = $[39];
243
- const handleColumnPinningChange = t20;
244
- let t21;
245
+ $[39] = t21;
246
+ } else t21 = $[39];
247
+ const handleColumnPinningChange = t21;
248
+ let t22;
245
249
  if ($[40] !== alwaysPinnedLeft || $[41] !== handleColumnOrderChange) {
246
- t21 = (newOrder)=>{
250
+ t22 = (newOrder)=>{
247
251
  const rest = newOrder.filter((id_0)=>!alwaysPinnedLeft.includes(id_0));
248
252
  handleColumnOrderChange([
249
253
  ...alwaysPinnedLeft,
@@ -252,142 +256,142 @@ const TableProvider = (props)=>{
252
256
  };
253
257
  $[40] = alwaysPinnedLeft;
254
258
  $[41] = handleColumnOrderChange;
255
- $[42] = t21;
256
- } else t21 = $[42];
257
- const setColumnOrder = t21;
258
- let t22;
259
+ $[42] = t22;
260
+ } else t22 = $[42];
261
+ const setColumnOrder = t22;
262
+ let t23;
259
263
  if ($[43] !== sorting) {
260
- t22 = sorting ?? [];
264
+ t23 = sorting ?? [];
261
265
  $[43] = sorting;
262
- $[44] = t22;
263
- } else t22 = $[44];
264
- let t23;
266
+ $[44] = t23;
267
+ } else t23 = $[44];
268
+ let t24;
265
269
  if ($[45] !== rowSelection) {
266
- t23 = rowSelection ?? {};
270
+ t24 = rowSelection ?? {};
267
271
  $[45] = rowSelection;
268
- $[46] = t23;
269
- } else t23 = $[46];
270
- let t24;
272
+ $[46] = t24;
273
+ } else t24 = $[46];
274
+ let t25;
271
275
  if ($[47] !== columnSizing) {
272
- t24 = columnSizing ?? {};
276
+ t25 = columnSizing ?? {};
273
277
  $[47] = columnSizing;
274
- $[48] = t24;
275
- } else t24 = $[48];
276
- let t25;
278
+ $[48] = t25;
279
+ } else t25 = $[48];
280
+ let t26;
277
281
  if ($[49] !== alwaysPinnedLeft || $[50] !== columnPinning) {
278
- t25 = toTanStackPinning(columnPinning, alwaysPinnedLeft);
282
+ t26 = toTanStackPinning(columnPinning, alwaysPinnedLeft);
279
283
  $[49] = alwaysPinnedLeft;
280
284
  $[50] = columnPinning;
281
- $[51] = t25;
282
- } else t25 = $[51];
283
- let t26;
285
+ $[51] = t26;
286
+ } else t26 = $[51];
287
+ let t27;
284
288
  if ($[52] !== columnOrder) {
285
- t26 = columnOrder ?? [];
289
+ t27 = columnOrder ?? [];
286
290
  $[52] = columnOrder;
287
- $[53] = t26;
288
- } else t26 = $[53];
289
- let t27;
291
+ $[53] = t27;
292
+ } else t27 = $[53];
293
+ let t28;
290
294
  if ($[54] !== grouping) {
291
- t27 = grouping ?? [];
295
+ t28 = grouping ?? [];
292
296
  $[54] = grouping;
293
- $[55] = t27;
294
- } else t27 = $[55];
295
- let t28;
297
+ $[55] = t28;
298
+ } else t28 = $[55];
299
+ let t29;
296
300
  if ($[56] !== expanded) {
297
- t28 = expanded ?? {};
301
+ t29 = expanded ?? {};
298
302
  $[56] = expanded;
299
- $[57] = t28;
300
- } else t28 = $[57];
301
- let t29;
303
+ $[57] = t29;
304
+ } else t29 = $[57];
305
+ let t30;
302
306
  if ($[58] !== columnVisibility) {
303
- t29 = columnVisibility ?? {};
307
+ t30 = columnVisibility ?? {};
304
308
  $[58] = columnVisibility;
305
- $[59] = t29;
306
- } else t29 = $[59];
307
- let t30;
308
- if ($[60] !== t22 || $[61] !== t23 || $[62] !== t24 || $[63] !== t25 || $[64] !== t26 || $[65] !== t27 || $[66] !== t28 || $[67] !== t29) {
309
- t30 = {
310
- sorting: t22,
311
- rowSelection: t23,
312
- columnSizing: t24,
313
- columnPinning: t25,
314
- columnOrder: t26,
315
- grouping: t27,
316
- expanded: t28,
317
- columnVisibility: t29
309
+ $[59] = t30;
310
+ } else t30 = $[59];
311
+ let t31;
312
+ if ($[60] !== t23 || $[61] !== t24 || $[62] !== t25 || $[63] !== t26 || $[64] !== t27 || $[65] !== t28 || $[66] !== t29 || $[67] !== t30) {
313
+ t31 = {
314
+ sorting: t23,
315
+ rowSelection: t24,
316
+ columnSizing: t25,
317
+ columnPinning: t26,
318
+ columnOrder: t27,
319
+ grouping: t28,
320
+ expanded: t29,
321
+ columnVisibility: t30
318
322
  };
319
- $[60] = t22;
320
- $[61] = t23;
321
- $[62] = t24;
322
- $[63] = t25;
323
- $[64] = t26;
324
- $[65] = t27;
325
- $[66] = t28;
326
- $[67] = t29;
327
- $[68] = t30;
328
- } else t30 = $[68];
329
- const t31 = sortingEnabled ? handleSortingChange : void 0;
330
- const t32 = selectionEnabled ? handleRowSelectionChange : void 0;
331
- const t33 = resizingEnabled ? handleColumnSizingChange : void 0;
332
- const t34 = pinningEnabled ? handleColumnPinningChange : void 0;
333
- const t35 = columnDndEnabled ? handleColumnOrderChange : void 0;
334
- const t36 = groupingEnabled ? handleGroupingChange : void 0;
335
- const t37 = expandingEnabled ? handleExpandedChange : void 0;
336
- const t38 = visibilityEnabled ? handleColumnVisibilityChange : void 0;
337
- let t39;
323
+ $[60] = t23;
324
+ $[61] = t24;
325
+ $[62] = t25;
326
+ $[63] = t26;
327
+ $[64] = t27;
328
+ $[65] = t28;
329
+ $[66] = t29;
330
+ $[67] = t30;
331
+ $[68] = t31;
332
+ } else t31 = $[68];
333
+ const t32 = sortingEnabled ? handleSortingChange : void 0;
334
+ const t33 = selectionEnabled ? handleRowSelectionChange : void 0;
335
+ const t34 = resizingEnabled ? handleColumnSizingChange : void 0;
336
+ const t35 = pinningEnabled ? handleColumnPinningChange : void 0;
337
+ const t36 = columnDndEnabled ? handleColumnOrderChange : void 0;
338
+ const t37 = groupingEnabled ? handleGroupingChange : void 0;
339
+ const t38 = expandingEnabled ? handleExpandedChange : void 0;
340
+ const t39 = visibilityEnabled ? handleColumnVisibilityChange : void 0;
341
+ let t40;
338
342
  if ($[69] !== expandingEnabled) {
339
- t39 = expandingEnabled ? {
343
+ t40 = expandingEnabled ? {
340
344
  autoResetExpanded: false
341
345
  } : {};
342
346
  $[69] = expandingEnabled;
343
- $[70] = t39;
344
- } else t39 = $[70];
345
- let t40;
347
+ $[70] = t40;
348
+ } else t40 = $[70];
349
+ let t41;
346
350
  if ($[71] !== expandingEnabled || $[72] !== renderExpandedRow || $[73] !== subRowGroupingEnabled) {
347
- t40 = expandingEnabled && (renderExpandedRow || subRowGroupingEnabled) ? {
351
+ t41 = expandingEnabled && (renderExpandedRow || subRowGroupingEnabled) ? {
348
352
  getRowCanExpand: _temp
349
353
  } : {};
350
354
  $[71] = expandingEnabled;
351
355
  $[72] = renderExpandedRow;
352
356
  $[73] = subRowGroupingEnabled;
353
- $[74] = t40;
354
- } else t40 = $[74];
355
- let t41;
357
+ $[74] = t41;
358
+ } else t41 = $[74];
359
+ let t42;
356
360
  if ($[75] === Symbol.for("react.memo_cache_sentinel")) {
357
- t41 = {
361
+ t42 = {
358
362
  minSize: TABLE_MIN_COLUMN_WIDTH
359
363
  };
360
- $[75] = t41;
361
- } else t41 = $[75];
362
- let t42;
363
- if ($[76] !== data || $[77] !== expandingEnabled || $[78] !== getRowId || $[79] !== getSubRows || $[80] !== groupingEnabled || $[81] !== manualSorting || $[82] !== mergedColumns || $[83] !== resizingEnabled || $[84] !== selectionEnabled || $[85] !== sortingEnabled || $[86] !== t30 || $[87] !== t31 || $[88] !== t32 || $[89] !== t33 || $[90] !== t34 || $[91] !== t35 || $[92] !== t36 || $[93] !== t37 || $[94] !== t38 || $[95] !== t39 || $[96] !== t40 || $[97] !== visibilityEnabled) {
364
- t42 = {
364
+ $[75] = t42;
365
+ } else t42 = $[75];
366
+ let t43;
367
+ if ($[76] !== data || $[77] !== expandingEnabled || $[78] !== getRowId || $[79] !== getSubRows || $[80] !== groupingEnabled || $[81] !== manualSorting || $[82] !== mergedColumns || $[83] !== resizingEnabled || $[84] !== selectionEnabled || $[85] !== sortingEnabled || $[86] !== t31 || $[87] !== t32 || $[88] !== t33 || $[89] !== t34 || $[90] !== t35 || $[91] !== t36 || $[92] !== t37 || $[93] !== t38 || $[94] !== t39 || $[95] !== t40 || $[96] !== t41 || $[97] !== visibilityEnabled) {
368
+ t43 = {
365
369
  features: dsTableFeatures,
366
370
  data,
367
371
  columns: mergedColumns,
368
372
  getRowId,
369
373
  getSubRows,
370
374
  manualSorting,
371
- state: t30,
372
- onSortingChange: t31,
373
- onRowSelectionChange: t32,
374
- onColumnSizingChange: t33,
375
- onColumnPinningChange: t34,
376
- onColumnOrderChange: t35,
377
- onGroupingChange: t36,
378
- onExpandedChange: t37,
379
- onColumnVisibilityChange: t38,
375
+ state: t31,
376
+ onSortingChange: t32,
377
+ onRowSelectionChange: t33,
378
+ onColumnSizingChange: t34,
379
+ onColumnPinningChange: t35,
380
+ onColumnOrderChange: t36,
381
+ onGroupingChange: t37,
382
+ onExpandedChange: t38,
383
+ onColumnVisibilityChange: t39,
380
384
  enableSorting: sortingEnabled,
381
385
  enableRowSelection: selectionEnabled,
382
386
  enableColumnResizing: resizingEnabled,
383
387
  enableColumnPinning: true,
384
388
  enableGrouping: groupingEnabled,
385
389
  enableExpanding: expandingEnabled,
386
- ...t39,
387
390
  ...t40,
391
+ ...t41,
388
392
  enableHiding: visibilityEnabled,
389
393
  columnResizeMode: "onChange",
390
- defaultColumn: t41
394
+ defaultColumn: t42
391
395
  };
392
396
  $[76] = data;
393
397
  $[77] = expandingEnabled;
@@ -399,41 +403,41 @@ const TableProvider = (props)=>{
399
403
  $[83] = resizingEnabled;
400
404
  $[84] = selectionEnabled;
401
405
  $[85] = sortingEnabled;
402
- $[86] = t30;
403
- $[87] = t31;
404
- $[88] = t32;
405
- $[89] = t33;
406
- $[90] = t34;
407
- $[91] = t35;
408
- $[92] = t36;
409
- $[93] = t37;
410
- $[94] = t38;
411
- $[95] = t39;
412
- $[96] = t40;
406
+ $[86] = t31;
407
+ $[87] = t32;
408
+ $[88] = t33;
409
+ $[89] = t34;
410
+ $[90] = t35;
411
+ $[91] = t36;
412
+ $[92] = t37;
413
+ $[93] = t38;
414
+ $[94] = t39;
415
+ $[95] = t40;
416
+ $[96] = t41;
413
417
  $[97] = visibilityEnabled;
414
- $[98] = t42;
415
- } else t42 = $[98];
416
- const table = useTable(t42);
417
- let t43;
418
+ $[98] = t43;
419
+ } else t43 = $[98];
420
+ const table = useTable(t43);
421
+ let t44;
418
422
  if ($[99] !== table) {
419
- t43 = table.getAllLeafColumns();
423
+ t44 = table.getAllLeafColumns();
420
424
  $[99] = table;
421
- $[100] = t43;
422
- } else t43 = $[100];
423
- const allLeafColumns = t43;
425
+ $[100] = t44;
426
+ } else t44 = $[100];
427
+ const allLeafColumns = t44;
424
428
  const lastSelectedRowIndexRef = useRef(null);
425
429
  const containerRef = useRef(null);
426
430
  const headerScrollRef = useRef(null);
427
431
  const tbodyRef = useRef(null);
428
432
  const virtualizerRef = useRef(null);
429
- const t44 = !!getSubRows;
430
- const t45 = renderExpandedRow;
431
- const t46 = getRowCanDrag;
432
- const t47 = "full" === groupRowSpan ? renderGroupRow : void 0;
433
- const t48 = renderFullWidthRow;
434
- let t49;
435
- if ($[101] !== allLeafColumns || $[102] !== alwaysPinnedLeft || $[103] !== columnDndEnabled || $[104] !== columnGroups || $[105] !== defaultColumnOrder || $[106] !== defaultColumnVisibility || $[107] !== enableSelectAllRows || $[108] !== estimateRowHeight || $[109] !== expandingEnabled || $[110] !== groupingEnabled || $[111] !== initialScrollToRowId || $[112] !== isLoading || $[113] !== isLoadingPrevious || $[114] !== masterCellActiveRowId || $[115] !== masterColumnId || $[116] !== onEndReached || $[117] !== onEndReachedThreshold || $[118] !== onMasterCellClick || $[119] !== onRowReorder || $[120] !== onSelectAllRows || $[121] !== onSettingsOpenChange || $[122] !== onStartReached || $[123] !== onStartReachedThreshold || $[124] !== overscan || $[125] !== pinningEnabled || $[126] !== resizingEnabled || $[127] !== rowDndEnabled || $[128] !== selectionEnabled || $[129] !== setColumnOrder || $[130] !== showEmptyGroups || $[131] !== skeletonCount || $[132] !== sortingEnabled || $[133] !== stretch || $[134] !== t44 || $[135] !== t45 || $[136] !== t46 || $[137] !== t47 || $[138] !== t48 || $[139] !== table || $[140] !== virtualized || $[141] !== visibilityEnabled) {
436
- t49 = {
433
+ const t45 = !!getSubRows;
434
+ const t46 = renderExpandedRow;
435
+ const t47 = getRowCanDrag;
436
+ const t48 = "full" === groupRowSpan ? renderGroupRow : void 0;
437
+ const t49 = renderFullWidthRow;
438
+ let t50;
439
+ if ($[101] !== allLeafColumns || $[102] !== alwaysPinnedLeft || $[103] !== columnDndEnabled || $[104] !== columnGroups || $[105] !== defaultColumnOrder || $[106] !== defaultColumnVisibility || $[107] !== enableSelectAllRows || $[108] !== estimateRowHeight || $[109] !== expandingEnabled || $[110] !== groupingEnabled || $[111] !== initialScrollToRowId || $[112] !== isLoading || $[113] !== isLoadingPrevious || $[114] !== masterCellActiveRowId || $[115] !== masterColumnId || $[116] !== onEndReached || $[117] !== onEndReachedThreshold || $[118] !== onMasterCellClick || $[119] !== onRowReorder || $[120] !== onSelectAllRows || $[121] !== onSettingsOpenChange || $[122] !== onStartReached || $[123] !== onStartReachedThreshold || $[124] !== overscan || $[125] !== pinningEnabled || $[126] !== resizingEnabled || $[127] !== rowDndEnabled || $[128] !== selectionEnabled || $[129] !== setColumnOrder || $[130] !== showEmptyGroups || $[131] !== skeletonCount || $[132] !== sortingEnabled || $[133] !== stretch || $[134] !== t45 || $[135] !== t46 || $[136] !== t47 || $[137] !== t48 || $[138] !== t49 || $[139] !== table || $[140] !== virtualized || $[141] !== visibilityEnabled) {
440
+ t50 = {
437
441
  table,
438
442
  isLoading,
439
443
  isLoadingPrevious,
@@ -447,11 +451,11 @@ const TableProvider = (props)=>{
447
451
  groupingEnabled,
448
452
  expandingEnabled,
449
453
  visibilityEnabled,
450
- hasSubRowGrouping: t44,
454
+ hasSubRowGrouping: t45,
451
455
  showEmptyGroups,
452
456
  virtualized,
453
457
  stretch,
454
- renderExpandedRow: t45,
458
+ renderExpandedRow: t46,
455
459
  estimateRowHeight,
456
460
  overscan,
457
461
  allLeafColumns,
@@ -474,9 +478,9 @@ const TableProvider = (props)=>{
474
478
  onStartReachedThreshold,
475
479
  initialScrollToRowId,
476
480
  onRowReorder,
477
- getRowCanDrag: t46,
478
- renderFullWidthGroupRow: t47,
479
- renderFullWidthRow: t48,
481
+ getRowCanDrag: t47,
482
+ renderFullWidthGroupRow: t48,
483
+ renderFullWidthRow: t49,
480
484
  onMasterCellClick,
481
485
  activeRowId: masterCellActiveRowId,
482
486
  onSettingsOpenChange
@@ -514,21 +518,21 @@ const TableProvider = (props)=>{
514
518
  $[131] = skeletonCount;
515
519
  $[132] = sortingEnabled;
516
520
  $[133] = stretch;
517
- $[134] = t44;
518
- $[135] = t45;
519
- $[136] = t46;
520
- $[137] = t47;
521
- $[138] = t48;
521
+ $[134] = t45;
522
+ $[135] = t46;
523
+ $[136] = t47;
524
+ $[137] = t48;
525
+ $[138] = t49;
522
526
  $[139] = table;
523
527
  $[140] = virtualized;
524
528
  $[141] = visibilityEnabled;
525
- $[142] = t49;
526
- } else t49 = $[142];
527
- const contextValue = t49;
528
- let t50;
529
+ $[142] = t50;
530
+ } else t50 = $[142];
531
+ const contextValue = t50;
529
532
  let t51;
533
+ let t52;
530
534
  if ($[143] !== selectionEnabled || $[144] !== table) {
531
- t50 = ()=>{
535
+ t51 = ()=>{
532
536
  if (!selectionEnabled) return;
533
537
  const container = containerRef.current;
534
538
  if (!container) return;
@@ -538,39 +542,39 @@ const TableProvider = (props)=>{
538
542
  container.addEventListener("keydown", handleKeyDown);
539
543
  return ()=>container.removeEventListener("keydown", handleKeyDown);
540
544
  };
541
- t51 = [
545
+ t52 = [
542
546
  selectionEnabled,
543
547
  table
544
548
  ];
545
549
  $[143] = selectionEnabled;
546
550
  $[144] = table;
547
- $[145] = t50;
548
- $[146] = t51;
551
+ $[145] = t51;
552
+ $[146] = t52;
549
553
  } else {
550
- t50 = $[145];
551
- t51 = $[146];
554
+ t51 = $[145];
555
+ t52 = $[146];
552
556
  }
553
- useEffect(t50, t51);
554
- let t52;
557
+ useEffect(t51, t52);
558
+ let t53;
555
559
  if ($[147] === Symbol.for("react.memo_cache_sentinel")) {
556
- t52 = {
560
+ t53 = {
557
561
  activationConstraint: {
558
562
  distance: 5
559
563
  }
560
564
  };
561
- $[147] = t52;
562
- } else t52 = $[147];
563
- let t53;
565
+ $[147] = t53;
566
+ } else t53 = $[147];
567
+ let t54;
564
568
  if ($[148] === Symbol.for("react.memo_cache_sentinel")) {
565
- t53 = {
569
+ t54 = {
566
570
  coordinateGetter: sortableKeyboardCoordinates
567
571
  };
568
- $[148] = t53;
569
- } else t53 = $[148];
570
- const sensors = useSensors(useSensor(PointerSensor, t52), useSensor(KeyboardSensor, t53));
571
- let t54;
572
+ $[148] = t54;
573
+ } else t54 = $[148];
574
+ const sensors = useSensors(useSensor(PointerSensor, t53), useSensor(KeyboardSensor, t54));
575
+ let t55;
572
576
  if ($[149] !== allLeafColumns || $[150] !== setColumnOrder || $[151] !== table.atoms) {
573
- t54 = (event)=>{
577
+ t55 = (event)=>{
574
578
  const { active, over } = event;
575
579
  if (!over || active.id === over.id) return;
576
580
  const columnOrderAtom = table.atoms.columnOrder.get();
@@ -583,57 +587,57 @@ const TableProvider = (props)=>{
583
587
  $[149] = allLeafColumns;
584
588
  $[150] = setColumnOrder;
585
589
  $[151] = table.atoms;
586
- $[152] = t54;
587
- } else t54 = $[152];
588
- const handleDragEnd = t54;
589
- let t55;
590
+ $[152] = t55;
591
+ } else t55 = $[152];
592
+ const handleDragEnd = t55;
593
+ let t56;
590
594
  if ($[153] !== allLeafColumns || $[154] !== alwaysPinnedLeft || $[155] !== columnDndEnabled) {
591
- t55 = columnDndEnabled ? allLeafColumns.filter((c_0)=>!alwaysPinnedLeft.includes(c_0.id)).map(_temp3) : [];
595
+ t56 = columnDndEnabled ? allLeafColumns.filter((c_0)=>!alwaysPinnedLeft.includes(c_0.id)).map(_temp3) : [];
592
596
  $[153] = allLeafColumns;
593
597
  $[154] = alwaysPinnedLeft;
594
598
  $[155] = columnDndEnabled;
595
- $[156] = t55;
596
- } else t55 = $[156];
597
- const columnIds = t55;
598
- const t56 = columnDndEnabled ? sensors : void 0;
599
- const t57 = columnDndEnabled ? closestCenter : void 0;
600
- const t58 = columnDndEnabled ? handleDragEnd : void 0;
601
- let t59;
599
+ $[156] = t56;
600
+ } else t56 = $[156];
601
+ const columnIds = t56;
602
+ const t57 = columnDndEnabled ? sensors : void 0;
603
+ const t58 = columnDndEnabled ? closestCenter : void 0;
604
+ const t59 = columnDndEnabled ? handleDragEnd : void 0;
605
+ let t60;
602
606
  if ($[157] !== children || $[158] !== columnIds) {
603
- t59 = /*#__PURE__*/ jsx(SortableContext, {
607
+ t60 = /*#__PURE__*/ jsx(SortableContext, {
604
608
  items: columnIds,
605
609
  strategy: horizontalListSortingStrategy,
606
610
  children: children
607
611
  });
608
612
  $[157] = children;
609
613
  $[158] = columnIds;
610
- $[159] = t59;
611
- } else t59 = $[159];
612
- let t60;
613
- if ($[160] !== t56 || $[161] !== t57 || $[162] !== t58 || $[163] !== t59) {
614
- t60 = /*#__PURE__*/ jsx(DndContext, {
615
- sensors: t56,
616
- collisionDetection: t57,
617
- onDragEnd: t58,
618
- children: t59
619
- });
620
- $[160] = t56;
621
- $[161] = t57;
622
- $[162] = t58;
623
- $[163] = t59;
624
- $[164] = t60;
625
- } else t60 = $[164];
614
+ $[159] = t60;
615
+ } else t60 = $[159];
626
616
  let t61;
627
- if ($[165] !== contextValue || $[166] !== t60) {
628
- t61 = /*#__PURE__*/ jsx(TableContext.Provider, {
629
- value: contextValue,
617
+ if ($[160] !== t57 || $[161] !== t58 || $[162] !== t59 || $[163] !== t60) {
618
+ t61 = /*#__PURE__*/ jsx(DndContext, {
619
+ sensors: t57,
620
+ collisionDetection: t58,
621
+ onDragEnd: t59,
630
622
  children: t60
631
623
  });
624
+ $[160] = t57;
625
+ $[161] = t58;
626
+ $[162] = t59;
627
+ $[163] = t60;
628
+ $[164] = t61;
629
+ } else t61 = $[164];
630
+ let t62;
631
+ if ($[165] !== contextValue || $[166] !== t61) {
632
+ t62 = /*#__PURE__*/ jsx(TableContext.Provider, {
633
+ value: contextValue,
634
+ children: t61
635
+ });
632
636
  $[165] = contextValue;
633
- $[166] = t60;
634
- $[167] = t61;
635
- } else t61 = $[167];
636
- return t61;
637
+ $[166] = t61;
638
+ $[167] = t62;
639
+ } else t62 = $[167];
640
+ return t62;
637
641
  };
638
642
  function _temp() {
639
643
  return true;
@@ -2,6 +2,10 @@ import type { ColumnDef, RowData } from '@tanstack/react-table';
2
2
  import type { DSTableFeatures } from './dsTableFeatures.js';
3
3
  /**
4
4
  * Creates an expand/collapse column for use in Table.
5
- * Automatically injected by Table when `renderExpandedRow` is provided.
5
+ * Automatically injected by Table when `renderExpandedRow` is provided, or
6
+ * with `groupExpandColumn` in sub-row grouping mode — where every row can
7
+ * expand, so `groupsOnly` limits the toggle to rows that have sub-rows.
6
8
  */
7
- export declare const createExpandColumn: <T extends RowData>() => ColumnDef<DSTableFeatures, T, unknown>;
9
+ export declare const createExpandColumn: <T extends RowData>({ groupsOnly, }?: {
10
+ groupsOnly?: boolean;
11
+ }) => ColumnDef<DSTableFeatures, T, unknown>;
@@ -3,7 +3,7 @@ import { ChevronDown, ChevronRight } from "../../../icons/index.js";
3
3
  import { ToggleButton } from "../../ToggleButton/index.js";
4
4
  import { Tooltip, TooltipContent, TooltipTrigger } from "../../Tooltip/index.js";
5
5
  import { TABLE_EXPAND_COLUMN_ID, TABLE_EXPAND_COLUMN_WIDTH } from "./constants.js";
6
- const createExpandColumn = ()=>({
6
+ const createExpandColumn = ({ groupsOnly = false } = {})=>({
7
7
  id: TABLE_EXPAND_COLUMN_ID,
8
8
  size: TABLE_EXPAND_COLUMN_WIDTH,
9
9
  minSize: TABLE_EXPAND_COLUMN_WIDTH,
@@ -18,7 +18,7 @@ const createExpandColumn = ()=>({
18
18
  },
19
19
  header: ()=>null,
20
20
  cell: ({ row })=>{
21
- if (!row.getCanExpand()) return null;
21
+ if (!row.getCanExpand() || groupsOnly && 0 === row.subRows.length) return null;
22
22
  const expanded = row.getIsExpanded();
23
23
  return /*#__PURE__*/ jsxs(Tooltip, {
24
24
  children: [
@@ -241,6 +241,13 @@ export interface TableProps<T> extends TestableProps {
241
241
  * right edge of the table. Requires `renderGroupRow`.
242
242
  */
243
243
  groupRowSpan?: 'master' | 'full';
244
+ /**
245
+ * Keep the expand column in sub-row grouping mode (`renderGroupRow`), which
246
+ * otherwise drops it and leaves the toggle to the group row's content. The
247
+ * column comes first, ahead of the drag handle, and shows a toggle on group
248
+ * rows only — so the rows of a group, drag handle included, sit inside it.
249
+ */
250
+ groupExpandColumn?: boolean;
244
251
  /** Sub-row accessor for hierarchical/tree data (used with renderGroupRow) */
245
252
  getSubRows?: (row: T) => T[] | undefined;
246
253
  /**
@@ -1,6 +1,6 @@
1
1
  {
2
- "version": "2.4.0",
3
- "generatedAt": "2026-10-13T09:13:52.244Z",
2
+ "version": "2.5.0",
3
+ "generatedAt": "2026-10-13T13:29:53.372Z",
4
4
  "components": [
5
5
  {
6
6
  "name": "Accordion",
@@ -101537,6 +101537,12 @@
101537
101537
  "required": false,
101538
101538
  "description": "How a group row lays out its content.\n\n- `'master'` (default): the master column's cell, then empty filler cells —\n the content is confined to the master column width.\n- `'full'`: `renderGroupRow(row)` in a single cell spanning every data\n column (system cells — selection, drag handle — keep their own cells).\n Use for a group header with a title on the left and actions pinned to the\n right edge of the table. Requires `renderGroupRow`."
101539
101539
  },
101540
+ {
101541
+ "name": "groupExpandColumn",
101542
+ "type": "boolean | undefined",
101543
+ "required": false,
101544
+ "description": "Keep the expand column in sub-row grouping mode (`renderGroupRow`), which\notherwise drops it and leaves the toggle to the group row's content. The\ncolumn comes first, ahead of the drag handle, and shows a toggle on group\nrows only — so the rows of a group, drag handle included, sit inside it."
101545
+ },
101540
101546
  {
101541
101547
  "name": "getSubRows",
101542
101548
  "type": "((row: T) => T[] | undefined) | undefined",
@@ -107828,6 +107834,11 @@
107828
107834
  "code": "() => {\n const [data, setData] = useState<SecurityHeaderEntry[]>(() => [\n {\n ...groupedHeaderData[0]!,\n children: [\n { ...groupedHeaderData[0]!, id: `${BANNER_ROW_PREFIX}csp`, children: undefined },\n ...(groupedHeaderData[0]!.children ?? []),\n ],\n },\n ...groupedHeaderData.slice(1, 3),\n { ...groupedHeaderData[0]!, id: 'group-empty', objectName: 'Nothing here yet', children: [] },\n ]);\n const [expanded, setExpanded] = useState<TableExpandedState>(true);\n\n const handleRowReorder = useCallback((event: TableRowReorderEvent) => {\n setData(prev =>\n prev.map(group => {\n const children = group.children ?? [];\n const oldIndex = children.findIndex(row => row.id === event.activeRowId);\n const newIndex = children.findIndex(row => row.id === event.overRowId);\n if (oldIndex === -1 || newIndex === -1) return group;\n return { ...group, children: arrayMove(children, oldIndex, newIndex) };\n }),\n );\n }, []);\n\n return (\n <Table<SecurityHeaderEntry>\n data={data}\n columns={headerColumns}\n getRowId={row => row.id}\n getSubRows={row => row.children}\n showEmptyGroups\n expanded={expanded}\n onExpandedChange={setExpanded}\n onRowReorder={handleRowReorder}\n groupRowSpan='full'\n renderGroupRow={row => {\n const isExpanded = row.getIsExpanded();\n return (\n <HStack gap={8} align='center'>\n <Button\n variant='ghost'\n color='neutral'\n size='small'\n aria-expanded={isExpanded}\n aria-label={isExpanded ? 'Collapse group' : 'Expand group'}\n onClick={row.getToggleExpandedHandler()}\n >\n {isExpanded ? <ChevronDown /> : <ChevronRight />}\n </Button>\n <Text weight='medium'>{row.original.objectName}</Text>\n <Badge color='gray' type='secondary' size='medium'>\n {row.subRows.filter(r => !r.id.startsWith(BANNER_ROW_PREFIX)).length}\n </Badge>\n <HStack gap={4} className='ml-auto'>\n <Button variant='ghost' color='neutral' size='small'>\n <Plus />\n Add header\n </Button>\n <Button variant='ghost' color='neutral' size='small' aria-label='More actions'>\n <Ellipsis />\n </Button>\n </HStack>\n </HStack>\n );\n }}\n renderFullWidthRow={row =>\n row.id.startsWith(BANNER_ROW_PREFIX) ? (\n <HStack gap={8} align='center'>\n <Shield size='sm' />\n <Text size='sm' weight='medium'>\n Wallarm baseline headers\n </Text>\n <Text size='sm' color='secondary'>\n · applied first · built-in, always on\n </Text>\n <Button variant='ghost' color='neutral' size='small' className='ml-auto'>\n Manage baseline →\n </Button>\n </HStack>\n ) : undefined\n }\n getRowCanDrag={row => !row.id.startsWith(BANNER_ROW_PREFIX) && !LOCKED_ROW_IDS.has(row.id)}\n data-testid='grouped-full-width-table'\n />\n );\n}",
107829
107835
  "description": "`groupRowSpan: 'full'` draws `renderGroupRow` across every data column — title on the left,\nactions on the right edge; the content owns the collapse toggle. `renderFullWidthRow` turns a\nregular row into a single spanning banner, and `getRowCanDrag` keeps the banner and the locked\nfirst header in place while the other rows of the group reorder around them."
107830
107836
  },
107837
+ {
107838
+ "name": "GroupedWithExpandColumn",
107839
+ "code": "() => {\n const [data, setData] = useState<SecurityHeaderEntry[]>(() => [\n ...groupedHeaderData,\n { ...groupedHeaderData[0]!, id: 'group-empty', objectName: 'Nothing here yet', children: [] },\n ]);\n const [expanded, setExpanded] = useState<TableExpandedState>(true);\n\n const handleRowReorder = useCallback((event: TableRowReorderEvent) => {\n setData(prev =>\n prev.map(group => {\n const children = group.children ?? [];\n const oldIndex = children.findIndex(row => row.id === event.activeRowId);\n const newIndex = children.findIndex(row => row.id === event.overRowId);\n if (oldIndex === -1 || newIndex === -1) return group;\n return { ...group, children: arrayMove(children, oldIndex, newIndex) };\n }),\n );\n }, []);\n\n return (\n <Table<SecurityHeaderEntry>\n data={data}\n columns={headerColumns}\n getRowId={row => row.id}\n getSubRows={row => row.children}\n showEmptyGroups\n expanded={expanded}\n onExpandedChange={setExpanded}\n onRowReorder={handleRowReorder}\n groupRowSpan='full'\n groupExpandColumn\n renderGroupRow={row => (\n <HStack gap={8} align='center'>\n <Text weight='medium'>{row.original.objectName}</Text>\n <Badge color='gray' type='secondary' size='medium'>\n {row.subRows.length}\n </Badge>\n <Button variant='ghost' color='neutral' size='small' className='ml-auto'>\n <Plus />\n Add header\n </Button>\n </HStack>\n )}\n data-testid='grouped-expand-column-table'\n />\n );\n}",
107840
+ "description": "`groupExpandColumn` keeps the expand column in grouping mode: the toggle sits in its own column,\nfirst, and every row of a group — drag handle included — sits to the right of it, while\n`renderGroupRow` keeps the title and the actions."
107841
+ },
107831
107842
  {
107832
107843
  "name": "RowReorderingWithSelection",
107833
107844
  "code": "() => {\n const [data, setData] = useState(() => securityEvents.slice(0, 6));\n const [rowSelection, setRowSelection] = useState<TableRowSelectionState>({});\n\n const handleRowReorder = useCallback((event: TableRowReorderEvent) => {\n setData(prev => {\n const oldIndex = prev.findIndex(row => row.id === event.activeRowId);\n const newIndex = prev.findIndex(row => row.id === event.overRowId);\n if (oldIndex === -1 || newIndex === -1) return prev;\n return arrayMove(prev, oldIndex, newIndex);\n });\n }, []);\n\n return (\n <Table\n data={data}\n columns={securityColumns}\n getRowId={row => row.id}\n onRowReorder={handleRowReorder}\n rowSelection={rowSelection}\n onRowSelectionChange={setRowSelection}\n />\n );\n}",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wallarm-org/design-system",
3
- "version": "2.5.0",
3
+ "version": "2.6.0",
4
4
  "description": "Core design system library with React components and Storybook documentation",
5
5
  "publishConfig": {
6
6
  "access": "public",