@tracktor/design-system 4.33.4 → 4.34.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,3 +1,3 @@
1
1
  import { ChatConversationDetailProps } from '../types';
2
- declare const ChatConversationDetail: ({ threadId, participants, isLoading, messages, currentUserId, onDeleteConversation, onNewConversation, onSendMessage, onAddParticipants, onSearchParticipants, searchResults, isSearchingParticipants, avatarSrcResolver, renderAfterBubble, labels, formatDayLabel, isSending, formatParticipantName, }: ChatConversationDetailProps) => import("@emotion/react/jsx-runtime").JSX.Element;
2
+ declare const ChatConversationDetail: ({ threadId, participants, isLoading, messages, currentUserId, onDeleteConversation, onNewConversation, onSendMessage, onAddParticipants, onSearchParticipants, searchResults, isSearchingParticipants, avatarSrcResolver, renderAfterBubble, labels, formatDayLabel, isSending, formatParticipantName, headerAction, }: ChatConversationDetailProps) => import("@emotion/react/jsx-runtime").JSX.Element;
3
3
  export default ChatConversationDetail;
@@ -1,3 +1,4 @@
1
+ import { ReactNode } from 'react';
1
2
  import { ChatConversationDetailLabels, ChatParticipant, ChatSearchUser } from '../types';
2
3
  interface ChatConversationDetailHeaderProps {
3
4
  threadId: string;
@@ -10,6 +11,7 @@ interface ChatConversationDetailHeaderProps {
10
11
  avatarSrcResolver?: (src?: string | null) => string | undefined;
11
12
  labels?: ChatConversationDetailLabels;
12
13
  formatParticipantName?: (participant: ChatParticipant) => string;
14
+ headerAction?: ReactNode;
13
15
  }
14
- declare const ChatConversationDetailHeader: ({ threadId, participants, onDeleteConversation, onAddParticipants, onSearchParticipants, searchResults, isSearchingParticipants, avatarSrcResolver, labels, formatParticipantName, }: ChatConversationDetailHeaderProps) => import("@emotion/react/jsx-runtime").JSX.Element;
16
+ declare const ChatConversationDetailHeader: ({ threadId, participants, onDeleteConversation, onAddParticipants, onSearchParticipants, searchResults, isSearchingParticipants, avatarSrcResolver, labels, formatParticipantName, headerAction, }: ChatConversationDetailHeaderProps) => import("@emotion/react/jsx-runtime").JSX.Element;
15
17
  export default ChatConversationDetailHeader;
@@ -88,6 +88,7 @@ export interface ChatConversationDetailProps {
88
88
  formatDayLabel?: (date: string) => string;
89
89
  isSending?: boolean;
90
90
  formatParticipantName?: (participant: ChatParticipant) => string;
91
+ headerAction?: ReactNode;
91
92
  }
92
93
  export interface ChatMessageBubbleProps {
93
94
  isOwn: boolean;
@@ -2,18 +2,65 @@ import { ChipProps, ListItemButtonProps, SxProps, Theme } from '@mui/material';
2
2
  import { ListProps } from '@mui/material/List';
3
3
  import { MouseEvent, ReactNode } from 'react';
4
4
  interface ListAvatarItemBase {
5
+ /**
6
+ * Custom avatar component to display instead of the default avatar.
7
+ */
5
8
  Avatar?: ReactNode;
9
+ /**
10
+ * Unique identifier for the list item.
11
+ */
6
12
  id?: string | number | null;
13
+ /**
14
+ * Primary text displayed in the list item.
15
+ */
7
16
  title?: ReactNode;
17
+ /**
18
+ * Secondary text displayed below the title.
19
+ */
8
20
  subtitle?: ReactNode;
21
+ /**
22
+ * Full-size image URL used for the avatar and lightbox preview.
23
+ */
9
24
  image?: string | null;
25
+ /**
26
+ * Thumbnail image URL used as the avatar source when available.
27
+ */
10
28
  thumbnail?: string | null;
29
+ /**
30
+ * Secondary thumbnail image URL displayed as a secondary avatar source.
31
+ */
11
32
  thumbnailSecondary?: string | null;
33
+ /**
34
+ * Icon displayed inside the avatar when no image is provided.
35
+ */
12
36
  icon?: ReactNode;
37
+ /**
38
+ * Label displayed in a chip next to the title.
39
+ */
13
40
  chipLabel?: ReactNode;
41
+ /**
42
+ * Color of the chip. Accepts MUI Chip color values or a custom string.
43
+ */
14
44
  chipColor?: ChipProps["color"] | string;
45
+ /**
46
+ * Action element displayed on the right side of the item, visible on hover.
47
+ */
15
48
  secondaryAction?: ReactNode;
49
+ /**
50
+ * Secondary action always visible, regardless of hover state.
51
+ */
52
+ persistentSecondaryAction?: ReactNode;
53
+ /**
54
+ * Always display secondary action for this item. Overrides the list-level prop.
55
+ */
56
+ alwaysDisplaySecondaryAction?: boolean;
57
+ /**
58
+ * If true, renders a divider instead of the list item content.
59
+ */
16
60
  divider?: boolean;
61
+ /**
62
+ * Custom styles applied to the list item.
63
+ */
17
64
  sx?: SxProps<Theme>;
18
65
  }
19
66
  export interface ListAvatarClickPayload {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@tracktor/design-system",
3
3
  "description": "Tracktor Design System",
4
4
  "sideEffects": false,
5
- "version": "4.33.4",
5
+ "version": "4.34.0",
6
6
  "license": "ISC",
7
7
  "type": "module",
8
8
  "types": "./dist/src/main.d.ts",