@digital-ai/dot-components 1.15.0 → 1.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.
- package/CHANGE_LOG.md +50 -0
- package/fonts/dot.woff +0 -0
- package/fonts/selection.json +731 -592
- package/index.esm.js +501 -316
- package/index.umd.js +654 -449
- package/lib/components/app-toolbar/AppToolbar.d.ts +11 -1
- package/lib/components/app-toolbar/AppToolbar.stories.data.d.ts +2 -9
- package/lib/components/button-toggle/utils/models.d.ts +1 -0
- package/lib/components/index.d.ts +1 -1
- package/lib/components/inline-edit/utils/helpers.d.ts +1 -0
- package/lib/components/table/Table.stories.data.d.ts +5 -21
- package/lib/components/table/TableAction.d.ts +12 -0
- package/lib/components/table/TableActions.d.ts +8 -0
- package/lib/components/table/TableActions.styles.d.ts +4 -0
- package/lib/components/table/TableHeader.d.ts +1 -0
- package/lib/components/table/TableHeaderCell.d.ts +1 -1
- package/lib/components/table/index.d.ts +2 -0
- package/package.json +1 -1
|
@@ -2,6 +2,16 @@ import { ReactNode } from 'react';
|
|
|
2
2
|
import { CommonProps } from '../CommonProps';
|
|
3
3
|
import { IconButtonProps } from '../button/IconButton';
|
|
4
4
|
import { ListItemProps } from '../list';
|
|
5
|
+
import { BadgeVariant } from '../badge/Badge';
|
|
6
|
+
export interface AppToolbarIconButtons extends IconButtonProps {
|
|
7
|
+
/** custom color code for the badge */
|
|
8
|
+
badgeColor?: string;
|
|
9
|
+
/** the number rendered within the badge */
|
|
10
|
+
badgeContent?: number;
|
|
11
|
+
badgeVariant?: BadgeVariant;
|
|
12
|
+
/** if true, the badge will be displayed, else it will be hidden*/
|
|
13
|
+
displayBadge?: boolean;
|
|
14
|
+
}
|
|
5
15
|
export interface AppToolbarProps extends CommonProps {
|
|
6
16
|
/** If provided will display application logo */
|
|
7
17
|
appLogo?: ReactNode;
|
|
@@ -28,7 +38,7 @@ export interface AppToolbarProps extends CommonProps {
|
|
|
28
38
|
/** Width of main menu drawer if mainMenu provided, defaults to 240px */
|
|
29
39
|
mainMenuWidth?: number;
|
|
30
40
|
/** Array of nav items to be displayed on the right side */
|
|
31
|
-
navItems?: Array<
|
|
41
|
+
navItems?: Array<AppToolbarIconButtons>;
|
|
32
42
|
/** URL of the page the primary logo link will go to */
|
|
33
43
|
primaryLogoHref?: string;
|
|
34
44
|
}
|
|
@@ -1,15 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { History } from 'history';
|
|
3
3
|
import { ListItemProps } from '../list';
|
|
4
|
+
import { AppToolbarIconButtons } from './AppToolbar';
|
|
4
5
|
export declare const defaultMainMenuItems: Array<ListItemProps>;
|
|
5
|
-
export declare const defaultNavItems:
|
|
6
|
-
iconId: string;
|
|
7
|
-
tooltip: string;
|
|
8
|
-
onClick?: undefined;
|
|
9
|
-
} | {
|
|
10
|
-
iconId: string;
|
|
11
|
-
onClick: () => void;
|
|
12
|
-
tooltip: string;
|
|
13
|
-
})[];
|
|
6
|
+
export declare const defaultNavItems: AppToolbarIconButtons[];
|
|
14
7
|
export declare const getMenuNavigationItems: (history: History) => Array<ListItemProps>;
|
|
15
8
|
export declare const MenuNavigationRoutes: () => JSX.Element;
|
|
@@ -79,7 +79,7 @@ export { DotSnackbar, DotSnackbarContainer, DotSnackbarProvider, useDotSnackbarC
|
|
|
79
79
|
export { DotSplitButton } from './split-button/SplitButton';
|
|
80
80
|
export { DotProgressButton } from './progress-button/ProgressButton';
|
|
81
81
|
export { DotSwitch } from './switch';
|
|
82
|
-
export { DotHeaderRow, DotTable, DotTablePagination } from './table';
|
|
82
|
+
export { DotHeaderRow, DotTable, DotTablePagination, DotTableActions, DotTableAction, } from './table';
|
|
83
83
|
export { DotTooltip } from './tooltip/Tooltip';
|
|
84
84
|
export { DotTabs } from './tabs/Tabs';
|
|
85
85
|
export { DotTypography } from './typography/Typography';
|
|
@@ -3,3 +3,4 @@ import { InlineEditBinding } from './models';
|
|
|
3
3
|
export declare const getCounterAdornment: (currentLength: number, maxLength: number, dataTestId?: string) => ReactNode | undefined;
|
|
4
4
|
export declare const getWarningAdornment: () => JSX.Element;
|
|
5
5
|
export declare const applyBindings: (bindings: InlineEditBinding[], inlineEditText: string) => ReactNode;
|
|
6
|
+
export declare const checkIfEmptyValue: (inputValue: string) => boolean;
|
|
@@ -57,9 +57,9 @@ export declare const defaultColumns: ({
|
|
|
57
57
|
id: string;
|
|
58
58
|
label: string;
|
|
59
59
|
sortable: boolean;
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
60
|
+
align: string;
|
|
61
|
+
width: string;
|
|
62
|
+
truncate: boolean;
|
|
63
63
|
})[];
|
|
64
64
|
export declare const defaultData: ({
|
|
65
65
|
id: string;
|
|
@@ -69,15 +69,7 @@ export declare const defaultData: ({
|
|
|
69
69
|
title: string;
|
|
70
70
|
hometown: string;
|
|
71
71
|
fans: number;
|
|
72
|
-
delete:
|
|
73
|
-
children: JSX.Element;
|
|
74
|
-
dataTestId: string;
|
|
75
|
-
disabled: boolean;
|
|
76
|
-
iconId: string;
|
|
77
|
-
key: string;
|
|
78
|
-
onclick: () => void;
|
|
79
|
-
tooltip: string;
|
|
80
|
-
}[];
|
|
72
|
+
delete: JSX.Element;
|
|
81
73
|
className: string;
|
|
82
74
|
};
|
|
83
75
|
} | {
|
|
@@ -86,15 +78,7 @@ export declare const defaultData: ({
|
|
|
86
78
|
title: string;
|
|
87
79
|
hometown: string;
|
|
88
80
|
fans: number;
|
|
89
|
-
delete:
|
|
90
|
-
children: JSX.Element;
|
|
91
|
-
dataTestId: string;
|
|
92
|
-
disabled: boolean;
|
|
93
|
-
iconId: string;
|
|
94
|
-
key: string;
|
|
95
|
-
onclick: () => void;
|
|
96
|
-
tooltip: string;
|
|
97
|
-
}[];
|
|
81
|
+
delete: JSX.Element;
|
|
98
82
|
className?: undefined;
|
|
99
83
|
};
|
|
100
84
|
className?: undefined;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { MouseEvent } from 'react';
|
|
2
|
+
import { CommonProps } from '../CommonProps';
|
|
3
|
+
export interface TableActionProps extends CommonProps {
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
iconId: string;
|
|
6
|
+
id?: string;
|
|
7
|
+
label: string;
|
|
8
|
+
onClick?: (event: MouseEvent<HTMLButtonElement>) => void;
|
|
9
|
+
tooltip?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare const getMenuItem: (action: TableActionProps) => JSX.Element;
|
|
12
|
+
export declare const DotTableAction: ({ "data-testid": dataTestId, disabled, iconId, onClick, tooltip, }: TableActionProps) => JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { CommonProps } from '../CommonProps';
|
|
3
|
+
import { TableActionProps } from './TableAction';
|
|
4
|
+
export interface TableActionsProps extends CommonProps {
|
|
5
|
+
actions?: Array<TableActionProps>;
|
|
6
|
+
id: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const DotTableActions: ({ actions, id }: TableActionsProps) => JSX.Element;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const rootClassName = "dot-table-actions";
|
|
3
|
+
export declare const TableActionsContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
4
|
+
export declare const StyledMenu: import("styled-components").StyledComponent<({ anchorEl, ariaLabel, className, "data-testid": dataTestId, dense, disablePortal, id, loading, maxVisibleItems, menuItemHeight, menuItems, menuPlacement, onLeave, onSelect, open, selectedKey, }: import("../menu/Menu").MenuProps) => JSX.Element, any, {}, never>;
|
|
@@ -13,6 +13,7 @@ export interface DotColumnHeader {
|
|
|
13
13
|
export declare type Order = 'asc' | 'desc';
|
|
14
14
|
export interface HeaderProps {
|
|
15
15
|
columns: Array<DotColumnHeader>;
|
|
16
|
+
/** DEPRECATED, DO NOT USE */
|
|
16
17
|
hasActionColumn: boolean;
|
|
17
18
|
multiSelectHeader?: MultiSelectHeader;
|
|
18
19
|
onRequestSort: (property: string) => void;
|
|
@@ -10,7 +10,7 @@ export interface HeaderCellProps {
|
|
|
10
10
|
createSortHandler?: (property: string) => (event: MouseEvent<unknown>) => void;
|
|
11
11
|
/** The Id of table cell */
|
|
12
12
|
id?: string;
|
|
13
|
-
/**
|
|
13
|
+
/** DEPRECATED, DO NOT USE */
|
|
14
14
|
isInActionColumn: boolean;
|
|
15
15
|
/** The order of data which is being sorted by */
|
|
16
16
|
order?: Order;
|
|
@@ -8,3 +8,5 @@ export type { MultiSelect, TableRowSelectChangeHandler, RowSelectionChangeHandle
|
|
|
8
8
|
export { DotTablePagination } from './TablePagination';
|
|
9
9
|
export { DotTable } from './Table';
|
|
10
10
|
export { DotHeaderRow } from './TableHeader';
|
|
11
|
+
export { DotTableAction } from './TableAction';
|
|
12
|
+
export { DotTableActions } from './TableActions';
|