@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.
@@ -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';
@@ -1,4 +1,4 @@
1
- import { DSIconType } from '../../';
1
+ import { DSIconType } from '../..';
2
2
  export declare const allowedValues: {
3
3
  kinds: readonly ["info", "success", "warning", "error", "private", "general"];
4
4
  levels: readonly ["2", "3", "4", "5", "6"];
@@ -1 +1,2 @@
1
1
  export * from './MrlBlockNotification';
2
+ export * from './MrlToast';
@@ -115,7 +115,7 @@ export declare const colorPictoStoryData: {
115
115
  export declare const animateStoryData: {
116
116
  args: {
117
117
  delay: number;
118
- state: "stop" | "play";
118
+ state: "play" | "stop";
119
119
  };
120
120
  argTypes: {
121
121
  delay: {
@@ -0,0 +1 @@
1
+ export * from '../notification/MrlToast';