@dmsi/wedgekit-react 0.0.140 → 0.0.142

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 (240) hide show
  1. package/dist/{chunk-4OS6APPF.js → chunk-4LXG6QNT.js} +2 -1
  2. package/dist/{chunk-KS4RDR6P.js → chunk-4NCDT5ZY.js} +21 -8
  3. package/dist/{chunk-R5TLUWDD.js → chunk-4T3DRGLF.js} +32 -30
  4. package/dist/{chunk-QZGUMB7T.js → chunk-4VTOTNKJ.js} +3 -0
  5. package/dist/{chunk-Y4HUYAI5.js → chunk-56Y5DDG3.js} +5 -2
  6. package/dist/{chunk-D2YP2BTN.js → chunk-5GOJRLQO.js} +10 -4
  7. package/dist/{chunk-J6LETUNM.js → chunk-AZ7LVLOK.js} +5 -2
  8. package/dist/{chunk-TTO4PL7Y.js → chunk-BATIOCXB.js} +7 -4
  9. package/dist/{chunk-CG2NIXZE.js → chunk-C4JGTH6G.js} +7 -3
  10. package/dist/{chunk-O4M2GISS.js → chunk-CYZL57LH.js} +5 -2
  11. package/dist/{chunk-6HIALT5L.js → chunk-E7D24OHM.js} +14 -5
  12. package/dist/{chunk-3ZUSYRI7.js → chunk-EPQLWHCL.js} +2 -2
  13. package/dist/{chunk-AY7ELVQY.js → chunk-EUXB3XKL.js} +5 -2
  14. package/dist/{chunk-6DONKNDT.js → chunk-EWGHVZL5.js} +2 -0
  15. package/dist/{chunk-VH3EJNVE.js → chunk-FFU6FB3K.js} +6 -3
  16. package/dist/{chunk-H6LXXGX6.js → chunk-FKMKHLQH.js} +6 -3
  17. package/dist/{chunk-4F6VQXKY.js → chunk-GG5JOFS6.js} +2 -1
  18. package/dist/{chunk-XCIBYDVK.js → chunk-GXSXCEAA.js} +25 -14
  19. package/dist/{chunk-VG4EPHJA.js → chunk-HVI3CL7Y.js} +6 -3
  20. package/dist/{chunk-AOELEEUS.js → chunk-I6GEUF6Y.js} +6 -3
  21. package/dist/{chunk-Z36QJ7ZF.js → chunk-J4E6Q5TM.js} +12 -9
  22. package/dist/{chunk-S5K22XTH.js → chunk-JWCT72WR.js} +5 -2
  23. package/dist/{chunk-QNQ5K7NW.js → chunk-LM5MKBPM.js} +8 -3
  24. package/dist/{chunk-EO3JJWFW.js → chunk-N6JVLYEE.js} +6 -3
  25. package/dist/{chunk-IGQVA7SC.js → chunk-NKUETCDA.js} +5 -2
  26. package/dist/{chunk-PCCJ7L3N.js → chunk-NMVSRA5Y.js} +12 -4
  27. package/dist/{chunk-X62XGQY7.js → chunk-NW2C4DL4.js} +18 -15
  28. package/dist/{chunk-OB3URVCR.js → chunk-PMBEIP24.js} +5 -1
  29. package/dist/{chunk-6UI5GABI.js → chunk-R7ELP5C5.js} +8 -5
  30. package/dist/{chunk-FWPJ73IK.js → chunk-SYEJVSE4.js} +3 -1
  31. package/dist/{chunk-WT5XXW6G.js → chunk-WFQEE2OO.js} +9 -4
  32. package/dist/{chunk-QTD7K43M.js → chunk-WSS2DFTP.js} +8 -6
  33. package/dist/{chunk-37TJJQL3.js → chunk-YR7JUKYO.js} +3 -0
  34. package/dist/{chunk-4JLU7TAC.js → chunk-ZFOANBWG.js} +3 -1
  35. package/dist/{chunk-P242H6OU.js → chunk-ZGFQN47L.js} +5 -2
  36. package/dist/components/AccessChangerTabItem.cjs +10 -4
  37. package/dist/components/AccessChangerTabItem.js +2 -2
  38. package/dist/components/Accordion.cjs +23 -11
  39. package/dist/components/Accordion.js +5 -5
  40. package/dist/components/Breadcrumbs.cjs +19 -8
  41. package/dist/components/Breadcrumbs.js +10 -5
  42. package/dist/components/Button.cjs +6 -3
  43. package/dist/components/Button.js +1 -1
  44. package/dist/components/CalendarRange.cjs +16 -5
  45. package/dist/components/CalendarRange.js +2 -2
  46. package/dist/components/Caption.cjs +18 -6
  47. package/dist/components/Caption.js +2 -2
  48. package/dist/components/Card.cjs +2 -1
  49. package/dist/components/Card.js +1 -1
  50. package/dist/components/Checkbox.cjs +18 -7
  51. package/dist/components/Checkbox.js +3 -3
  52. package/dist/components/ContentTab.cjs +22 -16
  53. package/dist/components/ContentTab.js +2 -2
  54. package/dist/components/ContentTabs.cjs +27 -18
  55. package/dist/components/ContentTabs.js +7 -4
  56. package/dist/components/DataGridCell.cjs +73 -39
  57. package/dist/components/DataGridCell.js +8 -8
  58. package/dist/components/DateInput.cjs +55 -35
  59. package/dist/components/DateInput.js +8 -4
  60. package/dist/components/DateRangeInput.cjs +55 -35
  61. package/dist/components/DateRangeInput.js +8 -4
  62. package/dist/components/Display.cjs +5 -2
  63. package/dist/components/Display.js +1 -1
  64. package/dist/components/FilterGroup.cjs +85 -44
  65. package/dist/components/FilterGroup.js +20 -10
  66. package/dist/components/FullViewportBox.cjs +3 -1
  67. package/dist/components/FullViewportBox.js +3 -1
  68. package/dist/components/Grid.cjs +3 -1
  69. package/dist/components/Grid.js +3 -1
  70. package/dist/components/Heading.cjs +5 -2
  71. package/dist/components/Heading.js +1 -1
  72. package/dist/components/HorizontalDivider.cjs +2 -2
  73. package/dist/components/HorizontalDivider.js +1 -1
  74. package/dist/components/Icon.cjs +5 -2
  75. package/dist/components/Icon.js +1 -1
  76. package/dist/components/Input.cjs +40 -32
  77. package/dist/components/Input.js +3 -3
  78. package/dist/components/InputGroup.cjs +11 -4
  79. package/dist/components/InputGroup.js +7 -3
  80. package/dist/components/Label.cjs +5 -2
  81. package/dist/components/Label.js +1 -1
  82. package/dist/components/Link.cjs +6 -3
  83. package/dist/components/Link.js +1 -1
  84. package/dist/components/List.cjs +3 -2
  85. package/dist/components/List.js +3 -2
  86. package/dist/components/LoadingScrim.cjs +4 -2
  87. package/dist/components/LoadingScrim.js +3 -2
  88. package/dist/components/MainBar.cjs +2 -0
  89. package/dist/components/MainBar.js +2 -0
  90. package/dist/components/Menu.cjs +3 -0
  91. package/dist/components/Menu.js +1 -1
  92. package/dist/components/MenuOption.cjs +19 -7
  93. package/dist/components/MenuOption.js +4 -4
  94. package/dist/components/MobileDataGrid.cjs +42 -18
  95. package/dist/components/MobileDataGrid.js +18 -11
  96. package/dist/components/Modal.cjs +38 -12
  97. package/dist/components/Modal.js +8 -8
  98. package/dist/components/ModalButtons.cjs +16 -6
  99. package/dist/components/ModalButtons.js +3 -3
  100. package/dist/components/ModalContent.cjs +3 -1
  101. package/dist/components/ModalContent.js +1 -1
  102. package/dist/components/ModalHeader.cjs +21 -9
  103. package/dist/components/ModalHeader.js +4 -4
  104. package/dist/components/ModalScrim.cjs +3 -1
  105. package/dist/components/ModalScrim.js +1 -1
  106. package/dist/components/NavigationTab.cjs +14 -5
  107. package/dist/components/NavigationTab.js +3 -3
  108. package/dist/components/NavigationTabs.cjs +17 -6
  109. package/dist/components/NavigationTabs.js +6 -4
  110. package/dist/components/NestedMenu.cjs +23 -9
  111. package/dist/components/NestedMenu.js +8 -6
  112. package/dist/components/Notification.cjs +32 -13
  113. package/dist/components/Notification.js +9 -5
  114. package/dist/components/OptionPill.cjs +21 -7
  115. package/dist/components/OptionPill.js +4 -4
  116. package/dist/components/PDFViewer.cjs +73 -29
  117. package/dist/components/PDFViewer.js +26 -20
  118. package/dist/components/Paragraph.cjs +6 -3
  119. package/dist/components/Paragraph.js +1 -1
  120. package/dist/components/Password.cjs +50 -37
  121. package/dist/components/Password.js +13 -8
  122. package/dist/components/PaymentOnAccountModal.cjs +135 -69
  123. package/dist/components/PaymentOnAccountModal.js +21 -21
  124. package/dist/components/ProjectBar.cjs +3 -1
  125. package/dist/components/ProjectBar.js +3 -1
  126. package/dist/components/Radio.cjs +12 -6
  127. package/dist/components/Radio.js +2 -2
  128. package/dist/components/Search.cjs +44 -32
  129. package/dist/components/Search.js +4 -4
  130. package/dist/components/Select.cjs +43 -32
  131. package/dist/components/Select.js +4 -4
  132. package/dist/components/SelectPaymentMethod.cjs +67 -29
  133. package/dist/components/SelectPaymentMethod.js +12 -12
  134. package/dist/components/SideMenu.cjs +3 -1
  135. package/dist/components/SideMenu.js +3 -1
  136. package/dist/components/SideMenuGroup.cjs +19 -8
  137. package/dist/components/SideMenuGroup.js +6 -4
  138. package/dist/components/SideMenuItem.cjs +15 -6
  139. package/dist/components/SideMenuItem.js +5 -2
  140. package/dist/components/Spinner.cjs +2 -1
  141. package/dist/components/Spinner.js +1 -1
  142. package/dist/components/Stack.cjs +6 -3
  143. package/dist/components/Stack.js +1 -1
  144. package/dist/components/StatusPill.cjs +12 -6
  145. package/dist/components/StatusPill.js +8 -5
  146. package/dist/components/Stepper.cjs +54 -38
  147. package/dist/components/Stepper.js +12 -7
  148. package/dist/components/Subheader.cjs +5 -2
  149. package/dist/components/Subheader.js +1 -1
  150. package/dist/components/Swatch.cjs +22 -10
  151. package/dist/components/Swatch.js +4 -4
  152. package/dist/components/Textarea.cjs +4 -1
  153. package/dist/components/Textarea.js +4 -1
  154. package/dist/components/Theme.cjs +2 -0
  155. package/dist/components/Theme.js +1 -1
  156. package/dist/components/Time.cjs +52 -36
  157. package/dist/components/Time.js +10 -5
  158. package/dist/components/Toast.cjs +29 -12
  159. package/dist/components/Toast.js +11 -6
  160. package/dist/components/Tooltip.cjs +3 -0
  161. package/dist/components/Tooltip.js +1 -1
  162. package/dist/components/TopBar.cjs +11 -4
  163. package/dist/components/TopBar.js +11 -4
  164. package/dist/components/Upload.cjs +30 -15
  165. package/dist/components/Upload.js +16 -10
  166. package/dist/components/index.cjs +221 -84
  167. package/dist/components/index.js +80 -38
  168. package/dist/index.css +24 -4
  169. package/package.json +1 -1
  170. package/src/components/Accordion.tsx +5 -2
  171. package/src/components/Breadcrumbs.tsx +9 -2
  172. package/src/components/Button.tsx +4 -1
  173. package/src/components/CalendarRange.tsx +9 -0
  174. package/src/components/Caption.tsx +11 -1
  175. package/src/components/Card.tsx +3 -2
  176. package/src/components/Checkbox.tsx +5 -0
  177. package/src/components/ContentTab.tsx +14 -12
  178. package/src/components/ContentTabs.tsx +6 -2
  179. package/src/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.tsx +4 -1
  180. package/src/components/DataGrid/ColumnSelectorHeaderCell/index.tsx +7 -0
  181. package/src/components/DataGrid/PinnedColumns.tsx +8 -1
  182. package/src/components/DataGrid/TableBody/LoadingCell.tsx +7 -3
  183. package/src/components/DataGrid/TableBody/TableBodyRow.tsx +7 -1
  184. package/src/components/DataGrid/TableBody/index.tsx +7 -1
  185. package/src/components/DataGrid/index.tsx +18 -2
  186. package/src/components/DataGrid/types.ts +1 -0
  187. package/src/components/DataGridCell.tsx +12 -0
  188. package/src/components/DateInput.tsx +4 -0
  189. package/src/components/DateRangeInput.tsx +4 -0
  190. package/src/components/Display.tsx +3 -0
  191. package/src/components/FilterGroup.tsx +10 -0
  192. package/src/components/FullViewportBox.tsx +3 -0
  193. package/src/components/Grid.tsx +3 -0
  194. package/src/components/Heading.tsx +3 -0
  195. package/src/components/HorizontalDivider.tsx +2 -2
  196. package/src/components/Icon.tsx +3 -0
  197. package/src/components/Input.tsx +32 -36
  198. package/src/components/InputGroup.tsx +6 -2
  199. package/src/components/Label.tsx +3 -0
  200. package/src/components/Link.tsx +3 -0
  201. package/src/components/List.tsx +3 -1
  202. package/src/components/LoadingScrim.tsx +2 -1
  203. package/src/components/MainBar.tsx +3 -0
  204. package/src/components/Menu.tsx +3 -0
  205. package/src/components/MenuOption.tsx +4 -0
  206. package/src/components/MobileDataGrid.tsx +12 -3
  207. package/src/components/Modal.tsx +7 -0
  208. package/src/components/ModalButtons.tsx +5 -0
  209. package/src/components/ModalContent.tsx +3 -0
  210. package/src/components/ModalHeader.tsx +5 -1
  211. package/src/components/ModalScrim.tsx +3 -0
  212. package/src/components/NavigationTab.tsx +3 -0
  213. package/src/components/NavigationTabs.tsx +7 -3
  214. package/src/components/NestedMenu.tsx +5 -2
  215. package/src/components/Notification.tsx +4 -0
  216. package/src/components/OptionPill.tsx +5 -0
  217. package/src/components/PDFViewer.tsx +16 -8
  218. package/src/components/Paragraph.tsx +3 -0
  219. package/src/components/Password.tsx +7 -2
  220. package/src/components/PaymentOnAccountModal.tsx +6 -2
  221. package/src/components/ProjectBar.tsx +3 -0
  222. package/src/components/Radio.tsx +4 -1
  223. package/src/components/Search.tsx +5 -0
  224. package/src/components/Select.tsx +4 -0
  225. package/src/components/SelectPaymentMethod.tsx +17 -3
  226. package/src/components/SideMenu.tsx +3 -0
  227. package/src/components/SideMenuGroup.tsx +4 -1
  228. package/src/components/SideMenuItem.tsx +4 -0
  229. package/src/components/Spinner.tsx +3 -1
  230. package/src/components/Stack.tsx +3 -0
  231. package/src/components/StatusPill.tsx +4 -1
  232. package/src/components/Stepper.tsx +6 -1
  233. package/src/components/Subheader.tsx +3 -0
  234. package/src/components/Textarea.tsx +4 -1
  235. package/src/components/Theme.tsx +3 -0
  236. package/src/components/Time.tsx +7 -1
  237. package/src/components/Toast.tsx +8 -3
  238. package/src/components/Tooltip.tsx +4 -0
  239. package/src/components/TopBar.tsx +7 -2
  240. package/src/components/Upload.tsx +10 -4
@@ -1,73 +1,73 @@
1
1
  import {
2
2
  Tooltip
3
- } from "../chunk-QZGUMB7T.js";
3
+ } from "../chunk-4VTOTNKJ.js";
4
4
  import {
5
5
  Select
6
- } from "../chunk-Y4HUYAI5.js";
6
+ } from "../chunk-56Y5DDG3.js";
7
7
  import {
8
8
  PaymentOnAccountModal
9
- } from "../chunk-Z36QJ7ZF.js";
10
- import "../chunk-XCIBYDVK.js";
11
- import "../chunk-TTO4PL7Y.js";
12
- import "../chunk-D2YP2BTN.js";
9
+ } from "../chunk-J4E6Q5TM.js";
10
+ import "../chunk-GXSXCEAA.js";
11
+ import "../chunk-BATIOCXB.js";
12
+ import "../chunk-5GOJRLQO.js";
13
13
  import "../chunk-4RJKB7LC.js";
14
- import "../chunk-CG2NIXZE.js";
15
- import "../chunk-FWPJ73IK.js";
16
- import "../chunk-6UI5GABI.js";
17
- import "../chunk-4JLU7TAC.js";
18
- import "../chunk-4F6VQXKY.js";
19
- import "../chunk-J6LETUNM.js";
20
- import "../chunk-3ZUSYRI7.js";
14
+ import "../chunk-C4JGTH6G.js";
15
+ import "../chunk-SYEJVSE4.js";
16
+ import "../chunk-R7ELP5C5.js";
17
+ import "../chunk-ZFOANBWG.js";
18
+ import "../chunk-GG5JOFS6.js";
19
+ import "../chunk-AZ7LVLOK.js";
20
+ import "../chunk-EPQLWHCL.js";
21
21
  import {
22
22
  Checkbox
23
- } from "../chunk-WT5XXW6G.js";
23
+ } from "../chunk-WFQEE2OO.js";
24
24
  import {
25
25
  DataCellHeader,
26
26
  DataGridCell,
27
27
  DragAlongCell,
28
28
  DraggableCellHeader
29
- } from "../chunk-KS4RDR6P.js";
29
+ } from "../chunk-4NCDT5ZY.js";
30
30
  import {
31
31
  Menu
32
- } from "../chunk-37TJJQL3.js";
32
+ } from "../chunk-YR7JUKYO.js";
33
33
  import "../chunk-5GUW4DUY.js";
34
34
  import {
35
35
  MenuOption
36
- } from "../chunk-VH3EJNVE.js";
36
+ } from "../chunk-FFU6FB3K.js";
37
37
  import {
38
38
  useInfiniteScroll
39
39
  } from "../chunk-WNQ53SVY.js";
40
40
  import "../chunk-4T7F5BZZ.js";
41
41
  import {
42
42
  Search
43
- } from "../chunk-OB3URVCR.js";
43
+ } from "../chunk-PMBEIP24.js";
44
44
  import {
45
45
  Input
46
- } from "../chunk-R5TLUWDD.js";
46
+ } from "../chunk-4T3DRGLF.js";
47
47
  import "../chunk-5UH6QUFB.js";
48
48
  import {
49
49
  Label
50
- } from "../chunk-S5K22XTH.js";
50
+ } from "../chunk-JWCT72WR.js";
51
51
  import "../chunk-WVUIIBRR.js";
52
52
  import {
53
53
  Subheader
54
- } from "../chunk-O4M2GISS.js";
54
+ } from "../chunk-CYZL57LH.js";
55
55
  import {
56
56
  Accordion
57
- } from "../chunk-QTD7K43M.js";
58
- import "../chunk-EO3JJWFW.js";
57
+ } from "../chunk-WSS2DFTP.js";
58
+ import "../chunk-N6JVLYEE.js";
59
59
  import {
60
60
  Card
61
- } from "../chunk-4OS6APPF.js";
61
+ } from "../chunk-4LXG6QNT.js";
62
62
  import {
63
63
  Paragraph
64
- } from "../chunk-VG4EPHJA.js";
64
+ } from "../chunk-HVI3CL7Y.js";
65
65
  import {
66
66
  Button
67
- } from "../chunk-H6LXXGX6.js";
67
+ } from "../chunk-FKMKHLQH.js";
68
68
  import {
69
69
  Icon
70
- } from "../chunk-IGQVA7SC.js";
70
+ } from "../chunk-NKUETCDA.js";
71
71
  import {
72
72
  componentGap,
73
73
  componentPadding
@@ -138,6 +138,7 @@ import React from "react";
138
138
  import { jsx as jsx2, jsxs } from "react/jsx-runtime";
139
139
  function TableBodyRow({
140
140
  id,
141
+ testid,
141
142
  columnVirtualizer,
142
143
  row,
143
144
  // rowVirtualizer,
@@ -169,6 +170,8 @@ function TableBodyRow({
169
170
  isError && "!bg-background-action-critical-secondary-hover",
170
171
  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"
171
172
  ),
173
+ id: id ? `${id}-row-${row.id}` : void 0,
174
+ "data-testid": testid ? `${testid}-row-${row.id}` : void 0,
172
175
  style: {
173
176
  display: "flex",
174
177
  position: "absolute",
@@ -190,7 +193,8 @@ function TableBodyRow({
190
193
  return ((_a2 = cell.column.columnDef.meta) == null ? void 0 : _a2.useCustomRenderer) ? /* @__PURE__ */ jsx2(React.Fragment, { children: flexRender(cell.column.columnDef.cell, cell.getContext()) }, cell.id) : /* @__PURE__ */ jsx2(
191
194
  CellElement,
192
195
  {
193
- id: id ? `${id}-cell-${cell.id}` : void 0,
196
+ id: id ? `${id}-row-${row.id}-cell-${cell.id}` : void 0,
197
+ testid: testid ? `${testid}-row-${row.id}-cell-${cell.id}` : void 0,
194
198
  cell,
195
199
  className: clsx2({
196
200
  "justify-end": typeof cellValue === "number"
@@ -200,6 +204,7 @@ function TableBodyRow({
200
204
  Tooltip,
201
205
  {
202
206
  id: id ? `${id}-tooltip-${cell.id}` : void 0,
207
+ testid: testid ? `${testid}-tooltip-${cell.id}` : void 0,
203
208
  showOnTruncation: true,
204
209
  message: cellValue,
205
210
  position: "bottom",
@@ -225,22 +230,25 @@ function TableBodyRow({
225
230
  import { jsx as jsx3 } from "react/jsx-runtime";
226
231
  function LoadingCell({
227
232
  id,
233
+ testid,
228
234
  column
229
235
  }) {
230
236
  const key = `loading-${column.id}`;
231
237
  if (column.cell === "checkbox") {
232
- return /* @__PURE__ */ jsx3(DataGridCell, { id: id ? `${id}-${key}` : void 0, children: /* @__PURE__ */ jsx3(Checkbox, { id: id ? `${id}-${key}-checkbox` : void 0, disabled: true }) }, key);
238
+ return /* @__PURE__ */ jsx3(DataGridCell, { id: id ? `${id}-${key}` : void 0, testid: testid ? `${testid}-${key}` : void 0, children: /* @__PURE__ */ jsx3(Checkbox, { id: id ? `${id}-${key}-checkbox` : void 0, testid: testid ? `${testid}-${key}-checkbox` : void 0, disabled: true }) }, key);
233
239
  }
234
240
  if (column.cell === "input") {
235
241
  return /* @__PURE__ */ jsx3(
236
242
  DataGridCell,
237
243
  {
238
244
  id: id ? `${id}-${key}` : void 0,
245
+ testid: testid ? `${testid}-${key}` : void 0,
239
246
  component: "input",
240
247
  children: /* @__PURE__ */ jsx3(
241
248
  Input,
242
249
  {
243
250
  id: id ? `${id}-${key}-input` : void 0,
251
+ testid: testid ? `${testid}-${key}-input` : void 0,
244
252
  align: "left",
245
253
  disabled: true,
246
254
  wrapperClassName: "!rounded-none !border-0"
@@ -250,13 +258,14 @@ function LoadingCell({
250
258
  key
251
259
  );
252
260
  }
253
- return /* @__PURE__ */ jsx3(DataGridCell, { id: id ? `${id}-${key}` : void 0, children: /* @__PURE__ */ jsx3("div", { className: "bg-linear-270 to-neutral-300/[24%] from-neutral-300/[12%] rounded-xs w-full max-w-25 h-6" }) }, key);
261
+ return /* @__PURE__ */ jsx3(DataGridCell, { id: id ? `${id}-${key}` : void 0, testid: testid ? `${testid}-${key}` : void 0, children: /* @__PURE__ */ jsx3("div", { className: "bg-linear-270 to-neutral-300/[24%] from-neutral-300/[12%] rounded-xs w-full max-w-25 h-6" }) }, key);
254
262
  }
255
263
 
256
264
  // src/components/DataGrid/TableBody/index.tsx
257
265
  import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
258
266
  function TableBody({
259
267
  id,
268
+ testid,
260
269
  columnVirtualizer,
261
270
  table,
262
271
  tableContainerRef,
@@ -311,6 +320,7 @@ function TableBody({
311
320
  zIndex: 10
312
321
  },
313
322
  className: "even:bg-background-grouped-primary-normal odd:bg-background-grouped-secondary-normal",
323
+ "data-testid": testid ? `${testid}-filter-row` : void 0,
314
324
  children: headerGroups.flatMap(
315
325
  (x) => x.headers.map((header) => {
316
326
  var _a, _b, _c, _d, _e;
@@ -318,6 +328,7 @@ function TableBody({
318
328
  CellElement,
319
329
  {
320
330
  id: id ? `${id}-filter-cell-${header.id}` : void 0,
331
+ testid: testid ? `${testid}-filter-cell-${header.id}` : void 0,
321
332
  noPadding: true,
322
333
  cell: header,
323
334
  width: ((_a = header.column.columnDef.meta) == null ? void 0 : _a.headerWidth) || (locked ? `${header.column.getSize()}px` : ""),
@@ -328,6 +339,7 @@ function TableBody({
328
339
  Search,
329
340
  {
330
341
  id: id ? `${id}-filter-search-${header.id}` : void 0,
342
+ testid: testid ? `${testid}-filter-search-${header.id}` : void 0,
331
343
  removeRoundness: true,
332
344
  onChange: (e) => header.column.setFilterValue(e.target.value),
333
345
  value: (_d = header.column.getFilterValue()) != null ? _d : "",
@@ -348,6 +360,7 @@ function TableBody({
348
360
  TableBodyRow,
349
361
  {
350
362
  id,
363
+ testid,
351
364
  columnVirtualizer,
352
365
  row,
353
366
  rowVirtualizer,
@@ -372,7 +385,7 @@ function TableBody({
372
385
  transform: `translateY(${virtualRows[virtualRows.length - 1].start + 40}px)`
373
386
  },
374
387
  className: "odd:bg-background-grouped-primary-normal even:bg-background-grouped-secondary-normal",
375
- children: table.getAllLeafColumns().map((column) => /* @__PURE__ */ jsx4(LoadingCell, { id, column: column.columnDef }, column.id))
388
+ children: table.getAllLeafColumns().map((column) => /* @__PURE__ */ jsx4(LoadingCell, { id, testid, column: column.columnDef }, column.id))
376
389
  }
377
390
  )
378
391
  ]
@@ -389,17 +402,20 @@ function PinnedColumns(_a) {
389
402
  centerHeader,
390
403
  allSelectedAcrossPages,
391
404
  someSelectedAcrossPages,
392
- toggleSelectAllAcrossPages
405
+ toggleSelectAllAcrossPages,
406
+ testid
393
407
  } = _b, props = __objRest(_b, [
394
408
  "pinDirection",
395
409
  "table",
396
410
  "centerHeader",
397
411
  "allSelectedAcrossPages",
398
412
  "someSelectedAcrossPages",
399
- "toggleSelectAllAcrossPages"
413
+ "toggleSelectAllAcrossPages",
414
+ "testid"
400
415
  ]);
401
416
  var _a2;
402
417
  const headerGroups = pinDirection === "left" ? table.getLeftHeaderGroups() : table.getRightHeaderGroups();
418
+ const pinnedTestId = testid ? `${pinDirection}-pinned-${testid}` : void 0;
403
419
  return ((_a2 = headerGroups[0]) == null ? void 0 : _a2.headers.length) > 0 && /* @__PURE__ */ jsxs3(
404
420
  "table",
405
421
  {
@@ -407,9 +423,10 @@ function PinnedColumns(_a) {
407
423
  "flex flex-col min-h-min sticky z-20",
408
424
  pinDirection === "left" ? "left-0" : "right-0"
409
425
  ),
426
+ "data-testid": pinnedTestId,
410
427
  children: [
411
428
  /* @__PURE__ */ jsx5("thead", { className: "sticky top-0 z-20 grid", children: headerGroups.map((headerGroup) => {
412
- return /* @__PURE__ */ jsx5("tr", { className: "flex w-full", children: headerGroup.headers.map((header) => {
429
+ return /* @__PURE__ */ jsx5("tr", { "data-testid": pinnedTestId ? `${pinnedTestId}-header-row-${headerGroup.id}` : void 0, className: "flex w-full", children: headerGroup.headers.map((header) => {
413
430
  var _a3, _b2, _c;
414
431
  if (!header) {
415
432
  return;
@@ -420,6 +437,7 @@ function PinnedColumns(_a) {
420
437
  DataCellHeader,
421
438
  {
422
439
  locked: true,
440
+ testid: pinnedTestId ? `${pinnedTestId}-header-${header.id}` : void 0,
423
441
  header,
424
442
  center: centerHeader,
425
443
  width: customHeaderWidth,
@@ -473,7 +491,9 @@ function PinnedColumns(_a) {
473
491
  }) }),
474
492
  /* @__PURE__ */ jsx5(
475
493
  TableBody,
476
- __spreadProps(__spreadValues({}, props), {
494
+ __spreadProps(__spreadValues({
495
+ testid: pinnedTestId
496
+ }, props), {
477
497
  table,
478
498
  locked: true,
479
499
  pinDirection
@@ -492,15 +512,17 @@ import { useState } from "react";
492
512
  import { jsx as jsx6 } from "react/jsx-runtime";
493
513
  function ColumnSelectorMenuOption({
494
514
  id,
515
+ testid,
495
516
  column,
496
517
  toggleColumnVisibility
497
518
  }) {
498
519
  const [isVisible, setIsVisible] = useState(column.getIsVisible());
499
520
  const label = typeof column.columnDef.header === "string" ? column.columnDef.header : null;
500
- return /* @__PURE__ */ jsx6(MenuOption, { id, selected: isVisible, defaultChecked: isVisible, children: /* @__PURE__ */ jsx6(
521
+ return /* @__PURE__ */ jsx6(MenuOption, { id, testid, selected: isVisible, defaultChecked: isVisible, children: /* @__PURE__ */ jsx6(
501
522
  Checkbox,
502
523
  {
503
524
  id: id ? `${id}-checkbox` : void 0,
525
+ testid: testid ? `${testid}-checkbox` : void 0,
504
526
  label: label != null ? label : "Unknown",
505
527
  checked: isVisible,
506
528
  onChange: (e) => {
@@ -515,6 +537,7 @@ function ColumnSelectorMenuOption({
515
537
  import { jsx as jsx7, jsxs as jsxs4 } from "react/jsx-runtime";
516
538
  function ColumnSelectorHeaderCell({
517
539
  id,
540
+ testid,
518
541
  table,
519
542
  toggleColumnVisibility,
520
543
  resetColumnVisibility
@@ -525,6 +548,7 @@ function ColumnSelectorHeaderCell({
525
548
  DataGridCell,
526
549
  {
527
550
  id,
551
+ testid,
528
552
  width: "48",
529
553
  type: "header",
530
554
  color: "text-secondary-normal",
@@ -534,6 +558,7 @@ function ColumnSelectorHeaderCell({
534
558
  Button,
535
559
  {
536
560
  id: id ? `${id}-button` : void 0,
561
+ testid: testid ? `${testid}-button` : void 0,
537
562
  onClick: () => setShow((prev) => !prev),
538
563
  variant: "navigation",
539
564
  iconOnly: true,
@@ -544,6 +569,7 @@ function ColumnSelectorHeaderCell({
544
569
  Menu,
545
570
  {
546
571
  id: id ? `${id}-menu` : void 0,
572
+ testid: testid ? `${testid}-menu` : void 0,
547
573
  positionTo: ref,
548
574
  position: "bottom-right",
549
575
  show,
@@ -553,6 +579,7 @@ function ColumnSelectorHeaderCell({
553
579
  Button,
554
580
  {
555
581
  id: id ? `${id}-reset-button` : void 0,
582
+ testid: testid ? `${testid}-reset-button` : void 0,
556
583
  variant: "tertiary",
557
584
  onClick: () => {
558
585
  resetColumnVisibility();
@@ -568,6 +595,7 @@ function ColumnSelectorHeaderCell({
568
595
  ColumnSelectorMenuOption,
569
596
  {
570
597
  id: id ? `${id}-option-${column.id}` : void 0,
598
+ testid: testid ? `${testid}-option-${column.id}` : void 0,
571
599
  column,
572
600
  toggleColumnVisibility
573
601
  },
@@ -587,6 +615,7 @@ var PAGE_SIZE_OPTIONS = [5, 10, 15, 20, 25, 30, 35];
587
615
  var NO_RESULTS_HEIGHT = "h-[120px]";
588
616
  function DataGrid({
589
617
  id,
618
+ testid,
590
619
  data,
591
620
  columns,
592
621
  status,
@@ -793,6 +822,7 @@ function DataGrid({
793
822
  "div",
794
823
  {
795
824
  id,
825
+ "data-testid": testid,
796
826
  className: "flex flex-col flex-1 h-full w-full rounded border border-border-primary-normal overflow-hidden text-text-primary-normal",
797
827
  children: [
798
828
  /* @__PURE__ */ jsxs5(
@@ -807,6 +837,7 @@ function DataGrid({
807
837
  /* @__PURE__ */ jsx8(
808
838
  PinnedColumns,
809
839
  {
840
+ testid,
810
841
  pinDirection: "left",
811
842
  table,
812
843
  tableContainerRef: containerRef,
@@ -818,7 +849,7 @@ function DataGrid({
818
849
  }
819
850
  ),
820
851
  /* @__PURE__ */ jsxs5("table", { className: "flex-1 flex flex-col min-h-min", children: [
821
- /* @__PURE__ */ jsx8("thead", { className: "sticky top-0 z-10 grid", children: table.getCenterHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsxs5("tr", { className: "flex w-full", children: [
852
+ /* @__PURE__ */ jsx8("thead", { className: "sticky top-0 z-10 grid", children: table.getCenterHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsxs5("tr", { "data-testid": testid ? `${testid}-header-row-${headerGroup.id}` : void 0, className: "flex w-full", children: [
822
853
  virtualPaddingLeft ? (
823
854
  // fake empty column to the left for virtualization scroll padding
824
855
  /* @__PURE__ */ jsx8(
@@ -841,6 +872,7 @@ function DataGrid({
841
872
  DraggableCellHeader,
842
873
  {
843
874
  id: id ? `${id}-header-${header.id}` : void 0,
875
+ testid: testid ? `${testid}-header-${header.id}` : void 0,
844
876
  header,
845
877
  locked: (_c2 = header.column.columnDef.meta) == null ? void 0 : _c2.locked,
846
878
  center: centerHeader,
@@ -889,6 +921,7 @@ function DataGrid({
889
921
  DataGridCell,
890
922
  {
891
923
  id: id ? `${id}-header-${header.id}` : void 0,
924
+ testid: testid ? `${testid}-header-${header.id}` : void 0,
892
925
  type: "header",
893
926
  component: "checkbox",
894
927
  locked: true,
@@ -896,6 +929,7 @@ function DataGrid({
896
929
  Checkbox,
897
930
  {
898
931
  id: id ? `${id}-select-all-checkbox` : void 0,
932
+ testid: testid ? `${testid}-select-all-checkbox` : void 0,
899
933
  checked: allSelectedAcrossPages,
900
934
  indeterminate: someSelectedAcrossPages,
901
935
  onChange: toggleSelectAllAcrossPages
@@ -920,6 +954,7 @@ function DataGrid({
920
954
  ColumnSelectorHeaderCell,
921
955
  {
922
956
  id: id ? `${id}-column-selector` : void 0,
957
+ testid: testid ? `${testid}-column-selector` : void 0,
923
958
  table,
924
959
  toggleColumnVisibility,
925
960
  resetColumnVisibility
@@ -930,6 +965,7 @@ function DataGrid({
930
965
  TableBody,
931
966
  {
932
967
  id,
968
+ testid,
933
969
  columnVirtualizer,
934
970
  table,
935
971
  tableContainerRef: containerRef,
@@ -946,6 +982,7 @@ function DataGrid({
946
982
  /* @__PURE__ */ jsx8(
947
983
  PinnedColumns,
948
984
  {
985
+ testid,
949
986
  pinDirection: "right",
950
987
  table,
951
988
  tableContainerRef: containerRef,
@@ -968,6 +1005,7 @@ function DataGrid({
968
1005
  componentGap,
969
1006
  componentPadding
970
1007
  ),
1008
+ "data-testid": testid ? `${testid}-no-results` : void 0,
971
1009
  children: [
972
1010
  /* @__PURE__ */ jsx8(Subheader, { color: "text-secondary-normal", children: "No Results" }),
973
1011
  /* @__PURE__ */ jsx8(Paragraph, { color: "text-secondary-normal", children: "To view results, enter or update your search criteria." })
@@ -981,6 +1019,7 @@ function DataGrid({
981
1019
  Select,
982
1020
  {
983
1021
  id: id ? `${id}-pagesize-select` : void 0,
1022
+ testid: testid ? `${testid}-pagesize-select` : void 0,
984
1023
  wrapperClassName: "!w-20",
985
1024
  value: pagination.pageSize.toString(),
986
1025
  onChange: (e) => {
@@ -991,6 +1030,7 @@ function DataGrid({
991
1030
  Menu,
992
1031
  __spreadProps(__spreadValues({}, props), {
993
1032
  id: id ? `${id}-pagesize-menu` : void 0,
1033
+ testid: testid ? `${testid}-pagesize-menu` : void 0,
994
1034
  children: PAGE_SIZE_OPTIONS.map((option) => /* @__PURE__ */ jsx8(
995
1035
  MenuOption,
996
1036
  {
@@ -1015,6 +1055,7 @@ function DataGrid({
1015
1055
  Button,
1016
1056
  {
1017
1057
  id: id ? `${id}-prev-page-button` : void 0,
1058
+ testid: testid ? `${testid}-prev-page-button` : void 0,
1018
1059
  iconOnly: true,
1019
1060
  leftIcon: /* @__PURE__ */ jsx8(Icon, { name: "chevron_left" }),
1020
1061
  onClick: () => pagination.onPageChange(pagination.pageIndex - 1),
@@ -1038,6 +1079,7 @@ function DataGrid({
1038
1079
  Button,
1039
1080
  {
1040
1081
  id: id ? `${id}-next-page-button` : void 0,
1082
+ testid: testid ? `${testid}-next-page-button` : void 0,
1041
1083
  iconOnly: true,
1042
1084
  leftIcon: /* @__PURE__ */ jsx8(Icon, { name: "chevron_right" }),
1043
1085
  onClick: () => pagination.onPageChange(pagination.pageIndex + 1),
@@ -1047,7 +1089,7 @@ function DataGrid({
1047
1089
  )
1048
1090
  ] })
1049
1091
  ] }),
1050
- status && /* @__PURE__ */ jsx8(Paragraph, { children: status })
1092
+ status && /* @__PURE__ */ jsx8(Paragraph, { testid: testid ? `${testid}-status-text` : void 0, children: status })
1051
1093
  ] })
1052
1094
  ]
1053
1095
  }
package/dist/index.css CHANGED
@@ -2073,6 +2073,9 @@
2073
2073
  .\!text-text-primary-error {
2074
2074
  color: var(--color-text-primary-error) !important;
2075
2075
  }
2076
+ .\!text-text-secondary-normal {
2077
+ color: var(--color-text-secondary-normal) !important;
2078
+ }
2076
2079
  .text-action-400 {
2077
2080
  color: var(--color-action-400);
2078
2081
  }
@@ -2536,6 +2539,13 @@
2536
2539
  }
2537
2540
  }
2538
2541
  }
2542
+ .peer-hover\:bg-border-action-hover {
2543
+ &:is(:where(.peer):hover ~ *) {
2544
+ @media (hover: hover) {
2545
+ background-color: var(--color-border-action-hover);
2546
+ }
2547
+ }
2548
+ }
2539
2549
  .peer-hover\:text-icon-action-critical-secondary-hover {
2540
2550
  &:is(:where(.peer):hover ~ *) {
2541
2551
  @media (hover: hover) {
@@ -2615,6 +2625,11 @@
2615
2625
  background-color: var(--color-background-action-secondary-active);
2616
2626
  }
2617
2627
  }
2628
+ .peer-active\:bg-border-action-active {
2629
+ &:is(:where(.peer):active ~ *) {
2630
+ background-color: var(--color-border-action-active);
2631
+ }
2632
+ }
2618
2633
  .peer-active\:text-icon-action-critical-secondary-active {
2619
2634
  &:is(:where(.peer):active ~ *) {
2620
2635
  color: var(--color-icon-action-critical-secondary-active);
@@ -2863,17 +2878,17 @@
2863
2878
  }
2864
2879
  }
2865
2880
  }
2866
- .hover\:bg-border-action-hover {
2881
+ .hover\:\!text-brand-text-on-action-primary-hover {
2867
2882
  &:hover {
2868
2883
  @media (hover: hover) {
2869
- background-color: var(--color-border-action-hover);
2884
+ color: var(--color-brand-text-on-action-primary-hover) !important;
2870
2885
  }
2871
2886
  }
2872
2887
  }
2873
- .hover\:\!text-brand-text-on-action-primary-hover {
2888
+ .hover\:\!text-text-action-primary-hover {
2874
2889
  &:hover {
2875
2890
  @media (hover: hover) {
2876
- color: var(--color-brand-text-on-action-primary-hover) !important;
2891
+ color: var(--color-text-action-primary-hover) !important;
2877
2892
  }
2878
2893
  }
2879
2894
  }
@@ -3163,6 +3178,11 @@
3163
3178
  color: var(--color-brand-text-on-action-primary-active) !important;
3164
3179
  }
3165
3180
  }
3181
+ .active\:\!text-text-action-primary-active {
3182
+ &:active {
3183
+ color: var(--color-text-action-primary-active) !important;
3184
+ }
3185
+ }
3166
3186
  .active\:\!text-text-on-action-primary-active {
3167
3187
  &:active {
3168
3188
  color: var(--color-text-on-action-primary-active) !important;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dmsi/wedgekit-react",
3
3
  "private": false,
4
- "version": "0.0.140",
4
+ "version": "0.0.142",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "build": "tsup",
@@ -16,10 +16,11 @@ interface AccordionProps {
16
16
  onClick?: () => void;
17
17
  className?: string;
18
18
  disabled?: boolean;
19
+ testid?: string;
19
20
  }
20
21
 
21
22
  export function Accordion(props: AccordionProps) {
22
- const { isOpen, onClick, className, disabled } = props;
23
+ const { isOpen, onClick, className, disabled, testid } = props;
23
24
  const {
24
25
  title,
25
26
  before,
@@ -50,12 +51,13 @@ export function Accordion(props: AccordionProps) {
50
51
  )}
51
52
  selected={isOpen}
52
53
  onClick={handleClick}
54
+ testid={testid}
53
55
  >
54
56
  <Stack sizing="component" horizontal justify="between" items="center">
55
57
  <Stack sizing="layout-group" horizontal items="center">
56
58
  {before}
57
59
  {typeof title === "string" ? (
58
- <Paragraph className="text-text-primary-normal">{title}</Paragraph>
60
+ <Paragraph testid={testid ? `${testid}-title` : undefined} className="text-text-primary-normal">{title}</Paragraph>
59
61
  ) : (
60
62
  title
61
63
  )}
@@ -67,6 +69,7 @@ export function Accordion(props: AccordionProps) {
67
69
  style={{
68
70
  gridTemplateRows: isOpen ? "1fr" : "0fr",
69
71
  }}
72
+ data-testid={testid ? `${testid}-content-container` : undefined}
70
73
  >
71
74
  <div className="overflow-hidden">
72
75
  <div
@@ -10,6 +10,7 @@ type BreadcrumbsProps = {
10
10
  path?: string; // Optional override for SSR / testing
11
11
  crumbs: BreadcrumbProps[];
12
12
  id?: string;
13
+ testid?: string;
13
14
  };
14
15
 
15
16
  type BreadcrumbProps = {
@@ -17,6 +18,7 @@ type BreadcrumbProps = {
17
18
  children: React.ReactNode;
18
19
  onClick?: () => void; // Optional click handler
19
20
  id?: string;
21
+ testid?: string;
20
22
  };
21
23
 
22
24
  export const Breadcrumb = ({
@@ -24,6 +26,7 @@ export const Breadcrumb = ({
24
26
  children,
25
27
  onClick,
26
28
  id,
29
+ testid
27
30
  }: BreadcrumbProps) => {
28
31
  const linkPadding = clsx(
29
32
  "!text-text-link-normal whitespace-nowrap",
@@ -33,9 +36,10 @@ export const Breadcrumb = ({
33
36
  );
34
37
 
35
38
  return (
36
- <li key={href} id={id} className="flex items-center">
39
+ <li key={href} id={id} data-testid={testid} className="flex items-center">
37
40
  <Link
38
41
  id={id ? `${id}-link` : undefined}
42
+ data-testid={testid ? `${testid}-link` : undefined}
39
43
  className={linkPadding}
40
44
  href={href}
41
45
  onClick={onClick}
@@ -52,7 +56,7 @@ const Chevron = () => (
52
56
  </li>
53
57
  );
54
58
 
55
- export const Breadcrumbs = ({ asCardStyle, id, crumbs }: BreadcrumbsProps) => {
59
+ export const Breadcrumbs = ({ asCardStyle, id, testid, crumbs }: BreadcrumbsProps) => {
56
60
  const scrollableElement = React.useRef<HTMLElement | null>(null);
57
61
  const [isOverflow, setIsOverflow] = useState(false);
58
62
 
@@ -78,6 +82,7 @@ export const Breadcrumbs = ({ asCardStyle, id, crumbs }: BreadcrumbsProps) => {
78
82
  return (
79
83
  <nav
80
84
  id={id}
85
+ data-testid={testid}
81
86
  className={clsx(
82
87
  "relative select-none flex items-center max-w-full w-full",
83
88
  {
@@ -97,6 +102,7 @@ export const Breadcrumbs = ({ asCardStyle, id, crumbs }: BreadcrumbsProps) => {
97
102
 
98
103
  <ol
99
104
  id={id ? `${id}-list` : undefined}
105
+ data-testid={testid ? `${testid}-list` : undefined}
100
106
  className="flex items-center overflow-x-scroll"
101
107
  style={{ scrollbarWidth: "none" }}
102
108
  onScroll={updateOverflow}
@@ -114,6 +120,7 @@ export const Breadcrumbs = ({ asCardStyle, id, crumbs }: BreadcrumbsProps) => {
114
120
  href={href}
115
121
  onClick={onClick}
116
122
  id={id ? `${id}-crumb-${index}` : undefined}
123
+ testid={testid ? `${testid}-crumb-${index}` : undefined}
117
124
  >
118
125
  {children}
119
126
  </Breadcrumb>
@@ -32,6 +32,7 @@ type BaseButtonProps = Omit<
32
32
  colorClassName?: string;
33
33
  href?: string;
34
34
  id?: string;
35
+ testid?: string;
35
36
  };
36
37
 
37
38
  // At least one of leftIcon, rightIcon, or children must be provided
@@ -56,6 +57,7 @@ export const Button = ({
56
57
  colorClassName,
57
58
  href,
58
59
  id,
60
+ testid,
59
61
  ...props
60
62
  }: AsProps<Tags> & ButtonProps) => {
61
63
  const primaryVariantStyles =
@@ -189,6 +191,7 @@ export const Button = ({
189
191
  return (
190
192
  <Element
191
193
  id={id}
194
+ data-testid={testid}
192
195
  type={Element === "button" ? "button" : undefined}
193
196
  className={buttonClasses}
194
197
  {...props}
@@ -200,7 +203,7 @@ export const Button = ({
200
203
  {leftIcon && leftIcon}
201
204
 
202
205
  {!iconOnly && children && (
203
- <span id={id ? `${id}-label` : undefined} className={labelClasses}>
206
+ <span id={id ? `${id}-label` : undefined} data-testid={testid ? `${testid}-label` : undefined} className={labelClasses}>
204
207
  {children}
205
208
  </span>
206
209
  )}