@digital-ai/dot-components 1.1.1 → 1.3.1
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 +1 -1
- package/dot-components.esm.js +2402 -1076
- package/dot-components.umd.js +2368 -1032
- package/fonts/dot.woff +0 -0
- package/fonts/selection.json +651 -444
- package/lib/components/BaseButtonProps.d.ts +3 -1
- package/lib/components/app-logo/AppLogo.d.ts +11 -0
- package/lib/components/app-toolbar/AppToolbar.d.ts +5 -1
- package/lib/components/app-toolbar/AppToolbar.styles.d.ts +1 -0
- package/lib/components/avatar/Avatar.d.ts +3 -1
- package/lib/components/button/IconButton.d.ts +6 -2
- package/lib/components/dynamic-form/DynamicForm.d.ts +11 -0
- package/lib/components/dynamic-form/DynamicForm.styles.d.ts +2 -0
- package/lib/components/dynamic-form/constants.d.ts +4 -0
- package/lib/components/dynamic-form/models.d.ts +68 -0
- package/lib/components/dynamic-form/sample.d.ts +4 -0
- package/lib/components/dynamic-form/utils/formHelpers.d.ts +34 -0
- package/lib/components/dynamic-form/utils/helpers.d.ts +5 -0
- package/lib/components/dynamic-form/utils/validation.d.ts +25 -0
- package/lib/components/form/Form.styles.d.ts +1 -1
- package/lib/components/icon/Icon.d.ts +4 -2
- package/lib/components/index.d.ts +46 -18
- package/lib/components/input-form-fields/InputText.d.ts +4 -1
- package/lib/components/json-schema-form/JsonSchemaForm.d.ts +21 -0
- package/lib/components/json-schema-form/JsonSchemaForm.styles.d.ts +2 -0
- package/lib/components/json-schema-form/custom-widgets/CustomCheckboxWidget.d.ts +3 -0
- package/lib/components/json-schema-form/custom-widgets/CustomCheckboxesWidget.d.ts +3 -0
- package/lib/components/json-schema-form/custom-widgets/CustomRadioWidget.d.ts +3 -0
- package/lib/components/json-schema-form/custom-widgets/CustomSelectWidget.d.ts +3 -0
- package/lib/components/json-schema-form/custom-widgets/CustomTextWidget.d.ts +3 -0
- package/lib/components/json-schema-form/custom-widgets/helpers.d.ts +10 -0
- package/lib/components/json-schema-form/custom-widgets/index.d.ts +5 -0
- package/lib/components/link/Link.d.ts +4 -2
- package/lib/components/list/List.d.ts +17 -5
- package/lib/components/list/List.styles.d.ts +1 -0
- package/lib/components/menu/Menu.d.ts +6 -1
- package/lib/components/menu/Menu.styles.d.ts +1 -0
- package/lib/components/progress/Progress.d.ts +4 -2
- package/lib/components/sidebar/Sidebar.d.ts +9 -1
- package/lib/components/split-button/SplitButton.d.ts +1 -1
- package/lib/components/split-button/SplitButton.styles.d.ts +1 -1
- package/lib/components/table/Table.stories.data.d.ts +14 -10
- package/lib/components/table/Table.styles.d.ts +1 -1
- package/lib/components/table/TableCell.d.ts +4 -3
- package/lib/components/table/TableRow.d.ts +5 -3
- package/lib/components/tooltip/Tooltip.d.ts +9 -0
- package/lib/theme-provider/colors/agility-dark-theme-colors.d.ts +9 -0
- package/lib/theme-provider/colors/agility-light-theme-colors.d.ts +11 -0
- package/lib/theme-provider/colors/light-theme-colors.d.ts +2 -1
- package/package.json +3 -2
|
@@ -13,6 +13,10 @@ export interface BackItemProps extends CommonProps {
|
|
|
13
13
|
title?: string;
|
|
14
14
|
}
|
|
15
15
|
export interface SidebarProps extends CommonProps {
|
|
16
|
+
/** If provided will display application logo */
|
|
17
|
+
appLogo?: ReactNode;
|
|
18
|
+
/** If provided will display application logo */
|
|
19
|
+
appLogoSmall?: ReactNode;
|
|
16
20
|
/** props used by the back item */
|
|
17
21
|
backItem?: BackItemProps;
|
|
18
22
|
/** If displayBrand is true this text will be displayed above the Digital.ai branding */
|
|
@@ -21,6 +25,8 @@ export interface SidebarProps extends CommonProps {
|
|
|
21
25
|
children?: ReactNode;
|
|
22
26
|
/** If true will display the expand/collapse icon button */
|
|
23
27
|
collapsable?: boolean;
|
|
28
|
+
/** If true will display appLogo provided at the top */
|
|
29
|
+
displayAppLogo?: boolean;
|
|
24
30
|
/** If true will display Digital.ai branding at the bottom */
|
|
25
31
|
displayBrand?: boolean;
|
|
26
32
|
/** If true will display the go back nav item at the top of the sidebar */
|
|
@@ -35,5 +41,7 @@ export interface SidebarProps extends CommonProps {
|
|
|
35
41
|
title?: string;
|
|
36
42
|
/** If provided, will display an avatar next to the title text */
|
|
37
43
|
titleAvatarProps?: AvatarProps;
|
|
44
|
+
/** Width of main menu drawer if mainMenu provided, defaults to 240px */
|
|
45
|
+
width?: number;
|
|
38
46
|
}
|
|
39
|
-
export declare const DotSidebar: ({ ariaLabel, backItem, brandDesc, children, className, collapsable, "data-testid": dataTestId, displayBrand, goBack, navItems, nestedListType, open, title, titleAvatarProps, }: SidebarProps) => JSX.Element;
|
|
47
|
+
export declare const DotSidebar: ({ appLogo, appLogoSmall, ariaLabel, backItem, brandDesc, children, className, collapsable, "data-testid": dataTestId, displayAppLogo, displayBrand, goBack, navItems, nestedListType, open, title, titleAvatarProps, width, }: SidebarProps) => JSX.Element;
|
|
@@ -13,4 +13,4 @@ export interface SplitButtonProps extends BaseButtonProps {
|
|
|
13
13
|
/**The options within the button dropdown */
|
|
14
14
|
options: Array<MenuItemProps>;
|
|
15
15
|
}
|
|
16
|
-
export declare const DotSplitButton: ({ autoFocus, ariaLabel, children, className, "data-testid": dataTestId, disabled, disablePortal, disableRipple, fullWidth, isSubmit, onClick, onSelect, options, size, titleTooltip, type, }: SplitButtonProps) => JSX.Element;
|
|
16
|
+
export declare const DotSplitButton: ({ autoFocus, ariaLabel, children, className, "data-testid": dataTestId, disabled, disablePortal, disableRipple, fullWidth, isSubmit, onClick, onSelect, options, size, titleTooltip, tooltip, type, }: SplitButtonProps) => JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export declare const rootClassName = "dot-split-button-group";
|
|
3
3
|
export declare const StyledSplitButtonGroup: import("styled-components").StyledComponent<import("@material-ui/core/OverridableComponent").OverridableComponent<import("@material-ui/core").ButtonGroupTypeMap<{}, "div">>, any, {}, never>;
|
|
4
|
-
export declare const StyledMenu: import("styled-components").StyledComponent<({ anchorEl, ariaLabel, className, "data-testid": dataTestId, dense, disablePortal, id, maxVisibleItems, menuItems, menuPlacement, onLeave, onSelect, open, }: import("../menu/Menu").MenuProps) => JSX.Element, 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, }: import("../menu/Menu").MenuProps) => JSX.Element, any, {}, never>;
|
|
@@ -36,11 +36,13 @@ export declare const defaultData: ({
|
|
|
36
36
|
hometown: string;
|
|
37
37
|
fans: number;
|
|
38
38
|
delete: {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
39
|
+
children: JSX.Element;
|
|
40
|
+
dataTestId: string;
|
|
41
|
+
disabled: boolean;
|
|
42
|
+
iconId: string;
|
|
43
|
+
key: string;
|
|
44
|
+
onclick: () => void;
|
|
45
|
+
tooltip: string;
|
|
44
46
|
}[];
|
|
45
47
|
};
|
|
46
48
|
} | {
|
|
@@ -50,11 +52,13 @@ export declare const defaultData: ({
|
|
|
50
52
|
hometown: string;
|
|
51
53
|
fans: number;
|
|
52
54
|
delete: {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
55
|
+
children: JSX.Element;
|
|
56
|
+
dataTestId: string;
|
|
57
|
+
disabled: boolean;
|
|
58
|
+
iconId: string;
|
|
59
|
+
key: string;
|
|
60
|
+
onclick: () => void;
|
|
61
|
+
tooltip: string;
|
|
58
62
|
}[];
|
|
59
63
|
};
|
|
60
64
|
selected?: undefined;
|
|
@@ -3,4 +3,4 @@ import { Paper } from '@material-ui/core';
|
|
|
3
3
|
export declare const rootClassName = "dot-table";
|
|
4
4
|
export declare const StyledPaper: import("styled-components").StyledComponent<typeof Paper, any, {}, never>;
|
|
5
5
|
export declare const StyledTableContainer: import("styled-components").StyledComponent<import("@material-ui/core/OverridableComponent").OverridableComponent<import("@material-ui/core").TableContainerTypeMap<{}, "div">>, any, {}, never>;
|
|
6
|
-
export declare const StyledMenu: import("styled-components").StyledComponent<({ anchorEl, ariaLabel, className, "data-testid": dataTestId, dense, disablePortal, id, maxVisibleItems, menuItems, menuPlacement, onLeave, onSelect, open, }: import("../menu/Menu").MenuProps) => JSX.Element, any, {}, never>;
|
|
6
|
+
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, }: import("../menu/Menu").MenuProps) => JSX.Element, any, {}, never>;
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
2
|
import { CommonProps } from '../CommonProps';
|
|
3
3
|
export declare type textAlignment = 'center' | 'inherit' | 'justify' | 'left' | 'right';
|
|
4
4
|
export interface CellProps extends CommonProps {
|
|
5
5
|
align?: textAlignment;
|
|
6
|
+
cellKey?: string;
|
|
6
7
|
colspan?: number;
|
|
7
8
|
id?: string;
|
|
8
9
|
noWrap?: boolean;
|
|
9
10
|
value?: any;
|
|
10
|
-
onActionMenuTrigger?: (el: HTMLElement, menuItem:
|
|
11
|
+
onActionMenuTrigger?: (el: HTMLElement, menuItem: Array<ReactNode>) => void;
|
|
11
12
|
}
|
|
12
13
|
/**
|
|
13
14
|
* A wrapper component around the TableCell component from @material-ui.
|
|
14
15
|
*/
|
|
15
|
-
export declare const DotBodyCell: ({ ariaLabel, align, className, colspan, "data-testid": dataTestId, noWrap, value, onActionMenuTrigger, }: CellProps) => JSX.Element;
|
|
16
|
+
export declare const DotBodyCell: ({ ariaLabel, align, cellKey, className, colspan, "data-testid": dataTestId, noWrap, value, onActionMenuTrigger, }: CellProps) => JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MouseEvent } from 'react';
|
|
1
|
+
import { MouseEvent, ReactNode } from 'react';
|
|
2
2
|
import { DotColumnHeader } from './TableHeader';
|
|
3
3
|
import { CommonProps } from '../CommonProps';
|
|
4
4
|
import { TableRowProps } from './Table';
|
|
@@ -12,9 +12,11 @@ export interface RowProps extends CommonProps {
|
|
|
12
12
|
/** The table body row data */
|
|
13
13
|
data: TableRowProps;
|
|
14
14
|
/** Event callback of action button of menu */
|
|
15
|
-
onActionMenuTrigger: (el: HTMLElement, menuItem:
|
|
15
|
+
onActionMenuTrigger: (el: HTMLElement, menuItem: Array<ReactNode>) => void;
|
|
16
16
|
/** Event callback */
|
|
17
17
|
onClick?: (event: MouseEvent, id: string) => void;
|
|
18
|
+
/** uniques key of table cell */
|
|
19
|
+
rowKey: string;
|
|
18
20
|
/** if the row is selected */
|
|
19
21
|
selected?: boolean;
|
|
20
22
|
}
|
|
@@ -22,5 +24,5 @@ export interface RowProps extends CommonProps {
|
|
|
22
24
|
* A wrapper component around the TableRow component from @material-ui. This component can be used
|
|
23
25
|
* for manipulating data prior to displaying the data inside the table
|
|
24
26
|
*/
|
|
25
|
-
export declare const DotTableRow: ({ columns, data, onActionMenuTrigger, onClick, selected, }: RowProps) => JSX.Element;
|
|
27
|
+
export declare const DotTableRow: ({ columns, data, onActionMenuTrigger, onClick, rowKey, selected, }: RowProps) => JSX.Element;
|
|
26
28
|
export declare const EmptyDotRow: ({ cols, message, }: EmptyRowProps) => JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ReactNode, ReactElement } from 'react';
|
|
2
|
+
import { CommonProps } from '../CommonProps';
|
|
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
|
+
export interface TooltipProps extends CommonProps {
|
|
5
|
+
children: ReactElement;
|
|
6
|
+
placement?: tooltipPlacement;
|
|
7
|
+
title?: ReactNode | string | number;
|
|
8
|
+
}
|
|
9
|
+
export declare const DotTooltip: ({ ariaLabel, children, className, "data-testid": dataTestId, placement, title, }: TooltipProps) => JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const n0 = "#050A0A";
|
|
2
|
+
export declare const n50 = "#14262E";
|
|
3
|
+
export declare const n100 = "#244451";
|
|
4
|
+
export declare const n200 = "#336275";
|
|
5
|
+
export declare const n300 = "#7CB0C5";
|
|
6
|
+
export declare const n400 = "#9FC5D5";
|
|
7
|
+
export declare const n500 = "#E6F0F4";
|
|
8
|
+
export declare const n600 = "#C3DBE4";
|
|
9
|
+
export declare const n700 = "#FFFFFF";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const n0 = "#E6F0F4";
|
|
2
|
+
export declare const n50 = "#FFFFFF";
|
|
3
|
+
export declare const n100 = "#C3DBE4";
|
|
4
|
+
export declare const n200 = "#9FC5D5";
|
|
5
|
+
export declare const n300 = "#7CB0C5";
|
|
6
|
+
export declare const n400 = "#589BB6";
|
|
7
|
+
export declare const n500 = "#438098";
|
|
8
|
+
export declare const n600 = "#326174";
|
|
9
|
+
export declare const n700 = "#244451";
|
|
10
|
+
export declare const n800 = "#14262E";
|
|
11
|
+
export declare const n900 = "#000000";
|
|
@@ -97,4 +97,5 @@ export declare const pA100 = "#ff9cd1";
|
|
|
97
97
|
export declare const pA200 = "#ff69b9";
|
|
98
98
|
export declare const pA400 = "#ff36a2";
|
|
99
99
|
export declare const pA700 = "#ff1d96";
|
|
100
|
-
export declare const agilityGreen = "#
|
|
100
|
+
export declare const agilityGreen = "#79b522";
|
|
101
|
+
export declare const agilityLightGreen = "#e4efd3";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@digital-ai/dot-components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "SEE LICENSE IN <LICENSE.md>",
|
|
6
6
|
"contributors": [
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
"styled-components": "^5.2.1"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
|
-
"react": "^16.8.0 || ^17.0.0"
|
|
34
|
+
"react": "^16.8.0 || ^17.0.0",
|
|
35
|
+
"react-jsonschema-form": "^1.8.1"
|
|
35
36
|
}
|
|
36
37
|
}
|