@fattureincloud/fic-design-system 0.7.9 → 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;
@@ -8,5 +8,5 @@ declare type Props<CellProps> = {
8
8
  rowSize?: RowSize;
9
9
  onRowClick?: (row: Row<CellProps>) => void;
10
10
  } & CustomCellProps & AccessorColumnDef<CellProps> & ActionColumnDef<CellProps> & AdditionalColumnDef<CellProps>;
11
- declare const CustomCell: <CellProps>({ content, isEditable, tag, unitSymbol, headline, leadingIcon, avatar, actionType, row, rowSize, onActionChange, isFavorite, isToggled, hover, onChange, trailingMicroTag, minWidth, rowActions, context, onRowClick, maxWidth, }: Props<CellProps>) => JSX.Element;
11
+ declare const CustomCell: <CellProps>({ content, isEditable, tag, unitSymbol, headline, leadingIcon, avatar, actionType, row, rowSize, onActionChange, isFavorite, isToggled, hover, onChange, trailingMicroTag, minWidth, rowActions, context, onRowClick, maxWidth, align, }: Props<CellProps>) => JSX.Element;
12
12
  export default CustomCell;
@@ -12,6 +12,7 @@ interface CellValues<T> {
12
12
  minWidth?: number;
13
13
  maxWidth?: number;
14
14
  rowActions?: RowActions<T>;
15
+ align: 'center' | 'left' | 'right';
15
16
  }
16
17
  declare const useCellValues: <T>(cell: TCell<T, unknown>, row: Row<T>) => CellValues<T>;
17
18
  export default useCellValues;
@@ -3,6 +3,7 @@ interface LoadingCellProps {
3
3
  isActionCell?: boolean;
4
4
  minWidth?: number;
5
5
  maxWidth?: number;
6
+ align: 'center' | 'right' | 'left';
6
7
  }
7
- declare const LoadingCell: ({ isActionCell, minWidth, maxWidth }: LoadingCellProps) => JSX.Element;
8
+ declare const LoadingCell: ({ isActionCell, minWidth, maxWidth, align }: LoadingCellProps) => JSX.Element;
8
9
  export default LoadingCell;
@@ -2,6 +2,7 @@ export declare const Td: import("styled-components").StyledComponent<"div", impo
2
2
  cellHasOnClick: boolean;
3
3
  minWidth?: number | undefined;
4
4
  maxWidth?: number | undefined;
5
+ align?: "center" | "left" | "right" | undefined;
5
6
  }, never>;
6
7
  export declare const Wrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
7
8
  export declare const LeadingIconContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
@@ -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;
@@ -93,6 +95,7 @@ export declare type AdditionalColumnDef<T> = {
93
95
  maxWidth?: number;
94
96
  headerTooltip?: TooltipProps;
95
97
  customCell?: (row: Row<T>) => JSX.Element;
98
+ align?: 'center' | 'left' | 'right';
96
99
  };
97
100
  export declare type ColumnsType<T> = ({
98
101
  columnDefType: ColumnDefType.ACCESSOR;
@@ -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>;