@digital-ai/dot-components 1.6.2 → 1.7.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 -6
- package/dot-components.esm.js +3098 -3350
- package/dot-components.umd.js +411 -158
- 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 +16 -5
- package/lib/components/auto-complete/Autocomplete.stories.data.d.ts +5 -0
- package/lib/components/breadcrumbs/Breadcrumbs.d.ts +1 -1
- package/lib/components/index.d.ts +1 -1
- 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/sidebar/Sidebar.stories.data.d.ts +7 -0
- package/package.json +1 -1
|
@@ -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,13 @@
|
|
|
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';
|
|
3
4
|
export interface ActionItem {
|
|
4
5
|
/** The icon to display on the button */
|
|
5
6
|
iconId: string;
|
|
6
7
|
/** Event callback */
|
|
7
8
|
onClick: () => void;
|
|
8
|
-
/** Text displayed */
|
|
9
|
-
text: string;
|
|
9
|
+
/** Text/Node displayed */
|
|
10
|
+
text: string | ReactNode;
|
|
10
11
|
}
|
|
11
12
|
export declare type autoCompleteSize = 'medium' | 'small';
|
|
12
13
|
export declare type AutoCompleteValue = string | string[] | AutoCompleteOption | AutoCompleteOption[];
|
|
@@ -41,10 +42,20 @@ export interface AutoCompleteProps extends CommonProps {
|
|
|
41
42
|
inputRef?: Ref<HTMLInputElement>;
|
|
42
43
|
/** Label displayed above the input field */
|
|
43
44
|
label?: string;
|
|
45
|
+
/** If true, the component will be in a loading state. */
|
|
46
|
+
loading?: boolean;
|
|
44
47
|
/** If true, will allow the user to select multiple options */
|
|
45
48
|
multiple?: boolean;
|
|
46
|
-
/** A function that should be executed when the value
|
|
49
|
+
/** A function that should be executed when the autocomplete value changes */
|
|
47
50
|
onChange?: (event: ChangeEvent<unknown>, value: AutoCompleteValue, reason: string) => void;
|
|
51
|
+
/** Callback fired when the popup requests to be closed. Use in controlled mode. */
|
|
52
|
+
onClose?: (event: ChangeEvent, reason: AutocompleteCloseReason) => void;
|
|
53
|
+
/** A function that should be executed each time when the input value changes */
|
|
54
|
+
onInputChange?: (event: ChangeEvent<unknown>, value: string, reason: string) => void;
|
|
55
|
+
/** Callback fired when the popup requests to be opened. Use in controlled mode. */
|
|
56
|
+
onOpen?: (event: ChangeEvent) => void;
|
|
57
|
+
/** Controls the popup's open state. */
|
|
58
|
+
open?: boolean;
|
|
48
59
|
/** pre-defined options available to the user */
|
|
49
60
|
options?: Array<AutoCompleteOption>;
|
|
50
61
|
/** Placeholder text always displayed inside the input field */
|
|
@@ -56,4 +67,4 @@ export interface AutoCompleteProps extends CommonProps {
|
|
|
56
67
|
/** value if this is a controlled component */
|
|
57
68
|
value?: AutoCompleteValue;
|
|
58
69
|
}
|
|
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;
|
|
70
|
+
export declare const DotAutoComplete: ({ actionItem, ariaLabel, autoFocus, className, "data-testid": dataTestId, defaultValue, disabled, disablePortal, error, freesolo, group, helperText, inputId, inputRef, label, loading, multiple, onChange, onClose, onInputChange, onOpen, open, options, placeholder, required, size, value, }: AutoCompleteProps) => JSX.Element;
|
|
@@ -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;
|
|
@@ -10,7 +10,7 @@ export type { DynamicFormProps } from './dynamic-form/DynamicForm';
|
|
|
10
10
|
export type { ConditionFunction, ControlClickHandler, DisabledConditionFunction, DisabledControlCondition, DynamicFormConfig, DynamicFormControl, DynamicFormControlProps, DynamicFormControlType, DynamicFormOutputData, DynamicFormSectionProps, DynamicFormState, DynamicFormStateItem, FieldValidation, } from './dynamic-form/models';
|
|
11
11
|
export type { IconButtonProps } from './button/IconButton';
|
|
12
12
|
export type { InputTextProps } from './input-form-fields/InputText';
|
|
13
|
-
export type { InputSelectProps } from './input-form-fields/InputSelect';
|
|
13
|
+
export type { InputSelectProps, InputSelectOption } from './input-form-fields/InputSelect';
|
|
14
14
|
export type { LinkUnderline } from './link/Link';
|
|
15
15
|
export type { ListItemProps } from './list';
|
|
16
16
|
export type { MenuItemProps } from './menu/Menu';
|
|
@@ -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">>>;
|
|
@@ -80,4 +80,11 @@ export declare const getNavigationItems: (isSelected: (key: number) => boolean,
|
|
|
80
80
|
selected?: undefined;
|
|
81
81
|
})[];
|
|
82
82
|
export declare const routerNavigationItems: Array<ListItemProps>;
|
|
83
|
+
interface SidebarPageTitleProps {
|
|
84
|
+
description?: string;
|
|
85
|
+
iconId: string;
|
|
86
|
+
title: string;
|
|
87
|
+
}
|
|
88
|
+
export declare const SidebarPageTitle: ({ description, title, iconId, }: SidebarPageTitleProps) => JSX.Element;
|
|
83
89
|
export declare const SidebarStoryRoutes: () => JSX.Element;
|
|
90
|
+
export {};
|