@dmsi/wedgekit-react 0.0.207 → 0.0.209

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 (45) hide show
  1. package/dist/{chunk-WNQ53SVY.js → chunk-E6Y7ZHQX.js} +45 -1
  2. package/dist/{chunk-WXHRJSDG.js → chunk-ERW3AMED.js} +1 -1
  3. package/dist/{chunk-2JRZCC2K.js → chunk-JITZWSPR.js} +3 -3
  4. package/dist/{chunk-WE55TGZZ.js → chunk-NIHZMIOL.js} +1 -1
  5. package/dist/{chunk-RXPS5GVE.js → chunk-Q3TNALWH.js} +17 -26
  6. package/dist/{chunk-M3433XEJ.js → chunk-T3F37S6Z.js} +15 -1
  7. package/dist/{chunk-2B5T4NCT.js → chunk-UKSJPFN2.js} +2 -2
  8. package/dist/components/DataGridCell.cjs +814 -824
  9. package/dist/components/DataGridCell.js +7 -6
  10. package/dist/components/DateInput.cjs +23 -23
  11. package/dist/components/DateInput.js +4 -4
  12. package/dist/components/DateRangeInput.cjs +23 -23
  13. package/dist/components/DateRangeInput.js +4 -4
  14. package/dist/components/Menu.cjs +38 -35
  15. package/dist/components/Menu.js +6 -4
  16. package/dist/components/MenuOption.cjs +7 -4
  17. package/dist/components/MenuOption.js +5 -2
  18. package/dist/components/Modal.cjs +15 -12
  19. package/dist/components/Modal.js +5 -3
  20. package/dist/components/NestedMenu.cjs +9 -6
  21. package/dist/components/NestedMenu.js +5 -2
  22. package/dist/components/PDFViewer.cjs +22 -19
  23. package/dist/components/PDFViewer.js +5 -3
  24. package/dist/components/ProjectBar.cjs +3 -0
  25. package/dist/components/ProjectBar.js +4 -1
  26. package/dist/components/Time.js +2 -1
  27. package/dist/components/index.cjs +963 -905
  28. package/dist/components/index.js +70 -45
  29. package/dist/components/useMenuSystem.cjs +22 -19
  30. package/dist/components/useMenuSystem.js +5 -2
  31. package/dist/hooks/index.cjs +66 -2
  32. package/dist/hooks/index.js +8 -3
  33. package/dist/utils/index.cjs +25 -0
  34. package/dist/utils/index.js +3 -1
  35. package/package.json +1 -1
  36. package/src/components/DataGrid/TableBody/TableBodyRow.tsx +0 -4
  37. package/src/components/DataGrid/TableBody/index.tsx +14 -3
  38. package/src/components/DataGrid/index.tsx +58 -35
  39. package/src/components/DataGridCell.tsx +11 -17
  40. package/src/hooks/index.ts +1 -0
  41. package/src/hooks/useTableLayout.ts +68 -0
  42. package/src/utils/index.ts +1 -0
  43. package/src/utils/mergeObjectArrays.ts +18 -0
  44. package/src/utils.ts +1 -0
  45. /package/dist/{chunk-6LN6QT6M.js → chunk-VXWSAIB5.js} +0 -0
@@ -4,12 +4,13 @@ import {
4
4
  DataGridCell,
5
5
  DragAlongCell,
6
6
  DraggableCellHeader
7
- } from "../chunk-RXPS5GVE.js";
8
- import "../chunk-2JRZCC2K.js";
9
- import "../chunk-WE55TGZZ.js";
10
- import "../chunk-WXHRJSDG.js";
11
- import "../chunk-WNQ53SVY.js";
12
- import "../chunk-6LN6QT6M.js";
7
+ } from "../chunk-Q3TNALWH.js";
8
+ import "../chunk-JITZWSPR.js";
9
+ import "../chunk-NIHZMIOL.js";
10
+ import "../chunk-ERW3AMED.js";
11
+ import "../chunk-E6Y7ZHQX.js";
12
+ import "../chunk-VXWSAIB5.js";
13
+ import "../chunk-T3F37S6Z.js";
13
14
  import "../chunk-2WRRRPEB.js";
14
15
  import "../chunk-7W4I2NK3.js";
15
16
  import "../chunk-5UH6QUFB.js";
@@ -1019,29 +1019,6 @@ function CalendarRange({
1019
1019
  );
1020
1020
  }
1021
1021
 
1022
- // src/utils.ts
1023
- function findDocumentRoot(element) {
1024
- if (typeof window === "undefined" || typeof document === "undefined") {
1025
- throw new Error(
1026
- "findDocumentRoot can only be used in a browser environment."
1027
- );
1028
- }
1029
- if (!element || !(element instanceof Node)) {
1030
- return window.document.body;
1031
- }
1032
- let currentElement = element;
1033
- while (currentElement && currentElement.parentNode) {
1034
- if (currentElement.parentNode === document) {
1035
- return document.body;
1036
- } else if (currentElement.parentNode instanceof DocumentFragment) {
1037
- return currentElement.parentNode;
1038
- } else {
1039
- currentElement = currentElement.parentNode;
1040
- }
1041
- }
1042
- return window.document.body;
1043
- }
1044
-
1045
1022
  // src/utils/date.ts
1046
1023
  function parseInputDate(input) {
1047
1024
  const match = input.match(/^(\d{1,2})\/(\d{1,2})\/(\d{4})$/);
@@ -1160,6 +1137,29 @@ function formatDate(date) {
1160
1137
  }
1161
1138
  }
1162
1139
 
1140
+ // src/utils.ts
1141
+ function findDocumentRoot(element) {
1142
+ if (typeof window === "undefined" || typeof document === "undefined") {
1143
+ throw new Error(
1144
+ "findDocumentRoot can only be used in a browser environment."
1145
+ );
1146
+ }
1147
+ if (!element || !(element instanceof Node)) {
1148
+ return window.document.body;
1149
+ }
1150
+ let currentElement = element;
1151
+ while (currentElement && currentElement.parentNode) {
1152
+ if (currentElement.parentNode === document) {
1153
+ return document.body;
1154
+ } else if (currentElement.parentNode instanceof DocumentFragment) {
1155
+ return currentElement.parentNode;
1156
+ } else {
1157
+ currentElement = currentElement.parentNode;
1158
+ }
1159
+ }
1160
+ return window.document.body;
1161
+ }
1162
+
1163
1163
  // src/components/DateInput.tsx
1164
1164
  var import_jsx_runtime5 = require("react/jsx-runtime");
1165
1165
  var DateInput = (_a) => {
@@ -1,13 +1,13 @@
1
+ import {
2
+ findDocumentRoot
3
+ } from "../chunk-VXWSAIB5.js";
1
4
  import {
2
5
  calculateCursorPosition,
3
6
  formatDate,
4
7
  formatInputValue,
5
8
  isValidDate,
6
9
  parseInputDate
7
- } from "../chunk-M3433XEJ.js";
8
- import {
9
- findDocumentRoot
10
- } from "../chunk-6LN6QT6M.js";
10
+ } from "../chunk-T3F37S6Z.js";
11
11
  import {
12
12
  InputBase
13
13
  } from "../chunk-7W4I2NK3.js";
@@ -1019,29 +1019,6 @@ function CalendarRange({
1019
1019
  );
1020
1020
  }
1021
1021
 
1022
- // src/utils.ts
1023
- function findDocumentRoot(element) {
1024
- if (typeof window === "undefined" || typeof document === "undefined") {
1025
- throw new Error(
1026
- "findDocumentRoot can only be used in a browser environment."
1027
- );
1028
- }
1029
- if (!element || !(element instanceof Node)) {
1030
- return window.document.body;
1031
- }
1032
- let currentElement = element;
1033
- while (currentElement && currentElement.parentNode) {
1034
- if (currentElement.parentNode === document) {
1035
- return document.body;
1036
- } else if (currentElement.parentNode instanceof DocumentFragment) {
1037
- return currentElement.parentNode;
1038
- } else {
1039
- currentElement = currentElement.parentNode;
1040
- }
1041
- }
1042
- return window.document.body;
1043
- }
1044
-
1045
1022
  // src/utils/date.ts
1046
1023
  function parseInputDate(input) {
1047
1024
  const match = input.match(/^(\d{1,2})\/(\d{1,2})\/(\d{4})$/);
@@ -1168,6 +1145,29 @@ function isValidDateRangeOrder(fromDate, toDate) {
1168
1145
  return to >= from;
1169
1146
  }
1170
1147
 
1148
+ // src/utils.ts
1149
+ function findDocumentRoot(element) {
1150
+ if (typeof window === "undefined" || typeof document === "undefined") {
1151
+ throw new Error(
1152
+ "findDocumentRoot can only be used in a browser environment."
1153
+ );
1154
+ }
1155
+ if (!element || !(element instanceof Node)) {
1156
+ return window.document.body;
1157
+ }
1158
+ let currentElement = element;
1159
+ while (currentElement && currentElement.parentNode) {
1160
+ if (currentElement.parentNode === document) {
1161
+ return document.body;
1162
+ } else if (currentElement.parentNode instanceof DocumentFragment) {
1163
+ return currentElement.parentNode;
1164
+ } else {
1165
+ currentElement = currentElement.parentNode;
1166
+ }
1167
+ }
1168
+ return window.document.body;
1169
+ }
1170
+
1171
1171
  // src/components/DateRangeInput.tsx
1172
1172
  var import_jsx_runtime5 = require("react/jsx-runtime");
1173
1173
  var DateRangeInput = (_a) => {
@@ -1,3 +1,6 @@
1
+ import {
2
+ findDocumentRoot
3
+ } from "../chunk-VXWSAIB5.js";
1
4
  import {
2
5
  calculateCursorPosition,
3
6
  formatDate,
@@ -5,10 +8,7 @@ import {
5
8
  isValidDate,
6
9
  isValidDateRangeOrder,
7
10
  parseInputDate
8
- } from "../chunk-M3433XEJ.js";
9
- import {
10
- findDocumentRoot
11
- } from "../chunk-6LN6QT6M.js";
11
+ } from "../chunk-T3F37S6Z.js";
12
12
  import {
13
13
  InputBase
14
14
  } from "../chunk-7W4I2NK3.js";
@@ -64,11 +64,11 @@ __export(Menu_exports, {
64
64
  });
65
65
  module.exports = __toCommonJS(Menu_exports);
66
66
  var import_clsx = __toESM(require("clsx"), 1);
67
- var import_react5 = require("react");
67
+ var import_react6 = require("react");
68
68
  var import_react_dom = require("react-dom");
69
69
 
70
70
  // src/components/useMenuSystem.tsx
71
- var import_react4 = require("react");
71
+ var import_react5 = require("react");
72
72
 
73
73
  // src/hooks/useKeydown.ts
74
74
  var import_react = require("react");
@@ -91,15 +91,41 @@ var useMatchesMedia = (query) => {
91
91
  };
92
92
  var useMatchesMobile = () => useMatchesMedia("(width < 48rem)");
93
93
 
94
+ // src/utils.ts
95
+ function findDocumentRoot(element) {
96
+ if (typeof window === "undefined" || typeof document === "undefined") {
97
+ throw new Error(
98
+ "findDocumentRoot can only be used in a browser environment."
99
+ );
100
+ }
101
+ if (!element || !(element instanceof Node)) {
102
+ return window.document.body;
103
+ }
104
+ let currentElement = element;
105
+ while (currentElement && currentElement.parentNode) {
106
+ if (currentElement.parentNode === document) {
107
+ return document.body;
108
+ } else if (currentElement.parentNode instanceof DocumentFragment) {
109
+ return currentElement.parentNode;
110
+ } else {
111
+ currentElement = currentElement.parentNode;
112
+ }
113
+ }
114
+ return window.document.body;
115
+ }
116
+
117
+ // src/hooks/useTableLayout.ts
118
+ var import_react4 = require("react");
119
+
94
120
  // src/components/useMenuSystem.tsx
95
121
  function useMenuPosition(elementRef, position = "bottom", options) {
96
- const [menuPosition, setMenuPosition] = (0, import_react4.useState)({
122
+ const [menuPosition, setMenuPosition] = (0, import_react5.useState)({
97
123
  top: 0,
98
124
  left: 0,
99
125
  minWidth: 0
100
126
  });
101
127
  const isMobile = options == null ? void 0 : options.isMobile;
102
- const updatePosition = (0, import_react4.useCallback)(() => {
128
+ const updatePosition = (0, import_react5.useCallback)(() => {
103
129
  var _a, _b, _c;
104
130
  if (!(elementRef == null ? void 0 : elementRef.current)) return;
105
131
  const triggerRect = elementRef.current.getBoundingClientRect();
@@ -147,7 +173,7 @@ function useMenuPosition(elementRef, position = "bottom", options) {
147
173
  minWidth: triggerRect.width
148
174
  });
149
175
  }, [elementRef, position, options == null ? void 0 : options.menuRef, options == null ? void 0 : options.topOffset, isMobile]);
150
- (0, import_react4.useEffect)(() => {
176
+ (0, import_react5.useEffect)(() => {
151
177
  if (!(options == null ? void 0 : options.isOpen) || !(options == null ? void 0 : options.setIsOpen)) return;
152
178
  const handleClickOutside = (event) => {
153
179
  var _a, _b, _c, _d, _e;
@@ -173,7 +199,7 @@ function useMenuPosition(elementRef, position = "bottom", options) {
173
199
  options == null ? void 0 : options.menuRef,
174
200
  options == null ? void 0 : options.additionalRefs
175
201
  ]);
176
- (0, import_react4.useEffect)(() => {
202
+ (0, import_react5.useEffect)(() => {
177
203
  updatePosition();
178
204
  const resizeObserver = new ResizeObserver(updatePosition);
179
205
  if (elementRef == null ? void 0 : elementRef.current) {
@@ -190,29 +216,6 @@ function useMenuPosition(elementRef, position = "bottom", options) {
190
216
  return { menuPosition, updatePosition };
191
217
  }
192
218
 
193
- // src/utils.ts
194
- function findDocumentRoot(element) {
195
- if (typeof window === "undefined" || typeof document === "undefined") {
196
- throw new Error(
197
- "findDocumentRoot can only be used in a browser environment."
198
- );
199
- }
200
- if (!element || !(element instanceof Node)) {
201
- return window.document.body;
202
- }
203
- let currentElement = element;
204
- while (currentElement && currentElement.parentNode) {
205
- if (currentElement.parentNode === document) {
206
- return document.body;
207
- } else if (currentElement.parentNode instanceof DocumentFragment) {
208
- return currentElement.parentNode;
209
- } else {
210
- currentElement = currentElement.parentNode;
211
- }
212
- }
213
- return window.document.body;
214
- }
215
-
216
219
  // src/components/Menu.tsx
217
220
  var import_jsx_runtime = require("react/jsx-runtime");
218
221
  var Menu = (_a) => {
@@ -255,9 +258,9 @@ var Menu = (_a) => {
255
258
  "menuName",
256
259
  "calculateMinMaxHeight"
257
260
  ]);
258
- const internalRef = (0, import_react5.useRef)(null);
261
+ const internalRef = (0, import_react6.useRef)(null);
259
262
  const actualRef = ref || internalRef;
260
- const [maxHeight, setMaxHeight] = (0, import_react5.useState)("180px");
263
+ const [maxHeight, setMaxHeight] = (0, import_react6.useState)("180px");
261
264
  const isMobile = useMatchesMobile();
262
265
  const { menuPosition, updatePosition } = useMenuPosition(
263
266
  isMobile && mobilePositionTo ? mobilePositionTo : positionTo,
@@ -270,7 +273,7 @@ var Menu = (_a) => {
270
273
  isMobile: !!(isMobile && mobilePositionTo)
271
274
  }
272
275
  );
273
- (0, import_react5.useEffect)(() => {
276
+ (0, import_react6.useEffect)(() => {
274
277
  if (calculateMinMaxHeight) {
275
278
  return;
276
279
  }
@@ -294,7 +297,7 @@ var Menu = (_a) => {
294
297
  cancelAnimationFrame(raf);
295
298
  };
296
299
  }, [actualRef.current, customMaxHeight, calculateMinMaxHeight]);
297
- (0, import_react5.useEffect)(() => {
300
+ (0, import_react6.useEffect)(() => {
298
301
  if (!calculateMinMaxHeight) {
299
302
  return;
300
303
  }
@@ -305,14 +308,14 @@ var Menu = (_a) => {
305
308
  setMaxHeight(`${calculatedMaxHeight}px`);
306
309
  }
307
310
  }, [actualRef.current, positionTo == null ? void 0 : positionTo.current, calculateMinMaxHeight]);
308
- (0, import_react5.useEffect)(() => {
311
+ (0, import_react6.useEffect)(() => {
309
312
  if (!show) {
310
313
  return;
311
314
  }
312
315
  initializeMenuFocus();
313
316
  updatePosition();
314
317
  }, [show, updatePosition]);
315
- (0, import_react5.useEffect)(() => {
318
+ (0, import_react6.useEffect)(() => {
316
319
  if (!show || !setShow) {
317
320
  return;
318
321
  }
@@ -1,10 +1,12 @@
1
1
  "use client";
2
2
  import {
3
3
  Menu
4
- } from "../chunk-2JRZCC2K.js";
5
- import "../chunk-WE55TGZZ.js";
6
- import "../chunk-WNQ53SVY.js";
7
- import "../chunk-6LN6QT6M.js";
4
+ } from "../chunk-JITZWSPR.js";
5
+ import "../chunk-NIHZMIOL.js";
6
+ import "../chunk-E6Y7ZHQX.js";
7
+ import "../chunk-VXWSAIB5.js";
8
+ import "../chunk-T3F37S6Z.js";
9
+ import "../chunk-5UH6QUFB.js";
8
10
  import "../chunk-BBZEL7EG.js";
9
11
  export {
10
12
  Menu
@@ -64,7 +64,7 @@ __export(MenuOption_exports, {
64
64
  });
65
65
  module.exports = __toCommonJS(MenuOption_exports);
66
66
  var import_clsx5 = __toESM(require("clsx"), 1);
67
- var import_react4 = require("react");
67
+ var import_react5 = require("react");
68
68
 
69
69
  // src/classNames.ts
70
70
  var import_clsx = __toESM(require("clsx"), 1);
@@ -345,6 +345,9 @@ var useMatchesMedia = (query) => {
345
345
  };
346
346
  var useMatchesMobile = () => useMatchesMedia("(width < 48rem)");
347
347
 
348
+ // src/hooks/useTableLayout.ts
349
+ var import_react4 = require("react");
350
+
348
351
  // src/components/MenuOption.tsx
349
352
  var import_jsx_runtime4 = require("react/jsx-runtime");
350
353
  var MenuOption = ({
@@ -373,10 +376,10 @@ var MenuOption = ({
373
376
  menuValue,
374
377
  onMouseMove
375
378
  }) => {
376
- const uniqueId = (0, import_react4.useId)();
377
- const internalRef = (0, import_react4.useRef)(null);
379
+ const uniqueId = (0, import_react5.useId)();
380
+ const internalRef = (0, import_react5.useRef)(null);
378
381
  const actualRef = ref || internalRef;
379
- const menuId = (0, import_react4.useRef)(`menu-${uniqueId}`);
382
+ const menuId = (0, import_react5.useRef)(`menu-${uniqueId}`);
380
383
  const isMobile = useMatchesMobile();
381
384
  const handleMouseEnter = () => {
382
385
  if (subMenu && onSubMenuHover && !disabled) {
@@ -1,8 +1,11 @@
1
1
  "use client";
2
2
  import {
3
3
  MenuOption
4
- } from "../chunk-WXHRJSDG.js";
5
- import "../chunk-WNQ53SVY.js";
4
+ } from "../chunk-ERW3AMED.js";
5
+ import "../chunk-E6Y7ZHQX.js";
6
+ import "../chunk-VXWSAIB5.js";
7
+ import "../chunk-T3F37S6Z.js";
8
+ import "../chunk-5UH6QUFB.js";
6
9
  import "../chunk-CJVTFYI4.js";
7
10
  import "../chunk-CJELWEO2.js";
8
11
  import "../chunk-UAPWR2KE.js";
@@ -64,7 +64,7 @@ __export(Modal_exports, {
64
64
  });
65
65
  module.exports = __toCommonJS(Modal_exports);
66
66
  var import_clsx9 = __toESM(require("clsx"), 1);
67
- var import_react5 = require("react");
67
+ var import_react6 = require("react");
68
68
 
69
69
  // src/components/Heading.tsx
70
70
  var import_clsx2 = __toESM(require("clsx"), 1);
@@ -633,11 +633,14 @@ var useMatchesMedia = (query) => {
633
633
  };
634
634
  var useMatchesMobile = () => useMatchesMedia("(width < 48rem)");
635
635
 
636
- // src/components/useMounted.tsx
636
+ // src/hooks/useTableLayout.ts
637
637
  var import_react4 = require("react");
638
+
639
+ // src/components/useMounted.tsx
640
+ var import_react5 = require("react");
638
641
  var useMounted = () => {
639
- const [isMounted, setIsMounted] = (0, import_react4.useState)(false);
640
- (0, import_react4.useEffect)(() => {
642
+ const [isMounted, setIsMounted] = (0, import_react5.useState)(false);
643
+ (0, import_react5.useEffect)(() => {
641
644
  setIsMounted(true);
642
645
  return () => setIsMounted(false);
643
646
  }, []);
@@ -723,12 +726,12 @@ var Modal = ({
723
726
  }) => {
724
727
  var _a;
725
728
  const mounted = useMounted();
726
- const modalRef = (0, import_react5.useRef)(null);
727
- const bgRef = (0, import_react5.useRef)(null);
729
+ const modalRef = (0, import_react6.useRef)(null);
730
+ const bgRef = (0, import_react6.useRef)(null);
728
731
  const wasOpen = (0, import_react_use.usePrevious)(open);
729
732
  const isMobile = useMatchesMobile();
730
733
  const computedFixedHeightScrolling = isMobile || fixedHeightScrolling;
731
- (0, import_react5.useEffect)(() => {
734
+ (0, import_react6.useEffect)(() => {
732
735
  if (!mounted) return;
733
736
  if (!modalRef.current || !bgRef.current) {
734
737
  console.error("Modal or background reference is not set.");
@@ -748,7 +751,7 @@ var Modal = ({
748
751
  bgFadeIn(bgRef.current);
749
752
  }
750
753
  }, [mounted, onClose, open, wasOpen]);
751
- const handleKeyDown = (0, import_react5.useCallback)(
754
+ const handleKeyDown = (0, import_react6.useCallback)(
752
755
  (e) => {
753
756
  if (e.key === "Escape") {
754
757
  if (onClose) {
@@ -759,12 +762,12 @@ var Modal = ({
759
762
  },
760
763
  [onClose]
761
764
  );
762
- const handleClose = (0, import_react5.useCallback)(() => {
765
+ const handleClose = (0, import_react6.useCallback)(() => {
763
766
  if (onClose) {
764
767
  onClose();
765
768
  }
766
769
  }, [onClose]);
767
- (0, import_react5.useEffect)(() => {
770
+ (0, import_react6.useEffect)(() => {
768
771
  if (open) {
769
772
  document.addEventListener("keyup", handleKeyDown);
770
773
  }
@@ -772,7 +775,7 @@ var Modal = ({
772
775
  document.removeEventListener("keyup", handleKeyDown);
773
776
  };
774
777
  }, [open, handleKeyDown]);
775
- (0, import_react5.useEffect)(() => {
778
+ (0, import_react6.useEffect)(() => {
776
779
  if (!open) return;
777
780
  const scrollY = window.scrollY;
778
781
  const body = document.body;
@@ -793,7 +796,7 @@ var Modal = ({
793
796
  };
794
797
  }, [open]);
795
798
  const { sizeClass } = (_a = sizes[size]) != null ? _a : sizes.small;
796
- const backgroundClickHandler = (0, import_react5.useCallback)(
799
+ const backgroundClickHandler = (0, import_react6.useCallback)(
797
800
  (e) => {
798
801
  const target = e.target;
799
802
  const currentTarget = e.currentTarget;
@@ -1,15 +1,17 @@
1
1
  "use client";
2
2
  import {
3
3
  Modal
4
- } from "../chunk-2B5T4NCT.js";
4
+ } from "../chunk-UKSJPFN2.js";
5
5
  import "../chunk-4RJKB7LC.js";
6
6
  import "../chunk-47KTDBGA.js";
7
7
  import "../chunk-SYEJVSE4.js";
8
8
  import "../chunk-A5ROZWIH.js";
9
9
  import "../chunk-ZFOANBWG.js";
10
10
  import "../chunk-REOLWEZG.js";
11
- import "../chunk-WNQ53SVY.js";
12
- import "../chunk-6LN6QT6M.js";
11
+ import "../chunk-E6Y7ZHQX.js";
12
+ import "../chunk-VXWSAIB5.js";
13
+ import "../chunk-T3F37S6Z.js";
14
+ import "../chunk-5UH6QUFB.js";
13
15
  import "../chunk-SK742QNF.js";
14
16
  import "../chunk-UAPWR2KE.js";
15
17
  import "../chunk-RDLEIAQU.js";
@@ -63,7 +63,7 @@ __export(NestedMenu_exports, {
63
63
  NestedMenu: () => NestedMenu
64
64
  });
65
65
  module.exports = __toCommonJS(NestedMenu_exports);
66
- var import_react5 = require("react");
66
+ var import_react6 = require("react");
67
67
 
68
68
  // src/components/Icon.tsx
69
69
  var import_clsx = __toESM(require("clsx"), 1);
@@ -102,7 +102,7 @@ function Icon(_a) {
102
102
 
103
103
  // src/components/MenuOption.tsx
104
104
  var import_clsx5 = __toESM(require("clsx"), 1);
105
- var import_react4 = require("react");
105
+ var import_react5 = require("react");
106
106
 
107
107
  // src/classNames.ts
108
108
  var import_clsx2 = __toESM(require("clsx"), 1);
@@ -374,6 +374,9 @@ var useMatchesMedia = (query) => {
374
374
  };
375
375
  var useMatchesMobile = () => useMatchesMedia("(width < 48rem)");
376
376
 
377
+ // src/hooks/useTableLayout.ts
378
+ var import_react4 = require("react");
379
+
377
380
  // src/components/MenuOption.tsx
378
381
  var import_jsx_runtime4 = require("react/jsx-runtime");
379
382
  var MenuOption = ({
@@ -402,10 +405,10 @@ var MenuOption = ({
402
405
  menuValue,
403
406
  onMouseMove
404
407
  }) => {
405
- const uniqueId = (0, import_react4.useId)();
406
- const internalRef = (0, import_react4.useRef)(null);
408
+ const uniqueId = (0, import_react5.useId)();
409
+ const internalRef = (0, import_react5.useRef)(null);
407
410
  const actualRef = ref || internalRef;
408
- const menuId = (0, import_react4.useRef)(`menu-${uniqueId}`);
411
+ const menuId = (0, import_react5.useRef)(`menu-${uniqueId}`);
409
412
  const isMobile = useMatchesMobile();
410
413
  const handleMouseEnter = () => {
411
414
  if (subMenu && onSubMenuHover && !disabled) {
@@ -559,7 +562,7 @@ var import_jsx_runtime5 = require("react/jsx-runtime");
559
562
  function NestedMenu(props) {
560
563
  var _a;
561
564
  const { onMenuClick, currentMenu, testid } = props;
562
- const [selectedIndex, setSelectedIndex] = (0, import_react5.useState)(0);
565
+ const [selectedIndex, setSelectedIndex] = (0, import_react6.useState)(0);
563
566
  useKeydown(
564
567
  {
565
568
  Escape: () => {
@@ -1,10 +1,13 @@
1
1
  "use client";
2
2
  import {
3
3
  MenuOption
4
- } from "../chunk-WXHRJSDG.js";
4
+ } from "../chunk-ERW3AMED.js";
5
5
  import {
6
6
  useKeydown
7
- } from "../chunk-WNQ53SVY.js";
7
+ } from "../chunk-E6Y7ZHQX.js";
8
+ import "../chunk-VXWSAIB5.js";
9
+ import "../chunk-T3F37S6Z.js";
10
+ import "../chunk-5UH6QUFB.js";
8
11
  import "../chunk-CJVTFYI4.js";
9
12
  import "../chunk-CJELWEO2.js";
10
13
  import {
@@ -84,11 +84,11 @@ __export(PDFViewer_exports, {
84
84
  });
85
85
  module.exports = __toCommonJS(PDFViewer_exports);
86
86
  var import_react_pdf = require("@mikecousins/react-pdf");
87
- var import_react6 = require("react");
87
+ var import_react7 = require("react");
88
88
 
89
89
  // src/components/Modal.tsx
90
90
  var import_clsx9 = __toESM(require("clsx"), 1);
91
- var import_react5 = require("react");
91
+ var import_react6 = require("react");
92
92
 
93
93
  // src/components/Heading.tsx
94
94
  var import_clsx2 = __toESM(require("clsx"), 1);
@@ -657,11 +657,14 @@ var useMatchesMedia = (query) => {
657
657
  };
658
658
  var useMatchesMobile = () => useMatchesMedia("(width < 48rem)");
659
659
 
660
- // src/components/useMounted.tsx
660
+ // src/hooks/useTableLayout.ts
661
661
  var import_react4 = require("react");
662
+
663
+ // src/components/useMounted.tsx
664
+ var import_react5 = require("react");
662
665
  var useMounted = () => {
663
- const [isMounted, setIsMounted] = (0, import_react4.useState)(false);
664
- (0, import_react4.useEffect)(() => {
666
+ const [isMounted, setIsMounted] = (0, import_react5.useState)(false);
667
+ (0, import_react5.useEffect)(() => {
665
668
  setIsMounted(true);
666
669
  return () => setIsMounted(false);
667
670
  }, []);
@@ -747,12 +750,12 @@ var Modal = ({
747
750
  }) => {
748
751
  var _a;
749
752
  const mounted = useMounted();
750
- const modalRef = (0, import_react5.useRef)(null);
751
- const bgRef = (0, import_react5.useRef)(null);
753
+ const modalRef = (0, import_react6.useRef)(null);
754
+ const bgRef = (0, import_react6.useRef)(null);
752
755
  const wasOpen = (0, import_react_use.usePrevious)(open);
753
756
  const isMobile = useMatchesMobile();
754
757
  const computedFixedHeightScrolling = isMobile || fixedHeightScrolling;
755
- (0, import_react5.useEffect)(() => {
758
+ (0, import_react6.useEffect)(() => {
756
759
  if (!mounted) return;
757
760
  if (!modalRef.current || !bgRef.current) {
758
761
  console.error("Modal or background reference is not set.");
@@ -772,7 +775,7 @@ var Modal = ({
772
775
  bgFadeIn(bgRef.current);
773
776
  }
774
777
  }, [mounted, onClose, open, wasOpen]);
775
- const handleKeyDown = (0, import_react5.useCallback)(
778
+ const handleKeyDown = (0, import_react6.useCallback)(
776
779
  (e) => {
777
780
  if (e.key === "Escape") {
778
781
  if (onClose) {
@@ -783,12 +786,12 @@ var Modal = ({
783
786
  },
784
787
  [onClose]
785
788
  );
786
- const handleClose = (0, import_react5.useCallback)(() => {
789
+ const handleClose = (0, import_react6.useCallback)(() => {
787
790
  if (onClose) {
788
791
  onClose();
789
792
  }
790
793
  }, [onClose]);
791
- (0, import_react5.useEffect)(() => {
794
+ (0, import_react6.useEffect)(() => {
792
795
  if (open) {
793
796
  document.addEventListener("keyup", handleKeyDown);
794
797
  }
@@ -796,7 +799,7 @@ var Modal = ({
796
799
  document.removeEventListener("keyup", handleKeyDown);
797
800
  };
798
801
  }, [open, handleKeyDown]);
799
- (0, import_react5.useEffect)(() => {
802
+ (0, import_react6.useEffect)(() => {
800
803
  if (!open) return;
801
804
  const scrollY = window.scrollY;
802
805
  const body = document.body;
@@ -817,7 +820,7 @@ var Modal = ({
817
820
  };
818
821
  }, [open]);
819
822
  const { sizeClass } = (_a = sizes[size]) != null ? _a : sizes.small;
820
- const backgroundClickHandler = (0, import_react5.useCallback)(
823
+ const backgroundClickHandler = (0, import_react6.useCallback)(
821
824
  (e) => {
822
825
  const target = e.target;
823
826
  const currentTarget = e.currentTarget;
@@ -1236,9 +1239,9 @@ Paragraph.displayName = "Paragraph";
1236
1239
  var import_jsx_runtime12 = require("react/jsx-runtime");
1237
1240
  function PDFViewer(props) {
1238
1241
  const { isOpen, onClose, encodedPdfs, customActions, testid } = props;
1239
- const [currentIndex, setCurrentIndex] = (0, import_react6.useState)(0);
1240
- const [isDownloading, setIsDownloading] = (0, import_react6.useState)(false);
1241
- const handleDownload = (0, import_react6.useCallback)(() => {
1242
+ const [currentIndex, setCurrentIndex] = (0, import_react7.useState)(0);
1243
+ const [isDownloading, setIsDownloading] = (0, import_react7.useState)(false);
1244
+ const handleDownload = (0, import_react7.useCallback)(() => {
1242
1245
  setIsDownloading(true);
1243
1246
  const link = document.createElement("a");
1244
1247
  const currentPdf = encodedPdfs[currentIndex];
@@ -1323,9 +1326,9 @@ function DownloadIcon({
1323
1326
  );
1324
1327
  }
1325
1328
  function PDFElement({ b64, testid }) {
1326
- const canvasRef = (0, import_react6.useRef)(null);
1327
- const [pages, setPages] = (0, import_react6.useState)([]);
1328
- (0, import_react6.useEffect)(() => {
1329
+ const canvasRef = (0, import_react7.useRef)(null);
1330
+ const [pages, setPages] = (0, import_react7.useState)([]);
1331
+ (0, import_react7.useEffect)(() => {
1329
1332
  setPages([]);
1330
1333
  }, [b64]);
1331
1334
  const { pdfDocument } = (0, import_react_pdf.usePdf)({