@sellgar/kit 0.0.172 → 0.0.173

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 (125) hide show
  1. package/dist/index.css +1 -1
  2. package/dist/index.js +4924 -4791
  3. package/package.json +6 -6
  4. package/types/components/table/components/get-pinned-styles.hook.d.ts +19 -0
  5. package/types/components/table/components/tbody/cell/cell.context.d.ts +9 -0
  6. package/types/components/table/components/tbody/cell/cell.d.ts +10 -0
  7. package/types/components/table/components/tbody/cell/index.d.ts +2 -0
  8. package/types/components/table/components/tbody/index.d.ts +1 -0
  9. package/types/components/table/components/tbody/tbody.d.ts +4 -0
  10. package/types/components/table/components/thead/cell/cell.d.ts +10 -0
  11. package/types/components/table/components/thead/cell/index.d.ts +1 -0
  12. package/types/components/table/components/thead/index.d.ts +1 -0
  13. package/types/components/table/components/thead/thead.d.ts +2 -0
  14. package/types/components/table/configuration/cell/cell.d.ts +9 -0
  15. package/types/components/table/configuration/cell/index.d.ts +2 -0
  16. package/types/components/table/configuration/column/column.d.ts +18 -0
  17. package/types/components/table/configuration/column/index.d.ts +2 -0
  18. package/types/components/table/configuration/create-columns-config.d.ts +16 -0
  19. package/types/components/table/configuration/create-data-nodes.d.ts +2 -0
  20. package/types/components/table/configuration/create-expand-config.d.ts +6 -0
  21. package/types/components/table/configuration/create-grid-template.hook.d.ts +2 -0
  22. package/types/components/table/configuration/expand/expand.d.ts +8 -0
  23. package/types/components/table/configuration/get-columns-width.hook.d.ts +3 -0
  24. package/types/components/table/configuration/head/head.d.ts +9 -0
  25. package/types/components/table/configuration/head/index.d.ts +2 -0
  26. package/types/components/table/feature/expand/expand.trigger.d.ts +6 -0
  27. package/types/components/table/feature/expand/hooks/expanded.hook.d.ts +5 -0
  28. package/types/components/table/feature/expand/index.d.ts +2 -0
  29. package/types/components/table/feature/select/cell/cell.d.ts +6 -0
  30. package/types/components/table/feature/select/cell/index.d.ts +1 -0
  31. package/types/components/table/feature/select/compare-columns-config.d.ts +2 -0
  32. package/types/components/table/feature/select/head/head.d.ts +2 -0
  33. package/types/components/table/feature/select/head/index.d.ts +1 -0
  34. package/types/components/table/feature/select/index.d.ts +5 -0
  35. package/types/components/table/feature/select/select.context.d.ts +14 -0
  36. package/types/components/table/feature/select/select.provider.d.ts +6 -0
  37. package/types/components/table/feature/sort/arrow/arrow.d.ts +2 -0
  38. package/types/components/table/feature/sort/arrow/index.d.ts +1 -0
  39. package/types/components/table/feature/sort/index.d.ts +3 -0
  40. package/types/components/table/feature/sort/sort.context.d.ts +8 -0
  41. package/types/components/table/feature/sort/sort.provider.d.ts +10 -0
  42. package/types/components/table/feature/tree/cell/cell.d.ts +5 -0
  43. package/types/components/table/feature/tree/cell/index.d.ts +1 -0
  44. package/types/components/table/feature/tree/compare-columns-config.d.ts +2 -0
  45. package/types/components/table/feature/tree/head/head.d.ts +2 -0
  46. package/types/components/table/feature/tree/head/index.d.ts +1 -0
  47. package/types/components/table/feature/tree/index.d.ts +5 -0
  48. package/types/components/table/feature/tree/tree.context.d.ts +6 -0
  49. package/types/components/table/feature/tree/tree.provider.d.ts +5 -0
  50. package/types/components/table/index.d.ts +2 -7
  51. package/types/components/table/table.context.d.ts +14 -9
  52. package/types/components/table/table.d.ts +33 -7
  53. package/types/components/table4/components/get-pinned-styles.d.ts +13 -0
  54. package/types/components/table4/components/get-pinned-styles.hook.d.ts +13 -0
  55. package/types/components/table4/components/tbody/cell/cell.context.d.ts +4 -0
  56. package/types/components/table4/components/tbody/cell/cell.d.ts +10 -0
  57. package/types/components/table4/components/tbody/cell/index.d.ts +2 -0
  58. package/types/components/table4/components/tbody/index.d.ts +1 -0
  59. package/types/components/table4/components/tbody/tbody.d.ts +2 -0
  60. package/types/components/table4/components/thead/cell/cell.d.ts +10 -0
  61. package/types/components/table4/components/thead/cell/index.d.ts +1 -0
  62. package/types/components/table4/components/thead/index.d.ts +1 -0
  63. package/types/components/table4/components/thead/thead.d.ts +2 -0
  64. package/types/components/table4/configuration/cell/cell.d.ts +8 -0
  65. package/types/components/table4/configuration/cell/index.d.ts +2 -0
  66. package/types/components/table4/configuration/column/column.d.ts +17 -0
  67. package/types/components/table4/configuration/column/index.d.ts +2 -0
  68. package/types/components/table4/configuration/create-columns-config.d.ts +13 -0
  69. package/types/components/table4/configuration/create-data-nodes.d.ts +4 -0
  70. package/types/components/table4/configuration/create-grid-template.hook.d.ts +2 -0
  71. package/types/components/table4/configuration/get-columns-width.hook.d.ts +3 -0
  72. package/types/components/table4/configuration/head/head.d.ts +9 -0
  73. package/types/components/table4/configuration/head/index.d.ts +2 -0
  74. package/types/components/table4/feature/select/cell/cell.d.ts +7 -0
  75. package/types/components/table4/feature/select/cell/index.d.ts +1 -0
  76. package/types/components/table4/feature/select/compare-columns-config.d.ts +2 -0
  77. package/types/components/table4/feature/select/head/head.d.ts +2 -0
  78. package/types/components/table4/feature/select/head/index.d.ts +1 -0
  79. package/types/components/table4/feature/select/index.d.ts +5 -0
  80. package/types/components/table4/feature/select/select.context.d.ts +13 -0
  81. package/types/components/table4/feature/select/select.provider.d.ts +7 -0
  82. package/types/components/table4/feature/sort/arrow/arrow.d.ts +2 -0
  83. package/types/components/table4/feature/sort/arrow/index.d.ts +1 -0
  84. package/types/components/table4/feature/sort/index.d.ts +3 -0
  85. package/types/components/table4/feature/sort/sort.context.d.ts +7 -0
  86. package/types/components/table4/feature/sort/sort.provider.d.ts +7 -0
  87. package/types/components/table4/feature/tree/cell/cell.d.ts +5 -0
  88. package/types/components/table4/feature/tree/cell/index.d.ts +1 -0
  89. package/types/components/table4/feature/tree/compare-columns-config.d.ts +2 -0
  90. package/types/components/table4/feature/tree/head/head.d.ts +2 -0
  91. package/types/components/table4/feature/tree/head/index.d.ts +1 -0
  92. package/types/components/table4/feature/tree/index.d.ts +5 -0
  93. package/types/components/table4/feature/tree/tree.context.d.ts +5 -0
  94. package/types/components/table4/feature/tree/tree.provider.d.ts +5 -0
  95. package/types/components/table4/get-columns-width.hook.d.ts +3 -0
  96. package/types/components/table4/index.d.ts +2 -0
  97. package/types/components/table4/select/index.d.ts +3 -0
  98. package/types/components/table4/select/row-checkbox/index.d.ts +1 -0
  99. package/types/components/table4/select/row-checkbox/row-checkbox.d.ts +6 -0
  100. package/types/components/table4/select/select.context.d.ts +14 -0
  101. package/types/components/table4/select/select.provider.d.ts +6 -0
  102. package/types/components/table4/select/title-checkbox/index.d.ts +1 -0
  103. package/types/components/table4/select/title-checkbox/title-checkbox.d.ts +2 -0
  104. package/types/components/table4/table-cell/index.d.ts +2 -0
  105. package/types/components/table4/table-cell/table-cell.d.ts +10 -0
  106. package/types/components/table4/table-rows/cell/cell.context.d.ts +7 -0
  107. package/types/components/table4/table-rows/cell/cell.d.ts +8 -0
  108. package/types/components/table4/table-rows/cell/cell.provider.d.ts +7 -0
  109. package/types/components/table4/table-rows/cell/hook/cell-data.hook.d.ts +3 -0
  110. package/types/components/table4/table-rows/cell/index.d.ts +3 -0
  111. package/types/components/table4/table-rows/index.d.ts +1 -0
  112. package/types/components/table4/table-rows/row/index.d.ts +1 -0
  113. package/types/components/table4/table-rows/row/row.d.ts +7 -0
  114. package/types/components/table4/table-rows/table-row.context.d.ts +11 -0
  115. package/types/components/table4/table-rows/table-row.provider.d.ts +8 -0
  116. package/types/components/table4/table-rows/table-rows.d.ts +10 -0
  117. package/types/components/table4/table.context.d.ts +10 -0
  118. package/types/components/table4/table.d.ts +39 -0
  119. package/types/components/table4/tree/index.d.ts +3 -0
  120. package/types/components/table4/tree/row-arrow/index.d.ts +1 -0
  121. package/types/components/table4/tree/row-arrow/row-arrow.d.ts +5 -0
  122. package/types/components/table4/tree/title-arrow/index.d.ts +1 -0
  123. package/types/components/table4/tree/title-arrow/title-arrow.d.ts +2 -0
  124. package/types/components/table4/tree/tree.context.d.ts +6 -0
  125. package/types/index.d.ts +1 -1
@@ -0,0 +1,7 @@
1
+ import { default as React } from 'react';
2
+ import { INode } from '../../../table.tsx';
3
+ interface IRowCheckboxProps<T> {
4
+ item: INode<T>;
5
+ }
6
+ export declare const Cell: <T>(props: IRowCheckboxProps<T>) => React.JSX.Element;
7
+ export {};
@@ -0,0 +1 @@
1
+ export { Cell } from './cell.tsx';
@@ -0,0 +1,2 @@
1
+ import { IConfigColumn } from '../../configuration/create-columns-config.ts';
2
+ export declare const compareColumnsConfig: <T>(columns: IConfigColumn<T>[]) => IConfigColumn<T>[];
@@ -0,0 +1,2 @@
1
+ import { default as React } from 'react';
2
+ export declare const Head: <T>() => React.JSX.Element;
@@ -0,0 +1 @@
1
+ export { Head } from './head.tsx';
@@ -0,0 +1,5 @@
1
+ export { Head } from './head';
2
+ export { Cell } from './cell';
3
+ export { useSelectContext } from './select.context.ts';
4
+ export { SelectProvider } from './select.provider.tsx';
5
+ export { compareColumnsConfig } from './compare-columns-config.tsx';
@@ -0,0 +1,13 @@
1
+ import { default as React } from 'react';
2
+ export interface SelectContextValue<T> {
3
+ isSelectedAll: boolean;
4
+ isIndeterminate: boolean;
5
+ selectedItems: T[];
6
+ hasSelected: (item: T) => boolean;
7
+ addItem: (item: T) => void;
8
+ deleteItem: (item: T) => void;
9
+ selectAll: () => void;
10
+ deleteAll: () => void;
11
+ }
12
+ export declare const SelectProvider: React.Provider<SelectContextValue<any> | null>;
13
+ export declare const useSelectContext: <T>() => SelectContextValue<T>;
@@ -0,0 +1,7 @@
1
+ import { default as React } from 'react';
2
+ import { INode } from '../../table.tsx';
3
+ interface IProps<T> {
4
+ onSelect: (items: INode<T>[]) => void;
5
+ }
6
+ export declare const SelectProvider: <T>(props: React.PropsWithChildren<IProps<T>>) => React.JSX.Element;
7
+ export {};
@@ -0,0 +1,2 @@
1
+ import { default as React } from 'react';
2
+ export declare const Arrow: () => React.JSX.Element;
@@ -0,0 +1 @@
1
+ export { Arrow } from './arrow.tsx';
@@ -0,0 +1,3 @@
1
+ export { Arrow } from './arrow';
2
+ export { useSortContext } from './sort.context.ts';
3
+ export { SortProvider } from './sort.provider.tsx';
@@ -0,0 +1,7 @@
1
+ import { default as React } from 'react';
2
+ export interface SortContextValue {
3
+ direction?: 'asc' | 'desc';
4
+ onToggle(): void;
5
+ }
6
+ export declare const SortProvider: React.Provider<SortContextValue | null>;
7
+ export declare const useSortContext: () => SortContextValue;
@@ -0,0 +1,7 @@
1
+ import { default as React } from 'react';
2
+ interface IProps {
3
+ directionDefault?: 'asc' | 'desc';
4
+ onToggle?(direction?: 'asc' | 'desc'): void;
5
+ }
6
+ export declare const SortProvider: (props: React.PropsWithChildren<IProps>) => React.JSX.Element;
7
+ export {};
@@ -0,0 +1,5 @@
1
+ import { default as React } from 'react';
2
+ interface IRowCheckboxProps {
3
+ }
4
+ export declare const Cell: React.FC<IRowCheckboxProps>;
5
+ export {};
@@ -0,0 +1 @@
1
+ export { Cell } from './cell.tsx';
@@ -0,0 +1,2 @@
1
+ import { IConfigColumn } from '../../configuration/create-columns-config.ts';
2
+ export declare const compareColumnsConfig: <T>(columns: IConfigColumn<T>[]) => IConfigColumn<T>[];
@@ -0,0 +1,2 @@
1
+ import { default as React } from 'react';
2
+ export declare const Head: React.FC;
@@ -0,0 +1 @@
1
+ export { Head } from './head.tsx';
@@ -0,0 +1,5 @@
1
+ export { Head } from './head';
2
+ export { Cell } from './cell';
3
+ export { useTreeContext } from './tree.context.ts';
4
+ export { TreeProvider } from './tree.provider.tsx';
5
+ export { compareColumnsConfig } from './compare-columns-config.tsx';
@@ -0,0 +1,5 @@
1
+ import { default as React } from 'react';
2
+ export interface TreeContextValue<T> {
3
+ }
4
+ export declare const TreeProvider: React.Provider<TreeContextValue<any> | null>;
5
+ export declare const useTreeContext: <T>() => TreeContextValue<T>;
@@ -0,0 +1,5 @@
1
+ import { default as React } from 'react';
2
+ interface IProps<T> {
3
+ }
4
+ export declare const TreeProvider: <T>(props: React.PropsWithChildren<IProps<T>>) => React.JSX.Element;
5
+ export {};
@@ -0,0 +1,3 @@
1
+ import { default as React } from 'react';
2
+ import { IConfigColumn } from './table.tsx';
3
+ export declare const getColumnWidth: <T>(tableRef: React.RefObject<HTMLTableElement | null>, config: IConfigColumn<T>[]) => number[];
@@ -0,0 +1,2 @@
1
+ export { Table } from './table.tsx';
2
+ export { useCellData } from './components/tbody/cell';
@@ -0,0 +1,3 @@
1
+ export { RowCheckbox } from './row-checkbox';
2
+ export { TitleCheckbox } from './title-checkbox';
3
+ export { SelectProvider } from './select.provider.tsx';
@@ -0,0 +1 @@
1
+ export { RowCheckbox } from './row-checkbox.tsx';
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ interface IRowCheckboxProps {
3
+ item: any;
4
+ }
5
+ export declare const RowCheckbox: React.FC<IRowCheckboxProps>;
6
+ export {};
@@ -0,0 +1,14 @@
1
+ import { default as React } from 'react';
2
+ interface IContext {
3
+ isSelectedAll: boolean;
4
+ isIndeterminate: boolean;
5
+ selectedItems: any[];
6
+ hasSelected: (item: any) => boolean;
7
+ addItem: (item: any) => void;
8
+ deleteItem: (item: any) => void;
9
+ selectAll: () => void;
10
+ deleteAll: () => void;
11
+ }
12
+ export declare const context: React.Context<IContext>;
13
+ export declare const Provider: React.Provider<IContext>;
14
+ export {};
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ interface IProps<T = any> {
3
+ onSelect: (items: T[]) => void;
4
+ }
5
+ export declare const SelectProvider: React.FC<React.PropsWithChildren<IProps>>;
6
+ export {};
@@ -0,0 +1 @@
1
+ export { TitleCheckbox } from './title-checkbox.tsx';
@@ -0,0 +1,2 @@
1
+ import { default as React } from 'react';
2
+ export declare const TitleCheckbox: React.FC;
@@ -0,0 +1,2 @@
1
+ export { TableCell } from './table-cell.tsx';
2
+ export type { ITableCellProps } from './table-cell.tsx';
@@ -0,0 +1,10 @@
1
+ import { default as React } from 'react';
2
+ import { TTableDataItem } from '../table.tsx';
3
+ export interface ITableCellProps<T> {
4
+ render?: (item: T) => React.ReactNode;
5
+ }
6
+ interface ITableCellPropsWithDisplayName extends React.FC<React.PropsWithChildren<ITableCellProps<TTableDataItem>>> {
7
+ displayName: string;
8
+ }
9
+ export declare const TableCell: ITableCellPropsWithDisplayName;
10
+ export {};
@@ -0,0 +1,7 @@
1
+ import { default as React } from 'react';
2
+ export interface IContext<T> {
3
+ data: T;
4
+ deps: number;
5
+ }
6
+ export declare const context: React.Context<IContext<any>>;
7
+ export declare const Provider: React.Provider<IContext<any>>;
@@ -0,0 +1,8 @@
1
+ import { default as React } from 'react';
2
+ interface IProps<T> {
3
+ data: T;
4
+ collapse: boolean;
5
+ columnIndex: number;
6
+ }
7
+ export declare const Cell: <T>(props: React.PropsWithChildren<IProps<T>>) => React.JSX.Element;
8
+ export {};
@@ -0,0 +1,7 @@
1
+ import { default as React } from 'react';
2
+ interface IProps<T> {
3
+ data: T;
4
+ deps: number;
5
+ }
6
+ export declare const CellProvider: <T>(props: React.PropsWithChildren<IProps<T>>) => React.JSX.Element;
7
+ export {};
@@ -0,0 +1,3 @@
1
+ import { TTableDataItem } from '../../../table.tsx';
2
+ import { IContext } from '../cell.context.ts';
3
+ export declare const useCellData: <T extends TTableDataItem = TTableDataItem>() => IContext<T>;
@@ -0,0 +1,3 @@
1
+ export { Cell } from './cell.tsx';
2
+ export { CellProvider } from './cell.provider.tsx';
3
+ export { useCellData } from './hook/cell-data.hook.ts';
@@ -0,0 +1 @@
1
+ export { TableRows } from './table-rows.tsx';
@@ -0,0 +1 @@
1
+ export { Row } from './row.tsx';
@@ -0,0 +1,7 @@
1
+ import { default as React } from 'react';
2
+ interface IProps<T> {
3
+ data: T;
4
+ deps: number;
5
+ }
6
+ export declare const Row: <T>(props: IProps<T>) => React.JSX.Element;
7
+ export {};
@@ -0,0 +1,11 @@
1
+ import { default as React } from 'react';
2
+ export interface IContext<T> {
3
+ data: T;
4
+ deps: number;
5
+ expanded: boolean;
6
+ setExpanded: (expanded: boolean) => void;
7
+ selected: boolean;
8
+ setSelected: (selected: boolean) => void;
9
+ }
10
+ export declare const context: React.Context<IContext<any>>;
11
+ export declare const Provider: React.Provider<IContext<any>>;
@@ -0,0 +1,8 @@
1
+ import { default as React } from 'react';
2
+ interface IProps<T> {
3
+ data: T;
4
+ deps: number;
5
+ onCallback(state: boolean): void;
6
+ }
7
+ export declare const TableRowProvider: <T>(props: React.PropsWithChildren<IProps<T>>) => React.JSX.Element;
8
+ export {};
@@ -0,0 +1,10 @@
1
+ import { default as React } from 'react';
2
+ import { ITree } from '../table.tsx';
3
+ interface ITableRowsProps<T> {
4
+ data: T;
5
+ tree?: ITree<T>;
6
+ deps: number;
7
+ index: number;
8
+ }
9
+ export declare const TableRows: <T>(props: React.PropsWithChildren<ITableRowsProps<T>>) => React.ReactNode[];
10
+ export {};
@@ -0,0 +1,10 @@
1
+ import { default as React } from 'react';
2
+ import { IData } from './table.tsx';
3
+ import { IConfigColumn } from './configuration/create-columns-config.ts';
4
+ export interface TableContextValue<T> {
5
+ data: IData<T>;
6
+ columns: IConfigColumn<T>[];
7
+ columnsWidth: number[];
8
+ }
9
+ export declare const TableProvider: React.Provider<TableContextValue<any>>;
10
+ export declare const useTableContext: <T>() => TableContextValue<T>;
@@ -0,0 +1,39 @@
1
+ import { default as React } from 'react';
2
+ import { Cell } from './configuration/cell';
3
+ import { Head } from './configuration/head';
4
+ import { Column } from './configuration/column';
5
+ export interface INode<T> {
6
+ id: string | number;
7
+ data: T;
8
+ deps: number;
9
+ meta: any;
10
+ nodes?: INode<T>[];
11
+ }
12
+ export interface IData<T> {
13
+ nodes: T[];
14
+ }
15
+ interface ITreeProps<T> {
16
+ isUse: boolean;
17
+ accessor: keyof T;
18
+ }
19
+ interface ISelectProps<T> {
20
+ isUse: boolean;
21
+ onSelect(nodes: INode<T>[]): void;
22
+ }
23
+ interface IProps<T extends {
24
+ id: string | number;
25
+ }> {
26
+ data: IData<T>;
27
+ tree?: ITreeProps<T>;
28
+ select?: ISelectProps<T>;
29
+ }
30
+ export declare const TableComponent: <T extends {
31
+ id: string | number;
32
+ }>(props: React.PropsWithChildren<IProps<T>>) => React.JSX.Element;
33
+ type TTable = typeof TableComponent & {
34
+ Column: typeof Column;
35
+ Head: typeof Head;
36
+ Cell: typeof Cell;
37
+ };
38
+ export declare const Table: TTable;
39
+ export {};
@@ -0,0 +1,3 @@
1
+ export { RowArrow } from './row-arrow';
2
+ export { TitleArrow } from './title-arrow';
3
+ export { createContext, useContext } from './tree.context.ts';
@@ -0,0 +1 @@
1
+ export { RowArrow } from './row-arrow.tsx';
@@ -0,0 +1,5 @@
1
+ import { default as React } from 'react';
2
+ interface IRowCheckboxProps {
3
+ }
4
+ export declare const RowArrow: React.FC<IRowCheckboxProps>;
5
+ export {};
@@ -0,0 +1 @@
1
+ export { TitleArrow } from './title-arrow.tsx';
@@ -0,0 +1,2 @@
1
+ import { default as React } from 'react';
2
+ export declare const TitleArrow: React.FC;
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ interface IContext<T> {
3
+ }
4
+ export declare const createContext: <T>() => React.Context<any> | React.Context<IContext<T>>;
5
+ export declare const useContext: () => any;
6
+ export {};
package/types/index.d.ts CHANGED
@@ -4,5 +4,5 @@ export * from './components/wrappers';
4
4
  export * from './subcomponents';
5
5
  export * from './components/helpers/animate';
6
6
  export * from './components/modal';
7
- export * from './components/table3';
7
+ export * from './components/table';
8
8
  export * from './components/drawer';