@digital-ai/dot-components 2.25.1 → 2.26.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/index.esm.js +4253 -1194
- package/index.esm.mjs +4253 -1194
- package/package.json +1 -1
- package/src/lib/components/button-toggle/utils/models.d.ts +1 -0
- package/src/lib/components/file-upload/utils/helpers.d.ts +2 -2
- package/src/lib/components/snackbar/Snackbar.d.ts +3 -1
- package/src/lib/components/snackbar/SnackbarProvider.d.ts +3 -1
- package/src/lib/components/breadcrumbs/Breadcrumbs.data.d.ts +0 -5
package/package.json
CHANGED
|
@@ -5,6 +5,7 @@ export type ButtonToggleOrientation = 'horizontal' | 'vertical';
|
|
|
5
5
|
export type ButtonToggleValue = ButtonToggleSingleValue | Array<ButtonToggleSingleValue>;
|
|
6
6
|
export interface ButtonToggleOption extends CommonProps {
|
|
7
7
|
ariaLabel: string;
|
|
8
|
+
badgeContent?: number;
|
|
8
9
|
disabled?: boolean;
|
|
9
10
|
iconId?: string;
|
|
10
11
|
text?: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
2
|
import { FileRejection } from 'react-dropzone';
|
|
3
3
|
import { DropzoneContentArgs, FileUploadError, ParseListItemArgs, UploadedFilesListArgs } from './models';
|
|
4
4
|
import { FileUploadButtonProps } from '../FileUpload';
|
|
@@ -7,7 +7,7 @@ export declare const renderMaxFilesMessage: (maxFiles: number, maxFilesClasses:
|
|
|
7
7
|
export declare const renderSelectFilesButton: (buttonProps: FileUploadButtonProps, isUploadDisabled: boolean, onButtonClick: () => void) => ReactNode;
|
|
8
8
|
export declare const renderActiveDragArea: () => ReactNode;
|
|
9
9
|
export declare const renderDragAndDropArea: (buttonProps: FileUploadButtonProps, isUploadDisabled: boolean, onSelectButtonClick: () => void) => ReactNode;
|
|
10
|
-
export declare const renderDropzoneContent: ({ buttonOnly, buttonProps, isDragActive, isUploadDisabled, open, }: DropzoneContentArgs) =>
|
|
10
|
+
export declare const renderDropzoneContent: ({ buttonOnly, buttonProps, isDragActive, isUploadDisabled, open, }: DropzoneContentArgs) => ReactNode;
|
|
11
11
|
export declare const getUploadedFilesList: ({ contentErrors, maxSize, onFileClick, onFileDelete, uploadedFiles, }: UploadedFilesListArgs) => {
|
|
12
12
|
child: import("react/jsx-runtime").JSX.Element;
|
|
13
13
|
}[];
|
|
@@ -7,6 +7,8 @@ export interface SnackbarProps extends CommonProps {
|
|
|
7
7
|
action?: ReactNode;
|
|
8
8
|
/** The anchor of the Snackbar. On smaller screens, the component grows to occupy all the available width, the horizontal alignment is ignored. */
|
|
9
9
|
anchorOrigin?: SnackbarOrigin;
|
|
10
|
+
/** The number of milliseconds to wait before automatically closing the snackbar. If null is passed, then the snackbar never automatically closes. If the prop is not passed at all, then snackbars close after 10 seconds (except error snackbar which never closes automatically). */
|
|
11
|
+
autoHideDuration?: number | null;
|
|
10
12
|
/** The message the user sees once the alert displays. */
|
|
11
13
|
children: ReactNode;
|
|
12
14
|
/** If false, then snackbar does not close when clicking away. True by default. */
|
|
@@ -20,4 +22,4 @@ export interface SnackbarProps extends CommonProps {
|
|
|
20
22
|
/** Width of the encapsulated Alert component. */
|
|
21
23
|
width?: string;
|
|
22
24
|
}
|
|
23
|
-
export declare const DotSnackbar: ({ action, anchorOrigin, ariaLabel, children, className, "data-testid": dataTestId, hideOnClickAway, onClose, open, severity, width, }: SnackbarProps) => import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export declare const DotSnackbar: ({ action, anchorOrigin, ariaLabel, autoHideDuration, children, className, "data-testid": dataTestId, hideOnClickAway, onClose, open, severity, width, }: SnackbarProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -5,6 +5,7 @@ declare const initialState: {
|
|
|
5
5
|
open: boolean;
|
|
6
6
|
severity: string;
|
|
7
7
|
id: string;
|
|
8
|
+
autoHideDuration: number;
|
|
8
9
|
}[];
|
|
9
10
|
export interface SnackbarProviderProps {
|
|
10
11
|
/** The components or string that load inside the snackbar provider. */
|
|
@@ -16,9 +17,10 @@ interface SnackbarContainerProps {
|
|
|
16
17
|
}
|
|
17
18
|
interface DotSnackbarProps {
|
|
18
19
|
alerts: typeof initialState;
|
|
19
|
-
enqueueMessage: (message: ReactNode, severity: SnackbarSeverity) => string;
|
|
20
|
+
enqueueMessage: (message: ReactNode, severity: SnackbarSeverity, autoHideDuration?: number | null) => string;
|
|
20
21
|
removeMessage: (id: string) => void;
|
|
21
22
|
}
|
|
23
|
+
export declare const DotSnackbarContext: import("react").Context<DotSnackbarProps>;
|
|
22
24
|
export declare const DotSnackbarContainer: ({ hideOnClickAway, }: SnackbarContainerProps) => import("react/jsx-runtime").JSX.Element;
|
|
23
25
|
export declare const DotSnackbarProvider: ({ children, hideOnClickAway, }: SnackbarProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
26
|
export declare const useDotSnackbarContext: () => DotSnackbarProps;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { BreadcrumbItem } from '../breadcrumbs/Breadcrumbs';
|
|
2
|
-
export declare const defaultStorybookItems: BreadcrumbItem[];
|
|
3
|
-
export declare const characterLimitBreadcrumbItems: BreadcrumbItem[];
|
|
4
|
-
export declare const mockBreadcrumbItems: BreadcrumbItem[];
|
|
5
|
-
export declare const mockLongBreadcrumbItems: BreadcrumbItem[];
|