@muraldevkit/ui-toolkit 2.66.1 → 2.67.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/dist/components/notification/MrlBlockNotification/MrlBlockNotification.d.ts +1 -1
- package/dist/components/notification/MrlToast/MrlToast.d.ts +45 -0
- package/dist/components/notification/MrlToast/index.d.ts +1 -0
- package/dist/components/notification/constants.d.ts +1 -1
- package/dist/components/notification/index.d.ts +1 -0
- package/dist/components/svg/config.d.ts +1 -1
- package/dist/components/toast/index.d.ts +1 -0
- package/dist/index.js +1 -1
- package/dist/styles/MrlToast/module.scss +111 -0
- package/dist/utils/layers/index.d.ts +11 -7
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReactElement, ReactNode } from 'react';
|
|
2
2
|
import { AttrsObject } from '../../../utils';
|
|
3
3
|
import { NotificationKind, NotificationIconConfig, NotificationScope, NotificationState, NotificationLevel } from '../constants';
|
|
4
|
-
import { DSIconType } from '
|
|
4
|
+
import { DSIconType } from '../..';
|
|
5
5
|
import './MrlBlockNotification.global.scss';
|
|
6
6
|
export interface MrlBlockNotificationProps {
|
|
7
7
|
/**
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { NotificationKind } from '../constants';
|
|
3
|
+
export type MrlToastKind = NotificationKind | 'collaborator' | 'general';
|
|
4
|
+
export type MrlToastPosition = 'bottom' | 'top';
|
|
5
|
+
export interface MrlToastCTA {
|
|
6
|
+
onClick: () => void;
|
|
7
|
+
text: string;
|
|
8
|
+
dataQa: string;
|
|
9
|
+
}
|
|
10
|
+
export interface MrlToastProps {
|
|
11
|
+
['data-qa']?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Determines whether the Toast Notification should automatically close after the time specified in `closeAfterMs` (default 3000ms).
|
|
14
|
+
*
|
|
15
|
+
* Note: auto-closing is only possible when no interactive elements (e.g. close button & CTA's) exist on the toast notification
|
|
16
|
+
*/
|
|
17
|
+
autoClose?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Sets the background color of the toast notification.
|
|
20
|
+
*
|
|
21
|
+
* Note: this is only applicable when the `kind` is set to 'collaborator'.
|
|
22
|
+
*/
|
|
23
|
+
backgroundColor?: string;
|
|
24
|
+
className?: string;
|
|
25
|
+
/**
|
|
26
|
+
* The time in milliseconds after which the toast notification should automatically close.
|
|
27
|
+
*/
|
|
28
|
+
closeAfterMs?: number;
|
|
29
|
+
kind?: MrlToastKind;
|
|
30
|
+
onClose?: () => void;
|
|
31
|
+
primaryCTA?: MrlToastCTA;
|
|
32
|
+
primaryMessage: string | JSX.Element;
|
|
33
|
+
secondaryCTA?: MrlToastCTA;
|
|
34
|
+
secondaryMessage?: string | JSX.Element;
|
|
35
|
+
/** Determines whether the close icon button should be shown. */
|
|
36
|
+
showCloseButton?: boolean;
|
|
37
|
+
showIcon?: boolean;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* MrlToast component.
|
|
41
|
+
*
|
|
42
|
+
* @param root0
|
|
43
|
+
* @returns {React.ReactElement} The MrlToast component.
|
|
44
|
+
*/
|
|
45
|
+
export declare const MrlToast: ({ ["data-qa"]: qa, autoClose, backgroundColor, className, closeAfterMs, kind, onClose, primaryCTA, primaryMessage, secondaryCTA, secondaryMessage, showCloseButton, showIcon }: MrlToastProps) => React.ReactElement;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { MrlToast } from './MrlToast';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../notification/MrlToast';
|