@wallarm-org/design-system 4.18.0 → 4.18.1-rc-fix-as1764-table.1

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.
@@ -1,7 +1,16 @@
1
- import { type FC } from 'react';
1
+ import { type FC, type RefObject } from 'react';
2
+ import { type ScrollRoot } from './lib/index.js';
2
3
  interface StickyGroupParentProps {
3
4
  tableWidth: number;
4
5
  headerHeight: number;
6
+ /**
7
+ * `virtualized='window'`: the resolved scroll root. The overlay is then drawn
8
+ * by the caller inside the sticky header shell, right under `headerRef`: the
9
+ * body's horizontal scroll viewport never scrolls vertically, so nothing in it
10
+ * can stick.
11
+ */
12
+ windowScrollRoot?: ScrollRoot | null;
13
+ headerRef?: RefObject<HTMLElement | null>;
5
14
  }
6
15
  export declare const StickyGroupParent: FC<StickyGroupParentProps>;
7
16
  export {};
@@ -2,7 +2,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { useEffect, useRef } from "react";
3
3
  import { cn } from "../../utils/cn.js";
4
4
  import { useStickyGroupParent } from "./hooks/index.js";
5
- import { TABLE_DRAG_HANDLE_COLUMN_ID, TABLE_EXPAND_COLUMN_ID, TABLE_SELECT_COLUMN_ID, useRenderEveryTime, useTableValue, withTableState } from "./lib/index.js";
5
+ import { TABLE_DRAG_HANDLE_COLUMN_ID, TABLE_EXPAND_COLUMN_ID, TABLE_SELECT_COLUMN_ID, scrollRootBy, useRenderEveryTime, useTableValue, withTableState } from "./lib/index.js";
6
6
  import { Td, Tr } from "./primitives/index.js";
7
7
  import { TableBodyCell } from "./TableBody/TableBodyCell.js";
8
8
  import { TableColGroup } from "./TableColGroup.js";
@@ -13,13 +13,14 @@ const SYSTEM_COLUMN_IDS = new Set([
13
13
  TABLE_SELECT_COLUMN_ID,
14
14
  TABLE_DRAG_HANDLE_COLUMN_ID
15
15
  ]);
16
- const StickyGroupParent = ({ tableWidth, headerHeight })=>{
17
- const { table, containerRef, tbodyRef, virtualizerRef, virtualized, renderFullWidthGroupRow } = useTableContext();
18
- const useWindowScroll = 'window' === virtualized;
16
+ const StickyGroupParent = ({ tableWidth, headerHeight, windowScrollRoot, headerRef })=>{
17
+ const { table, containerRef, tbodyRef, virtualizerRef, renderFullWidthGroupRow } = useTableContext();
18
+ const useWindowScroll = null != windowScrollRoot;
19
19
  const { stickyRow, pushUpOffset } = useStickyGroupParent({
20
20
  table,
21
21
  scrollElementRef: containerRef,
22
- useWindowScroll,
22
+ windowScrollRoot,
23
+ headerRef,
23
24
  headerHeight,
24
25
  tbodyRef,
25
26
  virtualizerRef,
@@ -42,11 +43,9 @@ const StickyGroupParent = ({ tableWidth, headerHeight })=>{
42
43
  const tbodyEl = tbodyRef.current;
43
44
  if (tbodyEl) {
44
45
  const rowEl = tbodyEl.querySelector(`[data-row-id="${stickyRow.id}"]`);
45
- if (rowEl instanceof HTMLElement) if (useWindowScroll) {
46
- const rect = rowEl.getBoundingClientRect();
47
- window.scrollTo({
48
- top: window.scrollY + rect.top - headerHeight
49
- });
46
+ if (rowEl instanceof HTMLElement) if (windowScrollRoot) {
47
+ const headerBottom = headerRef?.current?.getBoundingClientRect().bottom ?? headerHeight;
48
+ scrollRootBy(windowScrollRoot, rowEl.getBoundingClientRect().top - headerBottom);
50
49
  } else scrollElement.scrollTop = rowEl.offsetTop + (tbodyEl.offsetTop || 0) - headerHeight;
51
50
  }
52
51
  }
@@ -57,7 +56,8 @@ const StickyGroupParent = ({ tableWidth, headerHeight })=>{
57
56
  stickyRow,
58
57
  containerRef,
59
58
  tbodyRef,
60
- useWindowScroll,
59
+ windowScrollRoot,
60
+ headerRef,
61
61
  headerHeight
62
62
  ]);
63
63
  const cells = useTableValue(()=>stickyRow?.getVisibleCells());
@@ -68,8 +68,8 @@ const StickyGroupParent = ({ tableWidth, headerHeight })=>{
68
68
  const fullWidthContent = useRenderEveryTime(()=>stickyRow ? renderFullWidthGroupRow?.(stickyRow) : void 0);
69
69
  const isFullWidth = void 0 !== fullWidthContent;
70
70
  return /*#__PURE__*/ jsx("div", {
71
- className: "sticky z-[21] h-0 overflow-visible pointer-events-none",
72
- style: {
71
+ className: cn('pointer-events-none', !useWindowScroll && 'sticky z-[21] h-0 overflow-visible'),
72
+ style: useWindowScroll ? void 0 : {
73
73
  top: headerHeight
74
74
  },
75
75
  "aria-hidden": "true",
@@ -4,7 +4,7 @@ import { useEffect, useRef } from "react";
4
4
  import { useTestId } from "../../../utils/testId.js";
5
5
  import { ScrollArea, ScrollAreaScrollbar, ScrollAreaViewport } from "../../ScrollArea/index.js";
6
6
  import { WindowScrollRootContext, useInfiniteScroll, useWheelHorizontalScroll, useWindowScrollRoot } from "../hooks/index.js";
7
- import { useContainerWidth } from "../lib/index.js";
7
+ import { isWindowScrollRoot, useContainerWidth } from "../lib/index.js";
8
8
  import { StickyGroupParent } from "../StickyGroupParent.js";
9
9
  import { TableBody } from "../TableBody/index.js";
10
10
  import { TableColGroup } from "../TableColGroup.js";
@@ -12,11 +12,12 @@ import { useTableContext } from "../TableContext/index.js";
12
12
  import { TableHead } from "../TableHead.js";
13
13
  import { TableSettingsMenuSlot } from "../TableSettingsMenu/index.js";
14
14
  const TableInnerWindow = (t0)=>{
15
- const $ = c(66);
15
+ const $ = c(73);
16
16
  const { isEmpty, showSettings, hasConsumerSettingsMenu, ariaLabel, children } = t0;
17
17
  const { containerRef, headerScrollRef, table, virtualizerRef, tbodyRef, hasSubRowGrouping, onEndReached, onEndReachedThreshold, onStartReached, onStartReachedThreshold, initialScrollToRowId, isLoadingPrevious } = useTableContext();
18
18
  const testId = useTestId("window");
19
19
  const rootRef = useRef(null);
20
+ const groupScrollRef = useRef(null);
20
21
  const containerWidth = useContainerWidth(rootRef);
21
22
  let t1;
22
23
  if ($[0] !== isEmpty || $[1] !== table) {
@@ -64,6 +65,7 @@ const TableInnerWindow = (t0)=>{
64
65
  const onScroll = ()=>{
65
66
  rootRef.current?.toggleAttribute("data-scrolled", scrollEl.scrollLeft > 0);
66
67
  if (headerScrollRef.current) headerScrollRef.current.scrollLeft = scrollEl.scrollLeft;
68
+ if (groupScrollRef.current) groupScrollRef.current.scrollLeft = scrollEl.scrollLeft;
67
69
  };
68
70
  scrollEl.addEventListener("scroll", onScroll, {
69
71
  passive: true
@@ -95,188 +97,213 @@ const TableInnerWindow = (t0)=>{
95
97
  const hasTextDescription = table.getAllLeafColumns().some(_temp);
96
98
  const headerHeight = hasTextDescription ? 48 : 32;
97
99
  let t7;
98
- if ($[20] !== tableWidth) {
99
- t7 = {
100
- width: tableWidth
101
- };
102
- $[20] = tableWidth;
100
+ if ($[20] !== scrollRoot) {
101
+ t7 = scrollRoot && !isWindowScrollRoot(scrollRoot) ? -Number.parseFloat(getComputedStyle(scrollRoot).paddingTop) || 0 : 0;
102
+ $[20] = scrollRoot;
103
103
  $[21] = t7;
104
104
  } else t7 = $[21];
105
+ const shellTop = t7;
105
106
  let t8;
106
- if ($[22] !== tableWidth) {
107
- t8 = /*#__PURE__*/ jsx(TableColGroup, {
108
- tableWidth: tableWidth
109
- });
110
- $[22] = tableWidth;
107
+ if ($[22] !== shellTop) {
108
+ t8 = {
109
+ top: shellTop
110
+ };
111
+ $[22] = shellTop;
111
112
  $[23] = t8;
112
113
  } else t8 = $[23];
113
114
  let t9;
114
- if ($[24] === Symbol.for("react.memo_cache_sentinel")) {
115
- t9 = /*#__PURE__*/ jsx(TableHead, {});
116
- $[24] = t9;
117
- } else t9 = $[24];
115
+ if ($[24] !== tableWidth) {
116
+ t9 = {
117
+ width: tableWidth
118
+ };
119
+ $[24] = tableWidth;
120
+ $[25] = t9;
121
+ } else t9 = $[25];
118
122
  let t10;
119
- if ($[25] !== t7 || $[26] !== t8) {
120
- t10 = /*#__PURE__*/ jsxs("table", {
123
+ if ($[26] !== tableWidth) {
124
+ t10 = /*#__PURE__*/ jsx(TableColGroup, {
125
+ tableWidth: tableWidth
126
+ });
127
+ $[26] = tableWidth;
128
+ $[27] = t10;
129
+ } else t10 = $[27];
130
+ let t11;
131
+ if ($[28] === Symbol.for("react.memo_cache_sentinel")) {
132
+ t11 = /*#__PURE__*/ jsx(TableHead, {});
133
+ $[28] = t11;
134
+ } else t11 = $[28];
135
+ let t12;
136
+ if ($[29] !== t10 || $[30] !== t9) {
137
+ t12 = /*#__PURE__*/ jsxs("table", {
121
138
  className: "table-fixed border-separate border-spacing-0",
122
- style: t7,
139
+ style: t9,
123
140
  "aria-hidden": true,
124
141
  children: [
125
- t8,
126
- t9
142
+ t10,
143
+ t11
127
144
  ]
128
145
  });
129
- $[25] = t7;
130
- $[26] = t8;
131
- $[27] = t10;
132
- } else t10 = $[27];
133
- let t11;
134
- if ($[28] !== headerScrollRef || $[29] !== t10) {
135
- t11 = /*#__PURE__*/ jsx("div", {
146
+ $[29] = t10;
147
+ $[30] = t9;
148
+ $[31] = t12;
149
+ } else t12 = $[31];
150
+ let t13;
151
+ if ($[32] !== headerScrollRef || $[33] !== t12) {
152
+ t13 = /*#__PURE__*/ jsx("div", {
136
153
  ref: headerScrollRef,
137
154
  className: "overflow-hidden",
138
- children: t10
139
- });
140
- $[28] = headerScrollRef;
141
- $[29] = t10;
142
- $[30] = t11;
143
- } else t11 = $[30];
144
- let t12;
145
- if ($[31] !== hasConsumerSettingsMenu || $[32] !== showSettings) {
146
- t12 = showSettings && /*#__PURE__*/ jsx(TableSettingsMenuSlot, {
147
- hasConsumerMenu: hasConsumerSettingsMenu
155
+ children: t12
148
156
  });
149
- $[31] = hasConsumerSettingsMenu;
150
- $[32] = showSettings;
157
+ $[32] = headerScrollRef;
151
158
  $[33] = t12;
152
- } else t12 = $[33];
153
- let t13;
154
- if ($[34] !== t11 || $[35] !== t12) {
155
- t13 = /*#__PURE__*/ jsxs("div", {
156
- className: "sticky top-0 z-30",
157
- children: [
158
- t11,
159
- t12
160
- ]
161
- });
162
- $[34] = t11;
163
- $[35] = t12;
164
- $[36] = t13;
165
- } else t13 = $[36];
159
+ $[34] = t13;
160
+ } else t13 = $[34];
166
161
  let t14;
167
- if ($[37] === Symbol.for("react.memo_cache_sentinel")) {
168
- t14 = {
169
- overflowX: "auto",
170
- overflowY: "hidden"
171
- };
162
+ if ($[35] !== hasConsumerSettingsMenu || $[36] !== showSettings) {
163
+ t14 = showSettings && /*#__PURE__*/ jsx(TableSettingsMenuSlot, {
164
+ hasConsumerMenu: hasConsumerSettingsMenu
165
+ });
166
+ $[35] = hasConsumerSettingsMenu;
167
+ $[36] = showSettings;
172
168
  $[37] = t14;
173
169
  } else t14 = $[37];
174
170
  let t15;
175
- if ($[38] !== hasSubRowGrouping || $[39] !== headerHeight || $[40] !== tableWidth) {
176
- t15 = hasSubRowGrouping && /*#__PURE__*/ jsx(StickyGroupParent, {
177
- tableWidth: tableWidth,
178
- headerHeight: headerHeight
171
+ if ($[38] !== hasSubRowGrouping || $[39] !== headerHeight || $[40] !== headerScrollRef || $[41] !== scrollRoot || $[42] !== tableWidth) {
172
+ t15 = hasSubRowGrouping && /*#__PURE__*/ jsx("div", {
173
+ ref: groupScrollRef,
174
+ className: "pointer-events-none absolute inset-x-0 top-full overflow-hidden",
175
+ children: /*#__PURE__*/ jsx(StickyGroupParent, {
176
+ tableWidth: tableWidth,
177
+ headerHeight: headerHeight,
178
+ windowScrollRoot: scrollRoot,
179
+ headerRef: headerScrollRef
180
+ })
179
181
  });
180
182
  $[38] = hasSubRowGrouping;
181
183
  $[39] = headerHeight;
182
- $[40] = tableWidth;
183
- $[41] = t15;
184
- } else t15 = $[41];
184
+ $[40] = headerScrollRef;
185
+ $[41] = scrollRoot;
186
+ $[42] = tableWidth;
187
+ $[43] = t15;
188
+ } else t15 = $[43];
185
189
  let t16;
186
- if ($[42] !== tableWidth) {
187
- t16 = {
190
+ if ($[44] !== t13 || $[45] !== t14 || $[46] !== t15 || $[47] !== t8) {
191
+ t16 = /*#__PURE__*/ jsxs("div", {
192
+ className: "sticky z-30",
193
+ style: t8,
194
+ children: [
195
+ t13,
196
+ t14,
197
+ t15
198
+ ]
199
+ });
200
+ $[44] = t13;
201
+ $[45] = t14;
202
+ $[46] = t15;
203
+ $[47] = t8;
204
+ $[48] = t16;
205
+ } else t16 = $[48];
206
+ let t17;
207
+ if ($[49] === Symbol.for("react.memo_cache_sentinel")) {
208
+ t17 = {
209
+ overflowX: "auto",
210
+ overflowY: "hidden"
211
+ };
212
+ $[49] = t17;
213
+ } else t17 = $[49];
214
+ let t18;
215
+ if ($[50] !== tableWidth) {
216
+ t18 = {
188
217
  width: tableWidth
189
218
  };
190
- $[42] = tableWidth;
191
- $[43] = t16;
192
- } else t16 = $[43];
193
- let t17;
194
- if ($[44] !== tableWidth) {
195
- t17 = /*#__PURE__*/ jsx(TableColGroup, {
219
+ $[50] = tableWidth;
220
+ $[51] = t18;
221
+ } else t18 = $[51];
222
+ let t19;
223
+ if ($[52] !== tableWidth) {
224
+ t19 = /*#__PURE__*/ jsx(TableColGroup, {
196
225
  tableWidth: tableWidth
197
226
  });
198
- $[44] = tableWidth;
199
- $[45] = t17;
200
- } else t17 = $[45];
201
- let t18;
202
- if ($[46] !== isEmpty || $[47] !== scrollRoot) {
203
- t18 = !isEmpty && /*#__PURE__*/ jsx(WindowScrollRootContext.Provider, {
227
+ $[52] = tableWidth;
228
+ $[53] = t19;
229
+ } else t19 = $[53];
230
+ let t20;
231
+ if ($[54] !== isEmpty || $[55] !== scrollRoot) {
232
+ t20 = !isEmpty && /*#__PURE__*/ jsx(WindowScrollRootContext.Provider, {
204
233
  value: scrollRoot,
205
234
  children: /*#__PURE__*/ jsx(TableBody, {})
206
235
  });
207
- $[46] = isEmpty;
208
- $[47] = scrollRoot;
209
- $[48] = t18;
210
- } else t18 = $[48];
211
- let t19;
212
- if ($[49] !== ariaLabel || $[50] !== t16 || $[51] !== t17 || $[52] !== t18) {
213
- t19 = /*#__PURE__*/ jsxs("table", {
236
+ $[54] = isEmpty;
237
+ $[55] = scrollRoot;
238
+ $[56] = t20;
239
+ } else t20 = $[56];
240
+ let t21;
241
+ if ($[57] !== ariaLabel || $[58] !== t18 || $[59] !== t19 || $[60] !== t20) {
242
+ t21 = /*#__PURE__*/ jsxs("table", {
214
243
  className: "table-fixed border-separate border-spacing-0",
215
- style: t16,
244
+ style: t18,
216
245
  "aria-label": ariaLabel,
217
246
  children: [
218
- t17,
219
- t18
247
+ t19,
248
+ t20
220
249
  ]
221
250
  });
222
- $[49] = ariaLabel;
223
- $[50] = t16;
224
- $[51] = t17;
225
- $[52] = t18;
226
- $[53] = t19;
227
- } else t19 = $[53];
228
- let t20;
229
- if ($[54] !== children || $[55] !== containerRef || $[56] !== t15 || $[57] !== t19) {
230
- t20 = /*#__PURE__*/ jsxs(ScrollAreaViewport, {
251
+ $[57] = ariaLabel;
252
+ $[58] = t18;
253
+ $[59] = t19;
254
+ $[60] = t20;
255
+ $[61] = t21;
256
+ } else t21 = $[61];
257
+ let t22;
258
+ if ($[62] !== children || $[63] !== containerRef || $[64] !== t21) {
259
+ t22 = /*#__PURE__*/ jsxs(ScrollAreaViewport, {
231
260
  ref: containerRef,
232
261
  "data-table-scroll-container": true,
233
- style: t14,
262
+ style: t17,
234
263
  children: [
235
- t15,
236
- t19,
264
+ t21,
237
265
  children
238
266
  ]
239
267
  });
240
- $[54] = children;
241
- $[55] = containerRef;
242
- $[56] = t15;
243
- $[57] = t19;
244
- $[58] = t20;
245
- } else t20 = $[58];
246
- let t21;
247
- if ($[59] === Symbol.for("react.memo_cache_sentinel")) {
248
- t21 = /*#__PURE__*/ jsx(ScrollAreaScrollbar, {
268
+ $[62] = children;
269
+ $[63] = containerRef;
270
+ $[64] = t21;
271
+ $[65] = t22;
272
+ } else t22 = $[65];
273
+ let t23;
274
+ if ($[66] === Symbol.for("react.memo_cache_sentinel")) {
275
+ t23 = /*#__PURE__*/ jsx(ScrollAreaScrollbar, {
249
276
  orientation: "horizontal"
250
277
  });
251
- $[59] = t21;
252
- } else t21 = $[59];
253
- let t22;
254
- if ($[60] !== t13 || $[61] !== t20) {
255
- t22 = /*#__PURE__*/ jsxs(ScrollArea, {
278
+ $[66] = t23;
279
+ } else t23 = $[66];
280
+ let t24;
281
+ if ($[67] !== t16 || $[68] !== t22) {
282
+ t24 = /*#__PURE__*/ jsxs(ScrollArea, {
256
283
  className: "group/scroll rounded-12 border border-border-primary-light",
257
284
  children: [
258
- t13,
259
- t20,
260
- t21
285
+ t16,
286
+ t22,
287
+ t23
261
288
  ]
262
289
  });
263
- $[60] = t13;
264
- $[61] = t20;
265
- $[62] = t22;
266
- } else t22 = $[62];
267
- let t23;
268
- if ($[63] !== t22 || $[64] !== testId) {
269
- t23 = /*#__PURE__*/ jsx("div", {
290
+ $[67] = t16;
291
+ $[68] = t22;
292
+ $[69] = t24;
293
+ } else t24 = $[69];
294
+ let t25;
295
+ if ($[70] !== t24 || $[71] !== testId) {
296
+ t25 = /*#__PURE__*/ jsx("div", {
270
297
  ref: rootRef,
271
298
  "data-testid": testId,
272
299
  className: "group/scroll relative outline-none",
273
- children: t22
300
+ children: t24
274
301
  });
275
- $[63] = t22;
276
- $[64] = testId;
277
- $[65] = t23;
278
- } else t23 = $[65];
279
- return t23;
302
+ $[70] = t24;
303
+ $[71] = testId;
304
+ $[72] = t25;
305
+ } else t25 = $[72];
306
+ return t25;
280
307
  };
281
308
  TableInnerWindow.displayName = "TableInnerWindow";
282
309
  function _temp(col) {
@@ -6,7 +6,7 @@ const TableMasterCellActions = (t0)=>{
6
6
  const { children } = t0;
7
7
  let t1;
8
8
  if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
9
- t1 = cn("shrink-0 pl-4 pr-4 flex items-center gap-2", "opacity-0 pointer-events-none", "group-hover/row:opacity-100 group-hover/row:pointer-events-auto", "group-data-[preview-active]/row:opacity-100 group-data-[preview-active]/row:pointer-events-auto", "has-[[data-state=open]]:opacity-100 has-[[data-state=open]]:pointer-events-auto", "[&_[data-state=open]]:overlay [&_[data-state=open]]:overlay-states-primary-hover");
9
+ t1 = cn("shrink-0 pl-4 pr-4 flex items-center gap-2", "opacity-0 pointer-events-none", "group-hover/row:opacity-100 group-hover/row:pointer-events-auto", "group-data-[preview-active]/row:opacity-100 group-data-[preview-active]/row:pointer-events-auto", "has-[[data-state=open]]:opacity-100 has-[[data-state=open]]:pointer-events-auto", "has-[:focus-visible]:opacity-100 has-[:focus-visible]:pointer-events-auto", "[&_[data-state=open]]:overlay [&_[data-state=open]]:overlay-states-primary-hover");
10
10
  $[0] = t1;
11
11
  } else t1 = $[0];
12
12
  let t2;
@@ -57,9 +57,9 @@ const TableFullWidthCell = (t0)=>{
57
57
  return t6;
58
58
  };
59
59
  const TableRowInner = (t0)=>{
60
- const $ = compiler_runtime_c(112);
60
+ const $ = compiler_runtime_c(114);
61
61
  const { row, ref, "data-index": dataIndex } = t0;
62
- const { table, expandingEnabled, activeRowId, isLoading, renderExpandedRow, stretch, hasSubRowGrouping, showEmptyGroups, allLeafColumns, renderFullWidthGroupRow, renderFullWidthRow } = useTableContext();
62
+ const { table, expandingEnabled, activeRowId, isLoading, renderExpandedRow, stretch, hasSubRowGrouping, showEmptyGroups, allLeafColumns, renderFullWidthGroupRow, renderFullWidthRow, virtualized } = useTableContext();
63
63
  const testId = useTestId("row");
64
64
  const { canDnd, isDragging, setNodeRef, style: dndStyle, attributes, listeners } = useRowDnd(row);
65
65
  const { activeId, overId } = useRowDndIndicator();
@@ -147,22 +147,23 @@ const TableRowInner = (t0)=>{
147
147
  let t20;
148
148
  let t8;
149
149
  let t9;
150
- if ($[21] !== allLeafColumns || $[22] !== cells || $[23] !== composedRef || $[24] !== dataIndex || $[25] !== fullWidthContent || $[26] !== hasSubRowGrouping || $[27] !== isExpanded || $[28] !== isFullWidth || $[29] !== isLastRow || $[30] !== isPreviewActive || $[31] !== isSelected || $[32] !== row.id || $[33] !== table.state || $[34] !== testId) {
150
+ if ($[21] !== allLeafColumns || $[22] !== cells || $[23] !== composedRef || $[24] !== dataIndex || $[25] !== fullWidthContent || $[26] !== hasSubRowGrouping || $[27] !== isExpanded || $[28] !== isFullWidth || $[29] !== isLastRow || $[30] !== isPreviewActive || $[31] !== isSelected || $[32] !== row.id || $[33] !== table.state || $[34] !== testId || $[35] !== virtualized) {
151
151
  const systemCells = cells.filter(_temp);
152
152
  const dataCells = cells.filter(_temp2);
153
153
  const firstDataCell = dataCells[0];
154
154
  let t21;
155
- if ($[49] !== allLeafColumns || $[50] !== hasSubRowGrouping || $[51] !== isExpanded) {
156
- t21 = hasSubRowGrouping && isExpanded ? {
155
+ if ($[50] !== allLeafColumns || $[51] !== hasSubRowGrouping || $[52] !== isExpanded || $[53] !== virtualized) {
156
+ t21 = hasSubRowGrouping && isExpanded && "window" !== virtualized ? {
157
157
  position: "sticky",
158
158
  top: allLeafColumns.some(_temp3) ? 48 : 32,
159
159
  zIndex: 20
160
160
  } : void 0;
161
- $[49] = allLeafColumns;
162
- $[50] = hasSubRowGrouping;
163
- $[51] = isExpanded;
164
- $[52] = t21;
165
- } else t21 = $[52];
161
+ $[50] = allLeafColumns;
162
+ $[51] = hasSubRowGrouping;
163
+ $[52] = isExpanded;
164
+ $[53] = virtualized;
165
+ $[54] = t21;
166
+ } else t21 = $[54];
166
167
  const stickyStyle = t21;
167
168
  T0 = Tr;
168
169
  t8 = composedRef;
@@ -175,15 +176,15 @@ const TableRowInner = (t0)=>{
175
176
  t15 = isSelected || void 0;
176
177
  t16 = stickyStyle;
177
178
  let t22;
178
- if ($[53] !== isLastRow) {
179
+ if ($[55] !== isLastRow) {
179
180
  t22 = (cell)=>/*#__PURE__*/ jsx(TableBodyCell, {
180
181
  cell: cell,
181
182
  disablePinnedShadow: true,
182
183
  lastRow: isLastRow
183
184
  }, cell.id);
184
- $[53] = isLastRow;
185
- $[54] = t22;
186
- } else t22 = $[54];
185
+ $[55] = isLastRow;
186
+ $[56] = t22;
187
+ } else t22 = $[56];
187
188
  t17 = systemCells.map(t22);
188
189
  t18 = isFullWidth && /*#__PURE__*/ jsx(TableFullWidthCell, {
189
190
  colSpan: dataCells.length,
@@ -217,47 +218,48 @@ const TableRowInner = (t0)=>{
217
218
  $[32] = row.id;
218
219
  $[33] = table.state;
219
220
  $[34] = testId;
220
- $[35] = T0;
221
- $[36] = t10;
222
- $[37] = t11;
223
- $[38] = t12;
224
- $[39] = t13;
225
- $[40] = t14;
226
- $[41] = t15;
227
- $[42] = t16;
228
- $[43] = t17;
229
- $[44] = t18;
230
- $[45] = t19;
231
- $[46] = t20;
232
- $[47] = t8;
233
- $[48] = t9;
221
+ $[35] = virtualized;
222
+ $[36] = T0;
223
+ $[37] = t10;
224
+ $[38] = t11;
225
+ $[39] = t12;
226
+ $[40] = t13;
227
+ $[41] = t14;
228
+ $[42] = t15;
229
+ $[43] = t16;
230
+ $[44] = t17;
231
+ $[45] = t18;
232
+ $[46] = t19;
233
+ $[47] = t20;
234
+ $[48] = t8;
235
+ $[49] = t9;
234
236
  } else {
235
- T0 = $[35];
236
- t10 = $[36];
237
- t11 = $[37];
238
- t12 = $[38];
239
- t13 = $[39];
240
- t14 = $[40];
241
- t15 = $[41];
242
- t16 = $[42];
243
- t17 = $[43];
244
- t18 = $[44];
245
- t19 = $[45];
246
- t20 = $[46];
247
- t8 = $[47];
248
- t9 = $[48];
237
+ T0 = $[36];
238
+ t10 = $[37];
239
+ t11 = $[38];
240
+ t12 = $[39];
241
+ t13 = $[40];
242
+ t14 = $[41];
243
+ t15 = $[42];
244
+ t16 = $[43];
245
+ t17 = $[44];
246
+ t18 = $[45];
247
+ t19 = $[46];
248
+ t20 = $[47];
249
+ t8 = $[48];
250
+ t9 = $[49];
249
251
  }
250
252
  let t21;
251
- if ($[55] !== stretch) {
253
+ if ($[57] !== stretch) {
252
254
  t21 = !stretch && /*#__PURE__*/ jsx(Td, {
253
255
  pinned: false,
254
256
  "aria-hidden": true
255
257
  });
256
- $[55] = stretch;
257
- $[56] = t21;
258
- } else t21 = $[56];
258
+ $[57] = stretch;
259
+ $[58] = t21;
260
+ } else t21 = $[58];
259
261
  let t22;
260
- if ($[57] !== T0 || $[58] !== t10 || $[59] !== t11 || $[60] !== t12 || $[61] !== t13 || $[62] !== t14 || $[63] !== t15 || $[64] !== t16 || $[65] !== t17 || $[66] !== t18 || $[67] !== t19 || $[68] !== t20 || $[69] !== t21 || $[70] !== t8 || $[71] !== t9) {
262
+ if ($[59] !== T0 || $[60] !== t10 || $[61] !== t11 || $[62] !== t12 || $[63] !== t13 || $[64] !== t14 || $[65] !== t15 || $[66] !== t16 || $[67] !== t17 || $[68] !== t18 || $[69] !== t19 || $[70] !== t20 || $[71] !== t21 || $[72] !== t8 || $[73] !== t9) {
261
263
  t22 = /*#__PURE__*/ jsxs(T0, {
262
264
  ref: t8,
263
265
  "data-index": t9,
@@ -276,50 +278,50 @@ const TableRowInner = (t0)=>{
276
278
  t21
277
279
  ]
278
280
  });
279
- $[57] = T0;
280
- $[58] = t10;
281
- $[59] = t11;
282
- $[60] = t12;
283
- $[61] = t13;
284
- $[62] = t14;
285
- $[63] = t15;
286
- $[64] = t16;
287
- $[65] = t17;
288
- $[66] = t18;
289
- $[67] = t19;
290
- $[68] = t20;
291
- $[69] = t21;
292
- $[70] = t8;
293
- $[71] = t9;
294
- $[72] = t22;
295
- } else t22 = $[72];
281
+ $[59] = T0;
282
+ $[60] = t10;
283
+ $[61] = t11;
284
+ $[62] = t12;
285
+ $[63] = t13;
286
+ $[64] = t14;
287
+ $[65] = t15;
288
+ $[66] = t16;
289
+ $[67] = t17;
290
+ $[68] = t18;
291
+ $[69] = t19;
292
+ $[70] = t20;
293
+ $[71] = t21;
294
+ $[72] = t8;
295
+ $[73] = t9;
296
+ $[74] = t22;
297
+ } else t22 = $[74];
296
298
  let t23;
297
- if ($[73] !== expandingEnabled || $[74] !== isLastRowExpanded || $[75] !== row) {
299
+ if ($[75] !== expandingEnabled || $[76] !== isLastRowExpanded || $[77] !== row) {
298
300
  t23 = expandingEnabled && /*#__PURE__*/ jsx(TableRowExpanded, {
299
301
  row: row,
300
302
  lastRow: isLastRowExpanded
301
303
  });
302
- $[73] = expandingEnabled;
303
- $[74] = isLastRowExpanded;
304
- $[75] = row;
305
- $[76] = t23;
306
- } else t23 = $[76];
304
+ $[75] = expandingEnabled;
305
+ $[76] = isLastRowExpanded;
306
+ $[77] = row;
307
+ $[78] = t23;
308
+ } else t23 = $[78];
307
309
  let t24;
308
- if ($[77] !== t22 || $[78] !== t23) {
310
+ if ($[79] !== t22 || $[80] !== t23) {
309
311
  t24 = /*#__PURE__*/ jsxs(Fragment, {
310
312
  children: [
311
313
  t22,
312
314
  t23
313
315
  ]
314
316
  });
315
- $[77] = t22;
316
- $[78] = t23;
317
- $[79] = t24;
318
- } else t24 = $[79];
317
+ $[79] = t22;
318
+ $[80] = t23;
319
+ $[81] = t24;
320
+ } else t24 = $[81];
319
321
  return t24;
320
322
  }
321
323
  let t8;
322
- if ($[80] !== activeId || $[81] !== attributes || $[82] !== canDnd || $[83] !== cells || $[84] !== composedRef || $[85] !== dataIndex || $[86] !== dndStyle || $[87] !== fullWidthContent || $[88] !== isDragging || $[89] !== isFullWidth || $[90] !== isLastRow || $[91] !== isPreviewActive || $[92] !== isSelected || $[93] !== listeners || $[94] !== overId || $[95] !== row.depth || $[96] !== row.id || $[97] !== stretch || $[98] !== table || $[99] !== testId) {
324
+ if ($[82] !== activeId || $[83] !== attributes || $[84] !== canDnd || $[85] !== cells || $[86] !== composedRef || $[87] !== dataIndex || $[88] !== dndStyle || $[89] !== fullWidthContent || $[90] !== isDragging || $[91] !== isFullWidth || $[92] !== isLastRow || $[93] !== isPreviewActive || $[94] !== isSelected || $[95] !== listeners || $[96] !== overId || $[97] !== row.depth || $[98] !== row.id || $[99] !== stretch || $[100] !== table || $[101] !== testId) {
323
325
  let dropIndicator;
324
326
  if (overId === row.id && null != activeId && activeId !== row.id) {
325
327
  const modelRows = table.getRowModel().rows;
@@ -328,12 +330,12 @@ const TableRowInner = (t0)=>{
328
330
  if (-1 !== activeIndex && -1 !== overIndex) dropIndicator = activeIndex < overIndex ? "below" : "above";
329
331
  }
330
332
  let t9;
331
- if ($[101] !== cells || $[102] !== isFullWidth) {
333
+ if ($[103] !== cells || $[104] !== isFullWidth) {
332
334
  t9 = isFullWidth ? cells.filter(_temp4) : cells;
333
- $[101] = cells;
334
- $[102] = isFullWidth;
335
- $[103] = t9;
336
- } else t9 = $[103];
335
+ $[103] = cells;
336
+ $[104] = isFullWidth;
337
+ $[105] = t9;
338
+ } else t9 = $[105];
337
339
  t8 = /*#__PURE__*/ jsxs(Tr, {
338
340
  ref: composedRef,
339
341
  "data-index": dataIndex,
@@ -376,53 +378,53 @@ const TableRowInner = (t0)=>{
376
378
  })
377
379
  ]
378
380
  });
379
- $[80] = activeId;
380
- $[81] = attributes;
381
- $[82] = canDnd;
382
- $[83] = cells;
383
- $[84] = composedRef;
384
- $[85] = dataIndex;
385
- $[86] = dndStyle;
386
- $[87] = fullWidthContent;
387
- $[88] = isDragging;
388
- $[89] = isFullWidth;
389
- $[90] = isLastRow;
390
- $[91] = isPreviewActive;
391
- $[92] = isSelected;
392
- $[93] = listeners;
393
- $[94] = overId;
394
- $[95] = row.depth;
395
- $[96] = row.id;
396
- $[97] = stretch;
397
- $[98] = table;
398
- $[99] = testId;
399
- $[100] = t8;
400
- } else t8 = $[100];
381
+ $[82] = activeId;
382
+ $[83] = attributes;
383
+ $[84] = canDnd;
384
+ $[85] = cells;
385
+ $[86] = composedRef;
386
+ $[87] = dataIndex;
387
+ $[88] = dndStyle;
388
+ $[89] = fullWidthContent;
389
+ $[90] = isDragging;
390
+ $[91] = isFullWidth;
391
+ $[92] = isLastRow;
392
+ $[93] = isPreviewActive;
393
+ $[94] = isSelected;
394
+ $[95] = listeners;
395
+ $[96] = overId;
396
+ $[97] = row.depth;
397
+ $[98] = row.id;
398
+ $[99] = stretch;
399
+ $[100] = table;
400
+ $[101] = testId;
401
+ $[102] = t8;
402
+ } else t8 = $[102];
401
403
  let t9;
402
- if ($[104] !== dndStyle || $[105] !== expandingEnabled || $[106] !== isLastRowExpanded || $[107] !== row) {
404
+ if ($[106] !== dndStyle || $[107] !== expandingEnabled || $[108] !== isLastRowExpanded || $[109] !== row) {
403
405
  t9 = expandingEnabled && /*#__PURE__*/ jsx(TableRowExpanded, {
404
406
  row: row,
405
407
  dndStyle: dndStyle,
406
408
  lastRow: isLastRowExpanded
407
409
  });
408
- $[104] = dndStyle;
409
- $[105] = expandingEnabled;
410
- $[106] = isLastRowExpanded;
411
- $[107] = row;
412
- $[108] = t9;
413
- } else t9 = $[108];
410
+ $[106] = dndStyle;
411
+ $[107] = expandingEnabled;
412
+ $[108] = isLastRowExpanded;
413
+ $[109] = row;
414
+ $[110] = t9;
415
+ } else t9 = $[110];
414
416
  let t10;
415
- if ($[109] !== t8 || $[110] !== t9) {
417
+ if ($[111] !== t8 || $[112] !== t9) {
416
418
  t10 = /*#__PURE__*/ jsxs(Fragment, {
417
419
  children: [
418
420
  t8,
419
421
  t9
420
422
  ]
421
423
  });
422
- $[109] = t8;
423
- $[110] = t9;
424
- $[111] = t10;
425
- } else t10 = $[111];
424
+ $[111] = t8;
425
+ $[112] = t9;
426
+ $[113] = t10;
427
+ } else t10 = $[113];
426
428
  return t10;
427
429
  };
428
430
  TableRowInner.displayName = "TableRow";
@@ -16,8 +16,11 @@ interface UseScrollEdgeOptions {
16
16
  }
17
17
  /**
18
18
  * Fires `onReached` once when the user scrolls within `threshold` px of the
19
- * given edge. Re-arms after scrolling back past the threshold. A cooldown
20
- * guard prevents rapid re-fires when prepended/appended rows grow the content.
19
+ * given edge. Re-arms after scrolling back past the threshold, or once the
20
+ * content height changes (new rows): a jump straight to the new edge, such as
21
+ * a scrollbar drag or End, never passes a point outside the threshold. A
22
+ * cooldown guard prevents rapid re-fires when prepended/appended rows grow the
23
+ * content.
21
24
  */
22
25
  export declare const useScrollEdge: ({ edge, mode, scrollRef, onReached, threshold, enabled, scrollRoot, }: UseScrollEdgeOptions) => void;
23
26
  export {};
@@ -6,6 +6,7 @@ const useScrollEdge = (t0)=>{
6
6
  const { edge, mode, scrollRef, onReached, threshold, enabled: t1, scrollRoot } = t0;
7
7
  const enabled = void 0 === t1 ? true : t1;
8
8
  const firedRef = useRef(false);
9
+ const firedHeightRef = useRef(0);
9
10
  const lastFiredAtRef = useRef(0);
10
11
  const onReachedRef = useRef(onReached);
11
12
  let t2;
@@ -41,8 +42,10 @@ const useScrollEdge = (t0)=>{
41
42
  const distance = "start" === edge ? scrollTop : scrollHeight - scrollTop - clientHeight;
42
43
  if (distance <= threshold) {
43
44
  const now = Date.now();
45
+ if (firedRef.current && scrollHeight !== firedHeightRef.current) firedRef.current = false;
44
46
  if (!firedRef.current && now - lastFiredAtRef.current >= SCROLL_EDGE_COOLDOWN_MS) {
45
47
  firedRef.current = true;
48
+ firedHeightRef.current = scrollHeight;
46
49
  lastFiredAtRef.current = now;
47
50
  callback();
48
51
  }
@@ -1,6 +1,6 @@
1
1
  import { type RefObject } from 'react';
2
2
  import type { ReactTable, Row, RowData } from '@tanstack/react-table';
3
- import type { DSTableFeatures } from '../lib/index.js';
3
+ import type { DSTableFeatures, ScrollRoot } from '../lib/index.js';
4
4
  import type { TableVirtualizerInstance } from '../TableContext/types.js';
5
5
  export interface StickyGroupParentResult<T extends RowData> {
6
6
  stickyRow: Row<DSTableFeatures, T> | null;
@@ -9,7 +9,13 @@ export interface StickyGroupParentResult<T extends RowData> {
9
9
  interface UseStickyGroupParentOptions {
10
10
  table: ReactTable<DSTableFeatures, RowData>;
11
11
  scrollElementRef: RefObject<HTMLElement | null>;
12
- useWindowScroll: boolean;
12
+ /**
13
+ * `virtualized='window'`: the resolved scroll root (the window or a scrolling
14
+ * pane). Positions are then read in viewport coordinates against the bottom of
15
+ * `headerRef`, the sticky header, so the root's own offset never matters.
16
+ */
17
+ windowScrollRoot?: ScrollRoot | null;
18
+ headerRef?: RefObject<HTMLElement | null>;
13
19
  headerHeight: number;
14
20
  tbodyRef: RefObject<HTMLTableSectionElement | null>;
15
21
  virtualizerRef: RefObject<TableVirtualizerInstance | null>;
@@ -51,15 +51,16 @@ const getRowBounds = (index, virt, tbodyScrollOffset, tbodyEl, scrollTop, scroll
51
51
  };
52
52
  };
53
53
  const useStickyGroupParent = (options)=>{
54
- const $ = c(20);
55
- const { table, scrollElementRef, useWindowScroll, headerHeight, tbodyRef, virtualizerRef, enabled } = options;
54
+ const $ = c(21);
55
+ const { table, scrollElementRef, windowScrollRoot, headerRef, headerHeight, tbodyRef, virtualizerRef, enabled } = options;
56
+ const useWindowScroll = null != windowScrollRoot;
56
57
  const [stickyRow, setStickyRow] = useState(null);
57
58
  const [pushUpOffset, setPushUpOffset] = useState(0);
58
59
  const rafRef = useRef(0);
59
60
  const prevStickyRowIdRef = useRef(null);
60
61
  const prevOffsetRef = useRef(0);
61
62
  let t0;
62
- if ($[0] !== enabled || $[1] !== headerHeight || $[2] !== scrollElementRef || $[3] !== table || $[4] !== tbodyRef || $[5] !== useWindowScroll || $[6] !== virtualizerRef) {
63
+ if ($[0] !== enabled || $[1] !== headerHeight || $[2] !== headerRef || $[3] !== scrollElementRef || $[4] !== table || $[5] !== tbodyRef || $[6] !== useWindowScroll || $[7] !== virtualizerRef) {
63
64
  t0 = ()=>{
64
65
  if (!enabled) {
65
66
  if (null !== prevStickyRowIdRef.current) {
@@ -71,16 +72,14 @@ const useStickyGroupParent = (options)=>{
71
72
  }
72
73
  const scrollElement = scrollElementRef.current;
73
74
  if (!scrollElement) return;
74
- const scrollTop = useWindowScroll ? window.scrollY : scrollElement.scrollTop;
75
- const headerBottom = scrollTop + headerHeight;
75
+ const scrollTop = useWindowScroll ? 0 : scrollElement.scrollTop;
76
+ const headerBottom = useWindowScroll ? headerRef?.current?.getBoundingClientRect().bottom ?? headerHeight : scrollTop + headerHeight;
76
77
  const tbodyEl = tbodyRef.current;
77
78
  const virt = virtualizerRef.current;
78
79
  let tbodyScrollOffset = 0;
79
80
  let scrollContainerTop = 0;
80
- if (tbodyEl) if (useWindowScroll) {
81
- tbodyScrollOffset = tbodyEl.getBoundingClientRect().top + window.scrollY;
82
- scrollContainerTop = 0;
83
- } else {
81
+ if (tbodyEl) if (useWindowScroll) tbodyScrollOffset = tbodyEl.getBoundingClientRect().top - (virt?.options.scrollMargin ?? 0);
82
+ else {
84
83
  const scrollRect = scrollElement.getBoundingClientRect();
85
84
  scrollContainerTop = scrollRect.top;
86
85
  tbodyScrollOffset = tbodyEl.getBoundingClientRect().top - scrollRect.top + scrollTop;
@@ -112,20 +111,21 @@ const useStickyGroupParent = (options)=>{
112
111
  };
113
112
  $[0] = enabled;
114
113
  $[1] = headerHeight;
115
- $[2] = scrollElementRef;
116
- $[3] = table;
117
- $[4] = tbodyRef;
118
- $[5] = useWindowScroll;
119
- $[6] = virtualizerRef;
120
- $[7] = t0;
121
- } else t0 = $[7];
114
+ $[2] = headerRef;
115
+ $[3] = scrollElementRef;
116
+ $[4] = table;
117
+ $[5] = tbodyRef;
118
+ $[6] = useWindowScroll;
119
+ $[7] = virtualizerRef;
120
+ $[8] = t0;
121
+ } else t0 = $[8];
122
122
  const compute = t0;
123
123
  let t1;
124
124
  let t2;
125
- if ($[8] !== compute || $[9] !== enabled || $[10] !== scrollElementRef || $[11] !== useWindowScroll) {
125
+ if ($[9] !== compute || $[10] !== enabled || $[11] !== scrollElementRef || $[12] !== windowScrollRoot) {
126
126
  t1 = ()=>{
127
127
  if (!enabled) return;
128
- const scrollTarget = useWindowScroll ? window : scrollElementRef.current;
128
+ const scrollTarget = windowScrollRoot ?? scrollElementRef.current;
129
129
  if (!scrollTarget) return;
130
130
  const handleScroll = ()=>{
131
131
  cancelAnimationFrame(rafRef.current);
@@ -142,48 +142,48 @@ const useStickyGroupParent = (options)=>{
142
142
  };
143
143
  t2 = [
144
144
  enabled,
145
- useWindowScroll,
145
+ windowScrollRoot,
146
146
  scrollElementRef,
147
147
  compute
148
148
  ];
149
- $[8] = compute;
150
- $[9] = enabled;
151
- $[10] = scrollElementRef;
152
- $[11] = useWindowScroll;
153
- $[12] = t1;
154
- $[13] = t2;
149
+ $[9] = compute;
150
+ $[10] = enabled;
151
+ $[11] = scrollElementRef;
152
+ $[12] = windowScrollRoot;
153
+ $[13] = t1;
154
+ $[14] = t2;
155
155
  } else {
156
- t1 = $[12];
157
- t2 = $[13];
156
+ t1 = $[13];
157
+ t2 = $[14];
158
158
  }
159
159
  useEffect(t1, t2);
160
160
  let t3;
161
161
  let t4;
162
- if ($[14] !== compute) {
162
+ if ($[15] !== compute) {
163
163
  t3 = ()=>{
164
164
  compute();
165
165
  };
166
166
  t4 = [
167
167
  compute
168
168
  ];
169
- $[14] = compute;
170
- $[15] = t3;
171
- $[16] = t4;
169
+ $[15] = compute;
170
+ $[16] = t3;
171
+ $[17] = t4;
172
172
  } else {
173
- t3 = $[15];
174
- t4 = $[16];
173
+ t3 = $[16];
174
+ t4 = $[17];
175
175
  }
176
176
  useEffect(t3, t4);
177
177
  let t5;
178
- if ($[17] !== pushUpOffset || $[18] !== stickyRow) {
178
+ if ($[18] !== pushUpOffset || $[19] !== stickyRow) {
179
179
  t5 = {
180
180
  stickyRow,
181
181
  pushUpOffset
182
182
  };
183
- $[17] = pushUpOffset;
184
- $[18] = stickyRow;
185
- $[19] = t5;
186
- } else t5 = $[19];
183
+ $[18] = pushUpOffset;
184
+ $[19] = stickyRow;
185
+ $[20] = t5;
186
+ } else t5 = $[20];
187
187
  return t5;
188
188
  };
189
189
  export { useStickyGroupParent };
@@ -1,6 +1,6 @@
1
1
  {
2
- "version": "4.17.0",
3
- "generatedAt": "2026-11-13T12:12:37.392Z",
2
+ "version": "4.18.0",
3
+ "generatedAt": "2026-11-15T11:44:33.008Z",
4
4
  "components": [
5
5
  {
6
6
  "name": "Accordion",
@@ -41458,6 +41458,16 @@
41458
41458
  "!autodocs"
41459
41459
  ],
41460
41460
  "description": "The same sticky-parent behavior under container virtualization with large grouped data —\nthe overlay stays in the DOM even when the real parent row is unmounted by the virtualizer."
41461
+ },
41462
+ {
41463
+ "name": "StickyGroupParentWindowInPane",
41464
+ "code": "import { useMemo, useState } from 'react';\nimport { Table, type TableExpandedState } from '@wallarm-org/design-system/Table';\nimport { createLargeGroupedData, headerColumns, type SecurityHeaderEntry } from './mocks';\n\nexport const StickyGroupParentWindowInPane = () => {\n const data = useMemo(() => createLargeGroupedData(6, 30), []);\n const [expanded, setExpanded] = useState<TableExpandedState>(() =>\n Object.fromEntries(data.map(g => [g.id, true])),\n );\n\n return (\n <div data-testid='scroll-pane' style={{ height: 480, overflowY: 'auto', paddingTop: 24 }}>\n <Table<SecurityHeaderEntry>\n data={data}\n columns={headerColumns}\n getRowId={row => row.id}\n getSubRows={row => row.children}\n expanded={expanded}\n onExpandedChange={setExpanded}\n virtualized='window'\n data-testid='sticky-group-parent-window-table'\n />\n </div>\n );\n};",
41465
+ "storyFile": "Table/Table.stories.tsx",
41466
+ "storyTitle": "Data Display/Table",
41467
+ "tags": [
41468
+ "!autodocs"
41469
+ ],
41470
+ "description": "`virtualized='window'` grouping in a padded app pane: the group row sticks under the header,\nwhich sticks at the pane's top edge (rows never show through the pane's padding)."
41461
41471
  }
41462
41472
  ],
41463
41473
  "docs": [
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "4.17.0",
2
+ "version": "4.18.0",
3
3
  "rules": "Every numeric utility is in px, not 4px steps: p-16 is 16px, p-4 is 4px. Translate Tailwind habits (p-4 → p-16, gap-6 → gap-24, w-64 → w-256).\n\nBefore composing a screen, call get_guideline for the pattern (app shell, list page, table, drawer, form, dialog, filters, empty state, settings, auth). Wrong → right:\n\n- p-5, gap-3, p-10 → stay on the scale: 1, 2, 4, 6, 8, 12, 16, 20, 24, 28, 32, 40, 48, 64…\n- space-y-4, margins per child → <VStack gap={16}>, <HStack gap={8}>\n- Padded page wrapper → PageHeader / PageToolbar / PageContent own the 24px gutter\n- p-* on Card, DrawerBody, DialogBody, PageToolbar, Table → none; they own their padding\n- className on Text, Heading, Field, Drawer/Dialog Header/Body/Footer → wrap in your own element\n- Raw <h1>, <p>, <label> → <Heading as=\"h2\" size=\"lg\">, <Text size=\"sm\">, Field\n- <Text> default (16px) for body → size=\"sm\"\n- leading-none (0px), leading-5 (5px) → leading-sm, leading-20\n- weight=\"semibold\" → weight is light|regular|medium|bold (medium = 450)\n- bg-primary, text-muted, bg-card, bg-white → bg-bg-primary, text-text-secondary, bg-bg-surface-1\n- text-error, bg-red-500 → danger tokens; categorical color → Badge color\n- dark: variant, setting data-theme → semantic tokens, useTheme().setTheme()\n- rounded-lg, rounded, rounded-[15px] → rounded-8 (controls), rounded-12 (panels)\n- shadow-* on DS components, z-* on overlays → never; they own both\n- focus:ring → focus-visible:ring-3 ring-focus-primary outline-none\n- size, DIALOG/DRAWER_SIZES → width: Dialog 400 confirm, 560 default, 960 picker; Drawer 640 default, 700 Timeline form\n- Dialog, useToast from the root → @wallarm-org/design-system/Dialog, /Toast\n- Field invalid → error on the control + FieldError\n- Table actions column → meta.renderMenuAction on the master column\n- Hand-built side menu → RemoteShell config={NavConfig}\n- ConfirmDialog, FilterBar, Combobox → compose Dialog parts, PageToolbar + FilterDropdown, Select + useSelectSearch\n- data-slot in tests → data-testid\n",
4
4
  "guidelines": [
5
5
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wallarm-org/design-system",
3
- "version": "4.18.0",
3
+ "version": "4.18.1-rc-fix-as1764-table.1",
4
4
  "description": "Core design system library with React components and Storybook documentation",
5
5
  "publishConfig": {
6
6
  "access": "public",