@digital-ai/dot-components 2.15.2 → 2.17.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.
Files changed (27) hide show
  1. package/CHANGE_LOG.md +35 -10
  2. package/index.esm.js +425 -227
  3. package/index.umd.js +617 -395
  4. package/lib/components/button/CopyButton.d.ts +10 -3
  5. package/lib/components/button/CopyButton.stories.d.ts +1 -1
  6. package/lib/components/button/IconButton.d.ts +5 -3
  7. package/lib/components/file-upload/FileUpload.d.ts +13 -1
  8. package/lib/components/file-upload/FileUpload.stories.d.ts +2 -1
  9. package/lib/components/file-upload/utils/helpers.d.ts +4 -3
  10. package/lib/components/file-upload/utils/models.d.ts +2 -0
  11. package/lib/components/table/Table.d.ts +4 -2
  12. package/lib/components/table/Table.stories.d.ts +3 -1
  13. package/lib/components/table/Table.stories.data.d.ts +59 -0
  14. package/lib/components/table/TableBody.d.ts +3 -2
  15. package/lib/components/table/TableBodyCollapsibleTable.d.ts +8 -0
  16. package/lib/components/table/TableBodyCollapsibleTable.styles.d.ts +2 -0
  17. package/lib/components/table/TableBodyExpandCollapseCell.d.ts +8 -0
  18. package/lib/components/table/TableBodyExpandCollapseCell.styles.d.ts +3 -0
  19. package/lib/components/table/TableHeader.d.ts +3 -2
  20. package/lib/components/table/TableRow.d.ts +3 -2
  21. package/lib/components/table/utils/helpers.d.ts +1 -0
  22. package/lib/components/table/utils/models.d.ts +19 -0
  23. package/lib/components/tooltip/Tooltip.d.ts +3 -1
  24. package/lib/components/tooltip/Tooltip.stories.d.ts +1 -1
  25. package/lib/components/truncate-with-tooltip/TruncateWithTooltip.d.ts +3 -1
  26. package/lib/components/truncate-with-tooltip/TruncateWithTooltip.stories.d.ts +1 -1
  27. package/package.json +1 -1
@@ -1,7 +1,14 @@
1
- import { CommonProps } from '../CommonProps';
2
- export interface CopyButtonProps extends CommonProps {
1
+ import { CommonIconButtonProps } from '../button/IconButton';
2
+ export interface CopyButtonProps extends CommonIconButtonProps {
3
+ /** Tooltip shown briefly after the value has been copied. */
3
4
  copiedTooltip?: string;
5
+ /** DEPRECATED Use tooltip instead */
4
6
  copyTooltip?: string;
7
+ /** The icon to display on the button, defaults to 'duplicate' */
8
+ iconId?: string;
9
+ /** By default a check icon will briefly display after the content is copied */
10
+ showCopiedIcon?: boolean;
11
+ /** The content which will be copied to the clipboard */
5
12
  value: string;
6
13
  }
7
- export declare const DotCopyButton: ({ ariaLabel, copiedTooltip, copyTooltip, "data-testid": dataTestId, value, }: CopyButtonProps) => JSX.Element;
14
+ export declare const DotCopyButton: ({ ariaLabel, ariaRole, className, color, copiedTooltip, copyTooltip, "data-testid": dataTestId, disabled, disableRipple, iconId, iconSize, onClick, shape, showCopiedIcon, size, tooltip, value, }: CopyButtonProps) => JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import { ComponentMeta } from '@storybook/react';
2
2
  import { CopyButtonProps } from './CopyButton';
3
- declare const _default: ComponentMeta<({ ariaLabel, copiedTooltip, copyTooltip, "data-testid": dataTestId, value, }: CopyButtonProps) => JSX.Element>;
3
+ declare const _default: ComponentMeta<({ ariaLabel, ariaRole, className, color, copiedTooltip, copyTooltip, "data-testid": dataTestId, disabled, disableRipple, iconId, iconSize, onClick, shape, showCopiedIcon, size, tooltip, value, }: CopyButtonProps) => JSX.Element>;
4
4
  export default _default;
5
5
  export declare const Default: any;
@@ -4,15 +4,13 @@ import { IconFontSize } from '../icon/Icon';
4
4
  export declare type IconButtonColor = 'default' | 'inherit' | 'primary' | 'secondary';
5
5
  export declare type IconButtonSize = 'small' | 'medium';
6
6
  export declare type IconButtonShape = 'circle' | 'square';
7
- export interface IconButtonProps extends CommonProps {
7
+ export interface CommonIconButtonProps extends CommonProps {
8
8
  /** 'default', 'inherit', 'primary', 'secondary' */
9
9
  color?: IconButtonColor;
10
10
  /** If true, the ripple effect is disabled. */
11
11
  disableRipple?: boolean;
12
12
  /** If true, the button will be disabled. */
13
13
  disabled?: boolean;
14
- /** The icon to display on the button */
15
- iconId: string;
16
14
  /** Determines the size of the icon itself and spacing around it */
17
15
  iconSize?: IconFontSize;
18
16
  /** Event callback */
@@ -24,4 +22,8 @@ export interface IconButtonProps extends CommonProps {
24
22
  /** Help text to be displayed on icon hover */
25
23
  tooltip?: string;
26
24
  }
25
+ export interface IconButtonProps extends CommonIconButtonProps {
26
+ /** The icon to display on the button */
27
+ iconId: string;
28
+ }
27
29
  export declare const DotIconButton: ({ ariaLabel, ariaRole, className, color, "data-testid": dataTestId, disabled, disableRipple, iconId, iconSize, onClick, tooltip, shape, size, }: IconButtonProps) => JSX.Element;
@@ -2,11 +2,22 @@
2
2
  import { CommonProps } from '../CommonProps';
3
3
  import { MappedFile } from './utils/models';
4
4
  import { ListItemFile } from './FileListItem';
5
+ import { BaseButtonProps } from '../BaseButtonProps';
6
+ interface OmittedButtonProps {
7
+ disabled: unknown;
8
+ isSubmit: unknown;
9
+ onClick: unknown;
10
+ }
11
+ export declare type FileUploadButtonProps = Omit<BaseButtonProps, keyof OmittedButtonProps> & {
12
+ label: string;
13
+ };
5
14
  export interface FileUploadProps extends CommonProps {
6
15
  /** Unique file type specifiers <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#unique_file_type_specifiers" target="_blank">More Info</a> */
7
16
  accept?: Array<string>;
8
17
  /** If true, will only display the button */
9
18
  buttonOnly?: boolean;
19
+ /** the file upload button props, not all button props are available */
20
+ buttonProps?: FileUploadButtonProps;
10
21
  /** If true, the upload zone will be disabled */
11
22
  disabled?: boolean;
12
23
  /** If true, upload file list won't be displayed. Used when consumer wants to render his own list. */
@@ -22,4 +33,5 @@ export interface FileUploadProps extends CommonProps {
22
33
  /** Optional callback which gets triggered when the file (from the list) is clicked. */
23
34
  onFileClick?: (file: ListItemFile) => void;
24
35
  }
25
- export declare const DotFileUpload: ({ accept, ariaLabel, ariaRole, buttonOnly, className, "data-testid": dataTestId, disabled, hideFilesList, maxFiles, maxSize, onChange, onDragEnter, onFileClick, }: FileUploadProps) => JSX.Element;
36
+ export declare const DotFileUpload: ({ accept, ariaLabel, ariaRole, buttonProps, buttonOnly, className, "data-testid": dataTestId, disabled, hideFilesList, maxFiles, maxSize, onChange, onDragEnter, onFileClick, }: FileUploadProps) => JSX.Element;
37
+ export {};
@@ -1,8 +1,9 @@
1
1
  import { ComponentMeta } from '@storybook/react';
2
2
  import { FileUploadProps } from './';
3
- declare const _default: ComponentMeta<({ accept, ariaLabel, ariaRole, buttonOnly, className, "data-testid": dataTestId, disabled, hideFilesList, maxFiles, maxSize, onChange, onDragEnter, onFileClick, }: FileUploadProps) => JSX.Element>;
3
+ declare const _default: ComponentMeta<({ accept, ariaLabel, ariaRole, buttonProps, buttonOnly, className, "data-testid": dataTestId, disabled, hideFilesList, maxFiles, maxSize, onChange, onDragEnter, onFileClick, }: FileUploadProps) => JSX.Element>;
4
4
  export default _default;
5
5
  export declare const Default: any;
6
6
  export declare const WithSingleFileLimit: any;
7
7
  export declare const WithCustomFileUploadList: (args: FileUploadProps) => JSX.Element;
8
8
  export declare const WithUploadErrors: (args: FileUploadProps) => JSX.Element;
9
+ export declare const WithCustomButtonProps: (args: FileUploadProps) => JSX.Element;
@@ -1,12 +1,13 @@
1
1
  import React, { ReactNode } from 'react';
2
2
  import { FileRejection } from 'react-dropzone';
3
3
  import { DropzoneContentArgs, FileUploadError, ParseListItemArgs, UploadedFilesListArgs } from './models';
4
+ import { FileUploadButtonProps } from '../FileUpload';
4
5
  export declare const renderMaxSizeMessage: (maxSizeMB: number) => ReactNode;
5
6
  export declare const renderMaxFilesMessage: (maxFiles: number, maxFilesClasses: string) => ReactNode;
6
- export declare const renderSelectFilesButton: (isUploadDisabled: boolean, onButtonClick: () => void) => ReactNode;
7
+ export declare const renderSelectFilesButton: (buttonProps: FileUploadButtonProps, isUploadDisabled: boolean, onButtonClick: () => void) => ReactNode;
7
8
  export declare const renderActiveDragArea: () => ReactNode;
8
- export declare const renderDragAndDropArea: (isUploadDisabled: boolean, onSelectButtonClick: () => void) => ReactNode;
9
- export declare const renderDropzoneContent: ({ buttonOnly, isDragActive, isUploadDisabled, open, }: DropzoneContentArgs) => React.ReactNode;
9
+ export declare const renderDragAndDropArea: (buttonProps: FileUploadButtonProps, isUploadDisabled: boolean, onSelectButtonClick: () => void) => ReactNode;
10
+ export declare const renderDropzoneContent: ({ buttonOnly, buttonProps, isDragActive, isUploadDisabled, open, }: DropzoneContentArgs) => React.ReactNode;
10
11
  export declare const getUploadedFilesList: ({ maxSize, onFileClick, onFileDelete, uploadedFiles, }: UploadedFilesListArgs) => {
11
12
  child: JSX.Element;
12
13
  }[];
@@ -1,5 +1,6 @@
1
1
  import { FileWithPath } from 'react-dropzone';
2
2
  import { ListItemFile } from '../FileListItem';
3
+ import { FileUploadButtonProps } from '../FileUpload';
3
4
  export interface FileUploadError {
4
5
  code: string;
5
6
  message: string;
@@ -14,6 +15,7 @@ export interface MappedFile {
14
15
  }
15
16
  export interface DropzoneContentArgs {
16
17
  buttonOnly: boolean;
18
+ buttonProps: FileUploadButtonProps;
17
19
  isDragActive: boolean;
18
20
  isUploadDisabled: boolean;
19
21
  open: () => void;
@@ -3,7 +3,7 @@ import { CommonProps } from '../CommonProps';
3
3
  import { DotColumnHeader, Order } from './TableHeader';
4
4
  import { RowsPerPageOption } from './TablePagination';
5
5
  import { TypographyVariant } from '../typography/Typography';
6
- import { MultiSelect } from './utils/models';
6
+ import { CollapsibleTableOptions, MultiSelect } from './utils/models';
7
7
  export declare const TABLE_TYPOGRAPHY_VARIANT = "body1";
8
8
  export interface TableRowProps extends CommonProps {
9
9
  /** row identifier that will be passed to onRowClick callback */
@@ -16,6 +16,8 @@ export interface TableRowProps extends CommonProps {
16
16
  export interface TableProps extends CommonProps {
17
17
  /** Typography variant which will be used for table body cell values **/
18
18
  bodyTypography?: TypographyVariant;
19
+ /** Optional collapsible-table object **/
20
+ collapsibleTableOptions?: CollapsibleTableOptions;
19
21
  /** The table header columns */
20
22
  columns: Array<DotColumnHeader>;
21
23
  /** Total number of items for paginated table.
@@ -68,4 +70,4 @@ export declare function stableSort<T>(array: T[], comparator: (order: T, orderBy
68
70
  * A wrapper component around the Table component from @material-ui. This component can be used for
69
71
  * creating a common structure for tables in the system.
70
72
  */
71
- export declare const DotTable: ({ ariaLabel, bodyTypography, className, columns, count, data, "data-testid": dataTestId, emptyMessage, footerTypography, headerTypography, labelRowsPerPage, loading, maxHeight, multiSelect, order, orderBy, onRowClick, onUpdateData, page, rowsPerPage, rowsPerPageOptions, stickyHeader, sortable, toolbar, }: TableProps) => JSX.Element;
73
+ export declare const DotTable: ({ ariaLabel, bodyTypography, className, collapsibleTableOptions, columns, count, data, "data-testid": dataTestId, emptyMessage, footerTypography, headerTypography, labelRowsPerPage, loading, maxHeight, multiSelect, order, orderBy, onRowClick, onUpdateData, page, rowsPerPage, rowsPerPageOptions, stickyHeader, sortable, toolbar, }: TableProps) => JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import { Story, ComponentMeta } from '@storybook/react';
2
2
  import { TableProps } from './Table';
3
- declare const _default: ComponentMeta<({ ariaLabel, bodyTypography, className, columns, count, data, "data-testid": dataTestId, emptyMessage, footerTypography, headerTypography, labelRowsPerPage, loading, maxHeight, multiSelect, order, orderBy, onRowClick, onUpdateData, page, rowsPerPage, rowsPerPageOptions, stickyHeader, sortable, toolbar, }: TableProps) => JSX.Element>;
3
+ declare const _default: ComponentMeta<({ ariaLabel, bodyTypography, className, collapsibleTableOptions, columns, count, data, "data-testid": dataTestId, emptyMessage, footerTypography, headerTypography, labelRowsPerPage, loading, maxHeight, multiSelect, order, orderBy, onRowClick, onUpdateData, page, rowsPerPage, rowsPerPageOptions, stickyHeader, sortable, toolbar, }: TableProps) => JSX.Element>;
4
4
  export default _default;
5
5
  export declare const Default: Story;
6
6
  export declare const LocallyPaginatedTable: Story;
@@ -9,3 +9,5 @@ export declare const WithActionMenu: Story;
9
9
  export declare const WithCheckboxSelection: Story;
10
10
  export declare const EmptyTable: Story;
11
11
  export declare const WithCustomPaginationOptions: Story;
12
+ export declare const WithCollapsibleTable: Story;
13
+ export declare const WithCollapsibleTableAsyncLoad: Story;
@@ -103,4 +103,63 @@ export declare const paginatedData: {
103
103
  hit: string;
104
104
  };
105
105
  }[];
106
+ export declare const collapsibleTableData: ({
107
+ id: string;
108
+ className: string;
109
+ selected: boolean;
110
+ rowData: {
111
+ title: string;
112
+ hometown: string;
113
+ fans: number;
114
+ delete: JSX.Element;
115
+ className: string;
116
+ nestedTable: {
117
+ series: string;
118
+ releaseYear: string;
119
+ }[];
120
+ };
121
+ } | {
122
+ id: string;
123
+ rowData: {
124
+ title: string;
125
+ hometown: string;
126
+ fans: number;
127
+ delete: JSX.Element;
128
+ className?: undefined;
129
+ nestedTable?: undefined;
130
+ };
131
+ className?: undefined;
132
+ selected?: undefined;
133
+ })[];
134
+ export declare const carMockDataColumns: ({
135
+ id: string;
136
+ label: string;
137
+ width: string;
138
+ truncate: boolean;
139
+ align?: undefined;
140
+ } | {
141
+ id: string;
142
+ label: string;
143
+ width: string;
144
+ align: TextAlignment;
145
+ truncate?: undefined;
146
+ })[];
147
+ export declare const carMockData: {
148
+ id: string;
149
+ rowData: {
150
+ carMake: string;
151
+ vin: string;
152
+ };
153
+ }[];
154
+ export declare const carMockNestedTableColumns: {
155
+ id: string;
156
+ label: string;
157
+ }[];
158
+ export declare const carMockNestedTableData: {
159
+ id: string;
160
+ rowData: {
161
+ type: string;
162
+ model: string;
163
+ }[];
164
+ }[];
106
165
  export declare const MultiSelectTable: (props: TableProps) => JSX.Element;
@@ -3,8 +3,9 @@ import { DotColumnHeader } from './TableHeader';
3
3
  import { TableRowProps } from './Table';
4
4
  import { CommonProps } from '../CommonProps';
5
5
  import { TypographyVariant } from '../typography/Typography';
6
- import { MultiSelectBody } from './utils/models';
6
+ import { CollapsibleTableBody, MultiSelectBody } from './utils/models';
7
7
  export interface TableBodyProps extends CommonProps {
8
+ collapsibleTableBody?: CollapsibleTableBody;
8
9
  /** The table column headers */
9
10
  columns: Array<DotColumnHeader>;
10
11
  /** The table body row data */
@@ -22,4 +23,4 @@ export interface TableBodyProps extends CommonProps {
22
23
  * A wrapper component around the TableBody component from @material-ui. This component can be used
23
24
  * to determine the functionality of the table.
24
25
  */
25
- export declare const DotTableBody: ({ columns, data, emptyMessage, multiSelectBody, onRowClick, typography, }: TableBodyProps) => JSX.Element;
26
+ export declare const DotTableBody: ({ collapsibleTableBody, columns, data, emptyMessage, multiSelectBody, onRowClick, typography, }: TableBodyProps) => JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { CollapsibleTableBody } from './utils/models';
2
+ export interface DotBodyCollapsibleTableProps {
3
+ collapsibleTableBody: CollapsibleTableBody;
4
+ isExpanded: boolean;
5
+ loading?: boolean;
6
+ rowData: unknown;
7
+ }
8
+ export declare const DotBodyCollapsibleTable: ({ collapsibleTableBody, isExpanded, loading, rowData, }: DotBodyCollapsibleTableProps) => JSX.Element;
@@ -0,0 +1,2 @@
1
+ export declare const rootClassName = "dot-collapsible-container";
2
+ export declare const StyledCollapsibleTableWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -0,0 +1,8 @@
1
+ import { ReactElement } from 'react';
2
+ import { CommonProps } from '../CommonProps';
3
+ export interface DotBodyExpandCollapseCellProps extends CommonProps {
4
+ isExpanded: boolean;
5
+ onRowExpandCollapse: (isExpanded: boolean, rowId: string) => void;
6
+ rowId: string;
7
+ }
8
+ export declare const DotBodyExpandCollapseCell: ({ ariaLabel, className, "data-testid": dataTestId, isExpanded, onRowExpandCollapse, rowId, }: DotBodyExpandCollapseCellProps) => ReactElement;
@@ -0,0 +1,3 @@
1
+ import { TableCell } from '@mui/material';
2
+ export declare const rootClassName = "dot-td-expand-collapse";
3
+ export declare const StyledTableBodyExpandCollapseCell: import("styled-components").StyledComponent<typeof TableCell, any, {}, never>;
@@ -1,6 +1,6 @@
1
1
  import { TextAlignment } from './TableCell';
2
2
  import { TypographyVariant } from '../typography/Typography';
3
- import { MultiSelectHeader } from './utils/models';
3
+ import { CollapsibleTableOptions, MultiSelectHeader } from './utils/models';
4
4
  export interface DotColumnHeader {
5
5
  align?: TextAlignment;
6
6
  id: string;
@@ -11,6 +11,7 @@ export interface DotColumnHeader {
11
11
  }
12
12
  export declare type Order = 'asc' | 'desc';
13
13
  export interface HeaderProps {
14
+ collapsibleTableOptions?: CollapsibleTableOptions;
14
15
  columns: Array<DotColumnHeader>;
15
16
  multiSelectHeader?: MultiSelectHeader;
16
17
  onRequestSort: (property: string) => void;
@@ -24,4 +25,4 @@ export interface HeaderProps {
24
25
  * A wrapper component around the TableHead component from @material-ui. This component can be used
25
26
  * to determine the functionality of the table header.
26
27
  */
27
- export declare const DotHeaderRow: ({ columns, multiSelectHeader, onRequestSort, order, orderBy, sortable, typography, }: HeaderProps) => JSX.Element;
28
+ export declare const DotHeaderRow: ({ collapsibleTableOptions, columns, multiSelectHeader, onRequestSort, order, orderBy, sortable, typography, }: HeaderProps) => JSX.Element;
@@ -3,13 +3,14 @@ import { DotColumnHeader } from './TableHeader';
3
3
  import { CommonProps } from '../CommonProps';
4
4
  import { TableRowProps } from './Table';
5
5
  import { TypographyVariant } from '../typography/Typography';
6
- import { MultiSelectBody } from './utils/models';
6
+ import { CollapsibleTableBody, MultiSelectBody } from './utils/models';
7
7
  export interface EmptyRowProps {
8
8
  cols: number;
9
9
  message?: string;
10
10
  typography: TypographyVariant;
11
11
  }
12
12
  export interface RowProps extends CommonProps {
13
+ collapsibleTableBody: CollapsibleTableBody;
13
14
  /** The table column headers */
14
15
  columns: Array<DotColumnHeader>;
15
16
  /** The table body row data */
@@ -31,5 +32,5 @@ export interface RowProps extends CommonProps {
31
32
  * A wrapper component around the TableRow component from @material-ui. This component can be used
32
33
  * for manipulating data prior to displaying the data inside the table
33
34
  */
34
- export declare const DotTableRow: ({ columns, className, data, multiSelectBody, onActionMenuTrigger, onClick, rowKey, selected, typography, }: RowProps) => JSX.Element;
35
+ export declare const DotTableRow: ({ collapsibleTableBody, columns, className, data, multiSelectBody, onActionMenuTrigger, onClick, rowKey, selected, typography, }: RowProps) => JSX.Element;
35
36
  export declare const EmptyDotRow: ({ cols, message, typography, }: EmptyRowProps) => JSX.Element;
@@ -5,3 +5,4 @@ export declare const getFormattedTableCellValue: (value: any, typographyVariant:
5
5
  export declare const getContainerMaxHeightStyle: (stickyHeader?: boolean, maxHeight?: string) => string;
6
6
  export declare const getSelectedRowIds: (id: string, isChecked: boolean, selectedIds: string[]) => string[];
7
7
  export declare const getBulkSelectedRowIds: (isChecked: boolean, selectedIds: string[], pageData: TableRowProps[]) => string[];
8
+ export declare const getExpandedRowIds: (expandedIds: string[], id: string, isExpand: boolean) => string[];
@@ -1,5 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { TableRowProps } from '../Table';
3
+ import { DotColumnHeader } from '../TableHeader';
3
4
  export declare type RowSelectionChangeHandler = (isChecked: boolean, rowId: string) => void;
4
5
  export declare type MultiSelectState = 'unchecked' | 'checked' | 'indeterminate';
5
6
  export declare type TableRowSelectChangeHandler = (isChecked: boolean, selectedTableRowIds: string[]) => void;
@@ -19,4 +20,22 @@ export interface MultiSelectHeader extends MultiSelectTableBase {
19
20
  export interface MultiSelectBody extends MultiSelectTableBase {
20
21
  onCheckIndividualChange?: RowSelectionChangeHandler;
21
22
  }
23
+ interface CollapsibleTableBase {
24
+ /** The nested-table header columns */
25
+ nestedTableColumns: Array<DotColumnHeader>;
26
+ /** Name of the property which has nested table data in rowData object */
27
+ nestedTableDataPropName: string;
28
+ /** Optional message that is shown if nested-table data is empty */
29
+ nestedTableEmptyMessage?: string;
30
+ /** Optional heading for nested-table */
31
+ nestedTableTitle?: string;
32
+ }
33
+ export interface CollapsibleTableOptions extends CollapsibleTableBase {
34
+ /** Row click (expand) event callback for async loading of nested-table data */
35
+ onRowExpand?: (rowId: string, setLoading: (loading: boolean) => void) => void;
36
+ }
37
+ export interface CollapsibleTableBody extends CollapsibleTableBase {
38
+ expandedTableRowIds: string[];
39
+ onRowExpandCollapseTable?: (isExpanded: boolean, rowId: string, setLoading: (loading: boolean) => void) => void;
40
+ }
22
41
  export {};
@@ -2,6 +2,8 @@ import { ReactNode, ReactElement, ChangeEvent } from 'react';
2
2
  import { CommonProps } from '../CommonProps';
3
3
  export declare type tooltipPlacement = 'bottom-end' | 'bottom-start' | 'bottom' | 'left-end' | 'left-start' | 'left' | 'right-end' | 'right-start' | 'right' | 'top-end' | 'top-start' | 'top';
4
4
  export interface TooltipProps extends CommonProps {
5
+ /** If true, adds an arrow to the tooltip indicating which element it refers to. */
6
+ arrow?: boolean;
5
7
  children: ReactElement;
6
8
  leaveDelay?: number;
7
9
  onClose?: (event: ChangeEvent) => void;
@@ -9,4 +11,4 @@ export interface TooltipProps extends CommonProps {
9
11
  placement?: tooltipPlacement;
10
12
  title?: ReactNode | string | number;
11
13
  }
12
- export declare const DotTooltip: ({ ariaLabel, ariaRole, children, className, "data-testid": dataTestId, leaveDelay, onClose, open, placement, title, }: TooltipProps) => JSX.Element;
14
+ export declare const DotTooltip: ({ ariaLabel, ariaRole, arrow, children, className, "data-testid": dataTestId, leaveDelay, onClose, open, placement, title, }: TooltipProps) => JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import { Story, ComponentMeta } from '@storybook/react';
2
2
  import { TooltipProps } from './Tooltip';
3
- declare const _default: ComponentMeta<({ ariaLabel, ariaRole, children, className, "data-testid": dataTestId, leaveDelay, onClose, open, placement, title, }: TooltipProps) => JSX.Element>;
3
+ declare const _default: ComponentMeta<({ ariaLabel, ariaRole, arrow, children, className, "data-testid": dataTestId, leaveDelay, onClose, open, placement, title, }: TooltipProps) => JSX.Element>;
4
4
  export default _default;
5
5
  export declare const Default: Story<TooltipProps>;
@@ -1,7 +1,9 @@
1
1
  import { CommonProps } from '../CommonProps';
2
2
  export interface TruncateWithTooltipProps extends CommonProps {
3
+ /** If true, adds an arrow to the tooltip indicating which element it refers to. */
4
+ arrow?: boolean;
3
5
  charactersLimit?: number;
4
6
  label: string;
5
7
  width?: number | string;
6
8
  }
7
- export declare const DotTruncateWithTooltip: ({ ariaLabel, charactersLimit, className, "data-testid": dataTestId, label, width, }: TruncateWithTooltipProps) => JSX.Element;
9
+ export declare const DotTruncateWithTooltip: ({ ariaLabel, arrow, charactersLimit, className, "data-testid": dataTestId, label, width, }: TruncateWithTooltipProps) => JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import { ComponentMeta } from '@storybook/react';
2
2
  import { TruncateWithTooltipProps } from './';
3
- declare const _default: ComponentMeta<({ ariaLabel, charactersLimit, className, "data-testid": dataTestId, label, width, }: TruncateWithTooltipProps) => JSX.Element>;
3
+ declare const _default: ComponentMeta<({ ariaLabel, arrow, charactersLimit, className, "data-testid": dataTestId, label, width, }: TruncateWithTooltipProps) => JSX.Element>;
4
4
  export default _default;
5
5
  export declare const Default: any;
6
6
  export declare const WithAutoTruncate: any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digital-ai/dot-components",
3
- "version": "2.15.2",
3
+ "version": "2.17.0",
4
4
  "private": false,
5
5
  "license": "SEE LICENSE IN <LICENSE.md>",
6
6
  "contributors": [