@fluentui/react-avatar 9.0.0-rc.7 → 9.0.0-rc.8
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.json +64 -1
- package/CHANGELOG.md +19 -2
- package/{lib → dist}/tsdoc-metadata.json +0 -0
- package/package.json +10 -10
- package/lib/Avatar.d.ts +0 -1
- package/lib/AvatarGroup.d.ts +0 -1
- package/lib/components/Avatar/Avatar.d.ts +0 -3
- package/lib/components/Avatar/Avatar.types.d.ts +0 -111
- package/lib/components/Avatar/index.d.ts +0 -5
- package/lib/components/Avatar/renderAvatar.d.ts +0 -2
- package/lib/components/Avatar/useAvatar.d.ts +0 -3
- package/lib/components/Avatar/useAvatarStyles.d.ts +0 -8
- package/lib/components/AvatarGroup/AvatarGroup.d.ts +0 -6
- package/lib/components/AvatarGroup/AvatarGroup.strings.d.ts +0 -2
- package/lib/components/AvatarGroup/AvatarGroup.types.d.ts +0 -61
- package/lib/components/AvatarGroup/index.d.ts +0 -5
- package/lib/components/AvatarGroup/renderAvatarGroup.d.ts +0 -5
- package/lib/components/AvatarGroup/useAvatarGroup.d.ts +0 -12
- package/lib/components/AvatarGroup/useAvatarGroupStyles.d.ts +0 -10
- package/lib/index.d.ts +0 -5
- package/lib/utils/getInitials.d.ts +0 -14
- package/lib/utils/index.d.ts +0 -1
- package/lib-commonjs/Avatar.d.ts +0 -1
- package/lib-commonjs/AvatarGroup.d.ts +0 -1
- package/lib-commonjs/components/Avatar/Avatar.d.ts +0 -3
- package/lib-commonjs/components/Avatar/Avatar.types.d.ts +0 -111
- package/lib-commonjs/components/Avatar/index.d.ts +0 -5
- package/lib-commonjs/components/Avatar/renderAvatar.d.ts +0 -2
- package/lib-commonjs/components/Avatar/useAvatar.d.ts +0 -3
- package/lib-commonjs/components/Avatar/useAvatarStyles.d.ts +0 -8
- package/lib-commonjs/components/AvatarGroup/AvatarGroup.d.ts +0 -6
- package/lib-commonjs/components/AvatarGroup/AvatarGroup.strings.d.ts +0 -2
- package/lib-commonjs/components/AvatarGroup/AvatarGroup.types.d.ts +0 -61
- package/lib-commonjs/components/AvatarGroup/index.d.ts +0 -5
- package/lib-commonjs/components/AvatarGroup/renderAvatarGroup.d.ts +0 -5
- package/lib-commonjs/components/AvatarGroup/useAvatarGroup.d.ts +0 -12
- package/lib-commonjs/components/AvatarGroup/useAvatarGroupStyles.d.ts +0 -10
- package/lib-commonjs/index.d.ts +0 -5
- package/lib-commonjs/utils/getInitials.d.ts +0 -14
- package/lib-commonjs/utils/index.d.ts +0 -1
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,70 @@
|
|
|
2
2
|
"name": "@fluentui/react-avatar",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Thu, 05 May 2022 18:24:36 GMT",
|
|
6
|
+
"tag": "@fluentui/react-avatar_v9.0.0-rc.8",
|
|
7
|
+
"version": "9.0.0-rc.8",
|
|
8
|
+
"comments": {
|
|
9
|
+
"prerelease": [
|
|
10
|
+
{
|
|
11
|
+
"author": "martinhochel@microsoft.com",
|
|
12
|
+
"package": "@fluentui/react-avatar",
|
|
13
|
+
"commit": "e465622ca241f3dd0534da50823a51e7311fd9ef",
|
|
14
|
+
"comment": "feat: ship rolluped only dts"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"author": "beachball",
|
|
18
|
+
"package": "@fluentui/react-avatar",
|
|
19
|
+
"comment": "Bump @fluentui/react-badge to v9.0.0-rc.8",
|
|
20
|
+
"commit": "c5abb9c480ac94d12aa644d68d30773d77f2a159"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"author": "beachball",
|
|
24
|
+
"package": "@fluentui/react-avatar",
|
|
25
|
+
"comment": "Bump @fluentui/react-button to v9.0.0-rc.9",
|
|
26
|
+
"commit": "c5abb9c480ac94d12aa644d68d30773d77f2a159"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"author": "beachball",
|
|
30
|
+
"package": "@fluentui/react-avatar",
|
|
31
|
+
"comment": "Bump @fluentui/react-popover to v9.0.0-rc.9",
|
|
32
|
+
"commit": "c5abb9c480ac94d12aa644d68d30773d77f2a159"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"author": "beachball",
|
|
36
|
+
"package": "@fluentui/react-avatar",
|
|
37
|
+
"comment": "Bump @fluentui/react-tooltip to v9.0.0-rc.9",
|
|
38
|
+
"commit": "c5abb9c480ac94d12aa644d68d30773d77f2a159"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"author": "beachball",
|
|
42
|
+
"package": "@fluentui/react-avatar",
|
|
43
|
+
"comment": "Bump @fluentui/react-theme to v9.0.0-rc.7",
|
|
44
|
+
"commit": "c5abb9c480ac94d12aa644d68d30773d77f2a159"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"author": "beachball",
|
|
48
|
+
"package": "@fluentui/react-avatar",
|
|
49
|
+
"comment": "Bump @fluentui/react-shared-contexts to v9.0.0-rc.7",
|
|
50
|
+
"commit": "c5abb9c480ac94d12aa644d68d30773d77f2a159"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"author": "beachball",
|
|
54
|
+
"package": "@fluentui/react-avatar",
|
|
55
|
+
"comment": "Bump @fluentui/react-utilities to v9.0.0-rc.8",
|
|
56
|
+
"commit": "c5abb9c480ac94d12aa644d68d30773d77f2a159"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"author": "beachball",
|
|
60
|
+
"package": "@fluentui/react-avatar",
|
|
61
|
+
"comment": "Bump @fluentui/react-conformance-griffel to v9.0.0-beta.5",
|
|
62
|
+
"commit": "c5abb9c480ac94d12aa644d68d30773d77f2a159"
|
|
63
|
+
}
|
|
64
|
+
]
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"date": "Wed, 04 May 2022 13:26:37 GMT",
|
|
6
69
|
"tag": "@fluentui/react-avatar_v9.0.0-rc.7",
|
|
7
70
|
"version": "9.0.0-rc.7",
|
|
8
71
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,29 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-avatar
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Thu, 05 May 2022 18:24:36 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [9.0.0-rc.8](https://github.com/microsoft/fluentui/tree/@fluentui/react-avatar_v9.0.0-rc.8)
|
|
8
|
+
|
|
9
|
+
Thu, 05 May 2022 18:24:36 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-avatar_v9.0.0-rc.7..@fluentui/react-avatar_v9.0.0-rc.8)
|
|
11
|
+
|
|
12
|
+
### Changes
|
|
13
|
+
|
|
14
|
+
- feat: ship rolluped only dts ([PR #22823](https://github.com/microsoft/fluentui/pull/22823) by martinhochel@microsoft.com)
|
|
15
|
+
- Bump @fluentui/react-badge to v9.0.0-rc.8 ([PR #22857](https://github.com/microsoft/fluentui/pull/22857) by beachball)
|
|
16
|
+
- Bump @fluentui/react-button to v9.0.0-rc.9 ([PR #22857](https://github.com/microsoft/fluentui/pull/22857) by beachball)
|
|
17
|
+
- Bump @fluentui/react-popover to v9.0.0-rc.9 ([PR #22857](https://github.com/microsoft/fluentui/pull/22857) by beachball)
|
|
18
|
+
- Bump @fluentui/react-tooltip to v9.0.0-rc.9 ([PR #22857](https://github.com/microsoft/fluentui/pull/22857) by beachball)
|
|
19
|
+
- Bump @fluentui/react-theme to v9.0.0-rc.7 ([PR #22857](https://github.com/microsoft/fluentui/pull/22857) by beachball)
|
|
20
|
+
- Bump @fluentui/react-shared-contexts to v9.0.0-rc.7 ([PR #22857](https://github.com/microsoft/fluentui/pull/22857) by beachball)
|
|
21
|
+
- Bump @fluentui/react-utilities to v9.0.0-rc.8 ([PR #22857](https://github.com/microsoft/fluentui/pull/22857) by beachball)
|
|
22
|
+
- Bump @fluentui/react-conformance-griffel to v9.0.0-beta.5 ([PR #22857](https://github.com/microsoft/fluentui/pull/22857) by beachball)
|
|
23
|
+
|
|
7
24
|
## [9.0.0-rc.7](https://github.com/microsoft/fluentui/tree/@fluentui/react-avatar_v9.0.0-rc.7)
|
|
8
25
|
|
|
9
|
-
Wed, 04 May 2022 13:
|
|
26
|
+
Wed, 04 May 2022 13:26:37 GMT
|
|
10
27
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-avatar_v9.0.0-rc.6..@fluentui/react-avatar_v9.0.0-rc.7)
|
|
11
28
|
|
|
12
29
|
### Changes
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui/react-avatar",
|
|
3
|
-
"version": "9.0.0-rc.
|
|
3
|
+
"version": "9.0.0-rc.8",
|
|
4
4
|
"description": "React components for building Microsoft web experiences.",
|
|
5
5
|
"main": "lib-commonjs/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
7
|
-
"typings": "
|
|
7
|
+
"typings": "dist/index.d.ts",
|
|
8
8
|
"sideEffects": false,
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
@@ -28,19 +28,19 @@
|
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@fluentui/eslint-plugin": "*",
|
|
30
30
|
"@fluentui/react-conformance": "*",
|
|
31
|
-
"@fluentui/react-conformance-griffel": "9.0.0-beta.
|
|
31
|
+
"@fluentui/react-conformance-griffel": "9.0.0-beta.5",
|
|
32
32
|
"@fluentui/scripts": "^1.0.0",
|
|
33
33
|
"es6-weak-map": "^2.0.2"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@fluentui/react-badge": "9.0.0-rc.
|
|
37
|
-
"@fluentui/react-button": "9.0.0-rc.
|
|
36
|
+
"@fluentui/react-badge": "9.0.0-rc.8",
|
|
37
|
+
"@fluentui/react-button": "9.0.0-rc.9",
|
|
38
38
|
"@fluentui/react-icons": "^2.0.166-rc.3",
|
|
39
|
-
"@fluentui/react-popover": "9.0.0-rc.
|
|
40
|
-
"@fluentui/react-tooltip": "9.0.0-rc.
|
|
41
|
-
"@fluentui/react-theme": "9.0.0-rc.
|
|
42
|
-
"@fluentui/react-shared-contexts": "9.0.0-rc.
|
|
43
|
-
"@fluentui/react-utilities": "9.0.0-rc.
|
|
39
|
+
"@fluentui/react-popover": "9.0.0-rc.9",
|
|
40
|
+
"@fluentui/react-tooltip": "9.0.0-rc.9",
|
|
41
|
+
"@fluentui/react-theme": "9.0.0-rc.7",
|
|
42
|
+
"@fluentui/react-shared-contexts": "9.0.0-rc.7",
|
|
43
|
+
"@fluentui/react-utilities": "9.0.0-rc.8",
|
|
44
44
|
"@griffel/react": "1.0.3",
|
|
45
45
|
"tslib": "^2.1.0"
|
|
46
46
|
},
|
package/lib/Avatar.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './components/Avatar/index';
|
package/lib/AvatarGroup.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './components/AvatarGroup/index';
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
import { PresenceBadge } from '@fluentui/react-badge';
|
|
2
|
-
import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';
|
|
3
|
-
export declare type AvatarSlots = {
|
|
4
|
-
root: Slot<'span'>;
|
|
5
|
-
/**
|
|
6
|
-
* The Avatar's image.
|
|
7
|
-
*
|
|
8
|
-
* Usage e.g.: `image={{ src: '...' }}`
|
|
9
|
-
*/
|
|
10
|
-
image?: Slot<'img'>;
|
|
11
|
-
/**
|
|
12
|
-
* (optional) Custom initials.
|
|
13
|
-
*
|
|
14
|
-
* It is usually not necessary to specify custom initials; by default they will be derived from the `name` prop,
|
|
15
|
-
* using the `getInitials` function.
|
|
16
|
-
*
|
|
17
|
-
* The initials are displayed when there is no image (including while the image is loading).
|
|
18
|
-
*/
|
|
19
|
-
initials?: Slot<'span'>;
|
|
20
|
-
/**
|
|
21
|
-
* Icon to be displayed when the avatar doesn't have an image or initials.
|
|
22
|
-
*
|
|
23
|
-
* @defaultvalue `PersonRegular` (the default icon's size depends on the Avatar's size)
|
|
24
|
-
*/
|
|
25
|
-
icon?: Slot<'span'>;
|
|
26
|
-
/**
|
|
27
|
-
* Badge to show the avatar's presence status.
|
|
28
|
-
*/
|
|
29
|
-
badge?: Slot<typeof PresenceBadge>;
|
|
30
|
-
};
|
|
31
|
-
declare type AvatarCommons = {
|
|
32
|
-
/**
|
|
33
|
-
* The name of the person or entity represented by this Avatar. This should always be provided if it is available.
|
|
34
|
-
*
|
|
35
|
-
* The name will be used to determine the initials displayed when there is no icon, as well as provided to
|
|
36
|
-
* accessibility tools.
|
|
37
|
-
*/
|
|
38
|
-
name?: string;
|
|
39
|
-
/**
|
|
40
|
-
* Size of the avatar in pixels.
|
|
41
|
-
*
|
|
42
|
-
* Size is restricted to a limited set of supported values recommended for most uses (see `AvatarSizeValue`) and
|
|
43
|
-
* based on design guidelines for the Avatar control.
|
|
44
|
-
*
|
|
45
|
-
* If a non-supported size is neeeded, set `size` to the next-smaller supported size, and set `width` and `height`
|
|
46
|
-
* to override the rendered size.
|
|
47
|
-
*
|
|
48
|
-
* For example, to set the avatar to 45px in size:
|
|
49
|
-
* `<Avatar size={40} style={{ width: '45px', height: '45px' }} />`
|
|
50
|
-
*
|
|
51
|
-
* @defaultvalue 32
|
|
52
|
-
*/
|
|
53
|
-
size: AvatarSizes;
|
|
54
|
-
/**
|
|
55
|
-
* The avatar can have a circular or square shape.
|
|
56
|
-
* @defaultvalue circular
|
|
57
|
-
*/
|
|
58
|
-
shape: 'circular' | 'square';
|
|
59
|
-
/**
|
|
60
|
-
* Optional activity indicator
|
|
61
|
-
* * active: the avatar will be decorated according to activeAppearance
|
|
62
|
-
* * inactive: the avatar will be reduced in size and partially transparent
|
|
63
|
-
* * unset: normal display
|
|
64
|
-
*
|
|
65
|
-
* @defaultvalue unset
|
|
66
|
-
*/
|
|
67
|
-
active: 'active' | 'inactive' | 'unset';
|
|
68
|
-
/**
|
|
69
|
-
* The appearance when `active="active"`
|
|
70
|
-
*
|
|
71
|
-
* @defaultvalue ring
|
|
72
|
-
*/
|
|
73
|
-
activeAppearance: 'ring' | 'shadow' | 'ring-shadow';
|
|
74
|
-
/**
|
|
75
|
-
* The color when displaying either an icon or initials.
|
|
76
|
-
* * neutral (default): gray
|
|
77
|
-
* * brand: color from the brand palette
|
|
78
|
-
* * colorful: picks a color from a set of pre-defined colors, based on a hash of the name (or idForColor if provided)
|
|
79
|
-
* * [AvatarNamedColor]: a specific color from the theme
|
|
80
|
-
*
|
|
81
|
-
* @defaultvalue neutral
|
|
82
|
-
*/
|
|
83
|
-
color: 'neutral' | 'brand' | 'colorful' | AvatarNamedColor;
|
|
84
|
-
/**
|
|
85
|
-
* Specify a string to be used instead of the name, to determine which color to use when color="colorful".
|
|
86
|
-
* Use this when a name is not available, but there is another unique identifier that can be used instead.
|
|
87
|
-
*/
|
|
88
|
-
idForColor: string | undefined;
|
|
89
|
-
};
|
|
90
|
-
/**
|
|
91
|
-
* A specific named color for the Avatar
|
|
92
|
-
*/
|
|
93
|
-
export declare type AvatarNamedColor = 'darkRed' | 'cranberry' | 'red' | 'pumpkin' | 'peach' | 'marigold' | 'gold' | 'brass' | 'brown' | 'forest' | 'seafoam' | 'darkGreen' | 'lightTeal' | 'teal' | 'steel' | 'blue' | 'royalBlue' | 'cornflower' | 'navy' | 'lavender' | 'purple' | 'grape' | 'lilac' | 'pink' | 'magenta' | 'plum' | 'beige' | 'mink' | 'platinum' | 'anchor';
|
|
94
|
-
/**
|
|
95
|
-
* Sizes that can be used for the Avatar
|
|
96
|
-
*/
|
|
97
|
-
export declare type AvatarSizes = 20 | 24 | 28 | 32 | 36 | 40 | 48 | 56 | 64 | 72 | 96 | 120 | 128;
|
|
98
|
-
/**
|
|
99
|
-
* Properties for Avatar
|
|
100
|
-
*/
|
|
101
|
-
export declare type AvatarProps = Omit<ComponentProps<AvatarSlots>, 'color'> & Partial<AvatarCommons>;
|
|
102
|
-
/**
|
|
103
|
-
* State used in rendering Avatar
|
|
104
|
-
*/
|
|
105
|
-
export declare type AvatarState = ComponentState<AvatarSlots> & AvatarCommons & {
|
|
106
|
-
/**
|
|
107
|
-
* The Avatar's color, with `'colorful'` resolved to a named color
|
|
108
|
-
*/
|
|
109
|
-
color: Exclude<AvatarCommons['color'], 'colorful'>;
|
|
110
|
-
};
|
|
111
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { AvatarSlots, AvatarState } from './Avatar.types';
|
|
2
|
-
import type { SlotClassNames } from '@fluentui/react-utilities';
|
|
3
|
-
/**
|
|
4
|
-
* @deprecated Use `avatarClassNames.root` instead.
|
|
5
|
-
*/
|
|
6
|
-
export declare const avatarClassName = "fui-Avatar";
|
|
7
|
-
export declare const avatarClassNames: SlotClassNames<AvatarSlots>;
|
|
8
|
-
export declare const useAvatarStyles_unstable: (state: AvatarState) => AvatarState;
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';
|
|
2
|
-
import { PopoverSurface } from '@fluentui/react-popover';
|
|
3
|
-
import { AvatarSizes } from '../Avatar/Avatar.types';
|
|
4
|
-
import { Button } from '@fluentui/react-button';
|
|
5
|
-
import { TooltipProps } from '@fluentui/react-tooltip';
|
|
6
|
-
export declare type AvatarGroupSlots = {
|
|
7
|
-
root: Slot<'div'>;
|
|
8
|
-
/**
|
|
9
|
-
* Popover trigger slot that can be used to change the overflow indicator.
|
|
10
|
-
*/
|
|
11
|
-
popoverTrigger?: Slot<typeof Button>;
|
|
12
|
-
/**
|
|
13
|
-
* Popover surface that will be displayed when the popover is triggered.
|
|
14
|
-
*/
|
|
15
|
-
popoverSurface?: Slot<typeof PopoverSurface>;
|
|
16
|
-
};
|
|
17
|
-
declare type AvatarGroupCommons = {
|
|
18
|
-
/**
|
|
19
|
-
* Layout the Avatars should be displayed as.
|
|
20
|
-
* @default spread
|
|
21
|
-
*/
|
|
22
|
-
layout: 'spread' | 'stack' | 'pie';
|
|
23
|
-
/**
|
|
24
|
-
* Maximum number of Avatars to be displayed before overflowing.
|
|
25
|
-
* NOTE: if pie layout is used, `maxAvatars` will be ignored.
|
|
26
|
-
* @default 5
|
|
27
|
-
*/
|
|
28
|
-
maxAvatars: number;
|
|
29
|
-
/**
|
|
30
|
-
* Size of the avatars.
|
|
31
|
-
* @default 32
|
|
32
|
-
*/
|
|
33
|
-
size: AvatarSizes;
|
|
34
|
-
/**
|
|
35
|
-
* Whether the overflow indicator should render an icon instead of the number of overflowed avatars.
|
|
36
|
-
* @default false
|
|
37
|
-
*/
|
|
38
|
-
overflowIndicator: 'number-overflowed' | 'icon';
|
|
39
|
-
/**
|
|
40
|
-
* Strings for localizing text in the tooltip.
|
|
41
|
-
*/
|
|
42
|
-
strings?: AvatarGroupStrings;
|
|
43
|
-
};
|
|
44
|
-
/**
|
|
45
|
-
* AvatarGroup Props
|
|
46
|
-
*/
|
|
47
|
-
export declare type AvatarGroupProps = ComponentProps<AvatarGroupSlots> & Partial<AvatarGroupCommons>;
|
|
48
|
-
/**
|
|
49
|
-
* State used in rendering AvatarGroup
|
|
50
|
-
*/
|
|
51
|
-
export declare type AvatarGroupState = ComponentState<AvatarGroupSlots> & AvatarGroupCommons & {
|
|
52
|
-
tooltipContent: TooltipProps['content'];
|
|
53
|
-
};
|
|
54
|
-
export declare type AvatarGroupStrings = {
|
|
55
|
-
/**
|
|
56
|
-
* Text applied to the overflow indicator's tooltip.
|
|
57
|
-
* Can include the token "\{numOverflowedAvatars\}" which will be replaced with the number of overflowed avatars.
|
|
58
|
-
*/
|
|
59
|
-
tooltipContent: string;
|
|
60
|
-
};
|
|
61
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import type { AvatarGroupProps, AvatarGroupState } from './AvatarGroup.types';
|
|
3
|
-
/**
|
|
4
|
-
* Create the state required to render AvatarGroup.
|
|
5
|
-
*
|
|
6
|
-
* The returned state can be modified with hooks such as useAvatarGroupStyles_unstable,
|
|
7
|
-
* before being passed to renderAvatarGroup_unstable.
|
|
8
|
-
*
|
|
9
|
-
* @param props - props from this instance of AvatarGroup
|
|
10
|
-
* @param ref - reference to root HTMLElement of AvatarGroup
|
|
11
|
-
*/
|
|
12
|
-
export declare const useAvatarGroup_unstable: (props: AvatarGroupProps, ref: React.Ref<HTMLElement>) => AvatarGroupState;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { AvatarGroupSlots, AvatarGroupState } from './AvatarGroup.types';
|
|
2
|
-
import type { SlotClassNames } from '@fluentui/react-utilities';
|
|
3
|
-
export declare const avatarGroupClassNames: SlotClassNames<AvatarGroupSlots>;
|
|
4
|
-
export declare const extraAvatarGroupClassNames: {
|
|
5
|
-
popoverSurfaceItem: string;
|
|
6
|
-
};
|
|
7
|
-
/**
|
|
8
|
-
* Apply styling to the AvatarGroup slots based on the state
|
|
9
|
-
*/
|
|
10
|
-
export declare const useAvatarGroupStyles_unstable: (state: AvatarGroupState) => AvatarGroupState;
|
package/lib/index.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export { Avatar, avatarClassName, avatarClassNames, renderAvatar_unstable, useAvatarStyles_unstable, useAvatar_unstable, } from './Avatar';
|
|
2
|
-
export type { AvatarNamedColor, AvatarProps, AvatarSlots, AvatarState, AvatarSizes } from './Avatar';
|
|
3
|
-
export { getInitials } from './utils/index';
|
|
4
|
-
export { AvatarGroup, avatarGroupClassNames, renderAvatarGroup_unstable, useAvatarGroupStyles_unstable, useAvatarGroup_unstable, } from './AvatarGroup';
|
|
5
|
-
export type { AvatarGroupProps, AvatarGroupSlots, AvatarGroupState } from './AvatarGroup';
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Regular expressions matching characters to ignore when calculating the initials.
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* Get (up to 2 characters) initials based on display name of the persona.
|
|
6
|
-
*
|
|
7
|
-
* @param displayName - The full name of the person or entity
|
|
8
|
-
* @param isRtl - Whether the display is in RTL
|
|
9
|
-
* @param allowPhoneInitials - Should initials be generated from phone numbers (default false)
|
|
10
|
-
*
|
|
11
|
-
* @returns The 1 or 2 character initials based on the name. Or an empty string if no initials
|
|
12
|
-
* could be derived from the name.
|
|
13
|
-
*/
|
|
14
|
-
export declare function getInitials(displayName: string | undefined | null, isRtl: boolean, allowPhoneInitials?: boolean): string;
|
package/lib/utils/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { getInitials } from './getInitials';
|
package/lib-commonjs/Avatar.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './components/Avatar/index';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './components/AvatarGroup/index';
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
import { PresenceBadge } from '@fluentui/react-badge';
|
|
2
|
-
import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';
|
|
3
|
-
export declare type AvatarSlots = {
|
|
4
|
-
root: Slot<'span'>;
|
|
5
|
-
/**
|
|
6
|
-
* The Avatar's image.
|
|
7
|
-
*
|
|
8
|
-
* Usage e.g.: `image={{ src: '...' }}`
|
|
9
|
-
*/
|
|
10
|
-
image?: Slot<'img'>;
|
|
11
|
-
/**
|
|
12
|
-
* (optional) Custom initials.
|
|
13
|
-
*
|
|
14
|
-
* It is usually not necessary to specify custom initials; by default they will be derived from the `name` prop,
|
|
15
|
-
* using the `getInitials` function.
|
|
16
|
-
*
|
|
17
|
-
* The initials are displayed when there is no image (including while the image is loading).
|
|
18
|
-
*/
|
|
19
|
-
initials?: Slot<'span'>;
|
|
20
|
-
/**
|
|
21
|
-
* Icon to be displayed when the avatar doesn't have an image or initials.
|
|
22
|
-
*
|
|
23
|
-
* @defaultvalue `PersonRegular` (the default icon's size depends on the Avatar's size)
|
|
24
|
-
*/
|
|
25
|
-
icon?: Slot<'span'>;
|
|
26
|
-
/**
|
|
27
|
-
* Badge to show the avatar's presence status.
|
|
28
|
-
*/
|
|
29
|
-
badge?: Slot<typeof PresenceBadge>;
|
|
30
|
-
};
|
|
31
|
-
declare type AvatarCommons = {
|
|
32
|
-
/**
|
|
33
|
-
* The name of the person or entity represented by this Avatar. This should always be provided if it is available.
|
|
34
|
-
*
|
|
35
|
-
* The name will be used to determine the initials displayed when there is no icon, as well as provided to
|
|
36
|
-
* accessibility tools.
|
|
37
|
-
*/
|
|
38
|
-
name?: string;
|
|
39
|
-
/**
|
|
40
|
-
* Size of the avatar in pixels.
|
|
41
|
-
*
|
|
42
|
-
* Size is restricted to a limited set of supported values recommended for most uses (see `AvatarSizeValue`) and
|
|
43
|
-
* based on design guidelines for the Avatar control.
|
|
44
|
-
*
|
|
45
|
-
* If a non-supported size is neeeded, set `size` to the next-smaller supported size, and set `width` and `height`
|
|
46
|
-
* to override the rendered size.
|
|
47
|
-
*
|
|
48
|
-
* For example, to set the avatar to 45px in size:
|
|
49
|
-
* `<Avatar size={40} style={{ width: '45px', height: '45px' }} />`
|
|
50
|
-
*
|
|
51
|
-
* @defaultvalue 32
|
|
52
|
-
*/
|
|
53
|
-
size: AvatarSizes;
|
|
54
|
-
/**
|
|
55
|
-
* The avatar can have a circular or square shape.
|
|
56
|
-
* @defaultvalue circular
|
|
57
|
-
*/
|
|
58
|
-
shape: 'circular' | 'square';
|
|
59
|
-
/**
|
|
60
|
-
* Optional activity indicator
|
|
61
|
-
* * active: the avatar will be decorated according to activeAppearance
|
|
62
|
-
* * inactive: the avatar will be reduced in size and partially transparent
|
|
63
|
-
* * unset: normal display
|
|
64
|
-
*
|
|
65
|
-
* @defaultvalue unset
|
|
66
|
-
*/
|
|
67
|
-
active: 'active' | 'inactive' | 'unset';
|
|
68
|
-
/**
|
|
69
|
-
* The appearance when `active="active"`
|
|
70
|
-
*
|
|
71
|
-
* @defaultvalue ring
|
|
72
|
-
*/
|
|
73
|
-
activeAppearance: 'ring' | 'shadow' | 'ring-shadow';
|
|
74
|
-
/**
|
|
75
|
-
* The color when displaying either an icon or initials.
|
|
76
|
-
* * neutral (default): gray
|
|
77
|
-
* * brand: color from the brand palette
|
|
78
|
-
* * colorful: picks a color from a set of pre-defined colors, based on a hash of the name (or idForColor if provided)
|
|
79
|
-
* * [AvatarNamedColor]: a specific color from the theme
|
|
80
|
-
*
|
|
81
|
-
* @defaultvalue neutral
|
|
82
|
-
*/
|
|
83
|
-
color: 'neutral' | 'brand' | 'colorful' | AvatarNamedColor;
|
|
84
|
-
/**
|
|
85
|
-
* Specify a string to be used instead of the name, to determine which color to use when color="colorful".
|
|
86
|
-
* Use this when a name is not available, but there is another unique identifier that can be used instead.
|
|
87
|
-
*/
|
|
88
|
-
idForColor: string | undefined;
|
|
89
|
-
};
|
|
90
|
-
/**
|
|
91
|
-
* A specific named color for the Avatar
|
|
92
|
-
*/
|
|
93
|
-
export declare type AvatarNamedColor = 'darkRed' | 'cranberry' | 'red' | 'pumpkin' | 'peach' | 'marigold' | 'gold' | 'brass' | 'brown' | 'forest' | 'seafoam' | 'darkGreen' | 'lightTeal' | 'teal' | 'steel' | 'blue' | 'royalBlue' | 'cornflower' | 'navy' | 'lavender' | 'purple' | 'grape' | 'lilac' | 'pink' | 'magenta' | 'plum' | 'beige' | 'mink' | 'platinum' | 'anchor';
|
|
94
|
-
/**
|
|
95
|
-
* Sizes that can be used for the Avatar
|
|
96
|
-
*/
|
|
97
|
-
export declare type AvatarSizes = 20 | 24 | 28 | 32 | 36 | 40 | 48 | 56 | 64 | 72 | 96 | 120 | 128;
|
|
98
|
-
/**
|
|
99
|
-
* Properties for Avatar
|
|
100
|
-
*/
|
|
101
|
-
export declare type AvatarProps = Omit<ComponentProps<AvatarSlots>, 'color'> & Partial<AvatarCommons>;
|
|
102
|
-
/**
|
|
103
|
-
* State used in rendering Avatar
|
|
104
|
-
*/
|
|
105
|
-
export declare type AvatarState = ComponentState<AvatarSlots> & AvatarCommons & {
|
|
106
|
-
/**
|
|
107
|
-
* The Avatar's color, with `'colorful'` resolved to a named color
|
|
108
|
-
*/
|
|
109
|
-
color: Exclude<AvatarCommons['color'], 'colorful'>;
|
|
110
|
-
};
|
|
111
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { AvatarSlots, AvatarState } from './Avatar.types';
|
|
2
|
-
import type { SlotClassNames } from '@fluentui/react-utilities';
|
|
3
|
-
/**
|
|
4
|
-
* @deprecated Use `avatarClassNames.root` instead.
|
|
5
|
-
*/
|
|
6
|
-
export declare const avatarClassName = "fui-Avatar";
|
|
7
|
-
export declare const avatarClassNames: SlotClassNames<AvatarSlots>;
|
|
8
|
-
export declare const useAvatarStyles_unstable: (state: AvatarState) => AvatarState;
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';
|
|
2
|
-
import { PopoverSurface } from '@fluentui/react-popover';
|
|
3
|
-
import { AvatarSizes } from '../Avatar/Avatar.types';
|
|
4
|
-
import { Button } from '@fluentui/react-button';
|
|
5
|
-
import { TooltipProps } from '@fluentui/react-tooltip';
|
|
6
|
-
export declare type AvatarGroupSlots = {
|
|
7
|
-
root: Slot<'div'>;
|
|
8
|
-
/**
|
|
9
|
-
* Popover trigger slot that can be used to change the overflow indicator.
|
|
10
|
-
*/
|
|
11
|
-
popoverTrigger?: Slot<typeof Button>;
|
|
12
|
-
/**
|
|
13
|
-
* Popover surface that will be displayed when the popover is triggered.
|
|
14
|
-
*/
|
|
15
|
-
popoverSurface?: Slot<typeof PopoverSurface>;
|
|
16
|
-
};
|
|
17
|
-
declare type AvatarGroupCommons = {
|
|
18
|
-
/**
|
|
19
|
-
* Layout the Avatars should be displayed as.
|
|
20
|
-
* @default spread
|
|
21
|
-
*/
|
|
22
|
-
layout: 'spread' | 'stack' | 'pie';
|
|
23
|
-
/**
|
|
24
|
-
* Maximum number of Avatars to be displayed before overflowing.
|
|
25
|
-
* NOTE: if pie layout is used, `maxAvatars` will be ignored.
|
|
26
|
-
* @default 5
|
|
27
|
-
*/
|
|
28
|
-
maxAvatars: number;
|
|
29
|
-
/**
|
|
30
|
-
* Size of the avatars.
|
|
31
|
-
* @default 32
|
|
32
|
-
*/
|
|
33
|
-
size: AvatarSizes;
|
|
34
|
-
/**
|
|
35
|
-
* Whether the overflow indicator should render an icon instead of the number of overflowed avatars.
|
|
36
|
-
* @default false
|
|
37
|
-
*/
|
|
38
|
-
overflowIndicator: 'number-overflowed' | 'icon';
|
|
39
|
-
/**
|
|
40
|
-
* Strings for localizing text in the tooltip.
|
|
41
|
-
*/
|
|
42
|
-
strings?: AvatarGroupStrings;
|
|
43
|
-
};
|
|
44
|
-
/**
|
|
45
|
-
* AvatarGroup Props
|
|
46
|
-
*/
|
|
47
|
-
export declare type AvatarGroupProps = ComponentProps<AvatarGroupSlots> & Partial<AvatarGroupCommons>;
|
|
48
|
-
/**
|
|
49
|
-
* State used in rendering AvatarGroup
|
|
50
|
-
*/
|
|
51
|
-
export declare type AvatarGroupState = ComponentState<AvatarGroupSlots> & AvatarGroupCommons & {
|
|
52
|
-
tooltipContent: TooltipProps['content'];
|
|
53
|
-
};
|
|
54
|
-
export declare type AvatarGroupStrings = {
|
|
55
|
-
/**
|
|
56
|
-
* Text applied to the overflow indicator's tooltip.
|
|
57
|
-
* Can include the token "\{numOverflowedAvatars\}" which will be replaced with the number of overflowed avatars.
|
|
58
|
-
*/
|
|
59
|
-
tooltipContent: string;
|
|
60
|
-
};
|
|
61
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import type { AvatarGroupProps, AvatarGroupState } from './AvatarGroup.types';
|
|
3
|
-
/**
|
|
4
|
-
* Create the state required to render AvatarGroup.
|
|
5
|
-
*
|
|
6
|
-
* The returned state can be modified with hooks such as useAvatarGroupStyles_unstable,
|
|
7
|
-
* before being passed to renderAvatarGroup_unstable.
|
|
8
|
-
*
|
|
9
|
-
* @param props - props from this instance of AvatarGroup
|
|
10
|
-
* @param ref - reference to root HTMLElement of AvatarGroup
|
|
11
|
-
*/
|
|
12
|
-
export declare const useAvatarGroup_unstable: (props: AvatarGroupProps, ref: React.Ref<HTMLElement>) => AvatarGroupState;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { AvatarGroupSlots, AvatarGroupState } from './AvatarGroup.types';
|
|
2
|
-
import type { SlotClassNames } from '@fluentui/react-utilities';
|
|
3
|
-
export declare const avatarGroupClassNames: SlotClassNames<AvatarGroupSlots>;
|
|
4
|
-
export declare const extraAvatarGroupClassNames: {
|
|
5
|
-
popoverSurfaceItem: string;
|
|
6
|
-
};
|
|
7
|
-
/**
|
|
8
|
-
* Apply styling to the AvatarGroup slots based on the state
|
|
9
|
-
*/
|
|
10
|
-
export declare const useAvatarGroupStyles_unstable: (state: AvatarGroupState) => AvatarGroupState;
|
package/lib-commonjs/index.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export { Avatar, avatarClassName, avatarClassNames, renderAvatar_unstable, useAvatarStyles_unstable, useAvatar_unstable, } from './Avatar';
|
|
2
|
-
export type { AvatarNamedColor, AvatarProps, AvatarSlots, AvatarState, AvatarSizes } from './Avatar';
|
|
3
|
-
export { getInitials } from './utils/index';
|
|
4
|
-
export { AvatarGroup, avatarGroupClassNames, renderAvatarGroup_unstable, useAvatarGroupStyles_unstable, useAvatarGroup_unstable, } from './AvatarGroup';
|
|
5
|
-
export type { AvatarGroupProps, AvatarGroupSlots, AvatarGroupState } from './AvatarGroup';
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Regular expressions matching characters to ignore when calculating the initials.
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* Get (up to 2 characters) initials based on display name of the persona.
|
|
6
|
-
*
|
|
7
|
-
* @param displayName - The full name of the person or entity
|
|
8
|
-
* @param isRtl - Whether the display is in RTL
|
|
9
|
-
* @param allowPhoneInitials - Should initials be generated from phone numbers (default false)
|
|
10
|
-
*
|
|
11
|
-
* @returns The 1 or 2 character initials based on the name. Or an empty string if no initials
|
|
12
|
-
* could be derived from the name.
|
|
13
|
-
*/
|
|
14
|
-
export declare function getInitials(displayName: string | undefined | null, isRtl: boolean, allowPhoneInitials?: boolean): string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { getInitials } from './getInitials';
|