@digital-ai/dot-components 1.6.2 → 1.9.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 +108 -6
- package/{dot-components.esm.js → index.esm.js} +3433 -3402
- package/{dot-components.umd.js → index.umd.js} +1114 -542
- package/lib/components/accordion/Accordion.styles.d.ts +0 -1
- package/lib/components/app-toolbar/AppToolbar.d.ts +4 -2
- package/lib/components/app-toolbar/AppToolbar.stories.data.d.ts +15 -0
- package/lib/components/app-toolbar/AppToolbar.stories.styles.d.ts +2 -0
- package/lib/components/auto-complete/AutoComplete.d.ts +23 -8
- package/lib/components/auto-complete/AutoComplete.styles.d.ts +2 -0
- package/lib/components/auto-complete/Autocomplete.stories.data.d.ts +21 -0
- package/lib/components/auto-complete/utils/helpers.d.ts +7 -0
- package/lib/components/breadcrumbs/Breadcrumbs.d.ts +1 -1
- package/lib/components/button-toggle/ButtonToggle.d.ts +9 -9
- package/lib/components/button-toggle/index.d.ts +1 -0
- package/lib/components/divider/Divider.d.ts +17 -0
- package/lib/components/divider/Divider.stories.styles.d.ts +2 -0
- package/lib/components/divider/Divider.styles.d.ts +2 -0
- package/lib/components/divider/index.d.ts +1 -0
- package/lib/components/drawer/Drawer.d.ts +4 -4
- package/lib/components/index.d.ts +9 -3
- package/lib/components/input-form-fields/Input.stories.data.d.ts +13 -0
- package/lib/components/input-form-fields/InputFormFields.propTypes.d.ts +1 -1
- package/lib/components/input-form-fields/InputSelect.d.ts +8 -1
- package/lib/components/list/ListItem.styles.d.ts +1 -1
- package/lib/components/menu/Menu.d.ts +7 -1
- package/lib/components/menu/Menu.stories.data.d.ts +1 -0
- package/lib/components/menu/Menu.stories.styles.d.ts +2 -0
- package/lib/components/menu/MenuList.d.ts +26 -0
- package/lib/components/menu/MenuList.styles.d.ts +5 -0
- package/lib/components/menu/utils/helpers.d.ts +4 -0
- package/lib/components/popper/Popper.d.ts +18 -0
- package/lib/components/popper/Popper.data.d.ts +7 -0
- package/lib/components/popper/Popper.stories.data.d.ts +6 -0
- package/lib/components/popper/Popper.stories.styles.d.ts +4 -0
- package/lib/components/popper/Popper.styles.d.ts +3 -0
- package/lib/components/popper/index.d.ts +2 -0
- package/lib/components/sidebar/Sidebar.stories.data.d.ts +8 -0
- package/lib/components/split-button/SplitButton.styles.d.ts +1 -1
- package/lib/components/table/Table.data.d.ts +43 -0
- package/lib/components/table/Table.stories.data.d.ts +2 -0
- package/lib/components/table/Table.styles.d.ts +1 -1
- package/lib/components/table/TableSelectionToolbar.d.ts +2 -1
- package/lib/components/table/utils/models.d.ts +1 -0
- package/lib/testing-utils/index.d.ts +60 -0
- package/package.json +4 -4
|
@@ -2,5 +2,4 @@ import { Accordion } from '@material-ui/core';
|
|
|
2
2
|
export declare const rootClassName = "dot-accordion";
|
|
3
3
|
export declare const summaryClassName = "dot-accordion-summary";
|
|
4
4
|
export declare const detailClassName = "dot-accordion-details";
|
|
5
|
-
export declare const actionsClassName = "dot-accordion-actions";
|
|
6
5
|
export declare const StyledAccordion: import("styled-components").StyledComponent<typeof Accordion, any, {}, never>;
|
|
@@ -15,7 +15,9 @@ export interface AppToolbarProps extends CommonProps {
|
|
|
15
15
|
borderColor?: string;
|
|
16
16
|
/** JSX Element that is displayed between the logo and right nav */
|
|
17
17
|
children?: ReactNode;
|
|
18
|
-
/**
|
|
18
|
+
/** If true, main menu will close when item is clicked, if false it will prevent menu closing */
|
|
19
|
+
closeMenuOnItemClick?: boolean;
|
|
20
|
+
/** Allow displaying custom logo */
|
|
19
21
|
customLogo?: ReactNode;
|
|
20
22
|
/** If true, the spacing and height will be shorter */
|
|
21
23
|
dense?: boolean;
|
|
@@ -30,4 +32,4 @@ export interface AppToolbarProps extends CommonProps {
|
|
|
30
32
|
/** URL of the page the primary logo link will go to */
|
|
31
33
|
primaryLogoHref?: string;
|
|
32
34
|
}
|
|
33
|
-
export declare const DotAppToolbar: ({ appName, appLogo, appLogoSmall, ariaLabel, avatar, borderColor, children, className, customLogo, "data-testid": dataTestId, dense, navItems, mainMenu, mainMenuItems, mainMenuWidth, primaryLogoHref, }: AppToolbarProps) => JSX.Element;
|
|
35
|
+
export declare const DotAppToolbar: ({ appName, appLogo, appLogoSmall, ariaLabel, avatar, borderColor, children, className, closeMenuOnItemClick, customLogo, "data-testid": dataTestId, dense, navItems, mainMenu, mainMenuItems, mainMenuWidth, primaryLogoHref, }: AppToolbarProps) => JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { History } from 'history';
|
|
3
|
+
import { ListItemProps } from '../list';
|
|
4
|
+
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
|
+
})[];
|
|
14
|
+
export declare const getMenuNavigationItems: (history: History) => Array<ListItemProps>;
|
|
15
|
+
export declare const MenuNavigationRoutes: () => JSX.Element;
|
|
@@ -1,12 +1,16 @@
|
|
|
1
|
-
import { ChangeEvent, Ref } from 'react';
|
|
1
|
+
import { ChangeEvent, ReactNode, Ref } from 'react';
|
|
2
|
+
import { AutocompleteCloseReason } from '@material-ui/lab';
|
|
2
3
|
import { CommonProps } from '../CommonProps';
|
|
4
|
+
export declare const DEFAULT_ACTION_ITEM_TEXT = "Add new item";
|
|
3
5
|
export interface ActionItem {
|
|
4
6
|
/** The icon to display on the button */
|
|
5
|
-
iconId
|
|
7
|
+
iconId?: string;
|
|
6
8
|
/** Event callback */
|
|
7
|
-
onClick: () => void;
|
|
8
|
-
/**
|
|
9
|
-
|
|
9
|
+
onClick: (inputText?: string) => void;
|
|
10
|
+
/** If set to true, it will prevent duplicate item insertion */
|
|
11
|
+
preventDuplicateInsertion?: boolean;
|
|
12
|
+
/** Text/Node displayed */
|
|
13
|
+
text?: string | ReactNode;
|
|
10
14
|
}
|
|
11
15
|
export declare type autoCompleteSize = 'medium' | 'small';
|
|
12
16
|
export declare type AutoCompleteValue = string | string[] | AutoCompleteOption | AutoCompleteOption[];
|
|
@@ -15,7 +19,6 @@ export interface AutoCompleteOption {
|
|
|
15
19
|
group?: string;
|
|
16
20
|
title: string;
|
|
17
21
|
}
|
|
18
|
-
export declare const parseAutoCompleteValue: (value: AutoCompleteValue) => string;
|
|
19
22
|
export interface AutoCompleteProps extends CommonProps {
|
|
20
23
|
/** Action button as the last element on the menu **/
|
|
21
24
|
actionItem?: ActionItem;
|
|
@@ -23,6 +26,8 @@ export interface AutoCompleteProps extends CommonProps {
|
|
|
23
26
|
autoFocus?: boolean;
|
|
24
27
|
/** default option that is selected */
|
|
25
28
|
defaultValue?: AutoCompleteValue;
|
|
29
|
+
/** When `true` input textbox will be small size, when `false` it will be medium size. Default value is `true`. **/
|
|
30
|
+
dense?: boolean;
|
|
26
31
|
/** Disable the portal behavior. If true, children stay within parent DOM hierarchy. */
|
|
27
32
|
disablePortal?: boolean;
|
|
28
33
|
/** If true, the input will be disabled. */
|
|
@@ -41,10 +46,20 @@ export interface AutoCompleteProps extends CommonProps {
|
|
|
41
46
|
inputRef?: Ref<HTMLInputElement>;
|
|
42
47
|
/** Label displayed above the input field */
|
|
43
48
|
label?: string;
|
|
49
|
+
/** If true, the component will be in a loading state. */
|
|
50
|
+
loading?: boolean;
|
|
44
51
|
/** If true, will allow the user to select multiple options */
|
|
45
52
|
multiple?: boolean;
|
|
46
|
-
/** A function that should be executed when the value
|
|
53
|
+
/** A function that should be executed when the autocomplete value changes */
|
|
47
54
|
onChange?: (event: ChangeEvent<unknown>, value: AutoCompleteValue, reason: string) => void;
|
|
55
|
+
/** Callback fired when the popup requests to be closed. Use in controlled mode. */
|
|
56
|
+
onClose?: (event: ChangeEvent, reason: AutocompleteCloseReason) => void;
|
|
57
|
+
/** A function that should be executed each time when the input value changes */
|
|
58
|
+
onInputChange?: (event: ChangeEvent<unknown>, value: string, reason: string) => void;
|
|
59
|
+
/** Callback fired when the popup requests to be opened. Use in controlled mode. */
|
|
60
|
+
onOpen?: (event: ChangeEvent) => void;
|
|
61
|
+
/** Controls the popup's open state. */
|
|
62
|
+
open?: boolean;
|
|
48
63
|
/** pre-defined options available to the user */
|
|
49
64
|
options?: Array<AutoCompleteOption>;
|
|
50
65
|
/** Placeholder text always displayed inside the input field */
|
|
@@ -56,4 +71,4 @@ export interface AutoCompleteProps extends CommonProps {
|
|
|
56
71
|
/** value if this is a controlled component */
|
|
57
72
|
value?: AutoCompleteValue;
|
|
58
73
|
}
|
|
59
|
-
export declare const DotAutoComplete: ({ actionItem, ariaLabel, autoFocus, className, "data-testid": dataTestId, defaultValue, disabled, disablePortal, error, freesolo, group, helperText, inputId, inputRef, label, multiple, onChange, options, placeholder, required, size, value, }: AutoCompleteProps) => JSX.Element;
|
|
74
|
+
export declare const DotAutoComplete: ({ actionItem, ariaLabel, autoFocus, className, "data-testid": dataTestId, defaultValue, dense, disabled, disablePortal, error, freesolo, group, helperText, inputId, inputRef, label, loading, multiple, onChange, onClose, onInputChange, onOpen, open, options, placeholder, required, size, value, }: AutoCompleteProps) => JSX.Element;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import { Autocomplete } from '@material-ui/lab';
|
|
2
2
|
export declare const rootClassName = "dot-autocomplete";
|
|
3
|
+
export declare const inputRootClassName = "dot-input-root";
|
|
4
|
+
export declare const inputMediumClassName = "dot-input-medium";
|
|
3
5
|
export declare const StyledAutocomplete: import("styled-components").StyledComponent<typeof Autocomplete, any, {}, never>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ActionItem } from './AutoComplete';
|
|
2
|
+
export declare const movies: {
|
|
3
|
+
group: string;
|
|
4
|
+
title: string;
|
|
5
|
+
error: boolean;
|
|
6
|
+
}[];
|
|
7
|
+
export declare const handleActionItemClick: (newItem?: string) => void;
|
|
8
|
+
export declare const actionItemOptions: ActionItem[];
|
|
9
|
+
export declare const actionItemArgType: {
|
|
10
|
+
options: string[];
|
|
11
|
+
mapping: ActionItem[];
|
|
12
|
+
control: {
|
|
13
|
+
type: string;
|
|
14
|
+
labels: {
|
|
15
|
+
0: string;
|
|
16
|
+
1: string;
|
|
17
|
+
2: string;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
defaultValue: string;
|
|
21
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { AutocompleteGetTagProps } from '@material-ui/lab';
|
|
3
|
+
import { ChipSize } from '../../chip/Chip';
|
|
4
|
+
import { AutoCompleteOption, AutoCompleteValue } from '../AutoComplete';
|
|
5
|
+
export declare const parseAutoCompleteValue: (value: AutoCompleteValue) => string;
|
|
6
|
+
export declare const getChipsFromAutocomplete: (values: Array<AutoCompleteOption | string>, getTagProps: AutocompleteGetTagProps, chipSize?: ChipSize) => JSX.Element[];
|
|
7
|
+
export declare const checkIfDuplicateItem: (itemText: string, autocompleteOptions: AutoCompleteOption[]) => boolean;
|
|
@@ -21,7 +21,7 @@ export interface BreadcrumbProps extends CommonProps {
|
|
|
21
21
|
items: Array<BreadcrumbItem>;
|
|
22
22
|
/** determines the maximum number of items to display */
|
|
23
23
|
maxItems?: number;
|
|
24
|
-
/**
|
|
24
|
+
/** DEPRECATED, DO NOT USE */
|
|
25
25
|
minWidth?: number;
|
|
26
26
|
}
|
|
27
27
|
export declare const DotBreadcrumbs: ({ className, "data-testid": dataTestId, expansionMenu, items, maxItems, minWidth, }: BreadcrumbProps) => JSX.Element;
|
|
@@ -2,16 +2,17 @@ import { MouseEvent } from 'react';
|
|
|
2
2
|
import { CommonProps } from '../CommonProps';
|
|
3
3
|
export declare type ButtonToggleSize = 'small' | 'medium' | 'large';
|
|
4
4
|
export declare type ButtonToggleOrientation = 'horizontal' | 'vertical';
|
|
5
|
-
declare type ButtonToggleValue = string | number | boolean;
|
|
5
|
+
export declare type ButtonToggleValue = string | number | boolean;
|
|
6
|
+
export interface ButtonToggleOption extends CommonProps {
|
|
7
|
+
ariaLabel: string;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
iconId?: string;
|
|
10
|
+
text?: string;
|
|
11
|
+
value: ButtonToggleValue;
|
|
12
|
+
}
|
|
6
13
|
export interface ButtonToggleProps extends CommonProps {
|
|
7
14
|
/** button props for each toggle button options*/
|
|
8
|
-
buttonOptions:
|
|
9
|
-
ariaLabel: string;
|
|
10
|
-
disabled?: boolean;
|
|
11
|
-
iconId?: string;
|
|
12
|
-
text?: string;
|
|
13
|
-
value: ButtonToggleValue;
|
|
14
|
-
}[];
|
|
15
|
+
buttonOptions: ButtonToggleOption[];
|
|
15
16
|
/** If true, the keyboard focus ripple will be disabled */
|
|
16
17
|
disableFocusRipple?: boolean;
|
|
17
18
|
/** If true, the ripple effect will be disabled. */
|
|
@@ -28,4 +29,3 @@ export interface ButtonToggleProps extends CommonProps {
|
|
|
28
29
|
value?: ButtonToggleValue;
|
|
29
30
|
}
|
|
30
31
|
export declare const DotButtonToggle: ({ ariaLabel, buttonOptions, className, "data-testid": dataTestId, disableFocusRipple, disableRipple, exclusive, onChange, orientation, size, value, }: ButtonToggleProps) => JSX.Element;
|
|
31
|
-
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ButtonToggle';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { CommonProps } from '../CommonProps';
|
|
3
|
+
export declare type DividerOrientation = 'horizontal' | 'vertical';
|
|
4
|
+
export declare type DividerVariant = 'fullWidth' | 'inset' | 'middle';
|
|
5
|
+
export interface DividerProps extends CommonProps {
|
|
6
|
+
/** Absolutely position the element. Default value: `false` */
|
|
7
|
+
absolute?: boolean;
|
|
8
|
+
/** If true, a vertical divider will have the correct height when used in flex container. (By default, a vertical divider will have a calculated height of 0px if it is the child of a flex container.) */
|
|
9
|
+
flexItem?: boolean;
|
|
10
|
+
/** If `true`, the divider will have a lighter color. Default value: `false` */
|
|
11
|
+
light?: boolean;
|
|
12
|
+
/** The divider orientation. (`horizontal`, `vertical`). Default value: `horizontal` */
|
|
13
|
+
orientation?: DividerOrientation;
|
|
14
|
+
/** The variant to use. (`fullWidth`, `inset`, `middle`) */
|
|
15
|
+
variant?: DividerVariant;
|
|
16
|
+
}
|
|
17
|
+
export declare const DotDivider: ({ absolute, ariaLabel, className, "data-testid": dataTestId, flexItem, light, orientation, variant, }: DividerProps) => JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Divider';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MouseEvent, ReactNode
|
|
1
|
+
import { CSSProperties, MouseEvent, ReactNode } from 'react';
|
|
2
2
|
import { CommonProps } from '../CommonProps';
|
|
3
3
|
export declare type DrawerAnchor = 'bottom' | 'left' | 'right' | 'top';
|
|
4
4
|
export declare type DrawerVariant = 'permanent' | 'persistent' | 'temporary';
|
|
@@ -23,11 +23,11 @@ export interface DrawerProps extends CommonProps {
|
|
|
23
23
|
/** string or JSX element that is displayed inside the drawer */
|
|
24
24
|
children?: ReactNode;
|
|
25
25
|
/** Props applied to drawer body */
|
|
26
|
-
drawerBodyProps?: DrawerSection
|
|
26
|
+
drawerBodyProps?: Omit<DrawerSection, 'ariaLabel'>;
|
|
27
27
|
/** Props applied to drawer footer */
|
|
28
|
-
drawerFooterProps?: DrawerSection
|
|
28
|
+
drawerFooterProps?: Omit<DrawerSection, 'ariaLabel'>;
|
|
29
29
|
/** Props applied to drawer header */
|
|
30
|
-
drawerHeaderProps?: DrawerSection
|
|
30
|
+
drawerHeaderProps?: Omit<DrawerSection, 'ariaLabel'>;
|
|
31
31
|
/** The height of the drawer when anchor is 'top' or 'bottom' */
|
|
32
32
|
height?: string;
|
|
33
33
|
/** Callback fired when the component requests to be closed. */
|
|
@@ -3,6 +3,7 @@ export type { AutoCompleteOption, AutoCompleteProps, AutoCompleteValue, } from '
|
|
|
3
3
|
export type { AvatarProps } from './avatar/Avatar';
|
|
4
4
|
export type { BreadcrumbItem } from './breadcrumbs/Breadcrumbs';
|
|
5
5
|
export type { ButtonProps } from './button/Button';
|
|
6
|
+
export type { ButtonToggleProps, ButtonToggleValue, ButtonToggleOption, ButtonToggleOrientation, ButtonToggleSize, } from './button-toggle';
|
|
6
7
|
export type { CheckboxProps } from './checkbox/Checkbox';
|
|
7
8
|
export type { CheckboxGroupProps } from './checkbox/CheckboxGroup';
|
|
8
9
|
export type { SubmitButtonProps } from './dialog/Dialog';
|
|
@@ -10,7 +11,7 @@ export type { DynamicFormProps } from './dynamic-form/DynamicForm';
|
|
|
10
11
|
export type { ConditionFunction, ControlClickHandler, DisabledConditionFunction, DisabledControlCondition, DynamicFormConfig, DynamicFormControl, DynamicFormControlProps, DynamicFormControlType, DynamicFormOutputData, DynamicFormSectionProps, DynamicFormState, DynamicFormStateItem, FieldValidation, } from './dynamic-form/models';
|
|
11
12
|
export type { IconButtonProps } from './button/IconButton';
|
|
12
13
|
export type { InputTextProps } from './input-form-fields/InputText';
|
|
13
|
-
export type { InputSelectProps } from './input-form-fields/InputSelect';
|
|
14
|
+
export type { InputSelectProps, InputSelectOption, } from './input-form-fields/InputSelect';
|
|
14
15
|
export type { LinkUnderline } from './link/Link';
|
|
15
16
|
export type { ListItemProps } from './list';
|
|
16
17
|
export type { MenuItemProps } from './menu/Menu';
|
|
@@ -23,18 +24,20 @@ export type { DotColumnHeader, MultiSelect, Order, RowSelectionChangeHandler, Ro
|
|
|
23
24
|
export type { TabProps } from './tabs/Tabs';
|
|
24
25
|
export type { TypographyVariant } from './typography/Typography';
|
|
25
26
|
export type { ProgressButtonProps } from './progress-button/ProgressButton';
|
|
27
|
+
export type { PopperPlacementType } from './popper';
|
|
28
|
+
export type { DividerOrientation, DividerProps, DividerVariant, } from './divider';
|
|
26
29
|
export { DotAccordion } from './accordion/Accordion';
|
|
27
30
|
export { DotActionToolbar } from './action-toolbar/ActionToolbar';
|
|
28
31
|
export { DotAlertBanner } from './alert-banner/AlertBanner';
|
|
29
32
|
export { DotAppLogo } from './app-logo/AppLogo';
|
|
30
33
|
export { DotAppToolbar } from './app-toolbar/AppToolbar';
|
|
31
|
-
export { DotAutoComplete
|
|
34
|
+
export { DotAutoComplete } from './auto-complete/AutoComplete';
|
|
32
35
|
export { DotAvatar } from './avatar/Avatar';
|
|
33
36
|
export { DotAvatarGroup } from './avatar-group/AvatarGroup';
|
|
34
37
|
export { DotBadge } from './badge/Badge';
|
|
35
38
|
export { DotBreadcrumbs } from './breadcrumbs/Breadcrumbs';
|
|
36
39
|
export { DotButton } from './button/Button';
|
|
37
|
-
export { DotButtonToggle } from './button-toggle
|
|
40
|
+
export { DotButtonToggle } from './button-toggle';
|
|
38
41
|
export { DotCard } from './card/Card';
|
|
39
42
|
export { DotCardContent } from './card/CardContent';
|
|
40
43
|
export { DotCardFooter } from './card/CardFooter';
|
|
@@ -77,3 +80,6 @@ export { DotTooltip } from './tooltip/Tooltip';
|
|
|
77
80
|
export { DotTabs } from './tabs/Tabs';
|
|
78
81
|
export { DotTypography } from './typography/Typography';
|
|
79
82
|
export { DotFileUpload } from './file-upload/FileUpload';
|
|
83
|
+
export { parseAutoCompleteValue } from './auto-complete/utils/helpers';
|
|
84
|
+
export { DotDivider } from './divider';
|
|
85
|
+
export { DotPopper } from './popper';
|
|
@@ -15,7 +15,7 @@ export interface InputProps extends CommonProps {
|
|
|
15
15
|
/** If true, the input will take up the full width of its container */
|
|
16
16
|
fullWidth?: boolean;
|
|
17
17
|
/** The helper text content. */
|
|
18
|
-
helperText?:
|
|
18
|
+
helperText?: ReactNode;
|
|
19
19
|
/**
|
|
20
20
|
* id to identify the element, also used to create label "for" and helper text id attribute
|
|
21
21
|
* values while it's optional, it is considered required for accessiblity best practice.
|
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { InputProps } from './InputFormFields.propTypes';
|
|
3
|
+
export declare type OptionType = string | InputSelectOption;
|
|
4
|
+
export interface InputSelectOption {
|
|
5
|
+
/** options that appears in dropdown */
|
|
6
|
+
option: string;
|
|
7
|
+
/** value of input field when option is selected */
|
|
8
|
+
value?: string;
|
|
9
|
+
}
|
|
3
10
|
export interface InputSelectProps extends InputProps {
|
|
4
11
|
/** default value of select field */
|
|
5
12
|
defaultValue?: string;
|
|
6
13
|
/** options of select dropdown */
|
|
7
|
-
options: Array<
|
|
14
|
+
options: Array<OptionType>;
|
|
8
15
|
/** value of input field */
|
|
9
16
|
value?: string;
|
|
10
17
|
}
|
|
@@ -37,6 +37,6 @@ export declare const StyledListItem: import("@material-ui/core/OverridableCompon
|
|
|
37
37
|
button: true;
|
|
38
38
|
}, "div">>> & Pick<Pick<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "key" | keyof import("react").AnchorHTMLAttributes<HTMLAnchorElement>> & {
|
|
39
39
|
ref?: import("react").Ref<HTMLAnchorElement>;
|
|
40
|
-
}, "slot" | "title" | "type" | "ref" | "
|
|
40
|
+
}, "slot" | "title" | "type" | "ref" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "download" | "href" | "hrefLang" | "media" | "ping" | "rel" | "target" | "referrerPolicy">) => JSX.Element) & import("@material-ui/core/OverridableComponent").OverridableComponent<import("@material-ui/core").ExtendButtonBaseTypeMap<import("@material-ui/core").ListItemTypeMap<{
|
|
41
41
|
button: true;
|
|
42
42
|
}, "div">>>;
|
|
@@ -26,6 +26,8 @@ export interface MenuProps extends CommonProps {
|
|
|
26
26
|
onSelect?: (event: MouseEvent | KeyboardEvent, menuId: string, itemKey: string) => void;
|
|
27
27
|
/** If true, the menu is open. */
|
|
28
28
|
open?: boolean;
|
|
29
|
+
/** Key of the item which needs to be selected. If provided, item will be highlighted. */
|
|
30
|
+
selectedKey?: string;
|
|
29
31
|
}
|
|
30
32
|
export interface MenuItemProps {
|
|
31
33
|
/** Defines a string value that labels the current element **/
|
|
@@ -34,9 +36,13 @@ export interface MenuItemProps {
|
|
|
34
36
|
children?: ReactNode;
|
|
35
37
|
/** Space delimited CSS classes to be attributed to the menu item */
|
|
36
38
|
classes?: string;
|
|
39
|
+
/** If true, a 1px light border is added to the bottom of the menu item. */
|
|
40
|
+
divider?: boolean;
|
|
37
41
|
/** Used to set custom item height (in pixels). This value has priority over "menuItemHeight" prop. */
|
|
38
42
|
height?: number;
|
|
43
|
+
/** Children items, for multi-level menu display */
|
|
44
|
+
items?: MenuItemProps[];
|
|
39
45
|
/** A key that can be used to determine which item was clicked */
|
|
40
46
|
key?: string;
|
|
41
47
|
}
|
|
42
|
-
export declare const DotMenu: ({ anchorEl, ariaLabel, className, "data-testid": dataTestId, dense, disablePortal, id, loading, maxVisibleItems, menuItemHeight, menuItems, menuPlacement, onLeave, onSelect, open, }: MenuProps) => JSX.Element;
|
|
48
|
+
export declare const DotMenu: ({ anchorEl, ariaLabel, className, "data-testid": dataTestId, dense, disablePortal, id, loading, maxVisibleItems, menuItemHeight, menuItems, menuPlacement, onLeave, onSelect, open, selectedKey, }: MenuProps) => JSX.Element;
|
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
export declare const rootClassName = "dot-menu-wrapper";
|
|
2
|
+
export declare const multiLevelClassName = "dot-multi-level-menu";
|
|
2
3
|
export declare const StyledMenuWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
4
|
+
export declare const StyledMultiLevelMenu: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React, { KeyboardEvent, KeyboardEventHandler, MouseEvent, ReactNode } from 'react';
|
|
2
|
+
import { CommonProps } from '../CommonProps';
|
|
3
|
+
import { MenuItemProps } from './Menu';
|
|
4
|
+
export interface SubMenuCreateArgs {
|
|
5
|
+
anchorElement: Element;
|
|
6
|
+
isOpened: boolean;
|
|
7
|
+
subMenuId: string;
|
|
8
|
+
subMenuItems: MenuItemProps[];
|
|
9
|
+
}
|
|
10
|
+
export interface MenuListProps extends CommonProps {
|
|
11
|
+
autoFocusItem?: boolean;
|
|
12
|
+
dense?: boolean;
|
|
13
|
+
id?: string;
|
|
14
|
+
maxVisibleItems: number;
|
|
15
|
+
menuItemHeight: number | string;
|
|
16
|
+
menuItems: Array<MenuItemProps>;
|
|
17
|
+
onItemSelect?: (event: MouseEvent | KeyboardEvent, itemKey: string) => void;
|
|
18
|
+
onKeyDown?: KeyboardEventHandler<Element>;
|
|
19
|
+
onSubMenuCreate?: (args: SubMenuCreateArgs) => ReactNode;
|
|
20
|
+
selectedKey?: string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Since this component is used inside 'ClickAwayListener',
|
|
24
|
+
* it needs to be contained within 'forwardRef' function
|
|
25
|
+
*/
|
|
26
|
+
export declare const DotMenuList: React.ForwardRefExoticComponent<MenuListProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { MenuList } from '@material-ui/core';
|
|
2
|
+
export declare const rootClassName = "dot-ul";
|
|
3
|
+
export declare const listItemClassName = "dot-li";
|
|
4
|
+
export declare const listItemWithSubmenuClassName = "dot-li-with-submenu";
|
|
5
|
+
export declare const StyledMenuList: import("styled-components").StyledComponent<typeof MenuList, any, {}, never>;
|
|
@@ -9,4 +9,8 @@ export declare const getDefaultItemHeight: (isDense: boolean) => 28 | 33;
|
|
|
9
9
|
export declare const calculateItemHeight: (isDense: boolean, customItemHeight?: number, menuItemHeight?: number | string) => number | string;
|
|
10
10
|
export declare const getNumberOfVisibleItems: (numberOfItems: number, maxVisibleItems?: number) => number;
|
|
11
11
|
export declare const calculateMaxHeight: ({ isDense, maxVisibleItems, menuItems, menuItemHeight, }: MaxHeightCalculationArgs) => number | string;
|
|
12
|
+
export declare const checkForSubItems: (menuItems: MenuItemProps[]) => boolean;
|
|
13
|
+
export declare const checkIfSubmenu: (anchorElement: Element) => boolean;
|
|
14
|
+
export declare const checkIfMenuItemSelected: (key: string, selectedKey: string, activeSubmenu: string) => boolean;
|
|
15
|
+
export declare const checkForAutoFocus: (autoFocusItem: boolean, isFirstItem: boolean) => boolean;
|
|
12
16
|
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { KeyboardEvent, MouseEvent, ReactNode } from 'react';
|
|
2
|
+
import { PopperPlacementType } from '@material-ui/core';
|
|
3
|
+
import { CommonProps } from '../CommonProps';
|
|
4
|
+
export interface PopperProps extends CommonProps {
|
|
5
|
+
/** Element that popper is attached to */
|
|
6
|
+
anchorEl?: Element;
|
|
7
|
+
/** The content of the component */
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
/** Disable the portal behavior. If `true`, children stay within parent DOM hierarchy. */
|
|
10
|
+
disablePortal?: boolean;
|
|
11
|
+
/** Event callback when leaving popper by clicking away */
|
|
12
|
+
onClickAway?: (event: KeyboardEvent | MouseEvent<Document>) => void;
|
|
13
|
+
/** If `true`, the popper is visible. */
|
|
14
|
+
open: boolean;
|
|
15
|
+
/** Popper placement. */
|
|
16
|
+
placement?: PopperPlacementType;
|
|
17
|
+
}
|
|
18
|
+
export declare const DotPopper: ({ ariaLabel, anchorEl, children, className, "data-testid": dataTestId, disablePortal, onClickAway, open, placement, }: PopperProps) => JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { KeyboardEvent, MouseEvent } from 'react';
|
|
2
|
+
export interface PopperTestWrapperProps {
|
|
3
|
+
dataTestId?: string;
|
|
4
|
+
disablePortal?: boolean;
|
|
5
|
+
onClickAway?: (event: KeyboardEvent | MouseEvent<Document>) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const PopperTestWrapper: (props: PopperTestWrapperProps) => JSX.Element;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const defaultStoryClassName = "dot-popper-default";
|
|
2
|
+
export declare const flagTaskClassName = "dot-flag-task";
|
|
3
|
+
export declare const StyledPopperStory: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
4
|
+
export declare const StyledFlagTask: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { MouseEvent } from 'react';
|
|
2
2
|
import { ListItemProps } from '../list/utils/models';
|
|
3
|
+
export declare const childElement: JSX.Element;
|
|
3
4
|
export declare const getNavigationItems: (isSelected: (key: number) => boolean, handleClick: (key: number) => void) => ({
|
|
4
5
|
startIconId: string;
|
|
5
6
|
onClick: import("@storybook/addon-actions").HandlerFunction;
|
|
@@ -80,4 +81,11 @@ export declare const getNavigationItems: (isSelected: (key: number) => boolean,
|
|
|
80
81
|
selected?: undefined;
|
|
81
82
|
})[];
|
|
82
83
|
export declare const routerNavigationItems: Array<ListItemProps>;
|
|
84
|
+
interface SidebarPageTitleProps {
|
|
85
|
+
description?: string;
|
|
86
|
+
iconId: string;
|
|
87
|
+
title: string;
|
|
88
|
+
}
|
|
89
|
+
export declare const SidebarPageTitle: ({ description, title, iconId, }: SidebarPageTitleProps) => JSX.Element;
|
|
83
90
|
export declare const SidebarStoryRoutes: () => JSX.Element;
|
|
91
|
+
export {};
|
|
@@ -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, loading, maxVisibleItems, menuItemHeight, 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, selectedKey, }: import("../menu/Menu").MenuProps) => JSX.Element, any, {}, never>;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const handleDeleteClick: () => void;
|
|
3
|
+
export declare const handleBulkDeleteClick: () => void;
|
|
4
|
+
export declare const actionItemArray: {
|
|
5
|
+
actions: {
|
|
6
|
+
children: JSX.Element;
|
|
7
|
+
key: string;
|
|
8
|
+
onclick: () => void;
|
|
9
|
+
}[];
|
|
10
|
+
}[];
|
|
11
|
+
export declare const actionCol: {
|
|
12
|
+
id: string;
|
|
13
|
+
label: string;
|
|
14
|
+
}[];
|
|
15
|
+
export declare const tableData: {
|
|
16
|
+
id: string;
|
|
17
|
+
rowData: {
|
|
18
|
+
action: {
|
|
19
|
+
actions: {
|
|
20
|
+
children: JSX.Element;
|
|
21
|
+
key: string;
|
|
22
|
+
onclick: () => void;
|
|
23
|
+
}[];
|
|
24
|
+
}[];
|
|
25
|
+
type: string;
|
|
26
|
+
};
|
|
27
|
+
}[];
|
|
28
|
+
export declare const testCols: ({
|
|
29
|
+
id: string;
|
|
30
|
+
label: string;
|
|
31
|
+
truncate: boolean;
|
|
32
|
+
} | {
|
|
33
|
+
id: string;
|
|
34
|
+
label: string;
|
|
35
|
+
truncate?: undefined;
|
|
36
|
+
})[];
|
|
37
|
+
export declare const testData: {
|
|
38
|
+
id: string;
|
|
39
|
+
rowData: {
|
|
40
|
+
name: string;
|
|
41
|
+
type: string;
|
|
42
|
+
};
|
|
43
|
+
}[];
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { TextAlignment } from './TableCell';
|
|
3
|
+
import { TableProps } from './Table';
|
|
3
4
|
export declare const actionMenuColumns: ({
|
|
4
5
|
id: string;
|
|
5
6
|
label: string;
|
|
@@ -119,3 +120,4 @@ export declare const paginatedData: {
|
|
|
119
120
|
hit: string;
|
|
120
121
|
};
|
|
121
122
|
}[];
|
|
123
|
+
export declare const MultiSelectTable: (props: TableProps) => JSX.Element;
|
|
@@ -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, loading, maxVisibleItems, menuItemHeight, 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, selectedKey, }: import("../menu/Menu").MenuProps) => JSX.Element, any, {}, never>;
|
|
@@ -2,6 +2,7 @@ import { ReactNode } from 'react';
|
|
|
2
2
|
import { CommonProps } from '../CommonProps';
|
|
3
3
|
export interface TableSelectionToolbarProps extends CommonProps {
|
|
4
4
|
bulkActions?: ReactNode;
|
|
5
|
+
onClearAll?: () => void;
|
|
5
6
|
selectedRowsNumber: number;
|
|
6
7
|
}
|
|
7
|
-
export declare const DotTableSelectionToolbar: ({ ariaLabel, bulkActions, className, "data-testid": dataTestId, selectedRowsNumber, }: TableSelectionToolbarProps) => JSX.Element;
|
|
8
|
+
export declare const DotTableSelectionToolbar: ({ ariaLabel, bulkActions, className, "data-testid": dataTestId, onClearAll, selectedRowsNumber, }: TableSelectionToolbarProps) => JSX.Element;
|