@fattureincloud/fic-design-system 0.11.2 → 0.12.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -27,8 +27,8 @@ import { TableProps } from './types';
27
27
  * @param {function} onPaginationChange Callback to handle server side pagination
28
28
  * @param {function} renderEmptyState Render a custom empty state for the table's body
29
29
  * @param {function} onRowClick Callback called after a click on a row, returns the row
30
- * @param {number} rowIdHighlight id of the row that will be highlighted
31
30
  * @param {number} actionColumnWidth used to determine the width of the action column
31
+ * @param {function} isRowHighlighted used to underline table rows
32
32
  */
33
- declare const Table: <T>({ data, columns, isSelectable, toggles, onTogglesChange, headerSize, isTogglesSortable, sortable, sortDescFirst, enableSettings, settingsDropdownConfig, rowActions, bulkActions, isLoading, allSelectedCTA, noPagination, pageSize: pageLength, listSize, paginationPreviousText, paginationNextText, onPaginationChange, uniqueId, onSort, renderEmptyState, onRowClick, bodyHeight, totalPages, rowIdHighlight, rowHighlightColor, rowSelection, onRowSelection, forceHideSettings, renderBulkActions, preSettedTableSettings, onChangeTableSettings, notRemovableColumns, rowSize, actionColumnWidth, disableScrollX, resetPageIndex, }: TableProps<T>) => JSX.Element;
33
+ declare const Table: <T>({ data, columns, isSelectable, toggles, onTogglesChange, headerSize, isTogglesSortable, sortable, sortDescFirst, enableSettings, settingsDropdownConfig, rowActions, bulkActions, isLoading, allSelectedCTA, noPagination, pageSize: pageLength, listSize, paginationPreviousText, paginationNextText, onPaginationChange, uniqueId, onSort, renderEmptyState, onRowClick, bodyHeight, totalPages, rowHighlightColor, rowSelection, onRowSelection, forceHideSettings, renderBulkActions, preSettedTableSettings, onChangeTableSettings, notRemovableColumns, rowSize, actionColumnWidth, disableScrollX, resetPageIndex, isRowHighlighted, }: TableProps<T>) => JSX.Element;
34
34
  export default Table;
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { Row } from '@tanstack/react-table';
3
3
  import { TableProps } from '../../types';
4
- interface BodyProps<T> extends Pick<TableProps<T>, 'rowSize' | 'bodyHeight' | 'rowIdHighlight' | 'rowHighlightColor'> {
4
+ interface BodyProps<T> extends Pick<TableProps<T>, 'rowSize' | 'bodyHeight' | 'rowHighlightColor' | 'isRowHighlighted'> {
5
5
  rows: Row<T>[];
6
6
  isLoading?: boolean;
7
7
  onRowClick?: (row: Row<T>) => void;
@@ -9,5 +9,5 @@ interface BodyProps<T> extends Pick<TableProps<T>, 'rowSize' | 'bodyHeight' | 'r
9
9
  actionColumnWidth: number;
10
10
  disableScrollX?: boolean;
11
11
  }
12
- declare const Body: <T>({ rows, rowSize, isLoading, onRowClick, bodyHeight, rowIdHighlight, rowHighlightColor, pageIndex, actionColumnWidth, disableScrollX, }: BodyProps<T>) => JSX.Element;
12
+ declare const Body: <T>({ rows, rowSize, isLoading, onRowClick, bodyHeight, rowHighlightColor, pageIndex, actionColumnWidth, disableScrollX, isRowHighlighted, }: BodyProps<T>) => JSX.Element;
13
13
  export default Body;
@@ -6,9 +6,9 @@ interface TrProps<T> extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLTa
6
6
  defaultRowSize?: RowSize;
7
7
  isLoading?: boolean;
8
8
  onRowClick?: (row: Row<T>) => void;
9
- isRowHighlighted: boolean;
10
9
  rowHighlightColor?: TableProps<T>['rowHighlightColor'];
11
10
  actionColumnWidth: number;
11
+ isRowHighlighted?: (row: Row<T>) => boolean;
12
12
  }
13
- declare const Tr: <T>({ row, isLoading, onRowClick, isRowHighlighted, rowHighlightColor, defaultRowSize, actionColumnWidth, }: TrProps<T>) => JSX.Element;
13
+ declare const Tr: <T>({ row, isLoading, onRowClick, rowHighlightColor, defaultRowSize, actionColumnWidth, isRowHighlighted, }: TrProps<T>) => JSX.Element;
14
14
  export default Tr;
@@ -1,6 +1,7 @@
1
1
  import { CellProps } from '../types';
2
2
  export interface DataType {
3
3
  id: string;
4
+ rowStatus?: 'highlighted';
4
5
  customCell?: CellProps;
5
6
  supplier: CellProps;
6
7
  description: CellProps;
@@ -39,7 +39,7 @@ export interface TableProps<T> {
39
39
  onRowClick?: (row: Row<T>) => void;
40
40
  bodyHeight?: number;
41
41
  totalPages?: number;
42
- rowIdHighlight?: number | string;
42
+ isRowHighlighted?: (row: Row<T>) => boolean;
43
43
  rowHighlightColor?: string;
44
44
  rowSelection?: string[];
45
45
  onRowSelection?: (e: string[]) => void;
@@ -1,4 +1,4 @@
1
1
  /// <reference types="react" />
2
2
  import { SwitchProps } from '.';
3
- declare const Switch: ({ checked, color, onChange }: SwitchProps) => JSX.Element;
3
+ declare const Switch: ({ checked, color, onChange, disabled }: SwitchProps) => JSX.Element;
4
4
  export default Switch;
@@ -1,5 +1,7 @@
1
1
  import { colors } from '../../styles/types';
2
- export declare const SwitchButton: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
2
+ export declare const SwitchButton: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
3
+ disabled: boolean;
4
+ }, never>;
3
5
  export declare const Input: import("styled-components").StyledComponent<"input", import("styled-components").DefaultTheme, {
4
6
  color: colors;
5
7
  }, never>;
@@ -3,4 +3,5 @@ export interface SwitchProps {
3
3
  checked: boolean;
4
4
  onChange: (e: boolean) => void;
5
5
  color?: switchColors;
6
+ disabled?: boolean;
6
7
  }