@fattureincloud/fic-design-system 0.7.45-tmp-react-18 → 1.0.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.
- package/dist/components/form/checkbox/Checkbox.d.ts +1 -0
- package/dist/components/form/checkbox/types.d.ts +1 -0
- package/dist/components/newTable/Table.d.ts +2 -1
- package/dist/components/newTable/components/body/Body.d.ts +3 -1
- package/dist/components/newTable/components/cell/Cell.d.ts +2 -1
- package/dist/components/newTable/components/cell/customActionCell/CustomActionCell.d.ts +2 -1
- package/dist/components/newTable/components/cell/customCell/CustomCell.d.ts +2 -1
- package/dist/components/newTable/components/cell/styled.d.ts +3 -1
- package/dist/components/newTable/components/header/Header.d.ts +2 -1
- package/dist/components/newTable/components/header/headerCell/ActionHeaderCell.d.ts +4 -2
- package/dist/components/newTable/components/header/headerCell/HeaderCell.d.ts +2 -1
- package/dist/components/newTable/components/row/Row.d.ts +2 -1
- package/dist/components/newTable/types.d.ts +7 -0
- package/dist/components/newTable/utils.d.ts +1 -1
- package/dist/components/tabs/common/Item.d.ts +2 -1
- package/dist/components/tabs/common/types.d.ts +1 -0
- package/dist/components/tabs/tabs.stories.d.ts +4 -3
- package/dist/index.esm.js +8 -8
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +8 -8
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
@@ -9,6 +9,7 @@ import { CheckboxProps } from './types';
|
|
9
9
|
* @param {function} onClick Callback called on component click
|
10
10
|
* @param {string} text Component label text
|
11
11
|
* @param {CheckboxStatus} value Checkbox status
|
12
|
+
* @param {string} textColor To change label text color
|
12
13
|
*/
|
13
14
|
declare const Checkbox: ({ value, ...rest }: CheckboxProps) => JSX.Element;
|
14
15
|
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;
|
@@ -28,6 +28,7 @@ import { TableProps } from './types';
|
|
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
30
|
* @param {number} rowIdHighlight id of the row that will be highlighted
|
31
|
+
* @param {string | number} actionColumnWidth used to determine the width of the action column
|
31
32
|
*/
|
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, }: 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, rowIdHighlight, rowHighlightColor, rowSelection, onRowSelection, forceHideSettings, renderBulkActions, preSettedTableSettings, onChangeTableSettings, notRemovableColumns, rowSize, actionColumnWidth, disableScrollX, }: TableProps<T>) => JSX.Element;
|
33
34
|
export default Table;
|
@@ -6,6 +6,8 @@ interface BodyProps<T> extends Pick<TableProps<T>, 'rowSize' | 'bodyHeight' | 'r
|
|
6
6
|
isLoading?: boolean;
|
7
7
|
onRowClick?: (row: Row<T>) => void;
|
8
8
|
pageIndex: number;
|
9
|
+
actionColumnWidth?: string | number;
|
10
|
+
disableScrollX?: boolean;
|
9
11
|
}
|
10
|
-
declare const Body: <T>({ rows, rowSize, isLoading, onRowClick, bodyHeight, rowIdHighlight, rowHighlightColor, pageIndex, }: BodyProps<T>) => JSX.Element;
|
12
|
+
declare const Body: <T>({ rows, rowSize, isLoading, onRowClick, bodyHeight, rowIdHighlight, rowHighlightColor, pageIndex, actionColumnWidth, disableScrollX, }: BodyProps<T>) => JSX.Element;
|
11
13
|
export default Body;
|
@@ -8,6 +8,7 @@ interface Props<T> {
|
|
8
8
|
rowSize?: RowSize;
|
9
9
|
isLoading?: boolean;
|
10
10
|
onRowClick?: (row: Row<T>) => void;
|
11
|
+
actionColumnWidth?: string | number;
|
11
12
|
}
|
12
|
-
declare const Cell: <T>({ cell, row, hover, rowSize, isLoading, onRowClick }: Props<T>) => JSX.Element;
|
13
|
+
declare const Cell: <T>({ cell, row, hover, rowSize, isLoading, onRowClick, actionColumnWidth }: Props<T>) => JSX.Element;
|
13
14
|
export default Cell;
|
@@ -8,6 +8,7 @@ interface Props<T> extends ActionColumnDef<T> {
|
|
8
8
|
column: Column<T, unknown>;
|
9
9
|
maxWidth?: number;
|
10
10
|
minWidth?: number;
|
11
|
+
actionColumnWidth?: string | number;
|
11
12
|
}
|
12
|
-
declare const CustomActionCell: <T>({ actionType, row, isToggled, onActionChange, rowActions, column, maxWidth, minWidth, }: Props<T>) => JSX.Element;
|
13
|
+
declare const CustomActionCell: <T>({ actionType, row, isToggled, onActionChange, rowActions, column, maxWidth, minWidth, actionColumnWidth, }: Props<T>) => JSX.Element;
|
13
14
|
export default CustomActionCell;
|
@@ -6,7 +6,8 @@ type Props<CellProps> = {
|
|
6
6
|
context: CellContext<CellProps, unknown>;
|
7
7
|
hover?: boolean;
|
8
8
|
rowSize?: RowSize;
|
9
|
+
actionColumnWidth?: string | number;
|
9
10
|
onRowClick?: (row: Row<CellProps>) => void;
|
10
11
|
} & CustomCellProps & AccessorColumnDef<CellProps> & ActionColumnDef<CellProps> & AdditionalColumnDef<CellProps>;
|
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, }: Props<CellProps>) => JSX.Element;
|
12
|
+
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;
|
12
13
|
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, {
|
25
|
+
export declare const ContentContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
26
|
+
unitSymbol?: string | undefined;
|
27
|
+
}, never>;
|
@@ -16,6 +16,7 @@ interface HeaderProps<T> {
|
|
16
16
|
notRemovableColumns?: string[];
|
17
17
|
onChangeTableSettings?: onChangeTableSettings;
|
18
18
|
isLoading: boolean;
|
19
|
+
actionColumnWidth?: string | number;
|
19
20
|
}
|
20
|
-
declare const Header: <T>({ headerGroup, headerSize, onSort, forceHideSettings, rowSelection, setRowSelection, preSettedTableSettings, onChangeTableSettings, notRemovableColumns, isLoading, }: HeaderProps<T>) => JSX.Element;
|
21
|
+
declare const Header: <T>({ headerGroup, headerSize, onSort, forceHideSettings, rowSelection, setRowSelection, preSettedTableSettings, onChangeTableSettings, notRemovableColumns, isLoading, actionColumnWidth, }: HeaderProps<T>) => JSX.Element;
|
21
22
|
export default Header;
|
@@ -1,9 +1,10 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
import { Header } from '@tanstack/react-table';
|
3
3
|
import { onChangeTableSettings } from '../../../types';
|
4
|
-
interface CustomHeaderCellProps<T> {
|
4
|
+
export interface CustomHeaderCellProps<T> {
|
5
5
|
header: Header<T, unknown>;
|
6
6
|
onOpen?: (isOpen: boolean) => void;
|
7
|
+
onClose?: (isOpen: boolean) => void;
|
7
8
|
forceHideSettings: boolean;
|
8
9
|
rowSelection?: string[];
|
9
10
|
setRowSelection?: (e: string[]) => void;
|
@@ -11,6 +12,7 @@ interface CustomHeaderCellProps<T> {
|
|
11
12
|
dimensionRow?: number;
|
12
13
|
onChangeTableSettings?: onChangeTableSettings;
|
13
14
|
isLoading: boolean;
|
15
|
+
actionColumnWidth?: number | string;
|
14
16
|
}
|
15
|
-
declare const ActionHeaderCell: <T>({ header, onOpen, forceHideSettings, rowSelection, setRowSelection, notRemovableColumns, dimensionRow, onChangeTableSettings, isLoading, }: CustomHeaderCellProps<T>) => JSX.Element;
|
17
|
+
declare const ActionHeaderCell: <T>({ header, onOpen, onClose, forceHideSettings, rowSelection, setRowSelection, notRemovableColumns, dimensionRow, onChangeTableSettings, isLoading, actionColumnWidth, }: CustomHeaderCellProps<T>) => JSX.Element;
|
16
18
|
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,5 +1,6 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
import { Column, DisplayColumnDef, GroupColumnDef, IdentifiedColumnDef, PaginationState, Row, SortDirection } from '@tanstack/react-table';
|
3
|
+
import { buttonColors } from 'components/buttons/button/types';
|
3
4
|
import { AvatarProps } from '../avatar';
|
4
5
|
import { ButtonProps } from '../buttons';
|
5
6
|
import { DropdownItemType } from '../dropdown';
|
@@ -50,6 +51,8 @@ export interface TableProps<T> {
|
|
50
51
|
};
|
51
52
|
notRemovableColumns?: string[];
|
52
53
|
onChangeTableSettings?: onChangeTableSettings;
|
54
|
+
actionColumnWidth?: string | number;
|
55
|
+
disableScrollX?: boolean;
|
53
56
|
}
|
54
57
|
export type onChangeTableSettings = (key: keyof PreSettedTableSettings, valueChange: Pick<PreSettedTableSettings, 'orderColumns' | 'dimensionRow' | 'notVisibleColumns'>) => void;
|
55
58
|
export interface PreSettedTableSettings {
|
@@ -168,10 +171,14 @@ type BasicPrimaryAction<T> = {
|
|
168
171
|
interface PrimaryTextAction<T> extends BasicPrimaryAction<T> {
|
169
172
|
text?: string | number;
|
170
173
|
icon?: never;
|
174
|
+
color?: buttonColors;
|
175
|
+
className?: string;
|
171
176
|
}
|
172
177
|
interface PrimaryIconAction<T> extends BasicPrimaryAction<T> {
|
173
178
|
text?: never;
|
174
179
|
icon?: IconProps;
|
180
|
+
color?: buttonColors;
|
181
|
+
className?: string;
|
175
182
|
}
|
176
183
|
export type PrimaryAction<T> = PrimaryTextAction<T> | PrimaryIconAction<T>;
|
177
184
|
export 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) => 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;
|
@@ -1,7 +1,8 @@
|
|
1
|
+
/// <reference types="react" />
|
1
2
|
import { Meta } from '@storybook/react';
|
2
|
-
import React from 'react';
|
3
3
|
import { TabsProps } from './common/types';
|
4
|
-
export declare const WithDropdown: () =>
|
5
|
-
export declare const Scrollable: () =>
|
4
|
+
export declare const WithDropdown: () => JSX.Element;
|
5
|
+
export declare const Scrollable: () => JSX.Element;
|
6
6
|
declare const TabsStories: Meta<TabsProps>;
|
7
|
+
export declare const WithCustomBadge: () => JSX.Element;
|
7
8
|
export default TabsStories;
|