@tracktor/design-system 3.12.0 → 3.12.1
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/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,38 @@
|
|
|
1
1
|
import { ChipProps, ListItemButtonProps, SxProps } from '@mui/material';
|
|
2
2
|
import { MouseEvent, ReactNode } from 'react';
|
|
3
|
-
interface
|
|
3
|
+
interface ListAvatarItemBase {
|
|
4
|
+
Avatar?: ReactNode;
|
|
5
|
+
id?: string | number | null;
|
|
6
|
+
title?: ReactNode;
|
|
7
|
+
subtitle?: ReactNode;
|
|
8
|
+
image?: string | null;
|
|
9
|
+
thumbnail?: string | null;
|
|
10
|
+
icon?: ReactNode;
|
|
11
|
+
chipLabel?: ReactNode;
|
|
12
|
+
chipColor?: ChipProps["color"] | string;
|
|
13
|
+
secondaryAction?: ReactNode;
|
|
14
|
+
}
|
|
15
|
+
export interface ListAvatarClickPayload {
|
|
16
|
+
id?: string | number | null;
|
|
17
|
+
image?: string | null;
|
|
18
|
+
thumbnail?: string | null;
|
|
19
|
+
subtitle?: ReactNode;
|
|
20
|
+
title?: ReactNode;
|
|
21
|
+
icon?: ReactNode;
|
|
22
|
+
isFile: boolean;
|
|
23
|
+
isPdf: boolean;
|
|
24
|
+
}
|
|
25
|
+
export interface ListAvatarAction {
|
|
26
|
+
title?: string | null;
|
|
27
|
+
subtitle?: string | null;
|
|
28
|
+
image?: string | null;
|
|
29
|
+
icon?: ReactNode;
|
|
30
|
+
onClick?: ListItemButtonProps["onClick"];
|
|
31
|
+
}
|
|
32
|
+
export interface ListAvatarItem extends ListAvatarItemBase {
|
|
33
|
+
onClick?: (event: MouseEvent<HTMLLIElement>, item: ListAvatarClickPayload) => void;
|
|
34
|
+
}
|
|
35
|
+
export interface ListAvatarProps {
|
|
4
36
|
/**
|
|
5
37
|
* Empty message
|
|
6
38
|
*/
|
|
@@ -32,38 +64,11 @@ interface ListAvatarProps {
|
|
|
32
64
|
/**
|
|
33
65
|
* List items
|
|
34
66
|
*/
|
|
35
|
-
items?:
|
|
36
|
-
id?: string | number | null;
|
|
37
|
-
title?: ReactNode;
|
|
38
|
-
subtitle?: ReactNode;
|
|
39
|
-
image?: string | null;
|
|
40
|
-
thumbnail?: string | null;
|
|
41
|
-
icon?: ReactNode;
|
|
42
|
-
chipLabel?: ReactNode;
|
|
43
|
-
chipColor?: ChipProps["color"] | string;
|
|
44
|
-
secondaryAction?: ReactNode;
|
|
45
|
-
onClick?: (event: MouseEvent<HTMLLIElement>, item: {
|
|
46
|
-
id?: NonNullable<ListAvatarProps["items"]>[number]["id"];
|
|
47
|
-
image?: NonNullable<ListAvatarProps["items"]>[number]["image"];
|
|
48
|
-
thumbnail?: NonNullable<ListAvatarProps["items"]>[number]["thumbnail"];
|
|
49
|
-
subtitle?: NonNullable<ListAvatarProps["items"]>[number]["subtitle"];
|
|
50
|
-
title?: NonNullable<ListAvatarProps["items"]>[number]["title"];
|
|
51
|
-
icon?: NonNullable<ListAvatarProps["items"]>[number]["icon"];
|
|
52
|
-
isFile: boolean;
|
|
53
|
-
isPdf: boolean;
|
|
54
|
-
}) => void;
|
|
55
|
-
Avatar?: ReactNode;
|
|
56
|
-
}[];
|
|
67
|
+
items?: ListAvatarItem[];
|
|
57
68
|
/**
|
|
58
69
|
* Action
|
|
59
70
|
*/
|
|
60
|
-
action?:
|
|
61
|
-
title?: string | null;
|
|
62
|
-
subtitle?: string | null;
|
|
63
|
-
image?: string | null;
|
|
64
|
-
icon?: ReactNode;
|
|
65
|
-
onClick?: ListItemButtonProps["onClick"];
|
|
66
|
-
};
|
|
71
|
+
action?: ListAvatarAction;
|
|
67
72
|
}
|
|
68
73
|
export declare const ListAvatar: ({ Empty, action, items, fullWidth, sx, alwaysDisplaySecondaryAction, isLoading, disableLightbox, numberLoadingItems, }: ListAvatarProps) => string | number | true | Iterable<ReactNode> | import("@emotion/react/jsx-runtime").JSX.Element | null;
|
|
69
74
|
export default ListAvatar;
|