@digital-ai/dot-components 2.1.1 → 2.2.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.
@@ -1,4 +1,4 @@
1
- import { ChangeEvent, FocusEvent, HTMLAttributes, ReactNode, Ref } from 'react';
1
+ import { ChangeEvent, FocusEvent, HTMLAttributes, ReactNode, Ref, JSXElementConstructor } from 'react';
2
2
  import { AutocompleteCloseReason, AutocompleteGetTagProps, AutocompleteRenderOptionState } from '@mui/material';
3
3
  import { CommonProps } from '../CommonProps';
4
4
  export declare const DEFAULT_ACTION_ITEM_TEXT = "Add new item";
@@ -24,6 +24,8 @@ export interface AutoCompleteOption {
24
24
  * autocomplete option rendering by using `renderOption` prop.
25
25
  */
26
26
  export interface AutoCompleteProps<T extends AutoCompleteOption = AutoCompleteOption> extends CommonProps {
27
+ /** The component used to render the listbox. **/
28
+ ListboxComponent?: JSXElementConstructor<HTMLAttributes<HTMLElement>>;
27
29
  /** Action button as the last element on the menu **/
28
30
  actionItem?: ActionItem;
29
31
  /** This prop helps users to fill forms faster */
@@ -92,4 +94,4 @@ export interface AutoCompleteProps<T extends AutoCompleteOption = AutoCompleteOp
92
94
  /** If true, the label will be displayed in a warning state. */
93
95
  warning?: boolean;
94
96
  }
95
- export declare const DotAutoComplete: <T extends AutoCompleteOption>({ actionItem, ariaLabel, autoFocus, className, "data-testid": dataTestId, defaultValue, dense, disabled, disablePortal, endAdornmentTooltip, error, filterSelectedOptions, freesolo, group, helperText, inputId, inputRef, label, loading, maxHeight, multiple, onBlur, onChange, onClose, onInputChange, onOpen, open, options, persistentLabel, placeholder, readOnly, renderOption, renderTags, required, size, value, warning, }: AutoCompleteProps<T>) => JSX.Element;
97
+ export declare const DotAutoComplete: <T extends AutoCompleteOption>({ ListboxComponent, actionItem, ariaLabel, autoFocus, className, "data-testid": dataTestId, defaultValue, dense, disabled, disablePortal, endAdornmentTooltip, error, filterSelectedOptions, freesolo, group, helperText, inputId, inputRef, label, loading, maxHeight, multiple, onBlur, onChange, onClose, onInputChange, onOpen, open, options, persistentLabel, placeholder, readOnly, renderOption, renderTags, required, size, value, warning, }: AutoCompleteProps<T>) => JSX.Element;
@@ -10,6 +10,7 @@ interface DotCoreApiContextProps {
10
10
  applicationsError: ApiError;
11
11
  applicationsLoading: boolean;
12
12
  loadApplications: (accountId: string, force?: boolean) => void;
13
+ setToken: (token: string) => void;
13
14
  }
14
15
  export declare const DotCoreApiProvider: ({ apiUrl, token, children, }: CoreApiProviderProps) => JSX.Element;
15
16
  export declare const useDotCoreApiContext: () => DotCoreApiContextProps;
@@ -16,6 +16,8 @@ export interface SubmitButtonProps extends DialogButtonProps {
16
16
  export interface DialogProps extends CommonProps {
17
17
  /** props passed down to the cancel button */
18
18
  cancelButtonProps?: DialogButtonProps;
19
+ /** boolean that toggles existence of the Cancel button */
20
+ cancelButtonVisible?: boolean;
19
21
  /** components or string that is displayed in the dialog body */
20
22
  children?: ReactNode;
21
23
  /** boolean that toggles visibility of close icon on top right of dialog header*/
@@ -35,4 +37,4 @@ export interface DialogProps extends CommonProps {
35
37
  /** dialog heading */
36
38
  title: ReactNode;
37
39
  }
38
- export declare const DotDialog: ({ ariaLabel, cancelButtonProps, className, "data-testid": dataTestId, children, closeIconVisible, closeOnClickAway, hasPrimaryAction, onCancel, onSubmit, open, submitButtonProps, title, }: DialogProps) => JSX.Element;
40
+ export declare const DotDialog: ({ ariaLabel, cancelButtonProps, cancelButtonVisible, className, "data-testid": dataTestId, children, closeIconVisible, closeOnClickAway, hasPrimaryAction, onCancel, onSubmit, open, submitButtonProps, title, }: DialogProps) => JSX.Element;
@@ -54,7 +54,7 @@ export { DotCheckbox } from './checkbox/Checkbox';
54
54
  export { DotCheckboxGroup } from './checkbox/CheckboxGroup';
55
55
  export { DotChip } from './chip/Chip';
56
56
  export { DotConfirmationDialog } from './confirmation-dialog/ConfirmationDialog';
57
- export { DotCoreApiProvider } from './core-api/CoreApiProvider';
57
+ export { DotCoreApiProvider, useDotCoreApiContext, } from './core-api/CoreApiProvider';
58
58
  export { Cell, CssCell } from './css-grid/CssCell';
59
59
  export { CssGrid } from './css-grid/CssGrid';
60
60
  export { CssGridDebug } from './css-grid/CssGridDebug';
@@ -1,2 +1,3 @@
1
1
  import { ReactNode } from 'react';
2
2
  export declare const getTruncatedLabel: (label: string, charactersLimit?: number) => ReactNode;
3
+ export declare const getTooltipLabel: (label: string, charactersLimit?: number) => ReactNode;
@@ -52,7 +52,7 @@ export declare const o500 = "#ff9e49";
52
52
  export declare const o600 = "#ff9642";
53
53
  export declare const o700 = "#ff8c39";
54
54
  export declare const o800 = "#ff8231";
55
- export declare const o900 = "#ff7021";
55
+ export declare const o900 = "#f05e1d";
56
56
  export declare const oA100 = "#ffffff";
57
57
  export declare const oA200 = "#ffffff";
58
58
  export declare const oA400 = "#ffe0d0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digital-ai/dot-components",
3
- "version": "2.1.1",
3
+ "version": "2.2.1",
4
4
  "private": false,
5
5
  "license": "SEE LICENSE IN <LICENSE.md>",
6
6
  "contributors": [