@dmsi/wedgekit-react 0.0.550 → 0.0.552

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 (180) hide show
  1. package/dist/{chunk-U3QGZAVS.js → chunk-JADOJNBI.js} +4 -4
  2. package/dist/{chunk-N2KPADIL.js → chunk-WNGFRQ4Y.js} +7 -7
  3. package/dist/{chunk-ZVY3TLXL.js → chunk-ZIPJMN2E.js} +4 -4
  4. package/dist/components/Alert.js +2 -2
  5. package/dist/components/CalendarRange.js +10 -10
  6. package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.js +10 -10
  7. package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.js +10 -10
  8. package/dist/components/DataGrid/PinnedColumns.js +10 -10
  9. package/dist/components/DataGrid/TableBody/LoadingCell.js +10 -10
  10. package/dist/components/DataGrid/TableBody/TableBodyRow.js +10 -10
  11. package/dist/components/DataGrid/TableBody/index.js +10 -10
  12. package/dist/components/DataGrid/index.js +10 -10
  13. package/dist/components/DataGrid/utils.js +10 -10
  14. package/dist/components/DateInput.js +10 -10
  15. package/dist/components/DateRangeInput.js +10 -10
  16. package/dist/components/FilterGroup.js +5 -5
  17. package/dist/components/MobileDataGrid/ColumnSelector/index.js +10 -10
  18. package/dist/components/MobileDataGrid/MobileDataGridHeader.js +10 -10
  19. package/dist/components/MobileDataGrid/RowDetailModalProvider/index.js +5 -5
  20. package/dist/components/MobileDataGrid/index.js +10 -10
  21. package/dist/components/Modal.js +4 -4
  22. package/dist/components/ModalButtons.js +2 -2
  23. package/dist/components/ModalHeader.js +2 -2
  24. package/dist/components/NavigationTab.js +2 -2
  25. package/dist/components/NavigationTabs.js +2 -2
  26. package/dist/components/NestedMenu.js +3 -3
  27. package/dist/components/Notification.js +3 -3
  28. package/dist/components/OptionPill.js +2 -2
  29. package/dist/components/PDFViewer/DownloadIcon.js +2 -2
  30. package/dist/components/PDFViewer/PDFNavigation.js +2 -2
  31. package/dist/components/PDFViewer/index.js +6 -6
  32. package/dist/components/ProductImagePreview/index.js +1 -1
  33. package/dist/components/Stepper.js +3 -3
  34. package/dist/components/Toast.js +3 -3
  35. package/dist/components/Upload.js +3 -3
  36. package/dist/components/index.js +16 -16
  37. package/package.json +8 -9
  38. package/src/brand.css +0 -125
  39. package/src/classNames.ts +0 -174
  40. package/src/components/AccessChangerTabItem.tsx +0 -71
  41. package/src/components/Accordion.tsx +0 -108
  42. package/src/components/Alert.tsx +0 -81
  43. package/src/components/Breadcrumbs.tsx +0 -142
  44. package/src/components/Button.tsx +0 -216
  45. package/src/components/CalendarRange.tsx +0 -628
  46. package/src/components/Caption.tsx +0 -144
  47. package/src/components/Card.tsx +0 -88
  48. package/src/components/Checkbox.tsx +0 -206
  49. package/src/components/CompactImagesPreview.tsx +0 -135
  50. package/src/components/ContentTab.tsx +0 -84
  51. package/src/components/ContentTabs.tsx +0 -136
  52. package/src/components/DMSiLogo.tsx +0 -33
  53. package/src/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.tsx +0 -35
  54. package/src/components/DataGrid/ColumnSelectorHeaderCell/index.tsx +0 -74
  55. package/src/components/DataGrid/PinnedColumns.tsx +0 -183
  56. package/src/components/DataGrid/TableBody/LoadingCell.tsx +0 -44
  57. package/src/components/DataGrid/TableBody/TableBodyRow.tsx +0 -157
  58. package/src/components/DataGrid/TableBody/index.tsx +0 -185
  59. package/src/components/DataGrid/index.tsx +0 -756
  60. package/src/components/DataGrid/types.ts +0 -98
  61. package/src/components/DataGrid/utils.tsx +0 -15
  62. package/src/components/DataGridCell.tsx +0 -526
  63. package/src/components/DataTable.tsx +0 -881
  64. package/src/components/DateInput.tsx +0 -306
  65. package/src/components/DateRangeInput.tsx +0 -758
  66. package/src/components/DebugJson.tsx +0 -28
  67. package/src/components/Display.tsx +0 -66
  68. package/src/components/EditingContext.tsx +0 -43
  69. package/src/components/EmptyCartIcon.tsx +0 -18
  70. package/src/components/FilterGroup.tsx +0 -264
  71. package/src/components/FullViewportBox.tsx +0 -19
  72. package/src/components/Grid.tsx +0 -97
  73. package/src/components/Heading.tsx +0 -72
  74. package/src/components/HorizontalDivider.tsx +0 -22
  75. package/src/components/Icon.tsx +0 -39
  76. package/src/components/ImagePlaceholder.tsx +0 -22
  77. package/src/components/Input.tsx +0 -609
  78. package/src/components/InputGroup.tsx +0 -59
  79. package/src/components/Label.tsx +0 -46
  80. package/src/components/Link.tsx +0 -117
  81. package/src/components/List.tsx +0 -18
  82. package/src/components/ListGroup.tsx +0 -82
  83. package/src/components/LiveChatComponent.tsx +0 -56
  84. package/src/components/LoadingScrim.tsx +0 -33
  85. package/src/components/LogoAgilityTopBar.tsx +0 -54
  86. package/src/components/LogoDMSiTopBar.tsx +0 -33
  87. package/src/components/LogoMillworkTopBar.tsx +0 -119
  88. package/src/components/MainBar.tsx +0 -91
  89. package/src/components/MaxViewportBox.tsx +0 -19
  90. package/src/components/Menu.tsx +0 -316
  91. package/src/components/MenuOption.tsx +0 -330
  92. package/src/components/MobileDataGrid/ColumnList.tsx +0 -66
  93. package/src/components/MobileDataGrid/ColumnSelector/index.tsx +0 -97
  94. package/src/components/MobileDataGrid/GridContextProvider/GridContext.tsx +0 -25
  95. package/src/components/MobileDataGrid/GridContextProvider/index.tsx +0 -132
  96. package/src/components/MobileDataGrid/GridContextProvider/useGridContext.ts +0 -10
  97. package/src/components/MobileDataGrid/MobileDataGridCard/MobileDataGridColumn.tsx +0 -27
  98. package/src/components/MobileDataGrid/MobileDataGridCard/index.tsx +0 -138
  99. package/src/components/MobileDataGrid/MobileDataGridHeader.tsx +0 -81
  100. package/src/components/MobileDataGrid/RowDetailModalProvider/ModalContent.tsx +0 -42
  101. package/src/components/MobileDataGrid/RowDetailModalProvider/index.tsx +0 -68
  102. package/src/components/MobileDataGrid/dataGridReducer.ts +0 -55
  103. package/src/components/MobileDataGrid/index.tsx +0 -92
  104. package/src/components/MobileDataGrid/types.ts +0 -4
  105. package/src/components/Modal.tsx +0 -312
  106. package/src/components/ModalButtons.tsx +0 -62
  107. package/src/components/ModalContent.tsx +0 -31
  108. package/src/components/ModalHeader.tsx +0 -78
  109. package/src/components/ModalScrim.tsx +0 -42
  110. package/src/components/NavigationTab.tsx +0 -95
  111. package/src/components/NavigationTabs.tsx +0 -70
  112. package/src/components/NestedMenu.tsx +0 -131
  113. package/src/components/Notification.tsx +0 -128
  114. package/src/components/OptionPill.tsx +0 -139
  115. package/src/components/OrderCheckIcon.tsx +0 -19
  116. package/src/components/PDFViewer/DownloadIcon.tsx +0 -25
  117. package/src/components/PDFViewer/PDFElement.tsx +0 -90
  118. package/src/components/PDFViewer/PDFNavigation.tsx +0 -68
  119. package/src/components/PDFViewer/PDFPage.tsx +0 -34
  120. package/src/components/PDFViewer/index.tsx +0 -128
  121. package/src/components/Pagination.tsx +0 -182
  122. package/src/components/Paragraph.tsx +0 -55
  123. package/src/components/Password.tsx +0 -62
  124. package/src/components/ProductImagePreview/CarouselPagination.tsx +0 -54
  125. package/src/components/ProductImagePreview/MobileImageCarousel.tsx +0 -226
  126. package/src/components/ProductImagePreview/ProductPrimaryImage.tsx +0 -219
  127. package/src/components/ProductImagePreview/Thumbnail.tsx +0 -55
  128. package/src/components/ProductImagePreview/ZoomWindow.tsx +0 -136
  129. package/src/components/ProductImagePreview/index.tsx +0 -182
  130. package/src/components/ProductImagePreview/useProductImagePreview.ts +0 -211
  131. package/src/components/ProjectBar.tsx +0 -82
  132. package/src/components/Radio.tsx +0 -146
  133. package/src/components/Search.tsx +0 -152
  134. package/src/components/SearchResultImage/index.tsx +0 -39
  135. package/src/components/Select.tsx +0 -114
  136. package/src/components/SideMenu.tsx +0 -30
  137. package/src/components/SideMenuGroup.tsx +0 -95
  138. package/src/components/SideMenuItem.tsx +0 -109
  139. package/src/components/SimpleTable.tsx +0 -77
  140. package/src/components/SkeletonParagraph.tsx +0 -31
  141. package/src/components/Spinner.tsx +0 -32
  142. package/src/components/Stack.tsx +0 -347
  143. package/src/components/StatusPill.tsx +0 -59
  144. package/src/components/Stepper.tsx +0 -128
  145. package/src/components/Subheader.tsx +0 -50
  146. package/src/components/Surface.tsx +0 -37
  147. package/src/components/Swatch.tsx +0 -1341
  148. package/src/components/Textarea.tsx +0 -102
  149. package/src/components/Theme.tsx +0 -27
  150. package/src/components/Time.tsx +0 -460
  151. package/src/components/Toast.tsx +0 -268
  152. package/src/components/Tooltip.tsx +0 -159
  153. package/src/components/TopBar.tsx +0 -139
  154. package/src/components/Upload.tsx +0 -107
  155. package/src/components/WorldpayIframe.tsx +0 -7
  156. package/src/components/index.ts +0 -34
  157. package/src/components/useMenuSystem.tsx +0 -456
  158. package/src/components/useMounted.tsx +0 -14
  159. package/src/darkmode.css +0 -278
  160. package/src/fonts.css +0 -23
  161. package/src/hooks/index.ts +0 -4
  162. package/src/hooks/useInfiniteScroll.tsx +0 -40
  163. package/src/hooks/useKeydown.ts +0 -42
  164. package/src/hooks/useMatchesMedia.ts +0 -18
  165. package/src/hooks/useTableLayout.ts +0 -106
  166. package/src/index.css +0 -800
  167. package/src/index.tsx +0 -5
  168. package/src/types.ts +0 -150
  169. package/src/utils/date.ts +0 -236
  170. package/src/utils/formatting.tsx +0 -81
  171. package/src/utils/index.ts +0 -4
  172. package/src/utils/mergeObjectArrays.ts +0 -18
  173. package/src/utils.ts +0 -24
  174. package/dist/{chunk-7FQ7PGUF.js → chunk-7COWXCPA.js} +3 -3
  175. package/dist/{chunk-NKCFYM7A.js → chunk-7SFFUICM.js} +3 -3
  176. package/dist/{chunk-25RZP3VR.js → chunk-AKJUBFJK.js} +3 -3
  177. package/dist/{chunk-TAPYQBQU.js → chunk-CMMQTIVM.js} +3 -3
  178. package/dist/{chunk-GYEXSNFP.js → chunk-FWCVZWE6.js} +3 -3
  179. package/dist/{chunk-MV6W7OMC.js → chunk-QMMPHXVE.js} +3 -3
  180. package/dist/{chunk-GG5OZTI5.js → chunk-XRE52QTN.js} +3 -3
@@ -1,185 +0,0 @@
1
- import { HeaderGroup, Row, RowData, Table } from "@tanstack/react-table";
2
- import { useVirtualizer, Virtualizer } from "@tanstack/react-virtual";
3
- import { DataGridPagination } from "../types";
4
- import { DataGridCell, DragAlongCell, Search } from "../..";
5
- import clsx from "clsx";
6
- import { TableBodyRow } from "./TableBodyRow";
7
- import { LoadingCell } from "./LoadingCell";
8
-
9
- interface TableBodyProps<TData extends RowData> {
10
- id?: string;
11
- testid?: string;
12
- columnVirtualizer?: Virtualizer<HTMLDivElement, HTMLTableCellElement>;
13
- table: Table<TData>;
14
- tableContainerRef: React.RefObject<HTMLDivElement | null>;
15
- virtualPaddingLeft?: number | undefined;
16
- virtualPaddingRight?: number | undefined;
17
- pagination: DataGridPagination | undefined;
18
- isLoadingMore: boolean;
19
- hasMore: boolean;
20
- showFilterRow: boolean;
21
- enableColumnSelector?: boolean;
22
- locked?: boolean;
23
- pinDirection?: "left" | "right";
24
- rowDisabled?: boolean;
25
- rowDisabledAccessor?: (row: TData) => boolean;
26
- }
27
- export function TableBody<T>({
28
- id,
29
- testid,
30
- columnVirtualizer,
31
- table,
32
- tableContainerRef,
33
- virtualPaddingLeft,
34
- virtualPaddingRight,
35
- pagination,
36
- isLoadingMore,
37
- hasMore,
38
- showFilterRow,
39
- enableColumnSelector = false,
40
- locked,
41
- pinDirection,
42
- rowDisabled,
43
- rowDisabledAccessor,
44
- }: TableBodyProps<T>) {
45
- const { rows } = table.getRowModel();
46
-
47
- const rowVirtualizer = useVirtualizer<HTMLDivElement, HTMLTableRowElement>({
48
- count: rows.length,
49
- estimateSize: () => 40,
50
- getScrollElement: () => tableContainerRef.current,
51
- overscan: 8,
52
- });
53
-
54
- const virtualRows = rowVirtualizer.getVirtualItems();
55
- const CellElement = locked ? DataGridCell : DragAlongCell;
56
-
57
- let headerGroups: HeaderGroup<T>[];
58
- if (pinDirection === "left") {
59
- headerGroups = table.getLeftHeaderGroups();
60
- } else if (pinDirection === "right") {
61
- headerGroups = table.getRightHeaderGroups();
62
- } else {
63
- headerGroups = table.getCenterHeaderGroups();
64
- }
65
-
66
- return (
67
- <tbody
68
- className={clsx(locked ? "shadow-16" : "")}
69
- style={{
70
- display: "grid",
71
- height: `${
72
- showFilterRow
73
- ? rowVirtualizer.getTotalSize() + 40
74
- : rowVirtualizer.getTotalSize()
75
- }px`, // tells scrollbar how big the table is
76
- position: "relative", // needed for absolute positioning of rows
77
- }}
78
- >
79
- {showFilterRow && (
80
- <tr
81
- style={{
82
- display: "flex",
83
- position: "sticky",
84
- top: "40px",
85
- width: "100%",
86
- height: "40px",
87
- zIndex: 10,
88
- }}
89
- className="even:bg-background-grouped-primary-normal odd:bg-background-grouped-secondary-normal"
90
- data-testid={testid ? `${testid}-filter-row` : undefined}
91
- >
92
- {headerGroups.flatMap((x) =>
93
- x.headers.map((header) => (
94
- <CellElement
95
- id={id ? `${id}-filter-cell-${header.id}` : undefined}
96
- testid={
97
- testid ? `${testid}-filter-cell-${header.id}` : undefined
98
- }
99
- noPadding
100
- key={header.id}
101
- cell={header}
102
- width={
103
- header.column.columnDef.meta?.headerWidth ||
104
- (locked ? `${header.column.getSize()}px` : "")
105
- }
106
- >
107
- {header.column.getCanFilter() &&
108
- (header.column.columnDef.meta?.filterRowCell?.({
109
- header,
110
- table,
111
- }) ?? (
112
- <Search
113
- id={id ? `${id}-filter-search-${header.id}` : undefined}
114
- testid={
115
- testid
116
- ? `${testid}-filter-search-${header.id}`
117
- : undefined
118
- }
119
- removeRoundness
120
- onChange={(e) =>
121
- header.column.setFilterValue(e.target.value)
122
- }
123
- value={(header.column.getFilterValue() ?? "") as string}
124
- placeholder=""
125
- removeSearchIcon
126
- />
127
- ))}
128
- </CellElement>
129
- )),
130
- )}
131
- </tr>
132
- )}
133
-
134
- {virtualRows.map((virtualRow) => {
135
- const row = rows[virtualRow.index] as Row<T>;
136
-
137
- return (
138
- <TableBodyRow
139
- id={id}
140
- testid={testid}
141
- columnVirtualizer={columnVirtualizer}
142
- key={row.id}
143
- row={row}
144
- rowVirtualizer={rowVirtualizer}
145
- virtualPaddingLeft={virtualPaddingLeft}
146
- virtualPaddingRight={virtualPaddingRight}
147
- virtualRow={virtualRow}
148
- showFilterRow={showFilterRow}
149
- enableColumnSelector={enableColumnSelector}
150
- locked={locked}
151
- pinDirection={pinDirection}
152
- disabled={
153
- rowDisabledAccessor
154
- ? rowDisabledAccessor(row.original as T)
155
- : rowDisabled
156
- }
157
- />
158
- );
159
- })}
160
-
161
- {!pagination && isLoadingMore && hasMore && (
162
- <tr
163
- style={{
164
- display: "flex",
165
- position: "absolute",
166
- width: "100%",
167
- transform: `translateY(${
168
- virtualRows[virtualRows.length - 1].start + 40
169
- }px)`,
170
- }}
171
- className="odd:bg-background-grouped-primary-normal even:bg-background-grouped-secondary-normal"
172
- >
173
- {table.getAllLeafColumns().map((column) => (
174
- <LoadingCell
175
- id={id}
176
- testid={testid}
177
- key={column.id}
178
- column={column.columnDef}
179
- />
180
- ))}
181
- </tr>
182
- )}
183
- </tbody>
184
- );
185
- }