@infinite-table/infinite-react 0.3.8 → 0.3.11

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 (4) hide show
  1. package/index.d.ts +8 -266
  2. package/index.esm.js +103 -40
  3. package/index.js +103 -40
  4. package/package.json +2 -2
package/index.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- import * as _vanilla_extract_private from '@vanilla-extract/private';
2
1
  import * as React$1 from 'react';
3
2
  import { RefCallback, MutableRefObject, CSSProperties, HTMLProps } from 'react';
4
3
 
@@ -506,6 +505,7 @@ declare type InfiniteTablePropPivotGrandTotalColumnPosition = InfiniteTablePropP
506
505
  interface InfiniteTableMappedState<T> {
507
506
  scrollTopKey: InfiniteTableProps<T>['scrollTopKey'];
508
507
  viewportReservedWidth: InfiniteTableProps<T>['viewportReservedWidth'];
508
+ resizableColumns: InfiniteTableProps<T>['resizableColumns'];
509
509
  groupColumn: InfiniteTableProps<T>['groupColumn'];
510
510
  headerOptions: NonUndefined<InfiniteTableProps<T>['headerOptions']>;
511
511
  keyboardNavigation: NonUndefined<InfiniteTableProps<T>['keyboardNavigation']>;
@@ -621,6 +621,7 @@ declare type InfiniteTableColumnType<T> = {
621
621
  resizable?: InfiniteTableColumn<T>['resizable'];
622
622
  align?: InfiniteTableColumn<T>['align'];
623
623
  verticalAlign?: InfiniteTableColumn<T>['verticalAlign'];
624
+ columnGroup?: string;
624
625
  cssEllipsis?: boolean;
625
626
  headerCssEllipsis?: boolean;
626
627
  field?: keyof T;
@@ -1032,6 +1033,9 @@ declare type InfiniteTableComputedColumnBase<T> = {
1032
1033
  computedSortType: string;
1033
1034
  computedDataType: string;
1034
1035
  computedWidth: number;
1036
+ computedFlex: number | null;
1037
+ computedMinWidth: number | null;
1038
+ computedMaxWidth: number | null;
1035
1039
  computedOffset: number;
1036
1040
  computedPinningOffset: number;
1037
1041
  computedAbsoluteOffset: number;
@@ -1048,6 +1052,7 @@ declare type InfiniteTableComputedColumnBase<T> = {
1048
1052
  computedFilterValue: DataSourceFilterValueItem<T> | null;
1049
1053
  computedPinned: InfiniteTableColumnPinnedValues;
1050
1054
  computedDraggable: boolean;
1055
+ computedResizable: boolean;
1051
1056
  computedFirstInCategory: boolean;
1052
1057
  computedLastInCategory: boolean;
1053
1058
  computedFirst: boolean;
@@ -1599,276 +1604,13 @@ declare function useInfiniteHeaderCell<T>(): InfiniteTableColumnHeaderParams<T,
1599
1604
 
1600
1605
  declare function useInfiniteColumnCell<T>(): InfiniteTableColumnCellContextType<T>;
1601
1606
 
1602
- declare const ThemeVars: _vanilla_extract_private.MapLeafNodes<{
1603
- color: {
1604
- /**
1605
- * Brand-specific accent color. This probably needs override to match your app.
1606
- */
1607
- accent: string;
1608
- /**
1609
- * The text color inside the component
1610
- */
1611
- color: string;
1612
- };
1613
- spacing: {
1614
- 0: string;
1615
- 1: string;
1616
- 2: string;
1617
- 3: string;
1618
- 4: string;
1619
- 5: string;
1620
- 6: string;
1621
- 7: string;
1622
- 8: string;
1623
- 9: string;
1624
- 10: string;
1625
- };
1626
- fontSize: {
1627
- 0: string;
1628
- 1: string;
1629
- 2: string;
1630
- 3: string;
1631
- 4: string;
1632
- 5: string;
1633
- 6: string;
1634
- 7: string;
1635
- };
1636
- fontFamily: string;
1637
- minHeight: string;
1638
- borderRadius: string;
1639
- /**
1640
- * The background color for the whole component.
1641
- *
1642
- * Overriden in the `dark` theme.
1643
- */
1644
- background: string;
1645
- components: {
1646
- LoadMask: {
1647
- /**
1648
- * The padding used for the content inside the LoadMask.
1649
- */
1650
- padding: string;
1651
- color: string;
1652
- textBackground: string;
1653
- overlayBackground: string;
1654
- overlayOpacity: string;
1655
- borderRadius: string;
1656
- };
1657
- Header: {
1658
- /**
1659
- * Background color for the header. Defaults to [`--infinie-header-cell-background`](#header-cell-background).
1660
- *
1661
- * Overriden in the `dark` theme.
1662
- */
1663
- background: string;
1664
- /**
1665
- * The text color inside the header.
1666
- *
1667
- * Overriden in the `dark` theme.
1668
- */
1669
- color: string;
1670
- columnHeaderHeight: string;
1671
- };
1672
- HeaderCell: {
1673
- draggingBackground: string;
1674
- /**
1675
- * Background for header cells.
1676
- *
1677
- * Overriden in the `dark` theme.
1678
- */
1679
- background: string;
1680
- padding: string;
1681
- paddingX: string;
1682
- paddingY: string;
1683
- iconSize: string;
1684
- sortIconMargin: string;
1685
- };
1686
- Cell: {
1687
- padding: string;
1688
- borderWidth: string;
1689
- /**
1690
- * Specifies the border for cells.
1691
- *
1692
- * Overriden in the `dark` theme - eg: `1px solid #2a323d`
1693
- */
1694
- border: string;
1695
- borderInvisible: string;
1696
- borderRadius: string;
1697
- /**
1698
- * Text color inside rows. Defaults to `currentColor`
1699
- *
1700
- * Overriden in `dark` theme.
1701
- */
1702
- color: string;
1703
- /**
1704
- * The RED component of the color used for the active cell when cell keyboard navigation is enabled.
1705
- *
1706
- * The easiest way to define the color of the active cell is to use these 3 variables:
1707
- * `--infinite-active-cell-border-color--r`
1708
- * `--infinite-active-cell-border-color--g`
1709
- * `--infinite-active-cell-border-color--b`
1710
- * as they define both the border and the background color of the active cell and the active row.
1711
- *
1712
- * You can also specify the GREEN and BLUE components of the color using the next two css vars.
1713
- *
1714
- * The border color of the active cell is decomposed into multiple variables for convenience as by default
1715
- * the background of the active cell is the same color, but with the opacity specified by the value of `--infinie-active-cell-background-alpha`.
1716
- *
1717
- * If you don't want this, you can use `--infinite-active-cell-background` instead.
1718
- */
1719
- activeBorderColor_R: string;
1720
- /**
1721
- * The GREEN component of the color used for the active cell when cell keyboard navigation is enabled.
1722
- *
1723
- * The easiest way to define the color of the active cell is to use these 3 variables:
1724
- * `--infinite-active-cell-border-color--r`
1725
- * `--infinite-active-cell-border-color--g`
1726
- * `--infinite-active-cell-border-color--b`
1727
- * as they define both the border and the background color of the active cell and the active row.
1728
- *
1729
- * You can also specify the RED and BLUE components of the color using the next two css vars.
1730
- *
1731
- * The border color of the active cell is decomposed into multiple variables for convenience as by default
1732
- * the background of the active cell is the same color, but with the opacity specified by the value of `--infinie-active-cell-background-alpha`.
1733
- *
1734
- * If you don't want this, you can use `--infinite-active-cell-background` instead.
1735
- */
1736
- activeBorderColor_G: string;
1737
- /**
1738
- * The BLUE component of the color used for the active cell when cell keyboard navigation is enabled.
1739
- *
1740
- * The easiest way to define the color of the active cell is to use these 3 variables:
1741
- * `--infinite-active-cell-border-color--r`
1742
- * `--infinite-active-cell-border-color--g`
1743
- * `--infinite-active-cell-border-color--b`
1744
- * as they define both the border and the background color of the active cell and the active row.
1745
- *
1746
- * You can also specify the RED and GREEN components of the color using the next two css vars.
1747
- *
1748
- * The border color of the active cell is decomposed into multiple variables for convenience as by default
1749
- * the background of the active cell is the same color, but with the opacity specified by the value of `--infinie-active-cell-background-alpha`.
1750
- *
1751
- * If you don't want this, you can use `--infinite-active-cell-background` instead.
1752
- */
1753
- activeBorderColor_B: string;
1754
- /**
1755
- * The opacity of the background color for the active cell (when cell keyboard navigation is enabled).
1756
- *
1757
- * 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.
1758
- * This is applied when the component has focus.
1759
- */
1760
- activeBackgroundAlpha: string;
1761
- /**
1762
- * Same as the above, but applied when the component does not have focus.
1763
- */
1764
- activeBackgroundAlphaWhenTableUnfocused: string;
1765
- /**
1766
- * The background color of the active cell defaults to the same color (with modified opacity, as explained above) as the border color.
1767
- *
1768
- * However, specify this to explicitly override the default.
1769
- */
1770
- activeBackground: string;
1771
- /**
1772
- * The color for border of the active cell (when cell keyboard navigation is enabled).
1773
- */
1774
- activeBorderColor: string;
1775
- /**
1776
- * The width of the border for the active cell.
1777
- */
1778
- activeBorderWidth: string;
1779
- /**
1780
- * The style of the border for the active cell (eg: 'solid', 'dashed', 'dotted') - defaults to 'dashed'.
1781
- */
1782
- activeBorderStyle: string;
1783
- /**
1784
- * 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)`.
1785
- */
1786
- activeBorder: string;
1787
- };
1788
- Row: {
1789
- /**
1790
- * Background color for rows. Defaults to [`--infinite-background`](#background).
1791
- *
1792
- * Overriden in `dark` theme.
1793
- */
1794
- background: string;
1795
- /**
1796
- * Background color for odd rows. Even rows will use [`--infinite-row-background`](#row-background).
1797
- *
1798
- * Overriden in `dark` theme.
1799
- */
1800
- oddBackground: string;
1801
- /**
1802
- * The background color of the active row. Defaults to the value of `var(--infinite-active-cell-background)`.
1803
- *
1804
- * However, specify this to explicitly override the default.
1805
- */
1806
- activeBackground: string;
1807
- /**
1808
- * The border color for the active row. Defaults to the value of `var(--infinite-active-cell-border-color)`.
1809
- */
1810
- activeBorderColor: string;
1811
- /**
1812
- * The width of the border for the active row. Defaults to the value of `var(--infinite-active-cell-border-width)`.
1813
- */
1814
- activeBorderWidth: string;
1815
- /**
1816
- * 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.
1817
- */
1818
- activeBorderStyle: string;
1819
- /**
1820
- * 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)`.
1821
- */
1822
- activeBorder: string;
1823
- /**
1824
- * The opacity of the background color for the active row (when row keyboard navigation is enabled).
1825
- * When you explicitly specify `--infinite-active-row-background`, this variable will not be used.
1826
- * Instead, this variable is used when the active row background uses the color of the active cell (border).
1827
- *
1828
- * This is applied when the component has focus.
1829
- *
1830
- * Defaults to the value of `var(--infinite-active-cell-background-alpha)`.
1831
- */
1832
- activeBackgroundAlpha: string;
1833
- /**
1834
- * Same as the above, but applied when the component does not have focus.
1835
- *
1836
- * When you explicitly specify `--infinite-active-row-background`, this variable will not be used.
1837
- * Instead, this variable is used when the active row background uses the color of the active cell (border).
1838
- *
1839
- * Defaults to the value of `var(--infinite-active-cell-background-alpha--table-unfocused)`.
1840
- */
1841
- activeBackgroundAlphaWhenTableUnfocused: string;
1842
- /**
1843
- * Background color for rows, on hover.
1844
- *
1845
- * Overriden in the `dark` theme.
1846
- */
1847
- hoverBackground: string;
1848
- groupRowBackground: string;
1849
- groupRowColumnNesting: string;
1850
- groupNesting: string;
1851
- pointerEventsWhileScrolling: string;
1852
- };
1853
- ColumnCell: {
1854
- background: string;
1855
- };
1856
- };
1857
- }, _vanilla_extract_private.CSSVarFunction>;
1858
- declare const LightTheme: {
1859
- [x: string]: string;
1860
- };
1861
- declare const DarkTheme: {
1862
- [x: string]: string;
1863
- };
1864
-
1865
1607
  declare const InfiniteTableClassName: string;
1866
1608
  declare const InfiniteTableComponent: React$1.MemoExoticComponent<(<T>() => JSX.Element)>;
1867
1609
  declare function InfiniteTable<T>(props: InfiniteTableProps<T>): JSX.Element;
1868
1610
  declare namespace InfiniteTable {
1869
1611
  var defaultProps: {
1870
1612
  rowHeight: number;
1871
- columnHeaderHeight: _vanilla_extract_private.CSSVarFunction;
1613
+ columnHeaderHeight: string;
1872
1614
  };
1873
1615
  }
1874
1616
 
@@ -1933,4 +1675,4 @@ declare const defaultFilterEditors: InfiniteTablePropFilterEditors<unknown>;
1933
1675
  declare function StringFilterEditor<T>(props: InfiniteTableFilterEditorProps<T>): JSX.Element;
1934
1676
  declare function NumberFilterEditor<T>(props: InfiniteTableFilterEditorProps<T>): JSX.Element;
1935
1677
 
1936
- export { ColumnTypeWithInherit, DarkTheme, DataSource, DataSourceAction, DataSourceActionType, DataSourceAggregationReducer, DataSourceComponentActions, DataSourceContextValue, DataSourceData, DataSourceDataParams, DataSourceDataParamsChanges, DataSourceDerivedState, DataSourceFilterFunctionParam, DataSourceFilterOperator, DataSourceFilterOperatorFunction, DataSourceFilterOperatorFunctionParam, DataSourceFilterType, DataSourceFilterValueItem, DataSourceFilterValueItemValueGetter, DataSourceGroupBy, DataSourceGroupRowsList, DataSourceLivePaginationCursorFn, DataSourceLivePaginationCursorParams, DataSourceLivePaginationCursorValue, DataSourceMappedState, DataSourceMappings, DataSourcePivotBy, DataSourcePropAggregationReducers, DataSourcePropFilterFunction, DataSourcePropFilterTypes, DataSourcePropFilterValue, DataSourcePropGroupBy, DataSourcePropGroupRowsStateObject, DataSourcePropLivePaginationCursor, DataSourcePropPivotBy, DataSourcePropSortInfo, DataSourcePropSortTypes, DataSourceProps, DataSourceReducer, DataSourceRemoteData, DataSourceSetupState, DataSourceSingleSortInfo, DataSourceSortInfo, DataSourceState, GroupRowsState, InfiniteTable, InfiniteTableAction, InfiniteTableActionType, InfiniteTableClassName, InfiniteTableColumn, InfiniteTableColumnAggregator, InfiniteTableColumnComparer, InfiniteTableColumnGroup, InfiniteTableColumnRenderParam, InfiniteTableColumnRenderValueParam, InfiniteTableColumnRowspanParam, InfiniteTableColumnSizingOptions, InfiniteTableComponent, InfiniteTableComputedColumn, InfiniteTableComputedValues, InfiniteTableContextValue, InfiniteTableFilterEditorProps, InfiniteTableGroupColumnBase, InfiniteTableGroupColumnFunction, InfiniteTableGroupColumnGetterOptions, InfiniteTableGroupColumnRenderIconFunction, InfiniteTableImperativeApi, InfiniteTablePivotColumn, InfiniteTablePropAutoSizeColumnsKey, InfiniteTablePropColumnGroups, InfiniteTablePropColumnOrder, InfiniteTablePropColumnPinning, InfiniteTablePropColumnSizing, InfiniteTablePropColumnTypes, InfiniteTablePropColumnVisibility, InfiniteTablePropColumns, InfiniteTablePropColumnsMap, InfiniteTablePropComponents, InfiniteTablePropFilterEditors, InfiniteTablePropGroupColumn, InfiniteTablePropGroupRenderStrategy, InfiniteTablePropHeaderOptions, InfiniteTablePropKeyboardNavigation, InfiniteTablePropRowClassName, InfiniteTablePropRowStyle, InfiniteTableProps, InfiniteTableRowClassNameFn, InfiniteTableRowInfo, InfiniteTableRowStyleFn, InfiniteTableState, LazyGroupDataDeepMap, LazyGroupDataItem, LazyRowInfoGroup, LightTheme, NumberFilterEditor, Scrollbars, StringFilterEditor, ThemeVars, debounce, defaultFilterEditors, defaultFilterTypes, defaultFilterTypes as filterTypes, flatten, getComponentStateRoot, group, interceptMap, multisort, useComponentState, useDataSource, useEffectWithChanges, useInfiniteColumnCell, useInfiniteHeaderCell };
1678
+ export { ColumnTypeWithInherit, DataSource, DataSourceAction, DataSourceActionType, DataSourceAggregationReducer, DataSourceComponentActions, DataSourceContextValue, DataSourceData, DataSourceDataParams, DataSourceDataParamsChanges, DataSourceDerivedState, DataSourceFilterFunctionParam, DataSourceFilterOperator, DataSourceFilterOperatorFunction, DataSourceFilterOperatorFunctionParam, DataSourceFilterType, DataSourceFilterValueItem, DataSourceFilterValueItemValueGetter, DataSourceGroupBy, DataSourceGroupRowsList, DataSourceLivePaginationCursorFn, DataSourceLivePaginationCursorParams, DataSourceLivePaginationCursorValue, DataSourceMappedState, DataSourceMappings, DataSourcePivotBy, DataSourcePropAggregationReducers, DataSourcePropFilterFunction, DataSourcePropFilterTypes, DataSourcePropFilterValue, DataSourcePropGroupBy, DataSourcePropGroupRowsStateObject, DataSourcePropLivePaginationCursor, DataSourcePropPivotBy, DataSourcePropSortInfo, DataSourcePropSortTypes, DataSourceProps, DataSourceReducer, DataSourceRemoteData, DataSourceSetupState, DataSourceSingleSortInfo, DataSourceSortInfo, DataSourceState, GroupRowsState, InfiniteTable, InfiniteTableAction, InfiniteTableActionType, InfiniteTableClassName, InfiniteTableColumn, InfiniteTableColumnAggregator, InfiniteTableColumnComparer, InfiniteTableColumnGroup, InfiniteTableColumnRenderParam, InfiniteTableColumnRenderValueParam, InfiniteTableColumnRowspanParam, InfiniteTableColumnSizingOptions, InfiniteTableComponent, InfiniteTableComputedColumn, InfiniteTableComputedValues, InfiniteTableContextValue, InfiniteTableFilterEditorProps, InfiniteTableGroupColumnBase, InfiniteTableGroupColumnFunction, InfiniteTableGroupColumnGetterOptions, InfiniteTableGroupColumnRenderIconFunction, InfiniteTableImperativeApi, InfiniteTablePivotColumn, InfiniteTablePropAutoSizeColumnsKey, InfiniteTablePropColumnGroups, InfiniteTablePropColumnOrder, InfiniteTablePropColumnPinning, InfiniteTablePropColumnSizing, InfiniteTablePropColumnTypes, InfiniteTablePropColumnVisibility, InfiniteTablePropColumns, InfiniteTablePropColumnsMap, InfiniteTablePropComponents, InfiniteTablePropFilterEditors, InfiniteTablePropGroupColumn, InfiniteTablePropGroupRenderStrategy, InfiniteTablePropHeaderOptions, InfiniteTablePropKeyboardNavigation, InfiniteTablePropRowClassName, InfiniteTablePropRowStyle, InfiniteTableProps, InfiniteTableRowClassNameFn, InfiniteTableRowInfo, InfiniteTableRowStyleFn, InfiniteTableState, LazyGroupDataDeepMap, LazyGroupDataItem, LazyRowInfoGroup, NumberFilterEditor, Scrollbars, StringFilterEditor, debounce, defaultFilterEditors, defaultFilterTypes, defaultFilterTypes as filterTypes, flatten, getComponentStateRoot, group, interceptMap, multisort, useComponentState, useDataSource, useEffectWithChanges, useInfiniteColumnCell, useInfiniteHeaderCell };