@digital-ai/dot-components 1.3.6 → 1.5.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/CHANGE_LOG.md +725 -39
- package/dot-components.esm.js +469 -262
- package/dot-components.umd.js +483 -278
- package/lib/components/BaseButtonProps.d.ts +2 -2
- package/lib/components/accordion/Accordion.d.ts +11 -4
- package/lib/components/auto-complete/AutoComplete.d.ts +3 -3
- package/lib/components/avatar/Avatar.d.ts +2 -2
- package/lib/components/breadcrumbs/Breadcrumbs.data.d.ts +2 -0
- package/lib/components/breadcrumbs/Breadcrumbs.styles.d.ts +2 -0
- package/lib/components/breadcrumbs/utils/helpers.d.ts +19 -0
- package/lib/components/breadcrumbs/utils/useBreadcrumbsObserver.d.ts +11 -0
- package/lib/components/breadcrumbs/utils/useBreadcrumbsResizer.d.ts +16 -0
- package/lib/components/button/IconButton.d.ts +2 -2
- package/lib/components/button-toggle/ButtonToggle.d.ts +2 -2
- package/lib/components/chip/Chip.d.ts +4 -4
- package/lib/components/css-grid/CssCell.d.ts +5 -5
- package/lib/components/css-grid/CssGrid.d.ts +4 -4
- package/lib/components/drawer/Drawer.d.ts +4 -4
- package/lib/components/dynamic-form/models.d.ts +8 -8
- package/lib/components/index.d.ts +1 -0
- package/lib/components/list/List.d.ts +1 -1
- package/lib/components/menu/Menu.d.ts +4 -4
- package/lib/components/radio/RadioButton.d.ts +2 -2
- package/lib/components/sidebar/Sidebar.d.ts +2 -2
- package/lib/components/table/Table.d.ts +6 -6
- package/lib/components/table/TableCell.d.ts +1 -1
- package/lib/components/table/TableDataWithPagination.d.ts +4 -4
- package/lib/components/table/TableHeader.d.ts +2 -2
- package/lib/testing-utils/resize-observer-mock.d.ts +1 -0
- package/package.json +1 -1
|
@@ -5,10 +5,10 @@ export declare type ButtonSize = 'small' | 'medium' | 'large';
|
|
|
5
5
|
export interface BaseButtonProps extends CommonProps {
|
|
6
6
|
/** If true, the button will be focused **/
|
|
7
7
|
autoFocus?: boolean;
|
|
8
|
-
/** If true, the button will be disabled. */
|
|
9
|
-
disabled?: boolean;
|
|
10
8
|
/** If true, the ripple effect will be disabled. */
|
|
11
9
|
disableRipple?: boolean;
|
|
10
|
+
/** If true, the button will be disabled. */
|
|
11
|
+
disabled?: boolean;
|
|
12
12
|
/** If true, the button will take up the full width of its container. */
|
|
13
13
|
fullWidth?: boolean;
|
|
14
14
|
/** Is this a submit button */
|
|
@@ -1,23 +1,30 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ChangeEvent, ReactNode } from 'react';
|
|
2
2
|
import { CommonProps } from '../CommonProps';
|
|
3
3
|
export interface AccordionProps extends CommonProps {
|
|
4
4
|
/** actionable components (ex: checkbox, button) that can be nested within the expanded Accordion component */
|
|
5
5
|
actions?: ReactNode;
|
|
6
6
|
/** The content for the Accordion.*/
|
|
7
7
|
children: ReactNode;
|
|
8
|
-
/**
|
|
8
|
+
/** DEPRECATED, DO NOT USE */
|
|
9
9
|
defaultExpanded?: boolean;
|
|
10
10
|
/** If true, the accordion will be displayed in a disabled state. */
|
|
11
11
|
disabled?: boolean;
|
|
12
|
+
/** If true, the accordion is expanded. */
|
|
13
|
+
expanded?: boolean;
|
|
12
14
|
/** If true, the Accordion will have elevation. */
|
|
13
15
|
hasElevation?: boolean;
|
|
14
16
|
/** If true, the text will wrap and not be truncated */
|
|
15
17
|
noWrap?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
Callback fired when the expand/collapse state is changed.
|
|
20
|
+
If provided, the accordion will be a controlled component and it will be the responsibility of the consumer to manage the 'expanded' state.
|
|
21
|
+
*/
|
|
22
|
+
onChange?: (event: ChangeEvent, expanded: boolean) => void;
|
|
16
23
|
/** If true, rounded corners are disabled. */
|
|
17
24
|
square?: boolean;
|
|
18
25
|
/** Icon placed before the children. */
|
|
19
26
|
startIcon?: ReactNode;
|
|
20
27
|
/** The text within the expanded Accordion */
|
|
21
|
-
summary:
|
|
28
|
+
summary: ReactNode | string;
|
|
22
29
|
}
|
|
23
|
-
export declare const DotAccordion: ({ actions, ariaLabel, children, className, "data-testid": dataTestId, defaultExpanded, disabled, hasElevation, square, startIcon, summary, noWrap, }: AccordionProps) => JSX.Element;
|
|
30
|
+
export declare const DotAccordion: ({ actions, ariaLabel, children, className, "data-testid": dataTestId, defaultExpanded, disabled, expanded, hasElevation, onChange, square, startIcon, summary, noWrap, }: AccordionProps) => JSX.Element;
|
|
@@ -11,9 +11,9 @@ export interface ActionItem {
|
|
|
11
11
|
export declare type autoCompleteSize = 'medium' | 'small';
|
|
12
12
|
export declare type AutoCompleteValue = string | string[] | AutoCompleteOption | AutoCompleteOption[];
|
|
13
13
|
export interface AutoCompleteOption {
|
|
14
|
+
error?: boolean;
|
|
14
15
|
group?: string;
|
|
15
16
|
title: string;
|
|
16
|
-
error?: boolean;
|
|
17
17
|
}
|
|
18
18
|
export declare const parseAutoCompleteValue: (value: AutoCompleteValue) => string;
|
|
19
19
|
export interface AutoCompleteProps extends CommonProps {
|
|
@@ -23,10 +23,10 @@ export interface AutoCompleteProps extends CommonProps {
|
|
|
23
23
|
autoFocus?: boolean;
|
|
24
24
|
/** default option that is selected */
|
|
25
25
|
defaultValue?: AutoCompleteValue;
|
|
26
|
-
/** If true, the input will be disabled. */
|
|
27
|
-
disabled?: boolean;
|
|
28
26
|
/** Disable the portal behavior. If true, children stay within parent DOM hierarchy. */
|
|
29
27
|
disablePortal?: boolean;
|
|
28
|
+
/** If true, the input will be disabled. */
|
|
29
|
+
disabled?: boolean;
|
|
30
30
|
/** If true, the input will be displayed in an error state. */
|
|
31
31
|
error?: boolean;
|
|
32
32
|
/** If true, any arbitrary value can be typed in the field */
|
|
@@ -23,10 +23,10 @@ export interface AvatarProps extends CommonProps {
|
|
|
23
23
|
style?: CSSProperties;
|
|
24
24
|
/** The text to be displayed. Only the first 2 letters will be displayed. */
|
|
25
25
|
text?: string;
|
|
26
|
-
/** The type of the avatar */
|
|
27
|
-
type?: AvatarType;
|
|
28
26
|
/** Tooltip for avatar */
|
|
29
27
|
tooltip?: string;
|
|
28
|
+
/** The type of the avatar */
|
|
29
|
+
type?: AvatarType;
|
|
30
30
|
/** The shape of the avatar */
|
|
31
31
|
variant?: AvatarVariant;
|
|
32
32
|
}
|
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
export declare const rootClassName = "dot-breadcrumbs";
|
|
2
|
+
export declare const breadcrumbsWrapperClass = "dot-breadcrumbs-wrapper";
|
|
3
|
+
export declare const StyledBreadcrumbsWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
2
4
|
export declare const StyledBreadcrumbs: import("styled-components").StyledComponent<import("@material-ui/core/OverridableComponent").OverridableComponent<import("@material-ui/core").BreadcrumbsTypeMap<{}, "nav">>, any, {}, never>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React, { MutableRefObject } from 'react';
|
|
2
|
+
import { BreadcrumbItem } from '../Breadcrumbs';
|
|
3
|
+
export interface BreadcrumbItemRefs {
|
|
4
|
+
firstItemRef: MutableRefObject<HTMLDivElement>;
|
|
5
|
+
lastItemRef: MutableRefObject<HTMLSpanElement>;
|
|
6
|
+
}
|
|
7
|
+
export declare const getItemsAfterCollapse: (adjustMaxItems: boolean, visibleItemsNumber: number, maxItems?: number) => number | undefined;
|
|
8
|
+
export declare const getMaxItems: (adjustMaxItems: boolean, visibleItemsNumber: number, maxItems?: number) => number | undefined;
|
|
9
|
+
export declare const getWidthFromRef: <T extends HTMLElement>(ref: React.MutableRefObject<T>) => number | undefined;
|
|
10
|
+
export declare const checkIfFirstItemAfterCollapse: (currentIndex: number, items: BreadcrumbItem[], itemsAfterCollapse: number) => boolean;
|
|
11
|
+
export declare const getExpandElement: (breadcrumbElement: HTMLElement) => Element;
|
|
12
|
+
export declare const getInitialMaxVisibleItems: (items: BreadcrumbItem[], maxItems?: number) => number;
|
|
13
|
+
export declare const getMenuItems: (items: BreadcrumbItem[], itemsAfterCollapse: number) => {
|
|
14
|
+
children: JSX.Element;
|
|
15
|
+
key: string;
|
|
16
|
+
}[];
|
|
17
|
+
export declare const addListenersToMenu: (expandElement: Element, eventListener: EventListener) => void;
|
|
18
|
+
export declare const removeListenersFromMenu: (expandElement: Element, eventListener: EventListener) => void;
|
|
19
|
+
export declare const mapBreadcrumbItems: (items: BreadcrumbItem[], refs: BreadcrumbItemRefs, itemsAfterCollapse: number) => JSX.Element[];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { MutableRefObject } from 'react';
|
|
2
|
+
import { BreadcrumbItem } from '../Breadcrumbs';
|
|
3
|
+
export declare const MIN_AVAILABLE_SPACE = 60;
|
|
4
|
+
export declare const ITEMS_SEPARATOR_SPACE = 20;
|
|
5
|
+
interface BreadcrumbsObserverRefs {
|
|
6
|
+
breadcrumbRef: MutableRefObject<HTMLElement>;
|
|
7
|
+
firstItemRef: MutableRefObject<HTMLDivElement>;
|
|
8
|
+
lastItemRef: MutableRefObject<HTMLSpanElement>;
|
|
9
|
+
}
|
|
10
|
+
export declare const useBreadcrumbsObserver: (items: Array<BreadcrumbItem>, maxItems?: number) => [BreadcrumbsObserverRefs, number];
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { MutableRefObject } from 'react';
|
|
2
|
+
import { BreadcrumbItem } from '../Breadcrumbs';
|
|
3
|
+
export interface MaxVisibleItems {
|
|
4
|
+
lastRemovedItemWidth?: number;
|
|
5
|
+
maxVisibleItems: number;
|
|
6
|
+
}
|
|
7
|
+
interface BreadcrumbsResizerRefs {
|
|
8
|
+
firstItemRef: MutableRefObject<HTMLDivElement>;
|
|
9
|
+
lastItemRef: MutableRefObject<HTMLSpanElement>;
|
|
10
|
+
}
|
|
11
|
+
interface BreadcrumbItemsProps {
|
|
12
|
+
items: Array<BreadcrumbItem>;
|
|
13
|
+
maxItems?: number;
|
|
14
|
+
}
|
|
15
|
+
export declare const useBreadcrumbsResizer: (breadcrumbsRightCoord: number, breadcrumbItemsProps: BreadcrumbItemsProps, refs: BreadcrumbsResizerRefs) => [MaxVisibleItems];
|
|
16
|
+
export {};
|
|
@@ -6,10 +6,10 @@ export declare type IconButtonSize = 'small' | 'medium';
|
|
|
6
6
|
export interface IconButtonProps extends CommonProps {
|
|
7
7
|
/** 'default', 'inherit', 'primary', 'secondary' */
|
|
8
8
|
color?: IconButtonColor;
|
|
9
|
-
/** If true, the button will be disabled. */
|
|
10
|
-
disabled?: boolean;
|
|
11
9
|
/** If true, the ripple effect is disabled. */
|
|
12
10
|
disableRipple?: boolean;
|
|
11
|
+
/** If true, the button will be disabled. */
|
|
12
|
+
disabled?: boolean;
|
|
13
13
|
/** The icon to display on the button */
|
|
14
14
|
iconId: string;
|
|
15
15
|
/** Determines the size of the icon itself and spacing around it */
|
|
@@ -8,9 +8,9 @@ export interface ButtonToggleProps extends CommonProps {
|
|
|
8
8
|
buttonOptions: {
|
|
9
9
|
ariaLabel: string;
|
|
10
10
|
disabled?: boolean;
|
|
11
|
-
value: ButtonToggleValue;
|
|
12
|
-
text?: string;
|
|
13
11
|
iconId?: string;
|
|
12
|
+
text?: string;
|
|
13
|
+
value: ButtonToggleValue;
|
|
14
14
|
}[];
|
|
15
15
|
/** If true, the keyboard focus ripple will be disabled */
|
|
16
16
|
disableFocusRipple?: boolean;
|
|
@@ -6,14 +6,14 @@ export interface ChipProps extends CommonProps {
|
|
|
6
6
|
avatar?: ReactElement;
|
|
7
7
|
/** The text for the chip. */
|
|
8
8
|
children: string;
|
|
9
|
-
/** If true, the chip is clickable */
|
|
10
|
-
isClickable?: boolean;
|
|
11
|
-
/** If true, the chip is deletable */
|
|
12
|
-
isDeletable?: boolean;
|
|
13
9
|
/** If true, the chip is disabled */
|
|
14
10
|
disabled?: boolean;
|
|
15
11
|
/** If true, the chip is in error */
|
|
16
12
|
error?: boolean;
|
|
13
|
+
/** If true, the chip is clickable */
|
|
14
|
+
isClickable?: boolean;
|
|
15
|
+
/** If true, the chip is deletable */
|
|
16
|
+
isDeletable?: boolean;
|
|
17
17
|
/** Event callback on click */
|
|
18
18
|
onClick?: (event: MouseEvent) => void;
|
|
19
19
|
/** Event callback when delete icon is clicked */
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { CommonProps } from '../CommonProps';
|
|
3
3
|
export interface CellSize {
|
|
4
|
-
start?: number;
|
|
5
4
|
span?: number;
|
|
5
|
+
start?: number;
|
|
6
6
|
}
|
|
7
7
|
export declare type Placement = 'center' | 'flex-end' | 'space-between' | 'space-around' | 'stretch' | 'flex-start';
|
|
8
8
|
export interface CssCellProps extends CommonProps {
|
|
@@ -26,17 +26,17 @@ export interface CssCellProps extends CommonProps {
|
|
|
26
26
|
md?: CellSize;
|
|
27
27
|
/** Center align vertically and horizontally with flex, used by default */
|
|
28
28
|
middle?: boolean;
|
|
29
|
+
/** Small column breakpoint */
|
|
30
|
+
sm?: CellSize;
|
|
29
31
|
/** Column start when Cell column breakpoints are not used */
|
|
30
32
|
start?: number | string;
|
|
31
33
|
/** Row start override */
|
|
32
34
|
top?: number | string;
|
|
33
35
|
width?: number;
|
|
34
|
-
/** Extra small column breakpoint */
|
|
35
|
-
xs?: CellSize;
|
|
36
|
-
/** Small column breakpoint */
|
|
37
|
-
sm?: CellSize;
|
|
38
36
|
/** Extra large column breakpoint */
|
|
39
37
|
xl?: CellSize;
|
|
38
|
+
/** Extra small column breakpoint */
|
|
39
|
+
xs?: CellSize;
|
|
40
40
|
}
|
|
41
41
|
export declare const Cell: ({ children, className }: CssCellProps) => JSX.Element;
|
|
42
42
|
export declare const CssCell: import("styled-components").StyledComponent<({ children, className }: CssCellProps) => JSX.Element, any, {}, never>;
|
|
@@ -4,12 +4,12 @@ import { CommonProps } from '../CommonProps';
|
|
|
4
4
|
export interface CssGridProps extends CommonProps {
|
|
5
5
|
/** Cells for Grid */
|
|
6
6
|
children?: React.ReactNode | Array<React.ReactNode>;
|
|
7
|
-
/** Breakpoints for columns */
|
|
8
|
-
columnsBreakpoints?: BreakpointValues;
|
|
9
|
-
/** Columns, overrides columnsBreakpoints */
|
|
10
|
-
columns?: number | string;
|
|
11
7
|
/** Columns gap */
|
|
12
8
|
columnGap?: BreakpointValues;
|
|
9
|
+
/** Columns, overrides columnsBreakpoints */
|
|
10
|
+
columns?: number | string;
|
|
11
|
+
/** Breakpoints for columns */
|
|
12
|
+
columnsBreakpoints?: BreakpointValues;
|
|
13
13
|
/** Overall gap column and row */
|
|
14
14
|
gap?: string;
|
|
15
15
|
/** Template to create layout */
|
|
@@ -10,16 +10,16 @@ export declare type DrawerPaperProps = {
|
|
|
10
10
|
style?: CSSProperties;
|
|
11
11
|
};
|
|
12
12
|
export interface DrawerProps extends CommonProps {
|
|
13
|
+
/** Props applied to the Modal element. */
|
|
14
|
+
ModalProps?: DrawerModalProps;
|
|
15
|
+
/** Props applied to the Paper element. */
|
|
16
|
+
PaperProps?: DrawerPaperProps;
|
|
13
17
|
/** Side from which the drawer will appear 'bottom', 'left', 'right', 'top' */
|
|
14
18
|
anchor?: DrawerAnchor;
|
|
15
19
|
/** string or JSX element that is displayed inside the drawer */
|
|
16
20
|
children?: ReactNode;
|
|
17
21
|
/** The height of the drawer when anchor is 'top' or 'bottom' */
|
|
18
22
|
height?: string;
|
|
19
|
-
/** Props applied to the Modal element. */
|
|
20
|
-
ModalProps?: DrawerModalProps;
|
|
21
|
-
/** Props applied to the Paper element. */
|
|
22
|
-
PaperProps?: DrawerPaperProps;
|
|
23
23
|
/** Callback fired when the component requests to be closed. */
|
|
24
24
|
onClose?: (event: MouseEvent | KeyboardEvent) => void;
|
|
25
25
|
/** If true, the drawer is open. */
|
|
@@ -29,17 +29,17 @@ export interface DynamicFormControl {
|
|
|
29
29
|
controlName?: string;
|
|
30
30
|
controlProps?: DynamicFormControlProps;
|
|
31
31
|
controlType: DynamicFormControlType;
|
|
32
|
-
formSection?: DynamicFormSection;
|
|
33
32
|
customElement?: ReactNode;
|
|
34
33
|
disabled?: DisabledControlCondition;
|
|
34
|
+
formSection?: DynamicFormSection;
|
|
35
35
|
hidden?: ControlCondition;
|
|
36
36
|
initialValue?: unknown;
|
|
37
37
|
onControlClick?: ControlClickHandler;
|
|
38
38
|
validation?: DynamicFormValidation;
|
|
39
39
|
}
|
|
40
40
|
export interface FieldValidation {
|
|
41
|
-
isValid: boolean;
|
|
42
41
|
errorMessage: string | null;
|
|
42
|
+
isValid: boolean;
|
|
43
43
|
}
|
|
44
44
|
export interface DynamicFormConfig {
|
|
45
45
|
controls: DynamicFormControl[];
|
|
@@ -55,17 +55,17 @@ export interface Length extends ValidationField {
|
|
|
55
55
|
value: number;
|
|
56
56
|
}
|
|
57
57
|
export interface DynamicFormValidation {
|
|
58
|
+
customValidator?: (value: unknown) => FieldValidation;
|
|
58
59
|
isRequired?: IsRequired;
|
|
59
|
-
minLength?: Length;
|
|
60
60
|
maxLength?: Length;
|
|
61
|
-
|
|
61
|
+
minLength?: Length;
|
|
62
62
|
}
|
|
63
63
|
export interface DynamicFormStateItem {
|
|
64
|
-
value: unknown;
|
|
65
|
-
isValid: boolean;
|
|
66
|
-
isTouched: boolean;
|
|
67
64
|
errorMessage: string;
|
|
68
65
|
hidden?: ControlCondition;
|
|
66
|
+
isTouched: boolean;
|
|
67
|
+
isValid: boolean;
|
|
68
|
+
value: unknown;
|
|
69
69
|
}
|
|
70
70
|
export interface DynamicFormState {
|
|
71
71
|
data: DynamicFormStateData;
|
|
@@ -76,7 +76,7 @@ export interface DynamicFormStateData {
|
|
|
76
76
|
}
|
|
77
77
|
export interface FormStateUpdateArgs {
|
|
78
78
|
controlName: string;
|
|
79
|
-
newValue: unknown;
|
|
80
79
|
formConfig: DynamicFormConfig;
|
|
80
|
+
newValue: unknown;
|
|
81
81
|
validate?: boolean;
|
|
82
82
|
}
|
|
@@ -11,6 +11,7 @@ export type { ControlClickHandler, DynamicFormConfig, DynamicFormControl, Dynami
|
|
|
11
11
|
export type { IconButtonProps } from './button/IconButton';
|
|
12
12
|
export type { InputTextProps } from './input-form-fields/InputText';
|
|
13
13
|
export type { InputSelectProps } from './input-form-fields/InputSelect';
|
|
14
|
+
export type { LinkUnderline } from './link/Link';
|
|
14
15
|
export type { ListItemProps } from './list/List';
|
|
15
16
|
export type { MenuItemProps } from './menu/Menu';
|
|
16
17
|
export type { RailItem } from './navigation-rail/NavigationRail';
|
|
@@ -54,9 +54,9 @@ export interface ListItemProps extends CommonProps {
|
|
|
54
54
|
href?: string;
|
|
55
55
|
/** DEPRECATED, DO NOT USE */
|
|
56
56
|
index?: number;
|
|
57
|
+
isOpened?: boolean;
|
|
57
58
|
/** If provided, the menu item will display a nested list */
|
|
58
59
|
items?: Array<ListItemProps>;
|
|
59
|
-
isOpened?: boolean;
|
|
60
60
|
/** If nested list type is 'menu', determines the placement of the menu */
|
|
61
61
|
menuPlacement?: PopperPlacement;
|
|
62
62
|
/** If nested type is 'drawer', determines the width of the left spacing */
|
|
@@ -14,18 +14,18 @@ export interface MenuProps extends CommonProps {
|
|
|
14
14
|
loading?: boolean;
|
|
15
15
|
/** Maximum number of visible menu items */
|
|
16
16
|
maxVisibleItems?: number;
|
|
17
|
-
/** Array of items to be displayed inside the menu */
|
|
18
|
-
menuItems: Array<MenuItemProps>;
|
|
19
17
|
/** Used to specify height of each menu item when custom component, set to "auto" if no specific height is needed or leave empty for auto calculation based on `maxVisibleItems` */
|
|
20
18
|
menuItemHeight?: number | string;
|
|
19
|
+
/** Array of items to be displayed inside the menu */
|
|
20
|
+
menuItems: Array<MenuItemProps>;
|
|
21
21
|
/** Determines the placement of the menu */
|
|
22
22
|
menuPlacement?: PopperPlacement;
|
|
23
|
-
/** If true, the menu is open. */
|
|
24
|
-
open?: boolean;
|
|
25
23
|
/** Event callback when leaving menu via tab or clicking away */
|
|
26
24
|
onLeave?: (event: KeyboardEvent | MouseEvent) => void;
|
|
27
25
|
/** Callback when menu item is selected */
|
|
28
26
|
onSelect?: (event: MouseEvent | KeyboardEvent, menuId: string, itemKey: string) => void;
|
|
27
|
+
/** If true, the menu is open. */
|
|
28
|
+
open?: boolean;
|
|
29
29
|
}
|
|
30
30
|
export interface MenuItemProps {
|
|
31
31
|
/** Defines a string value that labels the current element **/
|
|
@@ -11,10 +11,10 @@ export interface RadioButtonBaseProps extends CommonProps {
|
|
|
11
11
|
labelPlacement?: RadioLabelPlacement;
|
|
12
12
|
/** name of radio input */
|
|
13
13
|
name?: string;
|
|
14
|
-
/** controls the size of the radio button 'medium', 'small' */
|
|
15
|
-
size?: RadioSize;
|
|
16
14
|
/** if true user is required to select an option */
|
|
17
15
|
required?: boolean;
|
|
16
|
+
/** controls the size of the radio button 'medium', 'small' */
|
|
17
|
+
size?: RadioSize;
|
|
18
18
|
/** unique value for the radio button */
|
|
19
19
|
value?: string;
|
|
20
20
|
}
|
|
@@ -31,10 +31,10 @@ export interface SidebarProps extends CommonProps {
|
|
|
31
31
|
displayBrand?: boolean;
|
|
32
32
|
/** If true will display the go back nav item at the top of the sidebar */
|
|
33
33
|
goBack?: boolean;
|
|
34
|
-
/** If 'menu' the nested list will be displayed as a flyout nav, else it will be an expand/collapse toggle list */
|
|
35
|
-
nestedListType?: NestedListType;
|
|
36
34
|
/** Array of nav items */
|
|
37
35
|
navItems?: Array<ListItemProps>;
|
|
36
|
+
/** If 'menu' the nested list will be displayed as a flyout nav, else it will be an expand/collapse toggle list */
|
|
37
|
+
nestedListType?: NestedListType;
|
|
38
38
|
/** If true, the sidebar is open. */
|
|
39
39
|
open?: boolean;
|
|
40
40
|
/** The text that is displayed at the top of the sidebar */
|
|
@@ -6,10 +6,10 @@ import { RowsPerPageOption } from './TablePagination';
|
|
|
6
6
|
export interface TableRowProps extends CommonProps {
|
|
7
7
|
/** row identifier that will be passed to onRowClick callback */
|
|
8
8
|
id?: string;
|
|
9
|
-
/** if the row is selected */
|
|
10
|
-
selected?: boolean;
|
|
11
9
|
/** row data where keys map to column ids and values to cell values */
|
|
12
10
|
rowData: any;
|
|
11
|
+
/** if the row is selected */
|
|
12
|
+
selected?: boolean;
|
|
13
13
|
}
|
|
14
14
|
export interface TableProps extends CommonProps {
|
|
15
15
|
/** The table header columns */
|
|
@@ -28,14 +28,14 @@ export interface TableProps extends CommonProps {
|
|
|
28
28
|
loading?: boolean;
|
|
29
29
|
/** Maximum height of table container */
|
|
30
30
|
maxHeight?: string;
|
|
31
|
-
/** The sort order of table data 'asc', 'desc' */
|
|
32
|
-
order?: Order;
|
|
33
|
-
/** The ID of the column that you are sorting by */
|
|
34
|
-
orderBy?: string;
|
|
35
31
|
/** Row click event callback */
|
|
36
32
|
onRowClick?: (event: MouseEvent, id: string) => void;
|
|
37
33
|
/** Update data callback if data is managed by consumer */
|
|
38
34
|
onUpdateData?: (order: Order, orderBy: string, page: number, rowsPerPage: number) => void;
|
|
35
|
+
/** The sort order of table data 'asc', 'desc' */
|
|
36
|
+
order?: Order;
|
|
37
|
+
/** The ID of the column that you are sorting by */
|
|
38
|
+
orderBy?: string;
|
|
39
39
|
/** The zero-based index of the current page for paginated table */
|
|
40
40
|
page?: number;
|
|
41
41
|
/** Rows per page for paginated table */
|
|
@@ -7,8 +7,8 @@ export interface CellProps extends CommonProps {
|
|
|
7
7
|
colspan?: number;
|
|
8
8
|
id?: string;
|
|
9
9
|
noWrap?: boolean;
|
|
10
|
-
value?: any;
|
|
11
10
|
onActionMenuTrigger?: (el: HTMLElement, menuItem: Array<ReactNode>) => void;
|
|
11
|
+
value?: any;
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
14
|
* A wrapper component around the TableCell component from @material-ui.
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
export interface TableDataWithPagination {
|
|
2
2
|
data: Array<any>;
|
|
3
3
|
pagination: {
|
|
4
|
-
size: number;
|
|
5
|
-
total_pages: number;
|
|
6
|
-
total_elements: number;
|
|
7
4
|
current_page: number;
|
|
8
|
-
has_previous: boolean;
|
|
9
5
|
has_next: boolean;
|
|
6
|
+
has_previous: boolean;
|
|
7
|
+
size: number;
|
|
8
|
+
total_elements: number;
|
|
9
|
+
total_pages: number;
|
|
10
10
|
};
|
|
11
11
|
}
|
|
@@ -28,10 +28,10 @@ export interface HeaderCellProps {
|
|
|
28
28
|
order?: Order;
|
|
29
29
|
/** The ID of the column that you are sorting by */
|
|
30
30
|
orderBy?: string;
|
|
31
|
-
/** Determines if sorting is enabled */
|
|
32
|
-
sortable?: boolean;
|
|
33
31
|
/** Determines sorting order of ascending or desceding */
|
|
34
32
|
sortDirection?: 'desc' | 'asc' | undefined;
|
|
33
|
+
/** Determines if sorting is enabled */
|
|
34
|
+
sortable?: boolean;
|
|
35
35
|
/**Allows table cell text truncated and displays in only one line */
|
|
36
36
|
truncate?: boolean;
|
|
37
37
|
/** The UID of the cell, if not provided then a randomly generated hash will be created using
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const mockResizeObserver: () => void;
|