1 | import * as React from 'react';
|
2 | import {
|
3 | OverridableComponent,
|
4 | OverridableStringUnion,
|
5 | OverrideProps,
|
6 | PartiallyRequired,
|
7 | } from '@mui/types';
|
8 | import { SxProps } from '@mui/system';
|
9 | import { Theme } from '@mui/material';
|
10 | import { AvatarGroupClasses } from './avatarGroupClasses';
|
11 | import Avatar from '../Avatar';
|
12 | import { CreateSlotsAndSlotProps, SlotProps } from '../utils/types';
|
13 |
|
14 | export interface AvatarGroupPropsVariantOverrides {}
|
15 |
|
16 | export interface AvatarGroupComponentsPropsOverrides {}
|
17 |
|
18 | export interface AvatarGroupSlots {
|
19 | surplus: React.ElementType;
|
20 | }
|
21 |
|
22 | export type AvatarGroupSlotsAndSlotProps = CreateSlotsAndSlotProps<
|
23 | AvatarGroupSlots,
|
24 | {
|
25 | |
26 |
|
27 |
|
28 | additionalAvatar: React.ComponentPropsWithRef<typeof Avatar> &
|
29 | AvatarGroupComponentsPropsOverrides;
|
30 | surplus: SlotProps<
|
31 | React.ElementType<React.ComponentPropsWithRef<typeof Avatar>>,
|
32 | AvatarGroupComponentsPropsOverrides,
|
33 | AvatarGroupOwnerState
|
34 | >;
|
35 | }
|
36 | >;
|
37 | export interface AvatarGroupOwnProps extends AvatarGroupSlotsAndSlotProps {
|
38 | |
39 |
|
40 |
|
41 | children?: React.ReactNode;
|
42 | |
43 |
|
44 |
|
45 | classes?: Partial<AvatarGroupClasses>;
|
46 | |
47 |
|
48 |
|
49 |
|
50 | component?: React.ElementType;
|
51 | |
52 |
|
53 |
|
54 |
|
55 |
|
56 |
|
57 |
|
58 |
|
59 | componentsProps?: {
|
60 | additionalAvatar?: React.ComponentPropsWithRef<typeof Avatar> &
|
61 | AvatarGroupComponentsPropsOverrides;
|
62 | };
|
63 | |
64 |
|
65 |
|
66 |
|
67 | max?: number;
|
68 | |
69 |
|
70 |
|
71 |
|
72 |
|
73 | renderSurplus?: (surplus: number) => React.ReactNode;
|
74 | |
75 |
|
76 |
|
77 |
|
78 | spacing?: 'small' | 'medium' | number;
|
79 | |
80 |
|
81 |
|
82 | sx?: SxProps<Theme>;
|
83 | |
84 |
|
85 |
|
86 |
|
87 | total?: number;
|
88 | |
89 |
|
90 |
|
91 |
|
92 | variant?: OverridableStringUnion<
|
93 | 'circular' | 'rounded' | 'square',
|
94 | AvatarGroupPropsVariantOverrides
|
95 | >;
|
96 | }
|
97 |
|
98 | export interface AvatarGroupTypeMap<
|
99 | AdditionalProps = {},
|
100 | RootComponent extends React.ElementType = 'div',
|
101 | > {
|
102 | props: AdditionalProps & AvatarGroupOwnProps;
|
103 | defaultComponent: RootComponent;
|
104 | }
|
105 |
|
106 |
|
107 |
|
108 |
|
109 |
|
110 |
|
111 |
|
112 |
|
113 |
|
114 |
|
115 |
|
116 | declare const AvatarGroup: OverridableComponent<AvatarGroupTypeMap>;
|
117 |
|
118 | export type AvatarGroupProps<
|
119 | RootComponent extends React.ElementType = AvatarGroupTypeMap['defaultComponent'],
|
120 | AdditionalProps = {},
|
121 | > = OverrideProps<AvatarGroupTypeMap<AdditionalProps, RootComponent>, RootComponent> & {
|
122 | component?: React.ElementType;
|
123 | };
|
124 |
|
125 | export interface AvatarGroupOwnerState
|
126 | extends PartiallyRequired<AvatarGroupProps, 'max' | 'spacing' | 'component' | 'variant'> {}
|
127 |
|
128 | export default AvatarGroup;
|