@fluentui/react-avatar 9.2.2 → 9.2.4

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 CHANGED
@@ -2,7 +2,103 @@
2
2
  "name": "@fluentui/react-avatar",
3
3
  "entries": [
4
4
  {
5
- "date": "Thu, 13 Oct 2022 12:55:52 GMT",
5
+ "date": "Tue, 25 Oct 2022 00:34:06 GMT",
6
+ "tag": "@fluentui/react-avatar_v9.2.4",
7
+ "version": "9.2.4",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "author": "esteban.230@hotmail.com",
12
+ "package": "@fluentui/react-avatar",
13
+ "commit": "28364be921fa9e04eb472a069416b61b30da8652",
14
+ "comment": "fix: Add undefined option to overflowItems in partitionAvatarGroupItems."
15
+ },
16
+ {
17
+ "author": "beachball",
18
+ "package": "@fluentui/react-avatar",
19
+ "comment": "Bump @fluentui/react-badge to v9.0.10",
20
+ "commit": "eef12b9ae58b64ff68576dc2d865b601e46c85b9"
21
+ }
22
+ ]
23
+ }
24
+ },
25
+ {
26
+ "date": "Thu, 20 Oct 2022 08:39:58 GMT",
27
+ "tag": "@fluentui/react-avatar_v9.2.3",
28
+ "version": "9.2.3",
29
+ "comments": {
30
+ "patch": [
31
+ {
32
+ "author": "mgodbolt@microsoft.com",
33
+ "package": "@fluentui/react-avatar",
34
+ "commit": "17096b3137d9d3e7c7443ddc3ce0738b2910a334",
35
+ "comment": "chore: Bump peer deps to support React 18"
36
+ },
37
+ {
38
+ "author": "olfedias@microsoft.com",
39
+ "package": "@fluentui/react-avatar",
40
+ "commit": "06865dada128321804646582f564ee86d835d174",
41
+ "comment": "chore: Update Griffel to latest version"
42
+ },
43
+ {
44
+ "author": "beachball",
45
+ "package": "@fluentui/react-avatar",
46
+ "comment": "Bump @fluentui/react-badge to v9.0.9",
47
+ "commit": "5ea1372675d910d76cf1b9cbd74d05b7c4e8fcbc"
48
+ },
49
+ {
50
+ "author": "beachball",
51
+ "package": "@fluentui/react-avatar",
52
+ "comment": "Bump @fluentui/react-context-selector to v9.0.5",
53
+ "commit": "5ea1372675d910d76cf1b9cbd74d05b7c4e8fcbc"
54
+ },
55
+ {
56
+ "author": "beachball",
57
+ "package": "@fluentui/react-avatar",
58
+ "comment": "Bump @fluentui/react-popover to v9.2.1",
59
+ "commit": "5ea1372675d910d76cf1b9cbd74d05b7c4e8fcbc"
60
+ },
61
+ {
62
+ "author": "beachball",
63
+ "package": "@fluentui/react-avatar",
64
+ "comment": "Bump @fluentui/react-shared-contexts to v9.0.2",
65
+ "commit": "5ea1372675d910d76cf1b9cbd74d05b7c4e8fcbc"
66
+ },
67
+ {
68
+ "author": "beachball",
69
+ "package": "@fluentui/react-avatar",
70
+ "comment": "Bump @fluentui/react-tabster to v9.2.0",
71
+ "commit": "5ea1372675d910d76cf1b9cbd74d05b7c4e8fcbc"
72
+ },
73
+ {
74
+ "author": "beachball",
75
+ "package": "@fluentui/react-avatar",
76
+ "comment": "Bump @fluentui/react-theme to v9.1.1",
77
+ "commit": "5ea1372675d910d76cf1b9cbd74d05b7c4e8fcbc"
78
+ },
79
+ {
80
+ "author": "beachball",
81
+ "package": "@fluentui/react-avatar",
82
+ "comment": "Bump @fluentui/react-tooltip to v9.0.9",
83
+ "commit": "5ea1372675d910d76cf1b9cbd74d05b7c4e8fcbc"
84
+ },
85
+ {
86
+ "author": "beachball",
87
+ "package": "@fluentui/react-avatar",
88
+ "comment": "Bump @fluentui/react-utilities to v9.1.2",
89
+ "commit": "5ea1372675d910d76cf1b9cbd74d05b7c4e8fcbc"
90
+ },
91
+ {
92
+ "author": "beachball",
93
+ "package": "@fluentui/react-avatar",
94
+ "comment": "Bump @fluentui/react-conformance-griffel to v9.0.0-beta.16",
95
+ "commit": "5ea1372675d910d76cf1b9cbd74d05b7c4e8fcbc"
96
+ }
97
+ ]
98
+ }
99
+ },
100
+ {
101
+ "date": "Thu, 13 Oct 2022 12:56:30 GMT",
6
102
  "tag": "@fluentui/react-avatar_v9.2.2",
7
103
  "version": "9.2.2",
8
104
  "comments": {
@@ -11,7 +107,7 @@
11
107
  "author": "beachball",
12
108
  "package": "@fluentui/react-avatar",
13
109
  "comment": "Bump @fluentui/react-popover to v9.2.0",
14
- "commit": "e563f3daaea9b7cc62f50bc15edd44edf5045107"
110
+ "commit": "77301c97c0539b9ebf891642eb0a077d1aeae9a6"
15
111
  }
16
112
  ]
17
113
  }
package/CHANGELOG.md CHANGED
@@ -1,17 +1,46 @@
1
1
  # Change Log - @fluentui/react-avatar
2
2
 
3
- This log was last generated on Thu, 13 Oct 2022 12:55:52 GMT and should not be manually modified.
3
+ This log was last generated on Tue, 25 Oct 2022 00:34:06 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.2.4](https://github.com/microsoft/fluentui/tree/@fluentui/react-avatar_v9.2.4)
8
+
9
+ Tue, 25 Oct 2022 00:34:06 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-avatar_v9.2.3..@fluentui/react-avatar_v9.2.4)
11
+
12
+ ### Patches
13
+
14
+ - fix: Add undefined option to overflowItems in partitionAvatarGroupItems. ([PR #25310](https://github.com/microsoft/fluentui/pull/25310) by esteban.230@hotmail.com)
15
+ - Bump @fluentui/react-badge to v9.0.10 ([PR #25363](https://github.com/microsoft/fluentui/pull/25363) by beachball)
16
+
17
+ ## [9.2.3](https://github.com/microsoft/fluentui/tree/@fluentui/react-avatar_v9.2.3)
18
+
19
+ Thu, 20 Oct 2022 08:39:58 GMT
20
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-avatar_v9.2.2..@fluentui/react-avatar_v9.2.3)
21
+
22
+ ### Patches
23
+
24
+ - chore: Bump peer deps to support React 18 ([PR #24972](https://github.com/microsoft/fluentui/pull/24972) by mgodbolt@microsoft.com)
25
+ - chore: Update Griffel to latest version ([PR #25212](https://github.com/microsoft/fluentui/pull/25212) by olfedias@microsoft.com)
26
+ - Bump @fluentui/react-badge to v9.0.9 ([PR #25265](https://github.com/microsoft/fluentui/pull/25265) by beachball)
27
+ - Bump @fluentui/react-context-selector to v9.0.5 ([PR #25265](https://github.com/microsoft/fluentui/pull/25265) by beachball)
28
+ - Bump @fluentui/react-popover to v9.2.1 ([PR #25265](https://github.com/microsoft/fluentui/pull/25265) by beachball)
29
+ - Bump @fluentui/react-shared-contexts to v9.0.2 ([PR #25265](https://github.com/microsoft/fluentui/pull/25265) by beachball)
30
+ - Bump @fluentui/react-tabster to v9.2.0 ([PR #25265](https://github.com/microsoft/fluentui/pull/25265) by beachball)
31
+ - Bump @fluentui/react-theme to v9.1.1 ([PR #25265](https://github.com/microsoft/fluentui/pull/25265) by beachball)
32
+ - Bump @fluentui/react-tooltip to v9.0.9 ([PR #25265](https://github.com/microsoft/fluentui/pull/25265) by beachball)
33
+ - Bump @fluentui/react-utilities to v9.1.2 ([PR #25265](https://github.com/microsoft/fluentui/pull/25265) by beachball)
34
+ - Bump @fluentui/react-conformance-griffel to v9.0.0-beta.16 ([PR #25265](https://github.com/microsoft/fluentui/pull/25265) by beachball)
35
+
7
36
  ## [9.2.2](https://github.com/microsoft/fluentui/tree/@fluentui/react-avatar_v9.2.2)
8
37
 
9
- Thu, 13 Oct 2022 12:55:52 GMT
38
+ Thu, 13 Oct 2022 12:56:30 GMT
10
39
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-avatar_v9.2.1..@fluentui/react-avatar_v9.2.2)
11
40
 
12
41
  ### Patches
13
42
 
14
- - Bump @fluentui/react-popover to v9.2.0 ([PR #25112](https://github.com/microsoft/fluentui/pull/25112) by beachball)
43
+ - Bump @fluentui/react-popover to v9.2.0 ([PR #25119](https://github.com/microsoft/fluentui/pull/25119) by beachball)
15
44
 
16
45
  ## [9.2.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-avatar_v9.2.1)
17
46
 
package/dist/index.d.ts CHANGED
@@ -129,7 +129,7 @@ export declare type AvatarGroupPopoverSlots = {
129
129
  /**
130
130
  * State used in rendering AvatarGroupPopover
131
131
  */
132
- export declare type AvatarGroupPopoverState = ComponentState<AvatarGroupPopoverSlots> & Required<Pick<AvatarGroupPopoverProps, 'indicator'>> & {
132
+ export declare type AvatarGroupPopoverState = ComponentState<AvatarGroupPopoverSlots> & Required<Pick<AvatarGroupPopoverProps, 'count' | 'indicator'>> & {
133
133
  popoverOpen: boolean;
134
134
  layout: AvatarGroupProps['layout'];
135
135
  size: AvatarSizes;
@@ -282,6 +282,11 @@ export declare type AvatarState = ComponentState<AvatarSlots> & Required<Pick<Av
282
282
 
283
283
  /* Excluded from this release type: getInitials */
284
284
 
285
+ export declare type PartitionAvatarGroupItems<T> = {
286
+ inlineItems: readonly T[];
287
+ overflowItems?: readonly T[];
288
+ };
289
+
285
290
  /**
286
291
  * Get the inline items and overflowing items based on the array of AvatarGroupItems needed for AvatarGroup.
287
292
  *
@@ -289,10 +294,7 @@ export declare type AvatarState = ComponentState<AvatarSlots> & Required<Pick<Av
289
294
  *
290
295
  * @returns Two arrays split into inline items and overflow items based on maxInlineItems.
291
296
  */
292
- export declare const partitionAvatarGroupItems: <T>(options: PartitionAvatarGroupItemsOptions<T>) => {
293
- inlineItems: T[];
294
- overflowItems: readonly T[];
295
- };
297
+ export declare const partitionAvatarGroupItems: <T>(options: PartitionAvatarGroupItemsOptions<T>) => PartitionAvatarGroupItems<T>;
296
298
 
297
299
  export declare type PartitionAvatarGroupItemsOptions<T> = {
298
300
  items: readonly T[];
@@ -1 +1 @@
1
- {"version":3,"file":"AvatarGroupPopover.types.js","sourceRoot":"../src/","sources":["packages/react-components/react-avatar/src/components/AvatarGroupPopover/AvatarGroupPopover.types.ts"],"names":[],"mappings":"","sourcesContent":["import * as React from 'react';\nimport type { AvatarSizes } from '../Avatar/Avatar.types';\nimport type { AvatarGroupProps } from '../AvatarGroup/AvatarGroup.types';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { PopoverProps, PopoverSurface } from '@fluentui/react-popover';\nimport type { TooltipProps } from '@fluentui/react-tooltip';\n\nexport type AvatarGroupPopoverSlots = {\n root: NonNullable<Slot<PopoverProps>>;\n\n /**\n * Button that triggers the Popover.\n */\n triggerButton: NonNullable<Slot<'button'>>;\n\n /**\n * List that contains the overflowed AvatarGroupItems.\n */\n content: NonNullable<Slot<'ul'>>;\n\n /**\n * PopoverSurface that contains the content.\n */\n popoverSurface: NonNullable<Slot<typeof PopoverSurface>>;\n\n /**\n * Tooltip shown when triggerButton is hovered.\n */\n tooltip: NonNullable<Slot<TooltipProps>>;\n};\n\n/**\n * AvatarGroupPopover Props\n */\nexport type AvatarGroupPopoverProps = Omit<ComponentProps<Partial<AvatarGroupPopoverSlots>>, 'children'> & {\n /**\n * Whether the triggerButton should render an icon instead of the number of overflowed AvatarGroupItems.\n * Note: The indicator will default to `icon` when the size is less than 24.\n * @default count\n */\n indicator?: 'count' | 'icon';\n\n /**\n * Number of AvatarGroupItems that will be rendered.\n *\n * Note: AvatarGroupPopover handles counting the number of children, but when using a react fragment to wrap the\n * children, this is not possible and therefore it has do be added manually.\n */\n count?: number;\n\n children: React.ReactNode;\n};\n\n/**\n * State used in rendering AvatarGroupPopover\n */\nexport type AvatarGroupPopoverState = ComponentState<AvatarGroupPopoverSlots> &\n Required<Pick<AvatarGroupPopoverProps, 'indicator'>> & {\n popoverOpen: boolean;\n layout: AvatarGroupProps['layout'];\n size: AvatarSizes;\n };\n"]}
1
+ {"version":3,"file":"AvatarGroupPopover.types.js","sourceRoot":"../src/","sources":["packages/react-components/react-avatar/src/components/AvatarGroupPopover/AvatarGroupPopover.types.ts"],"names":[],"mappings":"","sourcesContent":["import * as React from 'react';\nimport type { AvatarSizes } from '../Avatar/Avatar.types';\nimport type { AvatarGroupProps } from '../AvatarGroup/AvatarGroup.types';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { PopoverProps, PopoverSurface } from '@fluentui/react-popover';\nimport type { TooltipProps } from '@fluentui/react-tooltip';\n\nexport type AvatarGroupPopoverSlots = {\n root: NonNullable<Slot<PopoverProps>>;\n\n /**\n * Button that triggers the Popover.\n */\n triggerButton: NonNullable<Slot<'button'>>;\n\n /**\n * List that contains the overflowed AvatarGroupItems.\n */\n content: NonNullable<Slot<'ul'>>;\n\n /**\n * PopoverSurface that contains the content.\n */\n popoverSurface: NonNullable<Slot<typeof PopoverSurface>>;\n\n /**\n * Tooltip shown when triggerButton is hovered.\n */\n tooltip: NonNullable<Slot<TooltipProps>>;\n};\n\n/**\n * AvatarGroupPopover Props\n */\nexport type AvatarGroupPopoverProps = Omit<ComponentProps<Partial<AvatarGroupPopoverSlots>>, 'children'> & {\n /**\n * Whether the triggerButton should render an icon instead of the number of overflowed AvatarGroupItems.\n * Note: The indicator will default to `icon` when the size is less than 24.\n * @default count\n */\n indicator?: 'count' | 'icon';\n\n /**\n * Number of AvatarGroupItems that will be rendered.\n *\n * Note: AvatarGroupPopover handles counting the number of children, but when using a react fragment to wrap the\n * children, this is not possible and therefore it has do be added manually.\n */\n count?: number;\n\n children: React.ReactNode;\n};\n\n/**\n * State used in rendering AvatarGroupPopover\n */\nexport type AvatarGroupPopoverState = ComponentState<AvatarGroupPopoverSlots> &\n Required<Pick<AvatarGroupPopoverProps, 'count' | 'indicator'>> & {\n popoverOpen: boolean;\n layout: AvatarGroupProps['layout'];\n size: AvatarSizes;\n };\n"]}
@@ -49,9 +49,10 @@ export const useAvatarGroupPopover_unstable = props => {
49
49
  }
50
50
 
51
51
  return {
52
- popoverOpen,
53
- layout,
52
+ count,
54
53
  indicator,
54
+ layout,
55
+ popoverOpen,
55
56
  size,
56
57
  components: {
57
58
  root: Popover,
@@ -79,7 +80,7 @@ export const useAvatarGroupPopover_unstable = props => {
79
80
  content: resolveShorthand(props.content, {
80
81
  required: true,
81
82
  defaultProps: {
82
- children: children,
83
+ children,
83
84
  role: 'list'
84
85
  }
85
86
  }),
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-avat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D,QAAQ,EAAE,IAD2C;MAErD,YAAY,EAAE;QACZ,cAAc,UADF;QAEZ,QAAQ,EAAE;MAFE;IAFuC,CAAvB,CApC3B;IA2CL,OAAO,EAAE,gBAAgB,CAAC,KAAK,CAAC,OAAP,EAAgB;MACvC,QAAQ,EAAE,IAD6B;MAEvC,YAAY,EAAE;QACZ,OAAO,EAAE,mBADG;QAEZ,YAAY,EAAE;MAFF;IAFyB,CAAhB;EA3CpB,CAAP;AAmDD,CAjFM","sourcesContent":["import * as React from 'react';\nimport { useAvatarGroupContext_unstable } from '../../contexts/AvatarGroupContext';\nimport { defaultAvatarGroupSize } from '../AvatarGroup/useAvatarGroup';\nimport { resolveShorthand, useControllableState } from '@fluentui/react-utilities';\nimport { MoreHorizontalRegular } from '@fluentui/react-icons';\nimport { OnOpenChangeData, OpenPopoverEvents, Popover, PopoverSurface } from '@fluentui/react-popover';\nimport type { AvatarGroupPopoverProps, AvatarGroupPopoverState } from './AvatarGroupPopover.types';\nimport { Tooltip } from '@fluentui/react-tooltip';\n\n/**\n * Create the state required to render AvatarGroupPopover.\n *\n * The returned state can be modified with hooks such as useAvatarGroupPopoverStyles_unstable,\n * before being passed to renderAvatarGroupPopover_unstable.\n *\n * @param props - props from this instance of AvatarGroupPopover\n */\nexport const useAvatarGroupPopover_unstable = (props: AvatarGroupPopoverProps): AvatarGroupPopoverState => {\n const size = useAvatarGroupContext_unstable(ctx => ctx.size) ?? defaultAvatarGroupSize;\n const layout = useAvatarGroupContext_unstable(ctx => ctx.layout);\n const {\n indicator = size < 24 ? 'icon' : 'count',\n count = React.Children.count(props.children),\n children,\n ...restOfProps\n } = props;\n\n const [popoverOpen, setPopoverOpen] = useControllableState({\n state: props.open,\n defaultState: props.defaultOpen,\n initialState: false,\n });\n\n const handleOnPopoverChange = (e: OpenPopoverEvents, data: OnOpenChangeData) => {\n restOfProps.onOpenChange?.(e, data);\n setPopoverOpen(data.open);\n };\n\n let triggerButtonChildren;\n if (layout === 'pie') {\n triggerButtonChildren = null;\n } else if (indicator === 'icon') {\n triggerButtonChildren = <MoreHorizontalRegular />;\n } else {\n triggerButtonChildren = count > 99 ? '99+' : `+${count}`;\n }\n\n return {\n popoverOpen,\n layout,\n indicator,\n size,\n\n components: {\n root: Popover,\n triggerButton: 'button',\n content: 'ul',\n popoverSurface: PopoverSurface,\n tooltip: Tooltip,\n },\n root: {\n // Popover expects a child for its children. The children are added in the renderAvatarGroupPopover.\n children: <></>,\n size: 'small',\n trapFocus: true,\n ...restOfProps,\n open: popoverOpen,\n onOpenChange: handleOnPopoverChange,\n },\n triggerButton: resolveShorthand(props.triggerButton, {\n required: true,\n defaultProps: {\n children: triggerButtonChildren,\n type: 'button',\n },\n }),\n content: resolveShorthand(props.content, {\n required: true,\n defaultProps: {\n children: children,\n role: 'list',\n },\n }),\n popoverSurface: resolveShorthand(props.popoverSurface, {\n required: true,\n defaultProps: {\n 'aria-label': 'Overflow',\n tabIndex: 0,\n },\n }),\n tooltip: resolveShorthand(props.tooltip, {\n required: true,\n defaultProps: {\n content: 'View more people.',\n relationship: 'label',\n },\n }),\n };\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["packages/react-components/react-avatar/src/components/AvatarGroupPopover/useAvatarGroupPopover.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,8BAAT,QAA+C,mCAA/C;AACA,SAAS,sBAAT,QAAuC,+BAAvC;AACA,SAAS,gBAAT,EAA2B,oBAA3B,QAAuD,2BAAvD;AACA,SAAS,qBAAT,QAAsC,uBAAtC;AACA,SAA8C,OAA9C,EAAuD,cAAvD,QAA6E,yBAA7E;AAEA,SAAS,OAAT,QAAwB,yBAAxB;AAEA;;;;;;;AAOG;;AACH,OAAO,MAAM,8BAA8B,GAAI,KAAD,IAA4D;;;EACxG,MAAM,IAAI,GAAG,CAAA,EAAA,GAAA,8BAA8B,CAAC,GAAG,IAAI,GAAG,CAAC,IAAZ,CAA9B,MAA+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E,OADI;MAEV,aAAa,EAAE,QAFL;MAGV,OAAO,EAAE,IAHC;MAIV,cAAc,EAAE,cAJN;MAKV,OAAO,EAAE;IALC,CAPP;IAcL,IAAI,EAAE;MACJ;MACA,QAAQ,eAAE,KAAA,CAAA,aAAA,CAAA,KAAA,CAAA,QAAA,EAAA,IAAA,CAFN;MAGJ,IAAI,EAAE,OAHF;MAIJ,SAAS,EAAE,IAJP;MAKJ,GAAG,WALC;MAMJ,IAAI,EAAE,WANF;MAOJ,YAAY,EAAE;IAPV,CAdD;IAuBL,aAAa,EAAE,gBAAgB,CAAC,KAAK,CAAC,aAAP,EAAsB;MACnD,QAAQ,EAAE,IADyC;MAEnD,YAAY,EAAE;QACZ,QAAQ,EAAE,qBADE;QAEZ,IAAI,EAAE;MAFM;IAFqC,CAAtB,CAvB1B;IA8BL,OAAO,EAAE,gBAAgB,CAAC,KAAK,CAAC,OAAP,EAAgB;MACvC,QAAQ,EAAE,IAD6B;MAEvC,YAAY,EAAE;QACZ,QADY;QAEZ,IAAI,EAAE;MAFM;IAFyB,CAAhB,CA9BpB;IAqCL,cAAc,EAAE,gBAAgB,CAAC,KAAK,CAAC,cAAP,EAAuB;MACrD,QAAQ,EAAE,IAD2C;MAErD,YAAY,EAAE;QACZ,cAAc,UADF;QAEZ,QAAQ,EAAE;MAFE;IAFuC,CAAvB,CArC3B;IA4CL,OAAO,EAAE,gBAAgB,CAAC,KAAK,CAAC,OAAP,EAAgB;MACvC,QAAQ,EAAE,IAD6B;MAEvC,YAAY,EAAE;QACZ,OAAO,EAAE,mBADG;QAEZ,YAAY,EAAE;MAFF;IAFyB,CAAhB;EA5CpB,CAAP;AAoDD,CAlFM","sourcesContent":["import * as React from 'react';\nimport { useAvatarGroupContext_unstable } from '../../contexts/AvatarGroupContext';\nimport { defaultAvatarGroupSize } from '../AvatarGroup/useAvatarGroup';\nimport { resolveShorthand, useControllableState } from '@fluentui/react-utilities';\nimport { MoreHorizontalRegular } from '@fluentui/react-icons';\nimport { OnOpenChangeData, OpenPopoverEvents, Popover, PopoverSurface } from '@fluentui/react-popover';\nimport type { AvatarGroupPopoverProps, AvatarGroupPopoverState } from './AvatarGroupPopover.types';\nimport { Tooltip } from '@fluentui/react-tooltip';\n\n/**\n * Create the state required to render AvatarGroupPopover.\n *\n * The returned state can be modified with hooks such as useAvatarGroupPopoverStyles_unstable,\n * before being passed to renderAvatarGroupPopover_unstable.\n *\n * @param props - props from this instance of AvatarGroupPopover\n */\nexport const useAvatarGroupPopover_unstable = (props: AvatarGroupPopoverProps): AvatarGroupPopoverState => {\n const size = useAvatarGroupContext_unstable(ctx => ctx.size) ?? defaultAvatarGroupSize;\n const layout = useAvatarGroupContext_unstable(ctx => ctx.layout);\n const {\n indicator = size < 24 ? 'icon' : 'count',\n count = React.Children.count(props.children),\n children,\n ...restOfProps\n } = props;\n\n const [popoverOpen, setPopoverOpen] = useControllableState({\n state: props.open,\n defaultState: props.defaultOpen,\n initialState: false,\n });\n\n const handleOnPopoverChange = (e: OpenPopoverEvents, data: OnOpenChangeData) => {\n restOfProps.onOpenChange?.(e, data);\n setPopoverOpen(data.open);\n };\n\n let triggerButtonChildren;\n if (layout === 'pie') {\n triggerButtonChildren = null;\n } else if (indicator === 'icon') {\n triggerButtonChildren = <MoreHorizontalRegular />;\n } else {\n triggerButtonChildren = count > 99 ? '99+' : `+${count}`;\n }\n\n return {\n count,\n indicator,\n layout,\n popoverOpen,\n size,\n\n components: {\n root: Popover,\n triggerButton: 'button',\n content: 'ul',\n popoverSurface: PopoverSurface,\n tooltip: Tooltip,\n },\n root: {\n // Popover expects a child for its children. The children are added in the renderAvatarGroupPopover.\n children: <></>,\n size: 'small',\n trapFocus: true,\n ...restOfProps,\n open: popoverOpen,\n onOpenChange: handleOnPopoverChange,\n },\n triggerButton: resolveShorthand(props.triggerButton, {\n required: true,\n defaultProps: {\n children: triggerButtonChildren,\n type: 'button',\n },\n }),\n content: resolveShorthand(props.content, {\n required: true,\n defaultProps: {\n children,\n role: 'list',\n },\n }),\n popoverSurface: resolveShorthand(props.popoverSurface, {\n required: true,\n defaultProps: {\n 'aria-label': 'Overflow',\n tabIndex: 0,\n },\n }),\n tooltip: resolveShorthand(props.tooltip, {\n required: true,\n defaultProps: {\n content: 'View more people.',\n relationship: 'label',\n },\n }),\n };\n};\n"],"sourceRoot":"../src/"}
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-avatar/src/index.ts"],"names":[],"mappings":"AAAA,SACE,MADF,EAEE,gBAFF,EAGE,qBAHF,EAIE,wBAJF,EAKE,kBALF,QAMO,UANP;AAQA,SAAS,WAAT,EAAsB,yBAAtB,QAAuD,eAAvD;AAEA,SACE,WADF,EAEE,qBAFF,EAGE,0BAHF,EAIE,2BAJF,EAKE,6BALF,EAME,uBANF,QAOO,eAPP;AAeA,SACE,eADF,EAEE,yBAFF,EAGE,8BAHF,EAIE,iCAJF,EAKE,2BALF,QAMO,mBANP;AAQA,SACE,kBADF,EAEE,4BAFF,EAGE,iCAHF,EAIE,oCAJF,EAKE,8BALF,QAMO,sBANP;AAQA,SACE,mBADF,EAEE,8BAFF,EAGE,qBAHF,EAIE,gBAJF,QAKO,kBALP","sourcesContent":["export {\n Avatar,\n avatarClassNames,\n renderAvatar_unstable,\n useAvatarStyles_unstable,\n useAvatar_unstable,\n} from './Avatar';\nexport type { AvatarNamedColor, AvatarProps, AvatarSlots, AvatarState, AvatarSizes } from './Avatar';\nexport { getInitials, partitionAvatarGroupItems } from './utils/index';\nexport type { PartitionAvatarGroupItemsOptions } from './utils/index';\nexport {\n AvatarGroup,\n avatarGroupClassNames,\n renderAvatarGroup_unstable,\n useAvatarGroupContextValues,\n useAvatarGroupStyles_unstable,\n useAvatarGroup_unstable,\n} from './AvatarGroup';\nexport type {\n AvatarGroupProps,\n AvatarGroupSlots,\n AvatarGroupState,\n AvatarGroupContextValue,\n AvatarGroupContextValues,\n} from './AvatarGroup';\nexport {\n AvatarGroupItem,\n avatarGroupItemClassNames,\n renderAvatarGroupItem_unstable,\n useAvatarGroupItemStyles_unstable,\n useAvatarGroupItem_unstable,\n} from './AvatarGroupItem';\nexport type { AvatarGroupItemProps, AvatarGroupItemSlots, AvatarGroupItemState } from './AvatarGroupItem';\nexport {\n AvatarGroupPopover,\n avatarGroupPopoverClassNames,\n renderAvatarGroupPopover_unstable,\n useAvatarGroupPopoverStyles_unstable,\n useAvatarGroupPopover_unstable,\n} from './AvatarGroupPopover';\nexport type { AvatarGroupPopoverProps, AvatarGroupPopoverSlots, AvatarGroupPopoverState } from './AvatarGroupPopover';\nexport {\n AvatarGroupProvider,\n useAvatarGroupContext_unstable,\n AvatarContextProvider,\n useAvatarContext,\n} from './contexts/index';\nexport type { AvatarContextValue } from './contexts/index';\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["packages/react-components/react-avatar/src/index.ts"],"names":[],"mappings":"AAAA,SACE,MADF,EAEE,gBAFF,EAGE,qBAHF,EAIE,wBAJF,EAKE,kBALF,QAMO,UANP;AAQA,SAAS,WAAT,EAAsB,yBAAtB,QAAuD,eAAvD;AAEA,SACE,WADF,EAEE,qBAFF,EAGE,0BAHF,EAIE,2BAJF,EAKE,6BALF,EAME,uBANF,QAOO,eAPP;AAeA,SACE,eADF,EAEE,yBAFF,EAGE,8BAHF,EAIE,iCAJF,EAKE,2BALF,QAMO,mBANP;AAQA,SACE,kBADF,EAEE,4BAFF,EAGE,iCAHF,EAIE,oCAJF,EAKE,8BALF,QAMO,sBANP;AAQA,SACE,mBADF,EAEE,8BAFF,EAGE,qBAHF,EAIE,gBAJF,QAKO,kBALP","sourcesContent":["export {\n Avatar,\n avatarClassNames,\n renderAvatar_unstable,\n useAvatarStyles_unstable,\n useAvatar_unstable,\n} from './Avatar';\nexport type { AvatarNamedColor, AvatarProps, AvatarSlots, AvatarState, AvatarSizes } from './Avatar';\nexport { getInitials, partitionAvatarGroupItems } from './utils/index';\nexport type { PartitionAvatarGroupItems, PartitionAvatarGroupItemsOptions } from './utils/index';\nexport {\n AvatarGroup,\n avatarGroupClassNames,\n renderAvatarGroup_unstable,\n useAvatarGroupContextValues,\n useAvatarGroupStyles_unstable,\n useAvatarGroup_unstable,\n} from './AvatarGroup';\nexport type {\n AvatarGroupProps,\n AvatarGroupSlots,\n AvatarGroupState,\n AvatarGroupContextValue,\n AvatarGroupContextValues,\n} from './AvatarGroup';\nexport {\n AvatarGroupItem,\n avatarGroupItemClassNames,\n renderAvatarGroupItem_unstable,\n useAvatarGroupItemStyles_unstable,\n useAvatarGroupItem_unstable,\n} from './AvatarGroupItem';\nexport type { AvatarGroupItemProps, AvatarGroupItemSlots, AvatarGroupItemState } from './AvatarGroupItem';\nexport {\n AvatarGroupPopover,\n avatarGroupPopoverClassNames,\n renderAvatarGroupPopover_unstable,\n useAvatarGroupPopoverStyles_unstable,\n useAvatarGroupPopover_unstable,\n} from './AvatarGroupPopover';\nexport type { AvatarGroupPopoverProps, AvatarGroupPopoverSlots, AvatarGroupPopoverState } from './AvatarGroupPopover';\nexport {\n AvatarGroupProvider,\n useAvatarGroupContext_unstable,\n AvatarContextProvider,\n useAvatarContext,\n} from './contexts/index';\nexport type { AvatarContextValue } from './contexts/index';\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["packages/react-components/react-avatar/src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC","sourcesContent":["export { getInitials } from './getInitials';\nexport { partitionAvatarGroupItems } from './partitionAvatarGroupItems';\nexport type { PartitionAvatarGroupItemsOptions } from './partitionAvatarGroupItems';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["packages/react-components/react-avatar/src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC","sourcesContent":["export { getInitials } from './getInitials';\nexport { partitionAvatarGroupItems } from './partitionAvatarGroupItems';\nexport type { PartitionAvatarGroupItems, PartitionAvatarGroupItemsOptions } from './partitionAvatarGroupItems';\n"]}
@@ -16,15 +16,16 @@ export const partitionAvatarGroupItems = options => {
16
16
  if (isPie) {
17
17
  return {
18
18
  inlineItems: items.slice(0, 3),
19
- overflowItems: items
19
+ overflowItems: items.length > 0 ? items : undefined
20
20
  };
21
21
  }
22
22
 
23
23
  const maxInlineItems = (_a = options.maxInlineItems) !== null && _a !== void 0 ? _a : 5;
24
24
  const inlineCount = -(maxInlineItems - (items.length > maxInlineItems ? 1 : 0));
25
+ const overflowItems = items.slice(0, inlineCount);
25
26
  return {
26
27
  inlineItems: items.slice(inlineCount),
27
- overflowItems: items.slice(0, inlineCount)
28
+ overflowItems: overflowItems.length > 0 ? overflowItems : undefined
28
29
  };
29
30
  };
30
31
  //# sourceMappingURL=partitionAvatarGroupItems.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-avatar/src/utils/partitionAvatarGroupItems.ts"],"names":[],"mappings":"AAMA;;;;;;AAMG;AACH,OAAO,MAAM,yBAAyB,GAAO,OAAJ,IAAoD;;;EAC3F,MAAM;IAAE;EAAF,IAAY,OAAlB;EACA,MAAM,KAAK,GAAG,OAAO,CAAC,MAAR,KAAmB,KAAjC;;EAEA,IAAI,KAAJ,EAAW;IACT,OAAO;MACL,WAAW,EAAE,KAAK,CAAC,KAAN,CAAY,CAAZ,EAAe,CAAf,CADR;MAEL,aAAa,EAAE;IAFV,CAAP;EAID;;EAED,MAAM,cAAc,GAAG,CAAA,EAAA,GAAA,OAAO,CAAC,cAAR,MAAsB,IAAtB,IAAsB,EAAA,KAAA,KAAA,CAAtB,GAAsB,EAAtB,GAA0B,CAAjD;EACA,MAAM,WAAW,GAAG,EAAE,cAAc,IAAI,KAAK,CAAC,MAAN,GAAe,cAAf,GAAgC,CAAhC,GAAoC,CAAxC,CAAhB,CAApB;EAEA,OAAO;IACL,WAAW,EAAE,KAAK,CAAC,KAAN,CAAY,WAAZ,CADR;IAEL,aAAa,EAAE,KAAK,CAAC,KAAN,CAAY,CAAZ,EAAe,WAAf;EAFV,CAAP;AAID,CAlBM","sourcesContent":["export type PartitionAvatarGroupItemsOptions<T> = {\n items: readonly T[];\n layout?: 'spread' | 'stack' | 'pie';\n maxInlineItems?: number;\n};\n\n/**\n * Get the inline items and overflowing items based on the array of AvatarGroupItems needed for AvatarGroup.\n *\n * @param options - Configure the partition options\n *\n * @returns Two arrays split into inline items and overflow items based on maxInlineItems.\n */\nexport const partitionAvatarGroupItems = <T>(options: PartitionAvatarGroupItemsOptions<T>) => {\n const { items } = options;\n const isPie = options.layout === 'pie';\n\n if (isPie) {\n return {\n inlineItems: items.slice(0, 3),\n overflowItems: items,\n };\n }\n\n const maxInlineItems = options.maxInlineItems ?? 5;\n const inlineCount = -(maxInlineItems - (items.length > maxInlineItems ? 1 : 0));\n\n return {\n inlineItems: items.slice(inlineCount),\n overflowItems: items.slice(0, inlineCount),\n };\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["packages/react-components/react-avatar/src/utils/partitionAvatarGroupItems.ts"],"names":[],"mappings":"AAWA;;;;;;AAMG;AACH,OAAO,MAAM,yBAAyB,GACpC,OADuC,IAEP;;;EAChC,MAAM;IAAE;EAAF,IAAY,OAAlB;EACA,MAAM,KAAK,GAAG,OAAO,CAAC,MAAR,KAAmB,KAAjC;;EAEA,IAAI,KAAJ,EAAW;IACT,OAAO;MACL,WAAW,EAAE,KAAK,CAAC,KAAN,CAAY,CAAZ,EAAe,CAAf,CADR;MAEL,aAAa,EAAE,KAAK,CAAC,MAAN,GAAe,CAAf,GAAmB,KAAnB,GAA2B;IAFrC,CAAP;EAID;;EAED,MAAM,cAAc,GAAG,CAAA,EAAA,GAAA,OAAO,CAAC,cAAR,MAAsB,IAAtB,IAAsB,EAAA,KAAA,KAAA,CAAtB,GAAsB,EAAtB,GAA0B,CAAjD;EACA,MAAM,WAAW,GAAG,EAAE,cAAc,IAAI,KAAK,CAAC,MAAN,GAAe,cAAf,GAAgC,CAAhC,GAAoC,CAAxC,CAAhB,CAApB;EACA,MAAM,aAAa,GAAG,KAAK,CAAC,KAAN,CAAY,CAAZ,EAAe,WAAf,CAAtB;EAEA,OAAO;IACL,WAAW,EAAE,KAAK,CAAC,KAAN,CAAY,WAAZ,CADR;IAEL,aAAa,EAAE,aAAa,CAAC,MAAd,GAAuB,CAAvB,GAA2B,aAA3B,GAA2C;EAFrD,CAAP;AAID,CArBM","sourcesContent":["export type PartitionAvatarGroupItemsOptions<T> = {\n items: readonly T[];\n layout?: 'spread' | 'stack' | 'pie';\n maxInlineItems?: number;\n};\n\nexport type PartitionAvatarGroupItems<T> = {\n inlineItems: readonly T[];\n overflowItems?: readonly T[];\n};\n\n/**\n * Get the inline items and overflowing items based on the array of AvatarGroupItems needed for AvatarGroup.\n *\n * @param options - Configure the partition options\n *\n * @returns Two arrays split into inline items and overflow items based on maxInlineItems.\n */\nexport const partitionAvatarGroupItems = <T>(\n options: PartitionAvatarGroupItemsOptions<T>,\n): PartitionAvatarGroupItems<T> => {\n const { items } = options;\n const isPie = options.layout === 'pie';\n\n if (isPie) {\n return {\n inlineItems: items.slice(0, 3),\n overflowItems: items.length > 0 ? items : undefined,\n };\n }\n\n const maxInlineItems = options.maxInlineItems ?? 5;\n const inlineCount = -(maxInlineItems - (items.length > maxInlineItems ? 1 : 0));\n const overflowItems = items.slice(0, inlineCount);\n\n return {\n inlineItems: items.slice(inlineCount),\n overflowItems: overflowItems.length > 0 ? overflowItems : undefined,\n };\n};\n"],"sourceRoot":"../src/"}
@@ -63,9 +63,10 @@ const useAvatarGroupPopover_unstable = props => {
63
63
  }
64
64
 
65
65
  return {
66
- popoverOpen,
67
- layout,
66
+ count,
68
67
  indicator,
68
+ layout,
69
+ popoverOpen,
69
70
  size,
70
71
  components: {
71
72
  root: react_popover_1.Popover,
@@ -93,7 +94,7 @@ const useAvatarGroupPopover_unstable = props => {
93
94
  content: react_utilities_1.resolveShorthand(props.content, {
94
95
  required: true,
95
96
  defaultProps: {
96
- children: children,
97
+ children,
97
98
  role: 'list'
98
99
  }
99
100
  }),
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-avatar/src/components/AvatarGroupPopover/useAvatarGroupPopover.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,oBAAA,gBAAA,OAAA,CAAA,mCAAA,CAAA;;AACA,MAAA,gBAAA,gBAAA,OAAA,CAAA,+BAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AACA,MAAA,eAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;;AAEA,MAAA,eAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;AAEA;;;;;;;AAOG;;;AACI,MAAM,8BAA8B,GAAI,KAAD,IAA4D;;;EACxG,MAAM,IAAI,GAAG,CAAA,EAAA,GAAA,oBAAA,CAAA,8BAAA,CAA+B,GAAG,IAAI,GAAG,CAAC,IAA1C,CAAA,MAA+C,IAA/C,IAA+C,EAAA,KAAA,KAAA,CAA/C,GAA+C,EAA/C,GAAmD,gBAAA,CAAA,sBAAhE;EACA,MAAM,MAAM,GAAG,oBAAA,CAAA,8BAAA,CAA+B,GAAG,IAAI,GAAG,CAAC,MAA1C,CAAf;EACA,MAAM;IACJ,SAAS,GAAG,IAAI,GAAG,EAAP,GAAY,MAAZ,GAAqB,OAD7B;IAEJ,KAAK,GAAG,KAAK,CAAC,QAAN,CAAe,KAAf,CAAqB,KAAK,CAAC,QAA3B,CAFJ;IAGJ,QAHI;IAIJ,GAAG;EAJC,IAKF,KALJ;EAOA,MAAM,CAAC,WAAD,EAAc,cAAd,IAAgC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a,EAAE,iBAAA,CAAA,gBAAA,CAAiB,KAAK,CAAC,aAAvB,EAAsC;MACnD,QAAQ,EAAE,IADyC;MAEnD,YAAY,EAAE;QACZ,QAAQ,EAAE,qBADE;QAEZ,IAAI,EAAE;MAFM;IAFqC,CAAtC,CAtBV;IA6BL,OAAO,EAAE,iBAAA,CAAA,gBAAA,CAAiB,KAAK,CAAC,OAAvB,EAAgC;MACvC,QAAQ,EAAE,IAD6B;MAEvC,YAAY,EAAE;QACZ,QAAQ,EAAE,QADE;QAEZ,IAAI,EAAE;MAFM;IAFyB,CAAhC,CA7BJ;IAoCL,cAAc,EAAE,iBAAA,CAAA,gBAAA,CAAiB,KAAK,CAAC,cAAvB,EAAuC;MACrD,QAAQ,EAAE,IAD2C;MAErD,YAAY,EAAE;QACZ,cAAc,UADF;QAEZ,QAAQ,EAAE;MAFE;IAFuC,CAAvC,CApCX;IA2CL,OAAO,EAAE,iBAAA,CAAA,gBAAA,CAAiB,KAAK,CAAC,OAAvB,EAAgC;MACvC,QAAQ,EAAE,IAD6B;MAEvC,YAAY,EAAE;QACZ,OAAO,EAAE,mBADG;QAEZ,YAAY,EAAE;MAFF;IAFyB,CAAhC;EA3CJ,CAAP;AAmDD,CAjFM;;AAAM,OAAA,CAAA,8BAAA,GAA8B,8BAA9B","sourcesContent":["import * as React from 'react';\nimport { useAvatarGroupContext_unstable } from '../../contexts/AvatarGroupContext';\nimport { defaultAvatarGroupSize } from '../AvatarGroup/useAvatarGroup';\nimport { resolveShorthand, useControllableState } from '@fluentui/react-utilities';\nimport { MoreHorizontalRegular } from '@fluentui/react-icons';\nimport { OnOpenChangeData, OpenPopoverEvents, Popover, PopoverSurface } from '@fluentui/react-popover';\nimport type { AvatarGroupPopoverProps, AvatarGroupPopoverState } from './AvatarGroupPopover.types';\nimport { Tooltip } from '@fluentui/react-tooltip';\n\n/**\n * Create the state required to render AvatarGroupPopover.\n *\n * The returned state can be modified with hooks such as useAvatarGroupPopoverStyles_unstable,\n * before being passed to renderAvatarGroupPopover_unstable.\n *\n * @param props - props from this instance of AvatarGroupPopover\n */\nexport const useAvatarGroupPopover_unstable = (props: AvatarGroupPopoverProps): AvatarGroupPopoverState => {\n const size = useAvatarGroupContext_unstable(ctx => ctx.size) ?? defaultAvatarGroupSize;\n const layout = useAvatarGroupContext_unstable(ctx => ctx.layout);\n const {\n indicator = size < 24 ? 'icon' : 'count',\n count = React.Children.count(props.children),\n children,\n ...restOfProps\n } = props;\n\n const [popoverOpen, setPopoverOpen] = useControllableState({\n state: props.open,\n defaultState: props.defaultOpen,\n initialState: false,\n });\n\n const handleOnPopoverChange = (e: OpenPopoverEvents, data: OnOpenChangeData) => {\n restOfProps.onOpenChange?.(e, data);\n setPopoverOpen(data.open);\n };\n\n let triggerButtonChildren;\n if (layout === 'pie') {\n triggerButtonChildren = null;\n } else if (indicator === 'icon') {\n triggerButtonChildren = <MoreHorizontalRegular />;\n } else {\n triggerButtonChildren = count > 99 ? '99+' : `+${count}`;\n }\n\n return {\n popoverOpen,\n layout,\n indicator,\n size,\n\n components: {\n root: Popover,\n triggerButton: 'button',\n content: 'ul',\n popoverSurface: PopoverSurface,\n tooltip: Tooltip,\n },\n root: {\n // Popover expects a child for its children. The children are added in the renderAvatarGroupPopover.\n children: <></>,\n size: 'small',\n trapFocus: true,\n ...restOfProps,\n open: popoverOpen,\n onOpenChange: handleOnPopoverChange,\n },\n triggerButton: resolveShorthand(props.triggerButton, {\n required: true,\n defaultProps: {\n children: triggerButtonChildren,\n type: 'button',\n },\n }),\n content: resolveShorthand(props.content, {\n required: true,\n defaultProps: {\n children: children,\n role: 'list',\n },\n }),\n popoverSurface: resolveShorthand(props.popoverSurface, {\n required: true,\n defaultProps: {\n 'aria-label': 'Overflow',\n tabIndex: 0,\n },\n }),\n tooltip: resolveShorthand(props.tooltip, {\n required: true,\n defaultProps: {\n content: 'View more people.',\n relationship: 'label',\n },\n }),\n };\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["packages/react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BAAA,CAAA,gBAAA,CAAiB,KAAK,CAAC,OAAvB,EAAgC;MACvC,QAAQ,EAAE,IAD6B;MAEvC,YAAY,EAAE;QACZ,QADY;QAEZ,IAAI,EAAE;MAFM;IAFyB,CAAhC,CA9BJ;IAqCL,cAAc,EAAE,iBAAA,CAAA,gBAAA,CAAiB,KAAK,CAAC,cAAvB,EAAuC;MACrD,QAAQ,EAAE,IAD2C;MAErD,YAAY,EAAE;QACZ,cAAc,UADF;QAEZ,QAAQ,EAAE;MAFE;IAFuC,CAAvC,CArCX;IA4CL,OAAO,EAAE,iBAAA,CAAA,gBAAA,CAAiB,KAAK,CAAC,OAAvB,EAAgC;MACvC,QAAQ,EAAE,IAD6B;MAEvC,YAAY,EAAE;QACZ,OAAO,EAAE,mBADG;QAEZ,YAAY,EAAE;MAFF;IAFyB,CAAhC;EA5CJ,CAAP;AAoDD,CAlFM;;AAAM,OAAA,CAAA,8BAAA,GAA8B,8BAA9B","sourcesContent":["import * as React from 'react';\nimport { useAvatarGroupContext_unstable } from '../../contexts/AvatarGroupContext';\nimport { defaultAvatarGroupSize } from '../AvatarGroup/useAvatarGroup';\nimport { resolveShorthand, useControllableState } from '@fluentui/react-utilities';\nimport { MoreHorizontalRegular } from '@fluentui/react-icons';\nimport { OnOpenChangeData, OpenPopoverEvents, Popover, PopoverSurface } from '@fluentui/react-popover';\nimport type { AvatarGroupPopoverProps, AvatarGroupPopoverState } from './AvatarGroupPopover.types';\nimport { Tooltip } from '@fluentui/react-tooltip';\n\n/**\n * Create the state required to render AvatarGroupPopover.\n *\n * The returned state can be modified with hooks such as useAvatarGroupPopoverStyles_unstable,\n * before being passed to renderAvatarGroupPopover_unstable.\n *\n * @param props - props from this instance of AvatarGroupPopover\n */\nexport const useAvatarGroupPopover_unstable = (props: AvatarGroupPopoverProps): AvatarGroupPopoverState => {\n const size = useAvatarGroupContext_unstable(ctx => ctx.size) ?? defaultAvatarGroupSize;\n const layout = useAvatarGroupContext_unstable(ctx => ctx.layout);\n const {\n indicator = size < 24 ? 'icon' : 'count',\n count = React.Children.count(props.children),\n children,\n ...restOfProps\n } = props;\n\n const [popoverOpen, setPopoverOpen] = useControllableState({\n state: props.open,\n defaultState: props.defaultOpen,\n initialState: false,\n });\n\n const handleOnPopoverChange = (e: OpenPopoverEvents, data: OnOpenChangeData) => {\n restOfProps.onOpenChange?.(e, data);\n setPopoverOpen(data.open);\n };\n\n let triggerButtonChildren;\n if (layout === 'pie') {\n triggerButtonChildren = null;\n } else if (indicator === 'icon') {\n triggerButtonChildren = <MoreHorizontalRegular />;\n } else {\n triggerButtonChildren = count > 99 ? '99+' : `+${count}`;\n }\n\n return {\n count,\n indicator,\n layout,\n popoverOpen,\n size,\n\n components: {\n root: Popover,\n triggerButton: 'button',\n content: 'ul',\n popoverSurface: PopoverSurface,\n tooltip: Tooltip,\n },\n root: {\n // Popover expects a child for its children. The children are added in the renderAvatarGroupPopover.\n children: <></>,\n size: 'small',\n trapFocus: true,\n ...restOfProps,\n open: popoverOpen,\n onOpenChange: handleOnPopoverChange,\n },\n triggerButton: resolveShorthand(props.triggerButton, {\n required: true,\n defaultProps: {\n children: triggerButtonChildren,\n type: 'button',\n },\n }),\n content: resolveShorthand(props.content, {\n required: true,\n defaultProps: {\n children,\n role: 'list',\n },\n }),\n popoverSurface: resolveShorthand(props.popoverSurface, {\n required: true,\n defaultProps: {\n 'aria-label': 'Overflow',\n tabIndex: 0,\n },\n }),\n tooltip: resolveShorthand(props.tooltip, {\n required: true,\n defaultProps: {\n content: 'View more people.',\n relationship: 'label',\n },\n }),\n };\n};\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-avatar/src/index.ts"],"names":[],"mappings":";;;;;;;AAAA,IAAA,QAAA,gBAAA,OAAA,CAAA,UAAA,CAAA;;AACE,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,QAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA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E,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,qBAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,OAAA,CAAA,mBAAA;EAAmB;AAAnB,CAAA;AACA,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,gCAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,OAAA,CAAA,8BAAA;EAA8B;AAA9B,CAAA;AACA,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,uBAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,OAAA,CAAA,qBAAA;EAAqB;AAArB,CAAA;AACA,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,kBAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,OAAA,CAAA,gBAAA;EAAgB;AAAhB,CAAA","sourcesContent":["export {\n Avatar,\n avatarClassNames,\n renderAvatar_unstable,\n useAvatarStyles_unstable,\n useAvatar_unstable,\n} from './Avatar';\nexport type { AvatarNamedColor, AvatarProps, AvatarSlots, AvatarState, AvatarSizes } from './Avatar';\nexport { getInitials, partitionAvatarGroupItems } from './utils/index';\nexport type { PartitionAvatarGroupItemsOptions } from './utils/index';\nexport {\n AvatarGroup,\n avatarGroupClassNames,\n renderAvatarGroup_unstable,\n useAvatarGroupContextValues,\n useAvatarGroupStyles_unstable,\n useAvatarGroup_unstable,\n} from './AvatarGroup';\nexport type {\n AvatarGroupProps,\n AvatarGroupSlots,\n AvatarGroupState,\n AvatarGroupContextValue,\n AvatarGroupContextValues,\n} from './AvatarGroup';\nexport {\n AvatarGroupItem,\n avatarGroupItemClassNames,\n renderAvatarGroupItem_unstable,\n useAvatarGroupItemStyles_unstable,\n useAvatarGroupItem_unstable,\n} from './AvatarGroupItem';\nexport type { AvatarGroupItemProps, AvatarGroupItemSlots, AvatarGroupItemState } from './AvatarGroupItem';\nexport {\n AvatarGroupPopover,\n avatarGroupPopoverClassNames,\n renderAvatarGroupPopover_unstable,\n useAvatarGroupPopoverStyles_unstable,\n useAvatarGroupPopover_unstable,\n} from './AvatarGroupPopover';\nexport type { AvatarGroupPopoverProps, AvatarGroupPopoverSlots, AvatarGroupPopoverState } from './AvatarGroupPopover';\nexport {\n AvatarGroupProvider,\n useAvatarGroupContext_unstable,\n AvatarContextProvider,\n useAvatarContext,\n} from './contexts/index';\nexport type { AvatarContextValue } from './contexts/index';\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["packages/react-components/react-avatar/src/index.ts"],"names":[],"mappings":";;;;;;;AAAA,IAAA,QAAA,gBAAA,OAAA,CAAA,UAAA,CAAA;;AACE,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,QAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,QAAA,CAAA,MAAA;EAAM;AAAN,CAAA;AACA,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,kBAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,QAAA,CAAA,gBAAA;EAAgB;AAAhB,CAAA;AACA,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,uBAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,QAAA,CAAA,qBAAA;EAAqB;AAArB,CAAA;AACA,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,0BAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,QAAA,CAAA,wBAAA;EAAwB;AAAxB,CAAA;AACA,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,oBAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,QAAA,CAAA,kBAAA;EAAkB;AAAlB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vatar_unstable,\n useAvatarStyles_unstable,\n useAvatar_unstable,\n} from './Avatar';\nexport type { AvatarNamedColor, AvatarProps, AvatarSlots, AvatarState, AvatarSizes } from './Avatar';\nexport { getInitials, partitionAvatarGroupItems } from './utils/index';\nexport type { PartitionAvatarGroupItems, PartitionAvatarGroupItemsOptions } from './utils/index';\nexport {\n AvatarGroup,\n avatarGroupClassNames,\n renderAvatarGroup_unstable,\n useAvatarGroupContextValues,\n useAvatarGroupStyles_unstable,\n useAvatarGroup_unstable,\n} from './AvatarGroup';\nexport type {\n AvatarGroupProps,\n AvatarGroupSlots,\n AvatarGroupState,\n AvatarGroupContextValue,\n AvatarGroupContextValues,\n} from './AvatarGroup';\nexport {\n AvatarGroupItem,\n avatarGroupItemClassNames,\n renderAvatarGroupItem_unstable,\n useAvatarGroupItemStyles_unstable,\n useAvatarGroupItem_unstable,\n} from './AvatarGroupItem';\nexport type { AvatarGroupItemProps, AvatarGroupItemSlots, AvatarGroupItemState } from './AvatarGroupItem';\nexport {\n AvatarGroupPopover,\n avatarGroupPopoverClassNames,\n renderAvatarGroupPopover_unstable,\n useAvatarGroupPopoverStyles_unstable,\n useAvatarGroupPopover_unstable,\n} from './AvatarGroupPopover';\nexport type { AvatarGroupPopoverProps, AvatarGroupPopoverSlots, AvatarGroupPopoverState } from './AvatarGroupPopover';\nexport {\n AvatarGroupProvider,\n useAvatarGroupContext_unstable,\n AvatarContextProvider,\n useAvatarContext,\n} from './contexts/index';\nexport type { AvatarContextValue } from './contexts/index';\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-avatar/src/utils/index.ts"],"names":[],"mappings":";;;;;;;AAAA,IAAA,aAAA,gBAAA,OAAA,CAAA,eAAA,CAAA;;AAAS,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,aAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,aAAA,CAAA,WAAA;EAAW;AAAX,CAAA;;AACT,IAAA,2BAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;;AAAS,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,2BAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,2BAAA,CAAA,yBAAA;EAAyB;AAAzB,CAAA","sourcesContent":["export { getInitials } from './getInitials';\nexport { partitionAvatarGroupItems } from './partitionAvatarGroupItems';\nexport type { PartitionAvatarGroupItemsOptions } from './partitionAvatarGroupItems';\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["packages/react-components/react-avatar/src/utils/index.ts"],"names":[],"mappings":";;;;;;;AAAA,IAAA,aAAA,gBAAA,OAAA,CAAA,eAAA,CAAA;;AAAS,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,aAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,aAAA,CAAA,WAAA;EAAW;AAAX,CAAA;;AACT,IAAA,2BAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;;AAAS,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,2BAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,2BAAA,CAAA,yBAAA;EAAyB;AAAzB,CAAA","sourcesContent":["export { getInitials } from './getInitials';\nexport { partitionAvatarGroupItems } from './partitionAvatarGroupItems';\nexport type { PartitionAvatarGroupItems, PartitionAvatarGroupItemsOptions } from './partitionAvatarGroupItems';\n"],"sourceRoot":"../src/"}
@@ -23,15 +23,16 @@ const partitionAvatarGroupItems = options => {
23
23
  if (isPie) {
24
24
  return {
25
25
  inlineItems: items.slice(0, 3),
26
- overflowItems: items
26
+ overflowItems: items.length > 0 ? items : undefined
27
27
  };
28
28
  }
29
29
 
30
30
  const maxInlineItems = (_a = options.maxInlineItems) !== null && _a !== void 0 ? _a : 5;
31
31
  const inlineCount = -(maxInlineItems - (items.length > maxInlineItems ? 1 : 0));
32
+ const overflowItems = items.slice(0, inlineCount);
32
33
  return {
33
34
  inlineItems: items.slice(inlineCount),
34
- overflowItems: items.slice(0, inlineCount)
35
+ overflowItems: overflowItems.length > 0 ? overflowItems : undefined
35
36
  };
36
37
  };
37
38
 
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-avatar/src/utils/partitionAvatarGroupItems.ts"],"names":[],"mappings":";;;;;;AAMA;;;;;;AAMG;;AACI,MAAM,yBAAyB,GAAO,OAAJ,IAAoD;;;EAC3F,MAAM;IAAE;EAAF,IAAY,OAAlB;EACA,MAAM,KAAK,GAAG,OAAO,CAAC,MAAR,KAAmB,KAAjC;;EAEA,IAAI,KAAJ,EAAW;IACT,OAAO;MACL,WAAW,EAAE,KAAK,CAAC,KAAN,CAAY,CAAZ,EAAe,CAAf,CADR;MAEL,aAAa,EAAE;IAFV,CAAP;EAID;;EAED,MAAM,cAAc,GAAG,CAAA,EAAA,GAAA,OAAO,CAAC,cAAR,MAAsB,IAAtB,IAAsB,EAAA,KAAA,KAAA,CAAtB,GAAsB,EAAtB,GAA0B,CAAjD;EACA,MAAM,WAAW,GAAG,EAAE,cAAc,IAAI,KAAK,CAAC,MAAN,GAAe,cAAf,GAAgC,CAAhC,GAAoC,CAAxC,CAAhB,CAApB;EAEA,OAAO;IACL,WAAW,EAAE,KAAK,CAAC,KAAN,CAAY,WAAZ,CADR;IAEL,aAAa,EAAE,KAAK,CAAC,KAAN,CAAY,CAAZ,EAAe,WAAf;EAFV,CAAP;AAID,CAlBM;;AAAM,OAAA,CAAA,yBAAA,GAAyB,yBAAzB","sourcesContent":["export type PartitionAvatarGroupItemsOptions<T> = {\n items: readonly T[];\n layout?: 'spread' | 'stack' | 'pie';\n maxInlineItems?: number;\n};\n\n/**\n * Get the inline items and overflowing items based on the array of AvatarGroupItems needed for AvatarGroup.\n *\n * @param options - Configure the partition options\n *\n * @returns Two arrays split into inline items and overflow items based on maxInlineItems.\n */\nexport const partitionAvatarGroupItems = <T>(options: PartitionAvatarGroupItemsOptions<T>) => {\n const { items } = options;\n const isPie = options.layout === 'pie';\n\n if (isPie) {\n return {\n inlineItems: items.slice(0, 3),\n overflowItems: items,\n };\n }\n\n const maxInlineItems = options.maxInlineItems ?? 5;\n const inlineCount = -(maxInlineItems - (items.length > maxInlineItems ? 1 : 0));\n\n return {\n inlineItems: items.slice(inlineCount),\n overflowItems: items.slice(0, inlineCount),\n };\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["packages/react-components/react-avatar/src/utils/partitionAvatarGroupItems.ts"],"names":[],"mappings":";;;;;;AAWA;;;;;;AAMG;;AACI,MAAM,yBAAyB,GACpC,OADuC,IAEP;;;EAChC,MAAM;IAAE;EAAF,IAAY,OAAlB;EACA,MAAM,KAAK,GAAG,OAAO,CAAC,MAAR,KAAmB,KAAjC;;EAEA,IAAI,KAAJ,EAAW;IACT,OAAO;MACL,WAAW,EAAE,KAAK,CAAC,KAAN,CAAY,CAAZ,EAAe,CAAf,CADR;MAEL,aAAa,EAAE,KAAK,CAAC,MAAN,GAAe,CAAf,GAAmB,KAAnB,GAA2B;IAFrC,CAAP;EAID;;EAED,MAAM,cAAc,GAAG,CAAA,EAAA,GAAA,OAAO,CAAC,cAAR,MAAsB,IAAtB,IAAsB,EAAA,KAAA,KAAA,CAAtB,GAAsB,EAAtB,GAA0B,CAAjD;EACA,MAAM,WAAW,GAAG,EAAE,cAAc,IAAI,KAAK,CAAC,MAAN,GAAe,cAAf,GAAgC,CAAhC,GAAoC,CAAxC,CAAhB,CAApB;EACA,MAAM,aAAa,GAAG,KAAK,CAAC,KAAN,CAAY,CAAZ,EAAe,WAAf,CAAtB;EAEA,OAAO;IACL,WAAW,EAAE,KAAK,CAAC,KAAN,CAAY,WAAZ,CADR;IAEL,aAAa,EAAE,aAAa,CAAC,MAAd,GAAuB,CAAvB,GAA2B,aAA3B,GAA2C;EAFrD,CAAP;AAID,CArBM;;AAAM,OAAA,CAAA,yBAAA,GAAyB,yBAAzB","sourcesContent":["export type PartitionAvatarGroupItemsOptions<T> = {\n items: readonly T[];\n layout?: 'spread' | 'stack' | 'pie';\n maxInlineItems?: number;\n};\n\nexport type PartitionAvatarGroupItems<T> = {\n inlineItems: readonly T[];\n overflowItems?: readonly T[];\n};\n\n/**\n * Get the inline items and overflowing items based on the array of AvatarGroupItems needed for AvatarGroup.\n *\n * @param options - Configure the partition options\n *\n * @returns Two arrays split into inline items and overflow items based on maxInlineItems.\n */\nexport const partitionAvatarGroupItems = <T>(\n options: PartitionAvatarGroupItemsOptions<T>,\n): PartitionAvatarGroupItems<T> => {\n const { items } = options;\n const isPie = options.layout === 'pie';\n\n if (isPie) {\n return {\n inlineItems: items.slice(0, 3),\n overflowItems: items.length > 0 ? items : undefined,\n };\n }\n\n const maxInlineItems = options.maxInlineItems ?? 5;\n const inlineCount = -(maxInlineItems - (items.length > maxInlineItems ? 1 : 0));\n const overflowItems = items.slice(0, inlineCount);\n\n return {\n inlineItems: items.slice(inlineCount),\n overflowItems: overflowItems.length > 0 ? overflowItems : undefined,\n };\n};\n"],"sourceRoot":"../src/"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-avatar",
3
- "version": "9.2.2",
3
+ "version": "9.2.4",
4
4
  "description": "React components for building Microsoft web experiences.",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -29,28 +29,28 @@
29
29
  "devDependencies": {
30
30
  "@fluentui/eslint-plugin": "*",
31
31
  "@fluentui/react-conformance": "*",
32
- "@fluentui/react-conformance-griffel": "9.0.0-beta.15",
32
+ "@fluentui/react-conformance-griffel": "9.0.0-beta.16",
33
33
  "@fluentui/scripts": "^1.0.0",
34
34
  "es6-weak-map": "^2.0.2"
35
35
  },
36
36
  "dependencies": {
37
- "@fluentui/react-badge": "^9.0.8",
38
- "@fluentui/react-context-selector": "^9.0.4",
37
+ "@fluentui/react-badge": "^9.0.10",
38
+ "@fluentui/react-context-selector": "^9.0.5",
39
39
  "@fluentui/react-icons": "^2.0.175",
40
- "@fluentui/react-popover": "^9.2.0",
41
- "@fluentui/react-shared-contexts": "^9.0.1",
42
- "@fluentui/react-tabster": "^9.1.3",
43
- "@fluentui/react-theme": "^9.1.0",
44
- "@fluentui/react-tooltip": "^9.0.8",
45
- "@fluentui/react-utilities": "^9.1.1",
46
- "@griffel/react": "^1.4.0",
40
+ "@fluentui/react-popover": "^9.2.1",
41
+ "@fluentui/react-shared-contexts": "^9.0.2",
42
+ "@fluentui/react-tabster": "^9.2.0",
43
+ "@fluentui/react-theme": "^9.1.1",
44
+ "@fluentui/react-tooltip": "^9.0.9",
45
+ "@fluentui/react-utilities": "^9.1.2",
46
+ "@griffel/react": "^1.4.1",
47
47
  "tslib": "^2.1.0"
48
48
  },
49
49
  "peerDependencies": {
50
- "@types/react": ">=16.8.0 <18.0.0",
51
- "@types/react-dom": ">=16.8.0 <18.0.0",
52
- "react": ">=16.8.0 <18.0.0",
53
- "react-dom": ">=16.8.0 <18.0.0",
50
+ "@types/react": ">=16.8.0 <19.0.0",
51
+ "@types/react-dom": ">=16.8.0 <19.0.0",
52
+ "react": ">=16.8.0 <19.0.0",
53
+ "react-dom": ">=16.8.0 <19.0.0",
54
54
  "scheduler": "^0.19.0 || ^0.20.0"
55
55
  },
56
56
  "beachball": {