@digital-ai/dot-components 1.0.8 → 1.0.12
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/README.md +7 -5
- package/dot-components.esm.js +6146 -3699
- package/dot-components.umd.js +6239 -3666
- package/index.d.ts +1 -0
- package/lib/components/CommonProps.d.ts +2 -0
- package/lib/components/accordion/Accordion.d.ts +1 -1
- package/lib/components/action-toolbar/ActionToolbar.d.ts +1 -1
- package/lib/components/alert-banner/AlertBanner.d.ts +1 -1
- package/lib/components/app-toolbar/AppToolbar.d.ts +5 -2
- package/lib/components/app-toolbar/AppToolbar.styles.d.ts +1 -1
- package/lib/components/auto-complete/AutoComplete.d.ts +3 -3
- package/lib/components/avatar/Avatar.d.ts +2 -2
- package/lib/components/avatar-group/AvatarGroup.d.ts +1 -1
- package/lib/components/breadcrumbs/Breadcrumbs.d.ts +6 -2
- package/lib/components/button/Button.d.ts +1 -1
- package/lib/components/button/IconButton.d.ts +1 -1
- package/lib/components/button-toggle/ButtonToggle.d.ts +0 -2
- package/lib/components/card/Card.d.ts +2 -1
- package/lib/components/card/CardContent.d.ts +2 -1
- package/lib/components/card/CardFooter.d.ts +2 -1
- package/lib/components/card/CardHeader.d.ts +1 -1
- package/lib/components/checkbox/Checkbox.d.ts +0 -2
- package/lib/components/checkbox/CheckboxGroup.d.ts +1 -1
- package/lib/components/chip/Chip.d.ts +1 -1
- package/lib/components/compareSize.d.ts +1 -0
- package/lib/components/confirmation-dialog/ConfirmationDialog.d.ts +1 -1
- package/lib/components/dialog/Dialog.d.ts +1 -1
- package/lib/components/drawer/Drawer.d.ts +1 -1
- package/lib/components/empty-state/EmptyState.d.ts +1 -1
- package/lib/components/form/Form.d.ts +3 -1
- package/lib/components/form-group/FormGroup.d.ts +0 -2
- package/lib/components/helpers.d.ts +3 -0
- package/lib/components/icon/Icon.d.ts +1 -1
- package/lib/components/index.d.ts +3 -2
- package/lib/components/inline-edit/InlineEdit.d.ts +1 -1
- package/lib/components/input-form-fields/InputSelect.d.ts +1 -1
- package/lib/components/link/Link.d.ts +4 -4
- package/lib/components/list/List.d.ts +1 -3
- package/lib/components/list/List.styles.d.ts +4 -4
- package/lib/components/menu/Menu.d.ts +3 -1
- package/lib/components/navigation-rail/NavigationRail.d.ts +3 -1
- package/lib/components/pill/Pill.d.ts +1 -1
- package/lib/components/progress/Progress.d.ts +1 -1
- package/lib/components/radio/RadioButton.d.ts +1 -1
- package/lib/components/radio/RadioGroup.d.ts +0 -2
- package/lib/components/sidebar/Sidebar.d.ts +1 -1
- package/lib/components/skeleton/Skeleton.d.ts +1 -1
- package/lib/components/snackbar/Snackbar.d.ts +1 -1
- package/lib/components/split-button/SplitButton.styles.d.ts +1 -1
- package/lib/components/switch/Switch.d.ts +0 -2
- package/lib/components/table/Table.d.ts +3 -2
- package/lib/components/table/Table.stories.data.d.ts +20 -2
- package/lib/components/table/TableBody.d.ts +1 -3
- package/lib/components/table/TableCell.d.ts +6 -3
- package/lib/components/table/TableHeader.d.ts +11 -2
- package/lib/components/table/TablePagination.d.ts +1 -1
- package/lib/components/typography/Typography.d.ts +1 -1
- package/lib/theme-provider/ThemeProvider.d.ts +2 -38
- package/lib/theme-provider/common/variables.d.ts +6 -0
- package/package.json +3 -6
|
@@ -10,8 +10,6 @@ export interface TableBodyProps extends CommonProps {
|
|
|
10
10
|
data: Array<TableRowProps>;
|
|
11
11
|
/** Message to show if no data */
|
|
12
12
|
emptyMessage?: string;
|
|
13
|
-
/** Empty rows to show */
|
|
14
|
-
emptyRows?: number;
|
|
15
13
|
/** Row click event callback */
|
|
16
14
|
onRowClick?: (event: MouseEvent, id: string) => void;
|
|
17
15
|
}
|
|
@@ -19,4 +17,4 @@ export interface TableBodyProps extends CommonProps {
|
|
|
19
17
|
* A wrapper component around the TableBody component from @material-ui. This component can be used
|
|
20
18
|
* to determine the functionality of the table.
|
|
21
19
|
*/
|
|
22
|
-
export declare const DotTableBody: ({ columns, data, emptyMessage,
|
|
20
|
+
export declare const DotTableBody: ({ columns, data, emptyMessage, onRowClick, }: TableBodyProps) => JSX.Element;
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import { CommonProps } from '../CommonProps';
|
|
3
|
+
export declare type textAlignment = 'center' | 'inherit' | 'justify' | 'left' | 'right';
|
|
4
|
+
export interface CellProps extends CommonProps {
|
|
5
|
+
align?: textAlignment;
|
|
4
6
|
colspan?: number;
|
|
5
7
|
id?: string;
|
|
8
|
+
noWrap?: boolean;
|
|
6
9
|
value?: any;
|
|
7
10
|
}
|
|
8
11
|
/**
|
|
9
12
|
* A wrapper component around the TableCell component from @material-ui.
|
|
10
13
|
*/
|
|
11
|
-
export declare const DotBodyCell: ({ align, colspan, id, value, }: CellProps) => JSX.Element;
|
|
14
|
+
export declare const DotBodyCell: ({ ariaLabel, align, className, colspan, "data-testid": dataTestId, id, noWrap, value, }: CellProps) => JSX.Element;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { MouseEvent, ReactNode } from 'react';
|
|
2
2
|
import { Order } from './TableBody';
|
|
3
|
+
import { textAlignment } from './TableCell';
|
|
3
4
|
export interface DotColumnHeader {
|
|
4
|
-
align?:
|
|
5
|
+
align?: textAlignment;
|
|
5
6
|
id: string;
|
|
6
7
|
label?: string;
|
|
7
8
|
sortable?: boolean;
|
|
9
|
+
truncate?: boolean;
|
|
8
10
|
width?: string;
|
|
9
11
|
}
|
|
10
12
|
export interface HeaderProps {
|
|
@@ -16,8 +18,11 @@ export interface HeaderProps {
|
|
|
16
18
|
sortable: boolean;
|
|
17
19
|
}
|
|
18
20
|
export interface HeaderCellProps {
|
|
19
|
-
align
|
|
21
|
+
/** Allows to align cell text left, right, center */
|
|
22
|
+
align?: textAlignment;
|
|
23
|
+
/** Click event function to handle sorting */
|
|
20
24
|
createSortHandler?: (property: string) => (event: MouseEvent<unknown>) => void;
|
|
25
|
+
/** The Id of table cell */
|
|
21
26
|
id?: string;
|
|
22
27
|
/** The order of data which is being sorted by */
|
|
23
28
|
order?: Order;
|
|
@@ -25,10 +30,14 @@ export interface HeaderCellProps {
|
|
|
25
30
|
orderBy?: string;
|
|
26
31
|
/** Determines if sorting is enabled */
|
|
27
32
|
sortable?: boolean;
|
|
33
|
+
/** Determines sorting order of ascending or desceding */
|
|
28
34
|
sortDirection?: 'desc' | 'asc' | undefined;
|
|
35
|
+
/**Allows table cell text truncated and displays in only one line */
|
|
36
|
+
truncate?: boolean;
|
|
29
37
|
/** The UID of the cell, if not provided then a randomly generated hash will be created using
|
|
30
38
|
* CreateUUID() */
|
|
31
39
|
uid: string;
|
|
40
|
+
/** The value of header cell*/
|
|
32
41
|
value?: ReactNode;
|
|
33
42
|
/** The width of the column */
|
|
34
43
|
width?: string;
|
|
@@ -15,5 +15,5 @@ export interface TablePaginationProps extends CommonProps {
|
|
|
15
15
|
rowsPerPage?: RowsPerPageOption;
|
|
16
16
|
}
|
|
17
17
|
/** This component wraps the TablePagination component from @material-ui. */
|
|
18
|
-
export declare const DotTablePagination: ({ className, count, "data-testid": dataTestId, onChangePage, onChangeRowsPerPage, page, rowsPerPage, }: TablePaginationProps) => JSX.Element;
|
|
18
|
+
export declare const DotTablePagination: ({ ariaLabel, className, count, "data-testid": dataTestId, onChangePage, onChangeRowsPerPage, page, rowsPerPage, }: TablePaginationProps) => JSX.Element;
|
|
19
19
|
export {};
|
|
@@ -11,4 +11,4 @@ export interface TypographyProps extends CommonProps {
|
|
|
11
11
|
/** Applies the theme typography styles. */
|
|
12
12
|
variant?: TypographyVariant;
|
|
13
13
|
}
|
|
14
|
-
export declare const DotTypography: ({ className, "data-testid": dataTestId, children, component, noWrap, variant, }: TypographyProps) => JSX.Element;
|
|
14
|
+
export declare const DotTypography: ({ ariaLabel, className, "data-testid": dataTestId, children, component, noWrap, variant, }: TypographyProps) => JSX.Element;
|
|
@@ -1,44 +1,8 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { Theme } from '@material-ui/core';
|
|
3
|
+
import { AvatarPaletteColorOptions } from '../../../../../typings/material/index';
|
|
3
4
|
export declare type ThemeOptions = 'light' | 'dark' | 'agility-light' | 'agility-dark';
|
|
4
|
-
export declare const avatarColors:
|
|
5
|
-
default: {
|
|
6
|
-
color: string;
|
|
7
|
-
backgroundColor: string;
|
|
8
|
-
};
|
|
9
|
-
green: {
|
|
10
|
-
color: string;
|
|
11
|
-
backgroundColor: string;
|
|
12
|
-
};
|
|
13
|
-
blue: {
|
|
14
|
-
color: string;
|
|
15
|
-
backgroundColor: string;
|
|
16
|
-
};
|
|
17
|
-
orange: {
|
|
18
|
-
color: string;
|
|
19
|
-
backgroundColor: string;
|
|
20
|
-
};
|
|
21
|
-
purple: {
|
|
22
|
-
color: string;
|
|
23
|
-
backgroundColor: string;
|
|
24
|
-
};
|
|
25
|
-
yellow: {
|
|
26
|
-
color: string;
|
|
27
|
-
backgroundColor: string;
|
|
28
|
-
};
|
|
29
|
-
red: {
|
|
30
|
-
color: string;
|
|
31
|
-
backgroundColor: string;
|
|
32
|
-
};
|
|
33
|
-
darkGrey: {
|
|
34
|
-
color: string;
|
|
35
|
-
backgroundColor: string;
|
|
36
|
-
};
|
|
37
|
-
lightGrey: {
|
|
38
|
-
color: string;
|
|
39
|
-
backgroundColor: string;
|
|
40
|
-
};
|
|
41
|
-
};
|
|
5
|
+
export declare const avatarColors: AvatarPaletteColorOptions;
|
|
42
6
|
export declare const agilityLightTheme: Theme;
|
|
43
7
|
export declare const agilityDarkTheme: Theme;
|
|
44
8
|
export declare const darkTheme: Theme;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@digital-ai/dot-components",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.12",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "SEE LICENSE IN <LICENSE.md>",
|
|
6
6
|
"contributors": [
|
|
@@ -27,13 +27,10 @@
|
|
|
27
27
|
"author": "Keith Stewart",
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@material-ui/lab": "4.0.0-alpha.56",
|
|
30
|
-
"@material-ui/core": "4.
|
|
30
|
+
"@material-ui/core": "4.12.3",
|
|
31
31
|
"styled-components": "^5.2.1"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
34
|
"react": "^16.8.0 || ^17.0.0"
|
|
35
|
-
},
|
|
36
|
-
"resolutions": {
|
|
37
|
-
"@material-ui/system": "4.11.3"
|
|
38
35
|
}
|
|
39
|
-
}
|
|
36
|
+
}
|