@infinite-table/infinite-react 0.5.1 → 0.5.2

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 (282) hide show
  1. package/README.md +104 -0
  2. package/index.css +896 -0
  3. package/index.d.ts +2264 -0
  4. package/index.esm.css +896 -0
  5. package/index.esm.js +15404 -0
  6. package/index.js +15240 -0
  7. package/package.json +2 -94
  8. package/.vscode/settings.json +0 -3
  9. package/API.md +0 -0
  10. package/build/buildPackageJson.js +0 -43
  11. package/build/scripts/test.js +0 -37
  12. package/bundler.config.js +0 -25
  13. package/globals.d.ts +0 -7
  14. package/rollup.config.js +0 -15
  15. package/run-build-deepmap.js +0 -47
  16. package/run-build.js +0 -45
  17. package/run-dts-concat.js +0 -21
  18. package/src/components/CSSVariableWatch.tsx +0 -82
  19. package/src/components/DataSource/BooleanCollectionState.ts +0 -214
  20. package/src/components/DataSource/BooleanDeepCollectionState.ts +0 -208
  21. package/src/components/DataSource/DataSourceContext.ts +0 -20
  22. package/src/components/DataSource/GroupRowsState.ts +0 -74
  23. package/src/components/DataSource/Indexer.ts +0 -27
  24. package/src/components/DataSource/RowSelectionState.ts +0 -763
  25. package/src/components/DataSource/defaultFilterTypes.ts +0 -64
  26. package/src/components/DataSource/index.tsx +0 -108
  27. package/src/components/DataSource/privateHooks/getChangeDetect.ts +0 -7
  28. package/src/components/DataSource/privateHooks/useLoadData.ts +0 -783
  29. package/src/components/DataSource/publicHooks/useDataSource.ts +0 -19
  30. package/src/components/DataSource/publicHooks/useDataSourceActions.ts +0 -14
  31. package/src/components/DataSource/state/getInitialState.ts +0 -494
  32. package/src/components/DataSource/state/normalizeSortInfo.ts +0 -35
  33. package/src/components/DataSource/state/reducer.ts +0 -466
  34. package/src/components/DataSource/state/rowInfoStatus.ts +0 -27
  35. package/src/components/DataSource/types.ts +0 -548
  36. package/src/components/HeadlessTable/HeadlessTableWithPinnedContainers.tsx +0 -142
  37. package/src/components/HeadlessTable/MappedCells.ts +0 -251
  38. package/src/components/HeadlessTable/RawTable.tsx +0 -98
  39. package/src/components/HeadlessTable/ReactHeadlessTableRenderer.tsx +0 -1516
  40. package/src/components/HeadlessTable/index.tsx +0 -234
  41. package/src/components/InfiniteTable/InfiniteCls.css.ts +0 -164
  42. package/src/components/InfiniteTable/InfiniteTableContext.ts +0 -16
  43. package/src/components/InfiniteTable/api/getImperativeApi.ts +0 -391
  44. package/src/components/InfiniteTable/api/getSelectionApi.ts +0 -364
  45. package/src/components/InfiniteTable/api/type.ts +0 -11
  46. package/src/components/InfiniteTable/components/ActiveCellIndicator.css.ts +0 -51
  47. package/src/components/InfiniteTable/components/ActiveCellIndicator.tsx +0 -116
  48. package/src/components/InfiniteTable/components/ActiveRowIndicator.css.ts +0 -56
  49. package/src/components/InfiniteTable/components/ActiveRowIndicator.tsx +0 -94
  50. package/src/components/InfiniteTable/components/CheckBox.css.ts +0 -13
  51. package/src/components/InfiniteTable/components/CheckBox.tsx +0 -96
  52. package/src/components/InfiniteTable/components/FilterEditors.tsx +0 -52
  53. package/src/components/InfiniteTable/components/InfiniteTableBody/InfiniteTableBody.tsx +0 -27
  54. package/src/components/InfiniteTable/components/InfiniteTableBody/index.tsx +0 -1
  55. package/src/components/InfiniteTable/components/InfiniteTableFooter/InfiniteTableFooter.tsx +0 -31
  56. package/src/components/InfiniteTable/components/InfiniteTableFooter/index.tsx +0 -1
  57. package/src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableColumnHeaderFilter.tsx +0 -102
  58. package/src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeader.tsx +0 -163
  59. package/src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderCell.tsx +0 -574
  60. package/src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderGroup.tsx +0 -79
  61. package/src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderTypes.tsx +0 -25
  62. package/src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderWrapper.tsx +0 -185
  63. package/src/components/InfiniteTable/components/InfiniteTableHeader/ResizeHandle/GroupResizeHandle.tsx +0 -159
  64. package/src/components/InfiniteTable/components/InfiniteTableHeader/ResizeHandle/ResizeHandle.css.ts +0 -124
  65. package/src/components/InfiniteTable/components/InfiniteTableHeader/ResizeHandle/columnResizer.ts +0 -166
  66. package/src/components/InfiniteTable/components/InfiniteTableHeader/ResizeHandle/index.tsx +0 -146
  67. package/src/components/InfiniteTable/components/InfiniteTableHeader/buildColumnAndGroupTree.ts +0 -240
  68. package/src/components/InfiniteTable/components/InfiniteTableHeader/header.css.ts +0 -358
  69. package/src/components/InfiniteTable/components/InfiniteTableHeader/index.tsx +0 -1
  70. package/src/components/InfiniteTable/components/InfiniteTableHeader/useColumnGroupResizeHandle.tsx +0 -114
  71. package/src/components/InfiniteTable/components/InfiniteTableHeader/useColumnResizeHandle.tsx +0 -146
  72. package/src/components/InfiniteTable/components/InfiniteTableLicenseFooter/footer.css.ts +0 -7
  73. package/src/components/InfiniteTable/components/InfiniteTableLicenseFooter/index.tsx +0 -110
  74. package/src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableCell.tsx +0 -120
  75. package/src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableCellTypes.ts +0 -74
  76. package/src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableColumnCell.tsx +0 -457
  77. package/src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableRow.tsx +0 -107
  78. package/src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableRowClassName.ts +0 -6
  79. package/src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableRowTypes.ts +0 -32
  80. package/src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableRowUnvirtualized.tsx +0 -75
  81. package/src/components/InfiniteTable/components/InfiniteTableRow/columnRendering.tsx +0 -263
  82. package/src/components/InfiniteTable/components/InfiniteTableRow/index.tsx +0 -1
  83. package/src/components/InfiniteTable/components/InfiniteTableRow/row.css.ts +0 -74
  84. package/src/components/InfiniteTable/components/InfiniteTableRow/useRowDOMProps.ts +0 -199
  85. package/src/components/InfiniteTable/components/LoadMask.css.ts +0 -34
  86. package/src/components/InfiniteTable/components/LoadMask.tsx +0 -27
  87. package/src/components/InfiniteTable/components/ScrollbarPlaceholder.tsx +0 -56
  88. package/src/components/InfiniteTable/components/cell.css.ts +0 -192
  89. package/src/components/InfiniteTable/components/icons/ArrowDown.tsx +0 -14
  90. package/src/components/InfiniteTable/components/icons/ArrowUp.tsx +0 -14
  91. package/src/components/InfiniteTable/components/icons/ExpanderIcon.css.ts +0 -31
  92. package/src/components/InfiniteTable/components/icons/ExpanderIcon.tsx +0 -63
  93. package/src/components/InfiniteTable/components/icons/Icon.tsx +0 -18
  94. package/src/components/InfiniteTable/components/icons/InfiniteTableIconClassName.ts +0 -1
  95. package/src/components/InfiniteTable/components/icons/LoadingIcon.css.ts +0 -8
  96. package/src/components/InfiniteTable/components/icons/LoadingIcon.tsx +0 -45
  97. package/src/components/InfiniteTable/components/icons/MenuIcon.tsx +0 -50
  98. package/src/components/InfiniteTable/components/icons/SortIcon.tsx +0 -113
  99. package/src/components/InfiniteTable/eventHandlers/eventHandlerTypes.ts +0 -57
  100. package/src/components/InfiniteTable/eventHandlers/index.ts +0 -95
  101. package/src/components/InfiniteTable/eventHandlers/keyboardNavigation.ts +0 -232
  102. package/src/components/InfiniteTable/eventHandlers/keyboardSelection.ts +0 -110
  103. package/src/components/InfiniteTable/eventHandlers/onCellClick.ts +0 -94
  104. package/src/components/InfiniteTable/eventHandlers/onKeyDown.ts +0 -25
  105. package/src/components/InfiniteTable/hooks/adjustColumnOrderForAllColumns.ts +0 -70
  106. package/src/components/InfiniteTable/hooks/reorderColumnsOnDrag.ts +0 -476
  107. package/src/components/InfiniteTable/hooks/useAutoSizeColumns.ts +0 -206
  108. package/src/components/InfiniteTable/hooks/useCellClassName.ts +0 -80
  109. package/src/components/InfiniteTable/hooks/useCellRendering.tsx +0 -217
  110. package/src/components/InfiniteTable/hooks/useColumnGroups.ts +0 -71
  111. package/src/components/InfiniteTable/hooks/useColumnMenu.ts +0 -72
  112. package/src/components/InfiniteTable/hooks/useColumnPointerEvents.ts +0 -258
  113. package/src/components/InfiniteTable/hooks/useColumnRowspan.ts +0 -43
  114. package/src/components/InfiniteTable/hooks/useColumnSizeFn.ts +0 -24
  115. package/src/components/InfiniteTable/hooks/useColumnsWhen.ts +0 -582
  116. package/src/components/InfiniteTable/hooks/useComputed.ts +0 -186
  117. package/src/components/InfiniteTable/hooks/useComputedVisibleColumns.ts +0 -219
  118. package/src/components/InfiniteTable/hooks/useDOMProps.ts +0 -306
  119. package/src/components/InfiniteTable/hooks/useEffectWithRaf.ts +0 -47
  120. package/src/components/InfiniteTable/hooks/useInfiniteTable.ts +0 -10
  121. package/src/components/InfiniteTable/hooks/useInfiniteTableState.ts +0 -11
  122. package/src/components/InfiniteTable/hooks/useInternalProps.ts +0 -8
  123. package/src/components/InfiniteTable/hooks/useLicense/LicenseDetails.ts +0 -13
  124. package/src/components/InfiniteTable/hooks/useLicense/crc32.ts +0 -56
  125. package/src/components/InfiniteTable/hooks/useLicense/decode.ts +0 -147
  126. package/src/components/InfiniteTable/hooks/useLicense/useLicense.ts +0 -39
  127. package/src/components/InfiniteTable/hooks/useRerenderOnKeyChange.ts +0 -21
  128. package/src/components/InfiniteTable/hooks/useRowHover.ts +0 -18
  129. package/src/components/InfiniteTable/hooks/useScrollToActiveCell.ts +0 -48
  130. package/src/components/InfiniteTable/hooks/useScrollToActiveRow.ts +0 -44
  131. package/src/components/InfiniteTable/hooks/useScrollbars.ts +0 -51
  132. package/src/components/InfiniteTable/hooks/useToggleGroupRow.ts +0 -56
  133. package/src/components/InfiniteTable/hooks/useUnpinnedRendering.tsx +0 -165
  134. package/src/components/InfiniteTable/hooks/useYourBrain.ts +0 -55
  135. package/src/components/InfiniteTable/index.tsx +0 -352
  136. package/src/components/InfiniteTable/internalProps.ts +0 -4
  137. package/src/components/InfiniteTable/state/computeColumnGroupsDepths.ts +0 -29
  138. package/src/components/InfiniteTable/state/getColumnVisibilityForHideEmptyGroupColumns.ts +0 -127
  139. package/src/components/InfiniteTable/state/getInitialState.ts +0 -375
  140. package/src/components/InfiniteTable/theme.css.ts +0 -556
  141. package/src/components/InfiniteTable/types/InfiniteTableAction.ts +0 -6
  142. package/src/components/InfiniteTable/types/InfiniteTableActionType.ts +0 -12
  143. package/src/components/InfiniteTable/types/InfiniteTableColumn.ts +0 -478
  144. package/src/components/InfiniteTable/types/InfiniteTableComputedValues.ts +0 -43
  145. package/src/components/InfiniteTable/types/InfiniteTableContextValue.ts +0 -12
  146. package/src/components/InfiniteTable/types/InfiniteTableInternalProps.ts +0 -3
  147. package/src/components/InfiniteTable/types/InfiniteTableProps.ts +0 -511
  148. package/src/components/InfiniteTable/types/InfiniteTableState.ts +0 -195
  149. package/src/components/InfiniteTable/types/Utility.ts +0 -35
  150. package/src/components/InfiniteTable/types/index.ts +0 -96
  151. package/src/components/InfiniteTable/utilities.css.ts +0 -179
  152. package/src/components/InfiniteTable/utils/MultiRowSelector.ts +0 -111
  153. package/src/components/InfiniteTable/utils/RenderHookComponentForInfinite.tsx +0 -52
  154. package/src/components/InfiniteTable/utils/adjustColumnOrderForPinning.ts +0 -33
  155. package/src/components/InfiniteTable/utils/assignFiltered.ts +0 -29
  156. package/src/components/InfiniteTable/utils/defaultGetColumContextMenuItems.tsx +0 -108
  157. package/src/components/InfiniteTable/utils/getColumnComputedType.ts +0 -33
  158. package/src/components/InfiniteTable/utils/getColumnForGroupBy.tsx +0 -313
  159. package/src/components/InfiniteTable/utils/getComputedVisibleColumns.ts +0 -773
  160. package/src/components/InfiniteTable/utils/getContextMenuForColumn.tsx +0 -72
  161. package/src/components/InfiniteTable/utils/infiniteDOMUtils.ts +0 -189
  162. package/src/components/InfiniteTable/utils/mapToObject.ts +0 -20
  163. package/src/components/InfiniteTable/utils/moveXatY.ts +0 -25
  164. package/src/components/InfiniteTable/utils/objectValuesExcept.ts +0 -9
  165. package/src/components/InfiniteTable/utils/progressiveSpeedScroller.ts +0 -158
  166. package/src/components/InfiniteTable/utils/rafFn.ts +0 -13
  167. package/src/components/InfiniteTable/utils/toCSSVarName.ts +0 -1
  168. package/src/components/InfiniteTable/utils/toMap.ts +0 -24
  169. package/src/components/Menu/Menu.tsx +0 -750
  170. package/src/components/Menu/MenuCls.css.ts +0 -139
  171. package/src/components/Menu/MenuContext.ts +0 -10
  172. package/src/components/Menu/MenuContextValue.ts +0 -15
  173. package/src/components/Menu/MenuProps.ts +0 -98
  174. package/src/components/Menu/MenuState.ts +0 -56
  175. package/src/components/Menu/MenuTriangleContext.ts +0 -352
  176. package/src/components/Menu/childrenToRuntimeItems.tsx +0 -103
  177. package/src/components/Menu/getMenuState.tsx +0 -119
  178. package/src/components/Menu/index.tsx +0 -88
  179. package/src/components/Menu/propToIdentifyMenu.ts +0 -1
  180. package/src/components/RawList/AvoidReactDiff.tsx +0 -48
  181. package/src/components/RawList/MappedItems.ts +0 -143
  182. package/src/components/RawList/ReactVirtualRenderer.tsx +0 -307
  183. package/src/components/RawList/index.tsx +0 -42
  184. package/src/components/RawList/types.ts +0 -23
  185. package/src/components/RawList/useVirtualRenderer.ts +0 -36
  186. package/src/components/RenderHookComponent.tsx +0 -10
  187. package/src/components/ResizeObserver/index.tsx +0 -170
  188. package/src/components/VirtualBrain/MatrixBrain.ts +0 -1621
  189. package/src/components/VirtualBrain/ScrollListener.ts +0 -39
  190. package/src/components/VirtualBrain/index.ts +0 -664
  191. package/src/components/VirtualList/ColumnListWithExternalScrolling.tsx +0 -78
  192. package/src/components/VirtualList/InfiniteListRootClassName.ts +0 -1
  193. package/src/components/VirtualList/RowListWithExternalScrolling.tsx +0 -120
  194. package/src/components/VirtualList/SpacePlaceholder.tsx +0 -32
  195. package/src/components/VirtualList/VirtualList.css.ts +0 -29
  196. package/src/components/VirtualList/VirtualList.tsx +0 -141
  197. package/src/components/VirtualList/VirtualRowList.tsx +0 -34
  198. package/src/components/VirtualList/types.ts +0 -56
  199. package/src/components/VirtualList/useCorrectHeightForRowElements.ts +0 -14
  200. package/src/components/VirtualScrollContainer/VirtualScrollContainer.css.ts +0 -51
  201. package/src/components/VirtualScrollContainer/getScrollableClassName.ts +0 -30
  202. package/src/components/VirtualScrollContainer/index.tsx +0 -63
  203. package/src/components/flexbox/index.ts +0 -562
  204. package/src/components/hooks/useComponentState/index.tsx +0 -562
  205. package/src/components/hooks/useComponentState/types.ts +0 -32
  206. package/src/components/hooks/useEffectOnceWithProperUnmount.ts +0 -33
  207. package/src/components/hooks/useEffectWithChanges.ts +0 -56
  208. package/src/components/hooks/useImmutableRef.ts +0 -7
  209. package/src/components/hooks/useInterceptedMap.ts +0 -71
  210. package/src/components/hooks/useLatest.tsx +0 -8
  211. package/src/components/hooks/useLazyLatest.ts +0 -23
  212. package/src/components/hooks/useMemoShallowObjectMerge.ts +0 -16
  213. package/src/components/hooks/useMounted.ts +0 -18
  214. package/src/components/hooks/useOnMount.ts +0 -21
  215. package/src/components/hooks/useOnScroll.ts +0 -34
  216. package/src/components/hooks/useOnce.ts +0 -10
  217. package/src/components/hooks/useOverlay/index.tsx +0 -418
  218. package/src/components/hooks/usePrevious.ts +0 -8
  219. package/src/components/hooks/usePropertyOld.ts +0 -168
  220. package/src/components/hooks/useRerender.ts +0 -12
  221. package/src/components/hooks/xuseProperty.ts +0 -165
  222. package/src/components/types/CellPosition.ts +0 -4
  223. package/src/components/types/NonUndefined.ts +0 -1
  224. package/src/components/types/RemoveObject.ts +0 -22
  225. package/src/components/types/Renderable.ts +0 -3
  226. package/src/components/types/ScrollPosition.ts +0 -7
  227. package/src/components/types/Setter.ts +0 -2
  228. package/src/components/types/Size.ts +0 -6
  229. package/src/components/types/SubscriptionCallback.ts +0 -10
  230. package/src/components/types/VoidFn.ts +0 -1
  231. package/src/components/utils/buildSubscriptionCallback.tsx +0 -60
  232. package/src/components/utils/clamp.ts +0 -3
  233. package/src/components/utils/debounce.ts +0 -16
  234. package/src/components/utils/decamelize.ts +0 -11
  235. package/src/components/utils/discardCallsWithEqualArg.ts +0 -42
  236. package/src/components/utils/getRenderIndexes.ts +0 -33
  237. package/src/components/utils/getScrollbarWidth.ts +0 -31
  238. package/src/components/utils/getVirtualRenderCount.ts +0 -21
  239. package/src/components/utils/isControlled.ts +0 -12
  240. package/src/components/utils/isControlledValue.ts +0 -5
  241. package/src/index.tsx +0 -34
  242. package/src/test.tsx +0 -18
  243. package/src/utils/DeepMap/index.ts +0 -588
  244. package/src/utils/DeepMap/once.ts +0 -16
  245. package/src/utils/DeepMap/sortAscending.ts +0 -1
  246. package/src/utils/DeepMap/tsconfig.deepmap.json +0 -17
  247. package/src/utils/DeepMap/xpackage.json +0 -26
  248. package/src/utils/debug.ts +0 -40
  249. package/src/utils/deepClone.ts +0 -38
  250. package/src/utils/getGlobal.ts +0 -3
  251. package/src/utils/groupAndPivot/defaultToKey.ts +0 -3
  252. package/src/utils/groupAndPivot/getGroupKeysForDataItem.ts +0 -19
  253. package/src/utils/groupAndPivot/getPivotColumnsAndColumnGroups.ts +0 -361
  254. package/src/utils/groupAndPivot/index.ts +0 -1229
  255. package/src/utils/groupAndPivot/types.ts +0 -10
  256. package/src/utils/join.ts +0 -4
  257. package/src/utils/mathIntersection.ts +0 -21
  258. package/src/utils/minified.d.ts +0 -2
  259. package/src/utils/minified.js +0 -6
  260. package/src/utils/multisort/index.ts +0 -151
  261. package/src/utils/multisort/sortTypes.ts +0 -25
  262. package/src/utils/notes-status.md +0 -92
  263. package/src/utils/pageGeometry/ConvexPoly.ts +0 -34
  264. package/src/utils/pageGeometry/Point.ts +0 -51
  265. package/src/utils/pageGeometry/PolyWithPoints.ts +0 -52
  266. package/src/utils/pageGeometry/Rectangle.ts +0 -98
  267. package/src/utils/pageGeometry/Triangle.ts +0 -16
  268. package/src/utils/pageGeometry/alignment/index.ts +0 -221
  269. package/src/utils/pageGeometry/polyContainsPoint.ts +0 -182
  270. package/src/utils/pageGeometry/types.ts +0 -3
  271. package/src/utils/proxyFnCall.ts +0 -46
  272. package/src/utils/raf.ts +0 -13
  273. package/src/utils/selectParent.ts +0 -18
  274. package/src/utils/shallowEqualObjects.ts +0 -49
  275. package/src/utils/stripVar.ts +0 -3
  276. package/src/utils/toUpperFirst.ts +0 -5
  277. package/todo.md +0 -2
  278. package/tsconfig.build.json +0 -8
  279. package/tsconfig.dev.json +0 -7
  280. package/tsconfig.json +0 -30
  281. package/tsconfig.typebundler.json +0 -13
  282. package/typedoc.json +0 -4
@@ -1,556 +0,0 @@
1
- import {
2
- createGlobalThemeContract,
3
- createThemeContract,
4
- globalStyle,
5
- } from '@vanilla-extract/css';
6
- import { toCSSVarName } from './utils/toCSSVarName';
7
-
8
- export const columnHeaderHeightName = 'column-header-height';
9
- export const InternalVars = createThemeContract({
10
- currentColumnWidth: null,
11
- currentColumnTransformX: null,
12
- currentColumnTransformY: null,
13
-
14
- activeCellRowOffset: null,
15
- activeCellRowHeight: null,
16
-
17
- activeCellOffsetX: null,
18
- activeCellOffsetY: null,
19
-
20
- scrollTopForActiveRow: null,
21
- // this will be set to `${columnWidthAtIndex}-${the index of the column on which the active cell is}`
22
- activeCellColWidth: null,
23
-
24
- // this will be set to `${columnOffsetAtIndex}-${the index of the column on which the active cell is}`
25
- activeCellColOffset: null,
26
-
27
- columnReorderEffectDurationAtIndex: null,
28
- columnWidthAtIndex: null,
29
- columnOffsetAtIndex: null,
30
- columnOffsetAtIndexWhileReordering: null,
31
- columnZIndexAtIndex: null,
32
-
33
- pinnedStartWidth: null,
34
- pinnedEndWidth: null,
35
-
36
- pinnedEndOffset: null,
37
-
38
- computedVisibleColumnsCount: null,
39
-
40
- baseZIndexForCells: null,
41
-
42
- bodyWidth: null,
43
- bodyHeight: null,
44
-
45
- scrollbarWidthHorizontal: null,
46
- scrollbarWidthVertical: null,
47
-
48
- scrollLeft: null,
49
- scrollTop: null,
50
- });
51
- export const ThemeVars = createGlobalThemeContract(
52
- {
53
- color: {
54
- /**
55
- * Brand-specific accent color. This probably needs override to match your app.
56
- */
57
- accent: 'accent-color',
58
- error: 'error-color',
59
- /**
60
- * The text color inside the component
61
- */
62
- color: 'color',
63
- },
64
- spacing: {
65
- 0: 'space-0',
66
- 1: 'space-1',
67
- 2: 'space-2',
68
- 3: 'space-3',
69
- 4: 'space-4',
70
- 5: 'space-5',
71
- 6: 'space-6',
72
- 7: 'space-7',
73
- 8: 'space-8',
74
- 9: 'space-9',
75
- 10: 'space-10',
76
- },
77
- fontSize: {
78
- 0: 'font-size-0',
79
- 1: 'font-size-1',
80
- 2: 'font-size-2',
81
- 3: 'font-size-3',
82
- 4: 'font-size-4',
83
- 5: 'font-size-5',
84
- 6: 'font-size-6',
85
- 7: 'font-size-7',
86
- },
87
- fontFamily: 'font-family',
88
- minHeight: 'min-height',
89
- borderRadius: 'border-radius',
90
- /**
91
- * The background color for the whole component.
92
- *
93
- * Overriden in the `dark` theme.
94
- */
95
- background: 'background',
96
-
97
- components: {
98
- LoadMask: {
99
- /**
100
- * The padding used for the content inside the LoadMask.
101
- */
102
- padding: 'load-mask-padding',
103
- color: 'load-mask-color',
104
- textBackground: 'load-mask-text-background',
105
- overlayBackground: 'load-mask-overlay-background',
106
- overlayOpacity: 'load-mask-overlay-opacity',
107
- borderRadius: 'load-mask-border-radius',
108
- },
109
- Header: {
110
- /**
111
- * Background color for the header. Defaults to [`--infinie-header-cell-background`](#header-cell-background).
112
- *
113
- * Overriden in the `dark` theme.
114
- */
115
- background: 'header-background',
116
- /**
117
- * The text color inside the header.
118
- *
119
- * Overriden in the `dark` theme.
120
- */
121
- color: 'header-color',
122
-
123
- /**
124
- * The height of the column header.
125
- *
126
- * @alias column-header-height
127
- */
128
- columnHeaderHeight: columnHeaderHeightName,
129
- },
130
- HeaderCell: {
131
- /**
132
- * Background for header cells.
133
- *
134
- * Overriden in the `dark` theme.
135
- */
136
- background: 'header-cell-background',
137
- hoverBackground: 'header-cell-hover-background',
138
- padding: 'header-cell-padding',
139
- paddingX: 'header-cell-padding-x',
140
- paddingY: 'header-cell-padding-y',
141
- iconSize: 'header-cell-icon-size',
142
- menuIconLineWidth: 'header-cell-menu-icon-line-width',
143
- sortIconMargin: 'header-cell-sort-icon-margin',
144
- /**
145
- * The width of the area you can hover over in order to grab the column resize handle.
146
- * Defaults to `20px`.
147
- *
148
- * The purpose of this active area is to make it easier to grab the resize handle.
149
- */
150
- resizeHandleActiveAreaWidth: 'resize-handle-active-area-width',
151
-
152
- /**
153
- * The width of the colored column resize handle that is displayed on hover and on drag. Defaults to `2px`
154
- */
155
- resizeHandleWidth: 'resize-handle-width',
156
-
157
- /**
158
- * The color of the column resize handle - the resize handle is the visible indicator that you see
159
- * when hovering over the right-edge of a resizable column. Also visible on drag while doing a column resize.
160
- */
161
- resizeHandleHoverBackground: 'resize-handle-hover-background',
162
-
163
- /**
164
- * The color of the column resize handle when it has reached a min/max constraint.
165
- */
166
- resizeHandleConstrainedHoverBackground:
167
- 'resize-handle-constrained-hover-background',
168
- },
169
- Cell: {
170
- padding: 'cell-padding',
171
- borderWidth: 'cell-border-width',
172
- /**
173
- * Specifies the border for cells.
174
- *
175
- * Overriden in the `dark` theme - eg: `1px solid #2a323d`
176
- */
177
- border: 'cell-border',
178
- borderInvisible: 'cell-border-invisible',
179
- borderRadius: 'cell-border-radius',
180
- reorderEffectDuration: 'column-reorder-effect-duration',
181
- pinnedBorder: 'pinned-cell-border',
182
-
183
- /**
184
- * Text color inside rows. Defaults to `currentColor`
185
- *
186
- * Overriden in `dark` theme.
187
- */
188
- color: 'cell-color',
189
-
190
- /**
191
- * The RED component of the color used for the active cell when cell keyboard navigation is enabled.
192
- *
193
- * The easiest way to define the color of the active cell is to use these 3 variables:
194
- * `--infinite-active-cell-border-color--r`
195
- * `--infinite-active-cell-border-color--g`
196
- * `--infinite-active-cell-border-color--b`
197
- * as they define both the border and the background color of the active cell and the active row.
198
- *
199
- * You can also specify the GREEN and BLUE components of the color using the next two css vars.
200
- *
201
- * The border color of the active cell is decomposed into multiple variables for convenience as by default
202
- * the background of the active cell is the same color, but with the opacity specified by the value of `--infinie-active-cell-background-alpha`.
203
- *
204
- * If you don't want this, you can use `--infinite-active-cell-background` instead.
205
- */
206
- activeBorderColor_R: 'active-cell-border-color--r',
207
-
208
- /**
209
- * The GREEN component of the color used for the active cell when cell keyboard navigation is enabled.
210
- *
211
- * The easiest way to define the color of the active cell is to use these 3 variables:
212
- * `--infinite-active-cell-border-color--r`
213
- * `--infinite-active-cell-border-color--g`
214
- * `--infinite-active-cell-border-color--b`
215
- * as they define both the border and the background color of the active cell and the active row.
216
- *
217
- * You can also specify the RED and BLUE components of the color using the next two css vars.
218
- *
219
- * The border color of the active cell is decomposed into multiple variables for convenience as by default
220
- * the background of the active cell is the same color, but with the opacity specified by the value of `--infinie-active-cell-background-alpha`.
221
- *
222
- * If you don't want this, you can use `--infinite-active-cell-background` instead.
223
- */
224
- activeBorderColor_G: 'active-cell-border-color--g',
225
-
226
- /**
227
- * The BLUE component of the color used for the active cell when cell keyboard navigation is enabled.
228
- *
229
- * The easiest way to define the color of the active cell is to use these 3 variables:
230
- * `--infinite-active-cell-border-color--r`
231
- * `--infinite-active-cell-border-color--g`
232
- * `--infinite-active-cell-border-color--b`
233
- * as they define both the border and the background color of the active cell and the active row.
234
- *
235
- * You can also specify the RED and GREEN components of the color using the next two css vars.
236
- *
237
- * The border color of the active cell is decomposed into multiple variables for convenience as by default
238
- * the background of the active cell is the same color, but with the opacity specified by the value of `--infinie-active-cell-background-alpha`.
239
- *
240
- * If you don't want this, you can use `--infinite-active-cell-background` instead.
241
- */
242
- activeBorderColor_B: 'active-cell-border-color--b',
243
-
244
- /**
245
- * The opacity of the background color for the active cell (when cell keyboard navigation is enabled).
246
- *
247
- * The background color of the active cell is based on the value of the above 3 variables, but with the opacity specified by this variable.
248
- * This is applied when the component has focus.
249
- */
250
- activeBackgroundAlpha: 'active-cell-background-alpha',
251
-
252
- /**
253
- * Same as the above, but applied when the component does not have focus.
254
- */
255
- activeBackgroundAlphaWhenTableUnfocused:
256
- 'active-cell-background-alpha--table-unfocused',
257
-
258
- /**
259
- * The background color of the active cell defaults to the same color (with modified opacity, as explained above) as the border color.
260
- *
261
- * However, specify this to explicitly override the default.
262
- */
263
- activeBackground: 'active-cell-background',
264
-
265
- /**
266
- * The color for border of the active cell (when cell keyboard navigation is enabled).
267
- */
268
- activeBorderColor: 'active-cell-border-color',
269
- /**
270
- * The width of the border for the active cell.
271
- */
272
- activeBorderWidth: 'active-cell-border-width',
273
-
274
- /**
275
- * The style of the border for the active cell (eg: 'solid', 'dashed', 'dotted') - defaults to 'dashed'.
276
- */
277
- activeBorderStyle: 'active-cell-border-style',
278
-
279
- /**
280
- * Specifies the border for the active cell. Defaults to `var(--infinite-active-cell-border-width) var(--infinite-active-cell-border-style) var(--infinite-active-cell-border-color)`.
281
- */
282
- activeBorder: 'active-cell-border',
283
- },
284
- SelectionCheckBox: {
285
- marginInline: 'selection-checkbox-margin-inline',
286
- },
287
- Menu: {
288
- background: 'menu-background',
289
- color: 'menu-color',
290
- padding: 'menu-padding',
291
- cellPaddingVertical: 'menu-cell-padding-vertical',
292
- cellPaddingHorizontal: 'menu-cell-padding-horizontal',
293
- cellMarginVertical: 'menu-cell-margin-vertical',
294
- itemDisabledBackground: 'menu-item-disabled-background',
295
- itemActiveBackground: 'menu-item-active-background',
296
- itemActiveOpacity: 'menu-item-active-opacity',
297
- itemPressedOpacity: 'menu-item-pressed-opacity',
298
- itemPressedBackground: 'menu-item-pressed-background',
299
- itemDisabledOpacity: 'menu-item-disabled-opacity',
300
- borderRadius: 'menu-border-radius',
301
- shadowColor: 'menu-shadow-color',
302
- },
303
- Row: {
304
- /**
305
- * Background color for rows. Defaults to [`--infinite-background`](#background).
306
- *
307
- * Overriden in `dark` theme.
308
- */
309
- background: 'row-background',
310
-
311
- /**
312
- * Background color for odd rows. Even rows will use [`--infinite-row-background`](#row-background).
313
- *
314
- * Overriden in `dark` theme.
315
- */
316
- oddBackground: 'row-odd-background',
317
-
318
- selectedBackground: 'row-selected-background',
319
-
320
- /**
321
- * The background color of the active row. Defaults to the value of `var(--infinite-active-cell-background)`.
322
- *
323
- * However, specify this to explicitly override the default.
324
- */
325
- activeBackground: 'active-row-background',
326
-
327
- /**
328
- * The border color for the active row. Defaults to the value of `var(--infinite-active-cell-border-color)`.
329
- */
330
- activeBorderColor: 'active-row-border-color',
331
-
332
- /**
333
- * The width of the border for the active row. Defaults to the value of `var(--infinite-active-cell-border-width)`.
334
- */
335
- activeBorderWidth: 'active-row-border-width',
336
-
337
- /**
338
- * The style of the border for the active row (eg: 'solid', 'dashed', 'dotted') - defaults to the value of `var(--infinite-active-cell-border-style)`, which is `dashed` by default.
339
- */
340
- activeBorderStyle: 'active-row-border-style',
341
-
342
- /**
343
- * Specifies the border for the active row. Defaults to `var(--infinite-active-row-border-width) var(--infinite-active-row-border-style) var(--infinite-active-row-border-color)`.
344
- */
345
- activeBorder: 'active-row-border',
346
-
347
- /**
348
- * The opacity of the background color for the active row (when row keyboard navigation is enabled).
349
- * When you explicitly specify `--infinite-active-row-background`, this variable will not be used.
350
- * Instead, this variable is used when the active row background uses the color of the active cell (border).
351
- *
352
- * This is applied when the component has focus.
353
- *
354
- * Defaults to the value of `var(--infinite-active-cell-background-alpha)`.
355
- */
356
- activeBackgroundAlpha: 'active-row-background-alpha',
357
-
358
- /**
359
- * Same as the above, but applied when the component does not have focus.
360
- *
361
- * When you explicitly specify `--infinite-active-row-background`, this variable will not be used.
362
- * Instead, this variable is used when the active row background uses the color of the active cell (border).
363
- *
364
- * Defaults to the value of `var(--infinite-active-cell-background-alpha--table-unfocused)`.
365
- */
366
- activeBackgroundAlphaWhenTableUnfocused:
367
- 'active-row-background-alpha--table-unfocused',
368
-
369
- /**
370
- * Background color for rows, on hover.
371
- *
372
- * Overriden in the `dark` theme.
373
- */
374
- hoverBackground: 'row-hover-background',
375
- selectedHoverBackground: 'row-selected-hover-background',
376
- groupRowBackground: 'group-row-background',
377
- groupRowColumnNesting: 'group-row-column-nesting',
378
- groupNesting: 'dont-override-group-row-nesting-length',
379
- pointerEventsWhileScrolling: 'row-pointer-events-while-scrolling',
380
- },
381
- ColumnCell: {
382
- background: 'column-cell-bg-dont-override',
383
- },
384
- },
385
- },
386
- toCSSVarName,
387
- );
388
-
389
- // declare here vars that default to other vars
390
- const LoadMaskVars = {
391
- [ThemeVars.components.LoadMask.textBackground]: 'rgba(255,255,255,0.8)',
392
- [ThemeVars.components.LoadMask.overlayBackground]: 'gray',
393
- [ThemeVars.components.LoadMask.overlayOpacity]: '0.3',
394
- [ThemeVars.components.LoadMask.color]: 'inherit',
395
- [ThemeVars.components.LoadMask.padding]: ThemeVars.spacing[5],
396
- [ThemeVars.components.LoadMask.borderRadius]: ThemeVars.borderRadius,
397
- };
398
-
399
- const HeaderCellVars = {
400
- [ThemeVars.components.HeaderCell.resizeHandleActiveAreaWidth]: '20px',
401
- [ThemeVars.components.HeaderCell.resizeHandleWidth]: '2px',
402
- [ThemeVars.components.HeaderCell.resizeHandleHoverBackground]: '#6bff6b',
403
- [ThemeVars.components.HeaderCell.resizeHandleConstrainedHoverBackground]:
404
- ThemeVars.color.error,
405
- [ThemeVars.components.HeaderCell.background]: '#ededed',
406
- [ThemeVars.components.HeaderCell.hoverBackground]: '#dfdfdf',
407
- [ThemeVars.components.HeaderCell.paddingX]: ThemeVars.spacing['3'],
408
- [ThemeVars.components.HeaderCell.paddingY]: ThemeVars.spacing['3'],
409
- [ThemeVars.components.HeaderCell
410
- .padding]: `${ThemeVars.components.HeaderCell.paddingY} ${ThemeVars.components.HeaderCell.paddingX} `,
411
-
412
- [ThemeVars.components.HeaderCell.iconSize]: '16px',
413
- [ThemeVars.components.HeaderCell.menuIconLineWidth]: '1px',
414
- [ThemeVars.components.HeaderCell.sortIconMargin]: '16px',
415
- };
416
- const HeaderVars = {
417
- [ThemeVars.components.Header.background]:
418
- ThemeVars.components.HeaderCell.background,
419
- [ThemeVars.components.Header.color]: '#6f6f6f',
420
- [ThemeVars.components.Header.columnHeaderHeight]: '30px',
421
- };
422
-
423
- const CellVars = {
424
- [ThemeVars.components.Cell.color]: 'currentColor',
425
- [ThemeVars.components.Cell.borderWidth]: '1px',
426
- [ThemeVars.components.Cell
427
- .padding]: `${ThemeVars.spacing[2]} ${ThemeVars.spacing[3]}`,
428
- [ThemeVars.components.Cell
429
- .border]: `${ThemeVars.components.Cell.borderWidth} solid #c6c6c6`,
430
-
431
- [ThemeVars.components.Cell
432
- .pinnedBorder]: `${ThemeVars.components.Cell.borderWidth} solid #2a323d`,
433
- [ThemeVars.components.Cell.borderInvisible]: 'none',
434
- [ThemeVars.components.Cell.borderRadius]: ThemeVars.spacing[2],
435
- [ThemeVars.components.Cell.reorderEffectDuration]: '.2s',
436
-
437
- [ThemeVars.components.Cell.activeBorderStyle]: 'dashed',
438
- [ThemeVars.components.Cell.activeBorderWidth]: '1px',
439
- [ThemeVars.components.Cell.activeBorderColor_R]: '77',
440
- [ThemeVars.components.Cell.activeBorderColor_G]: '149',
441
- [ThemeVars.components.Cell.activeBorderColor_B]: '215',
442
-
443
- [ThemeVars.components.Cell.activeBackgroundAlpha]: '0.25',
444
- [ThemeVars.components.Cell.activeBackgroundAlphaWhenTableUnfocused]: '0.1',
445
- };
446
-
447
- const SelectionCheckBoxVars = {
448
- [ThemeVars.components.SelectionCheckBox
449
- .marginInline]: `${ThemeVars.spacing[2]}`,
450
- };
451
-
452
- const RowVars = {
453
- [ThemeVars.components.Row.background]: ThemeVars.background,
454
- [ThemeVars.components.Row.oddBackground]: '#f6f6f6',
455
- [ThemeVars.components.Row.selectedBackground]: '#d1e9ff',
456
- [ThemeVars.components.Row.selectedHoverBackground]: '#add8ff',
457
- [ThemeVars.components.Row.groupRowBackground]: '#cbc5c5',
458
- [ThemeVars.components.Row.groupRowColumnNesting]: '30px',
459
- [ThemeVars.components.Row.hoverBackground]: '#dbdbdb',
460
- [ThemeVars.components.Row.pointerEventsWhileScrolling]: 'auto',
461
- };
462
-
463
- const MenuVars = {
464
- [ThemeVars.components.Menu.background]: ThemeVars.background,
465
- [ThemeVars.components.Menu.color]: ThemeVars.components.Cell.color,
466
- [ThemeVars.components.Menu.padding]: ThemeVars.spacing[3],
467
- [ThemeVars.components.Menu.cellPaddingVertical]: ThemeVars.spacing[3],
468
- [ThemeVars.components.Menu.cellPaddingHorizontal]: ThemeVars.spacing[3],
469
- [ThemeVars.components.Menu.cellMarginVertical]: ThemeVars.spacing[0],
470
- [ThemeVars.components.Menu.itemDisabledBackground]:
471
- ThemeVars.components.Menu.background,
472
- [ThemeVars.components.Menu.itemDisabledOpacity]: 0.5,
473
- [ThemeVars.components.Menu.itemActiveBackground]:
474
- ThemeVars.components.Row.hoverBackground,
475
- [ThemeVars.components.Menu.itemPressedBackground]:
476
- ThemeVars.components.Row.hoverBackground,
477
- [ThemeVars.components.Menu.itemActiveOpacity]: 0.9,
478
- [ThemeVars.components.Menu.itemPressedOpacity]: 1,
479
- [ThemeVars.components.Menu.borderRadius]: ThemeVars.spacing[2],
480
- [ThemeVars.components.Menu.shadowColor]: `rgba(0,0,0,0.25)`,
481
- };
482
-
483
- const LightTheme = {
484
- [ThemeVars.spacing[0]]: '0rem' /* 0px when 1rem=16px */,
485
- [ThemeVars.spacing[1]]: '0.125rem' /* 2px when 1rem=16px */,
486
- [ThemeVars.spacing[2]]: '0.25rem' /* 4px when 1rem=16px */,
487
- [ThemeVars.spacing[3]]: '0.5rem' /* 8px when 1rem=16px */,
488
- [ThemeVars.spacing[4]]: '0.75rem' /* 12px when 1rem=16px */,
489
- [ThemeVars.spacing[5]]: '1rem' /* 16px when 1rem=16px */,
490
- [ThemeVars.spacing[6]]: '1.25rem' /* 20px when 1rem=16px */,
491
- [ThemeVars.spacing[7]]: '1.5rem' /* 24px when 1rem=16px */,
492
- [ThemeVars.spacing[8]]: '2.25rem' /* 36px when 1rem=16px */,
493
- [ThemeVars.spacing[9]]: '3rem' /* 48px when 1rem=16px */,
494
- [ThemeVars.spacing[10]]: '4rem' /* 64px when 1rem=16px */,
495
-
496
- [ThemeVars.fontSize[0]]: '0.5rem' /* 8px when 1rem=16px */,
497
- [ThemeVars.fontSize[1]]: '0.625rem' /* 10px when 1rem=16px */,
498
- [ThemeVars.fontSize[2]]: '0.75rem' /* 12px when 1rem=16px */,
499
- [ThemeVars.fontSize[3]]: '0.875rem' /* 14px when 1rem=16px */,
500
- [ThemeVars.fontSize[4]]: '1rem' /* 16px when 1rem=16px */,
501
- [ThemeVars.fontSize[5]]: '1.25rem' /* 20px when 1rem=16px */,
502
- [ThemeVars.fontSize[6]]: '1.5rem' /* 24px when 1rem=16px */,
503
- [ThemeVars.fontSize[7]]: '2.25rem' /* 36px when 1rem=16px */,
504
-
505
- [ThemeVars.fontFamily]: 'inherit',
506
- [ThemeVars.color.color]: '#484848',
507
- [ThemeVars.color.accent]: '#ff7043',
508
- [ThemeVars.color.error]: '#ff0000',
509
- [ThemeVars.borderRadius]: ThemeVars.spacing[2],
510
- [ThemeVars.background]: 'white',
511
- [ThemeVars.minHeight]: '100px',
512
-
513
- ...SelectionCheckBoxVars,
514
- ...MenuVars,
515
- ...LoadMaskVars,
516
- ...HeaderCellVars,
517
- ...HeaderVars,
518
- ...CellVars,
519
- ...RowVars,
520
- };
521
-
522
- const DarkTheme = {
523
- [ThemeVars.background]: '#101419',
524
- [ThemeVars.components.Cell.border]: '1px solid #2a323d',
525
- [ThemeVars.components.Header.color]: '#c3c3c3',
526
- [ThemeVars.components.HeaderCell.background]: '#1b2129',
527
- [ThemeVars.components.HeaderCell.hoverBackground]: '#222932',
528
- [ThemeVars.components.Header.background]:
529
- ThemeVars.components.HeaderCell.background,
530
- [ThemeVars.components.Row.hoverBackground]: '#3b4754',
531
- [ThemeVars.components.Row.selectedBackground]: '#0a2e4f',
532
- [ThemeVars.components.Row.selectedHoverBackground]: '#0b243a',
533
- [ThemeVars.components.Row.background]: ThemeVars.background,
534
- [ThemeVars.components.Row.oddBackground]: '#242a31',
535
- [ThemeVars.components.Cell.color]: '#c3c3c3',
536
- [ThemeVars.components.Menu.shadowColor]: `rgba(0,0,0,0.25)`,
537
- [ThemeVars.components.Menu.shadowColor]: `rgba(255,255,255,0.25)`,
538
- };
539
-
540
- globalStyle(':root', {
541
- //@ts-ignore
542
- vars: LightTheme,
543
- '@media': {
544
- '(prefers-color-scheme: dark)': {
545
- vars: DarkTheme,
546
- },
547
- },
548
- });
549
-
550
- globalStyle('.light, .infinite-light, .light:root, .infinite-light:root', {
551
- //@ts-ignore
552
- vars: LightTheme,
553
- });
554
- globalStyle('.dark, .infinite-dark', {
555
- vars: DarkTheme,
556
- });
@@ -1,6 +0,0 @@
1
- import { InfiniteTableActionType } from './InfiniteTableActionType';
2
-
3
- export type InfiniteTableAction = {
4
- type: InfiniteTableActionType;
5
- payload?: any;
6
- };
@@ -1,12 +0,0 @@
1
- export enum InfiniteTableActionType {
2
- SET_COLUMN_SIZE,
3
- // SET_VIEWPORT_SIZE,
4
- SET_SCROLL_POSITION,
5
- SET_BODY_SIZE,
6
- SET_COLUMN_ORDER,
7
- SET_COLUMN_VISIBILITY,
8
- SET_COLUMN_SHIFTS,
9
- SET_COLUMN_PINNING,
10
- SET_COLUMN_AGGREGATIONS,
11
- SET_DRAGGING_COLUMN_ID,
12
- }