@atlaskit/avatar 21.0.0 → 21.0.1

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
2
2
 
3
+ ## 21.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`8d4228767b0`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8d4228767b0) - Upgrade Typescript from `4.2.4` to `4.3.5`.
8
+
3
9
  ## 21.0.0
4
10
 
5
11
  ### Major Changes
@@ -38,7 +38,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
38
38
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
39
39
 
40
40
  var packageName = "@atlaskit/avatar";
41
- var packageVersion = "21.0.0";
41
+ var packageVersion = "21.0.1";
42
42
 
43
43
  var getStyles = function getStyles(css, _ref) {
44
44
  var size = _ref.size,
@@ -50,7 +50,7 @@ var getStyles = function getStyles(css, _ref) {
50
50
  isInteractive = _ref.isInteractive,
51
51
  isDisabled = _ref.isDisabled;
52
52
  return (//eslint-disable-next-line @repo/internal/react/no-css-string-literals
53
- css(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n height: ", "px;\n width: ", "px;\n align-items: stretch;\n background-color: ", ";\n border-radius: ", ";\n box-sizing: content-box;\n cursor: inherit;\n display: flex;\n flex-direction: column;\n justify-content: center;\n outline: none;\n overflow: hidden;\n position: static;\n transform: translateZ(0);\n transition: transform 200ms, opacity 200ms;\n box-shadow: 0 0 0 ", "px ", ";\n border: none;\n margin: ", "px;\n padding: 0;\n\n /* Added font-size and font-family styles to fix alignment issue in firefox for interactive button avatar */\n font-size: inherit;\n font-family: inherit;\n\n &::-moz-focus-inner {\n border: 0;\n margin: 0;\n padding: 0;\n }\n\n &::after {\n background-color: transparent;\n bottom: 0px;\n\n /* Added border-radius style to fix hover issue in safari */\n border-radius: ", ";\n content: ' ';\n left: 0px;\n opacity: 0;\n pointer-events: none;\n position: absolute;\n right: 0px;\n top: 0px;\n transition: opacity 200ms;\n width: 100%;\n }\n\n ", "\n\n ", "\n\n ", "\n "])), size, size, borderColor, appearance === 'circle' ? '50%' : "".concat(radius, "px"), _constants.BORDER_WIDTH, borderColor, _constants.BORDER_WIDTH, appearance === 'circle' ? '50%' : "".concat(radius, "px"), stackIndex && "position: relative;", isInteractive && "\n cursor: pointer;\n\n :focus {\n outline: none;\n box-shadow: 0 0 0 ".concat(_constants.BORDER_WIDTH, "px ").concat("var(--ds-border-focused, ".concat(_colors.B300, ")"), "\n }\n\n :hover {\n &::after {\n background-color: ").concat("var(--ds-interaction-hovered, ".concat(_colors.N70A, ")"), ";\n opacity: 1;\n }\n }\n\n :active {\n &::after {\n background-color: ").concat("var(--ds-interaction-pressed, ".concat(_colors.N70A, ")"), ";\n opacity: 1;\n }\n }\n\n :active {\n transform: scale(").concat(_constants.ACTIVE_SCALE_FACTOR, ");\n }\n\n @media screen and (forced-colors: active) {\n &:focus-visible {\n outline: 1px solid\n }\n }\n "), isDisabled && "\n cursor: not-allowed;\n\n &::after {\n opacity: 0.7;\n pointer-events: none;\n background-color: ".concat("var(--ds-surface, ".concat(_colors.N0, ")"), ";\n }\n "))
53
+ css(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n height: ", "px;\n width: ", "px;\n align-items: stretch;\n background-color: ", ";\n border-radius: ", ";\n box-sizing: content-box;\n cursor: inherit;\n display: flex;\n flex-direction: column;\n justify-content: center;\n outline: none;\n overflow: hidden;\n position: static;\n transform: translateZ(0);\n transition: transform 200ms, opacity 200ms;\n box-shadow: 0 0 0 ", "px ", ";\n border: none;\n margin: ", "px;\n padding: 0;\n\n /* Added font-size and font-family styles to fix alignment issue in firefox for interactive button avatar */\n font-size: inherit;\n font-family: inherit;\n\n &::-moz-focus-inner {\n border: 0;\n margin: 0;\n padding: 0;\n }\n\n &::after {\n background-color: transparent;\n bottom: 0px;\n\n /* Added border-radius style to fix hover issue in safari */\n border-radius: ", ";\n content: ' ';\n left: 0px;\n opacity: 0;\n pointer-events: none;\n position: absolute;\n right: 0px;\n top: 0px;\n transition: opacity 200ms;\n width: 100%;\n }\n\n ", "\n\n ", "\n\n ", "\n "])), size, size, borderColor, appearance === 'circle' ? '50%' : "".concat(radius, "px"), _constants.BORDER_WIDTH, borderColor, _constants.BORDER_WIDTH, appearance === 'circle' ? '50%' : "".concat(radius, "px"), stackIndex && "position: relative;", isInteractive && "\n cursor: pointer;\n\n :focus {\n outline: none;\n box-shadow: 0 0 0 ".concat(_constants.BORDER_WIDTH, "px ", "var(--ds-border-focused, ".concat(_colors.B300, ")"), "\n }\n\n :hover {\n &::after {\n background-color: ", "var(--ds-interaction-hovered, ".concat(_colors.N70A, ")"), ";\n opacity: 1;\n }\n }\n\n :active {\n &::after {\n background-color: ", "var(--ds-interaction-pressed, ".concat(_colors.N70A, ")"), ";\n opacity: 1;\n }\n }\n\n :active {\n transform: scale(").concat(_constants.ACTIVE_SCALE_FACTOR, ");\n }\n\n @media screen and (forced-colors: active) {\n &:focus-visible {\n outline: 1px solid\n }\n }\n "), isDisabled && "\n cursor: not-allowed;\n\n &::after {\n opacity: 0.7;\n pointer-events: none;\n background-color: ".concat("var(--ds-surface, ".concat(_colors.N0, ")"), ";\n }\n "))
54
54
  );
55
55
  };
56
56
  /**
@@ -44,7 +44,7 @@ var getStyles = function getStyles(css, _ref) {
44
44
  isInteractive = _ref.isInteractive,
45
45
  isDisabled = _ref.isDisabled;
46
46
  return (//eslint-disable-next-line @repo/internal/react/no-css-string-literals
47
- css(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n align-items: center;\n background-color: ", ";\n border-radius: ", "px;\n border: ", "px solid transparent;\n box-sizing: border-box;\n color: inherit;\n display: flex;\n font-size: inherit;\n font-style: normal;\n font-weight: normal;\n line-height: 1;\n outline: none;\n margin: 0;\n padding: ", "px;\n text-align: left;\n text-decoration: none;\n width: 100%;\n\n ", "\n\n ", "\n "])), backgroundColor, (0, _constants.borderRadius)(), _constants2.BORDER_WIDTH, (0, _constants.gridSize)() / 2, isInteractive && "\n :hover {\n background-color: ".concat("var(--ds-background-neutral-subtle-hovered, ".concat((0, _colors.backgroundHover)(), ")"), ";\n cursor: pointer;\n text-decoration: none;\n }\n\n :focus {\n outline: none;\n border-color: ").concat("var(--ds-border-focused, ".concat(_colors.B200, ")"), ";\n }\n\n :active {\n background-color: ").concat("var(--ds-background-neutral-subtle-pressed, ".concat((0, _colors.backgroundActive)(), ")"), ";\n }\n "), isDisabled && "\n cursor: not-allowed;\n opacity: 0.5;\n pointer-events: none;\n ")
47
+ css(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n align-items: center;\n background-color: ", ";\n border-radius: ", "px;\n border: ", "px solid transparent;\n box-sizing: border-box;\n color: inherit;\n display: flex;\n font-size: inherit;\n font-style: normal;\n font-weight: normal;\n line-height: 1;\n outline: none;\n margin: 0;\n padding: ", "px;\n text-align: left;\n text-decoration: none;\n width: 100%;\n\n ", "\n\n ", "\n "])), backgroundColor, (0, _constants.borderRadius)(), _constants2.BORDER_WIDTH, (0, _constants.gridSize)() / 2, isInteractive && "\n :hover {\n background-color: ".concat("var(--ds-background-neutral-subtle-hovered, ".concat((0, _colors.backgroundHover)(), ")"), ";\n cursor: pointer;\n text-decoration: none;\n }\n\n :focus {\n outline: none;\n border-color: ", "var(--ds-border-focused, ".concat(_colors.B200, ")"), ";\n }\n\n :active {\n background-color: ", "var(--ds-background-neutral-subtle-pressed, ".concat((0, _colors.backgroundActive)(), ")"), ";\n }\n "), isDisabled && "\n cursor: not-allowed;\n opacity: 0.5;\n pointer-events: none;\n ")
48
48
  );
49
49
  };
50
50
  /**
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/avatar",
3
- "version": "21.0.0",
3
+ "version": "21.0.1",
4
4
  "sideEffects": false
5
5
  }
@@ -10,7 +10,7 @@ import { PresenceWrapper } from './Presence';
10
10
  import { StatusWrapper } from './Status';
11
11
  import { getButtonProps, getCustomElement, getLinkProps } from './utilities';
12
12
  const packageName = "@atlaskit/avatar";
13
- const packageVersion = "21.0.0";
13
+ const packageVersion = "21.0.1";
14
14
 
15
15
  const getStyles = (css, {
16
16
  size,
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/avatar",
3
- "version": "21.0.0",
3
+ "version": "21.0.1",
4
4
  "sideEffects": false
5
5
  }
@@ -20,7 +20,7 @@ import { PresenceWrapper } from './Presence';
20
20
  import { StatusWrapper } from './Status';
21
21
  import { getButtonProps, getCustomElement, getLinkProps } from './utilities';
22
22
  var packageName = "@atlaskit/avatar";
23
- var packageVersion = "21.0.0";
23
+ var packageVersion = "21.0.1";
24
24
 
25
25
  var getStyles = function getStyles(css, _ref) {
26
26
  var size = _ref.size,
@@ -32,7 +32,7 @@ var getStyles = function getStyles(css, _ref) {
32
32
  isInteractive = _ref.isInteractive,
33
33
  isDisabled = _ref.isDisabled;
34
34
  return (//eslint-disable-next-line @repo/internal/react/no-css-string-literals
35
- css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n height: ", "px;\n width: ", "px;\n align-items: stretch;\n background-color: ", ";\n border-radius: ", ";\n box-sizing: content-box;\n cursor: inherit;\n display: flex;\n flex-direction: column;\n justify-content: center;\n outline: none;\n overflow: hidden;\n position: static;\n transform: translateZ(0);\n transition: transform 200ms, opacity 200ms;\n box-shadow: 0 0 0 ", "px ", ";\n border: none;\n margin: ", "px;\n padding: 0;\n\n /* Added font-size and font-family styles to fix alignment issue in firefox for interactive button avatar */\n font-size: inherit;\n font-family: inherit;\n\n &::-moz-focus-inner {\n border: 0;\n margin: 0;\n padding: 0;\n }\n\n &::after {\n background-color: transparent;\n bottom: 0px;\n\n /* Added border-radius style to fix hover issue in safari */\n border-radius: ", ";\n content: ' ';\n left: 0px;\n opacity: 0;\n pointer-events: none;\n position: absolute;\n right: 0px;\n top: 0px;\n transition: opacity 200ms;\n width: 100%;\n }\n\n ", "\n\n ", "\n\n ", "\n "])), size, size, borderColor, appearance === 'circle' ? '50%' : "".concat(radius, "px"), BORDER_WIDTH, borderColor, BORDER_WIDTH, appearance === 'circle' ? '50%' : "".concat(radius, "px"), stackIndex && "position: relative;", isInteractive && "\n cursor: pointer;\n\n :focus {\n outline: none;\n box-shadow: 0 0 0 ".concat(BORDER_WIDTH, "px ").concat("var(--ds-border-focused, ".concat(B300, ")"), "\n }\n\n :hover {\n &::after {\n background-color: ").concat("var(--ds-interaction-hovered, ".concat(N70A, ")"), ";\n opacity: 1;\n }\n }\n\n :active {\n &::after {\n background-color: ").concat("var(--ds-interaction-pressed, ".concat(N70A, ")"), ";\n opacity: 1;\n }\n }\n\n :active {\n transform: scale(").concat(ACTIVE_SCALE_FACTOR, ");\n }\n\n @media screen and (forced-colors: active) {\n &:focus-visible {\n outline: 1px solid\n }\n }\n "), isDisabled && "\n cursor: not-allowed;\n\n &::after {\n opacity: 0.7;\n pointer-events: none;\n background-color: ".concat("var(--ds-surface, ".concat(N0, ")"), ";\n }\n "))
35
+ css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n height: ", "px;\n width: ", "px;\n align-items: stretch;\n background-color: ", ";\n border-radius: ", ";\n box-sizing: content-box;\n cursor: inherit;\n display: flex;\n flex-direction: column;\n justify-content: center;\n outline: none;\n overflow: hidden;\n position: static;\n transform: translateZ(0);\n transition: transform 200ms, opacity 200ms;\n box-shadow: 0 0 0 ", "px ", ";\n border: none;\n margin: ", "px;\n padding: 0;\n\n /* Added font-size and font-family styles to fix alignment issue in firefox for interactive button avatar */\n font-size: inherit;\n font-family: inherit;\n\n &::-moz-focus-inner {\n border: 0;\n margin: 0;\n padding: 0;\n }\n\n &::after {\n background-color: transparent;\n bottom: 0px;\n\n /* Added border-radius style to fix hover issue in safari */\n border-radius: ", ";\n content: ' ';\n left: 0px;\n opacity: 0;\n pointer-events: none;\n position: absolute;\n right: 0px;\n top: 0px;\n transition: opacity 200ms;\n width: 100%;\n }\n\n ", "\n\n ", "\n\n ", "\n "])), size, size, borderColor, appearance === 'circle' ? '50%' : "".concat(radius, "px"), BORDER_WIDTH, borderColor, BORDER_WIDTH, appearance === 'circle' ? '50%' : "".concat(radius, "px"), stackIndex && "position: relative;", isInteractive && "\n cursor: pointer;\n\n :focus {\n outline: none;\n box-shadow: 0 0 0 ".concat(BORDER_WIDTH, "px ", "var(--ds-border-focused, ".concat(B300, ")"), "\n }\n\n :hover {\n &::after {\n background-color: ", "var(--ds-interaction-hovered, ".concat(N70A, ")"), ";\n opacity: 1;\n }\n }\n\n :active {\n &::after {\n background-color: ", "var(--ds-interaction-pressed, ".concat(N70A, ")"), ";\n opacity: 1;\n }\n }\n\n :active {\n transform: scale(").concat(ACTIVE_SCALE_FACTOR, ");\n }\n\n @media screen and (forced-colors: active) {\n &:focus-visible {\n outline: 1px solid\n }\n }\n "), isDisabled && "\n cursor: not-allowed;\n\n &::after {\n opacity: 0.7;\n pointer-events: none;\n background-color: ".concat("var(--ds-surface, ".concat(N0, ")"), ";\n }\n "))
36
36
  );
37
37
  };
38
38
  /**
@@ -29,7 +29,7 @@ var getStyles = function getStyles(css, _ref) {
29
29
  isInteractive = _ref.isInteractive,
30
30
  isDisabled = _ref.isDisabled;
31
31
  return (//eslint-disable-next-line @repo/internal/react/no-css-string-literals
32
- css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n align-items: center;\n background-color: ", ";\n border-radius: ", "px;\n border: ", "px solid transparent;\n box-sizing: border-box;\n color: inherit;\n display: flex;\n font-size: inherit;\n font-style: normal;\n font-weight: normal;\n line-height: 1;\n outline: none;\n margin: 0;\n padding: ", "px;\n text-align: left;\n text-decoration: none;\n width: 100%;\n\n ", "\n\n ", "\n "])), backgroundColor, borderRadius(), BORDER_WIDTH, gridSize() / 2, isInteractive && "\n :hover {\n background-color: ".concat("var(--ds-background-neutral-subtle-hovered, ".concat(backgroundHover(), ")"), ";\n cursor: pointer;\n text-decoration: none;\n }\n\n :focus {\n outline: none;\n border-color: ").concat("var(--ds-border-focused, ".concat(B200, ")"), ";\n }\n\n :active {\n background-color: ").concat("var(--ds-background-neutral-subtle-pressed, ".concat(backgroundActive(), ")"), ";\n }\n "), isDisabled && "\n cursor: not-allowed;\n opacity: 0.5;\n pointer-events: none;\n ")
32
+ css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n align-items: center;\n background-color: ", ";\n border-radius: ", "px;\n border: ", "px solid transparent;\n box-sizing: border-box;\n color: inherit;\n display: flex;\n font-size: inherit;\n font-style: normal;\n font-weight: normal;\n line-height: 1;\n outline: none;\n margin: 0;\n padding: ", "px;\n text-align: left;\n text-decoration: none;\n width: 100%;\n\n ", "\n\n ", "\n "])), backgroundColor, borderRadius(), BORDER_WIDTH, gridSize() / 2, isInteractive && "\n :hover {\n background-color: ".concat("var(--ds-background-neutral-subtle-hovered, ".concat(backgroundHover(), ")"), ";\n cursor: pointer;\n text-decoration: none;\n }\n\n :focus {\n outline: none;\n border-color: ", "var(--ds-border-focused, ".concat(B200, ")"), ";\n }\n\n :active {\n background-color: ", "var(--ds-background-neutral-subtle-pressed, ".concat(backgroundActive(), ")"), ";\n }\n "), isDisabled && "\n cursor: not-allowed;\n opacity: 0.5;\n pointer-events: none;\n ")
33
33
  );
34
34
  };
35
35
  /**
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/avatar",
3
- "version": "21.0.0",
3
+ "version": "21.0.1",
4
4
  "sideEffects": false
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/avatar",
3
- "version": "21.0.0",
3
+ "version": "21.0.1",
4
4
  "description": "An avatar is a visual representation of a user or entity.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -18,7 +18,8 @@
18
18
  "team": "Design System Team",
19
19
  "releaseModel": "scheduled",
20
20
  "website": {
21
- "name": "Avatar"
21
+ "name": "Avatar",
22
+ "category": "Components"
22
23
  }
23
24
  },
24
25
  "af:exports": {
@@ -59,7 +60,7 @@
59
60
  "color-contrast-checker": "^1.5.0",
60
61
  "jscodeshift": "^0.13.0",
61
62
  "react-dom": "^16.8.0",
62
- "typescript": "4.2.4",
63
+ "typescript": "4.3.5",
63
64
  "wait-for-expect": "^1.2.0"
64
65
  },
65
66
  "keywords": [
@@ -72,6 +73,7 @@
72
73
  "import-structure": "atlassian-conventions"
73
74
  },
74
75
  "@repo/internal": {
76
+ "dom-events": "use-bind-event-listener",
75
77
  "design-system": "v1",
76
78
  "ui-components": "lite-mode",
77
79
  "analytics": "analytics-next",
package/report.api.md ADDED
@@ -0,0 +1,320 @@
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
+ /// <reference types="react" />
7
+
8
+ import { FC } from 'react';
9
+ import { ForwardRefExoticComponent } from 'react';
10
+ import { MouseEventHandler } from 'react';
11
+ import { ReactNode } from 'react';
12
+ import { Ref } from 'react';
13
+ import { RefAttributes } from 'react';
14
+ import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
15
+
16
+ export declare const ACTIVE_SCALE_FACTOR = 0.9;
17
+
18
+ export declare type AppearanceType = 'circle' | 'square';
19
+
20
+ /**
21
+ * __Avatar__
22
+ *
23
+ * An avatar is a visual representation of a user or entity.
24
+ *
25
+ * - [Examples](https://atlassian.design/components/avatar/examples)
26
+ * - [Code](https://atlassian.design/components/avatar/code)
27
+ * - [Usage](https://atlassian.design/components/avatar/usage)
28
+ */
29
+ declare const Avatar: ForwardRefExoticComponent<
30
+ AvatarPropTypes & RefAttributes<HTMLElement>
31
+ >;
32
+ export default Avatar;
33
+
34
+ export declare const AVATAR_RADIUS: AvatarSizeMap;
35
+
36
+ export declare const AVATAR_SIZES: AvatarSizeMap;
37
+
38
+ export declare type AvatarClickEventHandler = (
39
+ event: React.MouseEvent,
40
+ analyticsEvent?: UIAnalyticsEvent,
41
+ ) => void;
42
+
43
+ /**
44
+ * __Avatar item__
45
+ *
46
+ * An avatar item is a wrapper that goes around an avatar when it's displayed alongside text, such as a name or status.
47
+ *
48
+ * - [Examples](https://atlassian.design/components/avatar/avatar-item/examples)
49
+ * - [Code](https://atlassian.design/components/avatar/avatar-item/code)
50
+ */
51
+ export declare const AvatarItem: ForwardRefExoticComponent<
52
+ AvatarItemProps & RefAttributes<HTMLElement>
53
+ >;
54
+
55
+ export declare interface AvatarItemProps {
56
+ /**
57
+ * Used to provide better content to screen readers when using presence/status. Rather
58
+ * than a screen reader speaking "online, approved, John Smith", passing in an label
59
+ * allows a custom message like "John Smith (approved and online)".
60
+ */
61
+ label?: string;
62
+ /**
63
+ * Slot to place an avatar element. Use @atlaskit/avatar.
64
+ */
65
+ avatar: ReactNode;
66
+ /**
67
+ * Change background color.
68
+ */
69
+ backgroundColor?: string;
70
+ /**
71
+ * Use a custom component instead of the default span.
72
+ */
73
+ children?: (props: CustomAvatarItemProps) => ReactNode;
74
+ /**
75
+ * URL for avatars being used as a link.
76
+ */
77
+ href?: string;
78
+ /**
79
+ * Disable the item from being interactive
80
+ */
81
+ isDisabled?: boolean;
82
+ /**
83
+ * Handler to be called on click.
84
+ */
85
+ onClick?: AvatarClickEventHandler;
86
+ /**
87
+ * PrimaryText text.
88
+ */
89
+ primaryText?: ReactNode;
90
+ /**
91
+ * SecondaryText text.
92
+ */
93
+ secondaryText?: ReactNode;
94
+ /**
95
+ * Pass target down to the anchor, if href is provided.
96
+ */
97
+ target?: '_blank' | '_self' | '_top' | '_parent';
98
+ /**
99
+ * By default, overflowing text is truncated if it exceeds the container width. Use this prop to disable this.
100
+ */
101
+ isTruncationDisabled?: boolean;
102
+ /**
103
+ * A `testId` prop is provided for specified elements, which is a unique string that appears as a data attribute `data-testid` in the rendered code, serving as a hook for automated tests
104
+ */
105
+ testId?: string;
106
+ }
107
+
108
+ export declare interface AvatarPropTypes {
109
+ /**
110
+ * Indicates the shape of the avatar. Most avatars are circular, but square avatars
111
+ * can be used for 'container' objects.
112
+ */
113
+ appearance?: AppearanceType;
114
+ /**
115
+ * Used to provide better content to screen readers when using presence/status. Rather
116
+ * than a screen reader speaking "online, approved, John Smith", passing in a label
117
+ * allows a custom message like "John Smith (approved and online)".
118
+ */
119
+ label?: string;
120
+ /**
121
+ * Used to override the default border color around the avatar body.
122
+ * Accepts any color argument that the border-color CSS property accepts.
123
+ */
124
+ borderColor?: string;
125
+ /**
126
+ * Supply a custom avatar component instead of the default
127
+ */
128
+ children?: (props: CustomAvatarProps) => ReactNode;
129
+ /**
130
+ * Provides a url for avatars being used as a link.
131
+ */
132
+ href?: string;
133
+ /**
134
+ * Change the style to indicate the avatar is disabled.
135
+ */
136
+ isDisabled?: boolean;
137
+ /**
138
+ * Provides alt text for the avatar image.
139
+ */
140
+ name?: string;
141
+ /**
142
+ * Indicates a user's online status by showing a small icon on the avatar.
143
+ * Refer to presence values on the Presence component.
144
+ * Alternatively accepts any React element. For best results, it is recommended to
145
+ * use square content with height and width of 100%.
146
+ */
147
+ presence?: ('online' | 'busy' | 'focus' | 'offline') | ReactNode;
148
+ /**
149
+ * Defines the size of the avatar
150
+ */
151
+ size?: SizeType;
152
+ /**
153
+ * A url to load an image from (this can also be a base64 encoded image).
154
+ */
155
+ src?: string;
156
+ /**
157
+ * Indicates contextual information by showing a small icon on the avatar.
158
+ * Refer to status values on the Status component.
159
+ */
160
+ status?: ('approved' | 'declined' | 'locked') | ReactNode;
161
+ /**
162
+ * The index of where this avatar is in the group `stack`.
163
+ */
164
+ stackIndex?: number;
165
+ /**
166
+ * Assign specific tabIndex order to the underlying node.
167
+ */
168
+ tabIndex?: number;
169
+ /**
170
+ * Pass target down to the anchor, if href is provided.
171
+ */
172
+ target?: '_blank' | '_self' | '_top' | '_parent';
173
+ /**
174
+ * Handler to be called on click.
175
+ */
176
+ onClick?: AvatarClickEventHandler;
177
+ /**
178
+ * A `testId` prop is provided for specified elements, which is a unique string that appears as a data attribute `data-testid` in the rendered code, serving as a hook for automated tests
179
+ */
180
+ testId?: string;
181
+ /**
182
+ * Analytics context meta data
183
+ */
184
+ analyticsContext?: Record<string, any>;
185
+ }
186
+
187
+ declare type AvatarSizeMap = Record<SizeType, number>;
188
+
189
+ export declare const BORDER_WIDTH = 2;
190
+
191
+ export declare interface CustomAvatarItemProps {
192
+ testId?: string;
193
+ onClick?: MouseEventHandler;
194
+ className?: string;
195
+ href?: string;
196
+ children: ReactNode;
197
+ ref: Ref<HTMLElement>;
198
+ /**
199
+ * This is used in render props so is okay to be defined.
200
+ * eslint-disable-next-line consistent-props-definitions
201
+ */
202
+ 'aria-label'?: string;
203
+ 'aria-disabled'?: boolean | 'false' | 'true' | undefined;
204
+ }
205
+
206
+ export declare interface CustomAvatarProps {
207
+ /**
208
+ * This is used in render props so is okay to be defined.
209
+ * eslint-disable-next-line consistent-props-definitions
210
+ */
211
+ 'aria-label'?: string;
212
+ tabIndex?: number;
213
+ testId?: string;
214
+ onClick?: MouseEventHandler;
215
+ className?: string;
216
+ href?: string;
217
+ children: ReactNode;
218
+ ref: Ref<HTMLElement>;
219
+ }
220
+
221
+ export declare type IndicatorSizeType = 'small' | 'medium' | 'large' | 'xlarge';
222
+
223
+ /**
224
+ * __Avatar presence__
225
+ *
226
+ * A presence shows an avatar’s availability.
227
+ *
228
+ * - [Examples](https://atlassian.design/components/avatar/avatar-presence/examples)
229
+ * - [Code](https://atlassian.design/components/avatar/avatar-presence/code)
230
+ * - [Usage](https://atlassian.design/components/avatar/avatar-presence/usage)
231
+ */
232
+ export declare const Presence: FC<PresenceProps>;
233
+
234
+ export declare interface PresenceProps {
235
+ /**
236
+ * Used to override the default border color of the presence indicator.
237
+ * Accepts any color argument that the border-color CSS property accepts.
238
+ */
239
+ borderColor?: string;
240
+ /**
241
+ * Content to use as a custom presence indicator (usually not required if
242
+ * consuming Presence separate to Avatar).
243
+ */
244
+ children?: ReactNode;
245
+ /**
246
+ * The type of presence indicator to show
247
+ */
248
+ presence?: PresenceType;
249
+ /**
250
+ * Test Id
251
+ */
252
+ testId?: string;
253
+ }
254
+
255
+ export declare type PresenceType =
256
+ | 'busy'
257
+ | 'focus'
258
+ | 'offline'
259
+ | 'online'
260
+ | ReactNode;
261
+
262
+ export declare type SizeType =
263
+ | 'xsmall'
264
+ | 'small'
265
+ | 'medium'
266
+ | 'large'
267
+ | 'xlarge'
268
+ | 'xxlarge';
269
+
270
+ /**
271
+ * __Skeleton__
272
+ *
273
+ * A skeleton is the loading state for the avatar component.
274
+ *
275
+ * - [Examples](https://atlassian.design/components/avatar/avatar-skeleton/examples)
276
+ * - [Code](https://atlassian.design/components/avatar/avatar-skeleton/code)
277
+ */
278
+ export declare const Skeleton: FC<SkeletonProps>;
279
+
280
+ export declare interface SkeletonProps {
281
+ appearance?: AppearanceType;
282
+ color?: string;
283
+ size?: SizeType;
284
+ weight?: 'normal' | 'strong';
285
+ }
286
+
287
+ /**
288
+ * __Avatar status__
289
+ *
290
+ * An avatar status shows contextual information, such as if someone approves or declines something.
291
+ *
292
+ * - [Examples](https://atlassian.design/components/avatar/avatar-status/examples)
293
+ * - [Code](https://atlassian.design/components/avatar/avatar-status/code)
294
+ */
295
+ export declare const Status: FC<StatusProps>;
296
+
297
+ export declare interface StatusProps {
298
+ /**
299
+ * Override the default border color of the status indicator. This accepts
300
+ * any color argument that the CSS property `border-color` accepts.
301
+ */
302
+ borderColor?: string;
303
+ /**
304
+ * Content to use as a custom status indicator. Not needed if consuming
305
+ * `Status` separate to `Avatar`.
306
+ */
307
+ children?: ReactNode;
308
+ /**
309
+ * Content to use as a custom status indicator. Not needed if consuming
310
+ * `Status` separate to `Avatar`.
311
+ */
312
+ status?: StatusType;
313
+ }
314
+
315
+ export declare type StatusType =
316
+ | ('approved' | 'declined' | 'locked')
317
+ | ReactNode;
318
+
319
+ export {};
320
+ ```