@mindly/ui-components 3.17.1 → 3.18.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,10 +1,17 @@
1
1
  import React from 'react';
2
2
  declare type ChatMessageProps = {
3
- message: string;
3
+ message: string | File;
4
4
  position: 'left' | 'right';
5
5
  time: number;
6
6
  timeZone?: string;
7
7
  status?: 'loading' | 'sent' | 'viewed';
8
+ messageType?: 'text' | 'file' | 'image';
9
+ onFileClick?: (type: 'file' | 'image', link: string) => void;
10
+ fileInfo?: {
11
+ originalName: string;
12
+ size: number;
13
+ url?: string;
14
+ };
8
15
  };
9
16
  declare const _default: React.NamedExoticComponent<ChatMessageProps>;
10
17
  export default _default;
@@ -1,15 +1,28 @@
1
1
  declare type MessageWrapperProps = {
2
2
  position: 'left' | 'right';
3
+ messageType: 'text' | 'file' | 'image';
3
4
  };
4
5
  export declare const MessageWrapper: import("styled-components").StyledComponent<"div", any, MessageWrapperProps, never>;
6
+ export declare const TextMessageWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
7
+ declare type ImageMessageWrapperProps = {
8
+ position: 'left' | 'right';
9
+ };
10
+ export declare const ImageMessageWrapper: import("styled-components").StyledComponent<"div", any, ImageMessageWrapperProps, never>;
11
+ export declare const ImageTimeWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
5
12
  declare type MessageBubbleProps = {
6
13
  position: 'left' | 'right';
7
14
  };
8
15
  export declare const MessageBubble: import("styled-components").StyledComponent<"div", any, MessageBubbleProps, never>;
9
16
  export declare const MessageText: import("styled-components").StyledComponent<"div", any, {}, never>;
10
- declare type MessageTimeWrapperProps = {
17
+ export declare const MessageTimeWrapper: import("styled-components").StyledComponent<"span", any, {}, never>;
18
+ export declare const MessageContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
19
+ declare type TimeStyledProps = {
11
20
  position: 'left' | 'right';
12
21
  };
13
- export declare const MessageTimeWrapper: import("styled-components").StyledComponent<"span", any, MessageTimeWrapperProps, never>;
14
- export declare const MessageContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
22
+ export declare const TimeStyled: import("styled-components").StyledComponent<"div", any, TimeStyledProps, never>;
23
+ declare type FileMessageWrapperProps = {
24
+ position: 'left' | 'right';
25
+ };
26
+ export declare const FileMessageWrapper: import("styled-components").StyledComponent<"div", any, FileMessageWrapperProps, never>;
27
+ export declare const FileTimeWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
15
28
  export {};
package/dist/index.d.ts CHANGED
@@ -484,11 +484,18 @@ declare type ChatListItemProps = {
484
484
  declare const _default$8: React.NamedExoticComponent<ChatListItemProps>;
485
485
 
486
486
  declare type ChatMessageProps = {
487
- message: string;
487
+ message: string | File;
488
488
  position: 'left' | 'right';
489
489
  time: number;
490
490
  timeZone?: string;
491
491
  status?: 'loading' | 'sent' | 'viewed';
492
+ messageType?: 'text' | 'file' | 'image';
493
+ onFileClick?: (type: 'file' | 'image', link: string) => void;
494
+ fileInfo?: {
495
+ originalName: string;
496
+ size: number;
497
+ url?: string;
498
+ };
492
499
  };
493
500
  declare const _default$7: React.NamedExoticComponent<ChatMessageProps>;
494
501
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mindly/ui-components",
3
- "version": "3.17.1",
3
+ "version": "3.18.0",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "start": "react-scripts start",