@fattureincloud/fic-design-system 0.7.10 → 0.7.11

Sign up to get free protection for your applications and to get access to all the features.
@@ -29,6 +29,7 @@ import { TableProps } from './types';
29
29
  * @param {function} onPaginationChange Callback to handle server side pagination
30
30
  * @param {function} renderEmptyState Render a custom empty state for the table's body
31
31
  * @param {function} onRowClick Callback called after a click on a row, returns the row
32
+ * @param {number} rowIdHighlight id of the row that will be highlighted
32
33
  */
33
- declare const Table: <T>({ data, columns, isSelectable, onRowSelectionChange, favorites, onFavoritesChange, toggles, onTogglesChange, rowSize, headerSize, isFavoritesSortable, isTogglesSortable, sortable, sortDescFirst, enableSettings, settingsDropdownConfig, rowActions, bulkActions, isLoading, allSelectedCTA, noPagination, pageSize: pageLength, listSize, paginationPreviousText, paginationNextText, onPaginationChange, uniqueId, onSort, renderEmptyState, onRowClick, bodyHeight, totalPages, }: TableProps<T>) => JSX.Element;
34
+ declare const Table: <T>({ data, columns, isSelectable, onRowSelectionChange, favorites, onFavoritesChange, toggles, onTogglesChange, rowSize, headerSize, isFavoritesSortable, isTogglesSortable, sortable, sortDescFirst, enableSettings, settingsDropdownConfig, rowActions, bulkActions, isLoading, allSelectedCTA, noPagination, pageSize: pageLength, listSize, paginationPreviousText, paginationNextText, onPaginationChange, uniqueId, onSort, renderEmptyState, onRowClick, bodyHeight, totalPages, rowIdHighlight, rowHighlightColor, }: TableProps<T>) => JSX.Element;
34
35
  export default Table;
@@ -1,10 +1,10 @@
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'> {
4
+ interface BodyProps<T> extends Pick<TableProps<T>, 'rowSize' | 'bodyHeight' | 'rowIdHighlight' | 'rowHighlightColor'> {
5
5
  rows: Row<T>[];
6
6
  isLoading?: boolean;
7
7
  onRowClick?: (row: Row<T>) => void;
8
8
  }
9
- declare const Body: <T>({ rows, rowSize, isLoading, onRowClick, bodyHeight }: BodyProps<T>) => JSX.Element;
9
+ declare const Body: <T>({ rows, rowSize, isLoading, onRowClick, bodyHeight, rowIdHighlight, rowHighlightColor, }: BodyProps<T>) => JSX.Element;
10
10
  export default Body;
@@ -1,11 +1,13 @@
1
1
  import { Row } from '@tanstack/react-table';
2
2
  import React from 'react';
3
- import { RowSize } from '../../types';
3
+ import { RowSize, TableProps } from '../../types';
4
4
  interface TrProps<T> extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement> {
5
5
  row: Row<T>;
6
6
  rowSize?: RowSize;
7
7
  isLoading?: boolean;
8
8
  onRowClick?: (row: Row<T>) => void;
9
+ isRowHighlighted: boolean;
10
+ rowHighlightColor?: TableProps<T>['rowHighlightColor'];
9
11
  }
10
- declare const Tr: <T>({ row, isLoading, onRowClick }: TrProps<T>) => JSX.Element;
12
+ declare const Tr: <T>({ row, isLoading, onRowClick, isRowHighlighted, rowHighlightColor }: TrProps<T>) => JSX.Element;
11
13
  export default Tr;
@@ -40,6 +40,8 @@ export interface TableProps<T> {
40
40
  onRowClick?: (row: Row<T>) => void;
41
41
  bodyHeight?: number;
42
42
  totalPages?: number;
43
+ rowIdHighlight?: number | string;
44
+ rowHighlightColor?: string;
43
45
  }
44
46
  interface SettingsDropdownConfig {
45
47
  settingsTooltip?: TooltipProps;
@@ -18,6 +18,7 @@ export interface ToastProps {
18
18
  actionLabel?: string;
19
19
  onActionClick?: () => void;
20
20
  autoClose?: boolean | number;
21
+ isDisabledAction?: boolean;
21
22
  }
22
23
  export interface ToastContentProps {
23
24
  title: ReactNode;
@@ -26,6 +27,7 @@ export interface ToastContentProps {
26
27
  actionLabel?: string;
27
28
  onActionClick?: () => void;
28
29
  type?: ToastType;
30
+ isDisabledAction?: boolean;
29
31
  }
30
32
  export interface ToastInterface {
31
33
  Container: React.FC<ToastContainerProps>;