@dmsi/wedgekit-react 0.0.26 → 0.0.27

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.
Files changed (217) hide show
  1. package/dist/{chunk-KDEPZ6I7.js → chunk-2S2Z3L56.js} +5 -1
  2. package/dist/{chunk-TU55CHXU.js → chunk-4JLU7TAC.js} +3 -1
  3. package/dist/{chunk-Z2LOGSGE.js → chunk-4N2PED4P.js} +15 -3
  4. package/dist/{chunk-U42SKNR6.js → chunk-57WRM337.js} +68 -30
  5. package/dist/{chunk-ZFGGZXB6.js → chunk-AY7ELVQY.js} +5 -2
  6. package/dist/{chunk-I2UVVKQI.js → chunk-CHTO7PW4.js} +3 -2
  7. package/dist/{chunk-WIDBAFBU.js → chunk-FWPJ73IK.js} +3 -1
  8. package/dist/{chunk-5TLFMKSR.js → chunk-INYI65WW.js} +15 -5
  9. package/dist/{chunk-TJ44JJCB.js → chunk-J6LETUNM.js} +5 -2
  10. package/dist/{chunk-T6HZARR7.js → chunk-MZJS2ZAU.js} +6 -3
  11. package/dist/{chunk-ZCBSLV7U.js → chunk-O4M2GISS.js} +5 -2
  12. package/dist/{chunk-OUTEIXV4.js → chunk-OUSNH76S.js} +11 -3
  13. package/dist/{chunk-YDREJNAS.js → chunk-PDDZ5PMY.js} +18 -4
  14. package/dist/{chunk-4RD5ZF2V.js → chunk-QBIEU25R.js} +10 -4
  15. package/dist/chunk-QUPHLL7D.js +61 -0
  16. package/dist/{chunk-OISE6NMA.js → chunk-QV2EFOYF.js} +17 -6
  17. package/dist/{chunk-YZQNTOIF.js → chunk-QZGUMB7T.js} +10 -5
  18. package/dist/{chunk-S7R37IUP.js → chunk-S5K22XTH.js} +5 -2
  19. package/dist/{chunk-GCPJH5R6.js → chunk-S5KPS4IQ.js} +22 -7
  20. package/dist/{chunk-VELXLFMJ.js → chunk-SAMX4YGM.js} +4 -1
  21. package/dist/{chunk-TWP6YSFO.js → chunk-SKHSGGO3.js} +14 -6
  22. package/dist/chunk-TVDFTRGL.js +57 -0
  23. package/dist/{chunk-N32PXOA5.js → chunk-UT7XCBZF.js} +9 -4
  24. package/dist/{chunk-L4UM372R.js → chunk-VC3R5EUH.js} +3 -0
  25. package/dist/{chunk-UIQ733QP.js → chunk-VG4EPHJA.js} +7 -3
  26. package/dist/components/Breadcrumbs.cjs +29 -9
  27. package/dist/components/Breadcrumbs.js +29 -9
  28. package/dist/components/Button.cjs +6 -3
  29. package/dist/components/Button.js +1 -1
  30. package/dist/components/CalendarRange.cjs +11 -3
  31. package/dist/components/CalendarRange.js +1 -1
  32. package/dist/components/Caption.cjs +53 -9
  33. package/dist/components/Caption.js +53 -9
  34. package/dist/components/Checkbox.cjs +15 -6
  35. package/dist/components/Checkbox.js +2 -2
  36. package/dist/components/ContentTab.cjs +20 -7
  37. package/dist/components/ContentTab.js +2 -2
  38. package/dist/components/ContentTabs.cjs +32 -18
  39. package/dist/components/ContentTabs.js +14 -13
  40. package/dist/components/DMSiLogo.cjs +22 -4
  41. package/dist/components/DMSiLogo.js +9 -5
  42. package/dist/components/DataGrid.cjs +374 -243
  43. package/dist/components/DataGrid.js +283 -226
  44. package/dist/components/DataGridCell.cjs +79 -21
  45. package/dist/components/DataGridCell.js +7 -7
  46. package/dist/components/DataTable.cjs +197 -139
  47. package/dist/components/DataTable.js +197 -139
  48. package/dist/components/DateInput.cjs +36 -10
  49. package/dist/components/DateInput.js +7 -3
  50. package/dist/components/DateRangeInput.cjs +36 -10
  51. package/dist/components/DateRangeInput.js +7 -3
  52. package/dist/components/DebugJson.cjs +21 -13
  53. package/dist/components/DebugJson.js +21 -13
  54. package/dist/components/Display.cjs +5 -2
  55. package/dist/components/Display.js +1 -1
  56. package/dist/components/EditingContext.cjs +4 -1
  57. package/dist/components/EditingContext.js +4 -1
  58. package/dist/components/FilterGroup.cjs +102 -32
  59. package/dist/components/FilterGroup.js +41 -17
  60. package/dist/components/FullViewportBox.cjs +10 -2
  61. package/dist/components/FullViewportBox.js +10 -2
  62. package/dist/components/Grid.cjs +3 -1
  63. package/dist/components/Grid.js +3 -1
  64. package/dist/components/Heading.cjs +5 -2
  65. package/dist/components/Heading.js +1 -1
  66. package/dist/components/HorizontalDivider.cjs +2 -2
  67. package/dist/components/HorizontalDivider.js +2 -2
  68. package/dist/components/Input.cjs +21 -7
  69. package/dist/components/Input.js +2 -2
  70. package/dist/components/InputGroup.cjs +13 -6
  71. package/dist/components/InputGroup.js +9 -5
  72. package/dist/components/Label.cjs +5 -2
  73. package/dist/components/Label.js +1 -1
  74. package/dist/components/List.cjs +3 -2
  75. package/dist/components/List.js +3 -2
  76. package/dist/components/LogoAgilityTopBar.cjs +22 -4
  77. package/dist/components/LogoAgilityTopBar.js +9 -5
  78. package/dist/components/LogoDMSiTopBar.cjs +22 -4
  79. package/dist/components/LogoDMSiTopBar.js +1 -1
  80. package/dist/components/LogoMillworkTopBar.cjs +22 -4
  81. package/dist/components/LogoMillworkTopBar.js +9 -5
  82. package/dist/components/MainBar.cjs +2 -0
  83. package/dist/components/MainBar.js +2 -0
  84. package/dist/components/Menu.cjs +3 -0
  85. package/dist/components/Menu.js +1 -1
  86. package/dist/components/MenuOption.cjs +28 -7
  87. package/dist/components/MenuOption.js +3 -3
  88. package/dist/components/MobileDataGrid.cjs +101 -46
  89. package/dist/components/MobileDataGrid.js +23 -11
  90. package/dist/components/Modal.cjs +96 -51
  91. package/dist/components/Modal.js +19 -7
  92. package/dist/components/ModalButtons.cjs +43 -26
  93. package/dist/components/ModalButtons.js +2 -2
  94. package/dist/components/ModalContent.cjs +3 -1
  95. package/dist/components/ModalContent.js +1 -1
  96. package/dist/components/ModalHeader.cjs +40 -25
  97. package/dist/components/ModalHeader.js +3 -3
  98. package/dist/components/ModalScrim.cjs +3 -1
  99. package/dist/components/ModalScrim.js +1 -1
  100. package/dist/components/NavigationTab.cjs +9 -3
  101. package/dist/components/NavigationTab.js +2 -2
  102. package/dist/components/NavigationTabs.cjs +15 -7
  103. package/dist/components/NavigationTabs.js +8 -6
  104. package/dist/components/NestedMenu.cjs +28 -7
  105. package/dist/components/NestedMenu.js +3 -3
  106. package/dist/components/Notification.cjs +84 -38
  107. package/dist/components/Notification.js +8 -4
  108. package/dist/components/OptionPill.cjs +24 -6
  109. package/dist/components/OptionPill.js +3 -3
  110. package/dist/components/Paragraph.cjs +7 -3
  111. package/dist/components/Paragraph.js +1 -1
  112. package/dist/components/Password.cjs +33 -11
  113. package/dist/components/Password.js +14 -6
  114. package/dist/components/ProjectBar.cjs +3 -1
  115. package/dist/components/ProjectBar.js +3 -1
  116. package/dist/components/Radio.cjs +13 -7
  117. package/dist/components/Radio.js +7 -5
  118. package/dist/components/Search.cjs +34 -12
  119. package/dist/components/Search.js +3 -3
  120. package/dist/components/Select.cjs +25 -7
  121. package/dist/components/Select.js +3 -3
  122. package/dist/components/SideMenu.cjs +6 -1
  123. package/dist/components/SideMenu.js +6 -1
  124. package/dist/components/SideMenuGroup.cjs +96 -49
  125. package/dist/components/SideMenuGroup.js +31 -19
  126. package/dist/components/SideMenuItem.cjs +99 -43
  127. package/dist/components/SideMenuItem.js +32 -12
  128. package/dist/components/Stack.cjs +91 -30
  129. package/dist/components/Stack.js +1 -1
  130. package/dist/components/StatusPill.cjs +13 -6
  131. package/dist/components/StatusPill.js +9 -5
  132. package/dist/components/Stepper.cjs +35 -17
  133. package/dist/components/Stepper.js +11 -10
  134. package/dist/components/Subheader.cjs +5 -2
  135. package/dist/components/Subheader.js +1 -1
  136. package/dist/components/Surface.cjs +5 -2
  137. package/dist/components/Surface.js +5 -2
  138. package/dist/components/Swatch.cjs +1544 -1308
  139. package/dist/components/Swatch.js +1469 -1275
  140. package/dist/components/Textarea.cjs +5 -2
  141. package/dist/components/Textarea.js +5 -2
  142. package/dist/components/Theme.cjs +3 -2
  143. package/dist/components/Theme.js +1 -1
  144. package/dist/components/Time.cjs +98 -40
  145. package/dist/components/Time.js +18 -6
  146. package/dist/components/Toast.cjs +38 -15
  147. package/dist/components/Toast.js +23 -10
  148. package/dist/components/Tooltip.cjs +5 -4
  149. package/dist/components/Tooltip.js +1 -1
  150. package/dist/components/TopBar.cjs +16 -8
  151. package/dist/components/TopBar.js +12 -5
  152. package/package.json +1 -1
  153. package/src/components/Breadcrumbs.tsx +24 -15
  154. package/src/components/Button.tsx +7 -3
  155. package/src/components/CalendarRange.tsx +9 -0
  156. package/src/components/Caption.tsx +36 -6
  157. package/src/components/Checkbox.tsx +7 -2
  158. package/src/components/ContentTab.tsx +13 -3
  159. package/src/components/ContentTabs.tsx +11 -8
  160. package/src/components/DMSiLogo.tsx +2 -1
  161. package/src/components/DataGrid.tsx +85 -23
  162. package/src/components/DataGridCell.tsx +15 -2
  163. package/src/components/DataTable.tsx +64 -14
  164. package/src/components/DateInput.tsx +5 -1
  165. package/src/components/DateRangeInput.tsx +5 -1
  166. package/src/components/DebugJson.tsx +7 -3
  167. package/src/components/Display.tsx +3 -0
  168. package/src/components/EditingContext.tsx +8 -6
  169. package/src/components/FilterGroup.tsx +23 -3
  170. package/src/components/FullViewportBox.tsx +6 -1
  171. package/src/components/Grid.tsx +3 -0
  172. package/src/components/Heading.tsx +3 -0
  173. package/src/components/HorizontalDivider.tsx +4 -2
  174. package/src/components/Input.tsx +19 -10
  175. package/src/components/InputGroup.tsx +8 -4
  176. package/src/components/Label.tsx +3 -0
  177. package/src/components/Link.tsx +1 -0
  178. package/src/components/List.tsx +7 -1
  179. package/src/components/LogoAgilityTopBar.tsx +2 -1
  180. package/src/components/LogoDMSiTopBar.tsx +2 -1
  181. package/src/components/LogoMillworkTopBar.tsx +2 -1
  182. package/src/components/MainBar.tsx +3 -0
  183. package/src/components/Menu.tsx +3 -0
  184. package/src/components/MenuOption.tsx +72 -58
  185. package/src/components/MobileDataGrid.tsx +15 -4
  186. package/src/components/Modal.tsx +10 -1
  187. package/src/components/ModalButtons.tsx +12 -1
  188. package/src/components/ModalContent.tsx +3 -0
  189. package/src/components/ModalHeader.tsx +16 -6
  190. package/src/components/ModalScrim.tsx +3 -0
  191. package/src/components/NavigationTab.tsx +6 -3
  192. package/src/components/NavigationTabs.tsx +5 -2
  193. package/src/components/Notification.tsx +4 -0
  194. package/src/components/OptionPill.tsx +9 -1
  195. package/src/components/Paragraph.tsx +3 -0
  196. package/src/components/Password.tsx +9 -3
  197. package/src/components/ProjectBar.tsx +3 -0
  198. package/src/components/Radio.tsx +3 -2
  199. package/src/components/Search.tsx +56 -41
  200. package/src/components/Select.tsx +6 -1
  201. package/src/components/SideMenu.tsx +7 -1
  202. package/src/components/SideMenuGroup.tsx +13 -2
  203. package/src/components/SideMenuItem.tsx +15 -2
  204. package/src/components/Stack.tsx +8 -3
  205. package/src/components/StatusPill.tsx +4 -2
  206. package/src/components/Stepper.tsx +5 -5
  207. package/src/components/Subheader.tsx +3 -0
  208. package/src/components/Surface.tsx +3 -0
  209. package/src/components/Swatch.tsx +415 -140
  210. package/src/components/Textarea.tsx +6 -3
  211. package/src/components/Theme.tsx +3 -1
  212. package/src/components/Time.tsx +21 -5
  213. package/src/components/Toast.tsx +29 -14
  214. package/src/components/Tooltip.tsx +46 -32
  215. package/src/components/TopBar.tsx +7 -3
  216. package/dist/chunk-DBYSGYST.js +0 -47
  217. package/dist/chunk-UK3WG7HQ.js +0 -48
@@ -1,49 +1,49 @@
1
1
  "use client";
2
2
  import {
3
3
  Tooltip
4
- } from "../chunk-YZQNTOIF.js";
4
+ } from "../chunk-QZGUMB7T.js";
5
5
  import {
6
6
  useInfiniteScroll
7
7
  } from "../chunk-AWQSSKCK.js";
8
8
  import {
9
9
  Subheader
10
- } from "../chunk-ZCBSLV7U.js";
10
+ } from "../chunk-O4M2GISS.js";
11
11
  import {
12
12
  Select
13
- } from "../chunk-KDEPZ6I7.js";
13
+ } from "../chunk-2S2Z3L56.js";
14
14
  import {
15
15
  DataGridCell,
16
16
  DragAlongCell,
17
17
  DraggableCellHeader
18
- } from "../chunk-GCPJH5R6.js";
18
+ } from "../chunk-S5KPS4IQ.js";
19
19
  import {
20
20
  Menu
21
- } from "../chunk-L4UM372R.js";
21
+ } from "../chunk-VC3R5EUH.js";
22
22
  import "../chunk-Z4UCFUF7.js";
23
23
  import {
24
24
  MenuOption
25
- } from "../chunk-YDREJNAS.js";
25
+ } from "../chunk-PDDZ5PMY.js";
26
26
  import "../chunk-SEKKGFM6.js";
27
27
  import {
28
28
  Search
29
- } from "../chunk-TWP6YSFO.js";
29
+ } from "../chunk-SKHSGGO3.js";
30
30
  import "../chunk-WVUIIBRR.js";
31
31
  import "../chunk-4T7F5BZZ.js";
32
32
  import {
33
33
  Input
34
- } from "../chunk-OISE6NMA.js";
34
+ } from "../chunk-QV2EFOYF.js";
35
35
  import {
36
36
  Label
37
- } from "../chunk-S7R37IUP.js";
37
+ } from "../chunk-S5K22XTH.js";
38
38
  import {
39
39
  Button
40
- } from "../chunk-T6HZARR7.js";
40
+ } from "../chunk-MZJS2ZAU.js";
41
41
  import {
42
42
  Checkbox
43
- } from "../chunk-N32PXOA5.js";
43
+ } from "../chunk-UT7XCBZF.js";
44
44
  import {
45
45
  Paragraph
46
- } from "../chunk-UIQ733QP.js";
46
+ } from "../chunk-VG4EPHJA.js";
47
47
  import {
48
48
  Icon
49
49
  } from "../chunk-IGQVA7SC.js";
@@ -95,6 +95,7 @@ function adaptTableStateSetter(setter) {
95
95
  };
96
96
  }
97
97
  function DataGrid({
98
+ id,
98
99
  data,
99
100
  columns,
100
101
  status,
@@ -139,7 +140,7 @@ function DataGrid({
139
140
  const value = typeof updaterOrValue === "function" ? updaterOrValue(externalRowSelection != null ? externalRowSelection : {}) : updaterOrValue;
140
141
  (onRowSelectionChange != null ? onRowSelectionChange : setLocalRowSelection)(value);
141
142
  } : setLocalRowSelection;
142
- const id = useId();
143
+ const dndId = useId();
143
144
  const containerRef = React.useRef(null);
144
145
  const [columnVisibility, setColumnVisibility] = useState(() => {
145
146
  const initialVisibility = {};
@@ -152,8 +153,8 @@ function DataGrid({
152
153
  return initialVisibility;
153
154
  });
154
155
  const toggleColumnVisibility = useCallback(
155
- (id2, isVisible) => {
156
- setColumnVisibility((prev) => __spreadProps(__spreadValues({}, prev), { [id2]: isVisible }));
156
+ (columnId, isVisible) => {
157
+ setColumnVisibility((prev) => __spreadProps(__spreadValues({}, prev), { [columnId]: isVisible }));
157
158
  },
158
159
  [setColumnVisibility]
159
160
  );
@@ -206,21 +207,23 @@ function DataGrid({
206
207
  { length: totalRowCount != null ? totalRowCount : data.length },
207
208
  (_, i) => String(i + 1)
208
209
  );
209
- const allSelectedAcrossPages = allRowIds.every((id2) => rowSelection[id2]);
210
- const someSelectedAcrossPages = !allSelectedAcrossPages && allRowIds.some((id2) => rowSelection[id2]);
210
+ const allSelectedAcrossPages = allRowIds.every(
211
+ (rowId) => rowSelection[rowId]
212
+ );
213
+ const someSelectedAcrossPages = !allSelectedAcrossPages && allRowIds.some((rowId) => rowSelection[rowId]);
211
214
  const toggleSelectAllAcrossPages = () => {
212
215
  setRowSelection((prev) => {
213
216
  const isSelecting = !allSelectedAcrossPages;
214
217
  if (isSelecting) {
215
218
  const newSelection = {};
216
- for (const id2 of allRowIds) {
217
- newSelection[id2] = true;
219
+ for (const rowId of allRowIds) {
220
+ newSelection[rowId] = true;
218
221
  }
219
222
  return __spreadValues(__spreadValues({}, prev), newSelection);
220
223
  } else {
221
224
  const updatedSelection = __spreadValues({}, prev);
222
- for (const id2 of allRowIds) {
223
- delete updatedSelection[id2];
225
+ for (const rowId of allRowIds) {
226
+ delete updatedSelection[rowId];
224
227
  }
225
228
  return updatedSelection;
226
229
  }
@@ -268,7 +271,7 @@ function DataGrid({
268
271
  return /* @__PURE__ */ jsx(
269
272
  DndContext,
270
273
  {
271
- id,
274
+ id: dndId,
272
275
  collisionDetection: closestCenter,
273
276
  modifiers: [restrictToHorizontalAxis],
274
277
  onDragEnd: handleDragEnd,
@@ -278,207 +281,229 @@ function DataGrid({
278
281
  {
279
282
  items: columnOrder,
280
283
  strategy: horizontalListSortingStrategy,
281
- children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col flex-1 h-full w-full rounded border border-border-primary-normal overflow-hidden text-text-primary-normal", children: [
282
- /* @__PURE__ */ jsx(
283
- "div",
284
- {
285
- className: "overflow-auto scrollbar-thin relative contain-paint will-change-transform",
286
- ref: containerRef,
287
- children: /* @__PURE__ */ jsxs("table", { className: "min-w-full grid", children: [
288
- /* @__PURE__ */ jsx("thead", { className: "sticky top-0 z-10 grid", children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsxs("tr", { className: "flex w-full", children: [
289
- virtualPaddingLeft ? (
290
- // fake empty column to the left for virtualization scroll padding
291
- /* @__PURE__ */ jsx(
292
- "th",
293
- {
294
- style: { display: "flex", width: virtualPaddingLeft }
295
- }
296
- )
297
- ) : null,
298
- virtualColumns.map((virtualColumn) => {
299
- var _a2, _b2, _c2, _d2, _e2;
300
- const header = headerGroup.headers[virtualColumn.index];
301
- if (typeof header.column.columnDef.header === "string") {
302
- const customHeaderWidth = (_a2 = header.column.columnDef.meta) == null ? void 0 : _a2.headerWidth;
303
- return /* @__PURE__ */ jsxs(
304
- DraggableCellHeader,
305
- {
306
- header,
307
- locked: (_b2 = header.column.columnDef.meta) == null ? void 0 : _b2.locked,
308
- center: centerHeader,
309
- width: customHeaderWidth,
310
- className: clsx(
311
- header.column.getCanSort() ? "cursor-pointer" : "cursor-grab",
312
- "group"
313
- ),
314
- children: [
315
- /* @__PURE__ */ jsx(Subheader, { tall: true, children: header.column.columnDef.header }),
316
- getSortIcon(header.column.getIsSorted()),
317
- !header.column.getIsSorted() && header.column.getCanSort() && getSortIcon(
318
- header.column.getNextSortingOrder(),
319
- true
320
- ),
321
- header.column.getSortIndex() !== -1 && table.getState().sorting.length > 1 && /* @__PURE__ */ jsx(Subheader, { tall: true, children: header.column.getSortIndex() + 1 }),
322
- !((_c2 = header.column.columnDef.meta) == null ? void 0 : _c2.locked) && /* @__PURE__ */ jsx(
323
- "div",
284
+ children: /* @__PURE__ */ jsxs(
285
+ "div",
286
+ {
287
+ id,
288
+ className: "flex flex-col flex-1 h-full w-full rounded border border-border-primary-normal overflow-hidden text-text-primary-normal",
289
+ children: [
290
+ /* @__PURE__ */ jsx(
291
+ "div",
292
+ {
293
+ className: "overflow-auto scrollbar-thin relative contain-paint will-change-transform",
294
+ ref: containerRef,
295
+ children: /* @__PURE__ */ jsxs("table", { className: "min-w-full grid", children: [
296
+ /* @__PURE__ */ jsx("thead", { className: "sticky top-0 z-10 grid", children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsxs("tr", { className: "flex w-full", children: [
297
+ virtualPaddingLeft ? (
298
+ // fake empty column to the left for virtualization scroll padding
299
+ /* @__PURE__ */ jsx(
300
+ "th",
301
+ {
302
+ style: { display: "flex", width: virtualPaddingLeft }
303
+ }
304
+ )
305
+ ) : null,
306
+ virtualColumns.map((virtualColumn) => {
307
+ var _a2, _b2, _c2, _d2, _e2;
308
+ const header = headerGroup.headers[virtualColumn.index];
309
+ if (typeof header.column.columnDef.header === "string") {
310
+ const customHeaderWidth = (_a2 = header.column.columnDef.meta) == null ? void 0 : _a2.headerWidth;
311
+ return /* @__PURE__ */ jsxs(
312
+ DraggableCellHeader,
313
+ {
314
+ id: id ? `${id}-header-${header.id}` : void 0,
315
+ header,
316
+ locked: (_b2 = header.column.columnDef.meta) == null ? void 0 : _b2.locked,
317
+ center: centerHeader,
318
+ width: customHeaderWidth,
319
+ className: clsx(
320
+ header.column.getCanSort() ? "cursor-pointer" : "cursor-grab",
321
+ "group"
322
+ ),
323
+ children: [
324
+ /* @__PURE__ */ jsx(Subheader, { tall: true, children: header.column.columnDef.header }),
325
+ getSortIcon(header.column.getIsSorted()),
326
+ !header.column.getIsSorted() && header.column.getCanSort() && getSortIcon(
327
+ header.column.getNextSortingOrder(),
328
+ true
329
+ ),
330
+ header.column.getSortIndex() !== -1 && table.getState().sorting.length > 1 && /* @__PURE__ */ jsx(Subheader, { tall: true, children: header.column.getSortIndex() + 1 }),
331
+ !((_c2 = header.column.columnDef.meta) == null ? void 0 : _c2.locked) && /* @__PURE__ */ jsx(
332
+ "div",
333
+ {
334
+ onDoubleClick: (e) => {
335
+ e.stopPropagation();
336
+ header.column.resetSize();
337
+ },
338
+ onMouseDown: (e) => {
339
+ e.stopPropagation();
340
+ header.getResizeHandler()(e);
341
+ },
342
+ onTouchStart: (e) => {
343
+ e.stopPropagation();
344
+ header.getResizeHandler()(e);
345
+ },
346
+ className: "absolute right-0 inset-y-0 w-px bg-black cursor-col-resize"
347
+ }
348
+ )
349
+ ]
350
+ },
351
+ header.id
352
+ );
353
+ }
354
+ return /* @__PURE__ */ jsx(React.Fragment, { children: ((_d2 = header.column.columnDef.meta) == null ? void 0 : _d2.checkbox) ? /* @__PURE__ */ jsx(
355
+ DataGridCell,
356
+ {
357
+ id: id ? `${id}-header-${header.id}` : void 0,
358
+ type: "header",
359
+ component: "checkbox",
360
+ locked: (_e2 = header.column.columnDef.meta) == null ? void 0 : _e2.locked,
361
+ children: /* @__PURE__ */ jsx(
362
+ Checkbox,
324
363
  {
325
- onDoubleClick: (e) => {
326
- e.stopPropagation();
327
- header.column.resetSize();
328
- },
329
- onMouseDown: (e) => {
330
- e.stopPropagation();
331
- header.getResizeHandler()(e);
332
- },
333
- onTouchStart: (e) => {
334
- e.stopPropagation();
335
- header.getResizeHandler()(e);
336
- },
337
- className: "absolute right-0 inset-y-0 w-px bg-black cursor-col-resize"
364
+ id: id ? `${id}-select-all-checkbox` : void 0,
365
+ checked: allSelectedAcrossPages,
366
+ indeterminate: someSelectedAcrossPages,
367
+ onChange: toggleSelectAllAcrossPages
338
368
  }
339
369
  )
340
- ]
341
- },
342
- header.id
343
- );
344
- }
345
- return /* @__PURE__ */ jsx(React.Fragment, { children: ((_d2 = header.column.columnDef.meta) == null ? void 0 : _d2.checkbox) ? /* @__PURE__ */ jsx(
346
- DataGridCell,
347
- {
348
- type: "header",
349
- component: "checkbox",
350
- locked: (_e2 = header.column.columnDef.meta) == null ? void 0 : _e2.locked,
351
- children: /* @__PURE__ */ jsx(
352
- Checkbox,
370
+ }
371
+ ) : flexRender(
372
+ header.column.columnDef.header,
373
+ header.getContext()
374
+ ) }, header.id);
375
+ }),
376
+ virtualPaddingRight ? (
377
+ //fake empty column to the right for virtualization scroll padding
378
+ /* @__PURE__ */ jsx(
379
+ "th",
353
380
  {
354
- checked: allSelectedAcrossPages,
355
- indeterminate: someSelectedAcrossPages,
356
- onChange: toggleSelectAllAcrossPages
381
+ style: { display: "flex", width: virtualPaddingRight }
357
382
  }
358
383
  )
359
- }
360
- ) : flexRender(
361
- header.column.columnDef.header,
362
- header.getContext()
363
- ) }, header.id);
364
- }),
365
- virtualPaddingRight ? (
366
- //fake empty column to the right for virtualization scroll padding
384
+ ) : null,
385
+ enableColumnSelector && /* @__PURE__ */ jsx(
386
+ ColumnSelectorHeaderCell,
387
+ {
388
+ id: id ? `${id}-column-selector` : void 0,
389
+ table,
390
+ toggleColumnVisibility,
391
+ resetColumnVisibility
392
+ }
393
+ )
394
+ ] }, headerGroup.id)) }),
367
395
  /* @__PURE__ */ jsx(
368
- "th",
396
+ TableBody,
369
397
  {
370
- style: { display: "flex", width: virtualPaddingRight }
398
+ id,
399
+ columnVirtualizer,
400
+ table,
401
+ tableContainerRef: containerRef,
402
+ virtualPaddingLeft,
403
+ virtualPaddingRight,
404
+ pagination,
405
+ isLoadingMore,
406
+ hasMore,
407
+ showFilterRow,
408
+ enableColumnSelector
371
409
  }
372
410
  )
373
- ) : null,
374
- enableColumnSelector && /* @__PURE__ */ jsx(
375
- ColumnSelectorHeaderCell,
376
- {
377
- table,
378
- toggleColumnVisibility,
379
- resetColumnVisibility
380
- }
381
- )
382
- ] }, headerGroup.id)) }),
383
- /* @__PURE__ */ jsx(
384
- TableBody,
385
- {
386
- columnVirtualizer,
387
- table,
388
- tableContainerRef: containerRef,
389
- virtualPaddingLeft,
390
- virtualPaddingRight,
391
- pagination,
392
- isLoadingMore,
393
- hasMore,
394
- showFilterRow,
395
- enableColumnSelector
396
- }
397
- )
398
- ] })
399
- }
400
- ),
401
- table.getRowModel().rows.length === 0 && /* @__PURE__ */ jsxs(
402
- "div",
403
- {
404
- className: clsx(
405
- NO_RESULTS_HEIGHT,
406
- "flex flex-col items-center justify-center",
407
- componentGap,
408
- componentPadding
411
+ ] })
412
+ }
413
+ ),
414
+ table.getRowModel().rows.length === 0 && /* @__PURE__ */ jsxs(
415
+ "div",
416
+ {
417
+ className: clsx(
418
+ NO_RESULTS_HEIGHT,
419
+ "flex flex-col items-center justify-center",
420
+ componentGap,
421
+ componentPadding
422
+ ),
423
+ children: [
424
+ /* @__PURE__ */ jsx(Subheader, { color: "text-secondary-normal", children: "No Results" }),
425
+ /* @__PURE__ */ jsx(Paragraph, { color: "text-secondary-normal", children: "To view results, enter or update your search criteria." })
426
+ ]
427
+ }
409
428
  ),
410
- children: [
411
- /* @__PURE__ */ jsx(Subheader, { color: "text-secondary-normal", children: "No Results" }),
412
- /* @__PURE__ */ jsx(Paragraph, { color: "text-secondary-normal", children: "To view results, enter or update your search criteria." })
413
- ]
414
- }
415
- ),
416
- !hideStatusBar && /* @__PURE__ */ jsxs("div", { className: "p-2 pt-[7px] border-t border-border-primary-normal h-full min-h-[34px]", children: [
417
- pagination && /* @__PURE__ */ jsxs("div", { className: "flex justify-between items-center", children: [
418
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 w-min", children: [
419
- /* @__PURE__ */ jsx(
420
- Select,
421
- {
422
- wrapperClassName: "!w-20",
423
- value: pagination.pageSize.toString(),
424
- onChange: (e) => {
425
- var _a2;
426
- return (_a2 = pagination.onPageSizeChange) == null ? void 0 : _a2.call(pagination, Number(e.target.value));
427
- },
428
- renderMenu: (props) => /* @__PURE__ */ jsx(Menu, __spreadProps(__spreadValues({}, props), { onClick: () => props.setShow(false), children: PAGE_SIZE_OPTIONS.map((option) => /* @__PURE__ */ jsx(
429
- MenuOption,
429
+ !hideStatusBar && /* @__PURE__ */ jsxs("div", { className: "p-2 pt-[7px] border-t border-border-primary-normal h-full min-h-[34px]", children: [
430
+ pagination && /* @__PURE__ */ jsxs("div", { className: "flex justify-between items-center", children: [
431
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 w-min", children: [
432
+ /* @__PURE__ */ jsx(
433
+ Select,
430
434
  {
431
- selected: pagination.pageSize === option,
432
- onClick: () => {
435
+ id: id ? `${id}-pagesize-select` : void 0,
436
+ wrapperClassName: "!w-20",
437
+ value: pagination.pageSize.toString(),
438
+ onChange: (e) => {
433
439
  var _a2;
434
- return (_a2 = pagination.onPageSizeChange) == null ? void 0 : _a2.call(pagination, option);
440
+ return (_a2 = pagination.onPageSizeChange) == null ? void 0 : _a2.call(pagination, Number(e.target.value));
435
441
  },
436
- children: option
437
- },
438
- option
439
- )) }))
440
- }
441
- ),
442
- /* @__PURE__ */ jsx(Label, { className: "whitespace-nowrap", children: "Per Page" })
443
- ] }),
444
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
445
- /* @__PURE__ */ jsx(
446
- Button,
447
- {
448
- iconOnly: true,
449
- leftIcon: /* @__PURE__ */ jsx(Icon, { name: "chevron_left" }),
450
- onClick: () => pagination.onPageChange(pagination.pageIndex - 1),
451
- variant: "tertiary",
452
- disabled: pagination.pageIndex === 0
453
- }
454
- ),
455
- /* @__PURE__ */ jsxs(Paragraph, { children: [
456
- pagination.pageIndex * pagination.pageSize + 1,
457
- " -",
458
- " ",
459
- Math.min(
460
- (pagination.pageIndex + 1) * pagination.pageSize,
461
- pagination.total
462
- ),
463
- " ",
464
- "of ",
465
- pagination.total
442
+ renderMenu: (props) => /* @__PURE__ */ jsx(
443
+ Menu,
444
+ __spreadProps(__spreadValues({}, props), {
445
+ id: id ? `${id}-pagesize-menu` : void 0,
446
+ children: PAGE_SIZE_OPTIONS.map((option) => /* @__PURE__ */ jsx(
447
+ MenuOption,
448
+ {
449
+ id: id ? `${id}-pagesize-option-${option}` : void 0,
450
+ selected: pagination.pageSize === option,
451
+ onClick: () => {
452
+ var _a2;
453
+ return (_a2 = pagination.onPageSizeChange) == null ? void 0 : _a2.call(pagination, option);
454
+ },
455
+ children: option
456
+ },
457
+ option
458
+ ))
459
+ })
460
+ )
461
+ }
462
+ ),
463
+ /* @__PURE__ */ jsx(Label, { children: "Per Page" })
464
+ ] }),
465
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
466
+ /* @__PURE__ */ jsx(
467
+ Button,
468
+ {
469
+ id: id ? `${id}-prev-page-button` : void 0,
470
+ iconOnly: true,
471
+ leftIcon: /* @__PURE__ */ jsx(Icon, { name: "chevron_left" }),
472
+ onClick: () => pagination.onPageChange(pagination.pageIndex - 1),
473
+ variant: "tertiary",
474
+ disabled: pagination.pageIndex === 0
475
+ }
476
+ ),
477
+ /* @__PURE__ */ jsxs(Paragraph, { children: [
478
+ pagination.pageIndex * pagination.pageSize + 1,
479
+ " -",
480
+ " ",
481
+ Math.min(
482
+ (pagination.pageIndex + 1) * pagination.pageSize,
483
+ pagination.total
484
+ ),
485
+ " ",
486
+ "of ",
487
+ pagination.total
488
+ ] }),
489
+ /* @__PURE__ */ jsx(
490
+ Button,
491
+ {
492
+ id: id ? `${id}-next-page-button` : void 0,
493
+ iconOnly: true,
494
+ leftIcon: /* @__PURE__ */ jsx(Icon, { name: "chevron_right" }),
495
+ onClick: () => pagination.onPageChange(pagination.pageIndex + 1),
496
+ variant: "tertiary",
497
+ disabled: (pagination.pageIndex + 1) * pagination.pageSize >= pagination.total
498
+ }
499
+ )
500
+ ] })
466
501
  ] }),
467
- /* @__PURE__ */ jsx(
468
- Button,
469
- {
470
- iconOnly: true,
471
- leftIcon: /* @__PURE__ */ jsx(Icon, { name: "chevron_right" }),
472
- onClick: () => pagination.onPageChange(pagination.pageIndex + 1),
473
- variant: "tertiary",
474
- disabled: (pagination.pageIndex + 1) * pagination.pageSize >= pagination.total
475
- }
476
- )
502
+ status && /* @__PURE__ */ jsx(Paragraph, { children: status })
477
503
  ] })
478
- ] }),
479
- status && /* @__PURE__ */ jsx(Paragraph, { children: status })
480
- ] })
481
- ] })
504
+ ]
505
+ }
506
+ )
482
507
  }
483
508
  )
484
509
  }
@@ -486,6 +511,7 @@ function DataGrid({
486
511
  }
487
512
  DataGrid.displayName = "DataGrid";
488
513
  function TableBody({
514
+ id,
489
515
  columnVirtualizer,
490
516
  table,
491
517
  tableContainerRef,
@@ -534,6 +560,7 @@ function TableBody({
534
560
  return /* @__PURE__ */ jsx(
535
561
  DragAlongCell,
536
562
  {
563
+ id: id ? `${id}-filter-cell-${header.id}` : void 0,
537
564
  noPadding: true,
538
565
  cell: header,
539
566
  width: (_a = header.column.columnDef.meta) == null ? void 0 : _a.headerWidth,
@@ -543,6 +570,7 @@ function TableBody({
543
570
  })) != null ? _e : /* @__PURE__ */ jsx(
544
571
  Search,
545
572
  {
573
+ id: id ? `${id}-filter-search-${header.id}` : void 0,
546
574
  removeRoundness: true,
547
575
  onChange: (e) => header.column.setFilterValue(e.target.value),
548
576
  value: (_d = header.column.getFilterValue()) != null ? _d : "",
@@ -562,6 +590,7 @@ function TableBody({
562
590
  return /* @__PURE__ */ jsx(
563
591
  TableBodyRow,
564
592
  {
593
+ id,
565
594
  columnVirtualizer,
566
595
  row,
567
596
  rowVirtualizer,
@@ -584,7 +613,7 @@ function TableBody({
584
613
  transform: `translateY(${virtualRows[virtualRows.length - 1].start + 40}px)`
585
614
  },
586
615
  className: "odd:bg-background-grouped-primary-normal even:bg-background-grouped-secondary-normal",
587
- children: table.getAllLeafColumns().map((column) => /* @__PURE__ */ jsx(LoadingCell, { column: column.columnDef }, column.id))
616
+ children: table.getAllLeafColumns().map((column) => /* @__PURE__ */ jsx(LoadingCell, { id, column: column.columnDef }, column.id))
588
617
  }
589
618
  )
590
619
  ]
@@ -592,6 +621,7 @@ function TableBody({
592
621
  );
593
622
  }
594
623
  function TableBodyRow({
624
+ id,
595
625
  columnVirtualizer,
596
626
  row,
597
627
  // rowVirtualizer,
@@ -627,15 +657,24 @@ function TableBodyRow({
627
657
  virtualColumns.map((virtualColumn) => {
628
658
  var _a;
629
659
  const cell = visibleCells[virtualColumn.index];
630
- return ((_a = cell.column.columnDef.meta) == null ? void 0 : _a.useCustomRenderer) ? /* @__PURE__ */ jsx(React.Fragment, { children: flexRender(cell.column.columnDef.cell, cell.getContext()) }, cell.id) : /* @__PURE__ */ jsx(DragAlongCell, { cell, children: /* @__PURE__ */ jsx(
631
- Tooltip,
660
+ return ((_a = cell.column.columnDef.meta) == null ? void 0 : _a.useCustomRenderer) ? /* @__PURE__ */ jsx(React.Fragment, { children: flexRender(cell.column.columnDef.cell, cell.getContext()) }, cell.id) : /* @__PURE__ */ jsx(
661
+ DragAlongCell,
632
662
  {
633
- showOnTruncation: true,
634
- message: cell.getValue(),
635
- position: "bottom",
636
- children: /* @__PURE__ */ jsx(Paragraph, { addOverflow: true, tall: true, children: cell.getValue() })
637
- }
638
- ) }, cell.id);
663
+ id: id ? `${id}-cell-${cell.id}` : void 0,
664
+ cell,
665
+ children: /* @__PURE__ */ jsx(
666
+ Tooltip,
667
+ {
668
+ id: id ? `${id}-tooltip-${cell.id}` : void 0,
669
+ showOnTruncation: true,
670
+ message: cell.getValue(),
671
+ position: "bottom",
672
+ children: /* @__PURE__ */ jsx(Paragraph, { addOverflow: true, tall: true, children: cell.getValue() })
673
+ }
674
+ )
675
+ },
676
+ cell.id
677
+ );
639
678
  }),
640
679
  virtualPaddingRight ? (
641
680
  // fake empty column to the right for virtualization scroll padding
@@ -648,25 +687,36 @@ function TableBodyRow({
648
687
  );
649
688
  }
650
689
  var LoadingCell = ({
690
+ id,
651
691
  column
652
692
  }) => {
653
693
  const key = `loading-${column.id}`;
654
694
  if (column.cell === "checkbox") {
655
- return /* @__PURE__ */ jsx(DataGridCell, { children: /* @__PURE__ */ jsx(Checkbox, { disabled: true }) }, key);
695
+ return /* @__PURE__ */ jsx(DataGridCell, { id: id ? `${id}-${key}` : void 0, children: /* @__PURE__ */ jsx(Checkbox, { id: id ? `${id}-${key}-checkbox` : void 0, disabled: true }) }, key);
656
696
  }
657
697
  if (column.cell === "input") {
658
- return /* @__PURE__ */ jsx(DataGridCell, { component: "input", children: /* @__PURE__ */ jsx(
659
- Input,
698
+ return /* @__PURE__ */ jsx(
699
+ DataGridCell,
660
700
  {
661
- align: "left",
662
- disabled: true,
663
- wrapperClassName: "!rounded-none !border-0"
664
- }
665
- ) }, key);
701
+ id: id ? `${id}-${key}` : void 0,
702
+ component: "input",
703
+ children: /* @__PURE__ */ jsx(
704
+ Input,
705
+ {
706
+ id: id ? `${id}-${key}-input` : void 0,
707
+ align: "left",
708
+ disabled: true,
709
+ wrapperClassName: "!rounded-none !border-0"
710
+ }
711
+ )
712
+ },
713
+ key
714
+ );
666
715
  }
667
- return /* @__PURE__ */ jsx(DataGridCell, { children: /* @__PURE__ */ jsx("div", { className: "bg-linear-270 to-neutral-300/[24%] from-neutral-300/[12%] rounded-xs w-full max-w-25 h-6" }) }, key);
716
+ return /* @__PURE__ */ jsx(DataGridCell, { id: id ? `${id}-${key}` : void 0, children: /* @__PURE__ */ jsx("div", { className: "bg-linear-270 to-neutral-300/[24%] from-neutral-300/[12%] rounded-xs w-full max-w-25 h-6" }) }, key);
668
717
  };
669
718
  function ColumnSelectorHeaderCell({
719
+ id,
670
720
  table,
671
721
  toggleColumnVisibility,
672
722
  resetColumnVisibility
@@ -676,6 +726,7 @@ function ColumnSelectorHeaderCell({
676
726
  return /* @__PURE__ */ jsxs(
677
727
  DataGridCell,
678
728
  {
729
+ id,
679
730
  width: "48",
680
731
  type: "header",
681
732
  color: "text-secondary-normal",
@@ -684,6 +735,7 @@ function ColumnSelectorHeaderCell({
684
735
  /* @__PURE__ */ jsx(
685
736
  Button,
686
737
  {
738
+ id: id ? `${id}-button` : void 0,
687
739
  onClick: () => setShow((prev) => !prev),
688
740
  variant: "navigation",
689
741
  iconOnly: true,
@@ -693,6 +745,7 @@ function ColumnSelectorHeaderCell({
693
745
  /* @__PURE__ */ jsxs(
694
746
  Menu,
695
747
  {
748
+ id: id ? `${id}-menu` : void 0,
696
749
  positionTo: ref,
697
750
  position: "bottom-right",
698
751
  show,
@@ -701,6 +754,7 @@ function ColumnSelectorHeaderCell({
701
754
  /* @__PURE__ */ jsx(
702
755
  Button,
703
756
  {
757
+ id: id ? `${id}-reset-button` : void 0,
704
758
  variant: "tertiary",
705
759
  onClick: () => {
706
760
  resetColumnVisibility();
@@ -715,6 +769,7 @@ function ColumnSelectorHeaderCell({
715
769
  }).map((column) => /* @__PURE__ */ jsx(
716
770
  ColumnSelectorMenuOption,
717
771
  {
772
+ id: id ? `${id}-option-${column.id}` : void 0,
718
773
  column,
719
774
  toggleColumnVisibility
720
775
  },
@@ -728,14 +783,16 @@ function ColumnSelectorHeaderCell({
728
783
  );
729
784
  }
730
785
  function ColumnSelectorMenuOption({
786
+ id,
731
787
  column,
732
788
  toggleColumnVisibility
733
789
  }) {
734
790
  const [isVisible, setIsVisible] = useState(column.getIsVisible());
735
791
  const label = typeof column.columnDef.header === "string" ? column.columnDef.header : null;
736
- return /* @__PURE__ */ jsx(MenuOption, { selected: isVisible, defaultChecked: isVisible, children: /* @__PURE__ */ jsx(
792
+ return /* @__PURE__ */ jsx(MenuOption, { id, selected: isVisible, defaultChecked: isVisible, children: /* @__PURE__ */ jsx(
737
793
  Checkbox,
738
794
  {
795
+ id: id ? `${id}-checkbox` : void 0,
739
796
  label: label != null ? label : "Unknown",
740
797
  checked: isVisible,
741
798
  onChange: (e) => {