@salt-ds/data-grid 0.0.0-snapshot-20230920133053 → 0.0.0-snapshot-20240719143459

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 (259) hide show
  1. package/dist-cjs/BaseCell.js +8 -8
  2. package/dist-cjs/BaseCell.js.map +1 -1
  3. package/dist-cjs/CellEditor.js.map +1 -1
  4. package/dist-cjs/{internal/Cell.css.js → CellFrame.css.js} +1 -1
  5. package/dist-cjs/CellFrame.css.js.map +1 -0
  6. package/dist-cjs/{internal/Cell.js → CellFrame.js} +9 -9
  7. package/dist-cjs/CellFrame.js.map +1 -0
  8. package/dist-cjs/ColumnDataContext.js +1 -1
  9. package/dist-cjs/ColumnDataContext.js.map +1 -1
  10. package/dist-cjs/ColumnDragContext.js +1 -1
  11. package/dist-cjs/ColumnDragContext.js.map +1 -1
  12. package/dist-cjs/ColumnGroup.js +1 -1
  13. package/dist-cjs/ColumnGroup.js.map +1 -1
  14. package/dist-cjs/ColumnSortContext.js +1 -1
  15. package/dist-cjs/ColumnSortContext.js.map +1 -1
  16. package/dist-cjs/CornerTag.js +1 -1
  17. package/dist-cjs/CornerTag.js.map +1 -1
  18. package/dist-cjs/CursorContext.js +1 -1
  19. package/dist-cjs/CursorContext.js.map +1 -1
  20. package/dist-cjs/DropdownCellEditor.js +5 -21
  21. package/dist-cjs/DropdownCellEditor.js.map +1 -1
  22. package/dist-cjs/EditorContext.js +1 -1
  23. package/dist-cjs/EditorContext.js.map +1 -1
  24. package/dist-cjs/Grid.css.js +1 -1
  25. package/dist-cjs/Grid.js +36 -42
  26. package/dist-cjs/Grid.js.map +1 -1
  27. package/dist-cjs/GridColumn.js.map +1 -1
  28. package/dist-cjs/GridContext.js +1 -1
  29. package/dist-cjs/GridContext.js.map +1 -1
  30. package/dist-cjs/GroupHeaderCell.js +2 -2
  31. package/dist-cjs/GroupHeaderCell.js.map +1 -1
  32. package/dist-cjs/GroupHeaderCellValue.js.map +1 -1
  33. package/dist-cjs/HeaderCell.css.js +1 -1
  34. package/dist-cjs/HeaderCell.js +10 -10
  35. package/dist-cjs/HeaderCell.js.map +1 -1
  36. package/dist-cjs/HeaderCellValue.js.map +1 -1
  37. package/dist-cjs/LayoutContext.js.map +1 -1
  38. package/dist-cjs/NumericColumn.js +6 -23
  39. package/dist-cjs/NumericColumn.js.map +1 -1
  40. package/dist-cjs/RowSelectionCheckboxCellValue.js +2 -2
  41. package/dist-cjs/RowSelectionCheckboxCellValue.js.map +1 -1
  42. package/dist-cjs/RowSelectionCheckboxColumn.js +3 -3
  43. package/dist-cjs/RowSelectionCheckboxColumn.js.map +1 -1
  44. package/dist-cjs/RowSelectionCheckboxHeaderCellValue.js +2 -2
  45. package/dist-cjs/RowSelectionCheckboxHeaderCellValue.js.map +1 -1
  46. package/dist-cjs/RowSelectionRadioCellValue.js +1 -1
  47. package/dist-cjs/RowSelectionRadioCellValue.js.map +1 -1
  48. package/dist-cjs/RowSelectionRadioColumn.js +2 -2
  49. package/dist-cjs/RowSelectionRadioColumn.js.map +1 -1
  50. package/dist-cjs/RowSelectionRadioHeaderCell.js +1 -1
  51. package/dist-cjs/RowSelectionRadioHeaderCell.js.map +1 -1
  52. package/dist-cjs/RowValidationStatus.js.map +1 -1
  53. package/dist-cjs/SelectionContext.js +1 -1
  54. package/dist-cjs/SelectionContext.js.map +1 -1
  55. package/dist-cjs/SizingContext.js +1 -1
  56. package/dist-cjs/SizingContext.js.map +1 -1
  57. package/dist-cjs/TextCellEditor.js +5 -21
  58. package/dist-cjs/TextCellEditor.js.map +1 -1
  59. package/dist-cjs/index.js +5 -0
  60. package/dist-cjs/index.js.map +1 -1
  61. package/dist-cjs/internal/CellMeasure.js +2 -2
  62. package/dist-cjs/internal/CellMeasure.js.map +1 -1
  63. package/dist-cjs/internal/ColumnDropTarget.js +2 -2
  64. package/dist-cjs/internal/ColumnDropTarget.js.map +1 -1
  65. package/dist-cjs/internal/ColumnGhost.js +3 -3
  66. package/dist-cjs/internal/ColumnGhost.js.map +1 -1
  67. package/dist-cjs/internal/Cursor.js +2 -2
  68. package/dist-cjs/internal/Cursor.js.map +1 -1
  69. package/dist-cjs/internal/DefaultCellValue.js +2 -2
  70. package/dist-cjs/internal/DefaultCellValue.js.map +1 -1
  71. package/dist-cjs/internal/FakeCell.js +3 -3
  72. package/dist-cjs/internal/FakeCell.js.map +1 -1
  73. package/dist-cjs/internal/GroupHeaderRow.js +1 -1
  74. package/dist-cjs/internal/GroupHeaderRow.js.map +1 -1
  75. package/dist-cjs/internal/HeaderRow.js +2 -2
  76. package/dist-cjs/internal/HeaderRow.js.map +1 -1
  77. package/dist-cjs/internal/LeftPart.js +4 -4
  78. package/dist-cjs/internal/LeftPart.js.map +1 -1
  79. package/dist-cjs/internal/MiddlePart.js +3 -3
  80. package/dist-cjs/internal/MiddlePart.js.map +1 -1
  81. package/dist-cjs/internal/RightPart.js +3 -3
  82. package/dist-cjs/internal/RightPart.js.map +1 -1
  83. package/dist-cjs/internal/Scrollable.js +2 -2
  84. package/dist-cjs/internal/Scrollable.js.map +1 -1
  85. package/dist-cjs/internal/TableBody.js +6 -6
  86. package/dist-cjs/internal/TableBody.js.map +1 -1
  87. package/dist-cjs/internal/TableColGroup.js.map +1 -1
  88. package/dist-cjs/internal/TableRow.js +9 -9
  89. package/dist-cjs/internal/TableRow.js.map +1 -1
  90. package/dist-cjs/internal/TopLeftPart.js +3 -3
  91. package/dist-cjs/internal/TopLeftPart.js.map +1 -1
  92. package/dist-cjs/internal/TopPart.js +3 -3
  93. package/dist-cjs/internal/TopPart.js.map +1 -1
  94. package/dist-cjs/internal/TopRightPart.js +3 -3
  95. package/dist-cjs/internal/TopRightPart.js.map +1 -1
  96. package/dist-cjs/internal/gridHooks.js +23 -23
  97. package/dist-cjs/internal/gridHooks.js.map +1 -1
  98. package/dist-cjs/internal/utils.js +5 -5
  99. package/dist-cjs/internal/utils.js.map +1 -1
  100. package/dist-es/BaseCell.js +8 -8
  101. package/dist-es/BaseCell.js.map +1 -1
  102. package/dist-es/CellEditor.js.map +1 -1
  103. package/dist-es/{internal/Cell.css.js → CellFrame.css.js} +1 -1
  104. package/dist-es/CellFrame.css.js.map +1 -0
  105. package/dist-es/{internal/Cell.js → CellFrame.js} +8 -8
  106. package/dist-es/CellFrame.js.map +1 -0
  107. package/dist-es/ColumnDataContext.js +1 -1
  108. package/dist-es/ColumnDataContext.js.map +1 -1
  109. package/dist-es/ColumnDragContext.js +1 -1
  110. package/dist-es/ColumnDragContext.js.map +1 -1
  111. package/dist-es/ColumnGroup.js +1 -1
  112. package/dist-es/ColumnGroup.js.map +1 -1
  113. package/dist-es/ColumnSortContext.js +1 -1
  114. package/dist-es/ColumnSortContext.js.map +1 -1
  115. package/dist-es/CornerTag.js +1 -1
  116. package/dist-es/CornerTag.js.map +1 -1
  117. package/dist-es/CursorContext.js +1 -1
  118. package/dist-es/CursorContext.js.map +1 -1
  119. package/dist-es/DropdownCellEditor.js +5 -21
  120. package/dist-es/DropdownCellEditor.js.map +1 -1
  121. package/dist-es/EditorContext.js +1 -1
  122. package/dist-es/EditorContext.js.map +1 -1
  123. package/dist-es/Grid.css.js +1 -1
  124. package/dist-es/Grid.js +36 -42
  125. package/dist-es/Grid.js.map +1 -1
  126. package/dist-es/GridColumn.js.map +1 -1
  127. package/dist-es/GridContext.js +1 -1
  128. package/dist-es/GridContext.js.map +1 -1
  129. package/dist-es/GroupHeaderCell.js +2 -2
  130. package/dist-es/GroupHeaderCell.js.map +1 -1
  131. package/dist-es/GroupHeaderCellValue.js.map +1 -1
  132. package/dist-es/HeaderCell.css.js +1 -1
  133. package/dist-es/HeaderCell.js +10 -10
  134. package/dist-es/HeaderCell.js.map +1 -1
  135. package/dist-es/HeaderCellValue.js.map +1 -1
  136. package/dist-es/LayoutContext.js.map +1 -1
  137. package/dist-es/NumericColumn.js +6 -23
  138. package/dist-es/NumericColumn.js.map +1 -1
  139. package/dist-es/RowSelectionCheckboxCellValue.js +2 -2
  140. package/dist-es/RowSelectionCheckboxCellValue.js.map +1 -1
  141. package/dist-es/RowSelectionCheckboxColumn.js +3 -3
  142. package/dist-es/RowSelectionCheckboxColumn.js.map +1 -1
  143. package/dist-es/RowSelectionCheckboxHeaderCellValue.js +2 -2
  144. package/dist-es/RowSelectionCheckboxHeaderCellValue.js.map +1 -1
  145. package/dist-es/RowSelectionRadioCellValue.js +1 -1
  146. package/dist-es/RowSelectionRadioCellValue.js.map +1 -1
  147. package/dist-es/RowSelectionRadioColumn.js +2 -2
  148. package/dist-es/RowSelectionRadioColumn.js.map +1 -1
  149. package/dist-es/RowSelectionRadioHeaderCell.js +1 -1
  150. package/dist-es/RowSelectionRadioHeaderCell.js.map +1 -1
  151. package/dist-es/RowValidationStatus.js.map +1 -1
  152. package/dist-es/SelectionContext.js +1 -1
  153. package/dist-es/SelectionContext.js.map +1 -1
  154. package/dist-es/SizingContext.js +1 -1
  155. package/dist-es/SizingContext.js.map +1 -1
  156. package/dist-es/TextCellEditor.js +5 -21
  157. package/dist-es/TextCellEditor.js.map +1 -1
  158. package/dist-es/index.js +2 -0
  159. package/dist-es/index.js.map +1 -1
  160. package/dist-es/internal/CellMeasure.js +2 -2
  161. package/dist-es/internal/CellMeasure.js.map +1 -1
  162. package/dist-es/internal/ColumnDropTarget.js +2 -2
  163. package/dist-es/internal/ColumnDropTarget.js.map +1 -1
  164. package/dist-es/internal/ColumnGhost.js +3 -3
  165. package/dist-es/internal/ColumnGhost.js.map +1 -1
  166. package/dist-es/internal/Cursor.js +2 -2
  167. package/dist-es/internal/Cursor.js.map +1 -1
  168. package/dist-es/internal/DefaultCellValue.js +2 -2
  169. package/dist-es/internal/DefaultCellValue.js.map +1 -1
  170. package/dist-es/internal/FakeCell.js +3 -3
  171. package/dist-es/internal/FakeCell.js.map +1 -1
  172. package/dist-es/internal/GroupHeaderRow.js +1 -1
  173. package/dist-es/internal/GroupHeaderRow.js.map +1 -1
  174. package/dist-es/internal/HeaderRow.js +2 -2
  175. package/dist-es/internal/HeaderRow.js.map +1 -1
  176. package/dist-es/internal/LeftPart.js +4 -4
  177. package/dist-es/internal/LeftPart.js.map +1 -1
  178. package/dist-es/internal/MiddlePart.js +3 -3
  179. package/dist-es/internal/MiddlePart.js.map +1 -1
  180. package/dist-es/internal/RightPart.js +3 -3
  181. package/dist-es/internal/RightPart.js.map +1 -1
  182. package/dist-es/internal/Scrollable.js +2 -2
  183. package/dist-es/internal/Scrollable.js.map +1 -1
  184. package/dist-es/internal/TableBody.js +6 -6
  185. package/dist-es/internal/TableBody.js.map +1 -1
  186. package/dist-es/internal/TableColGroup.js.map +1 -1
  187. package/dist-es/internal/TableRow.js +9 -9
  188. package/dist-es/internal/TableRow.js.map +1 -1
  189. package/dist-es/internal/TopLeftPart.js +3 -3
  190. package/dist-es/internal/TopLeftPart.js.map +1 -1
  191. package/dist-es/internal/TopPart.js +3 -3
  192. package/dist-es/internal/TopPart.js.map +1 -1
  193. package/dist-es/internal/TopRightPart.js +3 -3
  194. package/dist-es/internal/TopRightPart.js.map +1 -1
  195. package/dist-es/internal/gridHooks.js +23 -23
  196. package/dist-es/internal/gridHooks.js.map +1 -1
  197. package/dist-es/internal/utils.js +5 -5
  198. package/dist-es/internal/utils.js.map +1 -1
  199. package/dist-types/BaseCell.d.ts +3 -4
  200. package/dist-types/CellEditor.d.ts +1 -1
  201. package/dist-types/CellFrame.d.ts +9 -0
  202. package/dist-types/ColumnDataContext.d.ts +0 -1
  203. package/dist-types/ColumnDragContext.d.ts +1 -1
  204. package/dist-types/ColumnGroup.d.ts +4 -4
  205. package/dist-types/ColumnSortContext.d.ts +5 -5
  206. package/dist-types/CornerTag.d.ts +1 -2
  207. package/dist-types/CursorContext.d.ts +0 -1
  208. package/dist-types/DropdownCellEditor.d.ts +2 -3
  209. package/dist-types/EditorContext.d.ts +0 -1
  210. package/dist-types/Grid.d.ts +4 -4
  211. package/dist-types/GridColumn.d.ts +3 -3
  212. package/dist-types/GridContext.d.ts +2 -3
  213. package/dist-types/GroupHeaderCell.d.ts +3 -3
  214. package/dist-types/GroupHeaderCellValue.d.ts +2 -3
  215. package/dist-types/HeaderCell.d.ts +5 -6
  216. package/dist-types/HeaderCellValue.d.ts +2 -3
  217. package/dist-types/LayoutContext.d.ts +0 -1
  218. package/dist-types/NumericColumn.d.ts +6 -6
  219. package/dist-types/RowSelectionCheckboxCellValue.d.ts +2 -3
  220. package/dist-types/RowSelectionCheckboxColumn.d.ts +2 -3
  221. package/dist-types/RowSelectionCheckboxHeaderCellValue.d.ts +2 -3
  222. package/dist-types/RowSelectionRadioCellValue.d.ts +2 -3
  223. package/dist-types/RowSelectionRadioColumn.d.ts +2 -3
  224. package/dist-types/RowSelectionRadioHeaderCell.d.ts +2 -3
  225. package/dist-types/RowValidationStatus.d.ts +2 -3
  226. package/dist-types/SelectionContext.d.ts +1 -2
  227. package/dist-types/SizingContext.d.ts +3 -3
  228. package/dist-types/TextCellEditor.d.ts +2 -3
  229. package/dist-types/index.d.ts +2 -0
  230. package/dist-types/internal/CellMeasure.d.ts +1 -2
  231. package/dist-types/internal/CellStatusIcons.d.ts +3 -4
  232. package/dist-types/internal/ColumnDropTarget.d.ts +1 -2
  233. package/dist-types/internal/ColumnGhost.d.ts +3 -4
  234. package/dist-types/internal/Cursor.d.ts +1 -4
  235. package/dist-types/internal/DefaultCellValue.d.ts +2 -3
  236. package/dist-types/internal/FakeCell.d.ts +2 -3
  237. package/dist-types/internal/FakeGroupCell.d.ts +1 -2
  238. package/dist-types/internal/FakeHeaderCell.d.ts +1 -2
  239. package/dist-types/internal/GroupHeaderRow.d.ts +2 -3
  240. package/dist-types/internal/HeaderRow.d.ts +2 -3
  241. package/dist-types/internal/LeftPart.d.ts +4 -4
  242. package/dist-types/internal/MiddlePart.d.ts +4 -4
  243. package/dist-types/internal/RightPart.d.ts +4 -4
  244. package/dist-types/internal/Scrollable.d.ts +2 -2
  245. package/dist-types/internal/TableBody.d.ts +3 -4
  246. package/dist-types/internal/TableColGroup.d.ts +3 -4
  247. package/dist-types/internal/TableRow.d.ts +4 -4
  248. package/dist-types/internal/TopLeftPart.d.ts +2 -3
  249. package/dist-types/internal/TopPart.d.ts +3 -3
  250. package/dist-types/internal/TopRightPart.d.ts +2 -3
  251. package/dist-types/internal/gridHooks.d.ts +13 -13
  252. package/dist-types/internal/index.d.ts +0 -1
  253. package/dist-types/internal/utils.d.ts +1 -1
  254. package/package.json +5 -6
  255. package/dist-cjs/internal/Cell.css.js.map +0 -1
  256. package/dist-cjs/internal/Cell.js.map +0 -1
  257. package/dist-es/internal/Cell.css.js.map +0 -1
  258. package/dist-es/internal/Cell.js.map +0 -1
  259. package/dist-types/internal/Cell.d.ts +0 -8
@@ -1,14 +1,14 @@
1
- import { ReactNode } from "react";
2
- import { GridCellValueProps, GridColumnProps } from "./GridColumn";
3
- import { GridColumnModel, GridRowModel } from "./Grid";
1
+ import { type ReactNode } from "react";
2
+ import type { GridColumnModel, GridRowModel } from "./Grid";
3
+ import { type GridCellValueProps, type GridColumnProps } from "./GridColumn";
4
4
  export interface NumericColumnProps<T> extends GridColumnProps<T> {
5
5
  precision: number;
6
6
  }
7
- export declare function NumericCellValue<T>(props: GridCellValueProps<T>): JSX.Element;
7
+ export declare function NumericCellValue<T>(props: GridCellValueProps<T>): import("react/jsx-runtime").JSX.Element;
8
8
  export interface NumericEditorProps<T> {
9
9
  row?: GridRowModel<T>;
10
10
  column?: GridColumnModel<T>;
11
11
  children?: ReactNode;
12
12
  }
13
- export declare function NumericCellEditor<T>(props: NumericEditorProps<T>): JSX.Element;
14
- export declare function NumericColumn<T>(props: NumericColumnProps<T>): JSX.Element;
13
+ export declare function NumericCellEditor<T>(props: NumericEditorProps<T>): import("react/jsx-runtime").JSX.Element;
14
+ export declare function NumericColumn<T>(props: NumericColumnProps<T>): import("react/jsx-runtime").JSX.Element;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
- import { GridCellValueProps } from "./GridColumn";
3
- export declare function RowSelectionCheckboxCellValue<T>(props: GridCellValueProps<T>): JSX.Element;
1
+ import type { GridCellValueProps } from "./GridColumn";
2
+ export declare function RowSelectionCheckboxCellValue<T>(props: GridCellValueProps<T>): import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
- import { GridColumnProps } from "./GridColumn";
1
+ import { type GridColumnProps } from "./GridColumn";
3
2
  export declare type RowSelectionCheckboxColumnProps<T> = Omit<GridColumnProps<T>, "width" | "name">;
4
- export declare function RowSelectionCheckboxColumn<T>(props: RowSelectionCheckboxColumnProps<T>): JSX.Element;
3
+ export declare function RowSelectionCheckboxColumn<T>(props: RowSelectionCheckboxColumnProps<T>): import("react/jsx-runtime").JSX.Element;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
- import { GridHeaderValueProps } from "./GridColumn";
3
- export declare function RowSelectionCheckboxHeaderCellValue<T>(props: GridHeaderValueProps<T>): JSX.Element;
1
+ import type { GridHeaderValueProps } from "./GridColumn";
2
+ export declare function RowSelectionCheckboxHeaderCellValue<T>(props: GridHeaderValueProps<T>): import("react/jsx-runtime").JSX.Element;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
- import { GridCellValueProps } from "./GridColumn";
3
- export declare function RowSelectionRadioCellValue<T>(props: GridCellValueProps<T>): JSX.Element;
1
+ import type { GridCellValueProps } from "./GridColumn";
2
+ export declare function RowSelectionRadioCellValue<T>(props: GridCellValueProps<T>): import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
- import { GridColumnProps } from "./GridColumn";
1
+ import { type GridColumnProps } from "./GridColumn";
3
2
  export declare type RowSelectionRadioColumnProps<T> = Omit<GridColumnProps<T>, "width" | "name">;
4
- export declare function RowSelectionRadioColumn<T>(props: RowSelectionRadioColumnProps<T>): JSX.Element;
3
+ export declare function RowSelectionRadioColumn<T>(props: RowSelectionRadioColumnProps<T>): import("react/jsx-runtime").JSX.Element;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
- import { HeaderCellProps } from "./GridColumn";
3
- export declare function RowSelectionRadioHeaderCell<T>(props: HeaderCellProps<T>): JSX.Element;
1
+ import type { HeaderCellProps } from "./GridColumn";
2
+ export declare function RowSelectionRadioHeaderCell<T>(props: HeaderCellProps<T>): import("react/jsx-runtime").JSX.Element;
@@ -1,7 +1,6 @@
1
- /// <reference types="react" />
2
- import { CellValidationState, GridColumnProps } from "./GridColumn";
1
+ import { type CellValidationState, type GridColumnProps } from "./GridColumn";
3
2
  export declare const RowValidationStatusContext: import("react").Context<{
4
3
  status?: CellValidationState | undefined;
5
4
  }>;
6
5
  export declare type RowValidationStatusColumnProps<T> = Omit<GridColumnProps<T>, "width" | "name">;
7
- export declare function RowValidationStatusColumn<T>(props: RowValidationStatusColumnProps<T>): JSX.Element;
6
+ export declare function RowValidationStatusColumn<T>(props: RowValidationStatusColumnProps<T>): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,4 @@
1
- /// <reference types="react" />
2
- import { CellRange, SelectRowsOptions } from "./internal";
1
+ import type { CellRange, SelectRowsOptions } from "./internal";
3
2
  export interface SelectionContext {
4
3
  selectedCellRange: CellRange | undefined;
5
4
  selRowIdxs: Set<number>;
@@ -1,8 +1,8 @@
1
- import React from "react";
1
+ import type { MouseEvent } from "react";
2
2
  export interface SizingContext {
3
3
  rowHeight: number;
4
4
  resizeColumn: (colIdx: number, width: number) => void;
5
- onResizeHandleMouseDown: (event: React.MouseEvent<HTMLDivElement>) => void;
5
+ onResizeHandleMouseDown: (event: MouseEvent<HTMLDivElement>) => void;
6
6
  }
7
- export declare const SizingContext: React.Context<SizingContext | undefined>;
7
+ export declare const SizingContext: import("react").Context<SizingContext | undefined>;
8
8
  export declare const useSizingContext: () => SizingContext;
@@ -1,7 +1,6 @@
1
- /// <reference types="react" />
2
- import { GridColumnModel, GridRowModel } from "./Grid";
1
+ import type { GridColumnModel, GridRowModel } from "./Grid";
3
2
  export interface TextCellEditorProps<T> {
4
3
  row?: GridRowModel<T>;
5
4
  column?: GridColumnModel<T>;
6
5
  }
7
- export declare function TextCellEditor<T>(props: TextCellEditorProps<T>): JSX.Element;
6
+ export declare function TextCellEditor<T>(props: TextCellEditorProps<T>): import("react/jsx-runtime").JSX.Element;
@@ -1,7 +1,9 @@
1
1
  export * from "./BaseCell";
2
2
  export * from "./ColumnGroup";
3
3
  export * from "./CellEditor";
4
+ export * from "./CellFrame";
4
5
  export * from "./CornerTag";
6
+ export * from "./EditorContext";
5
7
  export * from "./GroupHeaderCell";
6
8
  export * from "./GroupHeaderCellValue";
7
9
  export * from "./HeaderCell";
@@ -1,5 +1,4 @@
1
- /// <reference types="react" />
2
1
  export interface CellMeasureProps<T> {
3
2
  setRowHeight: (rowHeight: number) => void;
4
3
  }
5
- export declare function CellMeasure<T>(props: CellMeasureProps<T>): JSX.Element;
4
+ export declare function CellMeasure<T>(props: CellMeasureProps<T>): import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
- export declare const CellWarningIcon: JSX.Element;
3
- export declare const CellErrorIcon: JSX.Element;
4
- export declare const CellSuccessIcon: JSX.Element;
1
+ export declare const CellWarningIcon: import("react/jsx-runtime").JSX.Element;
2
+ export declare const CellErrorIcon: import("react/jsx-runtime").JSX.Element;
3
+ export declare const CellSuccessIcon: import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,4 @@
1
- /// <reference types="react" />
2
1
  export interface ColumnDropTargetProps {
3
2
  x?: number;
4
3
  }
5
- export declare function ColumnDropTarget(props: ColumnDropTargetProps): JSX.Element | null;
4
+ export declare function ColumnDropTarget(props: ColumnDropTargetProps): import("react/jsx-runtime").JSX.Element | null;
@@ -1,10 +1,9 @@
1
- /// <reference types="react" />
2
- import { GridColumnModel, GridRowModel } from "../Grid";
3
- import { ColumnDragState } from "./gridHooks";
1
+ import type { GridColumnModel, GridRowModel } from "../Grid";
2
+ import type { ColumnDragState } from "./gridHooks";
4
3
  export interface ColumnGhostProps<T> {
5
4
  dragState?: ColumnDragState;
6
5
  columns: GridColumnModel<T>[];
7
6
  rows: GridRowModel<T>[];
8
7
  zebra?: boolean;
9
8
  }
10
- export declare function ColumnGhost<T = any>(props: ColumnGhostProps<T>): JSX.Element | null;
9
+ export declare function ColumnGhost<T = any>(props: ColumnGhostProps<T>): import("react/jsx-runtime").JSX.Element | null;
@@ -1,4 +1 @@
1
- /// <reference types="react" />
2
- export interface CursorProps {
3
- }
4
- export declare function Cursor(props: CursorProps): JSX.Element;
1
+ export declare function Cursor(): import("react/jsx-runtime").JSX.Element;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
- import { GridCellValueProps } from "../GridColumn";
3
- export declare function DefaultCellValue<T>(props: GridCellValueProps<T>): JSX.Element;
1
+ import type { GridCellValueProps } from "../GridColumn";
2
+ export declare function DefaultCellValue<T>(props: GridCellValueProps<T>): import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
- import { GridCellProps } from "../GridColumn";
1
+ import type { GridCellProps } from "../GridColumn";
3
2
  export declare type FakeCellProps<T> = Pick<GridCellProps<T>, "row">;
4
- export declare function FakeCell<T>(props: FakeCellProps<T>): JSX.Element;
3
+ export declare function FakeCell<T>(props: FakeCellProps<T>): import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1 @@
1
- /// <reference types="react" />
2
- export declare function FakeGroupCell(): JSX.Element;
1
+ export declare function FakeGroupCell(): import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1 @@
1
- /// <reference types="react" />
2
- export declare function FakeHeaderCell(): JSX.Element;
1
+ export declare function FakeHeaderCell(): import("react/jsx-runtime").JSX.Element;
@@ -1,7 +1,6 @@
1
- /// <reference types="react" />
2
- import { GridColumnGroupModel } from "../Grid";
1
+ import type { GridColumnGroupModel } from "../Grid";
3
2
  export interface GroupHeaderRowProps<T> {
4
3
  groups: GridColumnGroupModel[];
5
4
  gap?: number;
6
5
  }
7
- export declare function GroupHeaderRow<T>(props: GroupHeaderRowProps<T>): JSX.Element | null;
6
+ export declare function GroupHeaderRow<T>(props: GroupHeaderRowProps<T>): import("react/jsx-runtime").JSX.Element | null;
@@ -1,7 +1,6 @@
1
- /// <reference types="react" />
2
- import { GridColumnModel } from "../Grid";
1
+ import type { GridColumnModel } from "../Grid";
3
2
  export interface HeaderRowProps<T> {
4
3
  columns: GridColumnModel<T>[];
5
4
  gap?: number;
6
5
  }
7
- export declare function HeaderRow<T>(props: HeaderRowProps<T>): JSX.Element;
6
+ export declare function HeaderRow<T>(props: HeaderRowProps<T>): import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,6 @@
1
- import { RefObject } from "react";
2
- import { GridColumnModel, GridRowModel } from "../Grid";
3
- import { CellValidationState } from "../GridColumn";
1
+ import type { RefObject } from "react";
2
+ import type { GridColumnModel, GridRowModel } from "../Grid";
3
+ import type { CellValidationState } from "../GridColumn";
4
4
  export interface LeftPartProps<T> {
5
5
  leftRef: RefObject<HTMLDivElement>;
6
6
  onWheel: EventListener;
@@ -12,4 +12,4 @@ export interface LeftPartProps<T> {
12
12
  zebra?: boolean;
13
13
  getRowValidationStatus?: (row: GridRowModel<T>) => CellValidationState | undefined;
14
14
  }
15
- export declare function LeftPart<T>(props: LeftPartProps<T>): JSX.Element | null;
15
+ export declare function LeftPart<T>(props: LeftPartProps<T>): import("react/jsx-runtime").JSX.Element | null;
@@ -1,6 +1,6 @@
1
- import { RefObject } from "react";
2
- import { GridColumnModel, GridRowModel } from "../Grid";
3
- import { CellValidationState } from "../GridColumn";
1
+ import type { RefObject } from "react";
2
+ import type { GridColumnModel, GridRowModel } from "../Grid";
3
+ import type { CellValidationState } from "../GridColumn";
4
4
  export interface MiddlePartProps<T> {
5
5
  middleRef: RefObject<HTMLDivElement>;
6
6
  onWheel: EventListener;
@@ -12,4 +12,4 @@ export interface MiddlePartProps<T> {
12
12
  zebra?: boolean;
13
13
  getRowValidationStatus?: (row: GridRowModel<T>) => CellValidationState | undefined;
14
14
  }
15
- export declare function MiddlePart<T>(props: MiddlePartProps<T>): JSX.Element;
15
+ export declare function MiddlePart<T>(props: MiddlePartProps<T>): import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,6 @@
1
- import { RefObject } from "react";
2
- import { CellValidationState } from "../GridColumn";
3
- import { GridColumnModel, GridRowModel } from "../Grid";
1
+ import type { RefObject } from "react";
2
+ import type { GridColumnModel, GridRowModel } from "../Grid";
3
+ import type { CellValidationState } from "../GridColumn";
4
4
  export interface RightPartProps<T> {
5
5
  rightRef: RefObject<HTMLDivElement>;
6
6
  onWheel: EventListener;
@@ -12,4 +12,4 @@ export interface RightPartProps<T> {
12
12
  zebra?: boolean;
13
13
  getRowValidationStatus?: (row: GridRowModel<T>) => CellValidationState | undefined;
14
14
  }
15
- export declare function RightPart<T>(props: RightPartProps<T>): JSX.Element | null;
15
+ export declare function RightPart<T>(props: RightPartProps<T>): import("react/jsx-runtime").JSX.Element | null;
@@ -1,4 +1,4 @@
1
- import { RefObject } from "react";
1
+ import { type RefObject } from "react";
2
2
  export interface ScrollableProps<T> {
3
3
  resizeClient: (params: {
4
4
  clientWidth: number;
@@ -17,4 +17,4 @@ export interface ScrollableProps<T> {
17
17
  rightRef: RefObject<HTMLDivElement>;
18
18
  bottomRef: RefObject<HTMLDivElement>;
19
19
  }
20
- export declare function Scrollable<T>(props: ScrollableProps<T>): JSX.Element;
20
+ export declare function Scrollable<T>(props: ScrollableProps<T>): import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,5 @@
1
- /// <reference types="react" />
2
- import { GridColumnModel, GridRowModel } from "../Grid";
3
- import { CellValidationState } from "../GridColumn";
1
+ import type { GridColumnModel, GridRowModel } from "../Grid";
2
+ import type { CellValidationState } from "../GridColumn";
4
3
  export interface TableBodyProps<T> {
5
4
  columns: GridColumnModel<T>[];
6
5
  rows: GridRowModel<T>[];
@@ -10,4 +9,4 @@ export interface TableBodyProps<T> {
10
9
  zebra?: boolean;
11
10
  getRowValidationStatus?: (row: GridRowModel<T>) => CellValidationState | undefined;
12
11
  }
13
- export declare function TableBody<T>(props: TableBodyProps<T>): JSX.Element;
12
+ export declare function TableBody<T>(props: TableBodyProps<T>): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,4 @@
1
- /// <reference types="react" />
2
- import { GridColumnModel } from "../Grid";
1
+ import type { GridColumnModel } from "../Grid";
3
2
  export interface TableColGroupProps<T> {
4
3
  columns: GridColumnModel<T>[];
5
4
  gap?: number;
@@ -7,5 +6,5 @@ export interface TableColGroupProps<T> {
7
6
  export interface TableColProps<T> {
8
7
  width: number;
9
8
  }
10
- export declare function TableColGroup<T>(props: TableColGroupProps<T>): JSX.Element;
11
- export declare function TableCol<T>(props: TableColProps<T>): JSX.Element;
9
+ export declare function TableColGroup<T>(props: TableColGroupProps<T>): import("react/jsx-runtime").JSX.Element;
10
+ export declare function TableCol<T>(props: TableColProps<T>): import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,6 @@
1
- import { MouseEventHandler } from "react";
2
- import { GridColumnModel, GridRowModel } from "../Grid";
3
- import { CellValidationState } from "../GridColumn";
1
+ import { type MouseEventHandler } from "react";
2
+ import type { GridColumnModel, GridRowModel } from "../Grid";
3
+ import type { CellValidationState } from "../GridColumn";
4
4
  export interface TableRowProps<T> {
5
5
  row: GridRowModel<T>;
6
6
  isSelected?: boolean;
@@ -16,4 +16,4 @@ export interface TableRowProps<T> {
16
16
  headerIsFocusable?: boolean;
17
17
  validationStatus?: CellValidationState;
18
18
  }
19
- export declare function TableRow<T>(props: TableRowProps<T>): JSX.Element;
19
+ export declare function TableRow<T>(props: TableRowProps<T>): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,4 @@
1
- /// <reference types="react" />
2
- import { GridColumnGroupModel, GridColumnModel } from "../Grid";
1
+ import type { GridColumnGroupModel, GridColumnModel } from "../Grid";
3
2
  export interface TopLeftPartProps<T> {
4
3
  onWheel: EventListener;
5
4
  columns: GridColumnModel<T>[];
@@ -7,4 +6,4 @@ export interface TopLeftPartProps<T> {
7
6
  rightShadow?: boolean;
8
7
  bottomShadow?: boolean;
9
8
  }
10
- export declare function TopLeftPart<T>(props: TopLeftPartProps<T>): JSX.Element | null;
9
+ export declare function TopLeftPart<T>(props: TopLeftPartProps<T>): import("react/jsx-runtime").JSX.Element | null;
@@ -1,5 +1,5 @@
1
- import { RefObject } from "react";
2
- import { GridColumnGroupModel, GridColumnModel } from "../Grid";
1
+ import type { RefObject } from "react";
2
+ import type { GridColumnGroupModel, GridColumnModel } from "../Grid";
3
3
  export interface TopPartProps<T> {
4
4
  topRef: RefObject<HTMLDivElement>;
5
5
  onWheel: EventListener;
@@ -8,4 +8,4 @@ export interface TopPartProps<T> {
8
8
  midGap: number;
9
9
  bottomShadow?: boolean;
10
10
  }
11
- export declare function TopPart<T>(props: TopPartProps<T>): JSX.Element;
11
+ export declare function TopPart<T>(props: TopPartProps<T>): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,4 @@
1
- /// <reference types="react" />
2
- import { GridColumnGroupModel, GridColumnModel } from "../Grid";
1
+ import type { GridColumnGroupModel, GridColumnModel } from "../Grid";
3
2
  export interface TopRightPartProps<T> {
4
3
  onWheel: EventListener;
5
4
  columns: GridColumnModel<T>[];
@@ -7,4 +6,4 @@ export interface TopRightPartProps<T> {
7
6
  leftShadow?: boolean;
8
7
  bottomShadow?: boolean;
9
8
  }
10
- export declare function TopRightPart<T>(props: TopRightPartProps<T>): JSX.Element | null;
9
+ export declare function TopRightPart<T>(props: TopRightPartProps<T>): import("react/jsx-runtime").JSX.Element | null;
@@ -1,11 +1,11 @@
1
- import React, { ReactNode, RefObject } from "react";
2
- import { GridCellSelectionMode, GridColumnGroupModel, GridColumnModel, GridColumnMoveHandler, GridRowModel, GridRowSelectionMode, RowKeyGetter } from "../Grid";
3
- import { ColumnGroupProps } from "../ColumnGroup";
1
+ import { type FocusEventHandler, type MouseEventHandler, type MouseEvent as ReactMouseEvent, type ReactNode, type RefObject } from "react";
2
+ import type { ColumnGroupProps } from "../ColumnGroup";
3
+ import type { FocusedPart } from "../CursorContext";
4
+ import type { GridCellSelectionMode, GridColumnGroupModel, GridColumnModel, GridColumnMoveHandler, GridRowModel, GridRowSelectionMode, RowKeyGetter } from "../Grid";
5
+ import type { GridColumnInfo } from "../GridColumn";
6
+ import type { GridContext } from "../GridContext";
4
7
  import { NumberRange } from "../NumberRange";
5
- import { GridColumnInfo } from "../GridColumn";
6
- import { GridContext } from "../GridContext";
7
- import { FocusedPart } from "../CursorContext";
8
- export declare function useActiveOnWheel(onWheel: EventListener): React.RefObject<HTMLTableElement>;
8
+ export declare function useActiveOnWheel(onWheel: EventListener): RefObject<HTMLTableElement>;
9
9
  export declare function useSumWidth<T>(columns: GridColumnModel<T>[]): number;
10
10
  export declare function useSum(source: number[]): number;
11
11
  export declare function useSumRangeWidth<T>(columns: GridColumnModel<T>[], range: NumberRange): number;
@@ -25,7 +25,7 @@ export declare function last<T>(source: T[]): T;
25
25
  export declare function useHeadVisibleColumnRange<T>(bodyVisColRng: NumberRange, visColGrps: GridColumnGroupModel[], midColsById: Map<string, GridColumnModel<T>>, leftColCount: number): NumberRange;
26
26
  export declare function useCols<T>(colInfos: GridColumnInfo<T>[], startIdx: number, groups: GridColumnGroupModel[]): GridColumnModel<T>[];
27
27
  export declare function useScrollToCell<T>(visRowRng: NumberRange, rowHeight: number, clientMidHeight: number, midCols: GridColumnModel<T>[], bodyVisColRng: NumberRange, clientMidWidth: number, scroll: (left?: number, top?: number, source?: "user" | "table") => void): (part: FocusedPart, rowIdx: number, colIdx: number) => void;
28
- export declare function useColumnResize<T>(cols: GridColumnModel<T>[], resizeColumn: (columnIndex: number, width: number) => void): (event: React.MouseEvent<HTMLDivElement>) => void;
28
+ export declare function useColumnResize<T>(cols: GridColumnModel<T>[], resizeColumn: (columnIndex: number, width: number) => void): (event: ReactMouseEvent<HTMLDivElement>) => void;
29
29
  export declare function useFlatten<T>(map: Map<number, T>): T[];
30
30
  export declare function useColumnRegistry<T>(children: ReactNode): {
31
31
  leftCols: GridColumnModel<T>[];
@@ -43,7 +43,7 @@ export declare type SelectRowsOptions = {
43
43
  unselectOtherRows?: boolean;
44
44
  };
45
45
  export declare function useRowSelection<T>(rowKeyGetter: RowKeyGetter<T>, rowData: T[], defaultSelectedRowIdxs?: number[], selectedRowIdxs?: number[], rowSelectionMode?: GridRowSelectionMode, onRowSelected?: (selectedRowIdxs: number[]) => void): {
46
- onMouseDown: (event: React.MouseEvent<HTMLDivElement>) => void;
46
+ onMouseDown: (event: ReactMouseEvent<HTMLDivElement>) => void;
47
47
  selRowIdxs: Set<number>;
48
48
  isAllSelected: boolean;
49
49
  isAnySelected: boolean;
@@ -61,7 +61,7 @@ export interface Target {
61
61
  x: number;
62
62
  }
63
63
  export declare function useColumnMove<T = any>(columnMove: boolean | undefined, rootRef: RefObject<HTMLDivElement>, leftCols: GridColumnModel<T>[], midCols: GridColumnModel<T>[], rightCols: GridColumnModel<T>[], cols: GridColumnModel<T>[], scrollLeft: number, clientMidWidth: number, onColumnMove: GridColumnMoveHandler): {
64
- onColumnMoveHandleMouseDown: React.MouseEventHandler<HTMLDivElement>;
64
+ onColumnMoveHandleMouseDown: MouseEventHandler<HTMLDivElement>;
65
65
  dragState: ColumnDragState | undefined;
66
66
  activeTarget: Target | undefined;
67
67
  onColumnMoveCancel: () => void;
@@ -78,14 +78,14 @@ export declare function cellPositionEquals(a: CellPosition, b: CellPosition): bo
78
78
  export declare function cellRangeEquals(a: CellRange | undefined, b: CellRange | undefined): boolean;
79
79
  export declare function useRangeSelection(cellSelectionMode?: GridCellSelectionMode): {
80
80
  selectedCellRange: CellRange | undefined;
81
- onCellMouseDown: (event: React.MouseEvent) => void;
81
+ onCellMouseDown: (event: ReactMouseEvent) => void;
82
82
  onKeyboardRangeSelectionStart: (pos: CellPosition) => void;
83
83
  onKeyboardRangeSelectionEnd: () => void;
84
84
  onCursorMove: (pos: CellPosition) => void;
85
85
  selectRange: (range: CellRange) => void;
86
86
  };
87
87
  export declare function useFocusableContent<T extends HTMLElement>(): {
88
- ref: React.RefObject<T>;
88
+ ref: RefObject<T>;
89
89
  isFocusableContent: boolean;
90
- onFocus: React.FocusEventHandler<T>;
90
+ onFocus: FocusEventHandler<T>;
91
91
  };
@@ -1,4 +1,3 @@
1
- export * from "./Cell";
2
1
  export * from "./CellMeasure";
3
2
  export * from "./Cursor";
4
3
  export * from "./GroupHeaderRow";
@@ -1,4 +1,4 @@
1
- import { FocusedPart } from "../CursorContext";
1
+ import type { FocusedPart } from "../CursorContext";
2
2
  export declare function getAttribute(element: HTMLElement, attributeName: string): [string, HTMLElement];
3
3
  export declare function getRowIndexAttribute(element: HTMLElement): number;
4
4
  export declare function getRowKeyAttribute(element: HTMLElement): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salt-ds/data-grid",
3
- "version": "0.0.0-snapshot-20230920133053",
3
+ "version": "0.0.0-snapshot-20240719143459",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -12,11 +12,11 @@
12
12
  "sideEffects": false,
13
13
  "dependencies": {
14
14
  "clsx": "^2.0.0",
15
- "@salt-ds/core": "^0.0.0-snapshot-20230920133053",
15
+ "@salt-ds/core": "^0.0.0-snapshot-20240719143459",
16
+ "@salt-ds/styles": "^0.2.1",
16
17
  "@salt-ds/window": "^0.1.1",
17
- "@salt-ds/styles": "^0.1.1",
18
- "@salt-ds/icons": "^1.6.0",
19
- "@salt-ds/lab": "^0.0.0-snapshot-20230920133053"
18
+ "@salt-ds/icons": "^1.12.1",
19
+ "@salt-ds/lab": "^0.0.0-snapshot-20240719143459"
20
20
  },
21
21
  "peerDependencies": {
22
22
  "@types/react": ">=16.14.0",
@@ -30,7 +30,6 @@
30
30
  },
31
31
  "publishConfig": {
32
32
  "directory": "../../dist/salt-ds-data-grid",
33
- "tag": "next",
34
33
  "provenance": true
35
34
  },
36
35
  "module": "dist-es/index.js",
@@ -1 +0,0 @@
1
- {"version":3,"file":"Cell.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Cell.js","sources":["../src/internal/Cell.tsx"],"sourcesContent":["import { makePrefixer } from \"@salt-ds/core\";\nimport { useWindow } from \"@salt-ds/window\";\nimport { useComponentCssInjection } from \"@salt-ds/styles\";\nimport { forwardRef, HTMLAttributes } from \"react\";\nimport { clsx } from \"clsx\";\n\nimport { ColumnSeparatorType } from \"../Grid\";\n\nimport cellCss from \"./Cell.css\";\n\nexport interface CellProps extends HTMLAttributes<HTMLTableCellElement> {\n isSelected?: boolean;\n isEditable?: boolean;\n separator?: ColumnSeparatorType;\n}\n\nconst withBaseName = makePrefixer(\"saltGridCell\");\n\nexport const Cell = forwardRef<HTMLTableCellElement, CellProps>(\n function CellFrame(props, ref) {\n const {\n children,\n separator,\n isSelected,\n isEditable,\n className,\n ...tdProps\n } = props;\n\n const targetWindow = useWindow();\n useComponentCssInjection({\n testId: \"salt-cell\",\n css: cellCss,\n window: targetWindow,\n });\n\n return (\n <td\n ref={ref}\n className={clsx(\n withBaseName(),\n {\n [withBaseName(\"selected\")]: isSelected,\n [withBaseName(\"editable\")]: isEditable,\n [withBaseName(\"regularSeparator\")]:\n separator === \"regular\" || separator === \"groupEdge\",\n [withBaseName(\"pinnedSeparator\")]: separator === \"pinned\",\n },\n className\n )}\n {...tdProps}\n >\n <div className={withBaseName(\"body\")}>{props.children}</div>\n <div className={withBaseName(\"columnSeparator\")} />\n <div className={withBaseName(\"rowSeparator\")} />\n <div className={withBaseName(\"topSeparator\")} />\n </td>\n );\n }\n);\n"],"names":["makePrefixer","forwardRef","useWindow","useComponentCssInjection","cellCss","jsxs","clsx","jsx"],"mappings":";;;;;;;;;;;;AAgBA,MAAM,YAAA,GAAeA,kBAAa,cAAc,CAAA,CAAA;AAEzC,MAAM,IAAO,GAAAC,gBAAA;AAAA,EAClB,SAAS,SAAU,CAAA,KAAA,EAAO,GAAK,EAAA;AAC7B,IAAM,MAAA;AAAA,MACJ,QAAA;AAAA,MACA,SAAA;AAAA,MACA,UAAA;AAAA,MACA,UAAA;AAAA,MACA,SAAA;AAAA,MACG,GAAA,OAAA;AAAA,KACD,GAAA,KAAA,CAAA;AAEJ,IAAA,MAAM,eAAeC,gBAAU,EAAA,CAAA;AAC/B,IAAyBC,+BAAA,CAAA;AAAA,MACvB,MAAQ,EAAA,WAAA;AAAA,MACR,GAAK,EAAAC,MAAA;AAAA,MACL,MAAQ,EAAA,YAAA;AAAA,KACT,CAAA,CAAA;AAED,IAAA,uBACGC,eAAA,CAAA,IAAA,EAAA;AAAA,MACC,GAAA;AAAA,MACA,SAAW,EAAAC,SAAA;AAAA,QACT,YAAa,EAAA;AAAA,QACb;AAAA,UACE,CAAC,YAAa,CAAA,UAAU,CAAI,GAAA,UAAA;AAAA,UAC5B,CAAC,YAAa,CAAA,UAAU,CAAI,GAAA,UAAA;AAAA,UAC5B,CAAC,YAAa,CAAA,kBAAkB,CAC9B,GAAA,SAAA,KAAc,aAAa,SAAc,KAAA,WAAA;AAAA,UAC3C,CAAC,YAAA,CAAa,iBAAiB,CAAA,GAAI,SAAc,KAAA,QAAA;AAAA,SACnD;AAAA,QACA,SAAA;AAAA,OACF;AAAA,MACC,GAAG,OAAA;AAAA,MAEJ,QAAA,EAAA;AAAA,wBAACC,cAAA,CAAA,KAAA,EAAA;AAAA,UAAI,SAAA,EAAW,aAAa,MAAM,CAAA;AAAA,UAAI,QAAM,EAAA,KAAA,CAAA,QAAA;AAAA,SAAS,CAAA;AAAA,wBACrDA,cAAA,CAAA,KAAA,EAAA;AAAA,UAAI,SAAA,EAAW,aAAa,iBAAiB,CAAA;AAAA,SAAG,CAAA;AAAA,wBAChDA,cAAA,CAAA,KAAA,EAAA;AAAA,UAAI,SAAA,EAAW,aAAa,cAAc,CAAA;AAAA,SAAG,CAAA;AAAA,wBAC7CA,cAAA,CAAA,KAAA,EAAA;AAAA,UAAI,SAAA,EAAW,aAAa,cAAc,CAAA;AAAA,SAAG,CAAA;AAAA,OAAA;AAAA,KAChD,CAAA,CAAA;AAAA,GAEJ;AACF;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Cell.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Cell.js","sources":["../src/internal/Cell.tsx"],"sourcesContent":["import { makePrefixer } from \"@salt-ds/core\";\nimport { useWindow } from \"@salt-ds/window\";\nimport { useComponentCssInjection } from \"@salt-ds/styles\";\nimport { forwardRef, HTMLAttributes } from \"react\";\nimport { clsx } from \"clsx\";\n\nimport { ColumnSeparatorType } from \"../Grid\";\n\nimport cellCss from \"./Cell.css\";\n\nexport interface CellProps extends HTMLAttributes<HTMLTableCellElement> {\n isSelected?: boolean;\n isEditable?: boolean;\n separator?: ColumnSeparatorType;\n}\n\nconst withBaseName = makePrefixer(\"saltGridCell\");\n\nexport const Cell = forwardRef<HTMLTableCellElement, CellProps>(\n function CellFrame(props, ref) {\n const {\n children,\n separator,\n isSelected,\n isEditable,\n className,\n ...tdProps\n } = props;\n\n const targetWindow = useWindow();\n useComponentCssInjection({\n testId: \"salt-cell\",\n css: cellCss,\n window: targetWindow,\n });\n\n return (\n <td\n ref={ref}\n className={clsx(\n withBaseName(),\n {\n [withBaseName(\"selected\")]: isSelected,\n [withBaseName(\"editable\")]: isEditable,\n [withBaseName(\"regularSeparator\")]:\n separator === \"regular\" || separator === \"groupEdge\",\n [withBaseName(\"pinnedSeparator\")]: separator === \"pinned\",\n },\n className\n )}\n {...tdProps}\n >\n <div className={withBaseName(\"body\")}>{props.children}</div>\n <div className={withBaseName(\"columnSeparator\")} />\n <div className={withBaseName(\"rowSeparator\")} />\n <div className={withBaseName(\"topSeparator\")} />\n </td>\n );\n }\n);\n"],"names":["cellCss"],"mappings":";;;;;;;;AAgBA,MAAM,YAAA,GAAe,aAAa,cAAc,CAAA,CAAA;AAEzC,MAAM,IAAO,GAAA,UAAA;AAAA,EAClB,SAAS,SAAU,CAAA,KAAA,EAAO,GAAK,EAAA;AAC7B,IAAM,MAAA;AAAA,MACJ,QAAA;AAAA,MACA,SAAA;AAAA,MACA,UAAA;AAAA,MACA,UAAA;AAAA,MACA,SAAA;AAAA,MACG,GAAA,OAAA;AAAA,KACD,GAAA,KAAA,CAAA;AAEJ,IAAA,MAAM,eAAe,SAAU,EAAA,CAAA;AAC/B,IAAyB,wBAAA,CAAA;AAAA,MACvB,MAAQ,EAAA,WAAA;AAAA,MACR,GAAK,EAAAA,QAAA;AAAA,MACL,MAAQ,EAAA,YAAA;AAAA,KACT,CAAA,CAAA;AAED,IAAA,uBACG,IAAA,CAAA,IAAA,EAAA;AAAA,MACC,GAAA;AAAA,MACA,SAAW,EAAA,IAAA;AAAA,QACT,YAAa,EAAA;AAAA,QACb;AAAA,UACE,CAAC,YAAa,CAAA,UAAU,CAAI,GAAA,UAAA;AAAA,UAC5B,CAAC,YAAa,CAAA,UAAU,CAAI,GAAA,UAAA;AAAA,UAC5B,CAAC,YAAa,CAAA,kBAAkB,CAC9B,GAAA,SAAA,KAAc,aAAa,SAAc,KAAA,WAAA;AAAA,UAC3C,CAAC,YAAA,CAAa,iBAAiB,CAAA,GAAI,SAAc,KAAA,QAAA;AAAA,SACnD;AAAA,QACA,SAAA;AAAA,OACF;AAAA,MACC,GAAG,OAAA;AAAA,MAEJ,QAAA,EAAA;AAAA,wBAAC,GAAA,CAAA,KAAA,EAAA;AAAA,UAAI,SAAA,EAAW,aAAa,MAAM,CAAA;AAAA,UAAI,QAAM,EAAA,KAAA,CAAA,QAAA;AAAA,SAAS,CAAA;AAAA,wBACrD,GAAA,CAAA,KAAA,EAAA;AAAA,UAAI,SAAA,EAAW,aAAa,iBAAiB,CAAA;AAAA,SAAG,CAAA;AAAA,wBAChD,GAAA,CAAA,KAAA,EAAA;AAAA,UAAI,SAAA,EAAW,aAAa,cAAc,CAAA;AAAA,SAAG,CAAA;AAAA,wBAC7C,GAAA,CAAA,KAAA,EAAA;AAAA,UAAI,SAAA,EAAW,aAAa,cAAc,CAAA;AAAA,SAAG,CAAA;AAAA,OAAA;AAAA,KAChD,CAAA,CAAA;AAAA,GAEJ;AACF;;;;"}
@@ -1,8 +0,0 @@
1
- import { HTMLAttributes } from "react";
2
- import { ColumnSeparatorType } from "../Grid";
3
- export interface CellProps extends HTMLAttributes<HTMLTableCellElement> {
4
- isSelected?: boolean;
5
- isEditable?: boolean;
6
- separator?: ColumnSeparatorType;
7
- }
8
- export declare const Cell: import("react").ForwardRefExoticComponent<CellProps & import("react").RefAttributes<HTMLTableCellElement>>;