@digital-ai/dot-components 1.17.2 → 1.19.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.
@@ -15,6 +15,8 @@ export interface AppToolbarIconButtons extends IconButtonProps {
15
15
  export interface AppToolbarProps extends CommonProps {
16
16
  /** If provided will display application logo */
17
17
  appLogo?: ReactNode;
18
+ /** URL of the page the application logo link will go to */
19
+ appLogoHref?: string;
18
20
  /** If provided will display application logo */
19
21
  appLogoSmall?: ReactNode;
20
22
  /** DEPRECATED, DO NOT USE */
@@ -42,4 +44,4 @@ export interface AppToolbarProps extends CommonProps {
42
44
  /** URL of the page the primary logo link will go to */
43
45
  primaryLogoHref?: string;
44
46
  }
45
- 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;
47
+ export declare const DotAppToolbar: ({ appName, appLogo, appLogoHref, appLogoSmall, ariaLabel, avatar, borderColor, children, className, closeMenuOnItemClick, customLogo, "data-testid": dataTestId, dense, navItems, mainMenu, mainMenuItems, mainMenuWidth, primaryLogoHref, }: AppToolbarProps) => JSX.Element;
@@ -13,7 +13,7 @@ export interface ActionItem {
13
13
  text?: string | ReactNode;
14
14
  }
15
15
  export declare type autoCompleteSize = 'medium' | 'small';
16
- export declare type AutoCompleteValue = string | string[] | AutoCompleteOption | AutoCompleteOption[];
16
+ export declare type AutoCompleteValue = string | string[] | AutoCompleteOption | AutoCompleteOption[] | null;
17
17
  export interface AutoCompleteOption {
18
18
  error?: boolean;
19
19
  group?: string;
@@ -1,4 +1,6 @@
1
1
  export declare const selectedAutocompleteClassName = "dot-selected-autocomplete-items";
2
2
  export declare const autocompleteWithoutChipsClassName = "dot-autocomplete-without-chips";
3
+ export declare const autocompleteWithNullValueClassName = "dot-autocomplete-with-null-value";
3
4
  export declare const StyledSelectedAutocompleteItems: import("styled-components").StyledComponent<"div", any, {}, never>;
4
5
  export declare const StyledAutocompleteWithoutChips: import("styled-components").StyledComponent<"div", any, {}, never>;
6
+ export declare const StyledAutocompleteWithNullValue: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -37,3 +37,7 @@ export interface AutocompleteWithoutChipsProps extends CommonProps {
37
37
  storyArgs: AutoCompleteProps;
38
38
  }
39
39
  export declare const AutocompleteWithoutChips: ({ className, onChange, onItemRemove, selectedOptions, storyArgs, }: AutocompleteWithoutChipsProps) => JSX.Element;
40
+ export interface AutocompleteWithNullValueProps {
41
+ storyArgs: AutoCompleteProps;
42
+ }
43
+ export declare const AutocompleteWithNullValue: ({ storyArgs, }: AutocompleteWithNullValueProps) => JSX.Element;
@@ -1,16 +1,24 @@
1
1
  /// <reference types="react" />
2
2
  import { CommonProps } from '../CommonProps';
3
3
  import { DraggableItem, DraggableListChangeHandler } from './utils/models';
4
- export declare const DEFAULT_LIST_WIDTH = 240;
4
+ export declare const DEFAULT_LIST_WIDTH = "100%";
5
5
  export declare const DEFAULT_LIST_ITEM_HEIGHT = 36;
6
6
  export interface DraggableListProps extends CommonProps {
7
+ /** If true, component will prevent items to be dragged. */
8
+ disableDrag?: boolean;
9
+ /**
10
+ * A CSS selector for tags that will act as the draggable handle.
11
+ * For example: `draggableHandle: '.MyDragHandleClassName'`
12
+ * If you forget the leading . it will not work.
13
+ */
14
+ draggableHandle?: string;
7
15
  /** Array of draggable list items displayed */
8
16
  items: DraggableItem[];
9
17
  /** Callback function which gets executed when the list changes */
10
18
  onChange?: DraggableListChangeHandler;
11
19
  /** Height of the list item in pixels, defaults to 36px */
12
20
  rowHeight?: number;
13
- /** Width of the draggable list, defaults to 240px */
21
+ /** Width of the draggable list, defaults to '100%' */
14
22
  width?: number | string;
15
23
  }
16
- export declare const DotDraggableList: ({ ariaLabel, className, "data-testid": dataTestId, items, onChange, width, rowHeight, }: DraggableListProps) => JSX.Element;
24
+ export declare const DotDraggableList: ({ ariaLabel, className, "data-testid": dataTestId, disableDrag, draggableHandle, items, onChange, rowHeight, width, }: DraggableListProps) => JSX.Element;
@@ -5,11 +5,15 @@ export interface DraggableListWithAvatarArgs {
5
5
  secondaryText: string;
6
6
  }
7
7
  export interface DraggableListWithIconsArgs {
8
- id: string;
9
8
  text: string;
10
9
  }
10
+ export interface DraggableListWithHandleArgs extends DraggableListWithIconsArgs {
11
+ id: string;
12
+ }
11
13
  export declare const DraggableListWithAvatar: ({ primaryText, secondaryText, }: DraggableListWithAvatarArgs) => JSX.Element;
12
- export declare const DraggableListWithIcons: ({ id, text, }: DraggableListWithIconsArgs) => JSX.Element;
14
+ export declare const DraggableListWithIcons: ({ text, }: DraggableListWithIconsArgs) => JSX.Element;
15
+ export declare const DraggableListWithHandle: ({ id, text, }: DraggableListWithHandleArgs) => JSX.Element;
13
16
  export declare const draggableListItems: DraggableItem[];
14
17
  export declare const draggableListWithAvatar: DraggableItem[];
15
18
  export declare const draggableListWithIcons: DraggableItem[];
19
+ export declare const draggableListWithHandle: DraggableItem[];
@@ -1,4 +1,6 @@
1
+ export declare const withDefaultContainerClassName = "dot-draggable-list-with-icons";
1
2
  export declare const withIconsClassName = "dot-draggable-list-with-icons";
2
3
  export declare const withAvatarClassName = "dot-draggable-list-with-avatar";
4
+ export declare const StyledDefaultStoryContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
3
5
  export declare const StyledDraggableListWithAvatar: import("styled-components").StyledComponent<"div", any, {}, never>;
4
6
  export declare const StyledDraggableListWithIcons: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -1,3 +1,8 @@
1
1
  export declare const rootClassName = "dot-draggable-list";
2
2
  export declare const listItemClassName = "dot-draggable-list-item";
3
- export declare const StyledDraggableList: import("styled-components").StyledComponent<"div", any, {}, never>;
3
+ interface StyledDraggableListProps {
4
+ draggableHandle?: string;
5
+ width: string;
6
+ }
7
+ export declare const StyledDraggableList: import("styled-components").StyledComponent<"div", any, StyledDraggableListProps, never>;
8
+ export {};
@@ -1,4 +1,5 @@
1
1
  import { Layout } from 'react-grid-layout';
2
2
  import { DraggableItem } from './models';
3
3
  export declare const getOrderedListItems: (layout: Layout[], listItems: DraggableItem[]) => DraggableItem[];
4
+ export declare const checkIfEqual: (oldList: DraggableItem[], newList: DraggableItem[]) => boolean;
4
5
  export declare const getListItemLayout: (listItems: DraggableItem[]) => Layout[];
@@ -7,3 +7,4 @@ export declare const getAvatarColorForInputText: (value: string) => AvatarColor;
7
7
  export declare const isString: (str: unknown) => boolean;
8
8
  export declare const isNumber: (num: unknown) => boolean;
9
9
  export declare const renderNodeOrTypography: (content: string | ReactNode, typographyVariant?: TypographyVariant) => ReactNode;
10
+ export declare const searchString: (needle: string, haystack: string) => boolean;
@@ -19,7 +19,7 @@ export type { RadioButtonProps } from './radio/RadioButton';
19
19
  export type { RadioGroupProps } from './radio/RadioGroup';
20
20
  export type { BackItemProps, SidebarProps } from './sidebar/Sidebar';
21
21
  export type { SwitchProps, SwitchColor, SwitchSize, SwitchLabelPlacement, } from './switch';
22
- export type { DotColumnHeader, MultiSelect, Order, RowSelectionChangeHandler, RowsPerPageOption, TableDataWithPagination, TableRowProps, TableRowSelectChangeHandler, TextAlignment, SortDirection, } from './table';
22
+ export type { DotColumnHeader, MultiSelect, Order, RowSelectionChangeHandler, RowsPerPageOption, TableActionProps, TableActionsProps, TableDataWithPagination, TableRowProps, TableRowSelectChangeHandler, TextAlignment, SortDirection, } from './table';
23
23
  export type { TabProps } from './tabs/Tabs';
24
24
  export type { TypographyVariant } from './typography/Typography';
25
25
  export type { ProgressButtonProps } from './progress-button/ProgressButton';
@@ -88,3 +88,4 @@ export { DotDivider } from './divider';
88
88
  export { DotPopper } from './popper';
89
89
  export { DotTruncateWithTooltip } from './truncate-with-tooltip';
90
90
  export { DotDraggableList } from './draggable-list';
91
+ export { CreateUUID } from './createUUID';
@@ -7,6 +7,7 @@ export interface InputTextProps extends InputProps {
7
7
  https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill
8
8
  **/
9
9
  autoComplete?: string;
10
+ endAdornmentTooltip?: string;
10
11
  /** If true, the input will use debounce functionality. **/
11
12
  hasDebounce?: boolean;
12
13
  /** if multiline it wil render multiple lines */
@@ -22,4 +23,4 @@ export interface InputTextProps extends InputProps {
22
23
  /** value of the InputText */
23
24
  value?: string;
24
25
  }
25
- export declare const DotInputText: ({ autoComplete, autoFocus, className, defaultValue, "data-testid": dataTestId, disabled, error, fullWidth, hasDebounce, helperText, endIcon, id, inputRef, label, multiline, name, onBlur, onChange, onFocus, onKeyDown, onMouseUp, placeholder, readOnly, required, rows, rowsMax, startIcon, size, type, value, warning, }: InputTextProps) => JSX.Element;
26
+ export declare const DotInputText: ({ autoComplete, autoFocus, className, defaultValue, "data-testid": dataTestId, disabled, error, endAdornmentTooltip, fullWidth, hasDebounce, helperText, endIcon, id, inputRef, label, multiline, name, onBlur, onChange, onFocus, onKeyDown, onMouseUp, placeholder, readOnly, required, rows, rowsMax, startIcon, size, type, value, warning, }: InputTextProps) => JSX.Element;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import { ListItemProps, ListProps, NestedListProps } from './utils/models';
3
3
  export declare const DotList: ({ ariaLabel, children, className, component, "data-testid": dataTestId, dense, disablePadding, items, menuPlacement, nestedDrawerLeftSpacing, nestedListType, width, }: ListProps) => JSX.Element;
4
- export declare const DotListItem: ({ ariaLabel, className, component, "data-testid": dataTestId, divider, endIcon, endIconId, href, isOpened, onClick, onMenuLeave, index, items, menuPlacement, nestedDrawerLeftSpacing, nestedListType, primaryText, secondaryText, selected, startIcon, startIconId, target, text, title, tooltip, }: ListItemProps) => JSX.Element;
4
+ export declare const DotListItem: ({ ariaLabel, className, component, "data-testid": dataTestId, divider, endIcon, endIconId, href, isOpened, onClick, onMenuLeave, index, items, menuPlacement, nestedDrawerLeftSpacing, nestedListType, primaryText, secondaryText, selected, startIcon, startIconId, target, text, title, tooltip, tooltipPlacement, }: ListItemProps) => JSX.Element;
5
5
  export declare const NestedList: ({ ariaLabel, anchorEl, "data-testid": dataTestId, items, menuPlacement, nestedDrawerLeftSpacing, onMenuLeave, open, parentItemIndex, type, }: NestedListProps) => JSX.Element;
@@ -2,6 +2,7 @@ import { ElementType, KeyboardEvent, MouseEvent, ReactNode } from 'react';
2
2
  import { CommonProps } from '../../CommonProps';
3
3
  import { PopperPlacement } from '../../menu/Menu';
4
4
  import { LinkTarget } from '../../link/Link';
5
+ import { tooltipPlacement } from '../../tooltip/Tooltip';
5
6
  export declare type NestedListType = 'drawer' | 'expandable' | 'menu';
6
7
  export interface ListProps extends CommonProps {
7
8
  /** string or JSX element that is displayed inside the list */
@@ -69,6 +70,8 @@ export interface ListItemProps extends CommonProps {
69
70
  title?: string;
70
71
  /** Tooltip text displayed on hover */
71
72
  tooltip?: string;
73
+ /** Tooltip placement displayed on hover */
74
+ tooltipPlacement?: tooltipPlacement;
72
75
  }
73
76
  export interface NestedListProps extends CommonProps {
74
77
  /** Element that menu is attached to */
@@ -1,16 +1,16 @@
1
- import { KeyboardEvent, MouseEvent, ReactNode } from 'react';
1
+ /// <reference types="react" />
2
2
  import { MenuItemProps } from '../menu/Menu';
3
3
  import { BaseButtonProps } from '../BaseButtonProps';
4
4
  export interface SplitButtonProps extends BaseButtonProps {
5
5
  /** accessibility label */
6
6
  ariaLabel: string;
7
- /** The text for the button. Button text should be in sentence case. */
8
- children: ReactNode;
7
+ /** Key of the option which will be rendered as main option */
8
+ defaultMainOptionKey?: string;
9
9
  /** Disable the portal behavior. If true, children stay within parent DOM hierarchy. */
10
10
  disablePortal?: boolean;
11
- /** Callback when menu item is selected */
12
- onSelect?: (event: MouseEvent | KeyboardEvent, menuId: string, itemKey: string) => void;
11
+ /** Callback function which executes when any option has been clicked */
12
+ onOptionClick: (itemKey: string) => void;
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, tooltip, type, }: SplitButtonProps) => JSX.Element;
16
+ export declare const DotSplitButton: ({ autoFocus, ariaLabel, className, "data-testid": dataTestId, defaultMainOptionKey, disabled, disablePortal, disableRipple, fullWidth, isSubmit, onOptionClick, options, size, titleTooltip, tooltip, type, }: SplitButtonProps) => JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { MenuItemProps } from '../../menu/Menu';
2
+ export declare const getMainOptionIndex: (options: MenuItemProps[], mainOptionKey?: string) => number | null;
@@ -1,4 +1,6 @@
1
1
  export type { TableRowProps } from './Table';
2
+ export type { TableActionProps } from './TableAction';
3
+ export type { TableActionsProps } from './TableActions';
2
4
  export type { TextAlignment } from './TableCell';
3
5
  export type { TableDataWithPagination } from './TableDataWithPagination';
4
6
  export type { DotColumnHeader, Order } from './TableHeader';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digital-ai/dot-components",
3
- "version": "1.17.2",
3
+ "version": "1.19.1",
4
4
  "private": false,
5
5
  "license": "SEE LICENSE IN <LICENSE.md>",
6
6
  "contributors": [