@fattureincloud/fic-design-system 0.7.43 → 0.7.44

Sign up to get free protection for your applications and to get access to all the features.
@@ -8,6 +8,7 @@ import { CheckboxProps } from './types';
8
8
  * @param {function} onClick Callback called on component click
9
9
  * @param {string} text Component label text
10
10
  * @param {CheckboxStatus} value Checkbox status
11
+ * @param {string} textColor To change label text color
11
12
  */
12
13
  declare const Checkbox: ({ value, ...rest }: CheckboxProps) => JSX.Element;
13
14
  export default Checkbox;
@@ -37,6 +37,7 @@ export interface CheckboxImplProps extends Omit<CheckboxInputProps, 'hasError'>,
37
37
  helper?: InputHelperProps;
38
38
  className?: string;
39
39
  onChange?: InputHTMLAttributes<HTMLInputElement>['onChange'];
40
+ textColor?: paletteColor;
40
41
  }
41
42
  export interface CheckboxProps extends Omit<CheckboxImplProps, 'value'> {
42
43
  value: CheckboxImplProps['value'] | boolean;
@@ -27,6 +27,7 @@ import { TableProps } from './types';
27
27
  * @param {function} renderEmptyState Render a custom empty state for the table's body
28
28
  * @param {function} onRowClick Callback called after a click on a row, returns the row
29
29
  * @param {number} rowIdHighlight id of the row that will be highlighted
30
+ * @param {string | number} actionColumnWidth used to determine the width of the action column
30
31
  */
31
- 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, }: TableProps<T>) => JSX.Element;
32
+ 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, }: TableProps<T>) => JSX.Element;
32
33
  export default Table;
@@ -5,6 +5,8 @@ interface BodyProps<T> extends Pick<TableProps<T>, 'rowSize' | 'bodyHeight' | 'r
5
5
  isLoading?: boolean;
6
6
  onRowClick?: (row: Row<T>) => void;
7
7
  pageIndex: number;
8
+ actionColumnWidth?: string | number;
9
+ disableScrollX?: boolean;
8
10
  }
9
- declare const Body: <T>({ rows, rowSize, isLoading, onRowClick, bodyHeight, rowIdHighlight, rowHighlightColor, pageIndex, }: BodyProps<T>) => JSX.Element;
11
+ declare const Body: <T>({ rows, rowSize, isLoading, onRowClick, bodyHeight, rowIdHighlight, rowHighlightColor, pageIndex, actionColumnWidth, disableScrollX, }: BodyProps<T>) => JSX.Element;
10
12
  export default Body;
@@ -7,6 +7,7 @@ interface Props<T> {
7
7
  rowSize?: RowSize;
8
8
  isLoading?: boolean;
9
9
  onRowClick?: (row: Row<T>) => void;
10
+ actionColumnWidth?: string | number;
10
11
  }
11
- declare const Cell: <T>({ cell, row, hover, rowSize, isLoading, onRowClick }: Props<T>) => JSX.Element;
12
+ declare const Cell: <T>({ cell, row, hover, rowSize, isLoading, onRowClick, actionColumnWidth }: Props<T>) => JSX.Element;
12
13
  export default Cell;
@@ -7,6 +7,7 @@ interface Props<T> extends ActionColumnDef<T> {
7
7
  column: Column<T, unknown>;
8
8
  maxWidth?: number;
9
9
  minWidth?: number;
10
+ actionColumnWidth?: string | number;
10
11
  }
11
- declare const CustomActionCell: <T>({ actionType, row, isToggled, onActionChange, rowActions, column, maxWidth, minWidth, }: Props<T>) => JSX.Element;
12
+ declare const CustomActionCell: <T>({ actionType, row, isToggled, onActionChange, rowActions, column, maxWidth, minWidth, actionColumnWidth, }: Props<T>) => JSX.Element;
12
13
  export default CustomActionCell;
@@ -5,7 +5,8 @@ declare type Props<CellProps> = {
5
5
  context: CellContext<CellProps, unknown>;
6
6
  hover?: boolean;
7
7
  rowSize?: RowSize;
8
+ actionColumnWidth?: string | number;
8
9
  onRowClick?: (row: Row<CellProps>) => void;
9
10
  } & CustomCellProps & AccessorColumnDef<CellProps> & ActionColumnDef<CellProps> & AdditionalColumnDef<CellProps>;
10
- declare const CustomCell: <CellProps>({ content, isEditable, tag, unitSymbol, headline, leadingIcon, avatar, actionType, row, rowSize, onActionChange, isToggled, hover, onChange, trailingMicroTag, minWidth, rowActions, context, onRowClick, maxWidth, align, disableClick, }: Props<CellProps>) => JSX.Element;
11
+ declare const CustomCell: <CellProps>({ content, isEditable, tag, unitSymbol, headline, leadingIcon, avatar, actionType, row, rowSize, onActionChange, isToggled, hover, onChange, trailingMicroTag, minWidth, rowActions, context, onRowClick, maxWidth, align, disableClick, actionColumnWidth, }: Props<CellProps>) => JSX.Element;
11
12
  export default CustomCell;
@@ -22,4 +22,6 @@ export declare const MicroTagContainer: import("styled-components").StyledCompon
22
22
  export declare const InputTextWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
23
23
  hasMeasureUnit?: boolean | undefined;
24
24
  }, never>;
25
- export declare const ContentContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
25
+ export declare const ContentContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
26
+ unitSymbol?: string | undefined;
27
+ }, never>;
@@ -15,6 +15,7 @@ interface HeaderProps<T> {
15
15
  notRemovableColumns?: string[];
16
16
  onChangeTableSettings?: onChangeTableSettings;
17
17
  isLoading: boolean;
18
+ actionColumnWidth?: string | number;
18
19
  }
19
- declare const Header: <T>({ headerGroup, headerSize, onSort, forceHideSettings, rowSelection, setRowSelection, preSettedTableSettings, onChangeTableSettings, notRemovableColumns, isLoading, }: HeaderProps<T>) => JSX.Element;
20
+ declare const Header: <T>({ headerGroup, headerSize, onSort, forceHideSettings, rowSelection, setRowSelection, preSettedTableSettings, onChangeTableSettings, notRemovableColumns, isLoading, actionColumnWidth, }: HeaderProps<T>) => JSX.Element;
20
21
  export default Header;
@@ -1,8 +1,9 @@
1
1
  import { Header } from '@tanstack/react-table';
2
2
  import { onChangeTableSettings } from '../../../types';
3
- interface CustomHeaderCellProps<T> {
3
+ export interface CustomHeaderCellProps<T> {
4
4
  header: Header<T, unknown>;
5
5
  onOpen?: (isOpen: boolean) => void;
6
+ onClose?: (isOpen: boolean) => void;
6
7
  forceHideSettings: boolean;
7
8
  rowSelection?: string[];
8
9
  setRowSelection?: (e: string[]) => void;
@@ -10,6 +11,7 @@ interface CustomHeaderCellProps<T> {
10
11
  dimensionRow?: number;
11
12
  onChangeTableSettings?: onChangeTableSettings;
12
13
  isLoading: boolean;
14
+ actionColumnWidth?: number | string;
13
15
  }
14
- declare const ActionHeaderCell: <T>({ header, onOpen, forceHideSettings, rowSelection, setRowSelection, notRemovableColumns, dimensionRow, onChangeTableSettings, isLoading, }: CustomHeaderCellProps<T>) => JSX.Element;
16
+ declare const ActionHeaderCell: <T>({ header, onOpen, onClose, forceHideSettings, rowSelection, setRowSelection, notRemovableColumns, dimensionRow, onChangeTableSettings, isLoading, actionColumnWidth, }: CustomHeaderCellProps<T>) => JSX.Element;
15
17
  export default ActionHeaderCell;
@@ -14,6 +14,7 @@ interface HeaderCellProps<T> {
14
14
  dimensionRow?: number;
15
15
  onChangeTableSettings?: onChangeTableSettings;
16
16
  isLoading: boolean;
17
+ actionColumnWidth?: string | number;
17
18
  }
18
- declare const HeaderCell: <T>({ header, headerSize, onSort, customSorted, setCustomSorted, forceHideSettings, rowSelection, setRowSelection, notRemovableColumns, dimensionRow, onChangeTableSettings, isLoading, }: HeaderCellProps<T>) => JSX.Element;
19
+ declare const HeaderCell: <T>({ header, headerSize, onSort, customSorted, setCustomSorted, forceHideSettings, rowSelection, setRowSelection, notRemovableColumns, dimensionRow, onChangeTableSettings, isLoading, actionColumnWidth, }: HeaderCellProps<T>) => JSX.Element;
19
20
  export default HeaderCell;
@@ -8,6 +8,7 @@ interface TrProps<T> extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLTa
8
8
  onRowClick?: (row: Row<T>) => void;
9
9
  isRowHighlighted: boolean;
10
10
  rowHighlightColor?: TableProps<T>['rowHighlightColor'];
11
+ actionColumnWidth?: string | number;
11
12
  }
12
- declare const Tr: <T>({ row, isLoading, onRowClick, isRowHighlighted, rowHighlightColor, defaultRowSize, }: TrProps<T>) => JSX.Element;
13
+ declare const Tr: <T>({ row, isLoading, onRowClick, isRowHighlighted, rowHighlightColor, defaultRowSize, actionColumnWidth, }: TrProps<T>) => JSX.Element;
13
14
  export default Tr;
@@ -1,4 +1,4 @@
1
1
  import { BulkAction, RowActions } from '../types';
2
2
  import { DataType } from './types';
3
3
  export declare const rowActions: RowActions<DataType>;
4
- export declare const bulkActions: BulkAction<DataType>[];
4
+ export declare const bulkActions: BulkAction[];
@@ -1,4 +1,5 @@
1
1
  import { DisplayColumnDef, GroupColumnDef, IdentifiedColumnDef, PaginationState, Row, SortDirection } from '@tanstack/react-table';
2
+ import { buttonColors } from 'components/buttons/button/types';
2
3
  import { AvatarProps } from '../avatar';
3
4
  import { ButtonProps } from '../buttons';
4
5
  import { DropdownItemType } from '../dropdown';
@@ -49,6 +50,8 @@ export interface TableProps<T> {
49
50
  };
50
51
  notRemovableColumns?: string[];
51
52
  onChangeTableSettings?: onChangeTableSettings;
53
+ actionColumnWidth?: string | number;
54
+ disableScrollX?: boolean;
52
55
  }
53
56
  export declare type onChangeTableSettings = (key: keyof PreSettedTableSettings, valueChange: Pick<PreSettedTableSettings, 'orderColumns' | 'dimensionRow' | 'notVisibleColumns'>) => void;
54
57
  export interface PreSettedTableSettings {
@@ -167,10 +170,14 @@ declare type BasicPrimaryAction<T> = {
167
170
  interface PrimaryTextAction<T> extends BasicPrimaryAction<T> {
168
171
  text?: string | number;
169
172
  icon?: never;
173
+ color?: buttonColors;
174
+ className?: string;
170
175
  }
171
176
  interface PrimaryIconAction<T> extends BasicPrimaryAction<T> {
172
177
  text?: never;
173
178
  icon?: IconProps;
179
+ color?: buttonColors;
180
+ className?: string;
174
181
  }
175
182
  export declare type PrimaryAction<T> = PrimaryTextAction<T> | PrimaryIconAction<T>;
176
183
  export declare type DropdownAction<T> = {
@@ -8,6 +8,6 @@ interface ColumnsHelperProps<T> extends Omit<TableProps<T>, 'data' | 'uniqueId'>
8
8
  notVisibleColumns?: string[];
9
9
  };
10
10
  }
11
- export declare const useColumnsHelper: <T>({ columns, isSelectable, toggles, isTogglesSortable, onTogglesChange, rowActions, enableSettings, settingsDropdownConfig, preSettedTableSettings, }: ColumnsHelperProps<T>) => ColumnDef<T, CellProps>[];
11
+ export declare const useColumnsHelper: <T>({ columns, isSelectable, toggles, isTogglesSortable, onTogglesChange, rowActions, enableSettings, settingsDropdownConfig, preSettedTableSettings, actionColumnWidth, }: ColumnsHelperProps<T>) => ColumnDef<T, CellProps>[];
12
12
  export declare const getNextSortingDirection: (direction?: false | SortDirection | undefined) => false | SortDirection;
13
13
  export {};
@@ -2,6 +2,7 @@ import { RefObject } from 'react';
2
2
  import { TabsItem } from './types';
3
3
  interface Props extends TabsItem {
4
4
  tabRef?: () => RefObject<HTMLDivElement>;
5
+ customBadge?: JSX.Element;
5
6
  }
6
- declare const Item: ({ active, handleClick, tabRef, text, tooltip, badge }: Props) => JSX.Element;
7
+ declare const Item: ({ active, handleClick, tabRef, text, tooltip, badge, customBadge }: Props) => JSX.Element;
7
8
  export default Item;
@@ -13,4 +13,5 @@ export interface TabsItem {
13
13
  handleClick?: () => void;
14
14
  tooltip?: TooltipProps;
15
15
  badge?: TabsBadgeProps;
16
+ customBadge?: JSX.Element;
16
17
  }
@@ -1,7 +1,7 @@
1
1
  import { Meta } from '@storybook/react';
2
- import React from 'react';
3
2
  import { TabsProps } from './common/types';
4
- export declare const WithDropdown: () => React.JSX.Element;
5
- export declare const Scrollable: () => React.JSX.Element;
3
+ export declare const WithDropdown: () => JSX.Element;
4
+ export declare const Scrollable: () => JSX.Element;
6
5
  declare const TabsStories: Meta<TabsProps>;
6
+ export declare const WithCustomBadge: () => JSX.Element;
7
7
  export default TabsStories;
@@ -0,0 +1,4 @@
1
+ export declare const Wrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
2
+ export declare const BodyAnimationWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
3
+ export declare const MessageIcon: import("styled-components").StyledComponent<({ onClick, isDisabled, ...props }: import("../icon").IconProps) => JSX.Element, import("styled-components").DefaultTheme, {}, never>;
4
+ export declare const ButtonContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;