@dmsi/wedgekit-react 0.0.369 → 0.0.371

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 (205) hide show
  1. package/dist/{chunk-RLLQRVM7.js → chunk-2H35FETR.js} +18 -10
  2. package/dist/chunk-2IKT6IHB.js +190 -0
  3. package/dist/chunk-4UNWXB4A.js +89 -0
  4. package/dist/chunk-5IFPG6TS.js +17 -0
  5. package/dist/{chunk-6GAYJCFE.js → chunk-6DPFKSCT.js} +1 -1
  6. package/dist/{chunk-ZFOANBWG.js → chunk-AG43RS4Q.js} +2 -1
  7. package/dist/chunk-AJ5M6MVX.js +7 -0
  8. package/dist/chunk-AT4AWD6B.js +44 -0
  9. package/dist/chunk-BQNPOGD5.js +105 -0
  10. package/dist/chunk-CQFPNZTN.js +172 -0
  11. package/dist/chunk-EJSPFQCY.js +29 -0
  12. package/dist/chunk-ER6RCOH3.js +97 -0
  13. package/dist/{chunk-4VER5OEU.js → chunk-FBE2HGEF.js} +35 -11
  14. package/dist/chunk-HPQWEZJL.js +45 -0
  15. package/dist/{chunk-URCLLHO5.js → chunk-IBX6DVHU.js} +376 -102
  16. package/dist/{chunk-I3WFZOFY.js → chunk-J5V2JRIK.js} +1 -1
  17. package/dist/chunk-JGJUVJKD.js +283 -0
  18. package/dist/chunk-KEMCFN4U.js +78 -0
  19. package/dist/chunk-M6TSTDNZ.js +22 -0
  20. package/dist/chunk-M7INAUAJ.js +140 -0
  21. package/dist/chunk-MBZ55T2D.js +51 -0
  22. package/dist/chunk-N6PNLLNS.js +77 -0
  23. package/dist/{chunk-ZA5E7ZYM.js → chunk-NXGUDYRR.js} +1 -1
  24. package/dist/chunk-P36QKH26.js +143 -0
  25. package/dist/chunk-PTRZHGHA.js +89 -0
  26. package/dist/chunk-QVWYTQKL.js +29 -0
  27. package/dist/{chunk-6CPGOW6J.js → chunk-T36HX6QY.js} +6 -4
  28. package/dist/chunk-U6PUOGG4.js +114 -0
  29. package/dist/{chunk-NQXZBWDZ.js → chunk-V6U7LU6M.js} +15 -6
  30. package/dist/chunk-VJVY6NPF.js +32 -0
  31. package/dist/chunk-VVXPGI2P.js +61 -0
  32. package/dist/{chunk-ARQBSR3I.js → chunk-YCKRVNJ3.js} +4 -4
  33. package/dist/chunk-YYHQLQDQ.js +68 -0
  34. package/dist/components/Accordion.cjs +47 -14
  35. package/dist/components/Accordion.js +2 -2
  36. package/dist/components/CalendarRange.cjs +700 -46
  37. package/dist/components/CalendarRange.css +186 -3
  38. package/dist/components/CalendarRange.js +43 -11
  39. package/dist/components/CompactImagesPreview.cjs +485 -0
  40. package/dist/components/CompactImagesPreview.js +13 -0
  41. package/dist/components/ContentTabs.cjs +3 -2
  42. package/dist/components/ContentTabs.js +3 -2
  43. package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.cjs +4687 -0
  44. package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.css +5051 -0
  45. package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.js +62 -0
  46. package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.cjs +4687 -0
  47. package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.css +5051 -0
  48. package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.js +62 -0
  49. package/dist/components/DataGrid/PinnedColumns.cjs +4687 -0
  50. package/dist/components/DataGrid/PinnedColumns.css +5051 -0
  51. package/dist/components/DataGrid/PinnedColumns.js +62 -0
  52. package/dist/components/DataGrid/TableBody/LoadingCell.cjs +4689 -0
  53. package/dist/components/DataGrid/TableBody/LoadingCell.css +5051 -0
  54. package/dist/components/DataGrid/TableBody/LoadingCell.js +62 -0
  55. package/dist/components/DataGrid/TableBody/TableBodyRow.cjs +4689 -0
  56. package/dist/components/DataGrid/TableBody/TableBodyRow.css +5051 -0
  57. package/dist/components/DataGrid/TableBody/TableBodyRow.js +62 -0
  58. package/dist/components/DataGrid/TableBody/index.cjs +4689 -0
  59. package/dist/components/DataGrid/TableBody/index.css +5051 -0
  60. package/dist/components/DataGrid/TableBody/index.js +62 -0
  61. package/dist/components/DataGrid/index.cjs +4692 -0
  62. package/dist/components/DataGrid/index.css +5051 -0
  63. package/dist/components/DataGrid/index.js +65 -0
  64. package/dist/components/DataGrid/utils.cjs +4687 -0
  65. package/dist/components/DataGrid/utils.css +5051 -0
  66. package/dist/components/DataGrid/utils.js +62 -0
  67. package/dist/components/DataGridCell.js +6 -6
  68. package/dist/components/DateInput.cjs +721 -67
  69. package/dist/components/DateInput.css +186 -3
  70. package/dist/components/DateInput.js +45 -13
  71. package/dist/components/DateRangeInput.cjs +721 -67
  72. package/dist/components/DateRangeInput.css +186 -3
  73. package/dist/components/DateRangeInput.js +45 -13
  74. package/dist/components/FilterGroup.js +3 -3
  75. package/dist/components/Grid.cjs +3 -1
  76. package/dist/components/Grid.js +3 -92
  77. package/dist/components/ImagePlaceholder.cjs +65 -0
  78. package/dist/components/ImagePlaceholder.js +7 -0
  79. package/dist/components/Input.js +2 -2
  80. package/dist/components/MenuOption.js +2 -2
  81. package/dist/components/MobileDataGrid/ColumnList.cjs +845 -0
  82. package/dist/components/MobileDataGrid/ColumnList.js +17 -0
  83. package/dist/components/MobileDataGrid/ColumnSelector/index.cjs +4797 -0
  84. package/dist/components/MobileDataGrid/ColumnSelector/index.css +5051 -0
  85. package/dist/components/MobileDataGrid/ColumnSelector/index.js +62 -0
  86. package/dist/components/MobileDataGrid/GridContextProvider/GridContext.cjs +31 -0
  87. package/dist/components/MobileDataGrid/GridContextProvider/GridContext.js +7 -0
  88. package/dist/components/MobileDataGrid/GridContextProvider/index.cjs +177 -0
  89. package/dist/components/MobileDataGrid/GridContextProvider/index.js +8 -0
  90. package/dist/components/MobileDataGrid/MobileDataGridCard/MobileDataGridColumn.cjs +269 -0
  91. package/dist/components/MobileDataGrid/MobileDataGridCard/MobileDataGridColumn.js +9 -0
  92. package/dist/components/MobileDataGrid/MobileDataGridCard/index.cjs +790 -0
  93. package/dist/components/MobileDataGrid/MobileDataGridCard/index.js +16 -0
  94. package/dist/components/MobileDataGrid/MobileDataGridHeader.cjs +5059 -0
  95. package/dist/components/MobileDataGrid/MobileDataGridHeader.css +5051 -0
  96. package/dist/components/MobileDataGrid/MobileDataGridHeader.js +62 -0
  97. package/dist/components/MobileDataGrid/RowDetailModalProvider/ModalContent.cjs +509 -0
  98. package/dist/components/MobileDataGrid/RowDetailModalProvider/ModalContent.js +13 -0
  99. package/dist/components/MobileDataGrid/RowDetailModalProvider/index.cjs +1261 -0
  100. package/dist/components/MobileDataGrid/RowDetailModalProvider/index.js +27 -0
  101. package/dist/components/MobileDataGrid/index.cjs +5521 -0
  102. package/dist/components/MobileDataGrid/index.css +5051 -0
  103. package/dist/components/MobileDataGrid/index.js +62 -0
  104. package/dist/components/Modal.cjs +24 -13
  105. package/dist/components/Modal.js +3 -3
  106. package/dist/components/ModalHeader.cjs +6 -4
  107. package/dist/components/ModalHeader.js +1 -1
  108. package/dist/components/ModalScrim.cjs +2 -1
  109. package/dist/components/ModalScrim.js +1 -1
  110. package/dist/components/NestedMenu.js +4 -4
  111. package/dist/components/Notification.cjs +15 -6
  112. package/dist/components/Notification.js +1 -1
  113. package/dist/components/PDFViewer/DownloadIcon.cjs +394 -0
  114. package/dist/components/PDFViewer/DownloadIcon.js +10 -0
  115. package/dist/components/PDFViewer/PDFElement.cjs +515 -0
  116. package/dist/components/PDFViewer/PDFElement.js +11 -0
  117. package/dist/components/{MobileDataGrid.cjs → PDFViewer/PDFNavigation.cjs} +318 -402
  118. package/dist/components/PDFViewer/PDFNavigation.js +13 -0
  119. package/dist/components/PDFViewer/PDFPage.cjs +56 -0
  120. package/dist/components/PDFViewer/PDFPage.js +7 -0
  121. package/dist/components/{PDFViewer.cjs → PDFViewer/index.cjs} +290 -202
  122. package/dist/components/PDFViewer/index.js +29 -0
  123. package/dist/components/Password.js +2 -2
  124. package/dist/components/ProductImagePreview/CarouselPagination.cjs +75 -0
  125. package/dist/components/ProductImagePreview/CarouselPagination.js +7 -0
  126. package/dist/components/ProductImagePreview/MobileImageCarousel.cjs +214 -0
  127. package/dist/components/ProductImagePreview/MobileImageCarousel.js +7 -0
  128. package/dist/components/ProductImagePreview/ProductPrimaryImage.cjs +255 -0
  129. package/dist/components/ProductImagePreview/ProductPrimaryImage.js +9 -0
  130. package/dist/components/ProductImagePreview/Thumbnail.cjs +105 -0
  131. package/dist/components/ProductImagePreview/Thumbnail.js +8 -0
  132. package/dist/components/ProductImagePreview/ZoomWindow.cjs +198 -0
  133. package/dist/components/ProductImagePreview/ZoomWindow.js +8 -0
  134. package/dist/components/ProductImagePreview/index.cjs +1369 -0
  135. package/dist/components/ProductImagePreview/index.js +22 -0
  136. package/dist/components/Search.js +3 -3
  137. package/dist/components/Select.js +3 -3
  138. package/dist/components/SideMenuGroup.cjs +15 -6
  139. package/dist/components/SideMenuGroup.js +1 -1
  140. package/dist/components/SideMenuItem.cjs +15 -6
  141. package/dist/components/SideMenuItem.js +1 -1
  142. package/dist/components/SkeletonParagraph.cjs +33 -0
  143. package/dist/components/SkeletonParagraph.js +10 -0
  144. package/dist/components/Stack.cjs +15 -6
  145. package/dist/components/Stack.js +1 -1
  146. package/dist/components/Stepper.cjs +61 -53
  147. package/dist/components/Stepper.js +63 -55
  148. package/dist/components/Surface.js +3 -39
  149. package/dist/components/Swatch.cjs +15 -6
  150. package/dist/components/Swatch.js +4 -4
  151. package/dist/components/Time.cjs +15 -6
  152. package/dist/components/Time.js +5 -5
  153. package/dist/components/Upload.cjs +15 -6
  154. package/dist/components/Upload.js +1 -1
  155. package/dist/components/index.cjs +2559 -14
  156. package/dist/components/index.css +186 -3
  157. package/dist/components/index.js +57 -14
  158. package/dist/index.css +186 -3
  159. package/package.json +1 -1
  160. package/src/components/Accordion.tsx +23 -4
  161. package/src/components/CompactImagesPreview.tsx +99 -0
  162. package/src/components/ContentTabs.tsx +3 -1
  163. package/src/components/DataGrid/types.ts +5 -0
  164. package/src/components/Grid.tsx +2 -0
  165. package/src/components/ImagePlaceholder.tsx +22 -0
  166. package/src/components/MobileDataGrid/ColumnList.tsx +66 -0
  167. package/src/components/MobileDataGrid/ColumnSelector/index.tsx +97 -0
  168. package/src/components/MobileDataGrid/GridContextProvider/GridContext.tsx +25 -0
  169. package/src/components/MobileDataGrid/GridContextProvider/index.tsx +132 -0
  170. package/src/components/MobileDataGrid/GridContextProvider/useGridContext.ts +10 -0
  171. package/src/components/MobileDataGrid/MobileDataGridCard/MobileDataGridColumn.tsx +20 -0
  172. package/src/components/MobileDataGrid/MobileDataGridCard/index.tsx +129 -0
  173. package/src/components/MobileDataGrid/MobileDataGridHeader.tsx +80 -0
  174. package/src/components/MobileDataGrid/RowDetailModalProvider/ModalContent.tsx +42 -0
  175. package/src/components/MobileDataGrid/RowDetailModalProvider/index.tsx +68 -0
  176. package/src/components/MobileDataGrid/dataGridReducer.ts +55 -0
  177. package/src/components/MobileDataGrid/index.tsx +92 -0
  178. package/src/components/MobileDataGrid/types.ts +4 -0
  179. package/src/components/Modal.tsx +31 -12
  180. package/src/components/ModalButtons.tsx +1 -1
  181. package/src/components/ModalHeader.tsx +5 -2
  182. package/src/components/ModalScrim.tsx +3 -2
  183. package/src/components/PDFViewer/DownloadIcon.tsx +22 -0
  184. package/src/components/PDFViewer/PDFElement.tsx +90 -0
  185. package/src/components/PDFViewer/PDFNavigation.tsx +68 -0
  186. package/src/components/PDFViewer/PDFPage.tsx +34 -0
  187. package/src/components/PDFViewer/index.tsx +128 -0
  188. package/src/components/ProductImagePreview/CarouselPagination.tsx +54 -0
  189. package/src/components/ProductImagePreview/MobileImageCarousel.tsx +226 -0
  190. package/src/components/ProductImagePreview/ProductPrimaryImage.tsx +218 -0
  191. package/src/components/ProductImagePreview/Thumbnail.tsx +49 -0
  192. package/src/components/ProductImagePreview/ZoomWindow.tsx +136 -0
  193. package/src/components/ProductImagePreview/index.tsx +182 -0
  194. package/src/components/ProductImagePreview/useProductImagePreview.ts +211 -0
  195. package/src/components/SkeletonParagraph.tsx +5 -0
  196. package/src/components/Stack.tsx +29 -6
  197. package/src/components/Stepper.tsx +5 -1
  198. package/src/components/index.ts +4 -0
  199. package/src/types.ts +2 -1
  200. package/dist/components/MobileDataGrid.js +0 -150
  201. package/dist/components/PDFViewer.js +0 -250
  202. package/src/components/MobileDataGrid.tsx +0 -163
  203. package/src/components/PDFViewer.tsx +0 -264
  204. package/dist/{chunk-OXSBIBGT.js → chunk-CKQNJNU3.js} +3 -3
  205. package/dist/{chunk-RJUN52HJ.js → chunk-ZL5X7KP6.js} +3 -3
@@ -0,0 +1,4689 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __defProps = Object.defineProperties;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
7
+ var __getOwnPropNames = Object.getOwnPropertyNames;
8
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
9
+ var __getProtoOf = Object.getPrototypeOf;
10
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
11
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
12
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
13
+ var __spreadValues = (a, b) => {
14
+ for (var prop in b || (b = {}))
15
+ if (__hasOwnProp.call(b, prop))
16
+ __defNormalProp(a, prop, b[prop]);
17
+ if (__getOwnPropSymbols)
18
+ for (var prop of __getOwnPropSymbols(b)) {
19
+ if (__propIsEnum.call(b, prop))
20
+ __defNormalProp(a, prop, b[prop]);
21
+ }
22
+ return a;
23
+ };
24
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
25
+ var __objRest = (source, exclude) => {
26
+ var target = {};
27
+ for (var prop in source)
28
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
29
+ target[prop] = source[prop];
30
+ if (source != null && __getOwnPropSymbols)
31
+ for (var prop of __getOwnPropSymbols(source)) {
32
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
33
+ target[prop] = source[prop];
34
+ }
35
+ return target;
36
+ };
37
+ var __export = (target, all) => {
38
+ for (var name in all)
39
+ __defProp(target, name, { get: all[name], enumerable: true });
40
+ };
41
+ var __copyProps = (to, from, except, desc) => {
42
+ if (from && typeof from === "object" || typeof from === "function") {
43
+ for (let key of __getOwnPropNames(from))
44
+ if (!__hasOwnProp.call(to, key) && key !== except)
45
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
46
+ }
47
+ return to;
48
+ };
49
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
50
+ // If the importer is in node compatibility mode or this is not an ESM
51
+ // file that has been converted to a CommonJS file using a Babel-
52
+ // compatible transform (i.e. "__esModule" has not been set), then set
53
+ // "default" to the CommonJS "module.exports" for node compatibility.
54
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
55
+ mod
56
+ ));
57
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
58
+
59
+ // src/components/DataGrid/TableBody/TableBodyRow.tsx
60
+ var TableBodyRow_exports = {};
61
+ __export(TableBodyRow_exports, {
62
+ TableBodyRow: () => TableBodyRow
63
+ });
64
+ module.exports = __toCommonJS(TableBodyRow_exports);
65
+ var import_clsx34 = __toESM(require("clsx"), 1);
66
+ var import_react_table3 = require("@tanstack/react-table");
67
+ var import_react34 = __toESM(require("react"), 1);
68
+
69
+ // src/components/DataGridCell.tsx
70
+ var import_sortable = require("@dnd-kit/sortable");
71
+
72
+ // ../../node_modules/@dnd-kit/utilities/dist/utilities.esm.js
73
+ var import_react = require("react");
74
+ var canUseDOM = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
75
+ var CSS = /* @__PURE__ */ Object.freeze({
76
+ Translate: {
77
+ toString(transform) {
78
+ if (!transform) {
79
+ return;
80
+ }
81
+ const {
82
+ x,
83
+ y
84
+ } = transform;
85
+ return "translate3d(" + (x ? Math.round(x) : 0) + "px, " + (y ? Math.round(y) : 0) + "px, 0)";
86
+ }
87
+ },
88
+ Scale: {
89
+ toString(transform) {
90
+ if (!transform) {
91
+ return;
92
+ }
93
+ const {
94
+ scaleX,
95
+ scaleY
96
+ } = transform;
97
+ return "scaleX(" + scaleX + ") scaleY(" + scaleY + ")";
98
+ }
99
+ },
100
+ Transform: {
101
+ toString(transform) {
102
+ if (!transform) {
103
+ return;
104
+ }
105
+ return [CSS.Translate.toString(transform), CSS.Scale.toString(transform)].join(" ");
106
+ }
107
+ },
108
+ Transition: {
109
+ toString(_ref) {
110
+ let {
111
+ property,
112
+ duration,
113
+ easing
114
+ } = _ref;
115
+ return property + " " + duration + "ms " + easing;
116
+ }
117
+ }
118
+ });
119
+
120
+ // src/components/DataGridCell.tsx
121
+ var import_clsx8 = __toESM(require("clsx"), 1);
122
+ var import_react11 = require("react");
123
+
124
+ // src/classNames.ts
125
+ var import_clsx = __toESM(require("clsx"), 1);
126
+ var typography = {
127
+ display1: (0, import_clsx.default)(
128
+ "font-sans font-semibold",
129
+ "text-display-1-mobile desktop:text-display-1-desktop compact:text-display-1-desktop-compact",
130
+ "leading-display-1-mobile desktop:leading-display-1-desktop"
131
+ ),
132
+ display2: (0, import_clsx.default)(
133
+ "font-sans font-bold",
134
+ "text-display-2-mobile desktop:text-display-2-desktop compact:text-display-2-desktop-compact",
135
+ "leading-display-2-mobile desktop:leading-display-2-desktop"
136
+ ),
137
+ heading1: (0, import_clsx.default)(
138
+ "font-sans font-semibold",
139
+ "text-heading-1-mobile desktop:text-heading-1-desktop compact:text-heading-1-desktop-compact",
140
+ "leading-heading-1-mobile desktop:leading-heading-1-desktop"
141
+ ),
142
+ heading2: (0, import_clsx.default)(
143
+ "font-sans font-normal",
144
+ "text-heading-2-mobile desktop:text-heading-2-desktop compact:text-heading-2-desktop-compact",
145
+ "leading-heading-2-mobile desktop:leading-heading-2-desktop"
146
+ ),
147
+ heading3: (0, import_clsx.default)(
148
+ "font-sans font-semibold",
149
+ "text-heading-3-mobile desktop:text-heading-3-desktop compact:text-heading-3-desktop-compact",
150
+ "leading-heading-3-mobile desktop:leading-heading-3-desktop"
151
+ ),
152
+ subheader: (0, import_clsx.default)(
153
+ "font-sans font-semibold",
154
+ "text-subheader-mobile desktop:text-subheader-desktop compact:text-subheader-desktop-compact",
155
+ "leading-subheader-mobile desktop:leading-subheader-desktop"
156
+ ),
157
+ link: (0, import_clsx.default)(
158
+ "font-sans font-normal",
159
+ "text-link-mobile desktop:text-link-desktop compact:text-link-desktop-compact",
160
+ "leading-link-mobile desktop:leading-link-desktop"
161
+ ),
162
+ buttonLabel: (0, import_clsx.default)(
163
+ "font-sans font-semibold",
164
+ "text-label-mobile desktop:text-label-desktop compact:text-label-desktop-compact",
165
+ "leading-label-mobile desktop:leading-label-desktop"
166
+ ),
167
+ label: (0, import_clsx.default)(
168
+ "font-sans font-semibold",
169
+ "text-label-mobile desktop:text-label-desktop compact:text-label-desktop-compact",
170
+ "leading-label-mobile desktop:leading-label-desktop"
171
+ ),
172
+ paragraph: (0, import_clsx.default)(
173
+ "font-sans font-normal",
174
+ "text-paragraph-mobile desktop:text-paragraph-desktop compact:text-paragraph-desktop-compact",
175
+ "leading-paragraph-mobile desktop:leading-paragraph-desktop"
176
+ ),
177
+ caption: (0, import_clsx.default)(
178
+ "font-sans font-normal",
179
+ "text-caption-mobile desktop:text-caption-desktop compact:text-caption-desktop-compact",
180
+ "leading-caption-mobile desktop:leading-caption-desktop"
181
+ ),
182
+ breadcrumb: (0, import_clsx.default)(
183
+ "font-sans font-normal",
184
+ "text-paragraph-mobile desktop:text-paragraph-desktop compact:text-paragraph-desktop-compact",
185
+ "leading-mobile-breadcrumb desktop:leading-desktop-breadcrumb"
186
+ )
187
+ };
188
+ var baseTransition = (0, import_clsx.default)(
189
+ "transition-colors duration-100 ease-in-out"
190
+ );
191
+ var componentGap = (0, import_clsx.default)(
192
+ "gap-mobile-component-gap desktop:gap-desktop-component-gap compact:gap-desktop-compact-component-gap"
193
+ );
194
+ var paddingUsingComponentGap = (0, import_clsx.default)(
195
+ "p-mobile-component-gap desktop:p-desktop-component-gap compact:p-desktop-compact-component-gap"
196
+ );
197
+ var paddingXUsingLayoutGroupGap = (0, import_clsx.default)(
198
+ "px-mobile-layout-group-gap desktop:px-desktop-layout-group-gap compact:px-desktop-compact-layout-group-gap"
199
+ );
200
+ var paddingYUsingLayoutGroupGap = (0, import_clsx.default)(
201
+ "py-mobile-layout-group-gap desktop:py-desktop-layout-group-gap compact:py-desktop-compact-layout-group-gap"
202
+ );
203
+ var componentPadding = (0, import_clsx.default)(
204
+ "p-mobile-component-padding desktop:p-desktop-component-padding compact:p-desktop-compact-component-padding"
205
+ );
206
+ var componentPaddingBottom = (0, import_clsx.default)(
207
+ "pb-mobile-component-padding desktop:pb-desktop-component-padding compact:pb-desktop-compact-component-padding"
208
+ );
209
+ var componentPaddingX = (0, import_clsx.default)(
210
+ "px-mobile-component-padding desktop:px-desktop-component-padding compact:px-desktop-compact-component-padding"
211
+ );
212
+ var componentPaddingY = (0, import_clsx.default)(
213
+ "py-mobile-component-padding desktop:py-desktop-component-padding compact:py-desktop-compact-component-padding"
214
+ );
215
+ var componentPaddingXUsingComponentGap = (0, import_clsx.default)(
216
+ "px-mobile-component-gap desktop:px-desktop-component-gap compact:px-desktop-compact-component-gap"
217
+ );
218
+ var componentPaddingYUsingComponentGap = (0, import_clsx.default)(
219
+ "py-mobile-component-gap desktop:py-desktop-component-gap compact:py-desktop-compact-component-gap"
220
+ );
221
+ var componentPaddingMinusBorder = (0, import_clsx.default)(
222
+ "p-[calc(var(--spacing-mobile-component-padding)_-_1px)] desktop:p-[calc(var(--spacing-desktop-component-padding)_-_1px)] compact:p-[calc(var(--spacing-desktop-compact-component-padding)_-_1px)]"
223
+ );
224
+ var componentPaddingMinus2pxBorder = (0, import_clsx.default)(
225
+ "p-[calc(var(--spacing-mobile-component-padding)_-_2px)] desktop:p-[calc(var(--spacing-desktop-component-padding)_-_2px)] compact:p-[calc(var(--spacing-desktop-compact-component-padding)_-_2px)]"
226
+ );
227
+ var layoutPaddding = (0, import_clsx.default)(
228
+ "p-mobile-layout-padding desktop:p-desktop-layout-padding compact:p-desktop-compact-layout-padding"
229
+ );
230
+ var layoutPaddingBottom = (0, import_clsx.default)(
231
+ "pb-mobile-layout-padding desktop:pb-desktop-layout-padding compact:pb-desktop-compact-layout-padding"
232
+ );
233
+ var layoutPaddingY = (0, import_clsx.default)(
234
+ "py-mobile-layout-padding desktop:py-desktop-layout-padding compact:py-desktop-compact-layout-padding"
235
+ );
236
+ var containerPaddingX = (0, import_clsx.default)(
237
+ "px-mobile-container-padding desktop:px-desktop-container-padding compact:px-desktop-compact-container-padding"
238
+ );
239
+ var containerPaddingY = (0, import_clsx.default)(
240
+ "py-mobile-container-padding desktop:py-desktop-container-padding compact:py-desktop-compact-container-padding"
241
+ );
242
+ var layoutGroupGapPaddingY = (0, import_clsx.default)(
243
+ "py-mobile-layout-group-gap desktop:py-desktop-layout-group-gap compact:py-desktop-compact-layout-group-gap"
244
+ );
245
+ var layoutGroupGap = (0, import_clsx.default)(
246
+ "gap-mobile-layout-group-gap desktop:gap-desktop-layout-group-gap compact:gap-desktop-compact-layout-group-gap"
247
+ );
248
+ var layoutGap = (0, import_clsx.default)(
249
+ "gap-mobile-layout-gap desktop:gap-desktop-layout-gap compact:gap-desktop-compact-layout-gap"
250
+ );
251
+ var gapUsingContainerPadding = (0, import_clsx.default)(
252
+ "gap-mobile-container-padding desktop:gap-desktop-container-padding compact:gap-desktop-compact-container-padding"
253
+ );
254
+
255
+ // src/components/MenuOption.tsx
256
+ var import_clsx5 = __toESM(require("clsx"), 1);
257
+ var import_react6 = require("react");
258
+
259
+ // src/components/Label.tsx
260
+ var import_clsx2 = __toESM(require("clsx"), 1);
261
+ var import_jsx_runtime = require("react/jsx-runtime");
262
+ var Label = (_a) => {
263
+ var _b = _a, {
264
+ as = "span",
265
+ padded,
266
+ className,
267
+ color,
268
+ align,
269
+ id,
270
+ testid
271
+ } = _b, props = __objRest(_b, [
272
+ "as",
273
+ "padded",
274
+ "className",
275
+ "color",
276
+ "align",
277
+ "id",
278
+ "testid"
279
+ ]);
280
+ const Element = as;
281
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
282
+ Element,
283
+ __spreadProps(__spreadValues({
284
+ id,
285
+ "data-testid": testid,
286
+ className: (0, import_clsx2.default)(
287
+ typography.label,
288
+ align === "left" && "text-left",
289
+ align === "center" && "text-center",
290
+ align === "right" && "text-right",
291
+ className,
292
+ padded && componentPaddingXUsingComponentGap
293
+ )
294
+ }, props), {
295
+ style: __spreadProps(__spreadValues({}, props.style), {
296
+ color: color ? `var(--color-${color})` : void 0
297
+ })
298
+ })
299
+ );
300
+ };
301
+ Label.displayName = "Label";
302
+
303
+ // src/components/Paragraph.tsx
304
+ var import_clsx3 = __toESM(require("clsx"), 1);
305
+ var import_jsx_runtime2 = require("react/jsx-runtime");
306
+ var Paragraph = (_a) => {
307
+ var _b = _a, {
308
+ className,
309
+ color,
310
+ padded,
311
+ align = "left",
312
+ tall,
313
+ addOverflow,
314
+ children,
315
+ as = "p",
316
+ id,
317
+ testid
318
+ } = _b, props = __objRest(_b, [
319
+ "className",
320
+ "color",
321
+ "padded",
322
+ "align",
323
+ "tall",
324
+ "addOverflow",
325
+ "children",
326
+ "as",
327
+ "id",
328
+ "testid"
329
+ ]);
330
+ const Element = as;
331
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
332
+ Element,
333
+ __spreadProps(__spreadValues({
334
+ id,
335
+ "data-testid": testid
336
+ }, props), {
337
+ className: (0, import_clsx3.default)(
338
+ typography.paragraph,
339
+ className,
340
+ padded && componentPaddingXUsingComponentGap,
341
+ align === "left" && "text-left",
342
+ align === "center" && "text-center",
343
+ align === "right" && "text-right",
344
+ tall && "!leading-6",
345
+ addOverflow && "whitespace-nowrap text-ellipsis overflow-hidden"
346
+ ),
347
+ style: __spreadProps(__spreadValues({}, props.style), {
348
+ color: color ? `var(--color-${color})` : void 0
349
+ }),
350
+ children
351
+ })
352
+ );
353
+ };
354
+ Paragraph.displayName = "Paragraph";
355
+
356
+ // src/components/Icon.tsx
357
+ var import_clsx4 = __toESM(require("clsx"), 1);
358
+ var import_jsx_runtime3 = require("react/jsx-runtime");
359
+ function Icon(_a) {
360
+ var _b = _a, {
361
+ name,
362
+ size = 24,
363
+ variant = "outline",
364
+ testid
365
+ } = _b, props = __objRest(_b, [
366
+ "name",
367
+ "size",
368
+ "variant",
369
+ "testid"
370
+ ]);
371
+ const variantStyle = variant === "filled" ? '"FILL" 1' : '"FILL" 0';
372
+ const weightStyle = size === 16 ? '"wght" 400' : '"wght" 300';
373
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
374
+ "span",
375
+ __spreadProps(__spreadValues({}, props), {
376
+ "data-testid": testid,
377
+ className: (0, import_clsx4.default)(
378
+ "icon",
379
+ `icon-${size}`,
380
+ // size === 16 ? "font-normal" : "font-light", // size 16 font weight is not working as normal from before
381
+ props.className
382
+ ),
383
+ style: __spreadValues({
384
+ fontVariationSettings: variantStyle + `, ${weightStyle}`
385
+ }, props.style),
386
+ children: name
387
+ })
388
+ );
389
+ }
390
+
391
+ // src/hooks/useKeydown.ts
392
+ var import_react2 = require("react");
393
+
394
+ // src/hooks/useInfiniteScroll.tsx
395
+ var import_react3 = require("react");
396
+ function useInfiniteScroll({
397
+ containerRef,
398
+ onLoadMore,
399
+ isLoading,
400
+ offset = 50,
401
+ enabled = true
402
+ // ✅ Add this
403
+ }) {
404
+ (0, import_react3.useEffect)(() => {
405
+ if (!enabled) return;
406
+ const handleScroll = () => {
407
+ const el2 = containerRef.current;
408
+ if (!el2 || isLoading) return;
409
+ const { scrollTop, scrollHeight, clientHeight } = el2;
410
+ const isNearBottom = scrollTop + clientHeight >= scrollHeight - offset;
411
+ if (isNearBottom) {
412
+ onLoadMore();
413
+ }
414
+ };
415
+ const el = containerRef.current;
416
+ if (el) el.addEventListener("scroll", handleScroll);
417
+ return () => {
418
+ if (el) el.removeEventListener("scroll", handleScroll);
419
+ };
420
+ }, [containerRef, onLoadMore, isLoading, offset, enabled]);
421
+ }
422
+
423
+ // src/hooks/useMatchesMedia.ts
424
+ var import_react4 = require("react");
425
+ var useMatchesMedia = (query) => {
426
+ const [matches, setMatches] = (0, import_react4.useState)();
427
+ (0, import_react4.useLayoutEffect)(() => {
428
+ const mediaQueryList = window.matchMedia(query);
429
+ const listener = () => setMatches(mediaQueryList.matches);
430
+ listener();
431
+ mediaQueryList.addEventListener("change", listener);
432
+ return () => mediaQueryList.removeEventListener("change", listener);
433
+ }, [query]);
434
+ return matches;
435
+ };
436
+ var useMatchesMobile = () => useMatchesMedia("(width < 48rem)");
437
+
438
+ // src/utils/formatting.tsx
439
+ function getDecimalPlaceholder(decimals) {
440
+ if (!decimals || decimals <= 0) {
441
+ return {};
442
+ }
443
+ return {
444
+ placeholder: `0.${"0".repeat(decimals)}`
445
+ };
446
+ }
447
+ function formatDecimalValue(value, decimals) {
448
+ if (!value || value === "") {
449
+ return "";
450
+ }
451
+ const numValue = typeof value === "string" ? parseFloat(value) : value;
452
+ if (isNaN(numValue)) {
453
+ return "";
454
+ }
455
+ if (!decimals || decimals <= 0) {
456
+ return String(Math.round(numValue));
457
+ }
458
+ return numValue.toFixed(decimals);
459
+ }
460
+ function formatCurrencyDisplay(value) {
461
+ if (!value || value === "") {
462
+ return "";
463
+ }
464
+ const parts = value.split(".");
465
+ const integerPart = parts[0];
466
+ const decimalPart = parts[1];
467
+ const formattedInteger = integerPart.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
468
+ return decimalPart !== void 0 ? `${formattedInteger}.${decimalPart}` : formattedInteger;
469
+ }
470
+
471
+ // src/utils/date.ts
472
+ function parseDateParts(dateString) {
473
+ const [yearStr, monthStr, dayStr] = dateString.split("-");
474
+ if (!yearStr || !monthStr || !dayStr) {
475
+ return null;
476
+ }
477
+ const year = parseInt(yearStr, 10);
478
+ const month = parseInt(monthStr, 10);
479
+ const day = parseInt(dayStr, 10);
480
+ if (isNaN(year) || isNaN(month) || isNaN(day)) {
481
+ return null;
482
+ }
483
+ return { year, month, day };
484
+ }
485
+ function isValidDateRange(month, day) {
486
+ if (month < 1 || month > 12) {
487
+ return false;
488
+ }
489
+ if (day < 1 || day > 31) {
490
+ return false;
491
+ }
492
+ return true;
493
+ }
494
+ function formatDatePartsToDisplay(year, month, day) {
495
+ const paddedMonth = month.toString().padStart(2, "0");
496
+ const paddedDay = day.toString().padStart(2, "0");
497
+ return `${paddedMonth}/${paddedDay}/${year}`;
498
+ }
499
+ function formatDate(date) {
500
+ if (!date) {
501
+ return "";
502
+ }
503
+ try {
504
+ const dateParts = parseDateParts(date);
505
+ if (!dateParts) {
506
+ return "";
507
+ }
508
+ const { year, month, day } = dateParts;
509
+ if (!isValidDateRange(month, day)) {
510
+ return "";
511
+ }
512
+ return formatDatePartsToDisplay(year, month, day);
513
+ } catch (error) {
514
+ console.error("Error formatting date:", error);
515
+ return "";
516
+ }
517
+ }
518
+
519
+ // src/utils/mergeObjectArrays.ts
520
+ function mergeObjectArrays(arr1, arr2) {
521
+ const maxLength = Math.max(arr1.length, arr2.length);
522
+ return Array.from(
523
+ { length: maxLength },
524
+ (_, i) => __spreadValues(__spreadValues({}, arr1[i] || {}), arr2[i] || {})
525
+ );
526
+ }
527
+
528
+ // src/utils.ts
529
+ function findDocumentRoot(element) {
530
+ if (typeof window === "undefined" || typeof document === "undefined") {
531
+ throw new Error(
532
+ "findDocumentRoot can only be used in a browser environment."
533
+ );
534
+ }
535
+ if (!element || !(element instanceof Node)) {
536
+ return window.document.body;
537
+ }
538
+ let currentElement = element;
539
+ while (currentElement && currentElement.parentNode) {
540
+ if (currentElement.parentNode === document) {
541
+ return document.body;
542
+ } else if (currentElement.parentNode instanceof DocumentFragment) {
543
+ return currentElement.parentNode;
544
+ } else {
545
+ currentElement = currentElement.parentNode;
546
+ }
547
+ }
548
+ return window.document.body;
549
+ }
550
+
551
+ // src/hooks/useTableLayout.ts
552
+ var import_react5 = require("react");
553
+ var LocalStoragePrefix = `dmsi-acc-v1-table-layout`;
554
+ var getLocalStorageKeyWithPrefix = (key) => `${LocalStoragePrefix}__${key}`;
555
+ function useTableLayout(initialColumns, key) {
556
+ const [columns, setColumns] = (0, import_react5.useState)(initialColumns);
557
+ const [isReady, setIsReady] = (0, import_react5.useState)(false);
558
+ const renderCountRef = (0, import_react5.useRef)(0);
559
+ const handleSaveLayout = (0, import_react5.useCallback)(
560
+ (setter, _internal) => {
561
+ if (!isReady && !_internal || !key) return;
562
+ setColumns((prevColumns) => {
563
+ const newColumns = typeof setter === "function" ? setter(prevColumns) : setter;
564
+ if (JSON.stringify(newColumns) === JSON.stringify(prevColumns) && !_internal)
565
+ return prevColumns;
566
+ localStorage.setItem(
567
+ getLocalStorageKeyWithPrefix(`${key}-tableLayout`),
568
+ JSON.stringify(newColumns)
569
+ );
570
+ return newColumns;
571
+ });
572
+ },
573
+ [isReady, key]
574
+ );
575
+ (0, import_react5.useEffect)(() => {
576
+ if (!key) return setIsReady(true);
577
+ if (renderCountRef.current > 1) {
578
+ throw new Error(
579
+ `useTableLayout should only be called once per component render cycle.
580
+ ${renderCountRef.current} Renders detected.
581
+ Check dependency stability`
582
+ );
583
+ }
584
+ renderCountRef.current += 1;
585
+ const savedLayout = localStorage.getItem(
586
+ getLocalStorageKeyWithPrefix(`${key}-tableLayout`)
587
+ );
588
+ if (savedLayout) {
589
+ handleSaveLayout(
590
+ mergeObjectArrays(
591
+ initialColumns,
592
+ JSON.parse(savedLayout)
593
+ ),
594
+ true
595
+ );
596
+ }
597
+ if (!savedLayout) handleSaveLayout(initialColumns, true);
598
+ setIsReady(true);
599
+ return () => {
600
+ renderCountRef.current = 0;
601
+ };
602
+ }, [handleSaveLayout, initialColumns, key]);
603
+ const getSavedLayout = (0, import_react5.useCallback)(() => {
604
+ const savedLayout = localStorage.getItem(
605
+ getLocalStorageKeyWithPrefix(`${key}-tableLayout`)
606
+ );
607
+ if (savedLayout) {
608
+ return JSON.parse(savedLayout);
609
+ }
610
+ }, [key]);
611
+ return { columns, setColumns: handleSaveLayout, isReady, getSavedLayout };
612
+ }
613
+
614
+ // src/components/MenuOption.tsx
615
+ var import_jsx_runtime4 = require("react/jsx-runtime");
616
+ var MenuOption = ({
617
+ id,
618
+ testid,
619
+ children,
620
+ disabled = false,
621
+ variant = "normal",
622
+ value,
623
+ before,
624
+ after,
625
+ subMenu,
626
+ onClick,
627
+ selected,
628
+ ref,
629
+ onSubMenuHover,
630
+ onSubMenuLeave,
631
+ onSubMenuEnter,
632
+ toggleMenu,
633
+ subMenuLevel = 1,
634
+ currentSubMenuLevel,
635
+ closeSubMenuLevel,
636
+ activeMenu,
637
+ mobilePositionTo,
638
+ highlightMatchingText = false,
639
+ menuValue,
640
+ onMouseMove
641
+ }) => {
642
+ const uniqueId = (0, import_react6.useId)();
643
+ const internalRef = (0, import_react6.useRef)(null);
644
+ const actualRef = ref || internalRef;
645
+ const menuId = (0, import_react6.useRef)(`menu-${uniqueId}`);
646
+ const isMobile = useMatchesMobile();
647
+ const handleMouseEnter = () => {
648
+ if (subMenu && onSubMenuHover && !disabled) {
649
+ onSubMenuHover(menuId.current, subMenuLevel);
650
+ }
651
+ };
652
+ const handleMouseLeave = () => {
653
+ if (subMenu && onSubMenuLeave && !disabled) {
654
+ onSubMenuLeave(subMenuLevel);
655
+ }
656
+ };
657
+ const handleMouseMove = () => {
658
+ if (subMenu && onMouseMove && !disabled) {
659
+ onMouseMove();
660
+ }
661
+ };
662
+ const handleSubMenuEnter = () => {
663
+ if (onSubMenuEnter) {
664
+ onSubMenuEnter();
665
+ }
666
+ };
667
+ const additionalAttributes = {
668
+ "data-selected": selected || null
669
+ };
670
+ const svgStyles = (0, import_clsx5.default)(
671
+ "[&>svg]:shrink-0 [&>svg]:fill-icon-action-primary-normal"
672
+ );
673
+ const textLabelStyles = (0, import_clsx5.default)("w-full whitespace-nowrap !leading-6");
674
+ const normalStyles = variant === "normal" && !disabled && (0, import_clsx5.default)(
675
+ "bg-transparent text-text-primary-normal",
676
+ "hover:bg-background-action-secondary-hover",
677
+ "focus:bg-background-action-secondary-hover",
678
+ "data-selected:bg-background-action-secondary-hover",
679
+ "active:bg-background-action-secondary-active"
680
+ );
681
+ const normalDisabledStyles = variant === "normal" && disabled && (0, import_clsx5.default)("text-text-primary-disabled");
682
+ const actionStyles = variant === "action" && !disabled && (0, import_clsx5.default)(
683
+ "text-action-400 bg-transparent",
684
+ "hover:bg-background-action-secondary-hover hover:text-text-action-hover",
685
+ "focus:bg-background-action-secondary-hover focus:text-text-action-hover",
686
+ "data-selected:bg-background-action-secondary-active data-selected:text-text-action-active",
687
+ "active:bg-background-action-secondary-active active:text-text-action-active"
688
+ );
689
+ const actionDisabledStyles = variant === "action" && disabled && (0, import_clsx5.default)("text-text-action-disabled");
690
+ const disabledStyles = disabled && (0, import_clsx5.default)("bg-transparent cursor-default pointer-events-none");
691
+ const processChildren = typeof children === "string" && highlightMatchingText ? highlightMatch(children, menuValue) : children;
692
+ const renderChildren = typeof children === "object" ? children : variant === "action" ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Label, { padded: true, className: textLabelStyles, children: processChildren }) : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Paragraph, { padded: true, className: textLabelStyles, children: processChildren });
693
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
694
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
695
+ "div",
696
+ __spreadProps(__spreadValues({
697
+ id,
698
+ "data-testid": testid,
699
+ ref: actualRef,
700
+ className: (0, import_clsx5.default)(
701
+ "flex items-center cursor-pointer w-full text-left relative outline-none",
702
+ svgStyles,
703
+ componentGap,
704
+ componentPadding,
705
+ baseTransition,
706
+ normalStyles,
707
+ normalDisabledStyles,
708
+ actionStyles,
709
+ actionDisabledStyles,
710
+ disabledStyles
711
+ ),
712
+ "data-value": value || children,
713
+ onClick: () => {
714
+ onClick == null ? void 0 : onClick(menuId.current, value || children);
715
+ if (subMenu) {
716
+ toggleMenu(menuId.current, subMenuLevel);
717
+ }
718
+ },
719
+ onMouseEnter: handleMouseEnter,
720
+ onMouseLeave: handleMouseLeave,
721
+ onMouseMove: handleMouseMove
722
+ }, additionalAttributes), {
723
+ tabIndex: -1,
724
+ role: "menuitem",
725
+ "aria-haspopup": subMenu ? "menu" : void 0,
726
+ children: [
727
+ before && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "shrink-0 flex items-center", children: before }),
728
+ renderChildren,
729
+ renderAfterProp()
730
+ ]
731
+ })
732
+ ),
733
+ subMenu && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
734
+ "div",
735
+ {
736
+ onMouseEnter: handleSubMenuEnter,
737
+ onMouseLeave: handleMouseLeave,
738
+ "data-submenu-parent": menuId.current,
739
+ "data-menu-level": subMenuLevel + 1,
740
+ children: subMenu({
741
+ menuId: menuId.current,
742
+ positionTo: actualRef,
743
+ mobilePositionTo,
744
+ position: "right",
745
+ subMenuLevel,
746
+ mobileBackMenuOption,
747
+ mobileHide: isMobile && activeMenu !== menuId.current
748
+ })
749
+ }
750
+ )
751
+ ] });
752
+ function renderAfterProp() {
753
+ if (after) {
754
+ return after;
755
+ }
756
+ if (subMenu && after !== null) {
757
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Icon, { name: "chevron_right" });
758
+ }
759
+ }
760
+ function mobileBackMenuOption() {
761
+ if (!isMobile) {
762
+ return;
763
+ }
764
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
765
+ MenuOption,
766
+ {
767
+ id: id ? `${id}-back` : void 0,
768
+ testid: testid ? `${testid}-back` : void 0,
769
+ onClick: () => {
770
+ closeSubMenuLevel == null ? void 0 : closeSubMenuLevel(currentSubMenuLevel != null ? currentSubMenuLevel : 0);
771
+ },
772
+ variant: "action",
773
+ before: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Icon, { name: "chevron_left" }),
774
+ children: "Back"
775
+ }
776
+ );
777
+ }
778
+ };
779
+ MenuOption.displayName = "MenuOption";
780
+ function highlightMatch(text, searchValue) {
781
+ if (!searchValue || !searchValue.trim()) {
782
+ return text;
783
+ }
784
+ const regex = new RegExp(
785
+ `(${searchValue.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")})`,
786
+ "gi"
787
+ );
788
+ const parts = text.split(regex);
789
+ return parts.map(
790
+ (part, index) => regex.test(part) ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "font-bold", children: part }, index) : part
791
+ );
792
+ }
793
+
794
+ // src/components/Menu.tsx
795
+ var import_clsx6 = __toESM(require("clsx"), 1);
796
+ var import_react8 = require("react");
797
+ var import_react_dom = require("react-dom");
798
+
799
+ // src/components/useMenuSystem.tsx
800
+ var import_react7 = require("react");
801
+ function useSubMenuSystem(mobilePositionTo) {
802
+ const [activeMenus, setActiveMenus] = (0, import_react7.useState)(
803
+ {}
804
+ );
805
+ const [activeMenu, setActiveMenu] = (0, import_react7.useState)("");
806
+ const [currentSubMenuLevel, setCurrentSubMenuLevel] = (0, import_react7.useState)(
807
+ null
808
+ );
809
+ const menuRootRef = (0, import_react7.useRef)(null);
810
+ const subMenuRefs = (0, import_react7.useRef)({});
811
+ const hoverTimeoutRef = (0, import_react7.useRef)(null);
812
+ const closeTimeoutRef = (0, import_react7.useRef)(null);
813
+ const mouseStopTimeoutRef = (0, import_react7.useRef)(null);
814
+ const isMouseMovingRef = (0, import_react7.useRef)(false);
815
+ const pendingOpenActionRef = (0, import_react7.useRef)(null);
816
+ const pendingCloseActionRef = (0, import_react7.useRef)(null);
817
+ const isMobile = useMatchesMobile();
818
+ const toggleMenu = (menuId, level) => {
819
+ if (closeTimeoutRef.current) {
820
+ clearTimeout(closeTimeoutRef.current);
821
+ closeTimeoutRef.current = null;
822
+ }
823
+ setActiveMenu(menuId);
824
+ setCurrentSubMenuLevel(level);
825
+ setActiveMenus((prev) => {
826
+ const newActiveMenus = __spreadValues({}, prev);
827
+ if (newActiveMenus[level] === menuId) {
828
+ delete newActiveMenus[level];
829
+ } else {
830
+ newActiveMenus[level] = menuId;
831
+ }
832
+ Object.keys(newActiveMenus).forEach((key) => {
833
+ if (Number(key) > level) {
834
+ delete newActiveMenus[Number(key)];
835
+ }
836
+ });
837
+ return newActiveMenus;
838
+ });
839
+ };
840
+ const openMenu = (menuId, level) => {
841
+ if (closeTimeoutRef.current) {
842
+ clearTimeout(closeTimeoutRef.current);
843
+ closeTimeoutRef.current = null;
844
+ }
845
+ setActiveMenus((prev) => {
846
+ const newActiveMenus = __spreadValues({}, prev);
847
+ newActiveMenus[level] = menuId;
848
+ Object.keys(newActiveMenus).forEach((key) => {
849
+ if (Number(key) > level) {
850
+ delete newActiveMenus[Number(key)];
851
+ }
852
+ });
853
+ return newActiveMenus;
854
+ });
855
+ };
856
+ const executePendingActions = (0, import_react7.useCallback)(() => {
857
+ if (pendingCloseActionRef.current) {
858
+ pendingCloseActionRef.current();
859
+ pendingCloseActionRef.current = null;
860
+ }
861
+ if (pendingOpenActionRef.current) {
862
+ pendingOpenActionRef.current();
863
+ pendingOpenActionRef.current = null;
864
+ }
865
+ }, []);
866
+ const openMenuWithDelay = (menuId, level, delay = 150) => {
867
+ if (isMobile) {
868
+ return;
869
+ }
870
+ pendingOpenActionRef.current = () => {
871
+ if (hoverTimeoutRef.current) {
872
+ clearTimeout(hoverTimeoutRef.current);
873
+ }
874
+ hoverTimeoutRef.current = setTimeout(() => {
875
+ openMenu(menuId, level);
876
+ }, delay);
877
+ };
878
+ if (!isMouseMovingRef.current) {
879
+ executePendingActions();
880
+ }
881
+ };
882
+ const closeMenuWithDelay = (level, delay = 500) => {
883
+ if (isMobile) {
884
+ return;
885
+ }
886
+ pendingCloseActionRef.current = () => {
887
+ if (hoverTimeoutRef.current) {
888
+ clearTimeout(hoverTimeoutRef.current);
889
+ hoverTimeoutRef.current = null;
890
+ }
891
+ closeTimeoutRef.current = setTimeout(() => {
892
+ closeSubMenuLevel(level);
893
+ }, delay);
894
+ };
895
+ if (!isMouseMovingRef.current) {
896
+ executePendingActions();
897
+ }
898
+ };
899
+ const handleMouseMove = () => {
900
+ isMouseMovingRef.current = true;
901
+ if (mouseStopTimeoutRef.current) {
902
+ clearTimeout(mouseStopTimeoutRef.current);
903
+ }
904
+ mouseStopTimeoutRef.current = setTimeout(() => {
905
+ isMouseMovingRef.current = false;
906
+ executePendingActions();
907
+ }, 200);
908
+ };
909
+ const cancelCloseTimeout = () => {
910
+ if (isMobile) {
911
+ return;
912
+ }
913
+ if (mouseStopTimeoutRef.current) {
914
+ clearTimeout(mouseStopTimeoutRef.current);
915
+ mouseStopTimeoutRef.current = null;
916
+ isMouseMovingRef.current = false;
917
+ }
918
+ };
919
+ const closeSubMenuLevel = (level) => {
920
+ setActiveMenus((prev) => {
921
+ const newActiveMenus = __spreadValues({}, prev);
922
+ delete newActiveMenus[level];
923
+ Object.keys(newActiveMenus).forEach((key) => {
924
+ if (Number(key) >= level) {
925
+ delete newActiveMenus[Number(key)];
926
+ }
927
+ });
928
+ if (isMobile) {
929
+ const newSubMenuLevel = level - 1;
930
+ setCurrentSubMenuLevel(newSubMenuLevel);
931
+ const newActiveMenu = newActiveMenus[newSubMenuLevel];
932
+ if (Object.keys(newActiveMenus).length > 0 && newActiveMenu) {
933
+ setActiveMenu(newActiveMenu);
934
+ }
935
+ }
936
+ return newActiveMenus;
937
+ });
938
+ };
939
+ const registerSubMenu = (id, element) => {
940
+ subMenuRefs.current[id] = element;
941
+ };
942
+ const isMenuActive = (menuId, level) => {
943
+ return activeMenus[level] === menuId;
944
+ };
945
+ (0, import_react7.useEffect)(() => {
946
+ const handleClickOutside = (event) => {
947
+ var _a;
948
+ if (Object.keys(activeMenus).length === 0) return;
949
+ const target = event.target;
950
+ if ((_a = menuRootRef.current) == null ? void 0 : _a.contains(target)) return;
951
+ const isInsideActiveSubmenu = Object.values(activeMenus).some((id) => {
952
+ const submenuEl = subMenuRefs.current[id];
953
+ return submenuEl == null ? void 0 : submenuEl.contains(target);
954
+ });
955
+ if (!isInsideActiveSubmenu) {
956
+ setActiveMenus({});
957
+ }
958
+ };
959
+ document.addEventListener("mousedown", handleClickOutside);
960
+ return () => {
961
+ document.removeEventListener("mousedown", handleClickOutside);
962
+ };
963
+ }, [activeMenus]);
964
+ (0, import_react7.useEffect)(() => {
965
+ return () => {
966
+ if (hoverTimeoutRef.current) {
967
+ clearTimeout(hoverTimeoutRef.current);
968
+ }
969
+ if (closeTimeoutRef.current) {
970
+ clearTimeout(closeTimeoutRef.current);
971
+ }
972
+ };
973
+ }, []);
974
+ const getAllFocusableMenuElements = () => {
975
+ const elements = [];
976
+ if (menuRootRef.current) {
977
+ elements.push(
978
+ ...Array.from(menuRootRef.current.children)
979
+ );
980
+ }
981
+ Object.values(activeMenus).forEach((menuId) => {
982
+ const submenuEl = subMenuRefs.current[menuId];
983
+ if (submenuEl) {
984
+ elements.push(...Array.from(submenuEl.children));
985
+ }
986
+ });
987
+ return elements;
988
+ };
989
+ const findCurrentMenuLevel = (element) => {
990
+ let current = element.parentElement;
991
+ while (current) {
992
+ const level = current.getAttribute("data-menu-level");
993
+ if (level !== null) {
994
+ return parseInt(level, 10);
995
+ }
996
+ current = current.parentElement;
997
+ }
998
+ return 0;
999
+ };
1000
+ const getMenuElementsAtLevel = (level) => {
1001
+ var _a;
1002
+ if (level === 0 && menuRootRef.current) {
1003
+ return Array.from(menuRootRef.current.children);
1004
+ }
1005
+ const menuId = (_a = Object.entries(activeMenus).find(([, id]) => {
1006
+ const submenuEl = subMenuRefs.current[id];
1007
+ return submenuEl && submenuEl.getAttribute("data-menu-level") === level.toString();
1008
+ })) == null ? void 0 : _a[1];
1009
+ if (menuId) {
1010
+ const submenuEl = subMenuRefs.current[menuId];
1011
+ if (submenuEl) {
1012
+ return Array.from(submenuEl.children);
1013
+ }
1014
+ }
1015
+ return [];
1016
+ };
1017
+ return {
1018
+ menuRootRef,
1019
+ activeMenus,
1020
+ openMenu,
1021
+ isMenuActive,
1022
+ registerSubMenu,
1023
+ closeSubMenuLevel,
1024
+ getAllFocusableMenuElements,
1025
+ findCurrentMenuLevel,
1026
+ getMenuElementsAtLevel,
1027
+ mobileHide: isMobile && Object.keys(activeMenus).length > 0,
1028
+ listeners: {
1029
+ onSubMenuHover: openMenuWithDelay,
1030
+ onSubMenuLeave: closeMenuWithDelay,
1031
+ onSubMenuEnter: cancelCloseTimeout,
1032
+ onMouseMove: handleMouseMove,
1033
+ toggleMenu,
1034
+ mobilePositionTo,
1035
+ activeMenu,
1036
+ currentSubMenuLevel,
1037
+ closeSubMenuLevel
1038
+ }
1039
+ };
1040
+ }
1041
+ function useMenuPosition(elementRef, position = "bottom", options) {
1042
+ const [menuPosition, setMenuPosition] = (0, import_react7.useState)({
1043
+ top: 0,
1044
+ left: 0,
1045
+ minWidth: 0
1046
+ });
1047
+ const isMobile = options == null ? void 0 : options.isMobile;
1048
+ const updatePosition = (0, import_react7.useCallback)(() => {
1049
+ var _a, _b, _c;
1050
+ if (!(elementRef == null ? void 0 : elementRef.current)) return;
1051
+ const triggerRect = elementRef.current.getBoundingClientRect();
1052
+ const menuRect = (_b = (_a = options == null ? void 0 : options.menuRef) == null ? void 0 : _a.current) == null ? void 0 : _b.getBoundingClientRect();
1053
+ const viewportWidth = window.innerWidth;
1054
+ const menuWidth = (menuRect == null ? void 0 : menuRect.width) || triggerRect.width;
1055
+ const topOffset = (_c = options == null ? void 0 : options.topOffset) != null ? _c : 4;
1056
+ let top = 0;
1057
+ let left = 0;
1058
+ if (position === "bottom" || position === "bottom-right") {
1059
+ top = triggerRect.top + triggerRect.height + topOffset;
1060
+ } else {
1061
+ top = triggerRect.top;
1062
+ }
1063
+ if (position === "bottom") {
1064
+ left = triggerRect.left + window.scrollX;
1065
+ } else if (position === "bottom-right") {
1066
+ left = triggerRect.right + window.scrollX - menuWidth;
1067
+ } else if (position === "right") {
1068
+ if (isMobile) {
1069
+ left = triggerRect.left + window.scrollX;
1070
+ } else {
1071
+ left = triggerRect.right + window.scrollX;
1072
+ }
1073
+ }
1074
+ const overflowsRightViewport = left + menuWidth > viewportWidth;
1075
+ if (overflowsRightViewport) {
1076
+ const newLeft = triggerRect.left - menuWidth;
1077
+ const overflowsLeftViewport = newLeft < 0;
1078
+ if (overflowsLeftViewport) {
1079
+ left = (viewportWidth - menuWidth) / 2;
1080
+ } else {
1081
+ left = newLeft;
1082
+ }
1083
+ }
1084
+ if (isMobile && position === "right") {
1085
+ top = triggerRect.top + triggerRect.height + topOffset;
1086
+ }
1087
+ if (isMobile && menuWidth > viewportWidth) {
1088
+ left = 0;
1089
+ }
1090
+ setMenuPosition({
1091
+ top,
1092
+ left,
1093
+ minWidth: triggerRect.width
1094
+ });
1095
+ }, [elementRef, position, options == null ? void 0 : options.menuRef, options == null ? void 0 : options.topOffset, isMobile]);
1096
+ (0, import_react7.useEffect)(() => {
1097
+ if (!(options == null ? void 0 : options.isOpen) || !(options == null ? void 0 : options.setIsOpen)) return;
1098
+ const handleClickOutside = (event) => {
1099
+ var _a, _b, _c, _d, _e;
1100
+ const target = event.target;
1101
+ if ((_a = elementRef.current) == null ? void 0 : _a.contains(target)) return;
1102
+ if ((_c = (_b = options.menuRef) == null ? void 0 : _b.current) == null ? void 0 : _c.contains(target)) return;
1103
+ if ((_d = options.additionalRefs) == null ? void 0 : _d.some((ref) => {
1104
+ var _a2;
1105
+ return (_a2 = ref.current) == null ? void 0 : _a2.contains(target);
1106
+ }))
1107
+ return;
1108
+ (_e = options.setIsOpen) == null ? void 0 : _e.call(options, false);
1109
+ };
1110
+ document.addEventListener("mousedown", handleClickOutside);
1111
+ return () => {
1112
+ document.removeEventListener("mousedown", handleClickOutside);
1113
+ };
1114
+ }, [
1115
+ options,
1116
+ elementRef,
1117
+ options == null ? void 0 : options.isOpen,
1118
+ options == null ? void 0 : options.setIsOpen,
1119
+ options == null ? void 0 : options.menuRef,
1120
+ options == null ? void 0 : options.additionalRefs
1121
+ ]);
1122
+ (0, import_react7.useEffect)(() => {
1123
+ updatePosition();
1124
+ const resizeObserver = new ResizeObserver(updatePosition);
1125
+ if (elementRef == null ? void 0 : elementRef.current) {
1126
+ resizeObserver.observe(elementRef.current);
1127
+ }
1128
+ window.addEventListener("scroll", updatePosition);
1129
+ window.addEventListener("resize", updatePosition);
1130
+ return () => {
1131
+ resizeObserver.disconnect();
1132
+ window.removeEventListener("scroll", updatePosition);
1133
+ window.removeEventListener("resize", updatePosition);
1134
+ };
1135
+ }, [elementRef, updatePosition]);
1136
+ return { menuPosition, updatePosition };
1137
+ }
1138
+
1139
+ // src/components/Menu.tsx
1140
+ var import_jsx_runtime5 = require("react/jsx-runtime");
1141
+ var Menu = (_a) => {
1142
+ var _b = _a, {
1143
+ id,
1144
+ testid,
1145
+ children,
1146
+ className,
1147
+ ref,
1148
+ positionTo,
1149
+ mobilePositionTo,
1150
+ show,
1151
+ setShow,
1152
+ position = "bottom",
1153
+ maxHeight: customMaxHeight,
1154
+ topOffset,
1155
+ mobileBackMenuOption,
1156
+ mobileHide,
1157
+ useDefaultMinWidth,
1158
+ autoFocusOff,
1159
+ menuName,
1160
+ calculateMinMaxHeight
1161
+ } = _b, props = __objRest(_b, [
1162
+ "id",
1163
+ "testid",
1164
+ "children",
1165
+ "className",
1166
+ "ref",
1167
+ "positionTo",
1168
+ "mobilePositionTo",
1169
+ "show",
1170
+ "setShow",
1171
+ "position",
1172
+ "maxHeight",
1173
+ "topOffset",
1174
+ "mobileBackMenuOption",
1175
+ "mobileHide",
1176
+ "useDefaultMinWidth",
1177
+ "autoFocusOff",
1178
+ "menuName",
1179
+ "calculateMinMaxHeight"
1180
+ ]);
1181
+ const internalRef = (0, import_react8.useRef)(null);
1182
+ const actualRef = ref || internalRef;
1183
+ const [maxHeight, setMaxHeight] = (0, import_react8.useState)("180px");
1184
+ const isMobile = useMatchesMobile();
1185
+ const { menuPosition, updatePosition } = useMenuPosition(
1186
+ isMobile && mobilePositionTo ? mobilePositionTo : positionTo,
1187
+ position,
1188
+ {
1189
+ isOpen: show,
1190
+ setIsOpen: setShow,
1191
+ menuRef: internalRef,
1192
+ topOffset,
1193
+ isMobile: !!(isMobile && mobilePositionTo)
1194
+ }
1195
+ );
1196
+ (0, import_react8.useEffect)(() => {
1197
+ if (calculateMinMaxHeight) {
1198
+ return;
1199
+ }
1200
+ const raf = requestAnimationFrame(() => {
1201
+ if (!actualRef.current || customMaxHeight) {
1202
+ return;
1203
+ }
1204
+ if (actualRef.current.childElementCount > 4) {
1205
+ let accumulatedHeight = 0;
1206
+ Array.from(actualRef.current.children).forEach((child, index) => {
1207
+ if (index >= 5) {
1208
+ return;
1209
+ }
1210
+ accumulatedHeight += child.clientHeight;
1211
+ });
1212
+ accumulatedHeight = accumulatedHeight / 5 * 4.5;
1213
+ setMaxHeight(`${accumulatedHeight}px`);
1214
+ }
1215
+ });
1216
+ return () => {
1217
+ cancelAnimationFrame(raf);
1218
+ };
1219
+ }, [actualRef.current, customMaxHeight, calculateMinMaxHeight]);
1220
+ (0, import_react8.useEffect)(() => {
1221
+ if (!calculateMinMaxHeight) {
1222
+ return;
1223
+ }
1224
+ if ((positionTo == null ? void 0 : positionTo.current) && actualRef.current) {
1225
+ const positionToRect = positionTo.current.getBoundingClientRect();
1226
+ const offsetInPx = 16;
1227
+ const calculatedMaxHeight = window.innerHeight - positionToRect.bottom - offsetInPx;
1228
+ setMaxHeight(`${calculatedMaxHeight}px`);
1229
+ }
1230
+ }, [actualRef.current, positionTo == null ? void 0 : positionTo.current, calculateMinMaxHeight]);
1231
+ (0, import_react8.useEffect)(() => {
1232
+ if (!show) {
1233
+ return;
1234
+ }
1235
+ initializeMenuFocus();
1236
+ updatePosition();
1237
+ }, [show, updatePosition]);
1238
+ (0, import_react8.useEffect)(() => {
1239
+ if (!show || !setShow) {
1240
+ return;
1241
+ }
1242
+ const handleEscapeKey = (event) => {
1243
+ var _a2;
1244
+ if (event.key !== "Escape") {
1245
+ return;
1246
+ }
1247
+ setShow(false);
1248
+ (_a2 = positionTo == null ? void 0 : positionTo.current) == null ? void 0 : _a2.focus();
1249
+ };
1250
+ document.addEventListener("keydown", handleEscapeKey);
1251
+ return () => {
1252
+ document.removeEventListener("keydown", handleEscapeKey);
1253
+ };
1254
+ }, [show, setShow, positionTo]);
1255
+ return show && (0, import_react_dom.createPortal)(
1256
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
1257
+ "div",
1258
+ __spreadProps(__spreadValues({
1259
+ id,
1260
+ "data-testid": testid,
1261
+ ref: setRefs,
1262
+ className: (0, import_clsx6.default)(
1263
+ "shadow-4 rounded-base bg-background-grouped-primary-normal overflow-x-hidden overflow-y-auto flex flex-col outline-0",
1264
+ "fixed",
1265
+ "z-50",
1266
+ "max-w-screen",
1267
+ mobileHide && "opacity-0 pointer-events-none",
1268
+ className
1269
+ )
1270
+ }, props), {
1271
+ style: __spreadProps(__spreadValues(__spreadProps(__spreadValues({}, props.style), {
1272
+ maxHeight: customMaxHeight || maxHeight
1273
+ }), menuPosition), {
1274
+ minWidth: useDefaultMinWidth ? "212px" : menuPosition.minWidth
1275
+ }),
1276
+ onKeyDown: handleKeydown,
1277
+ onMouseDown: stopPropagation,
1278
+ onMouseUp: stopPropagation,
1279
+ onTouchStart: stopPropagation,
1280
+ onTouchEnd: stopPropagation,
1281
+ tabIndex: -1,
1282
+ "data-menu": menuName != null ? menuName : "",
1283
+ children: [
1284
+ mobileBackMenuOption == null ? void 0 : mobileBackMenuOption(),
1285
+ children
1286
+ ]
1287
+ })
1288
+ ),
1289
+ findDocumentRoot(internalRef.current)
1290
+ );
1291
+ function handleKeydown(e) {
1292
+ var _a2, _b2;
1293
+ if (!internalRef.current) {
1294
+ return;
1295
+ }
1296
+ if (e.key !== "Escape") {
1297
+ e.stopPropagation();
1298
+ }
1299
+ const menuOptions = Array.from(
1300
+ internalRef.current.querySelectorAll('[role="menuitem"]')
1301
+ );
1302
+ if (menuOptions.length === 0) {
1303
+ return;
1304
+ }
1305
+ let currentIndex = -1;
1306
+ const focusedElement = document.activeElement;
1307
+ for (let i = 0; i < menuOptions.length; i++) {
1308
+ if (menuOptions[i] === focusedElement) {
1309
+ currentIndex = i;
1310
+ break;
1311
+ }
1312
+ }
1313
+ switch (e.key) {
1314
+ case "ArrowDown": {
1315
+ e.preventDefault();
1316
+ const nextIndex = currentIndex < menuOptions.length - 1 ? currentIndex + 1 : 0;
1317
+ menuOptions[nextIndex].focus();
1318
+ break;
1319
+ }
1320
+ case "ArrowUp": {
1321
+ e.preventDefault();
1322
+ const prevIndex = currentIndex > 0 ? currentIndex - 1 : menuOptions.length - 1;
1323
+ menuOptions[prevIndex].focus();
1324
+ break;
1325
+ }
1326
+ case "Home":
1327
+ e.preventDefault();
1328
+ menuOptions[0].focus();
1329
+ break;
1330
+ case "End":
1331
+ e.preventDefault();
1332
+ menuOptions[menuOptions.length - 1].focus();
1333
+ break;
1334
+ case "Enter":
1335
+ case " ":
1336
+ case "ArrowRight":
1337
+ e.preventDefault();
1338
+ if (currentIndex >= 0) {
1339
+ menuOptions[currentIndex].click();
1340
+ }
1341
+ break;
1342
+ case "ArrowLeft":
1343
+ e.preventDefault();
1344
+ (_a2 = positionTo == null ? void 0 : positionTo.current) == null ? void 0 : _a2.click();
1345
+ (_b2 = positionTo == null ? void 0 : positionTo.current) == null ? void 0 : _b2.focus();
1346
+ break;
1347
+ }
1348
+ }
1349
+ function initializeMenuFocus() {
1350
+ var _a2, _b2, _c;
1351
+ if (!autoFocusOff) {
1352
+ (_a2 = internalRef.current) == null ? void 0 : _a2.focus();
1353
+ }
1354
+ const selectedOption = (_b2 = internalRef.current) == null ? void 0 : _b2.querySelector(
1355
+ "[data-selected]"
1356
+ );
1357
+ const firstMenuItem = (_c = internalRef.current) == null ? void 0 : _c.querySelector(
1358
+ '[role="menuitem"]'
1359
+ );
1360
+ const targetElement = selectedOption || firstMenuItem;
1361
+ if (!targetElement) {
1362
+ return;
1363
+ }
1364
+ targetElement.scrollIntoView({
1365
+ block: "nearest",
1366
+ behavior: "instant"
1367
+ });
1368
+ if (autoFocusOff) {
1369
+ return;
1370
+ }
1371
+ requestAnimationFrame(() => {
1372
+ targetElement.focus();
1373
+ });
1374
+ }
1375
+ function setRefs(node) {
1376
+ internalRef.current = node;
1377
+ if (ref) {
1378
+ if (typeof ref === "function") {
1379
+ ref(node);
1380
+ } else {
1381
+ ref.current = node;
1382
+ }
1383
+ }
1384
+ }
1385
+ function stopPropagation(e) {
1386
+ e.stopPropagation();
1387
+ }
1388
+ };
1389
+ Menu.displayName = "Menu";
1390
+
1391
+ // src/components/Search.tsx
1392
+ var import_react10 = require("react");
1393
+
1394
+ // src/components/Input.tsx
1395
+ var import_react9 = require("react");
1396
+ var import_clsx7 = __toESM(require("clsx"), 1);
1397
+ var import_jsx_runtime6 = require("react/jsx-runtime");
1398
+ var InputBase = (_a) => {
1399
+ var _b = _a, {
1400
+ id,
1401
+ testid,
1402
+ before,
1403
+ after,
1404
+ type,
1405
+ label,
1406
+ error,
1407
+ className,
1408
+ align = "left",
1409
+ caption,
1410
+ required,
1411
+ selectOnFocus,
1412
+ removeRoundness,
1413
+ inputContainerRef,
1414
+ removeBorder,
1415
+ wrapperClassName,
1416
+ focus,
1417
+ secondaryIconColor,
1418
+ fullWidth = true,
1419
+ wrapperRef
1420
+ } = _b, props = __objRest(_b, [
1421
+ "id",
1422
+ "testid",
1423
+ "before",
1424
+ "after",
1425
+ "type",
1426
+ "label",
1427
+ "error",
1428
+ "className",
1429
+ "align",
1430
+ "caption",
1431
+ "required",
1432
+ "selectOnFocus",
1433
+ "removeRoundness",
1434
+ "inputContainerRef",
1435
+ "removeBorder",
1436
+ "wrapperClassName",
1437
+ "focus",
1438
+ "secondaryIconColor",
1439
+ "fullWidth",
1440
+ "wrapperRef"
1441
+ ]);
1442
+ const attributes = {
1443
+ "data-error": error && !focus || null,
1444
+ "data-focus": focus || null
1445
+ };
1446
+ const inputRef = (0, import_react9.useRef)(null);
1447
+ const inputId = id ? `${id}-input` : void 0;
1448
+ (0, import_react9.useEffect)(() => {
1449
+ var _a2;
1450
+ const input = inputRef.current;
1451
+ const focusHandler = () => {
1452
+ input == null ? void 0 : input.select();
1453
+ };
1454
+ if (selectOnFocus) {
1455
+ (_a2 = inputRef.current) == null ? void 0 : _a2.addEventListener("focus", focusHandler);
1456
+ return () => {
1457
+ input == null ? void 0 : input.removeEventListener("focus", focusHandler);
1458
+ };
1459
+ }
1460
+ }, [selectOnFocus]);
1461
+ const inputBaseClass = (0, import_clsx7.default)(
1462
+ fullWidth ? "w-full" : "w-fit",
1463
+ "flex flex-row items-center",
1464
+ "bg-background-action-secondary-normal caret-icon-on-action-secondary-normal",
1465
+ componentGap,
1466
+ baseTransition,
1467
+ "outline-transparent outline-2 -outline-offset-2",
1468
+ componentPaddingMinusBorder,
1469
+ !removeRoundness && "rounded-base",
1470
+ !removeBorder && "border border-border-primary-normal",
1471
+ "relative"
1472
+ );
1473
+ const inputFocusClass = (0, import_clsx7.default)(
1474
+ "has-[[data-focus]]:border-transparent has-[[data-focus]]:outline-border-primary-focus focus-within:border-transparent focus-within:outline-border-primary-focus"
1475
+ );
1476
+ const inputDisabledClass = (0, import_clsx7.default)(
1477
+ "has-disabled:bg-background-action-secondary-disabled"
1478
+ );
1479
+ const inputReadOnlyClass = (0, import_clsx7.default)(
1480
+ "has-[input:not(:disabled):read-only]:outline-none has-[input:not(:disabled):read-only]:bg-transparent has-[input:not(:disabled):read-only]:border-transparent has-[input:not(:disabled):read-only]:pl-0"
1481
+ );
1482
+ const inputInvalidClass = (0, import_clsx7.default)(
1483
+ "has-[[data-error]]:border-transparent has-[[data-error]]:not-focus-within:outline-border-primary-error has-[[data-error]]:not-focus-within:outline-1"
1484
+ );
1485
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
1486
+ "label",
1487
+ {
1488
+ id,
1489
+ "data-testid": testid,
1490
+ htmlFor: inputId,
1491
+ ref: inputContainerRef,
1492
+ className: (0, import_clsx7.default)(
1493
+ "w-full flex flex-col",
1494
+ "block",
1495
+ "text-text-primary-normal has-disabled:text-text-primary-disabled",
1496
+ componentGap
1497
+ ),
1498
+ style: __spreadValues({}, props.style),
1499
+ children: [
1500
+ label && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: (0, import_clsx7.default)("flex items-center", componentGap), children: [
1501
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1502
+ Label,
1503
+ {
1504
+ id: id ? `${id}-label` : void 0,
1505
+ color: error ? "text-primary-error" : void 0,
1506
+ className: (0, import_clsx7.default)(
1507
+ props.disabled || props.readOnly ? "cursor-default" : "cursor-pointer"
1508
+ ),
1509
+ children: label
1510
+ }
1511
+ ),
1512
+ required && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1513
+ "span",
1514
+ {
1515
+ className: (0, import_clsx7.default)(typography.label, "text-text-critical-normal"),
1516
+ children: "*"
1517
+ }
1518
+ )
1519
+ ] }),
1520
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
1521
+ "div",
1522
+ {
1523
+ className: (0, import_clsx7.default)(
1524
+ inputBaseClass,
1525
+ !props.disabled && inputInvalidClass,
1526
+ inputFocusClass,
1527
+ inputDisabledClass,
1528
+ inputReadOnlyClass,
1529
+ wrapperClassName
1530
+ ),
1531
+ ref: (el) => {
1532
+ if (wrapperRef) {
1533
+ wrapperRef.current = el;
1534
+ }
1535
+ },
1536
+ children: [
1537
+ before,
1538
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1539
+ "input",
1540
+ __spreadProps(__spreadValues(__spreadValues({
1541
+ ref: (el) => {
1542
+ inputRef.current = el;
1543
+ },
1544
+ type,
1545
+ required
1546
+ }, props), attributes), {
1547
+ id: inputId,
1548
+ "data-testid": testid ? `${testid}-input` : void 0,
1549
+ className: (0, import_clsx7.default)(
1550
+ "flex-1 outline-none w-full max-w-full min-h-6 min-w-0",
1551
+ "[appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",
1552
+ "placeholder:text-text-secondary-normal disabled:text-text-secondary-disabled",
1553
+ align === "right" && "text-right",
1554
+ align === "center" && "text-center",
1555
+ componentPaddingXUsingComponentGap,
1556
+ typography.paragraph,
1557
+ className,
1558
+ props.readOnly && !props.disabled && "!px-0"
1559
+ )
1560
+ })
1561
+ ),
1562
+ secondaryIconColor ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "contents text-text-secondary-normal", children: after }) : after
1563
+ ]
1564
+ }
1565
+ ),
1566
+ caption && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1567
+ "div",
1568
+ {
1569
+ id: id ? `${id}-caption` : void 0,
1570
+ "data-testid": testid ? `${testid}-caption` : void 0,
1571
+ children: caption
1572
+ }
1573
+ )
1574
+ ]
1575
+ }
1576
+ );
1577
+ };
1578
+ var Input = (_a) => {
1579
+ var _b = _a, {
1580
+ variant = "default",
1581
+ decimals,
1582
+ uom,
1583
+ removeSearchIcon,
1584
+ value: propValue,
1585
+ onChange,
1586
+ onBlur,
1587
+ onClear,
1588
+ id,
1589
+ testid
1590
+ } = _b, props = __objRest(_b, [
1591
+ "variant",
1592
+ "decimals",
1593
+ "uom",
1594
+ "removeSearchIcon",
1595
+ "value",
1596
+ "onChange",
1597
+ "onBlur",
1598
+ "onClear",
1599
+ "id",
1600
+ "testid"
1601
+ ]);
1602
+ const [internalValue, setInternalValue] = (0, import_react9.useState)("");
1603
+ const [displayValue, setDisplayValue] = (0, import_react9.useState)("");
1604
+ (0, import_react9.useEffect)(() => {
1605
+ var _a2;
1606
+ const stringValue = (_a2 = propValue == null ? void 0 : propValue.toString()) != null ? _a2 : "";
1607
+ setInternalValue(stringValue);
1608
+ setDisplayValue(stringValue);
1609
+ }, [propValue]);
1610
+ (0, import_react9.useEffect)(() => {
1611
+ var _a2;
1612
+ if (variant !== "currency") {
1613
+ return;
1614
+ }
1615
+ const stringValue = (_a2 = propValue == null ? void 0 : propValue.toString()) != null ? _a2 : "";
1616
+ if (!stringValue) {
1617
+ return;
1618
+ }
1619
+ const formatted = formatDecimalValue(stringValue, decimals != null ? decimals : 2);
1620
+ setInternalValue(formatted);
1621
+ setDisplayValue(formatCurrencyDisplay(formatted));
1622
+ }, []);
1623
+ const getInputProps = () => {
1624
+ var _a2;
1625
+ const baseProps = __spreadProps(__spreadValues(__spreadProps(__spreadValues({}, props), {
1626
+ id
1627
+ }), getDecimalPlaceholder(decimals)), {
1628
+ value: propValue
1629
+ });
1630
+ switch (variant) {
1631
+ case "search":
1632
+ return __spreadProps(__spreadValues({}, baseProps), {
1633
+ placeholder: (_a2 = props.placeholder) != null ? _a2 : "Search",
1634
+ className: "!mr-6",
1635
+ value: displayValue
1636
+ });
1637
+ case "finder":
1638
+ return baseProps;
1639
+ case "currency":
1640
+ return __spreadProps(__spreadValues({}, baseProps), {
1641
+ align: "right",
1642
+ type: "text",
1643
+ value: displayValue
1644
+ });
1645
+ case "percentage":
1646
+ case "uom":
1647
+ return __spreadProps(__spreadValues({}, baseProps), {
1648
+ type: "number",
1649
+ align: "right"
1650
+ });
1651
+ default:
1652
+ return baseProps;
1653
+ }
1654
+ };
1655
+ const getBeforeElement = () => {
1656
+ if (props.before) return props.before;
1657
+ switch (variant) {
1658
+ case "search":
1659
+ return !removeSearchIcon ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "text-icon-primary-normal contents", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Icon, { name: "search" }) }) : null;
1660
+ case "currency":
1661
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "text-icon-primary-normal contents", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Icon, { name: "attach_money" }) });
1662
+ default:
1663
+ return null;
1664
+ }
1665
+ };
1666
+ const getAfterElement = () => {
1667
+ if (props.after) return props.after;
1668
+ switch (variant) {
1669
+ case "search": {
1670
+ const hasValue = displayValue.length > 0;
1671
+ return hasValue && !props.readOnly ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1672
+ Icon,
1673
+ {
1674
+ id: id ? `${id}-clear-button` : void 0,
1675
+ testid: testid ? `${testid}-clear-button` : void 0,
1676
+ name: "close",
1677
+ onClick: handleSearchReset,
1678
+ className: "cursor-pointer absolute right-2 bottom-2/4 translate-y-2/4"
1679
+ }
1680
+ ) : null;
1681
+ }
1682
+ case "finder":
1683
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Icon, { name: "search" });
1684
+ case "uom":
1685
+ return uom ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "text-text-secondary-normal uppercase", children: uom.slice(0, 4) }) : null;
1686
+ case "percentage":
1687
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "text-icon-primary-normal contents", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Icon, { name: "percent" }) });
1688
+ default:
1689
+ return null;
1690
+ }
1691
+ };
1692
+ const handleSearchReset = () => {
1693
+ setInternalValue("");
1694
+ setDisplayValue("");
1695
+ if (onChange) {
1696
+ const syntheticEvent = {
1697
+ target: { value: "" }
1698
+ };
1699
+ if (typeof onChange === "function") {
1700
+ onChange(syntheticEvent);
1701
+ }
1702
+ }
1703
+ onClear == null ? void 0 : onClear();
1704
+ };
1705
+ const handleChange = (e) => {
1706
+ const rawValue = e.target.value;
1707
+ if (variant === "currency") {
1708
+ const raw = rawValue.replace(/,/g, "");
1709
+ if (raw === "") {
1710
+ setInternalValue("");
1711
+ setDisplayValue("");
1712
+ if (onChange) {
1713
+ const syntheticEvent = __spreadProps(__spreadValues({}, e), {
1714
+ target: __spreadProps(__spreadValues({}, e.target), { value: "" })
1715
+ });
1716
+ onChange(syntheticEvent);
1717
+ }
1718
+ return;
1719
+ }
1720
+ const regex = /^\d*\.?\d*$/;
1721
+ if (!regex.test(raw)) return;
1722
+ const parts = raw.split(".");
1723
+ const currentDecimals = decimals != null ? decimals : 2;
1724
+ if (parts.length === 2 && parts[1].length > currentDecimals) return;
1725
+ setInternalValue(raw);
1726
+ setDisplayValue(formatCurrencyDisplay(raw));
1727
+ const asNumber = Number(raw);
1728
+ if (!isNaN(asNumber) && onChange) {
1729
+ const syntheticEvent = __spreadProps(__spreadValues({}, e), {
1730
+ target: __spreadProps(__spreadValues({}, e.target), { value: asNumber.toString() })
1731
+ });
1732
+ onChange(syntheticEvent);
1733
+ }
1734
+ return;
1735
+ }
1736
+ setInternalValue(rawValue);
1737
+ setDisplayValue(rawValue);
1738
+ if (typeof onChange === "function") {
1739
+ onChange(e);
1740
+ }
1741
+ };
1742
+ const handleBlur = (e) => {
1743
+ if (!internalValue) {
1744
+ return;
1745
+ }
1746
+ if (variant === "currency") {
1747
+ const formatted = formatDecimalValue(internalValue, decimals != null ? decimals : 2);
1748
+ setInternalValue(formatted);
1749
+ setDisplayValue(formatCurrencyDisplay(formatted));
1750
+ const asNumber = Number(formatted);
1751
+ if (!isNaN(asNumber) && onChange) {
1752
+ const syntheticEvent = __spreadProps(__spreadValues({}, e), {
1753
+ target: __spreadProps(__spreadValues({}, e.target), { value: asNumber.toString() })
1754
+ });
1755
+ onChange(syntheticEvent);
1756
+ }
1757
+ } else if (variant === "uom" || variant === "percentage") {
1758
+ const formattedValue = formatDecimalValue(e.target.value, decimals);
1759
+ e.target.value = formattedValue;
1760
+ }
1761
+ onBlur == null ? void 0 : onBlur(e);
1762
+ };
1763
+ const inputProps = getInputProps();
1764
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1765
+ InputBase,
1766
+ __spreadProps(__spreadValues({}, inputProps), {
1767
+ before: getBeforeElement(),
1768
+ after: getAfterElement(),
1769
+ onChange: handleChange,
1770
+ onBlur: handleBlur,
1771
+ testid
1772
+ })
1773
+ );
1774
+ };
1775
+ Input.displayName = "Input";
1776
+ var Finder = (props) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Input, __spreadProps(__spreadValues({}, props), { variant: "finder" }));
1777
+ var UOM = (props) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Input, __spreadProps(__spreadValues({}, props), { variant: "uom" }));
1778
+ var Currency = (props) => {
1779
+ var _a;
1780
+ const handleCurrencyChange = (e) => {
1781
+ var _a2;
1782
+ (_a2 = props.onChange) == null ? void 0 : _a2.call(props, e);
1783
+ };
1784
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1785
+ Input,
1786
+ __spreadProps(__spreadValues({}, props), {
1787
+ variant: "currency",
1788
+ decimals: (_a = props.decimals) != null ? _a : 2,
1789
+ onChange: handleCurrencyChange
1790
+ })
1791
+ );
1792
+ };
1793
+ var Percentage = (props) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Input, __spreadProps(__spreadValues({}, props), { variant: "percentage" }));
1794
+ Finder.displayName = "Finder";
1795
+ UOM.displayName = "UOM";
1796
+ Currency.displayName = "Currency";
1797
+ Percentage.displayName = "Percentage";
1798
+
1799
+ // src/components/Search.tsx
1800
+ var import_jsx_runtime7 = require("react/jsx-runtime");
1801
+ var Search = (_a) => {
1802
+ var _b = _a, {
1803
+ id,
1804
+ testid,
1805
+ label,
1806
+ error,
1807
+ children,
1808
+ readOnly,
1809
+ renderMenu,
1810
+ onClick,
1811
+ wrapperClassName,
1812
+ removeRoundness
1813
+ } = _b, props = __objRest(_b, [
1814
+ "id",
1815
+ "testid",
1816
+ "label",
1817
+ "error",
1818
+ "children",
1819
+ "readOnly",
1820
+ "renderMenu",
1821
+ "onClick",
1822
+ "wrapperClassName",
1823
+ "removeRoundness"
1824
+ ]);
1825
+ const inputRef = (0, import_react10.useRef)(null);
1826
+ const inputContainerRef = (0, import_react10.useRef)(null);
1827
+ const preventFocusOnInitialRender = (0, import_react10.useRef)(true);
1828
+ const [show, setShow] = (0, import_react10.useState)(false);
1829
+ const [clearing, setClearing] = (0, import_react10.useState)(false);
1830
+ const uniqueId = (0, import_react10.useId)();
1831
+ const searchMenuName = `search-menu-${uniqueId}`;
1832
+ (0, import_react10.useEffect)(() => {
1833
+ var _a2;
1834
+ if (preventFocusOnInitialRender.current) {
1835
+ preventFocusOnInitialRender.current = false;
1836
+ return;
1837
+ }
1838
+ (_a2 = inputRef.current) == null ? void 0 : _a2.focus();
1839
+ }, [props.value]);
1840
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
1841
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1842
+ Input,
1843
+ __spreadValues({
1844
+ id,
1845
+ testid,
1846
+ variant: "search",
1847
+ inputContainerRef,
1848
+ ref: inputRef,
1849
+ label,
1850
+ wrapperClassName,
1851
+ onClick: (e) => {
1852
+ if (props.disabled || readOnly) {
1853
+ return;
1854
+ }
1855
+ if (clearing) {
1856
+ setClearing(false);
1857
+ return;
1858
+ }
1859
+ onClick == null ? void 0 : onClick(e);
1860
+ setShow(!show);
1861
+ },
1862
+ onClear: () => {
1863
+ setClearing(true);
1864
+ },
1865
+ onKeyDown: (e) => {
1866
+ setShow(true);
1867
+ if (["ArrowUp", "ArrowDown"].includes(e.key)) {
1868
+ e.preventDefault();
1869
+ const menu = document.querySelector(
1870
+ `[data-menu="${searchMenuName}"]`
1871
+ );
1872
+ const selectedMenuOption = menu == null ? void 0 : menu.querySelector("[data-selected]");
1873
+ if (selectedMenuOption) {
1874
+ const allMenuOptions = Array.from(
1875
+ (menu == null ? void 0 : menu.querySelectorAll('[role="menuitem"]')) || []
1876
+ );
1877
+ const currentIndex = allMenuOptions.indexOf(selectedMenuOption);
1878
+ let targetOption;
1879
+ if (e.key === "ArrowDown") {
1880
+ targetOption = allMenuOptions[currentIndex + 1] || allMenuOptions[0];
1881
+ } else {
1882
+ targetOption = allMenuOptions[currentIndex - 1] || allMenuOptions[allMenuOptions.length - 1];
1883
+ }
1884
+ targetOption == null ? void 0 : targetOption.focus();
1885
+ } else {
1886
+ const toFocusMenuOption = e.key === "ArrowDown" ? menu == null ? void 0 : menu.querySelector('[role="menuitem"]') : menu == null ? void 0 : menu.querySelector(
1887
+ '[role="menuitem"]:last-child'
1888
+ );
1889
+ toFocusMenuOption == null ? void 0 : toFocusMenuOption.focus();
1890
+ }
1891
+ }
1892
+ },
1893
+ error,
1894
+ readOnly,
1895
+ removeRoundness,
1896
+ focus: renderMenu && show
1897
+ }, props)
1898
+ ),
1899
+ renderMenu ? renderMenu({
1900
+ id: id ? `${id}-menu` : void 0,
1901
+ testid: testid ? `${testid}-menu` : void 0,
1902
+ positionTo: inputContainerRef,
1903
+ show,
1904
+ setShow,
1905
+ topOffset: props.caption ? -16 : null,
1906
+ autoFocusOff: true,
1907
+ menuName: searchMenuName
1908
+ }) : children
1909
+ ] });
1910
+ };
1911
+ Search.displayName = "Search";
1912
+
1913
+ // src/components/DataGridCell.tsx
1914
+ var import_jsx_runtime8 = require("react/jsx-runtime");
1915
+ var DataGridCell = (0, import_react11.memo)(
1916
+ (_a) => {
1917
+ var _b = _a, {
1918
+ id,
1919
+ type = "default",
1920
+ component = "static",
1921
+ children,
1922
+ className,
1923
+ locked = false,
1924
+ noPadding = false,
1925
+ paddedLeft = false,
1926
+ style,
1927
+ onClick,
1928
+ onRightClick,
1929
+ error,
1930
+ warning,
1931
+ center,
1932
+ width,
1933
+ minWidth,
1934
+ testid
1935
+ } = _b, props = __objRest(_b, [
1936
+ "id",
1937
+ "type",
1938
+ "component",
1939
+ "children",
1940
+ "className",
1941
+ "locked",
1942
+ "noPadding",
1943
+ "paddedLeft",
1944
+ "style",
1945
+ "onClick",
1946
+ "onRightClick",
1947
+ "error",
1948
+ "warning",
1949
+ "center",
1950
+ "width",
1951
+ "minWidth",
1952
+ "testid"
1953
+ ]);
1954
+ const Element = type === "header" ? "th" : "td";
1955
+ const timerRef = (0, import_react11.useRef)(null);
1956
+ const [isGrabbing, setIsGrabbing] = (0, import_react11.useState)(false);
1957
+ const [isPointerPressed, setIsPointerPressed] = (0, import_react11.useState)(false);
1958
+ (0, import_react11.useEffect)(() => {
1959
+ return () => {
1960
+ if (timerRef.current) {
1961
+ clearTimeout(timerRef.current);
1962
+ timerRef.current = null;
1963
+ }
1964
+ };
1965
+ }, []);
1966
+ const handlePointerDown = (_event) => {
1967
+ setIsPointerPressed(true);
1968
+ timerRef.current = window.setTimeout(() => {
1969
+ setIsGrabbing(true);
1970
+ }, 500);
1971
+ };
1972
+ const handlePointerUp = (event) => {
1973
+ if (timerRef.current) {
1974
+ clearTimeout(timerRef.current);
1975
+ timerRef.current = null;
1976
+ }
1977
+ const rightClick = event.nativeEvent instanceof MouseEvent && event.nativeEvent.button === 2;
1978
+ if (!isGrabbing && onClick && !rightClick && isPointerPressed) {
1979
+ onClick(event);
1980
+ }
1981
+ if (rightClick && onRightClick) {
1982
+ onRightClick();
1983
+ }
1984
+ setIsGrabbing(false);
1985
+ setIsPointerPressed(false);
1986
+ };
1987
+ const handlePointerLeave = () => {
1988
+ if (timerRef.current) {
1989
+ clearTimeout(timerRef.current);
1990
+ timerRef.current = null;
1991
+ }
1992
+ };
1993
+ const headerBgStyles = type === "header" && !locked && !["button"].includes(component) && "bg-brand-400 border-brand-200";
1994
+ const lockedHeaderBgStyles = locked && !["button"].includes(component) && "bg-neutral-400 border-neutral-300";
1995
+ const headerTypeStyles = type === "header" && component !== "button" && component !== "icon" && (0, import_clsx8.default)("border-r");
1996
+ const buttonComponentStyles = component === "button" && (0, import_clsx8.default)("border-r border-b border-border-primary-normal");
1997
+ const iconComponentStyles = component === "icon" && (0, import_clsx8.default)("border-l");
1998
+ const cellClasses = (0, import_clsx8.default)(
1999
+ headerTypeStyles,
2000
+ buttonComponentStyles,
2001
+ headerBgStyles,
2002
+ lockedHeaderBgStyles,
2003
+ iconComponentStyles,
2004
+ className,
2005
+ "flex flex-1 items-center gap-1 whitespace-nowrap h-10 relative text-text-primary-normal",
2006
+ "focus-within:!z-10",
2007
+ "overflow-x-hidden",
2008
+ "overflow-y-hidden",
2009
+ component === "input" && "border",
2010
+ component === "input" && !error && !warning && "border-border-primary-normal",
2011
+ component === "input" && error && "border-border-primary-error",
2012
+ component === "input" && warning && "border-background-warning-normal",
2013
+ !["button", "icon"].includes(component) && !noPadding && componentPadding,
2014
+ paddedLeft && "pl-2",
2015
+ component === "icon" && "border-l",
2016
+ isGrabbing && "!cursor-grabbing",
2017
+ component === "checkbox" || center && "justify-center"
2018
+ );
2019
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
2020
+ Element,
2021
+ __spreadProps(__spreadValues({
2022
+ id,
2023
+ "data-testid": testid,
2024
+ className: (0, import_clsx8.default)("flex h-10", !width && "flex-1"),
2025
+ style: { width, minWidth }
2026
+ }, props), {
2027
+ "data-theme": type === "header" && !locked ? "brand" : void 0,
2028
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
2029
+ "div",
2030
+ {
2031
+ className: cellClasses,
2032
+ style: __spreadValues({}, style),
2033
+ onMouseDown: handlePointerDown,
2034
+ onMouseUp: handlePointerUp,
2035
+ onMouseLeave: handlePointerLeave,
2036
+ onTouchStart: handlePointerDown,
2037
+ onTouchEnd: handlePointerUp,
2038
+ onTouchCancel: handlePointerLeave,
2039
+ onContextMenu: (e) => e.preventDefault(),
2040
+ children
2041
+ }
2042
+ )
2043
+ })
2044
+ );
2045
+ }
2046
+ );
2047
+ DataGridCell.displayName = "DataGridCell";
2048
+ function DataCellHeader(_a) {
2049
+ var _b = _a, {
2050
+ header,
2051
+ children,
2052
+ setNodeRef,
2053
+ node,
2054
+ id,
2055
+ testid,
2056
+ useMenuDefaultMinWidth
2057
+ } = _b, props = __objRest(_b, [
2058
+ "header",
2059
+ "children",
2060
+ "setNodeRef",
2061
+ "node",
2062
+ "id",
2063
+ "testid",
2064
+ "useMenuDefaultMinWidth"
2065
+ ]);
2066
+ var _a2;
2067
+ const [showMenu, setShowMenu] = (0, import_react11.useState)(false);
2068
+ const [filter, setFilter] = (0, import_react11.useState)(
2069
+ (_a2 = header.column.getFilterValue()) != null ? _a2 : ""
2070
+ );
2071
+ const ref = (0, import_react11.useRef)(null);
2072
+ const predeterminedPinned = (0, import_react11.useRef)(false);
2073
+ const { column, getContext } = header;
2074
+ const { id: columnId, setFilterValue } = column;
2075
+ const {
2076
+ menuRootRef,
2077
+ isMenuActive,
2078
+ registerSubMenu,
2079
+ listeners: subMenuListeners,
2080
+ mobileHide
2081
+ } = useSubMenuSystem(node ? node : ref);
2082
+ (0, import_react11.useEffect)(() => {
2083
+ var _a3, _b2, _c;
2084
+ const columnPinning = (_a3 = getContext().table.options.initialState) == null ? void 0 : _a3.columnPinning;
2085
+ const left = (_b2 = columnPinning == null ? void 0 : columnPinning.left) != null ? _b2 : [];
2086
+ const right = (_c = columnPinning == null ? void 0 : columnPinning.right) != null ? _c : [];
2087
+ predeterminedPinned.current = [...left, ...right].includes(columnId);
2088
+ }, [columnId, getContext]);
2089
+ (0, import_react11.useEffect)(() => {
2090
+ const handler = setTimeout(() => {
2091
+ setFilterValue(filter);
2092
+ }, 500);
2093
+ return () => {
2094
+ clearTimeout(handler);
2095
+ };
2096
+ }, [filter, setFilterValue]);
2097
+ const style = __spreadValues({
2098
+ position: "relative",
2099
+ whiteSpace: "nowrap",
2100
+ minWidth: header.column.getSize(),
2101
+ "--color-text-primary-normal": "var(--color-text-brand-primary-normal)",
2102
+ "--color-icon-on-action-primary-normal": "var(--color-text-brand-primary-normal)",
2103
+ "--background-action-secondary-normal": "var(--color-text-brand-primary-normal)"
2104
+ }, props.style);
2105
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
2106
+ DataGridCell,
2107
+ __spreadProps(__spreadValues({
2108
+ id,
2109
+ testid,
2110
+ ref: setNodeRef ? setNodeRef : ref,
2111
+ type: "header",
2112
+ component: "header",
2113
+ style,
2114
+ minWidth: `${header.column.getSize()}px`,
2115
+ onClick: header.column.getToggleSortingHandler(),
2116
+ onRightClick: () => setShowMenu(!showMenu)
2117
+ }, props), {
2118
+ children: [
2119
+ children,
2120
+ header.column.getCanFilter() && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
2121
+ Menu,
2122
+ {
2123
+ id: id ? `${id}-menu` : void 0,
2124
+ testid: testid ? `${testid}-menu` : void 0,
2125
+ ref: menuRootRef,
2126
+ positionTo: node ? node : ref,
2127
+ show: showMenu,
2128
+ setShow: setShowMenu,
2129
+ mobileHide,
2130
+ useDefaultMinWidth: useMenuDefaultMinWidth,
2131
+ children: [
2132
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
2133
+ MenuOption,
2134
+ __spreadProps(__spreadValues({
2135
+ id: id ? `${id}-filter-option` : void 0,
2136
+ testid: testid ? `${testid}-filter-option` : void 0
2137
+ }, subMenuListeners), {
2138
+ subMenu: (_b2) => {
2139
+ var _c = _b2, { menuId, subMenuLevel } = _c, props2 = __objRest(_c, ["menuId", "subMenuLevel"]);
2140
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
2141
+ Menu,
2142
+ __spreadProps(__spreadValues({
2143
+ id: id ? `${id}-filter-submenu` : void 0,
2144
+ testid: testid ? `${testid}-filter-submenu` : void 0
2145
+ }, props2), {
2146
+ show: isMenuActive(menuId, subMenuLevel),
2147
+ ref: (el) => {
2148
+ registerSubMenu(menuId, el);
2149
+ },
2150
+ useDefaultMinWidth: useMenuDefaultMinWidth,
2151
+ children: [
2152
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: (0, import_clsx8.default)(paddingUsingComponentGap), children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
2153
+ Search,
2154
+ {
2155
+ id: id ? `${id}-filter-search` : void 0,
2156
+ testid: testid ? `${testid}-filter-search` : void 0,
2157
+ onChange: (event) => {
2158
+ setFilter(event.target.value);
2159
+ },
2160
+ onKeyDown: (event) => {
2161
+ if ([" ", "Space"].includes(event.key)) {
2162
+ event.stopPropagation();
2163
+ }
2164
+ },
2165
+ value: filter != null ? filter : ""
2166
+ }
2167
+ ) }),
2168
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
2169
+ MenuOption,
2170
+ {
2171
+ id: id ? `${id}-filter-contains` : void 0,
2172
+ testid: testid ? `${testid}-filter-contains` : void 0,
2173
+ onClick: handleFilterFnChange,
2174
+ before: menuOptionIcon("includesString"),
2175
+ children: "Contains"
2176
+ }
2177
+ ),
2178
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
2179
+ MenuOption,
2180
+ {
2181
+ id: id ? `${id}-filter-startswith` : void 0,
2182
+ testid: testid ? `${testid}-filter-startswith` : void 0,
2183
+ onClick: handleFilterFnChange,
2184
+ before: menuOptionIcon("startsWith"),
2185
+ children: "Starts with"
2186
+ }
2187
+ ),
2188
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
2189
+ MenuOption,
2190
+ {
2191
+ id: id ? `${id}-filter-endswith` : void 0,
2192
+ testid: testid ? `${testid}-filter-endswith` : void 0,
2193
+ onClick: handleFilterFnChange,
2194
+ before: menuOptionIcon("endsWith"),
2195
+ children: "Ends with"
2196
+ }
2197
+ )
2198
+ ]
2199
+ })
2200
+ );
2201
+ },
2202
+ children: "Filter"
2203
+ })
2204
+ ),
2205
+ !predeterminedPinned.current && header.column.getCanPin() && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
2206
+ MenuOption,
2207
+ __spreadProps(__spreadValues({
2208
+ onClick: () => {
2209
+ setShowMenu(!showMenu);
2210
+ }
2211
+ }, subMenuListeners), {
2212
+ subMenu: (_d) => {
2213
+ var _e = _d, { menuId, subMenuLevel } = _e, props2 = __objRest(_e, ["menuId", "subMenuLevel"]);
2214
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
2215
+ Menu,
2216
+ __spreadProps(__spreadValues({}, props2), {
2217
+ show: isMenuActive(menuId, subMenuLevel),
2218
+ ref: (el) => {
2219
+ registerSubMenu(menuId, el);
2220
+ },
2221
+ children: [
2222
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
2223
+ MenuOption,
2224
+ {
2225
+ selected: header.column.getIsPinned() === "left",
2226
+ onClick: () => {
2227
+ if (header.column.getIsPinned() === "left") {
2228
+ header.column.pin(false);
2229
+ } else {
2230
+ header.column.pin("left");
2231
+ }
2232
+ },
2233
+ after: header.column.getIsPinned() === "left" && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Icon, { name: "check" }),
2234
+ children: "Left"
2235
+ }
2236
+ ),
2237
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
2238
+ MenuOption,
2239
+ {
2240
+ selected: header.column.getIsPinned() === "right",
2241
+ onClick: () => {
2242
+ if (header.column.getIsPinned() === "right") {
2243
+ header.column.pin(false);
2244
+ } else {
2245
+ header.column.pin("right");
2246
+ }
2247
+ },
2248
+ after: header.column.getIsPinned() === "right" && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Icon, { name: "check" }),
2249
+ children: "Right"
2250
+ }
2251
+ )
2252
+ ]
2253
+ })
2254
+ );
2255
+ },
2256
+ children: `Freeze [${header.column.columnDef.header}]`
2257
+ })
2258
+ )
2259
+ ]
2260
+ }
2261
+ )
2262
+ ]
2263
+ })
2264
+ );
2265
+ function menuOptionIcon(value) {
2266
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
2267
+ Icon,
2268
+ {
2269
+ name: "check",
2270
+ className: (0, import_clsx8.default)(
2271
+ header.column.columnDef.filterFn !== value && "text-transparent"
2272
+ )
2273
+ }
2274
+ );
2275
+ }
2276
+ function handleFilterFnChange(_id, value) {
2277
+ let filterFn = "includesString";
2278
+ const currentFilterFn = header.column.columnDef.filterFn;
2279
+ if ((value == null ? void 0 : value.toLowerCase()) === "starts with") {
2280
+ filterFn = currentFilterFn === "startsWith" ? "auto" : "startsWith";
2281
+ }
2282
+ if ((value == null ? void 0 : value.toLowerCase()) === "ends with") {
2283
+ filterFn = currentFilterFn === "endsWith" ? "auto" : "endsWith";
2284
+ }
2285
+ if ((value == null ? void 0 : value.toLowerCase()) === "contains") {
2286
+ filterFn = currentFilterFn === "includesString" ? "auto" : "includesString";
2287
+ }
2288
+ header.column.columnDef.filterFn = filterFn;
2289
+ header.column.setFilterValue(filter);
2290
+ }
2291
+ }
2292
+ DataCellHeader.displayName = "DataCellHeader";
2293
+ function DraggableCellHeader(_a) {
2294
+ var _b = _a, {
2295
+ header,
2296
+ children
2297
+ } = _b, props = __objRest(_b, [
2298
+ "header",
2299
+ "children"
2300
+ ]);
2301
+ const { attributes, isDragging, listeners, setNodeRef, transform, node } = (0, import_sortable.useSortable)({
2302
+ id: header.column.id
2303
+ });
2304
+ const style = {
2305
+ opacity: isDragging ? 0.8 : 1,
2306
+ position: "relative",
2307
+ transform: CSS.Translate.toString(transform),
2308
+ transition: "width transform 0.2s ease-in-out",
2309
+ whiteSpace: "nowrap",
2310
+ zIndex: isDragging ? 1 : 0,
2311
+ "--color-text-primary-normal": "var(--color-action-000)",
2312
+ "--color-icon-on-action-primary-normal": "var(--color-action-000)",
2313
+ userSelect: "none"
2314
+ };
2315
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
2316
+ DataCellHeader,
2317
+ __spreadProps(__spreadValues(__spreadValues(__spreadValues({
2318
+ header,
2319
+ setNodeRef,
2320
+ node,
2321
+ style
2322
+ }, props), attributes), listeners), {
2323
+ children
2324
+ })
2325
+ );
2326
+ }
2327
+ DraggableCellHeader.displayName = "DraggableCellHeader";
2328
+ function DragAlongCell(_a) {
2329
+ var _b = _a, {
2330
+ cell,
2331
+ children
2332
+ } = _b, props = __objRest(_b, [
2333
+ "cell",
2334
+ "children"
2335
+ ]);
2336
+ const { isDragging, setNodeRef, transform } = (0, import_sortable.useSortable)({
2337
+ id: cell.column.id
2338
+ });
2339
+ const style = {
2340
+ opacity: isDragging ? 0.8 : 1,
2341
+ position: "relative",
2342
+ transform: CSS.Translate.toString(transform),
2343
+ transition: "width transform 0.2s ease-in-out",
2344
+ minWidth: cell.column.getSize(),
2345
+ zIndex: isDragging ? 1 : 0
2346
+ };
2347
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(DataGridCell, __spreadProps(__spreadValues({ style, ref: setNodeRef }, props), { children }));
2348
+ }
2349
+ DragAlongCell.displayName = "DragAlongCell";
2350
+
2351
+ // src/components/DataGrid/index.tsx
2352
+ var import_react15 = __toESM(require("react"), 1);
2353
+ var import_react_table2 = require("@tanstack/react-table");
2354
+ var import_core = require("@dnd-kit/core");
2355
+ var import_sortable2 = require("@dnd-kit/sortable");
2356
+ var import_modifiers = require("@dnd-kit/modifiers");
2357
+ var import_react_virtual2 = require("@tanstack/react-virtual");
2358
+ var import_clsx12 = __toESM(require("clsx"), 1);
2359
+
2360
+ // src/components/DataGrid/PinnedColumns.tsx
2361
+ var import_react_table = require("@tanstack/react-table");
2362
+ var import_clsx11 = __toESM(require("clsx"), 1);
2363
+
2364
+ // src/components/DataGrid/utils.tsx
2365
+ var import_clsx9 = __toESM(require("clsx"), 1);
2366
+ var import_jsx_runtime9 = require("react/jsx-runtime");
2367
+ function getSortIcon(sort, nextSort = false) {
2368
+ const iconClassName = (0, import_clsx9.default)(
2369
+ "text-icon-on-action-primary-normal",
2370
+ nextSort && "hidden group-hover:block"
2371
+ );
2372
+ if (sort === "asc")
2373
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Icon, { size: 16, className: iconClassName, name: "arrow_upward" });
2374
+ if (sort === "desc")
2375
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Icon, { size: 16, className: iconClassName, name: "arrow_downward" });
2376
+ return null;
2377
+ }
2378
+
2379
+ // src/components/DataGrid/PinnedColumns.tsx
2380
+ var import_react14 = __toESM(require("react"), 1);
2381
+
2382
+ // src/components/DataGrid/TableBody/index.tsx
2383
+ var import_react_virtual = require("@tanstack/react-virtual");
2384
+ var import_clsx10 = __toESM(require("clsx"), 1);
2385
+
2386
+ // src/components/DataGrid/TableBody/LoadingCell.tsx
2387
+ var import_jsx_runtime10 = require("react/jsx-runtime");
2388
+ function LoadingCell({
2389
+ id,
2390
+ testid,
2391
+ column
2392
+ }) {
2393
+ const key = `loading-${column.id}`;
2394
+ if (column.cell === "checkbox") {
2395
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(DataGridCell, { id: id ? `${id}-${key}` : void 0, testid: testid ? `${testid}-${key}` : void 0, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Checkbox, { id: id ? `${id}-${key}-checkbox` : void 0, testid: testid ? `${testid}-${key}-checkbox` : void 0, disabled: true }) }, key);
2396
+ }
2397
+ if (column.cell === "input") {
2398
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
2399
+ DataGridCell,
2400
+ {
2401
+ id: id ? `${id}-${key}` : void 0,
2402
+ testid: testid ? `${testid}-${key}` : void 0,
2403
+ component: "input",
2404
+ children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
2405
+ Input,
2406
+ {
2407
+ id: id ? `${id}-${key}-input` : void 0,
2408
+ testid: testid ? `${testid}-${key}-input` : void 0,
2409
+ align: "left",
2410
+ disabled: true,
2411
+ wrapperClassName: "!rounded-none !border-0"
2412
+ }
2413
+ )
2414
+ },
2415
+ key
2416
+ );
2417
+ }
2418
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(DataGridCell, { id: id ? `${id}-${key}` : void 0, testid: testid ? `${testid}-${key}` : void 0, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "bg-linear-270 to-neutral-300/[24%] from-neutral-300/[12%] rounded-xs w-full max-w-25 h-6" }) }, key);
2419
+ }
2420
+
2421
+ // src/components/DataGrid/TableBody/index.tsx
2422
+ var import_jsx_runtime11 = require("react/jsx-runtime");
2423
+ function TableBody({
2424
+ id,
2425
+ testid,
2426
+ columnVirtualizer,
2427
+ table,
2428
+ tableContainerRef,
2429
+ virtualPaddingLeft,
2430
+ virtualPaddingRight,
2431
+ pagination,
2432
+ isLoadingMore,
2433
+ hasMore,
2434
+ showFilterRow,
2435
+ enableColumnSelector = false,
2436
+ locked,
2437
+ pinDirection
2438
+ }) {
2439
+ const { rows } = table.getRowModel();
2440
+ const rowVirtualizer = (0, import_react_virtual.useVirtualizer)({
2441
+ count: rows.length,
2442
+ estimateSize: () => 40,
2443
+ getScrollElement: () => tableContainerRef.current,
2444
+ overscan: 8
2445
+ });
2446
+ const virtualRows = rowVirtualizer.getVirtualItems();
2447
+ const CellElement = locked ? DataGridCell : DragAlongCell;
2448
+ let headerGroups;
2449
+ if (pinDirection === "left") {
2450
+ headerGroups = table.getLeftHeaderGroups();
2451
+ } else if (pinDirection === "right") {
2452
+ headerGroups = table.getRightHeaderGroups();
2453
+ } else {
2454
+ headerGroups = table.getCenterHeaderGroups();
2455
+ }
2456
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
2457
+ "tbody",
2458
+ {
2459
+ className: (0, import_clsx10.default)(locked ? "shadow-16" : ""),
2460
+ style: {
2461
+ display: "grid",
2462
+ height: `${showFilterRow ? rowVirtualizer.getTotalSize() + 40 : rowVirtualizer.getTotalSize()}px`,
2463
+ // tells scrollbar how big the table is
2464
+ position: "relative"
2465
+ // needed for absolute positioning of rows
2466
+ },
2467
+ children: [
2468
+ showFilterRow && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
2469
+ "tr",
2470
+ {
2471
+ style: {
2472
+ display: "flex",
2473
+ position: "sticky",
2474
+ top: "40px",
2475
+ width: "100%",
2476
+ height: "40px",
2477
+ zIndex: 10
2478
+ },
2479
+ className: "even:bg-background-grouped-primary-normal odd:bg-background-grouped-secondary-normal",
2480
+ "data-testid": testid ? `${testid}-filter-row` : void 0,
2481
+ children: headerGroups.flatMap(
2482
+ (x) => x.headers.map((header) => {
2483
+ var _a, _b, _c, _d, _e;
2484
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
2485
+ CellElement,
2486
+ {
2487
+ id: id ? `${id}-filter-cell-${header.id}` : void 0,
2488
+ testid: testid ? `${testid}-filter-cell-${header.id}` : void 0,
2489
+ noPadding: true,
2490
+ cell: header,
2491
+ width: ((_a = header.column.columnDef.meta) == null ? void 0 : _a.headerWidth) || (locked ? `${header.column.getSize()}px` : ""),
2492
+ children: header.column.getCanFilter() && ((_e = (_c = (_b = header.column.columnDef.meta) == null ? void 0 : _b.filterRowCell) == null ? void 0 : _c.call(_b, {
2493
+ header,
2494
+ table
2495
+ })) != null ? _e : /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
2496
+ Search,
2497
+ {
2498
+ id: id ? `${id}-filter-search-${header.id}` : void 0,
2499
+ testid: testid ? `${testid}-filter-search-${header.id}` : void 0,
2500
+ removeRoundness: true,
2501
+ onChange: (e) => header.column.setFilterValue(e.target.value),
2502
+ value: (_d = header.column.getFilterValue()) != null ? _d : "",
2503
+ placeholder: "",
2504
+ removeSearchIcon: true
2505
+ }
2506
+ ))
2507
+ },
2508
+ header.id
2509
+ );
2510
+ })
2511
+ )
2512
+ }
2513
+ ),
2514
+ virtualRows.map((virtualRow) => {
2515
+ const row = rows[virtualRow.index];
2516
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
2517
+ TableBodyRow,
2518
+ {
2519
+ id,
2520
+ testid,
2521
+ columnVirtualizer,
2522
+ row,
2523
+ rowVirtualizer,
2524
+ virtualPaddingLeft,
2525
+ virtualPaddingRight,
2526
+ virtualRow,
2527
+ showFilterRow,
2528
+ enableColumnSelector,
2529
+ locked,
2530
+ pinDirection
2531
+ },
2532
+ row.id
2533
+ );
2534
+ }),
2535
+ !pagination && isLoadingMore && hasMore && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
2536
+ "tr",
2537
+ {
2538
+ style: {
2539
+ display: "flex",
2540
+ position: "absolute",
2541
+ width: "100%",
2542
+ transform: `translateY(${virtualRows[virtualRows.length - 1].start + 40}px)`
2543
+ },
2544
+ className: "odd:bg-background-grouped-primary-normal even:bg-background-grouped-secondary-normal",
2545
+ children: table.getAllLeafColumns().map((column) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
2546
+ LoadingCell,
2547
+ {
2548
+ id,
2549
+ testid,
2550
+ column: column.columnDef
2551
+ },
2552
+ column.id
2553
+ ))
2554
+ }
2555
+ )
2556
+ ]
2557
+ }
2558
+ );
2559
+ }
2560
+
2561
+ // src/components/DataGrid/ColumnSelectorHeaderCell/index.tsx
2562
+ var import_react13 = require("react");
2563
+
2564
+ // src/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.tsx
2565
+ var import_react12 = require("react");
2566
+ var import_jsx_runtime12 = require("react/jsx-runtime");
2567
+ function ColumnSelectorMenuOption({
2568
+ id,
2569
+ testid,
2570
+ column,
2571
+ toggleColumnVisibility
2572
+ }) {
2573
+ const [isVisible, setIsVisible] = (0, import_react12.useState)(column.getIsVisible());
2574
+ const label = typeof column.columnDef.header === "string" ? column.columnDef.header : null;
2575
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(MenuOption, { id, testid, defaultChecked: isVisible, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2576
+ Checkbox,
2577
+ {
2578
+ id: id ? `${id}-checkbox` : void 0,
2579
+ testid: testid ? `${testid}-checkbox` : void 0,
2580
+ label: label != null ? label : "Unknown",
2581
+ checked: isVisible,
2582
+ onChange: (e) => {
2583
+ setIsVisible(e.target.checked);
2584
+ toggleColumnVisibility(column.id, e.target.checked);
2585
+ }
2586
+ }
2587
+ ) });
2588
+ }
2589
+
2590
+ // src/components/DataGrid/ColumnSelectorHeaderCell/index.tsx
2591
+ var import_jsx_runtime13 = require("react/jsx-runtime");
2592
+ function ColumnSelectorHeaderCell({
2593
+ id,
2594
+ testid,
2595
+ table,
2596
+ toggleColumnVisibility,
2597
+ resetColumnVisibility
2598
+ }) {
2599
+ const ref = (0, import_react13.useRef)(null);
2600
+ const [show, setShow] = (0, import_react13.useState)(false);
2601
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
2602
+ DataGridCell,
2603
+ {
2604
+ id,
2605
+ testid,
2606
+ width: "48px",
2607
+ type: "header",
2608
+ color: "text-secondary-normal",
2609
+ ref,
2610
+ children: [
2611
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
2612
+ Button,
2613
+ {
2614
+ id: id ? `${id}-button` : void 0,
2615
+ testid: testid ? `${testid}-button` : void 0,
2616
+ onClick: () => setShow((prev) => !prev),
2617
+ variant: "navigation",
2618
+ iconOnly: true,
2619
+ leftIcon: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Icon, { name: "tune" })
2620
+ }
2621
+ ),
2622
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
2623
+ Menu,
2624
+ {
2625
+ id: id ? `${id}-menu` : void 0,
2626
+ testid: testid ? `${testid}-menu` : void 0,
2627
+ positionTo: ref,
2628
+ position: "bottom-right",
2629
+ show,
2630
+ setShow,
2631
+ calculateMinMaxHeight: true,
2632
+ children: [
2633
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
2634
+ Button,
2635
+ {
2636
+ id: id ? `${id}-reset-button` : void 0,
2637
+ testid: testid ? `${testid}-reset-button` : void 0,
2638
+ variant: "tertiary",
2639
+ onClick: () => {
2640
+ resetColumnVisibility();
2641
+ setShow(false);
2642
+ },
2643
+ children: "Reset to default"
2644
+ }
2645
+ ),
2646
+ table.getAllColumns().filter((x) => {
2647
+ var _a;
2648
+ return (_a = x.columnDef.meta) == null ? void 0 : _a.inVisibilityMenu;
2649
+ }).map((column) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
2650
+ ColumnSelectorMenuOption,
2651
+ {
2652
+ id: id ? `${id}-option-${column.id}` : void 0,
2653
+ testid: testid ? `${testid}-option-${column.id}` : void 0,
2654
+ column,
2655
+ toggleColumnVisibility
2656
+ },
2657
+ column.id
2658
+ ))
2659
+ ]
2660
+ }
2661
+ )
2662
+ ]
2663
+ }
2664
+ );
2665
+ }
2666
+
2667
+ // src/components/DataGrid/PinnedColumns.tsx
2668
+ var import_jsx_runtime14 = require("react/jsx-runtime");
2669
+ function PinnedColumns(_a) {
2670
+ var _b = _a, {
2671
+ id,
2672
+ pinDirection = "left",
2673
+ table,
2674
+ centerHeader,
2675
+ allSelectedAcrossPages,
2676
+ someSelectedAcrossPages,
2677
+ toggleSelectAllAcrossPages,
2678
+ testid,
2679
+ enableColumnSelector,
2680
+ toggleColumnVisibility,
2681
+ resetColumnVisibility
2682
+ } = _b, props = __objRest(_b, [
2683
+ "id",
2684
+ "pinDirection",
2685
+ "table",
2686
+ "centerHeader",
2687
+ "allSelectedAcrossPages",
2688
+ "someSelectedAcrossPages",
2689
+ "toggleSelectAllAcrossPages",
2690
+ "testid",
2691
+ "enableColumnSelector",
2692
+ "toggleColumnVisibility",
2693
+ "resetColumnVisibility"
2694
+ ]);
2695
+ var _a2;
2696
+ const headerGroups = pinDirection === "left" ? table.getLeftHeaderGroups() : table.getRightHeaderGroups();
2697
+ const pinnedTestId = testid ? `${pinDirection}-pinned-${testid}` : void 0;
2698
+ const hasAnyHeaders = ((_a2 = headerGroups[0]) == null ? void 0 : _a2.headers.length) > 0;
2699
+ if (!hasAnyHeaders && !enableColumnSelector) return;
2700
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
2701
+ "table",
2702
+ {
2703
+ className: (0, import_clsx11.default)(
2704
+ "flex flex-col min-h-min sticky z-20",
2705
+ pinDirection === "left" ? "left-0" : "right-0"
2706
+ ),
2707
+ "data-testid": pinnedTestId,
2708
+ children: [
2709
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("thead", { className: "sticky top-0 z-20 grid", children: headerGroups.map((headerGroup) => {
2710
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
2711
+ "tr",
2712
+ {
2713
+ "data-testid": pinnedTestId ? `${pinnedTestId}-header-row-${headerGroup.id}` : void 0,
2714
+ className: "flex w-full",
2715
+ children: [
2716
+ headerGroup.headers.map((header) => {
2717
+ var _a3, _b2, _c;
2718
+ if (!header) {
2719
+ return;
2720
+ }
2721
+ if (typeof header.column.columnDef.header === "string") {
2722
+ const customHeaderWidth = (_a3 = header.column.columnDef.meta) == null ? void 0 : _a3.headerWidth;
2723
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
2724
+ DataCellHeader,
2725
+ {
2726
+ locked: true,
2727
+ testid: pinnedTestId ? `${pinnedTestId}-header-${header.id}` : void 0,
2728
+ header,
2729
+ center: centerHeader,
2730
+ width: customHeaderWidth,
2731
+ className: (0, import_clsx11.default)(
2732
+ header.column.getCanSort() ? "cursor-pointer" : "cursor-grab",
2733
+ "group"
2734
+ ),
2735
+ children: [
2736
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Subheader, { tall: true, children: header.column.columnDef.header }),
2737
+ getSortIcon(header.column.getIsSorted()),
2738
+ !header.column.getIsSorted() && header.column.getCanSort() && getSortIcon(header.column.getNextSortingOrder(), true),
2739
+ header.column.getSortIndex() !== -1 && table.getState().sorting.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Subheader, { tall: true, children: header.column.getSortIndex() + 1 }),
2740
+ !((_b2 = header.column.columnDef.meta) == null ? void 0 : _b2.locked) && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
2741
+ "div",
2742
+ {
2743
+ onDoubleClick: (e) => {
2744
+ e.stopPropagation();
2745
+ header.column.resetSize();
2746
+ },
2747
+ onMouseDown: (e) => {
2748
+ e.stopPropagation();
2749
+ header.getResizeHandler()(e);
2750
+ },
2751
+ onTouchStart: (e) => {
2752
+ e.stopPropagation();
2753
+ header.getResizeHandler()(e);
2754
+ },
2755
+ className: "absolute right-0 inset-y-0 w-px bg-black cursor-col-resize"
2756
+ }
2757
+ )
2758
+ ]
2759
+ },
2760
+ header.id
2761
+ );
2762
+ }
2763
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react14.default.Fragment, { children: ((_c = header.column.columnDef.meta) == null ? void 0 : _c.checkbox) ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DataGridCell, { type: "header", component: "checkbox", locked: true, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
2764
+ Checkbox,
2765
+ {
2766
+ checked: allSelectedAcrossPages,
2767
+ indeterminate: someSelectedAcrossPages,
2768
+ onChange: toggleSelectAllAcrossPages
2769
+ }
2770
+ ) }) : (0, import_react_table.flexRender)(
2771
+ header.column.columnDef.header,
2772
+ header.getContext()
2773
+ ) }, header.id);
2774
+ }),
2775
+ enableColumnSelector && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
2776
+ ColumnSelectorHeaderCell,
2777
+ {
2778
+ id: id ? `${id}-column-selector` : void 0,
2779
+ testid: testid ? `${testid}-column-selector` : void 0,
2780
+ table,
2781
+ toggleColumnVisibility: toggleColumnVisibility != null ? toggleColumnVisibility : () => {
2782
+ },
2783
+ resetColumnVisibility: resetColumnVisibility != null ? resetColumnVisibility : () => {
2784
+ }
2785
+ }
2786
+ )
2787
+ ]
2788
+ },
2789
+ headerGroup.id
2790
+ );
2791
+ }) }),
2792
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
2793
+ TableBody,
2794
+ __spreadProps(__spreadValues({
2795
+ testid: pinnedTestId
2796
+ }, props), {
2797
+ table,
2798
+ locked: !enableColumnSelector,
2799
+ pinDirection
2800
+ })
2801
+ )
2802
+ ]
2803
+ }
2804
+ );
2805
+ }
2806
+
2807
+ // static/no-results-image.png
2808
+ var no_results_image_default = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAMPWlDQ1BJQ0MgUHJvZmlsZQAASImVVwdYU8kWnltSIbQAAlJCb4JIDSAlhBZAehFshCRAKDEGgoodWVRwLahYwIauiih2QOyInUWx9wURFWVdLNiVNymg677yvck3M3/+OfOfM+fOLQOA+kmuWJyDagCQK8qXxIYEMMYmpzBITwEFkOEPBd5cXp6YFR0dAWAZ7P9e3t0EiKy/5iDT+uf4fy2afEE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kTcEIACBwAR2LT+tgmqCsyhafdQE5ePFi7yHAAQgAAEIQAACEIAABCAAAQhAAAIQgAAEIAABCEAAAhCAAAQgAAEIQAACEIAABCAAAQhAAAIQgAAEIAABCEAAAhCAAAQgAAEIQAACEIAABCAAAQhAAAIQgAAEIAABCEAAAhCAAAQgAAEIQAACEIAABCAAAQhAAAIQgAAEIAABCEAAAhCAAAQgAAEIQAACEIAABCAAAQhAAAIQgAAEIAABCEAAAhCAAAQgAAEIQAACEIAABCAAAQhAAAIQgAAEIAABCEAAAhCAAAQgAAEIQAACEIAABCAAAQhAAAIQgAAEIAABCEAAAhCAAAQgAAEIQAACEIAABCAAAQhAAAIQgAAEIAABCEAAAhCAAAQgAAEIQAACEIAABCAAAQhAAAIQgAAEIAABCEAAAhCAAAQgAAEIQAACEIAABCAAAQhAAAIQgAAEIAABCEAAAhCAAAQgAAEIQAACEIAABCAAAQhAAAIQgAAEIAABCEAAAhCAAAQgAAEIQAACEIAABCAAAQg4J/D/AQUY8n0knD4qAAAAAElFTkSuQmCC";
2809
+
2810
+ // src/components/DataGrid/index.tsx
2811
+ var import_jsx_runtime15 = require("react/jsx-runtime");
2812
+ var PAGE_SIZE_OPTIONS = [5, 10, 15, 20, 25, 30, 35];
2813
+ var NO_RESULTS_HEIGHT = "h-[185px]";
2814
+ function DataGrid({
2815
+ id,
2816
+ rowIdAccessor,
2817
+ testid,
2818
+ data,
2819
+ columns,
2820
+ status,
2821
+ isLoadingMore = false,
2822
+ onLoadMore,
2823
+ pagination,
2824
+ showFilterRow = false,
2825
+ hasMore = false,
2826
+ sorting: externalSorting,
2827
+ onSortingChange,
2828
+ columnFilters: externalColumnFilters,
2829
+ onColumnFiltersChange,
2830
+ rowSelection: externalRowSelection,
2831
+ onRowSelectionChange,
2832
+ filteredSortedData,
2833
+ totalRowCount,
2834
+ hideStatusBar,
2835
+ centerHeader,
2836
+ enableColumnSelector,
2837
+ predeterminedLeftPins = [],
2838
+ predeterminedRightPins = [],
2839
+ useMenuDefaultMinWidth,
2840
+ ref
2841
+ }) {
2842
+ var _a, _b, _c, _d, _e, _f, _g;
2843
+ (0, import_react15.useImperativeHandle)(ref, () => ({
2844
+ getSavedLayout: () => {
2845
+ return getSavedLayout();
2846
+ }
2847
+ }));
2848
+ const [localSorting, setLocalSorting] = (0, import_react15.useState)([]);
2849
+ const [localColumnFilters, setLocalColumnFilters] = (0, import_react15.useState)([]);
2850
+ const [localRowSelection, setLocalRowSelection] = (0, import_react15.useState)({});
2851
+ const {
2852
+ columns: tableColumns,
2853
+ setColumns: setTableColumns,
2854
+ getSavedLayout
2855
+ } = useTableLayout(columns, id != null ? id : testid);
2856
+ const [columnOrder, setColumnOrder] = (0, import_react15.useState)(
2857
+ tableColumns.map((c) => c.id)
2858
+ );
2859
+ const [columnVisibility, setColumnVisibility] = (0, import_react15.useState)(
2860
+ Object.fromEntries(
2861
+ tableColumns.filter((column) => !!column.id).map((column) => {
2862
+ var _a2, _b2;
2863
+ return [column.id, (_b2 = (_a2 = column.meta) == null ? void 0 : _a2.visible) != null ? _b2 : true];
2864
+ })
2865
+ )
2866
+ );
2867
+ const updateColumnVisibility = (0, import_react15.useCallback)(
2868
+ (updateOrder) => {
2869
+ setColumnVisibility(
2870
+ Object.fromEntries(
2871
+ tableColumns.filter((column) => !!column.id).map((column) => {
2872
+ var _a2, _b2;
2873
+ return [column.id, (_b2 = (_a2 = column.meta) == null ? void 0 : _a2.visible) != null ? _b2 : true];
2874
+ })
2875
+ )
2876
+ );
2877
+ if (updateOrder) setColumnOrder(tableColumns.map((c) => c.id));
2878
+ },
2879
+ [tableColumns]
2880
+ );
2881
+ const resetDefaultColumnVisibility = (0, import_react15.useCallback)(() => {
2882
+ setTableColumns((prev) => {
2883
+ columns.forEach((column) => {
2884
+ var _a2, _b2;
2885
+ const columnId = column.id;
2886
+ const isVisible = (_b2 = (_a2 = column.meta) == null ? void 0 : _a2.visible) != null ? _b2 : true;
2887
+ const persistedIndex = prev.findIndex((col) => col.id === columnId);
2888
+ if (persistedIndex !== -1) {
2889
+ prev[persistedIndex].meta = __spreadProps(__spreadValues({}, prev[persistedIndex].meta), {
2890
+ visible: isVisible
2891
+ });
2892
+ }
2893
+ });
2894
+ return [...prev];
2895
+ }, true);
2896
+ }, [columns, setTableColumns]);
2897
+ (0, import_react15.useEffect)(() => {
2898
+ updateColumnVisibility(true);
2899
+ }, [updateColumnVisibility]);
2900
+ const sortingState = pagination ? externalSorting != null ? externalSorting : localSorting : localSorting;
2901
+ const setSortingState = pagination ? (updaterOrValue) => {
2902
+ const value = typeof updaterOrValue === "function" ? updaterOrValue(
2903
+ externalSorting != null ? externalSorting : []
2904
+ ) : updaterOrValue;
2905
+ (onSortingChange != null ? onSortingChange : setLocalSorting)(value);
2906
+ } : setLocalSorting;
2907
+ const columnFilterState = pagination ? externalColumnFilters != null ? externalColumnFilters : localColumnFilters : localColumnFilters;
2908
+ const setColumnFilterState = pagination ? (updaterOrValue) => {
2909
+ const value = typeof updaterOrValue === "function" ? updaterOrValue(externalColumnFilters != null ? externalColumnFilters : []) : updaterOrValue;
2910
+ (onColumnFiltersChange != null ? onColumnFiltersChange : setLocalColumnFilters)(value);
2911
+ } : setLocalColumnFilters;
2912
+ const rowSelection = externalRowSelection != null ? externalRowSelection : localRowSelection;
2913
+ const setRowSelection = (0, import_react15.useCallback)(
2914
+ (updaterOrValue) => {
2915
+ if (pagination) {
2916
+ const value = typeof updaterOrValue === "function" ? updaterOrValue(externalRowSelection != null ? externalRowSelection : {}) : updaterOrValue;
2917
+ (onRowSelectionChange != null ? onRowSelectionChange : setLocalRowSelection)(value);
2918
+ } else if (externalRowSelection && onRowSelectionChange) {
2919
+ const value = typeof updaterOrValue === "function" ? updaterOrValue(externalRowSelection != null ? externalRowSelection : {}) : updaterOrValue;
2920
+ onRowSelectionChange(value);
2921
+ } else {
2922
+ setLocalRowSelection(updaterOrValue);
2923
+ }
2924
+ },
2925
+ [externalRowSelection, onRowSelectionChange, pagination]
2926
+ );
2927
+ const dndId = (0, import_react15.useId)();
2928
+ const containerRef = import_react15.default.useRef(null);
2929
+ const toggleColumnVisibility = (0, import_react15.useCallback)(
2930
+ (columnId, isVisible) => {
2931
+ setTableColumns((prev) => {
2932
+ const persistedIndex = prev.findIndex((col) => col.id === columnId);
2933
+ if (persistedIndex !== -1) {
2934
+ prev[persistedIndex].meta = __spreadProps(__spreadValues({}, prev[persistedIndex].meta), {
2935
+ visible: isVisible
2936
+ });
2937
+ }
2938
+ return [...prev];
2939
+ }, true);
2940
+ },
2941
+ [setTableColumns]
2942
+ );
2943
+ const table = (0, import_react_table2.useReactTable)({
2944
+ columns: tableColumns,
2945
+ data,
2946
+ getCoreRowModel: (0, import_react_table2.getCoreRowModel)(),
2947
+ getSortedRowModel: (0, import_react_table2.getSortedRowModel)(),
2948
+ getFilteredRowModel: (0, import_react_table2.getFilteredRowModel)(),
2949
+ columnResizeMode: "onChange",
2950
+ getRowId: rowIdAccessor ? (row) => String(row[rowIdAccessor]) : (row, index) => {
2951
+ var _a2;
2952
+ return String((_a2 = row.id) != null ? _a2 : index + 1);
2953
+ },
2954
+ state: {
2955
+ columnOrder,
2956
+ sorting: sortingState,
2957
+ columnFilters: columnFilterState,
2958
+ rowSelection,
2959
+ columnVisibility
2960
+ },
2961
+ initialState: {
2962
+ columnPinning: {
2963
+ left: predeterminedLeftPins,
2964
+ right: predeterminedRightPins
2965
+ }
2966
+ },
2967
+ enableColumnPinning: (predeterminedLeftPins == null ? void 0 : predeterminedLeftPins.length) > 0 || predeterminedRightPins.length > 0,
2968
+ onColumnOrderChange: setColumnOrder,
2969
+ onSortingChange: adaptTableStateSetter(setSortingState),
2970
+ onColumnFiltersChange: adaptTableStateSetter(setColumnFilterState),
2971
+ onRowSelectionChange: adaptTableStateSetter(setRowSelection),
2972
+ filterFns: {
2973
+ startsWith: (row, columnId, filterValue) => {
2974
+ const cellValue = row == null ? void 0 : row.getValue(columnId);
2975
+ if (!cellValue || !filterValue) {
2976
+ return true;
2977
+ }
2978
+ return String(cellValue).toLowerCase().startsWith(String(filterValue).toLowerCase());
2979
+ },
2980
+ endsWith: (row, columnId, filterValue) => {
2981
+ const cellValue = row == null ? void 0 : row.getValue(columnId);
2982
+ if (!cellValue || !filterValue) {
2983
+ return true;
2984
+ }
2985
+ return String(cellValue).toLowerCase().endsWith(String(filterValue).toLowerCase());
2986
+ }
2987
+ }
2988
+ });
2989
+ const allRowIds = pagination ? (_a = filteredSortedData == null ? void 0 : filteredSortedData.map((row) => String(row.id))) != null ? _a : [] : Array.from(
2990
+ { length: totalRowCount != null ? totalRowCount : data.length },
2991
+ (_, i) => String(i + 1)
2992
+ );
2993
+ const allSelectedAcrossPages = allRowIds.every(
2994
+ (rowId) => rowSelection[rowId]
2995
+ );
2996
+ const someSelectedAcrossPages = !allSelectedAcrossPages && allRowIds.some((rowId) => rowSelection[rowId]);
2997
+ const toggleSelectAllAcrossPages = () => {
2998
+ setRowSelection((prev) => {
2999
+ const isSelecting = !allSelectedAcrossPages;
3000
+ if (isSelecting) {
3001
+ const newSelection = {};
3002
+ for (const rowId of allRowIds) {
3003
+ newSelection[rowId] = true;
3004
+ }
3005
+ return __spreadValues(__spreadValues({}, prev), newSelection);
3006
+ } else {
3007
+ const updatedSelection = __spreadValues({}, prev);
3008
+ for (const rowId of allRowIds) {
3009
+ delete updatedSelection[rowId];
3010
+ }
3011
+ return updatedSelection;
3012
+ }
3013
+ });
3014
+ };
3015
+ useInfiniteScroll({
3016
+ containerRef,
3017
+ onLoadMore: onLoadMore != null ? onLoadMore : () => {
3018
+ },
3019
+ isLoading: isLoadingMore,
3020
+ enabled: !pagination
3021
+ });
3022
+ const handleDragEnd = (event) => {
3023
+ const { active, over } = event;
3024
+ if (active && over && active.id !== over.id) {
3025
+ setColumnOrder((prev) => {
3026
+ const oldIndex = prev.indexOf(active.id);
3027
+ const newIndex = prev.indexOf(over.id);
3028
+ const newOrder = (0, import_sortable2.arrayMove)(prev, oldIndex, newIndex);
3029
+ setTableColumns((prev2) => {
3030
+ const res = newOrder.map((id2) => prev2.find((col) => col.id === id2)).filter(Boolean);
3031
+ return res;
3032
+ });
3033
+ return newOrder;
3034
+ });
3035
+ }
3036
+ };
3037
+ const sensors = (0, import_core.useSensors)(
3038
+ (0, import_core.useSensor)(import_core.MouseSensor),
3039
+ (0, import_core.useSensor)(import_core.TouchSensor),
3040
+ (0, import_core.useSensor)(import_core.KeyboardSensor)
3041
+ );
3042
+ const visibleColumns = table.getVisibleLeafColumns();
3043
+ const columnVirtualizer = (0, import_react_virtual2.useVirtualizer)({
3044
+ count: visibleColumns.length,
3045
+ estimateSize: (index) => visibleColumns[index].getSize(),
3046
+ //estimate width of each column for accurate scrollbar dragging
3047
+ getScrollElement: () => containerRef.current,
3048
+ horizontal: true,
3049
+ overscan: 8
3050
+ //how many columns to render on each side off screen each way
3051
+ });
3052
+ const virtualColumns = columnVirtualizer.getVirtualItems();
3053
+ let virtualPaddingLeft;
3054
+ let virtualPaddingRight;
3055
+ if (columnVirtualizer && (virtualColumns == null ? void 0 : virtualColumns.length)) {
3056
+ virtualPaddingLeft = (_c = (_b = virtualColumns[0]) == null ? void 0 : _b.start) != null ? _c : 0;
3057
+ virtualPaddingRight = columnVirtualizer.getTotalSize() - ((_e = (_d = virtualColumns[virtualColumns.length - 1]) == null ? void 0 : _d.end) != null ? _e : 0);
3058
+ }
3059
+ const empty = table.getRowModel().rows.length === 0;
3060
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
3061
+ import_core.DndContext,
3062
+ {
3063
+ id: dndId,
3064
+ collisionDetection: import_core.closestCenter,
3065
+ modifiers: [import_modifiers.restrictToHorizontalAxis],
3066
+ onDragEnd: handleDragEnd,
3067
+ sensors,
3068
+ children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
3069
+ import_sortable2.SortableContext,
3070
+ {
3071
+ items: columnOrder,
3072
+ strategy: import_sortable2.horizontalListSortingStrategy,
3073
+ children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
3074
+ "div",
3075
+ {
3076
+ id,
3077
+ "data-testid": testid,
3078
+ className: "flex flex-col grow-0 h-fit w-full rounded border border-border-primary-normal overflow-hidden text-text-primary-normal",
3079
+ children: [
3080
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
3081
+ "div",
3082
+ {
3083
+ className: (0, import_clsx12.default)(
3084
+ "flex overflow-auto scrollbar-thin relative contain-paint will-change-transform",
3085
+ empty ? "overflow-y-hidden" : "min-h-[120px]"
3086
+ ),
3087
+ ref: containerRef,
3088
+ children: [
3089
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
3090
+ PinnedColumns,
3091
+ {
3092
+ testid,
3093
+ pinDirection: "left",
3094
+ table,
3095
+ tableContainerRef: containerRef,
3096
+ pagination,
3097
+ isLoadingMore,
3098
+ hasMore,
3099
+ showFilterRow
3100
+ }
3101
+ ),
3102
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("table", { className: "flex-1 flex flex-col min-h-min", children: [
3103
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("thead", { className: "sticky top-0 z-10 grid", children: table.getCenterHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
3104
+ "tr",
3105
+ {
3106
+ "data-testid": testid ? `${testid}-header-row-${headerGroup.id}` : void 0,
3107
+ className: "flex w-full",
3108
+ children: [
3109
+ virtualPaddingLeft ? (
3110
+ // fake empty column to the left for virtualization scroll padding
3111
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
3112
+ "th",
3113
+ {
3114
+ style: { display: "flex", width: virtualPaddingLeft }
3115
+ }
3116
+ )
3117
+ ) : null,
3118
+ virtualColumns.map((virtualColumn) => {
3119
+ var _a2, _b2, _c2, _d2, _e2;
3120
+ const header = headerGroup.headers[virtualColumn.index];
3121
+ if (!header) {
3122
+ return;
3123
+ }
3124
+ if (typeof header.column.columnDef.header === "string") {
3125
+ const cellValue = (_a2 = table.getRowModel().rows[0]) == null ? void 0 : _a2.getValue(header.column.id);
3126
+ const cellAlignment = (_c2 = (_b2 = header.column.columnDef.meta) == null ? void 0 : _b2.align) != null ? _c2 : typeof cellValue === "number" ? "right" : "left";
3127
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
3128
+ DraggableCellHeader,
3129
+ {
3130
+ minWidth: `${header.column.getSize()}px`,
3131
+ id: id ? `${id}-header-${header.id}` : void 0,
3132
+ testid: testid ? `${testid}-header-${header.id}` : void 0,
3133
+ header,
3134
+ locked: (_d2 = header.column.columnDef.meta) == null ? void 0 : _d2.locked,
3135
+ center: centerHeader,
3136
+ className: (0, import_clsx12.default)(
3137
+ header.column.getCanSort() ? "cursor-pointer" : "cursor-grab",
3138
+ "group",
3139
+ {
3140
+ "justify-start": cellAlignment === "left",
3141
+ "justify-end": cellAlignment === "right"
3142
+ }
3143
+ ),
3144
+ useMenuDefaultMinWidth,
3145
+ children: [
3146
+ cellAlignment === "left" && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Subheader, { tall: true, children: header.column.columnDef.header }),
3147
+ getSortIcon(header.column.getIsSorted()),
3148
+ !header.column.getIsSorted() && header.column.getCanSort() && getSortIcon(
3149
+ header.column.getNextSortingOrder(),
3150
+ true
3151
+ ),
3152
+ header.column.getSortIndex() !== -1 && table.getState().sorting.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Subheader, { tall: true, children: header.column.getSortIndex() + 1 }),
3153
+ cellAlignment === "right" && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Subheader, { tall: true, children: header.column.columnDef.header }),
3154
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
3155
+ "div",
3156
+ {
3157
+ onDoubleClick: (e) => {
3158
+ e.stopPropagation();
3159
+ header.column.resetSize();
3160
+ },
3161
+ onMouseDown: (e) => {
3162
+ e.stopPropagation();
3163
+ header.getResizeHandler()(e);
3164
+ },
3165
+ onTouchStart: (e) => {
3166
+ e.stopPropagation();
3167
+ header.getResizeHandler()(e);
3168
+ },
3169
+ className: "absolute right-0 inset-y-0 w-px bg-black cursor-col-resize"
3170
+ }
3171
+ )
3172
+ ]
3173
+ },
3174
+ header.id
3175
+ );
3176
+ }
3177
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react15.default.Fragment, { children: ((_e2 = header.column.columnDef.meta) == null ? void 0 : _e2.checkbox) ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
3178
+ DataGridCell,
3179
+ {
3180
+ id: id ? `${id}-header-${header.id}` : void 0,
3181
+ testid: testid ? `${testid}-header-${header.id}` : void 0,
3182
+ type: "header",
3183
+ component: "checkbox",
3184
+ locked: true,
3185
+ children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
3186
+ Checkbox,
3187
+ {
3188
+ id: id ? `${id}-select-all-checkbox` : void 0,
3189
+ testid: testid ? `${testid}-select-all-checkbox` : void 0,
3190
+ checked: allSelectedAcrossPages,
3191
+ indeterminate: someSelectedAcrossPages,
3192
+ onChange: toggleSelectAllAcrossPages
3193
+ }
3194
+ )
3195
+ }
3196
+ ) : (0, import_react_table2.flexRender)(
3197
+ header.column.columnDef.header,
3198
+ header.getContext()
3199
+ ) }, header.id);
3200
+ }),
3201
+ virtualPaddingRight ? (
3202
+ //fake empty column to the right for virtualization scroll padding
3203
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
3204
+ "th",
3205
+ {
3206
+ style: { display: "flex", width: virtualPaddingRight }
3207
+ }
3208
+ )
3209
+ ) : null
3210
+ ]
3211
+ },
3212
+ headerGroup.id
3213
+ )) }),
3214
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
3215
+ TableBody,
3216
+ {
3217
+ id,
3218
+ testid,
3219
+ columnVirtualizer,
3220
+ table,
3221
+ tableContainerRef: containerRef,
3222
+ virtualPaddingLeft,
3223
+ virtualPaddingRight,
3224
+ pagination,
3225
+ isLoadingMore,
3226
+ hasMore,
3227
+ showFilterRow,
3228
+ enableColumnSelector
3229
+ }
3230
+ )
3231
+ ] }),
3232
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
3233
+ PinnedColumns,
3234
+ {
3235
+ id,
3236
+ enableColumnSelector,
3237
+ toggleColumnVisibility,
3238
+ resetColumnVisibility: resetDefaultColumnVisibility,
3239
+ testid,
3240
+ pinDirection: "right",
3241
+ table,
3242
+ tableContainerRef: containerRef,
3243
+ pagination,
3244
+ isLoadingMore,
3245
+ hasMore,
3246
+ showFilterRow
3247
+ }
3248
+ )
3249
+ ]
3250
+ }
3251
+ ),
3252
+ empty && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
3253
+ "div",
3254
+ {
3255
+ className: (0, import_clsx12.default)(
3256
+ NO_RESULTS_HEIGHT,
3257
+ "flex flex-col items-center justify-center",
3258
+ componentGap,
3259
+ componentPadding
3260
+ ),
3261
+ "data-testid": testid ? `${testid}-no-results` : void 0,
3262
+ children: [
3263
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
3264
+ "img",
3265
+ {
3266
+ src: (_g = (_f = no_results_image_default) == null ? void 0 : _f.src) != null ? _g : no_results_image_default,
3267
+ alt: "No Results",
3268
+ className: "h-30 opacity-20",
3269
+ width: 120,
3270
+ height: 120
3271
+ }
3272
+ ),
3273
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Subheader, { color: "text-secondary-normal", children: "No Results" }),
3274
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Paragraph, { color: "text-secondary-normal", children: "To view results, enter or update your search criteria." })
3275
+ ]
3276
+ }
3277
+ ),
3278
+ !hideStatusBar && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "p-2 pt-[7px] border-t border-border-primary-normal h-full min-h-[34px]", children: [
3279
+ pagination && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex justify-between items-center", children: [
3280
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex items-center gap-1 w-min", children: [
3281
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
3282
+ Select,
3283
+ {
3284
+ id: id ? `${id}-pagesize-select` : void 0,
3285
+ testid: testid ? `${testid}-pagesize-select` : void 0,
3286
+ wrapperClassName: "!w-20",
3287
+ value: pagination.pageSize.toString(),
3288
+ onChange: (e) => {
3289
+ var _a2;
3290
+ return (_a2 = pagination.onPageSizeChange) == null ? void 0 : _a2.call(pagination, Number(e.target.value));
3291
+ },
3292
+ renderMenu: (props) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
3293
+ Menu,
3294
+ __spreadProps(__spreadValues({}, props), {
3295
+ id: id ? `${id}-pagesize-menu` : void 0,
3296
+ testid: testid ? `${testid}-pagesize-menu` : void 0,
3297
+ children: PAGE_SIZE_OPTIONS.map((option) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
3298
+ MenuOption,
3299
+ {
3300
+ id: id ? `${id}-pagesize-option-${option}` : void 0,
3301
+ selected: pagination.pageSize === option,
3302
+ onClick: () => {
3303
+ var _a2;
3304
+ return (_a2 = pagination.onPageSizeChange) == null ? void 0 : _a2.call(pagination, option);
3305
+ },
3306
+ children: option
3307
+ },
3308
+ option
3309
+ ))
3310
+ })
3311
+ )
3312
+ }
3313
+ ),
3314
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Label, { children: "Per Page" })
3315
+ ] }),
3316
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex items-center gap-2", children: [
3317
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
3318
+ Button,
3319
+ {
3320
+ id: id ? `${id}-prev-page-button` : void 0,
3321
+ testid: testid ? `${testid}-prev-page-button` : void 0,
3322
+ iconOnly: true,
3323
+ leftIcon: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Icon, { name: "chevron_left" }),
3324
+ onClick: () => pagination.onPageChange(pagination.pageIndex - 1),
3325
+ variant: "tertiary",
3326
+ disabled: pagination.pageIndex === 0
3327
+ }
3328
+ ),
3329
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(Paragraph, { children: [
3330
+ pagination.pageIndex * pagination.pageSize + 1,
3331
+ " -",
3332
+ " ",
3333
+ Math.min(
3334
+ (pagination.pageIndex + 1) * pagination.pageSize,
3335
+ pagination.total
3336
+ ),
3337
+ " ",
3338
+ "of ",
3339
+ pagination.total
3340
+ ] }),
3341
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
3342
+ Button,
3343
+ {
3344
+ id: id ? `${id}-next-page-button` : void 0,
3345
+ testid: testid ? `${testid}-next-page-button` : void 0,
3346
+ iconOnly: true,
3347
+ leftIcon: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Icon, { name: "chevron_right" }),
3348
+ onClick: () => pagination.onPageChange(pagination.pageIndex + 1),
3349
+ variant: "tertiary",
3350
+ disabled: (pagination.pageIndex + 1) * pagination.pageSize >= pagination.total
3351
+ }
3352
+ )
3353
+ ] })
3354
+ ] }),
3355
+ status && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
3356
+ Paragraph,
3357
+ {
3358
+ testid: testid ? `${testid}-status-text` : void 0,
3359
+ children: status
3360
+ }
3361
+ )
3362
+ ] })
3363
+ ]
3364
+ }
3365
+ )
3366
+ }
3367
+ )
3368
+ }
3369
+ );
3370
+ }
3371
+ DataGrid.displayName = "DataGrid";
3372
+ function adaptTableStateSetter(setter) {
3373
+ return (valueOrFn) => {
3374
+ setter(
3375
+ (prev) => typeof valueOrFn === "function" ? valueOrFn(prev) : valueOrFn
3376
+ );
3377
+ };
3378
+ }
3379
+
3380
+ // src/components/Select.tsx
3381
+ var import_react16 = require("react");
3382
+ var import_clsx13 = __toESM(require("clsx"), 1);
3383
+ var import_jsx_runtime16 = require("react/jsx-runtime");
3384
+ var Select = (_a) => {
3385
+ var _b = _a, {
3386
+ id,
3387
+ testid,
3388
+ label,
3389
+ error,
3390
+ children,
3391
+ readOnly,
3392
+ renderMenu,
3393
+ onClick,
3394
+ className,
3395
+ wrapperClassName,
3396
+ removeRoundness,
3397
+ displayValue,
3398
+ value
3399
+ } = _b, props = __objRest(_b, [
3400
+ "id",
3401
+ "testid",
3402
+ "label",
3403
+ "error",
3404
+ "children",
3405
+ "readOnly",
3406
+ "renderMenu",
3407
+ "onClick",
3408
+ "className",
3409
+ "wrapperClassName",
3410
+ "removeRoundness",
3411
+ "displayValue",
3412
+ "value"
3413
+ ]);
3414
+ var _a2;
3415
+ const inputRef = (0, import_react16.useRef)(null);
3416
+ const inputContainerRef = (0, import_react16.useRef)(null);
3417
+ const preventFocusOnInitialRender = (0, import_react16.useRef)(true);
3418
+ const [show, setShow] = (0, import_react16.useState)(false);
3419
+ (0, import_react16.useEffect)(() => {
3420
+ var _a3;
3421
+ if (preventFocusOnInitialRender.current) {
3422
+ preventFocusOnInitialRender.current = false;
3423
+ return;
3424
+ }
3425
+ (_a3 = inputRef.current) == null ? void 0 : _a3.focus();
3426
+ }, [value]);
3427
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
3428
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3429
+ InputBase,
3430
+ __spreadProps(__spreadValues({
3431
+ id,
3432
+ testid,
3433
+ inputContainerRef,
3434
+ ref: inputRef,
3435
+ label,
3436
+ after: !readOnly && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3437
+ "span",
3438
+ {
3439
+ className: (0, import_clsx13.default)(
3440
+ props.disabled ? "text-icon-action-primary-disabled" : "text-icon-action-primary-normal",
3441
+ "contents"
3442
+ ),
3443
+ children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Icon, { name: "keyboard_arrow_down" })
3444
+ }
3445
+ ),
3446
+ maxLength: 0,
3447
+ className: (0, import_clsx13.default)("!caret-transparent !cursor-default", className),
3448
+ wrapperClassName,
3449
+ onKeyDown: (e) => {
3450
+ const openKeys = ["Enter", "Space", " "];
3451
+ if (openKeys.includes(e.key)) {
3452
+ e.preventDefault();
3453
+ e.target.click();
3454
+ }
3455
+ },
3456
+ onClick: (e) => {
3457
+ if (props.disabled || readOnly) {
3458
+ return;
3459
+ }
3460
+ setShow(!show);
3461
+ onClick == null ? void 0 : onClick(e);
3462
+ },
3463
+ error,
3464
+ readOnly,
3465
+ removeRoundness,
3466
+ focus: show,
3467
+ onChange: (e) => {
3468
+ var _a3;
3469
+ return (_a3 = props.onChange) == null ? void 0 : _a3.call(props, e);
3470
+ }
3471
+ }, props), {
3472
+ value: (_a2 = displayValue != null ? displayValue : value) != null ? _a2 : props.onChange ? "" : void 0
3473
+ })
3474
+ ),
3475
+ renderMenu ? renderMenu({
3476
+ id: id ? `${id}-menu` : void 0,
3477
+ positionTo: inputContainerRef,
3478
+ show,
3479
+ setShow,
3480
+ topOffset: props.caption ? -16 : null
3481
+ }) : children
3482
+ ] });
3483
+ };
3484
+ Select.displayName = "Select";
3485
+
3486
+ // src/components/Subheader.tsx
3487
+ var import_clsx14 = __toESM(require("clsx"), 1);
3488
+ var import_jsx_runtime17 = require("react/jsx-runtime");
3489
+ var Subheader = (_a) => {
3490
+ var _b = _a, {
3491
+ className,
3492
+ children,
3493
+ as = "span",
3494
+ align,
3495
+ color,
3496
+ tall,
3497
+ id,
3498
+ testid
3499
+ } = _b, props = __objRest(_b, [
3500
+ "className",
3501
+ "children",
3502
+ "as",
3503
+ "align",
3504
+ "color",
3505
+ "tall",
3506
+ "id",
3507
+ "testid"
3508
+ ]);
3509
+ const Element = as;
3510
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
3511
+ Element,
3512
+ __spreadProps(__spreadValues({
3513
+ id,
3514
+ "data-testid": testid,
3515
+ className: (0, import_clsx14.default)(
3516
+ typography.subheader,
3517
+ className,
3518
+ align === "left" && "text-left",
3519
+ align === "center" && "text-center",
3520
+ align === "right" && "text-right",
3521
+ tall && "!leading-6"
3522
+ ),
3523
+ style: __spreadProps(__spreadValues({}, props.style), {
3524
+ color: color ? `var(--color-${color})` : void 0
3525
+ })
3526
+ }, props), {
3527
+ children
3528
+ })
3529
+ );
3530
+ };
3531
+ Subheader.displayName = "Subheader";
3532
+
3533
+ // src/components/Checkbox.tsx
3534
+ var import_clsx15 = __toESM(require("clsx"), 1);
3535
+ var import_jsx_runtime18 = require("react/jsx-runtime");
3536
+ var Checkbox = (_a) => {
3537
+ var _b = _a, {
3538
+ label,
3539
+ error,
3540
+ disabled,
3541
+ readOnly,
3542
+ checked,
3543
+ onChange,
3544
+ indeterminate,
3545
+ paragraphClassName,
3546
+ id,
3547
+ testid
3548
+ } = _b, props = __objRest(_b, [
3549
+ "label",
3550
+ "error",
3551
+ "disabled",
3552
+ "readOnly",
3553
+ "checked",
3554
+ "onChange",
3555
+ "indeterminate",
3556
+ "paragraphClassName",
3557
+ "id",
3558
+ "testid"
3559
+ ]);
3560
+ const selected = indeterminate || checked;
3561
+ const normalClassName = (0, import_clsx15.default)(
3562
+ !selected && !error && !disabled && !readOnly && "border-border-primary-normal bg-background-action-secondary-normal peer-hover:border-border-action-hover peer-hover:bg-background-action-secondary-hover peer-active:border-border-action-active peer-active:bg-background-action-secondary-active"
3563
+ );
3564
+ const normalSelectedClassName = (0, import_clsx15.default)(
3565
+ selected && !error && !disabled && !readOnly && "bg-background-action-primary-normal border-background-action-primary-normal peer-hover:bg-background-action-primary-hover peer-hover:border-background-action-primary-hover peer-active:bg-background-action-primary-active peer-active:border-background-action-primary-active"
3566
+ );
3567
+ const errorClassName = (0, import_clsx15.default)(
3568
+ error && !selected && "bg-background-action-critical-secondary-normal border-border-action-critical-normal peer-hover:border-border-action-critical-hover peer-hover:bg-background-action-critical-secondary-hover peer-active:border-border-action-critical-active peer-active:bg-background-action-secondary-active"
3569
+ );
3570
+ const errorSelectedClassName = (0, import_clsx15.default)(
3571
+ error && selected && "bg-background-action-critical-primary-normal border-background-action-critical-primary-normal peer-hover:bg-background-action-critical-primary-hover peer-hover:border-background-action-critical-primary-hover peer-active:bg-background-action-critical-primary-active peer-active:border-background-action-critical-primary-active"
3572
+ );
3573
+ const disabledClassName = (0, import_clsx15.default)(
3574
+ disabled && !readOnly && "border-border-primary-normal bg-background-action-secondary-disabled peer-checked:bg-icon-on-action-primary-disabled peer-checked:border-icon-on-action-primary-disabled"
3575
+ );
3576
+ const readOnlyClassName = (0, import_clsx15.default)(
3577
+ readOnly && "border-transparent bg-transparent peer-checked:bg-transparent peer-checked:border-transparent"
3578
+ );
3579
+ const checkColor = (0, import_clsx15.default)(
3580
+ selected && !disabled && !readOnly && "color-icon-on-action-primary-normal peer-hover:color-icon-on-action-primary-hover peer-active:color-icon-on-action-primary-active",
3581
+ selected && disabled && "color-background-action-primary-disabled"
3582
+ );
3583
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
3584
+ "label",
3585
+ {
3586
+ id,
3587
+ "data-testid": testid,
3588
+ htmlFor: id ? `${id}-input` : void 0,
3589
+ className: (0, import_clsx15.default)(
3590
+ "flex items-center",
3591
+ componentGap,
3592
+ (disabled || readOnly && error || readOnly) && "cursor-default",
3593
+ !(readOnly && error) && !disabled && !readOnly && "cursor-pointer"
3594
+ ),
3595
+ children: [
3596
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "relative", children: [
3597
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3598
+ "input",
3599
+ __spreadValues({
3600
+ id: id ? `${id}-input` : void 0,
3601
+ "data-testid": testid ? `${testid}-input` : void 0,
3602
+ type: "checkbox",
3603
+ className: "sr-only peer",
3604
+ disabled,
3605
+ checked: selected,
3606
+ onChange: handleOnChange,
3607
+ "data-indeterminate": indeterminate
3608
+ }, props)
3609
+ ),
3610
+ error && (readOnly || disabled) ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: (0, import_clsx15.default)("size-6", "flex items-center justify-center"), children: selected ? indeterminate ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-icon-primary-normal contents", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Icon, { name: "question_mark" }) }) : readOnly ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-success-400 contents", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Icon, { name: "check" }) }) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-icon-on-action-primary-normal contents", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Icon, { name: "check", className: "pointer-events-none" }) }) : readOnly && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-icon-primary-normal contents", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Icon, { name: "close" }) }) }) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3611
+ "div",
3612
+ {
3613
+ className: (0, import_clsx15.default)(
3614
+ "size-6 border rounded-base",
3615
+ "flex items-center justify-center",
3616
+ baseTransition,
3617
+ normalClassName,
3618
+ normalSelectedClassName,
3619
+ errorClassName,
3620
+ errorSelectedClassName,
3621
+ disabledClassName,
3622
+ readOnlyClassName,
3623
+ checkColor
3624
+ ),
3625
+ children: selected ? indeterminate ? readOnly ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-icon-primary-normal contents", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Icon, { name: "question_mark" }) }) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-icon-on-action-primary-normal contents", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Icon, { name: "remove", className: "pointer-events-none" }) }) : readOnly ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-success-400 contents", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Icon, { name: "check" }) }) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-icon-on-action-primary-normal contents", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Icon, { name: "check", className: "pointer-events-none" }) }) : readOnly && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-icon-primary-normal contents", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Icon, { name: "close" }) })
3626
+ }
3627
+ )
3628
+ ] }),
3629
+ label && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3630
+ Paragraph,
3631
+ {
3632
+ id: id ? `${id}-label` : void 0,
3633
+ testid: testid ? `${testid}-label` : void 0,
3634
+ as: "span",
3635
+ padded: true,
3636
+ className: (0, import_clsx15.default)(
3637
+ "text-nowrap",
3638
+ disabled && !error && "!text-text-primary-disabled",
3639
+ error && !disabled && !readOnly && "!text-text-primary-error",
3640
+ paragraphClassName
3641
+ ),
3642
+ children: label
3643
+ }
3644
+ )
3645
+ ]
3646
+ }
3647
+ );
3648
+ function handleOnChange(e) {
3649
+ if (disabled || readOnly || readOnly && error || !onChange) {
3650
+ return;
3651
+ }
3652
+ onChange(e);
3653
+ }
3654
+ };
3655
+ Checkbox.displayName = "Checkbox";
3656
+
3657
+ // src/components/Button.tsx
3658
+ var import_clsx16 = __toESM(require("clsx"), 1);
3659
+ var import_jsx_runtime19 = require("react/jsx-runtime");
3660
+ var Button = (_a) => {
3661
+ var _b = _a, {
3662
+ variant = "primary",
3663
+ as = "button",
3664
+ block,
3665
+ leftIcon,
3666
+ rightIcon,
3667
+ className,
3668
+ classNameLabel,
3669
+ disabled = false,
3670
+ children,
3671
+ iconOnly = false,
3672
+ colorClassName,
3673
+ href,
3674
+ id,
3675
+ testid
3676
+ } = _b, props = __objRest(_b, [
3677
+ "variant",
3678
+ "as",
3679
+ "block",
3680
+ "leftIcon",
3681
+ "rightIcon",
3682
+ "className",
3683
+ "classNameLabel",
3684
+ "disabled",
3685
+ "children",
3686
+ "iconOnly",
3687
+ "colorClassName",
3688
+ "href",
3689
+ "id",
3690
+ "testid"
3691
+ ]);
3692
+ const primaryVariantStyles = variant === "primary" && (0, import_clsx16.default)(
3693
+ (colorClassName == null ? void 0 : colorClassName.trim()) ? colorClassName : "text-text-on-action-primary-normal",
3694
+ "bg-background-action-primary-normal border-background-action-primary-normal",
3695
+ "hover:bg-background-action-primary-hover hover:border-background-action-primary-hover",
3696
+ "focus:bg-background-action-primary-hover focus:border-background-action-primary-hover focus:outline-0",
3697
+ "active:bg-background-action-primary-active active:border-background-action-primary-active",
3698
+ "disabled:bg-background-action-primary-disabled disabled:border-background-action-primary-disabled disabled:text-text-on-action-primary-disabled"
3699
+ );
3700
+ const secondaryVariantStyles = variant === "secondary" && (0, import_clsx16.default)(
3701
+ (colorClassName == null ? void 0 : colorClassName.trim()) ? colorClassName : "text-text-action-primary-normal",
3702
+ "bg-background-action-secondary-normal border-border-action-normal",
3703
+ "hover:bg-background-action-secondary-hover hover:border-border-action-hover hover:text-text-action-primary-hover",
3704
+ "focus:bg-background-action-secondary-hover focus:border-border-action-hover focus:text-text-action-primary-hover focus:outline-0",
3705
+ "active:bg-background-action-secondary-active active:border-border-action-active active:text-text-action-primary-active",
3706
+ "disabled:bg-background-action-primary-disabled disabled:border-border-action-disabled disabled:text-text-action-primary-disabled"
3707
+ );
3708
+ const tertiaryVariantStyles = variant === "tertiary" && (0, import_clsx16.default)(
3709
+ "bg-transparent border-transparent",
3710
+ iconOnly ? (colorClassName == null ? void 0 : colorClassName.trim()) ? colorClassName : "text-icon-action-primary-normal" : (colorClassName == null ? void 0 : colorClassName.trim()) ? colorClassName : "text-text-action-primary-normal",
3711
+ "bg-transparent border-transparent",
3712
+ "hover:bg-background-action-secondary-hover hover:border-background-action-secondary-hover hover:text-text-action-primary-hover",
3713
+ "focus:bg-background-action-secondary-hover focus:border-background-action-secondary-hover focus:text-text-action-primary-hover focus:outline-0",
3714
+ "active:bg-background-action-secondary-active active:border-transparent active:text-text-action-primary-active",
3715
+ "disabled:bg-transparent disabled:border-transparent disabled:text-text-action-primary-disabled"
3716
+ );
3717
+ const primaryCriticalVariantStyles = variant === "primary-critical" && (0, import_clsx16.default)(
3718
+ (colorClassName == null ? void 0 : colorClassName.trim()) ? colorClassName : "text-text-on-action-primary-normal",
3719
+ "bg-background-action-critical-primary-normal border-background-action-critical-primary-normal",
3720
+ "hover:bg-background-action-critical-primary-hover hover:border-background-action-critical-primary-hover",
3721
+ "focus:bg-background-action-critical-primary-hover focus:border-background-action-critical-primary-hover focus:outline-0",
3722
+ "active:bg-background-action-critical-primary-active active:border-background-action-critical-primary-active",
3723
+ "disabled:bg-background-action-critical-primary-disabled disabled:border-background-action-critical-primary-disabled disabled:text-text-on-action-primary-disabled"
3724
+ );
3725
+ const secondaryCriticalVariantStyles = variant === "secondary-critical" && (0, import_clsx16.default)(
3726
+ (colorClassName == null ? void 0 : colorClassName.trim()) ? colorClassName : "text-text-action-critical-normal",
3727
+ "bg-background-action-critical-secondary-normal border-border-action-critical-normal",
3728
+ "hover:bg-background-action-critical-secondary-hover hover:border-border-action-critical-hover hover:text-text-action-critical-hover",
3729
+ "focus:bg-background-action-critical-secondary-hover focus:border-border-action-critical-hover focus:text-text-action-critical-hover focus:outline-0",
3730
+ "active:bg-background-action-critical-secondary-active active:border-border-action-critical-active active:text-text-action-critical-active",
3731
+ "disabled:bg-background-action-critical-disabled disabled:border-border-action-critical-disabled disabled:text-text-action-critical-disabled"
3732
+ );
3733
+ const tertiaryCriticalVariantStyles = variant === "tertiary-critical" && (0, import_clsx16.default)(
3734
+ (colorClassName == null ? void 0 : colorClassName.trim()) ? colorClassName : "text-text-action-critical-normal",
3735
+ "bg-transparent border-transparent text-text-action-critical-normal",
3736
+ "hover:bg-background-action-critical-secondary-hover hover:border-background-action-critical-secondary-hover hover:text-text-action-critical-hover",
3737
+ "focus:bg-background-action-critical-secondary-hover focus:border-background-action-critical-secondary-hover focus:text-text-action-critical-hover focus:outline-0",
3738
+ "active:bg-background-action-critical-secondary-active active:border-background-action-critical-secondary-active active:text-text-action-critical-active",
3739
+ "disabled:bg-transparent disabled:border-transparent disabled:text-text-action-critical-disabled"
3740
+ );
3741
+ const navigationVarianStyles = variant === "navigation" && (0, import_clsx16.default)(
3742
+ (colorClassName == null ? void 0 : colorClassName.trim()) ? colorClassName : "text-text-action-primary-normal",
3743
+ "bg-transparent",
3744
+ "hover:bg-background-action-secondary-hover hover:text-text-action-primary-hover",
3745
+ "focus:bg-background-action-secondary-hover focus:text-text-action-primary-hover focus:outline-0",
3746
+ "active:bg-background-action-secondary-active active:text-text-action-primary-active",
3747
+ "disabled:bg-transparent disabled:text-text-on-action-primary-disabled",
3748
+ "flex-col",
3749
+ paddingUsingComponentGap
3750
+ );
3751
+ const notNavigationVariantStyles = variant !== "navigation" && (0, import_clsx16.default)("border-2 flex-row", componentPaddingMinus2pxBorder, componentGap);
3752
+ const buttonClasses = (0, import_clsx16.default)(
3753
+ disabled ? "cursor-default" : "cursor-pointer",
3754
+ block ? "w-full" : "w-fit",
3755
+ baseTransition,
3756
+ "rounded-sm whitespace-nowrap inline-flex items-center justify-center group/btn",
3757
+ primaryVariantStyles,
3758
+ secondaryVariantStyles,
3759
+ tertiaryVariantStyles,
3760
+ primaryCriticalVariantStyles,
3761
+ secondaryCriticalVariantStyles,
3762
+ tertiaryCriticalVariantStyles,
3763
+ navigationVarianStyles,
3764
+ notNavigationVariantStyles,
3765
+ className
3766
+ );
3767
+ const labelClasses = (0, import_clsx16.default)(
3768
+ "min-h-6 flex items-center justify-center",
3769
+ classNameLabel,
3770
+ componentPaddingXUsingComponentGap,
3771
+ typography.buttonLabel
3772
+ );
3773
+ const Element = href && !as ? "a" : as;
3774
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
3775
+ Element,
3776
+ __spreadProps(__spreadValues({
3777
+ id,
3778
+ "data-testid": testid,
3779
+ type: Element === "button" ? "button" : void 0,
3780
+ className: buttonClasses
3781
+ }, props), {
3782
+ onClick: props.onClick,
3783
+ disabled,
3784
+ href,
3785
+ "data-theme": variant === "navigation" ? "brand" : void 0,
3786
+ children: [
3787
+ leftIcon && leftIcon,
3788
+ !iconOnly && children && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { id: id ? `${id}-label` : void 0, "data-testid": testid ? `${testid}-label` : void 0, className: labelClasses, children }),
3789
+ rightIcon && rightIcon
3790
+ ]
3791
+ })
3792
+ );
3793
+ };
3794
+ Button.displayName = "Button";
3795
+
3796
+ // src/components/Tooltip.tsx
3797
+ var import_clsx17 = __toESM(require("clsx"), 1);
3798
+ var import_react17 = require("react");
3799
+ var import_react_dom2 = require("react-dom");
3800
+ var import_jsx_runtime20 = require("react/jsx-runtime");
3801
+ var Tooltip = ({
3802
+ id,
3803
+ testid,
3804
+ message,
3805
+ position = "top",
3806
+ children,
3807
+ showOnTruncation = false,
3808
+ offset = 8,
3809
+ keepHidden = false
3810
+ }) => {
3811
+ const ref = (0, import_react17.useRef)(null);
3812
+ const tooltipRef = (0, import_react17.useRef)(null);
3813
+ const [tooltipPosition, setTooltipPosition] = (0, import_react17.useState)({ top: 0, left: 0 });
3814
+ const [isVisible, setIsVisible] = (0, import_react17.useState)(false);
3815
+ const [removeOpacity, setRemoveOpacity] = (0, import_react17.useState)(false);
3816
+ const updatePosition = () => {
3817
+ if (!ref.current || !tooltipRef.current) return;
3818
+ const rect = ref.current.getBoundingClientRect();
3819
+ const tooltipRect = tooltipRef.current.getBoundingClientRect();
3820
+ let top = 0;
3821
+ let left = 0;
3822
+ switch (position) {
3823
+ case "top":
3824
+ top = rect.top - tooltipRect.height - offset;
3825
+ left = rect.left + rect.width / 2 - tooltipRect.width / 2;
3826
+ break;
3827
+ case "bottom":
3828
+ top = rect.bottom + offset;
3829
+ left = rect.left + rect.width / 2 - tooltipRect.width / 2;
3830
+ break;
3831
+ case "left":
3832
+ top = rect.top + rect.height / 2 - tooltipRect.height / 2;
3833
+ left = rect.left - tooltipRect.width - offset;
3834
+ break;
3835
+ case "right":
3836
+ top = rect.top + rect.height / 2 - tooltipRect.height / 2;
3837
+ left = rect.right + offset;
3838
+ break;
3839
+ }
3840
+ setTooltipPosition({ top, left });
3841
+ requestAnimationFrame(() => {
3842
+ setRemoveOpacity(true);
3843
+ });
3844
+ };
3845
+ const handleMouseEnter = () => {
3846
+ if (!showOnTruncation || checkForTextTruncation()) {
3847
+ setIsVisible(true);
3848
+ }
3849
+ };
3850
+ const handleMouseLeave = () => {
3851
+ setIsVisible(false);
3852
+ setRemoveOpacity(false);
3853
+ };
3854
+ (0, import_react17.useEffect)(() => {
3855
+ if (isVisible && tooltipRef.current) {
3856
+ requestAnimationFrame(() => {
3857
+ updatePosition();
3858
+ });
3859
+ }
3860
+ }, [isVisible]);
3861
+ (0, import_react17.useEffect)(() => {
3862
+ if (isVisible) {
3863
+ window.addEventListener("resize", updatePosition);
3864
+ return () => window.removeEventListener("resize", updatePosition);
3865
+ }
3866
+ }, [isVisible]);
3867
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
3868
+ "div",
3869
+ {
3870
+ id,
3871
+ "data-testid": testid,
3872
+ ref,
3873
+ className: "relative inline-grid grid-cols-[auto_1fr] items-center",
3874
+ onMouseEnter: handleMouseEnter,
3875
+ onMouseLeave: handleMouseLeave,
3876
+ children: [
3877
+ children,
3878
+ !keepHidden && isVisible && typeof document !== "undefined" && (0, import_react_dom2.createPortal)(
3879
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3880
+ "div",
3881
+ {
3882
+ id: id ? `${id}-message` : void 0,
3883
+ "data-testid": testid ? `${testid}-message` : void 0,
3884
+ ref: tooltipRef,
3885
+ style: {
3886
+ position: "fixed",
3887
+ top: `${tooltipPosition.top}px`,
3888
+ left: `${tooltipPosition.left}px`,
3889
+ zIndex: 9999
3890
+ },
3891
+ className: (0, import_clsx17.default)(
3892
+ typography.caption,
3893
+ "bg-neutral-500 text-neutral-100 rounded whitespace-nowrap shadow-2 pointer-events-none transition-opacity duration-100 ease-in-out",
3894
+ componentPadding,
3895
+ !removeOpacity && "opacity-0"
3896
+ ),
3897
+ children: message
3898
+ }
3899
+ ),
3900
+ document.body
3901
+ )
3902
+ ]
3903
+ }
3904
+ );
3905
+ function checkForTextTruncation() {
3906
+ if (showOnTruncation && ref.current) {
3907
+ const paragraph = ref.current.querySelector("p");
3908
+ if (paragraph) {
3909
+ const isTruncated = paragraph.scrollWidth > paragraph.clientWidth;
3910
+ return isTruncated;
3911
+ }
3912
+ }
3913
+ return false;
3914
+ }
3915
+ };
3916
+ Tooltip.displayName = "Tooltip";
3917
+
3918
+ // src/components/Accordion.tsx
3919
+ var import_clsx20 = __toESM(require("clsx"), 1);
3920
+
3921
+ // src/components/Card.tsx
3922
+ var import_clsx18 = __toESM(require("clsx"), 1);
3923
+ var import_jsx_runtime21 = require("react/jsx-runtime");
3924
+
3925
+ // src/components/Stack.tsx
3926
+ var import_clsx19 = __toESM(require("clsx"), 1);
3927
+ var import_jsx_runtime22 = require("react/jsx-runtime");
3928
+
3929
+ // src/components/Accordion.tsx
3930
+ var import_jsx_runtime23 = require("react/jsx-runtime");
3931
+
3932
+ // src/components/Heading.tsx
3933
+ var import_clsx21 = __toESM(require("clsx"), 1);
3934
+ var import_jsx_runtime24 = require("react/jsx-runtime");
3935
+ var Heading = (_a) => {
3936
+ var _b = _a, {
3937
+ className,
3938
+ children,
3939
+ as,
3940
+ color,
3941
+ align,
3942
+ variant = "heading1",
3943
+ id,
3944
+ testid
3945
+ } = _b, props = __objRest(_b, [
3946
+ "className",
3947
+ "children",
3948
+ "as",
3949
+ "color",
3950
+ "align",
3951
+ "variant",
3952
+ "id",
3953
+ "testid"
3954
+ ]);
3955
+ const defaultElement = variant === "heading1" ? "h1" : variant === "heading2" ? "h2" : "h3";
3956
+ const Element = as != null ? as : defaultElement;
3957
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
3958
+ Element,
3959
+ __spreadProps(__spreadValues({
3960
+ id,
3961
+ "data-testid": testid,
3962
+ className: (0, import_clsx21.default)(
3963
+ typography[variant],
3964
+ className,
3965
+ align === "left" && "text-left",
3966
+ align === "center" && "text-center",
3967
+ align === "right" && "text-right"
3968
+ ),
3969
+ style: __spreadProps(__spreadValues({}, props.style), {
3970
+ color: color ? `var(--color-${color})` : void 0
3971
+ })
3972
+ }, props), {
3973
+ children
3974
+ })
3975
+ );
3976
+ };
3977
+ Heading.displayName = "Heading";
3978
+ var Heading1 = (props) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Heading, __spreadProps(__spreadValues({}, props), { variant: "heading1" }));
3979
+ var Heading2 = (props) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Heading, __spreadProps(__spreadValues({}, props), { variant: "heading2" }));
3980
+ var Heading3 = (props) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Heading, __spreadProps(__spreadValues({}, props), { variant: "heading3" }));
3981
+ Heading1.displayName = "Heading1";
3982
+ Heading2.displayName = "Heading2";
3983
+ Heading3.displayName = "Heading3";
3984
+
3985
+ // src/components/Theme.tsx
3986
+ var import_jsx_runtime25 = require("react/jsx-runtime");
3987
+
3988
+ // src/components/MobileDataGrid/ColumnSelector/index.tsx
3989
+ var import_react20 = require("react");
3990
+
3991
+ // src/components/MobileDataGrid/GridContextProvider/useGridContext.ts
3992
+ var import_react19 = require("react");
3993
+
3994
+ // src/components/MobileDataGrid/GridContextProvider/GridContext.tsx
3995
+ var import_react18 = require("react");
3996
+ var GridContext = (0, import_react18.createContext)(null);
3997
+
3998
+ // src/components/MobileDataGrid/ColumnSelector/index.tsx
3999
+ var import_jsx_runtime26 = require("react/jsx-runtime");
4000
+
4001
+ // src/components/MobileDataGrid/MobileDataGridHeader.tsx
4002
+ var import_jsx_runtime27 = require("react/jsx-runtime");
4003
+
4004
+ // src/components/MobileDataGrid/GridContextProvider/index.tsx
4005
+ var import_react21 = require("react");
4006
+ var import_jsx_runtime28 = require("react/jsx-runtime");
4007
+
4008
+ // src/components/Modal.tsx
4009
+ var import_clsx26 = __toESM(require("clsx"), 1);
4010
+ var import_react23 = require("react");
4011
+
4012
+ // src/components/ModalHeader.tsx
4013
+ var import_clsx22 = __toESM(require("clsx"), 1);
4014
+ var import_jsx_runtime29 = require("react/jsx-runtime");
4015
+ var ModalHeader = ({
4016
+ title,
4017
+ hideCloseIcon,
4018
+ headerIcon,
4019
+ headerIconAlign,
4020
+ onClose,
4021
+ id,
4022
+ testid,
4023
+ headerClassname
4024
+ }) => {
4025
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
4026
+ "div",
4027
+ {
4028
+ id,
4029
+ "data-testid": testid,
4030
+ className: (0, import_clsx22.default)(
4031
+ "flex justify-between items-center",
4032
+ headerIconAlign === "center" && "justify-center",
4033
+ headerIconAlign === "right" && "justify-end",
4034
+ headerIconAlign === "left" && "justify-start",
4035
+ layoutPaddding,
4036
+ layoutGroupGap,
4037
+ headerClassname
4038
+ ),
4039
+ children: [
4040
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: (0, import_clsx22.default)("flex items-center flex-1", layoutGroupGap), children: [
4041
+ headerIcon,
4042
+ title && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
4043
+ Heading2,
4044
+ {
4045
+ id: id ? `${id}-title` : void 0,
4046
+ testid: testid ? `${testid}-title` : void 0,
4047
+ as: "p",
4048
+ children: title
4049
+ }
4050
+ )
4051
+ ] }),
4052
+ !hideCloseIcon && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
4053
+ Button,
4054
+ {
4055
+ id: id ? `${id}-close-button` : void 0,
4056
+ testid: testid ? `${testid}-close-button` : void 0,
4057
+ iconOnly: true,
4058
+ variant: "tertiary",
4059
+ onClick: onClose,
4060
+ leftIcon: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "text-brand-text-action-primary-normal desktop:text-icon-primary-normal contents", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Icon, { name: "close", size: 24 }) })
4061
+ }
4062
+ )
4063
+ ]
4064
+ }
4065
+ );
4066
+ };
4067
+ ModalHeader.displayName = "ModalHeader";
4068
+
4069
+ // src/components/ModalContent.tsx
4070
+ var import_clsx23 = __toESM(require("clsx"), 1);
4071
+ var import_jsx_runtime30 = require("react/jsx-runtime");
4072
+ function ModalContent({
4073
+ fixedHeightScrolling,
4074
+ children,
4075
+ id,
4076
+ testid
4077
+ }) {
4078
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
4079
+ "div",
4080
+ {
4081
+ id,
4082
+ "data-testid": testid,
4083
+ className: (0, import_clsx23.default)(
4084
+ "flex-grow desktop:flex-grow-0",
4085
+ layoutPaddding,
4086
+ fixedHeightScrolling && "overflow-auto"
4087
+ ),
4088
+ children
4089
+ }
4090
+ );
4091
+ }
4092
+ ModalContent.displayName = "ModalContent";
4093
+
4094
+ // src/components/ModalButtons.tsx
4095
+ var import_clsx24 = __toESM(require("clsx"), 1);
4096
+ var import_jsx_runtime31 = require("react/jsx-runtime");
4097
+ var ModalButtons = ({
4098
+ onClose,
4099
+ onContinue,
4100
+ customActions,
4101
+ id,
4102
+ testid
4103
+ }) => {
4104
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
4105
+ "div",
4106
+ {
4107
+ id,
4108
+ "data-testid": testid,
4109
+ className: (0, import_clsx24.default)(
4110
+ "border-t border-neutral-300 flex justify-end",
4111
+ layoutPaddding,
4112
+ layoutGroupGap
4113
+ ),
4114
+ children: customActions != null ? customActions : /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_jsx_runtime31.Fragment, { children: [
4115
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
4116
+ Button,
4117
+ {
4118
+ id: id ? `${id}-close-button` : void 0,
4119
+ testid: testid ? `${testid}-close-button` : void 0,
4120
+ variant: "secondary",
4121
+ leftIcon: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Icon, { name: "close", size: 24 }),
4122
+ onClick: onClose,
4123
+ className: "max-sm:w-full",
4124
+ children: "Close"
4125
+ }
4126
+ ),
4127
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
4128
+ Button,
4129
+ {
4130
+ id: id ? `${id}-continue-button` : void 0,
4131
+ testid: testid ? `${testid}-continue-button` : void 0,
4132
+ variant: "primary",
4133
+ leftIcon: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Icon, { name: "check", size: 24 }),
4134
+ className: "max-sm:w-full",
4135
+ onClick: onContinue,
4136
+ children: "Continue"
4137
+ }
4138
+ )
4139
+ ] })
4140
+ }
4141
+ );
4142
+ };
4143
+ ModalButtons.displayName = "ModalButtons";
4144
+
4145
+ // src/components/ModalScrim.tsx
4146
+ var import_clsx25 = __toESM(require("clsx"), 1);
4147
+ var import_jsx_runtime32 = require("react/jsx-runtime");
4148
+ var ModalScrim = ({
4149
+ show = false,
4150
+ size = "small",
4151
+ children,
4152
+ onClick,
4153
+ ref,
4154
+ id,
4155
+ testid
4156
+ }) => {
4157
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
4158
+ "div",
4159
+ {
4160
+ id,
4161
+ "data-testid": testid,
4162
+ className: (0, import_clsx25.default)(
4163
+ "overflow-y-auto h-screen transition-[visibility,opacity,background] ease-in-out duration-100 grid place-content-center group bg-neutral-600/50 fixed opacity-0",
4164
+ !show && " pointer-events-none",
4165
+ size === "small" && "p-4",
4166
+ size === "screen" ? "desktop:p-0" : "desktop:p-4",
4167
+ "inset-0 z-50"
4168
+ ),
4169
+ onMouseDown: onClick,
4170
+ ref,
4171
+ children
4172
+ }
4173
+ );
4174
+ };
4175
+ ModalScrim.displayName = "ModalScrim";
4176
+
4177
+ // src/components/Modal.tsx
4178
+ var import_react_dom3 = require("react-dom");
4179
+ var import_react_use = require("react-use");
4180
+
4181
+ // src/components/useMounted.tsx
4182
+ var import_react22 = require("react");
4183
+ var useMounted = () => {
4184
+ const [isMounted, setIsMounted] = (0, import_react22.useState)(false);
4185
+ (0, import_react22.useEffect)(() => {
4186
+ setIsMounted(true);
4187
+ return () => setIsMounted(false);
4188
+ }, []);
4189
+ return isMounted;
4190
+ };
4191
+
4192
+ // src/components/Modal.tsx
4193
+ var import_jsx_runtime33 = require("react/jsx-runtime");
4194
+ var fadeInScale = (element, duration = 300) => element.animate(
4195
+ [
4196
+ { opacity: 0, transform: "scale(0.95)" },
4197
+ { opacity: 1, transform: "scale(1)" }
4198
+ ],
4199
+ {
4200
+ duration,
4201
+ easing: "cubic-bezier(0.4, 0, 0.2, 1)",
4202
+ fill: "both"
4203
+ }
4204
+ );
4205
+ var fadeOutScale = (element, duration = 200) => element.animate(
4206
+ [
4207
+ { opacity: 1, transform: "scale(1)" },
4208
+ { opacity: 0, transform: "scale(0.95)" }
4209
+ ],
4210
+ {
4211
+ duration,
4212
+ easing: "ease-in-out",
4213
+ fill: "both"
4214
+ }
4215
+ );
4216
+ var bgFadeIn = (element, duration = 300) => element.animate([{ opacity: 0 }, { opacity: 1 }], {
4217
+ duration,
4218
+ easing: "cubic-bezier(0.4, 0, 0.2, 1)",
4219
+ fill: "both"
4220
+ });
4221
+ var bgFadeOut = (element, duration = 200) => element.animate([{ opacity: 1 }, { opacity: 0 }], {
4222
+ duration,
4223
+ easing: "ease-in-out",
4224
+ fill: "both"
4225
+ });
4226
+ var whenAllAnimationsFinish = (animations, callback) => {
4227
+ let finishedCount = 0;
4228
+ animations.forEach((animation) => {
4229
+ animation.onfinish = () => {
4230
+ finishedCount += 1;
4231
+ if (finishedCount === animations.length) {
4232
+ callback();
4233
+ }
4234
+ };
4235
+ });
4236
+ };
4237
+ var sizes = {
4238
+ small: {
4239
+ sizeClass: "max-h-screen desktop:max-w-120 rounded-sm"
4240
+ },
4241
+ medium: {
4242
+ sizeClass: "desktop:max-w-180 w-screen desktop:h-fit h-screen desktop:w-full max-w-240"
4243
+ },
4244
+ large: {
4245
+ sizeClass: "desktop:max-w-240 w-screen desktop:h-fit h-screen desktop:w-full max-w-240"
4246
+ },
4247
+ "x-large": {
4248
+ sizeClass: "desktop:max-w-300 w-screen desktop:h-fit h-screen desktop:w-full max-w-240"
4249
+ },
4250
+ screen: {
4251
+ sizeClass: "w-screen h-screen max-w-screen !rounded-none"
4252
+ }
4253
+ };
4254
+ var Modal = ({
4255
+ id,
4256
+ testid,
4257
+ title,
4258
+ open = false,
4259
+ size = "small",
4260
+ className,
4261
+ children,
4262
+ onClose,
4263
+ onContinue,
4264
+ closeOnBackdropClick = true,
4265
+ showButtons = false,
4266
+ hideCloseIcon = false,
4267
+ headerIcon,
4268
+ headerIconAlign,
4269
+ fixedHeightScrolling = false,
4270
+ customActions,
4271
+ headerClassname,
4272
+ customFooter,
4273
+ noWrapper
4274
+ }) => {
4275
+ var _a;
4276
+ const mounted = useMounted();
4277
+ const modalRef = (0, import_react23.useRef)(null);
4278
+ const bgRef = (0, import_react23.useRef)(null);
4279
+ const wasOpen = (0, import_react_use.usePrevious)(open);
4280
+ const isMobile = useMatchesMobile();
4281
+ const computedFixedHeightScrolling = isMobile || fixedHeightScrolling;
4282
+ (0, import_react23.useEffect)(() => {
4283
+ if (!mounted) return;
4284
+ if (!modalRef.current || !bgRef.current) {
4285
+ console.error("Modal or background reference is not set.");
4286
+ return;
4287
+ }
4288
+ if (wasOpen === void 0) return;
4289
+ if (wasOpen && !open) {
4290
+ const modalAnimation = fadeOutScale(modalRef.current);
4291
+ const bgAnimation = bgFadeOut(bgRef.current);
4292
+ whenAllAnimationsFinish([modalAnimation, bgAnimation], () => {
4293
+ if (onClose) {
4294
+ onClose();
4295
+ }
4296
+ });
4297
+ } else if (!wasOpen && open) {
4298
+ fadeInScale(modalRef.current);
4299
+ bgFadeIn(bgRef.current);
4300
+ }
4301
+ }, [mounted, onClose, open, wasOpen]);
4302
+ const handleKeyDown = (0, import_react23.useCallback)(
4303
+ (e) => {
4304
+ if (e.key === "Escape") {
4305
+ if (onClose) {
4306
+ e.preventDefault();
4307
+ onClose();
4308
+ }
4309
+ }
4310
+ },
4311
+ [onClose]
4312
+ );
4313
+ const handleClose = (0, import_react23.useCallback)(() => {
4314
+ if (onClose) {
4315
+ onClose();
4316
+ }
4317
+ }, [onClose]);
4318
+ (0, import_react23.useEffect)(() => {
4319
+ if (open) {
4320
+ document.addEventListener("keyup", handleKeyDown);
4321
+ }
4322
+ return () => {
4323
+ document.removeEventListener("keyup", handleKeyDown);
4324
+ };
4325
+ }, [open, handleKeyDown]);
4326
+ (0, import_react23.useEffect)(() => {
4327
+ if (!open) return;
4328
+ const scrollY = window.scrollY;
4329
+ const body = document.body;
4330
+ body.style.position = "fixed";
4331
+ body.style.top = `-${scrollY}px`;
4332
+ body.style.left = "0";
4333
+ body.style.right = "0";
4334
+ body.style.overflow = "hidden";
4335
+ body.style.width = "100%";
4336
+ return () => {
4337
+ body.style.position = "";
4338
+ body.style.top = "";
4339
+ body.style.left = "";
4340
+ body.style.right = "";
4341
+ body.style.overflow = "";
4342
+ body.style.width = "";
4343
+ window.scrollTo(0, scrollY);
4344
+ };
4345
+ }, [open]);
4346
+ const { sizeClass } = (_a = sizes[size]) != null ? _a : sizes.small;
4347
+ const backgroundClickHandler = (0, import_react23.useCallback)(
4348
+ (e) => {
4349
+ const target = e.target;
4350
+ const currentTarget = e.currentTarget;
4351
+ if (currentTarget.contains(target) && currentTarget !== target) {
4352
+ e.stopPropagation();
4353
+ return;
4354
+ }
4355
+ if (open && closeOnBackdropClick) {
4356
+ handleClose();
4357
+ }
4358
+ },
4359
+ [open, closeOnBackdropClick, handleClose]
4360
+ );
4361
+ if (!mounted) {
4362
+ return null;
4363
+ }
4364
+ return (0, import_react_dom3.createPortal)(
4365
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
4366
+ ModalScrim,
4367
+ {
4368
+ id: id ? `${id}-scrim` : void 0,
4369
+ testid: testid ? `${testid}-scrim` : void 0,
4370
+ size,
4371
+ ref: bgRef,
4372
+ show: open,
4373
+ onClick: backgroundClickHandler,
4374
+ children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
4375
+ "div",
4376
+ {
4377
+ id,
4378
+ "data-testid": testid,
4379
+ ref: modalRef,
4380
+ className: (0, import_clsx26.default)(
4381
+ "shadow-md rounded-sm flex flex-col overflow-hidden w-full opacity-0 h-fit",
4382
+ computedFixedHeightScrolling && size !== "screen" && "desktop:max-h-[calc(100vh-32px)] desktop:h-auto",
4383
+ className,
4384
+ !(className == null ? void 0 : className.includes("bg-")) && "bg-white",
4385
+ sizeClass
4386
+ ),
4387
+ onClick: (e) => e.stopPropagation(),
4388
+ children: [
4389
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
4390
+ ModalHeader,
4391
+ {
4392
+ id: id ? `${id}-header` : void 0,
4393
+ testid: testid ? `${testid}-header` : void 0,
4394
+ title,
4395
+ onClose: handleClose,
4396
+ hideCloseIcon,
4397
+ headerIcon,
4398
+ headerIconAlign,
4399
+ headerClassname
4400
+ }
4401
+ ),
4402
+ children && (size !== "screen" || noWrapper) ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
4403
+ ModalContent,
4404
+ {
4405
+ id: id ? `${id}-content` : void 0,
4406
+ testid: testid ? `${testid}-content` : void 0,
4407
+ fixedHeightScrolling: computedFixedHeightScrolling,
4408
+ children
4409
+ }
4410
+ ) : children,
4411
+ showButtons ? customFooter ? customActions : /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
4412
+ ModalButtons,
4413
+ {
4414
+ id: id ? `${id}-buttons` : void 0,
4415
+ testid: testid ? `${testid}-buttons` : void 0,
4416
+ onClose: handleClose,
4417
+ onContinue,
4418
+ customActions
4419
+ }
4420
+ ) : null
4421
+ ]
4422
+ }
4423
+ )
4424
+ }
4425
+ ),
4426
+ findDocumentRoot(bgRef.current)
4427
+ );
4428
+ };
4429
+ Modal.displayName = "Modal";
4430
+
4431
+ // src/components/MobileDataGrid/MobileDataGridCard/MobileDataGridColumn.tsx
4432
+ var import_jsx_runtime34 = require("react/jsx-runtime");
4433
+
4434
+ // src/components/MobileDataGrid/RowDetailModalProvider/ModalContent.tsx
4435
+ var import_jsx_runtime35 = require("react/jsx-runtime");
4436
+
4437
+ // src/components/MobileDataGrid/RowDetailModalProvider/index.tsx
4438
+ var import_jsx_runtime36 = require("react/jsx-runtime");
4439
+
4440
+ // src/components/MobileDataGrid/ColumnList.tsx
4441
+ var import_clsx28 = __toESM(require("clsx"), 1);
4442
+
4443
+ // src/components/MobileDataGrid/MobileDataGridCard/index.tsx
4444
+ var import_clsx27 = __toESM(require("clsx"), 1);
4445
+ var import_jsx_runtime37 = require("react/jsx-runtime");
4446
+
4447
+ // src/components/MobileDataGrid/ColumnList.tsx
4448
+ var import_jsx_runtime38 = require("react/jsx-runtime");
4449
+
4450
+ // src/components/MobileDataGrid/index.tsx
4451
+ var import_jsx_runtime39 = require("react/jsx-runtime");
4452
+
4453
+ // src/components/ImagePlaceholder.tsx
4454
+ var import_react24 = require("react");
4455
+ var import_jsx_runtime40 = require("react/jsx-runtime");
4456
+
4457
+ // src/components/ProductImagePreview/Thumbnail.tsx
4458
+ var import_jsx_runtime41 = require("react/jsx-runtime");
4459
+
4460
+ // src/components/Grid.tsx
4461
+ var import_react25 = require("react");
4462
+ var import_clsx29 = __toESM(require("clsx"), 1);
4463
+ var import_jsx_runtime42 = require("react/jsx-runtime");
4464
+
4465
+ // src/components/ProductImagePreview/ProductPrimaryImage.tsx
4466
+ var import_react26 = require("react");
4467
+
4468
+ // src/components/Spinner.tsx
4469
+ var import_jsx_runtime43 = require("react/jsx-runtime");
4470
+ var Spinner = ({ size = "small", testid }) => {
4471
+ const dimension = size === "large" ? 48 : 24;
4472
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
4473
+ "svg",
4474
+ {
4475
+ "data-testid": testid,
4476
+ width: dimension,
4477
+ height: dimension,
4478
+ viewBox: "0 0 24 24",
4479
+ xmlns: "http://www.w3.org/2000/svg",
4480
+ fill: "#1D1E1E",
4481
+ className: "spinner",
4482
+ "aria-label": "Loading",
4483
+ children: [
4484
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("circle", { cx: "12", cy: "4", r: "2", opacity: "1" }),
4485
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("circle", { cx: "17.666", cy: "6.334", r: "2", opacity: "0.125" }),
4486
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("circle", { cx: "20", cy: "12", r: "2", opacity: "0.25" }),
4487
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("circle", { cx: "17.666", cy: "17.666", r: "2", opacity: "0.375" }),
4488
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("circle", { cx: "12", cy: "20", r: "2", opacity: "0.5" }),
4489
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("circle", { cx: "6.334", cy: "17.666", r: "2", opacity: "0.625" }),
4490
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("circle", { cx: "4", cy: "12", r: "2", opacity: "0.75" }),
4491
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("circle", { cx: "6.334", cy: "6.334", r: "2", opacity: "0.875" })
4492
+ ]
4493
+ }
4494
+ );
4495
+ };
4496
+ Spinner.displayName = "Spinner";
4497
+
4498
+ // src/components/ProductImagePreview/ProductPrimaryImage.tsx
4499
+ var import_jsx_runtime44 = require("react/jsx-runtime");
4500
+
4501
+ // src/components/ProductImagePreview/ZoomWindow.tsx
4502
+ var import_react27 = require("react");
4503
+
4504
+ // src/components/Surface.tsx
4505
+ var import_clsx30 = __toESM(require("clsx"), 1);
4506
+ var import_jsx_runtime45 = require("react/jsx-runtime");
4507
+ var Surface = (_a) => {
4508
+ var _b = _a, {
4509
+ children,
4510
+ className,
4511
+ elevation = 0,
4512
+ id
4513
+ } = _b, props = __objRest(_b, [
4514
+ "children",
4515
+ "className",
4516
+ "elevation",
4517
+ "id"
4518
+ ]);
4519
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
4520
+ "div",
4521
+ __spreadProps(__spreadValues({
4522
+ id,
4523
+ className: (0, import_clsx30.default)(
4524
+ "rounded-base",
4525
+ {
4526
+ "shadow-2": elevation === 2,
4527
+ "shadow-4": elevation === 4,
4528
+ "shadow-16": elevation === 16
4529
+ },
4530
+ className
4531
+ )
4532
+ }, props), {
4533
+ children
4534
+ })
4535
+ );
4536
+ };
4537
+ Surface.displayName = "Surface";
4538
+
4539
+ // src/components/ProductImagePreview/ZoomWindow.tsx
4540
+ var import_jsx_runtime46 = require("react/jsx-runtime");
4541
+
4542
+ // src/components/ProductImagePreview/CarouselPagination.tsx
4543
+ var import_clsx31 = require("clsx");
4544
+ var import_jsx_runtime47 = require("react/jsx-runtime");
4545
+
4546
+ // src/components/ProductImagePreview/MobileImageCarousel.tsx
4547
+ var import_react28 = require("react");
4548
+ var import_jsx_runtime48 = require("react/jsx-runtime");
4549
+
4550
+ // src/components/ProductImagePreview/useProductImagePreview.ts
4551
+ var import_react29 = require("react");
4552
+
4553
+ // src/components/ProductImagePreview/index.tsx
4554
+ var import_jsx_runtime49 = require("react/jsx-runtime");
4555
+
4556
+ // src/components/CompactImagesPreview.tsx
4557
+ var import_react30 = require("react");
4558
+ var import_clsx32 = __toESM(require("clsx"), 1);
4559
+ var import_jsx_runtime50 = require("react/jsx-runtime");
4560
+
4561
+ // src/components/PDFViewer/index.tsx
4562
+ var import_react33 = require("react");
4563
+
4564
+ // src/components/PDFViewer/PDFElement.tsx
4565
+ var import_react_pdf2 = require("@mikecousins/react-pdf");
4566
+ var import_react32 = require("react");
4567
+
4568
+ // src/components/PDFViewer/PDFPage.tsx
4569
+ var import_react_pdf = require("@mikecousins/react-pdf");
4570
+ var import_react31 = require("react");
4571
+ var import_jsx_runtime51 = require("react/jsx-runtime");
4572
+
4573
+ // src/components/PDFViewer/PDFElement.tsx
4574
+ var import_clsx33 = __toESM(require("clsx"), 1);
4575
+ var import_jsx_runtime52 = require("react/jsx-runtime");
4576
+
4577
+ // src/components/PDFViewer/DownloadIcon.tsx
4578
+ var import_jsx_runtime53 = require("react/jsx-runtime");
4579
+
4580
+ // src/components/PDFViewer/PDFNavigation.tsx
4581
+ var import_jsx_runtime54 = require("react/jsx-runtime");
4582
+
4583
+ // src/components/PDFViewer/index.tsx
4584
+ var import_jsx_runtime55 = require("react/jsx-runtime");
4585
+
4586
+ // src/components/DataGrid/TableBody/TableBodyRow.tsx
4587
+ var import_jsx_runtime56 = require("react/jsx-runtime");
4588
+ var valueFormatters = {
4589
+ date: (value) => typeof value === "string" ? formatDate(value) : "",
4590
+ currency: (value) => formatCurrencyDisplay(value)
4591
+ };
4592
+ function isValueFormatterKey(value) {
4593
+ return typeof value === "string" && value in valueFormatters;
4594
+ }
4595
+ function TableBodyRow({
4596
+ id,
4597
+ testid,
4598
+ columnVirtualizer,
4599
+ row,
4600
+ // rowVirtualizer,
4601
+ virtualPaddingLeft,
4602
+ virtualPaddingRight,
4603
+ virtualRow,
4604
+ showFilterRow,
4605
+ enableColumnSelector = false,
4606
+ locked,
4607
+ pinDirection
4608
+ }) {
4609
+ var _a;
4610
+ let visibleCells;
4611
+ if (locked) {
4612
+ visibleCells = pinDirection === "left" ? row.getLeftVisibleCells() : row.getRightVisibleCells();
4613
+ } else {
4614
+ visibleCells = row.getCenterVisibleCells();
4615
+ }
4616
+ const virtualColumns = (_a = columnVirtualizer == null ? void 0 : columnVirtualizer.getVirtualItems()) != null ? _a : [];
4617
+ const columns = locked ? visibleCells : virtualColumns;
4618
+ const isError = typeof row.original === "object" && row.original !== null && "rowState" in row.original && row.original.rowState === "error";
4619
+ const CellElement = locked ? DataGridCell : DragAlongCell;
4620
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
4621
+ "tr",
4622
+ {
4623
+ className: (0, import_clsx34.default)(
4624
+ "min-h-10",
4625
+ "transition-colors hover:bg-background-action-secondary-hover",
4626
+ row.getIsSelected() && "!bg-background-action-secondary-hover",
4627
+ isError && "!bg-background-action-critical-secondary-hover",
4628
+ showFilterRow ? "even:bg-background-grouped-primary-normal odd:bg-background-grouped-secondary-normal" : "odd:bg-background-grouped-primary-normal even:bg-background-grouped-secondary-normal"
4629
+ ),
4630
+ id: id ? `${id}-row-${row.id}` : void 0,
4631
+ "data-testid": testid ? `${testid}-row-${row.id}` : void 0,
4632
+ style: {
4633
+ display: "flex",
4634
+ position: "absolute",
4635
+ transform: `translateY(${showFilterRow ? virtualRow.start + 40 : virtualRow.start}px)`,
4636
+ width: "100%"
4637
+ },
4638
+ children: [
4639
+ !locked && virtualPaddingLeft ? (
4640
+ // fake empty column to the left for virtualization scroll padding
4641
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("td", { style: { display: "flex", width: virtualPaddingLeft } })
4642
+ ) : null,
4643
+ columns.map((column) => {
4644
+ var _a2, _b, _c, _d;
4645
+ const cell = locked ? column : visibleCells[column.index];
4646
+ if (!cell) {
4647
+ return;
4648
+ }
4649
+ const cellFormat = (_a2 = cell.column.columnDef.meta) == null ? void 0 : _a2.format;
4650
+ const cellValue = cellFormat && isValueFormatterKey(cellFormat) ? valueFormatters[cellFormat](cell.getValue()) : cell.getValue();
4651
+ const cellAlignment = (_c = (_b = cell.column.columnDef.meta) == null ? void 0 : _b.align) != null ? _c : typeof cellValue === "number" ? "right" : "left";
4652
+ return ((_d = cell.column.columnDef.meta) == null ? void 0 : _d.useCustomRenderer) ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_react34.default.Fragment, { children: (0, import_react_table3.flexRender)(cell.column.columnDef.cell, cell.getContext()) }, cell.id) : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
4653
+ CellElement,
4654
+ {
4655
+ id: id ? `${id}-row-${row.id}-cell-${cell.id}` : void 0,
4656
+ testid: testid ? `${testid}-row-${row.id}-cell-${cell.id}` : void 0,
4657
+ cell,
4658
+ className: (0, import_clsx34.default)({
4659
+ "justify-start": cellAlignment === "left",
4660
+ "justify-end": cellAlignment === "right"
4661
+ }),
4662
+ children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
4663
+ Tooltip,
4664
+ {
4665
+ id: id ? `${id}-tooltip-${cell.id}` : void 0,
4666
+ testid: testid ? `${testid}-tooltip-${cell.id}` : void 0,
4667
+ showOnTruncation: true,
4668
+ message: cellValue,
4669
+ position: "bottom",
4670
+ children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Paragraph, { addOverflow: true, tall: true, children: cellValue })
4671
+ }
4672
+ )
4673
+ },
4674
+ cell.id
4675
+ );
4676
+ }),
4677
+ !locked && virtualPaddingRight ? (
4678
+ // fake empty column to the right for virtualization scroll padding
4679
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("td", { style: { display: "flex", width: virtualPaddingRight } })
4680
+ ) : null
4681
+ ]
4682
+ },
4683
+ row.id
4684
+ );
4685
+ }
4686
+ // Annotate the CommonJS export names for ESM import in node:
4687
+ 0 && (module.exports = {
4688
+ TableBodyRow
4689
+ });