@digital-ai/dot-components 2.28.0 → 3.1.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/README.md +1 -0
- package/index.esm.js +332 -309
- package/package.json +2 -1
- package/src/lib/components/alert-banner/AlertBanner.d.ts +3 -1
- package/src/lib/components/empty-state/EmptyState.d.ts +3 -1
- package/src/lib/components/illustration/Illustration.d.ts +18 -0
- package/src/lib/components/illustration/Illustration.styles.d.ts +3 -0
- package/src/lib/components/index.d.ts +2 -1
- package/src/lib/components/snackbar/Snackbar.d.ts +16 -4
- package/src/lib/components/snackbar/Snackbar.styles.d.ts +2 -0
- package/src/lib/components/snackbar/index.d.ts +1 -1
- package/src/lib/components/snackbar/utils/helpers.d.ts +2 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@digital-ai/dot-components",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "SEE LICENSE IN <LICENSE.md>",
|
|
6
6
|
"contributors": [
|
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
"author": "Matt Haff",
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@digital-ai/dot-icons": "latest",
|
|
43
|
+
"@digital-ai/dot-illustrations": "latest",
|
|
43
44
|
"@emotion/react": "^11.10.4",
|
|
44
45
|
"@emotion/styled": "^11.10.4",
|
|
45
46
|
"@mui/material": "^5.2.5",
|
|
@@ -15,5 +15,7 @@ export interface AlertBannerProps extends CommonProps {
|
|
|
15
15
|
severity: AlertBannerSeverity;
|
|
16
16
|
/** when specified, will control the text that is used inside the alert banner */
|
|
17
17
|
textVariant?: TypographyVariant;
|
|
18
|
+
/** when specified, will control the width of the encapsulated Alert component */
|
|
19
|
+
width?: string;
|
|
18
20
|
}
|
|
19
|
-
export declare const DotAlertBanner: ({ action, ariaLabel, children, className, "data-pendoid": dataPendoId, "data-testid": dataTestId, onClose, roundedCorners, severity, textVariant, }: AlertBannerProps) => import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export declare const DotAlertBanner: ({ action, ariaLabel, children, className, "data-pendoid": dataPendoId, "data-testid": dataTestId, onClose, roundedCorners, severity, textVariant, width, }: AlertBannerProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,6 +3,8 @@ import { CommonProps } from '../CommonProps';
|
|
|
3
3
|
export interface EmptyStateProps extends CommonProps {
|
|
4
4
|
/** primary button properties */
|
|
5
5
|
buttonProps?: ButtonProps;
|
|
6
|
+
/** id of illustration to use, overrides imageSrc **/
|
|
7
|
+
illustrationId?: string;
|
|
6
8
|
/** alt text of image */
|
|
7
9
|
imageAltText?: string;
|
|
8
10
|
/** location of image */
|
|
@@ -12,4 +14,4 @@ export interface EmptyStateProps extends CommonProps {
|
|
|
12
14
|
/** title text displayed */
|
|
13
15
|
title: string;
|
|
14
16
|
}
|
|
15
|
-
export declare const DotEmptyState: ({ ariaLabel, buttonProps, className, "data-testid": dataTestId, imageAltText, imageSrc, subtitle, title, }: EmptyStateProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare const DotEmptyState: ({ ariaLabel, buttonProps, className, "data-testid": dataTestId, illustrationId, imageAltText, imageSrc, subtitle, title, }: EmptyStateProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { CommonProps } from '../CommonProps';
|
|
2
|
+
import { TooltipPlacement } from '../tooltip/Tooltip';
|
|
3
|
+
import { ThemeOptions } from '../../theme-provider/ThemeProvider';
|
|
4
|
+
export interface IllustrationProps extends CommonProps {
|
|
5
|
+
/** Alternative text for the illustration image **/
|
|
6
|
+
alt?: string;
|
|
7
|
+
/** The ID of the illustration to display on the img */
|
|
8
|
+
illustrationId: string;
|
|
9
|
+
/** The theme of the illustration (dark or light) **/
|
|
10
|
+
theme?: ThemeOptions;
|
|
11
|
+
/** Title text for the illustration image **/
|
|
12
|
+
title?: string;
|
|
13
|
+
/** Tooltip text displayed on hover */
|
|
14
|
+
tooltip?: string;
|
|
15
|
+
/** Placement for tooltip **/
|
|
16
|
+
tooltipPlacement?: TooltipPlacement;
|
|
17
|
+
}
|
|
18
|
+
export declare const DotIllustration: ({ alt, ariaLabel, ariaRole, className, "data-testid": dataTestId, illustrationId, theme, title, tooltip, tooltipPlacement, }: IllustrationProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -32,7 +32,7 @@ export type { DividerOrientation, DividerProps, DividerVariant, } from './divide
|
|
|
32
32
|
export type { BadgeProps, BadgeOverlap, BadgeVariant } from './badge';
|
|
33
33
|
export type { TruncateWithTooltipProps } from './truncate-with-tooltip';
|
|
34
34
|
export type { DraggableItem, DraggableListChangeHandler, } from './draggable-list';
|
|
35
|
-
export type { SnackbarProps, SnackbarSeverity, SnackbarOrigin, } from './snackbar';
|
|
35
|
+
export type { SnackbarProps, SnackbarSeverity, SnackbarOrigin, SnackbarPrimaryAction, SnackbarSecondaryAction, } from './snackbar';
|
|
36
36
|
export type { CharactersLimit, InlineEditProps } from './inline-edit';
|
|
37
37
|
export type { progressColorOptions, progressVariantOptions, ProgressProps, } from './progress';
|
|
38
38
|
export type { FileItemProps, FileUploadError, FileUploadProps, ListItemFile, MappedFile, MappedListItemFile, } from './file-upload';
|
|
@@ -77,6 +77,7 @@ export { DotForm } from './form/Form';
|
|
|
77
77
|
export { DotFormGroup } from './form-group/FormGroup';
|
|
78
78
|
export { DotDynamicForm } from './dynamic-form/DynamicForm';
|
|
79
79
|
export { DotIcon } from './icon/Icon';
|
|
80
|
+
export { DotIllustration } from './illustration/Illustration';
|
|
80
81
|
export { DotInlineEdit } from './inline-edit';
|
|
81
82
|
export { DotInputText } from './input-form-fields/InputText';
|
|
82
83
|
export { DotInputSelect } from './input-form-fields/InputSelect';
|
|
@@ -2,11 +2,19 @@ import { ReactNode } from 'react';
|
|
|
2
2
|
import { CommonProps } from '../CommonProps';
|
|
3
3
|
import { SnackbarOrigin } from './';
|
|
4
4
|
export type SnackbarSeverity = 'error' | 'warning' | 'info' | 'success';
|
|
5
|
+
export interface SnackbarPrimaryAction {
|
|
6
|
+
label: string;
|
|
7
|
+
onClick: () => void;
|
|
8
|
+
}
|
|
9
|
+
export interface SnackbarSecondaryAction {
|
|
10
|
+
href: string;
|
|
11
|
+
label: string;
|
|
12
|
+
}
|
|
5
13
|
export interface SnackbarProps extends CommonProps {
|
|
6
|
-
/** Property used for creating a custom action button. */
|
|
7
|
-
action?: ReactNode;
|
|
8
14
|
/** The anchor of the Snackbar. On smaller screens, the component grows to occupy all the available width, the horizontal alignment is ignored. */
|
|
9
15
|
anchorOrigin?: SnackbarOrigin;
|
|
16
|
+
/** When specified, will set `top` property (in pixels) only for the vertical top origins */
|
|
17
|
+
anchorOriginTop?: number;
|
|
10
18
|
/** 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
19
|
autoHideDuration?: number | null;
|
|
12
20
|
/** The message the user sees once the alert displays. */
|
|
@@ -14,12 +22,16 @@ export interface SnackbarProps extends CommonProps {
|
|
|
14
22
|
/** If false, then snackbar does not close when clicking away. True by default. */
|
|
15
23
|
hideOnClickAway?: boolean;
|
|
16
24
|
/** A callback to handle closing the alert. */
|
|
17
|
-
onClose
|
|
25
|
+
onClose: () => void;
|
|
18
26
|
/** Boolean value to switch between opening and closing the alert. */
|
|
19
27
|
open: boolean;
|
|
28
|
+
/** When specified, will render button underneath snackbar message */
|
|
29
|
+
primaryAction?: SnackbarPrimaryAction;
|
|
30
|
+
/** When specified, will render link next to primary action button */
|
|
31
|
+
secondaryAction?: SnackbarSecondaryAction;
|
|
20
32
|
/** An alert level, indicating the importance of the message. */
|
|
21
33
|
severity: SnackbarSeverity;
|
|
22
34
|
/** Width of the encapsulated Alert component. */
|
|
23
35
|
width?: string;
|
|
24
36
|
}
|
|
25
|
-
export declare const DotSnackbar: ({
|
|
37
|
+
export declare const DotSnackbar: ({ anchorOrigin, anchorOriginTop, ariaLabel, autoHideDuration, children, className, "data-testid": dataTestId, hideOnClickAway, onClose, open, primaryAction, secondaryAction, severity, width, }: SnackbarProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,7 +2,9 @@ import { Snackbar } from '@mui/material';
|
|
|
2
2
|
import { SnackbarSeverity } from './Snackbar';
|
|
3
3
|
export declare const rootClassName = "dot-snackbar";
|
|
4
4
|
interface StyledProps {
|
|
5
|
+
$anchorOriginTop?: number;
|
|
5
6
|
severity: SnackbarSeverity;
|
|
7
|
+
width?: string;
|
|
6
8
|
}
|
|
7
9
|
export declare const StyledSnackbar: import("styled-components").StyledComponent<typeof Snackbar, any, StyledProps, never>;
|
|
8
10
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export type { SnackbarOrigin } from '@mui/material';
|
|
2
|
-
export type { SnackbarProps, SnackbarSeverity } from './Snackbar';
|
|
2
|
+
export type { SnackbarProps, SnackbarSeverity, SnackbarPrimaryAction, SnackbarSecondaryAction, } from './Snackbar';
|
|
3
3
|
export { DotSnackbar } from './Snackbar';
|
|
4
4
|
export { DotSnackbarContainer, DotSnackbarProvider, useDotSnackbarContext, } from './SnackbarProvider';
|