@loadsmart/loadsmart-ui 6.2.0 → 6.4.0

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.
@@ -1,7 +1,7 @@
1
1
  import { useSelection } from './Selection';
2
2
  import TableSortHandle from './TableSortHandle';
3
- import type { TableProps, TableSectionProps, TableRowProps, TableCellProps, TableCaptionProps, TableSelectionProps, SelectionCellProps, TablePickerItemProps, TablePickerProps, ExpandableTableRowProps, TableBodyProps, TableHeadCellProps } from './Table.types';
4
- declare function Table<T>({ children, selection, scale, ...others }: TableProps<T>): JSX.Element;
3
+ import type { TableProps, TableSectionProps, TableRowProps, TableCellProps, TableCaptionProps, TableSelectionProps, SelectionCellProps, TablePickerItemProps, TablePickerProps, ExpandableTableRowProps, TableHeadCellProps } from './Table.types';
4
+ declare function Table<T>({ children, selection, scale, withExpandableRows, ...others }: TableProps<T>): JSX.Element;
5
5
  declare namespace Table {
6
6
  var Head: typeof TableHead;
7
7
  var Body: typeof TableBody;
@@ -16,6 +16,7 @@ declare namespace Table {
16
16
  HeadCell: typeof SelectionHeadCell;
17
17
  };
18
18
  var Expandable: {
19
+ Head: typeof ExpandableTableHead;
19
20
  HeadCell: typeof ExpandableHeadCell;
20
21
  Cell: typeof ExpandableCell;
21
22
  Row: typeof ExpandableTableRow;
@@ -25,7 +26,8 @@ declare namespace Table {
25
26
  }
26
27
  declare function TableCaption({ children, position, height }: TableCaptionProps): JSX.Element;
27
28
  declare function TableHead({ children, ...others }: TableSectionProps): JSX.Element;
28
- declare function TableBody({ children, withExpandableRows, ...others }: TableBodyProps): JSX.Element;
29
+ declare function ExpandableTableHead({ children, ...others }: TableSectionProps): JSX.Element;
30
+ declare function TableBody({ children, ...others }: TableSectionProps): JSX.Element;
29
31
  declare function TableCell({ children, alignment, format, ...others }: TableCellProps): JSX.Element;
30
32
  declare function SelectionCell<T>({ value, ...props }: SelectionCellProps<T>): JSX.Element;
31
33
  declare function SelectionHeadCell<T>(props: SelectionCellProps<T>): JSX.Element;
@@ -7,6 +7,7 @@ declare type Scale = 'default' | 'small' | 'large';
7
7
  export interface TableProps<T extends Selectable = TableSelectableRow> extends HTMLAttributes<HTMLTableElement> {
8
8
  scale?: Scale;
9
9
  selection?: TableSelectionConfig<T>;
10
+ withExpandableRows?: boolean;
10
11
  }
11
12
  export interface TableCaptionProps extends HTMLAttributes<HTMLTableCaptionElement> {
12
13
  position?: 'top' | 'bottom';
@@ -27,9 +28,6 @@ export interface SelectionCellProps<T extends Selectable = TableSelectableRow> e
27
28
  export interface TableSectionProps extends HTMLAttributes<HTMLTableSectionElement> {
28
29
  scale?: Scale;
29
30
  }
30
- export interface TableBodyProps extends TableSectionProps {
31
- withExpandableRows?: boolean;
32
- }
33
31
  export declare type TableRowProps = HTMLAttributes<HTMLTableRowElement>;
34
32
  export declare type ExpandableTableRowProps = TableRowProps & {
35
33
  expandableContent?: ReactNode;