@loadsmart/loadsmart-ui 6.1.4 → 6.3.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 } 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,15 +26,16 @@ 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;
29
+ declare function ExpandableTableHead({ children, ...others }: TableSectionProps): JSX.Element;
28
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;
32
- declare function ExpandableHeadCell(props: TableCellProps): JSX.Element;
34
+ declare function ExpandableHeadCell(props: TableHeadCellProps): JSX.Element;
33
35
  declare function ExpandableCell(props: TableCellProps): JSX.Element;
34
36
  declare function TableRow({ children, ...others }: TableRowProps): JSX.Element;
35
- declare function ExpandableTableRow({ index, expandableContent, expanded, leading: propsLeading, children, onExpandedChange, initialExpanded, ...others }: ExpandableTableRowProps): JSX.Element;
36
- declare function TableHeadCell({ alignment, children, onClick, ...others }: TableCellProps): JSX.Element;
37
+ declare function ExpandableTableRow({ expandableContent, expanded, leading: propsLeading, children, onExpandedChange, initialExpanded, ...others }: ExpandableTableRowProps): JSX.Element;
38
+ declare function TableHeadCell({ alignment, children, onClick, capitalized, ...others }: TableHeadCellProps): JSX.Element;
37
39
  declare function TableSelectionActions({ buttons, children, ...others }: TableSelectionProps): JSX.Element;
38
40
  declare function TablePickerItem<T>({ option, checked, children, ...props }: TablePickerItemProps<T>): JSX.Element;
39
41
  declare function TablePicker<T>({ value, onChange, options, align, children, trigger: propsTrigger, ...props }: TablePickerProps<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';
@@ -29,7 +30,6 @@ export interface TableSectionProps extends HTMLAttributes<HTMLTableSectionElemen
29
30
  }
30
31
  export declare type TableRowProps = HTMLAttributes<HTMLTableRowElement>;
31
32
  export declare type ExpandableTableRowProps = TableRowProps & {
32
- index: number;
33
33
  expandableContent?: ReactNode;
34
34
  leading?: ReactNode | ((expanded: boolean) => ReactNode);
35
35
  initialExpanded?: boolean;
@@ -43,6 +43,9 @@ export interface TableCellProps extends HTMLAttributes<HTMLTableCellElement> {
43
43
  scale?: Scale;
44
44
  selected?: boolean;
45
45
  }
46
+ export interface TableHeadCellProps extends TableCellProps {
47
+ capitalized?: boolean;
48
+ }
46
49
  export declare type TableColumn<T = Record<string, unknown>> = {
47
50
  /**
48
51
  * The accessor of you entry interface