@atlaskit/avatar 21.3.1 → 21.3.3

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.
Files changed (40) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/cjs/Avatar.js +1 -1
  3. package/dist/cjs/AvatarImage.js +24 -19
  4. package/dist/cjs/Skeleton.js +44 -34
  5. package/dist/cjs/Text.js +20 -25
  6. package/dist/cjs/constants.js +3 -1
  7. package/dist/cjs/version.json +1 -1
  8. package/dist/es2019/Avatar.js +1 -1
  9. package/dist/es2019/AvatarImage.js +14 -9
  10. package/dist/es2019/Skeleton.js +36 -21
  11. package/dist/es2019/Text.js +13 -16
  12. package/dist/es2019/constants.js +1 -0
  13. package/dist/es2019/version.json +1 -1
  14. package/dist/esm/Avatar.js +1 -1
  15. package/dist/esm/AvatarImage.js +24 -16
  16. package/dist/esm/Skeleton.js +45 -33
  17. package/dist/esm/Text.js +17 -24
  18. package/dist/esm/constants.js +1 -0
  19. package/dist/esm/version.json +1 -1
  20. package/dist/types/constants.d.ts +1 -0
  21. package/dist/types-ts4.5/Avatar.d.ts +106 -0
  22. package/dist/types-ts4.5/AvatarImage.d.ts +19 -0
  23. package/dist/types-ts4.5/AvatarItem.d.ts +79 -0
  24. package/dist/types-ts4.5/IconWrapper.d.ts +14 -0
  25. package/dist/types-ts4.5/Presence.d.ts +45 -0
  26. package/dist/types-ts4.5/Skeleton.d.ts +19 -0
  27. package/dist/types-ts4.5/Status.d.ts +42 -0
  28. package/dist/types-ts4.5/Text.d.ts +13 -0
  29. package/dist/types-ts4.5/constants.d.ts +8 -0
  30. package/dist/types-ts4.5/entry-points/avatar-item.d.ts +2 -0
  31. package/dist/types-ts4.5/entry-points/avatar.d.ts +1 -0
  32. package/dist/types-ts4.5/entry-points/presence.d.ts +2 -0
  33. package/dist/types-ts4.5/entry-points/skeleton.d.ts +2 -0
  34. package/dist/types-ts4.5/entry-points/status.d.ts +2 -0
  35. package/dist/types-ts4.5/entry-points/types.d.ts +1 -0
  36. package/dist/types-ts4.5/index.d.ts +12 -0
  37. package/dist/types-ts4.5/types.d.ts +7 -0
  38. package/dist/types-ts4.5/utilities.d.ts +11 -0
  39. package/package.json +4 -3
  40. package/tmp/api-report-tmp.d.ts +170 -0
@@ -0,0 +1,170 @@
1
+ ## API Report File for "@atlaskit/avatar"
2
+
3
+ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4
+
5
+ ```ts
6
+
7
+ /// <reference types="react" />
8
+
9
+ import { FC } from 'react';
10
+ import { ForwardRefExoticComponent } from 'react';
11
+ import { MouseEventHandler } from 'react';
12
+ import { ReactNode } from 'react';
13
+ import { Ref } from 'react';
14
+ import { RefAttributes } from 'react';
15
+ import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
16
+
17
+ // @public (undocumented)
18
+ export const ACTIVE_SCALE_FACTOR = 0.9;
19
+
20
+ // @public (undocumented)
21
+ export type AppearanceType = 'circle' | 'square';
22
+
23
+ // @public
24
+ const Avatar: ForwardRefExoticComponent<AvatarPropTypes & RefAttributes<HTMLElement>>;
25
+ export default Avatar;
26
+
27
+ // @public (undocumented)
28
+ export const AVATAR_RADIUS: AvatarSizeMap;
29
+
30
+ // @public (undocumented)
31
+ export const AVATAR_SIZES: AvatarSizeMap;
32
+
33
+ // @public (undocumented)
34
+ export type AvatarClickEventHandler = (event: React.MouseEvent, analyticsEvent?: UIAnalyticsEvent) => void;
35
+
36
+ // @public
37
+ export const AvatarItem: ForwardRefExoticComponent<AvatarItemProps & RefAttributes<HTMLElement>>;
38
+
39
+ // @public (undocumented)
40
+ export interface AvatarItemProps {
41
+ avatar: ReactNode;
42
+ backgroundColor?: string;
43
+ children?: (props: CustomAvatarItemProps) => ReactNode;
44
+ href?: string;
45
+ isDisabled?: boolean;
46
+ isTruncationDisabled?: boolean;
47
+ label?: string;
48
+ onClick?: AvatarClickEventHandler;
49
+ primaryText?: ReactNode;
50
+ secondaryText?: ReactNode;
51
+ target?: '_blank' | '_parent' | '_self' | '_top';
52
+ testId?: string;
53
+ }
54
+
55
+ // @public (undocumented)
56
+ export interface AvatarPropTypes {
57
+ analyticsContext?: Record<string, any>;
58
+ appearance?: AppearanceType;
59
+ borderColor?: string;
60
+ children?: (props: CustomAvatarProps) => ReactNode;
61
+ href?: string;
62
+ isDisabled?: boolean;
63
+ label?: string;
64
+ name?: string;
65
+ onClick?: AvatarClickEventHandler;
66
+ presence?: ('busy' | 'focus' | 'offline' | 'online') | ReactNode;
67
+ size?: SizeType;
68
+ src?: string;
69
+ stackIndex?: number;
70
+ status?: ('approved' | 'declined' | 'locked') | ReactNode;
71
+ tabIndex?: number;
72
+ target?: '_blank' | '_parent' | '_self' | '_top';
73
+ testId?: string;
74
+ }
75
+
76
+ // @public (undocumented)
77
+ type AvatarSizeMap = Record<SizeType, number>;
78
+
79
+ // @public (undocumented)
80
+ export const BORDER_WIDTH = 2;
81
+
82
+ // @public (undocumented)
83
+ export interface CustomAvatarItemProps {
84
+ // (undocumented)
85
+ 'aria-disabled'?: 'false' | 'true' | boolean | undefined;
86
+ 'aria-label'?: string;
87
+ // (undocumented)
88
+ children: ReactNode;
89
+ // (undocumented)
90
+ className?: string;
91
+ // (undocumented)
92
+ href?: string;
93
+ // (undocumented)
94
+ onClick?: MouseEventHandler;
95
+ // (undocumented)
96
+ ref: Ref<HTMLElement>;
97
+ // (undocumented)
98
+ testId?: string;
99
+ }
100
+
101
+ // @public (undocumented)
102
+ export interface CustomAvatarProps {
103
+ 'aria-label'?: string;
104
+ // (undocumented)
105
+ children: ReactNode;
106
+ // (undocumented)
107
+ className?: string;
108
+ // (undocumented)
109
+ href?: string;
110
+ // (undocumented)
111
+ onClick?: MouseEventHandler;
112
+ // (undocumented)
113
+ ref: Ref<HTMLElement>;
114
+ // (undocumented)
115
+ tabIndex?: number;
116
+ // (undocumented)
117
+ testId?: string;
118
+ }
119
+
120
+ // @public (undocumented)
121
+ export type IndicatorSizeType = 'large' | 'medium' | 'small' | 'xlarge';
122
+
123
+ // @public
124
+ export const Presence: FC<PresenceProps>;
125
+
126
+ // @public (undocumented)
127
+ export interface PresenceProps {
128
+ borderColor?: string;
129
+ children?: ReactNode;
130
+ presence?: PresenceType;
131
+ testId?: string;
132
+ }
133
+
134
+ // @public (undocumented)
135
+ export type PresenceType = 'busy' | 'focus' | 'offline' | 'online' | ReactNode;
136
+
137
+ // @public (undocumented)
138
+ export type SizeType = 'large' | 'medium' | 'small' | 'xlarge' | 'xsmall' | 'xxlarge';
139
+
140
+ // @public
141
+ export const Skeleton: FC<SkeletonProps>;
142
+
143
+ // @public (undocumented)
144
+ export interface SkeletonProps {
145
+ // (undocumented)
146
+ appearance?: AppearanceType;
147
+ // (undocumented)
148
+ color?: string;
149
+ // (undocumented)
150
+ size?: SizeType;
151
+ // (undocumented)
152
+ weight?: 'normal' | 'strong';
153
+ }
154
+
155
+ // @public
156
+ export const Status: FC<StatusProps>;
157
+
158
+ // @public (undocumented)
159
+ export interface StatusProps {
160
+ borderColor?: string;
161
+ children?: ReactNode;
162
+ status?: StatusType;
163
+ }
164
+
165
+ // @public (undocumented)
166
+ export type StatusType = ('approved' | 'declined' | 'locked') | ReactNode;
167
+
168
+ // (No @packageDocumentation comment for this package)
169
+
170
+ ```