@atlaskit/avatar-group 9.4.1 → 9.4.2

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,5 +1,11 @@
1
1
  # @atlaskit/avatar-group
2
2
 
3
+ ## 9.4.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`3c114ea4257`](https://bitbucket.org/atlassian/atlassian-frontend/commits/3c114ea4257) - Update type definitions to conform to inherited changes from `@types/react@16.14.15`.
8
+
3
9
  ## 9.4.1
4
10
 
5
11
  ### Patch Changes
@@ -1,7 +1,7 @@
1
1
  /** @jsx jsx */
2
2
  import { ElementType, MouseEventHandler } from 'react';
3
3
  import { jsx } from '@emotion/react';
4
- import { SizeType } from '@atlaskit/avatar';
4
+ import Avatar, { SizeType } from '@atlaskit/avatar';
5
5
  import { PositionType } from '@atlaskit/tooltip';
6
6
  import { AvatarGroupOverrides, AvatarProps, onAvatarClickHandler } from './types';
7
7
  export interface AvatarGroupProps {
@@ -15,7 +15,7 @@ export interface AvatarGroupProps {
15
15
  /**
16
16
  * Component used to render each avatar
17
17
  */
18
- avatar?: ElementType<AvatarProps>;
18
+ avatar?: typeof Avatar | ElementType<AvatarProps>;
19
19
  /**
20
20
  * The maximum number of avatars allowed in the list.
21
21
  * Defaults to 5 when displayed as a stack,
@@ -1,6 +1,6 @@
1
1
  import type { ElementType, ReactNode } from 'react';
2
2
  import type { AnalyticsEvent } from '@atlaskit/analytics-next';
3
- import type { AvatarPropTypes } from '@atlaskit/avatar';
3
+ import { default as Avatar, type AvatarPropTypes } from '@atlaskit/avatar';
4
4
  import { MenuGroupProps } from '@atlaskit/menu';
5
5
  import { ContentProps } from '@atlaskit/popup';
6
6
  import type { AvatarGroupItemProps } from './avatar-group-item';
@@ -16,7 +16,7 @@ export interface AvatarGroupOverrides {
16
16
  render?: (Component: ElementType<AvatarGroupItemProps>, props: AvatarGroupItemProps, index: number) => ReactNode;
17
17
  };
18
18
  Avatar?: {
19
- render?: (Component: ElementType<AvatarProps>, props: AvatarProps, index: number) => ReactNode;
19
+ render?: (Component: typeof Avatar | ElementType<AvatarProps>, props: AvatarProps, index: number) => ReactNode;
20
20
  };
21
21
  }
22
22
  export type onAvatarClickHandler = (event: React.MouseEvent, analyticsEvent: AnalyticsEvent | undefined, index: number) => void;
@@ -1,7 +1,7 @@
1
1
  /** @jsx jsx */
2
2
  import { ElementType, MouseEventHandler } from 'react';
3
3
  import { jsx } from '@emotion/react';
4
- import { SizeType } from '@atlaskit/avatar';
4
+ import Avatar, { SizeType } from '@atlaskit/avatar';
5
5
  import { PositionType } from '@atlaskit/tooltip';
6
6
  import { AvatarGroupOverrides, AvatarProps, onAvatarClickHandler } from './types';
7
7
  export interface AvatarGroupProps {
@@ -15,7 +15,7 @@ export interface AvatarGroupProps {
15
15
  /**
16
16
  * Component used to render each avatar
17
17
  */
18
- avatar?: ElementType<AvatarProps>;
18
+ avatar?: typeof Avatar | ElementType<AvatarProps>;
19
19
  /**
20
20
  * The maximum number of avatars allowed in the list.
21
21
  * Defaults to 5 when displayed as a stack,
@@ -1,6 +1,6 @@
1
1
  import type { ElementType, ReactNode } from 'react';
2
2
  import type { AnalyticsEvent } from '@atlaskit/analytics-next';
3
- import type { AvatarPropTypes } from '@atlaskit/avatar';
3
+ import { default as Avatar, type AvatarPropTypes } from '@atlaskit/avatar';
4
4
  import { MenuGroupProps } from '@atlaskit/menu';
5
5
  import { ContentProps } from '@atlaskit/popup';
6
6
  import type { AvatarGroupItemProps } from './avatar-group-item';
@@ -16,7 +16,7 @@ export interface AvatarGroupOverrides {
16
16
  render?: (Component: ElementType<AvatarGroupItemProps>, props: AvatarGroupItemProps, index: number) => ReactNode;
17
17
  };
18
18
  Avatar?: {
19
- render?: (Component: ElementType<AvatarProps>, props: AvatarProps, index: number) => ReactNode;
19
+ render?: (Component: typeof Avatar | ElementType<AvatarProps>, props: AvatarProps, index: number) => ReactNode;
20
20
  };
21
21
  }
22
22
  export type onAvatarClickHandler = (event: React.MouseEvent, analyticsEvent: AnalyticsEvent | undefined, index: number) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/avatar-group",
3
- "version": "9.4.1",
3
+ "version": "9.4.2",
4
4
  "description": "An avatar group displays a number of avatars grouped together in a stack or grid.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
package/report.api.md CHANGED
@@ -16,7 +16,9 @@
16
16
 
17
17
  ```ts
18
18
  import type { AnalyticsEvent } from '@atlaskit/analytics-next';
19
- import type { AvatarPropTypes } from '@atlaskit/avatar';
19
+ import Avatar from '@atlaskit/avatar';
20
+ import { AvatarPropTypes } from '@atlaskit/avatar';
21
+ import { default as default_2 } from '@atlaskit/avatar';
20
22
  import { ElementType } from 'react';
21
23
  import { jsx } from '@emotion/react';
22
24
  import { MouseEventHandler } from 'react';
@@ -65,7 +67,7 @@ interface AvatarGroupOverrides {
65
67
  // (undocumented)
66
68
  Avatar?: {
67
69
  render?: (
68
- Component: ElementType<AvatarProps>,
70
+ Component: ElementType<AvatarProps> | typeof default_2,
69
71
  props: AvatarProps,
70
72
  index: number,
71
73
  ) => ReactNode;
@@ -83,7 +85,7 @@ interface AvatarGroupOverrides {
83
85
  // @public (undocumented)
84
86
  export interface AvatarGroupProps {
85
87
  appearance?: 'grid' | 'stack';
86
- avatar?: ElementType<AvatarProps>;
88
+ avatar?: ElementType<AvatarProps> | typeof Avatar;
87
89
  borderColor?: string;
88
90
  boundariesElement?: 'scrollParent' | 'viewport' | 'window';
89
91
  data: Array<AvatarProps>;
@@ -5,7 +5,9 @@
5
5
  ```ts
6
6
 
7
7
  import type { AnalyticsEvent } from '@atlaskit/analytics-next';
8
- import type { AvatarPropTypes } from '@atlaskit/avatar';
8
+ import Avatar from '@atlaskit/avatar';
9
+ import { AvatarPropTypes } from '@atlaskit/avatar';
10
+ import { default as default_2 } from '@atlaskit/avatar';
9
11
  import { ElementType } from 'react';
10
12
  import { jsx } from '@emotion/react';
11
13
  import { MouseEventHandler } from 'react';
@@ -37,7 +39,7 @@ interface AvatarGroupItemProps {
37
39
  interface AvatarGroupOverrides {
38
40
  // (undocumented)
39
41
  Avatar?: {
40
- render?: (Component: ElementType<AvatarProps>, props: AvatarProps, index: number) => ReactNode;
42
+ render?: (Component: ElementType<AvatarProps> | typeof default_2, props: AvatarProps, index: number) => ReactNode;
41
43
  };
42
44
  // (undocumented)
43
45
  AvatarGroupItem?: {
@@ -48,7 +50,7 @@ interface AvatarGroupOverrides {
48
50
  // @public (undocumented)
49
51
  export interface AvatarGroupProps {
50
52
  appearance?: 'grid' | 'stack';
51
- avatar?: ElementType<AvatarProps>;
53
+ avatar?: ElementType<AvatarProps> | typeof Avatar;
52
54
  borderColor?: string;
53
55
  boundariesElement?: 'scrollParent' | 'viewport' | 'window';
54
56
  data: Array<AvatarProps>;