@fattureincloud/fic-design-system 0.15.7 → 0.15.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,9 +1,9 @@
1
1
  /// <reference types="react" />
2
2
  import { Row as RowType } from '@tanstack/react-table';
3
3
  import { TableProps } from '../../types';
4
- interface BodyProps<T> extends Pick<TableProps<T>, 'bodyHeight' | 'isLoading' | 'isRowDisabled' | 'isRowHighlighted' | 'onRowClick' | 'rowActions' | 'rowHighlightColor' | 'rowSelection' | 'rowTooltip'> {
4
+ interface BodyProps<T> extends Pick<TableProps<T>, 'isLoading' | 'isRowDisabled' | 'isRowHighlighted' | 'onRowClick' | 'rowActions' | 'rowHighlightColor' | 'rowSelection' | 'rowTooltip'> {
5
5
  pageIndex: number;
6
6
  rows: RowType<T>[];
7
7
  }
8
- declare const Body: <T>({ bodyHeight, isLoading, isRowDisabled, isRowHighlighted, onRowClick, pageIndex, rowActions, rowHighlightColor, rowSelection, rowTooltip, rows, }: BodyProps<T>) => JSX.Element;
8
+ declare const Body: <T>({ isLoading, isRowDisabled, isRowHighlighted, onRowClick, pageIndex, rowActions, rowHighlightColor, rowSelection, rowTooltip, rows, }: BodyProps<T>) => JSX.Element;
9
9
  export default Body;
@@ -3,6 +3,7 @@ import { CellValue } from '../../../types';
3
3
  interface CellValues {
4
4
  align: 'center' | 'left' | 'right';
5
5
  content?: Exclude<CellValue, Record<string, unknown>>;
6
+ fixedWidth?: number;
6
7
  isEditable: boolean;
7
8
  maxWidth?: number;
8
9
  minWidth?: number;
@@ -1,9 +1,19 @@
1
+ /// <reference types="react" />
1
2
  declare type DSTdProps = {
3
+ fixedWidth?: number;
2
4
  justifyContent: 'center' | 'left' | 'right';
3
5
  maxWidth?: number;
4
6
  minWidth?: number;
5
7
  };
6
8
  export declare const BaseTd: import("styled-components").StyledComponent<"td", import("styled-components").DefaultTheme, {}, never>;
7
- export declare const DSTd: import("styled-components").StyledComponent<"td", import("styled-components").DefaultTheme, DSTdProps, never>;
9
+ export declare const DSTd: import("styled-components").StyledComponent<"td", import("styled-components").DefaultTheme, Partial<Pick<import("react").DetailedHTMLProps<import("react").TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>, "key" | keyof import("react").TdHTMLAttributes<HTMLTableDataCellElement>> & {
10
+ ref?: ((instance: HTMLTableDataCellElement | null) => void) | import("react").RefObject<HTMLTableDataCellElement> | null | undefined;
11
+ } & {
12
+ minWidth?: number | undefined;
13
+ maxWidth?: number | undefined;
14
+ fixedWidth?: number | undefined;
15
+ }> & {
16
+ [others: string]: any;
17
+ } & DSTdProps, string | number>;
8
18
  export declare const CutText: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {}, never>;
9
19
  export {};
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { ColumnPinningPosition } from '@tanstack/react-table';
2
3
  import { RowSize } from '../../../types';
3
4
  declare type DSThProps = {
@@ -6,5 +7,13 @@ declare type DSThProps = {
6
7
  minWidth?: number;
7
8
  maxWidth?: number;
8
9
  };
9
- export declare const DSThFooter: import("styled-components").StyledComponent<"th", import("styled-components").DefaultTheme, DSThProps, never>;
10
+ export declare const DSThFooter: import("styled-components").StyledComponent<"th", import("styled-components").DefaultTheme, Partial<Pick<import("react").DetailedHTMLProps<import("react").ThHTMLAttributes<HTMLTableHeaderCellElement>, HTMLTableHeaderCellElement>, "key" | keyof import("react").ThHTMLAttributes<HTMLTableHeaderCellElement>> & {
11
+ ref?: ((instance: HTMLTableHeaderCellElement | null) => void) | import("react").RefObject<HTMLTableHeaderCellElement> | null | undefined;
12
+ } & {
13
+ minWidth?: number | undefined;
14
+ maxWidth?: number | undefined;
15
+ fixedWidth?: number | undefined;
16
+ }> & {
17
+ [others: string]: any;
18
+ } & DSThProps, string | number>;
10
19
  export {};
@@ -4,4 +4,9 @@ declare type DSTHeadProps = {
4
4
  footerSize?: RowSize;
5
5
  };
6
6
  export declare const DSTrFooter: import("styled-components").StyledComponent<"tr", import("styled-components").DefaultTheme, DSTHeadProps, never>;
7
+ export declare const CheckboxFooter: import("styled-components").StyledComponent<"th", import("styled-components").DefaultTheme, {}, never>;
8
+ declare type ActionsFooterProps = {
9
+ actionColumnWidth: number;
10
+ };
11
+ export declare const ActionsFooter: import("styled-components").StyledComponent<"th", import("styled-components").DefaultTheme, ActionsFooterProps, never>;
7
12
  export {};
@@ -4,10 +4,9 @@ import { TableProps } from '../../types';
4
4
  declare type HeaderProps<T> = Pick<TableProps<T>, 'headerSize' | 'onSort'> & {
5
5
  actionsHeader?: string | JSX.Element;
6
6
  headerGroups: HeaderGroup<T>[];
7
- isSelectable?: boolean;
8
7
  onRowSelection?: (e: string[]) => void;
9
8
  rowSelection?: string[];
10
9
  table: Table<T>;
11
10
  };
12
- declare const Header: <T>({ actionsHeader, headerGroups, headerSize, isSelectable, onRowSelection, onSort, rowSelection, table, }: HeaderProps<T>) => JSX.Element;
11
+ declare const Header: <T>({ actionsHeader, headerGroups, headerSize, onRowSelection, onSort, rowSelection, table, }: HeaderProps<T>) => JSX.Element;
13
12
  export default Header;
@@ -1,5 +1,4 @@
1
1
  declare type ActionsThHeaderProps = {
2
- hasContent: boolean;
3
2
  actionColumnWidth: number;
4
3
  };
5
4
  export declare const ActionsThHeader: import("styled-components").StyledComponent<"th", import("styled-components").DefaultTheme, ActionsThHeaderProps, never>;
@@ -1,9 +1,19 @@
1
+ /// <reference types="react" />
1
2
  import { ColumnPinningPosition } from '@tanstack/react-table';
2
3
  declare type DSThProps = {
4
+ fixedWidth?: number;
3
5
  isPinned: ColumnPinningPosition;
4
6
  minWidth?: number;
5
7
  maxWidth?: number;
6
8
  sortable: boolean;
7
9
  };
8
- export declare const DSThHeader: import("styled-components").StyledComponent<"th", import("styled-components").DefaultTheme, DSThProps, never>;
10
+ export declare const DSThHeader: import("styled-components").StyledComponent<"th", import("styled-components").DefaultTheme, Partial<Pick<import("react").DetailedHTMLProps<import("react").ThHTMLAttributes<HTMLTableHeaderCellElement>, HTMLTableHeaderCellElement>, "key" | keyof import("react").ThHTMLAttributes<HTMLTableHeaderCellElement>> & {
11
+ ref?: ((instance: HTMLTableHeaderCellElement | null) => void) | import("react").RefObject<HTMLTableHeaderCellElement> | null | undefined;
12
+ } & {
13
+ minWidth?: number | undefined;
14
+ maxWidth?: number | undefined;
15
+ fixedWidth?: number | undefined;
16
+ }> & {
17
+ [others: string]: any;
18
+ } & DSThProps, string | number>;
9
19
  export {};
@@ -3,6 +3,7 @@ import { TooltipProps } from '../../../../tooltip';
3
3
  interface HeaderValues<T> {
4
4
  canSort: boolean;
5
5
  column: Column<T, unknown>;
6
+ fixedWidth?: number;
6
7
  isSorted: boolean;
7
8
  isSortedDesc: string | null;
8
9
  maxWidth?: number;
@@ -1,8 +1,5 @@
1
1
  import { RowSize } from '../../types';
2
- declare type DSTHeadProps = {
3
- scrollbarPadding: number;
4
- };
5
- export declare const DSTHead: import("styled-components").StyledComponent<"thead", import("styled-components").DefaultTheme, DSTHeadProps, never>;
2
+ export declare const DSTHead: import("styled-components").StyledComponent<"thead", import("styled-components").DefaultTheme, {}, never>;
6
3
  declare type DSTrHeaderProps = {
7
4
  headerSize?: RowSize;
8
5
  };
@@ -2,7 +2,7 @@ import { SettingsLabels, TableComponent } from './types';
2
2
  export declare const HEIGHT_SMALL = 42;
3
3
  export declare const HEIGHT_LARGE = 56;
4
4
  export declare const TEXTAREA_HEIGHT = 100;
5
- export declare const CHECKBOX_WIDTH = 35;
5
+ export declare const CHECKBOX_WIDTH = 18;
6
6
  export declare const CLASS_PREFIX = "DS-table";
7
7
  export declare const DS_PREFIX = "dstbl";
8
8
  export declare const COMPONENTS: Record<TableComponent, string[]>;
@@ -1,6 +1,8 @@
1
1
  /// <reference types="react" />
2
2
  export declare const Container: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
3
- export declare const HorizontalScroll: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
3
+ export declare const HorizontalScroll: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
4
+ maxHeight?: number | undefined;
5
+ }, never>;
4
6
  export declare const DSTable: import("styled-components").StyledComponent<"table", import("styled-components").DefaultTheme, {}, never>;
5
7
  export declare const SortIndicator: import("styled-components").StyledComponent<({ isDisabled, onClick, ...props }: import("../icon").IconProps) => JSX.Element, import("styled-components").DefaultTheme, {}, never>;
6
8
  export declare const PaginationContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
@@ -18,6 +18,7 @@ export declare type BaseColumnDef<T> = IdentifiedColumnDef<T> & {
18
18
  id?: string;
19
19
  maxWidth?: number;
20
20
  minWidth?: number;
21
+ fixedWidth?: number;
21
22
  multiline?: boolean;
22
23
  };
23
24
  export declare type EditableCellsColumn<T> = {
@@ -11,13 +11,13 @@ import { SortableTable } from './features/sort';
11
11
  export declare type TableProps<T> = SelectableTable & PaginatedTable & SortableTable<T> & TableSettings & HighlightRow<T> & TableActions<T> & {
12
12
  absoluteElementsPortal?: HTMLElement;
13
13
  actionColumnWidth?: number;
14
- bodyHeight?: number;
15
14
  columns: ColumnsType<T>[];
16
15
  data: T[];
17
16
  headerSize?: RowSize;
18
17
  isLoading?: boolean;
19
18
  isRowDisabled?: (row: Row<T>) => boolean;
20
19
  loadingStyle?: LoadingStyle;
20
+ maxHeight?: number;
21
21
  onRowClick?: (row: Row<T>) => void;
22
22
  renderEmptyState?: () => JSX.Element;
23
23
  rowTooltip?: (row: Row<T>) => string;
@@ -15,4 +15,15 @@ export declare type MappedProps = {
15
15
  };
16
16
  export declare const mapBackground: ({ isDisabled, isRowHighlighted, rowHighlightColor, selected, theme, }: MapBackgrounProps) => MappedProps;
17
17
  export declare const getColumnId: <T>(column: ColumnsType<T>) => string;
18
+ declare type MapColumnWidthParams = {
19
+ minWidth?: number;
20
+ maxWidth?: number;
21
+ fixedWidth?: number;
22
+ };
23
+ declare type MappedColumnWidth = {
24
+ width: string;
25
+ minWidth: string;
26
+ maxWidth: string;
27
+ };
28
+ export declare const mapColumnWidth: ({ fixedWidth, maxWidth, minWidth }: MapColumnWidthParams) => MappedColumnWidth;
18
29
  export {};