@atlaskit/avatar 25.15.1 → 26.0.0

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 (58) hide show
  1. package/Avatar/package.json +1 -8
  2. package/AvatarItem/package.json +1 -8
  3. package/CHANGELOG.md +26 -0
  4. package/Presence/package.json +1 -8
  5. package/Skeleton/package.json +1 -8
  6. package/Status/package.json +1 -8
  7. package/avatar/package.json +1 -8
  8. package/avatar-content/package.json +1 -8
  9. package/avatar-context/package.json +1 -8
  10. package/avatar-item/package.json +1 -8
  11. package/avatar.docs.tsx +217 -215
  12. package/constants/package.json +1 -8
  13. package/dist/cjs/avatar.js +1 -1
  14. package/dist/es2019/avatar.js +1 -1
  15. package/dist/esm/avatar.js +1 -1
  16. package/get-appearance/package.json +1 -8
  17. package/package.json +18 -26
  18. package/presence/package.json +1 -8
  19. package/skeleton/package.json +1 -8
  20. package/status/package.json +1 -8
  21. package/types/package.json +1 -8
  22. package/use-avatar-context/package.json +1 -8
  23. package/dist/types-ts4.5/avatar-content.d.ts +0 -21
  24. package/dist/types-ts4.5/avatar-context.d.ts +0 -14
  25. package/dist/types-ts4.5/avatar-item.d.ts +0 -64
  26. package/dist/types-ts4.5/avatar-radius.d.ts +0 -2
  27. package/dist/types-ts4.5/avatar-sizes.d.ts +0 -2
  28. package/dist/types-ts4.5/avatar.d.ts +0 -126
  29. package/dist/types-ts4.5/constants.d.ts +0 -2
  30. package/dist/types-ts4.5/entry-points/avatar-content.d.ts +0 -1
  31. package/dist/types-ts4.5/entry-points/avatar-context.d.ts +0 -2
  32. package/dist/types-ts4.5/entry-points/avatar-item.d.ts +0 -2
  33. package/dist/types-ts4.5/entry-points/avatar.d.ts +0 -2
  34. package/dist/types-ts4.5/entry-points/constants.d.ts +0 -3
  35. package/dist/types-ts4.5/entry-points/get-appearance.d.ts +0 -1
  36. package/dist/types-ts4.5/entry-points/presence-old.d.ts +0 -3
  37. package/dist/types-ts4.5/entry-points/presence.d.ts +0 -2
  38. package/dist/types-ts4.5/entry-points/skeleton.d.ts +0 -2
  39. package/dist/types-ts4.5/entry-points/status-old.d.ts +0 -3
  40. package/dist/types-ts4.5/entry-points/status.d.ts +0 -2
  41. package/dist/types-ts4.5/entry-points/types.d.ts +0 -1
  42. package/dist/types-ts4.5/entry-points/use-avatar-context.d.ts +0 -1
  43. package/dist/types-ts4.5/get-appearance.d.ts +0 -3
  44. package/dist/types-ts4.5/index.d.ts +0 -19
  45. package/dist/types-ts4.5/internal/avatar-image.d.ts +0 -21
  46. package/dist/types-ts4.5/internal/content-context.d.ts +0 -29
  47. package/dist/types-ts4.5/internal/ensure-is-inside-avatar-context.d.ts +0 -5
  48. package/dist/types-ts4.5/internal/get-custom-element.d.ts +0 -3
  49. package/dist/types-ts4.5/internal/icon-wrapper.d.ts +0 -17
  50. package/dist/types-ts4.5/internal/presence-wrapper.d.ts +0 -19
  51. package/dist/types-ts4.5/internal/status-wrapper.d.ts +0 -19
  52. package/dist/types-ts4.5/internal/use-ensure-is-inside-avatar.d.ts +0 -1
  53. package/dist/types-ts4.5/presence.d.ts +0 -33
  54. package/dist/types-ts4.5/size-utils.d.ts +0 -6
  55. package/dist/types-ts4.5/skeleton.d.ts +0 -34
  56. package/dist/types-ts4.5/status.d.ts +0 -32
  57. package/dist/types-ts4.5/types.d.ts +0 -8
  58. package/dist/types-ts4.5/use-avatar-context.d.ts +0 -2
@@ -27,7 +27,7 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
27
27
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
28
28
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
29
29
  var packageName = "@atlaskit/avatar";
30
- var packageVersion = "25.15.0";
30
+ var packageVersion = "25.15.1";
31
31
  var containerStyles = null;
32
32
 
33
33
  // eslint-disable-next-line @repo/internal/react/consistent-types-definitions
@@ -15,7 +15,7 @@ import StatusWrapper from './internal/status-wrapper';
15
15
  import { getAvatarSize } from './size-utils';
16
16
  import { useAvatarContext } from './use-avatar-context';
17
17
  const packageName = "@atlaskit/avatar";
18
- const packageVersion = "25.15.0";
18
+ const packageVersion = "25.15.1";
19
19
  const containerStyles = null;
20
20
 
21
21
  // eslint-disable-next-line @repo/internal/react/consistent-types-definitions
@@ -18,7 +18,7 @@ import StatusWrapper from './internal/status-wrapper';
18
18
  import { getAvatarSize } from './size-utils';
19
19
  import { useAvatarContext } from './use-avatar-context';
20
20
  var packageName = "@atlaskit/avatar";
21
- var packageVersion = "25.15.0";
21
+ var packageVersion = "25.15.1";
22
22
  var containerStyles = null;
23
23
 
24
24
  // eslint-disable-next-line @repo/internal/react/consistent-types-definitions
@@ -6,12 +6,5 @@
6
6
  "sideEffects": [
7
7
  "**/*.compiled.css"
8
8
  ],
9
- "types": "../dist/types/entry-points/get-appearance.d.ts",
10
- "typesVersions": {
11
- ">=4.5 <5.9": {
12
- "*": [
13
- "../dist/types-ts4.5/entry-points/get-appearance.d.ts"
14
- ]
15
- }
16
- }
9
+ "types": "../dist/types/entry-points/get-appearance.d.ts"
17
10
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/avatar",
3
- "version": "25.15.1",
3
+ "version": "26.0.0",
4
4
  "description": "An avatar is a visual representation of a user or entity.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -12,14 +12,6 @@
12
12
  "module": "dist/esm/index.js",
13
13
  "module:es2019": "dist/es2019/index.js",
14
14
  "types": "dist/types/index.d.ts",
15
- "typesVersions": {
16
- ">=4.5 <4.9": {
17
- "*": [
18
- "dist/types-ts4.5/*",
19
- "dist/types-ts4.5/index.d.ts"
20
- ]
21
- }
22
- },
23
15
  "sideEffects": [
24
16
  "**/*.compiled.css"
25
17
  ],
@@ -39,13 +31,13 @@
39
31
  }
40
32
  },
41
33
  "dependencies": {
42
- "@atlaskit/analytics-next": "^11.2.0",
43
- "@atlaskit/css": "^0.19.0",
44
- "@atlaskit/ds-lib": "^7.0.0",
45
- "@atlaskit/icon": "^35.0.0",
46
- "@atlaskit/platform-feature-flags": "^1.1.0",
47
- "@atlaskit/primitives": "^19.0.0",
48
- "@atlaskit/tokens": "^13.0.0",
34
+ "@atlaskit/analytics-next": "^12.0.0",
35
+ "@atlaskit/css": "^1.0.0",
36
+ "@atlaskit/ds-lib": "^8.0.0",
37
+ "@atlaskit/icon": "^36.0.0",
38
+ "@atlaskit/platform-feature-flags": "^2.0.0",
39
+ "@atlaskit/primitives": "^20.0.0",
40
+ "@atlaskit/tokens": "^14.0.0",
49
41
  "@babel/runtime": "^7.0.0",
50
42
  "@compiled/react": "^0.20.0"
51
43
  },
@@ -56,16 +48,16 @@
56
48
  "@af/accessibility-testing": "workspace:^",
57
49
  "@af/integration-testing": "workspace:^",
58
50
  "@af/visual-regression": "workspace:^",
59
- "@atlaskit/button": "^23.11.0",
60
- "@atlaskit/code": "^17.5.0",
61
- "@atlaskit/docs": "^11.8.0",
62
- "@atlaskit/form": "^15.5.0",
63
- "@atlaskit/heading": "^5.4.0",
64
- "@atlaskit/link": "^3.4.0",
65
- "@atlaskit/range": "^10.1.0",
66
- "@atlaskit/section-message": "^8.13.0",
67
- "@atlaskit/textfield": "^8.3.0",
68
- "@atlaskit/tooltip": "^22.2.0",
51
+ "@atlaskit/button": "^24.0.0",
52
+ "@atlaskit/code": "^18.0.0",
53
+ "@atlaskit/docs": "^12.0.0",
54
+ "@atlaskit/form": "^16.0.0",
55
+ "@atlaskit/heading": "^6.0.0",
56
+ "@atlaskit/link": "^4.0.0",
57
+ "@atlaskit/range": "^11.0.0",
58
+ "@atlaskit/section-message": "^9.0.0",
59
+ "@atlaskit/textfield": "^9.0.0",
60
+ "@atlaskit/tooltip": "^23.0.0",
69
61
  "@atlassian/feature-flags-test-utils": "^1.1.0",
70
62
  "@atlassian/react-compiler-gating": "workspace:^",
71
63
  "@atlassian/ssr-tests": "workspace:^",
@@ -6,12 +6,5 @@
6
6
  "sideEffects": [
7
7
  "**/*.compiled.css"
8
8
  ],
9
- "types": "../dist/types/entry-points/presence.d.ts",
10
- "typesVersions": {
11
- ">=4.5 <5.9": {
12
- "*": [
13
- "../dist/types-ts4.5/entry-points/presence.d.ts"
14
- ]
15
- }
16
- }
9
+ "types": "../dist/types/entry-points/presence.d.ts"
17
10
  }
@@ -6,12 +6,5 @@
6
6
  "sideEffects": [
7
7
  "**/*.compiled.css"
8
8
  ],
9
- "types": "../dist/types/entry-points/skeleton.d.ts",
10
- "typesVersions": {
11
- ">=4.5 <5.9": {
12
- "*": [
13
- "../dist/types-ts4.5/entry-points/skeleton.d.ts"
14
- ]
15
- }
16
- }
9
+ "types": "../dist/types/entry-points/skeleton.d.ts"
17
10
  }
@@ -6,12 +6,5 @@
6
6
  "sideEffects": [
7
7
  "**/*.compiled.css"
8
8
  ],
9
- "types": "../dist/types/entry-points/status.d.ts",
10
- "typesVersions": {
11
- ">=4.5 <5.9": {
12
- "*": [
13
- "../dist/types-ts4.5/entry-points/status.d.ts"
14
- ]
15
- }
16
- }
9
+ "types": "../dist/types/entry-points/status.d.ts"
17
10
  }
@@ -6,12 +6,5 @@
6
6
  "sideEffects": [
7
7
  "**/*.compiled.css"
8
8
  ],
9
- "types": "../dist/types/entry-points/types.d.ts",
10
- "typesVersions": {
11
- ">=4.5 <5.9": {
12
- "*": [
13
- "../dist/types-ts4.5/entry-points/types.d.ts"
14
- ]
15
- }
16
- }
9
+ "types": "../dist/types/entry-points/types.d.ts"
17
10
  }
@@ -6,12 +6,5 @@
6
6
  "sideEffects": [
7
7
  "**/*.compiled.css"
8
8
  ],
9
- "types": "../dist/types/entry-points/use-avatar-context.d.ts",
10
- "typesVersions": {
11
- ">=4.5 <5.9": {
12
- "*": [
13
- "../dist/types-ts4.5/entry-points/use-avatar-context.d.ts"
14
- ]
15
- }
16
- }
9
+ "types": "../dist/types/entry-points/use-avatar-context.d.ts"
17
10
  }
@@ -1,21 +0,0 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- * @jsxFrag
5
- */
6
- import { type ReactNode } from 'react';
7
- type AvatarContentProps = {
8
- children?: ReactNode;
9
- };
10
- /**
11
- * __Avatar content__
12
- *
13
- * Avatar content renders the avatar content. It can be composed with the Avatar component
14
- * to create a custom avatar.
15
- *
16
- * - [Examples](https://atlassian.design/components/avatar/examples)
17
- * - [Code](https://atlassian.design/components/avatar/code)
18
- * - [Usage](https://atlassian.design/components/avatar/usage)
19
- */
20
- export declare const AvatarContent: React.ForwardRefExoticComponent<React.PropsWithoutRef<AvatarContentProps> & React.RefAttributes<HTMLElement>>;
21
- export {};
@@ -1,14 +0,0 @@
1
- import { type SizeType } from './types';
2
- export type AvatarContextProps = {
3
- size: SizeType;
4
- };
5
- /**
6
- * __Avatar context__
7
- *
8
- * An avatar context that provides the size of the avatar to children. Used by AvatarGroup
9
- *
10
- * - [Examples](https://atlassian.design/components/avatar/examples)
11
- * - [Code](https://atlassian.design/components/avatar/code)
12
- * - [Usage](https://atlassian.design/components/avatar/usage)
13
- */
14
- export declare const AvatarContext: import('react').Context<AvatarContextProps | undefined>;
@@ -1,64 +0,0 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- import { type ReactNode } from 'react';
6
- import { type AvatarClickEventHandler } from './types';
7
- export interface AvatarItemProps {
8
- /**
9
- * Used to provide better content to screen readers when using presence/status. Rather
10
- * than a screen reader speaking "online, approved, John Smith", passing in an label
11
- * allows a custom message like "John Smith (approved and online)".
12
- */
13
- label?: string;
14
- /**
15
- * Slot to place an avatar element. Use @atlaskit/avatar.
16
- */
17
- avatar: ReactNode;
18
- /**
19
- * Change background color.
20
- */
21
- backgroundColor?: string;
22
- /**
23
- * URL for avatars being used as a link.
24
- */
25
- href?: string;
26
- /**
27
- * Disable the item from being interactive.
28
- */
29
- isDisabled?: boolean;
30
- /**
31
- * Handler to be called on click.
32
- */
33
- onClick?: AvatarClickEventHandler;
34
- /**
35
- * PrimaryText text.
36
- */
37
- primaryText?: ReactNode;
38
- /**
39
- * SecondaryText text.
40
- */
41
- secondaryText?: ReactNode;
42
- /**
43
- * Pass target down to the anchor, if href is provided.
44
- */
45
- target?: '_blank' | '_self' | '_top' | '_parent';
46
- /**
47
- * By default, overflowing text is truncated if it exceeds the container width. Use this prop to disable this.
48
- */
49
- isTruncationDisabled?: boolean;
50
- /**
51
- * 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.
52
- */
53
- testId?: string;
54
- }
55
- /**
56
- * __Avatar item__
57
- *
58
- * An avatar item is a wrapper that goes around an avatar when it's displayed alongside text, such as a name or status.
59
- *
60
- * - [Examples](https://atlassian.design/components/avatar/avatar-item/examples)
61
- * - [Code](https://atlassian.design/components/avatar/avatar-item/code)
62
- */
63
- declare const AvatarItem: React.ForwardRefExoticComponent<React.PropsWithoutRef<AvatarItemProps> & React.RefAttributes<HTMLElement>>;
64
- export default AvatarItem;
@@ -1,2 +0,0 @@
1
- import { type AvatarSizeMap } from './types';
2
- export declare const AVATAR_RADIUS: AvatarSizeMap;
@@ -1,2 +0,0 @@
1
- import { type AvatarSizeMap } from './types';
2
- export declare const AVATAR_SIZES: AvatarSizeMap;
@@ -1,126 +0,0 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- import { type ReactNode } from 'react';
6
- import { type AppearanceType, type AvatarClickEventHandler, type Presence, type SizeType, type Status } from './types';
7
- export interface AvatarPropTypes {
8
- /**
9
- * Indicates the shape of the avatar. Most avatars are circular, but square avatars
10
- * can be used for 'container' objects.
11
- */
12
- appearance?: AppearanceType;
13
- /**
14
- * Used to provide custom content to screen readers.
15
- * Status or presence is not added to the label by default if it passed as nodes.
16
- * If status or presence is passed as a string, the default content format is "John Smith (online)".
17
- */
18
- label?: string;
19
- /**
20
- * Used to override the default border color around the avatar body.
21
- * Accepts any color argument that the border-color CSS property accepts.
22
- */
23
- borderColor?: string;
24
- /**
25
- * Supply a custom avatar component instead of the default.
26
- */
27
- children?: ReactNode;
28
- /**
29
- * Provides a url for avatars being used as a link.
30
- */
31
- href?: string;
32
- /**
33
- * Change the style to indicate the avatar is disabled.
34
- */
35
- isDisabled?: boolean;
36
- /**
37
- * Provides alt text for the avatar image.
38
- */
39
- name?: string;
40
- /**
41
- * Indicates a user's online status by showing a small icon on the avatar.
42
- * Refer to presence values on the presence component.
43
- * Alternatively accepts any React element. For best results, it is recommended to
44
- * use square content with height and width of 100%.
45
- */
46
- presence?: Presence | Omit<ReactNode, string> | (string & {}) | null;
47
- /**
48
- * Defines the size of the avatar. Default value is `medium`.
49
- *
50
- * This can also be controlled by the `size` property of the
51
- * `AvatarContext` export from this package. If no prop is given when the
52
- * `size` is set via this context, the context's value will be used.
53
- */
54
- size?: SizeType;
55
- /**
56
- * A url to load an image from (this can also be a base64 encoded image).
57
- */
58
- src?: string;
59
- /**
60
- * Indicates contextual information by showing a small icon on the avatar.
61
- * Refer to status values on the Status component.
62
- */
63
- status?: Status | Omit<ReactNode, string> | (string & {}) | null;
64
- /**
65
- * The index of where this avatar is in the group `stack`.
66
- */
67
- stackIndex?: number;
68
- /**
69
- * Assign specific tabIndex order to the underlying node.
70
- */
71
- tabIndex?: number;
72
- /**
73
- * Pass target down to the anchor, if href is provided.
74
- */
75
- target?: '_blank' | '_self' | '_top' | '_parent';
76
- /**
77
- * Handler to be called on click.
78
- */
79
- onClick?: AvatarClickEventHandler;
80
- /**
81
- * 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.
82
- */
83
- testId?: string;
84
- /**
85
- * Analytics context meta data.
86
- */
87
- analyticsContext?: Record<string, any>;
88
- /**
89
- * Replace the wrapping element. This accepts the name of a html tag which will
90
- * be used to wrap the element.
91
- */
92
- as?: keyof JSX.IntrinsicElements | React.ComponentType<React.AllHTMLAttributes<HTMLElement>>;
93
- /**
94
- * whether disable aria-labelledby for avatar img
95
- */
96
- isDecorative?: boolean;
97
- /**
98
- * Defines the loading behaviour of the avatar image. Default value is eager.
99
- */
100
- imgLoading?: 'lazy' | 'eager';
101
- /**
102
- * Identifies the popup element that the avatar controls.
103
- * Used when Avatar is a trigger for a popup.
104
- */
105
- 'aria-controls'?: string;
106
- /**
107
- * Announces to assistive technology whether the controlled popup is currently open or closed.
108
- */
109
- 'aria-expanded'?: boolean;
110
- /**
111
- * Informs assistive technology that this element triggers a popup.
112
- * When set, Avatar will render as a `<button>` element even without `onClick`.
113
- */
114
- 'aria-haspopup'?: boolean | 'dialog';
115
- }
116
- /**
117
- * __Avatar__
118
- *
119
- * An avatar is a visual representation of a user or entity.
120
- *
121
- * - [Examples](https://atlassian.design/components/avatar/examples)
122
- * - [Code](https://atlassian.design/components/avatar/code)
123
- * - [Usage](https://atlassian.design/components/avatar/usage)
124
- */
125
- declare const Avatar: React.ForwardRefExoticComponent<React.PropsWithoutRef<AvatarPropTypes> & React.RefAttributes<HTMLElement>>;
126
- export default Avatar;
@@ -1,2 +0,0 @@
1
- export declare const BORDER_WIDTH = 2;
2
- export declare const ACTIVE_SCALE_FACTOR = 0.9;
@@ -1 +0,0 @@
1
- export { AvatarContent } from '../avatar-content';
@@ -1,2 +0,0 @@
1
- export { AvatarContext } from '../avatar-context';
2
- export type { AvatarContextProps } from '../avatar-context';
@@ -1,2 +0,0 @@
1
- export type { AvatarItemProps } from '../avatar-item';
2
- export { default } from '../avatar-item';
@@ -1,2 +0,0 @@
1
- export type { AvatarPropTypes } from '../avatar';
2
- export { default } from '../avatar';
@@ -1,3 +0,0 @@
1
- export { ACTIVE_SCALE_FACTOR, BORDER_WIDTH } from '../constants';
2
- export { AVATAR_RADIUS } from '../avatar-radius';
3
- export { AVATAR_SIZES } from '../avatar-sizes';
@@ -1 +0,0 @@
1
- export { default } from '../get-appearance';
@@ -1,3 +0,0 @@
1
- export { default } from '../presence';
2
- export type { PresenceProps } from '../presence';
3
- export type { Presence as PresenceType } from '../types';
@@ -1,2 +0,0 @@
1
- export { default } from '../presence';
2
- export type { PresenceProps } from '../presence';
@@ -1,2 +0,0 @@
1
- export type { SkeletonProps } from '../skeleton';
2
- export { default } from '../skeleton';
@@ -1,3 +0,0 @@
1
- export { default } from '../status';
2
- export type { StatusProps } from '../status';
3
- export type { Status as StatusType } from '../types';
@@ -1,2 +0,0 @@
1
- export { default } from '../status';
2
- export type { StatusProps } from '../status';
@@ -1 +0,0 @@
1
- export type { AppearanceType, AvatarClickEventHandler, AvatarSizeMap, IndicatorSizeType, Presence as PresenceType, SizeType, Status as StatusType, } from '../types';
@@ -1 +0,0 @@
1
- export { useAvatarContext } from '../use-avatar-context';
@@ -1,3 +0,0 @@
1
- import type { AppearanceType } from './types';
2
- declare const getAppearanceForAppType: (appType: string | null | undefined) => AppearanceType;
3
- export default getAppearanceForAppType;
@@ -1,19 +0,0 @@
1
- export { default } from './avatar';
2
- export type { AvatarPropTypes } from './avatar';
3
- export { AvatarContent } from './avatar-content';
4
- export { default as AvatarItem } from './avatar-item';
5
- export type { AvatarItemProps } from './avatar-item';
6
- export { default as Presence } from './presence';
7
- export type { PresenceProps } from './presence';
8
- export { default as Status } from './status';
9
- export type { StatusProps } from './status';
10
- export { default as Skeleton } from './skeleton';
11
- export type { SkeletonProps } from './skeleton';
12
- export { default as getAppearanceForAppType } from './get-appearance';
13
- export { AvatarContext } from './avatar-context';
14
- export type { AvatarContextProps } from './avatar-context';
15
- export { useAvatarContext } from './use-avatar-context';
16
- export { BORDER_WIDTH, ACTIVE_SCALE_FACTOR } from './constants';
17
- export { AVATAR_SIZES } from './avatar-sizes';
18
- export { AVATAR_RADIUS } from './avatar-radius';
19
- export type { AvatarClickEventHandler, AppearanceType, SizeType, Presence as PresenceType, Status as StatusType, IndicatorSizeType, } from './types';
@@ -1,21 +0,0 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- import { type FC } from 'react';
6
- import { type AppearanceType, type SizeType } from '../types';
7
- interface AvatarImageProps {
8
- appearance: AppearanceType;
9
- size: SizeType;
10
- alt?: string;
11
- src?: string;
12
- testId?: string;
13
- imgLoading?: 'lazy' | 'eager';
14
- }
15
- /**
16
- * __Avatar image__
17
- *
18
- * An avatar image is an internal component used to control the rendering phases of an image.
19
- */
20
- declare const AvatarImage: FC<AvatarImageProps>;
21
- export default AvatarImage;
@@ -1,29 +0,0 @@
1
- import { type ForwardedRef, type MouseEventHandler, type ReactNode } from 'react';
2
- import { type AppearanceType, type SizeType } from '../types';
3
- type AvatarContentContextProps = {
4
- as: 'a' | 'button' | 'span';
5
- appearance: AppearanceType;
6
- avatarImage: ReactNode;
7
- borderColor?: string;
8
- href?: string;
9
- isDisabled?: boolean;
10
- label?: string;
11
- onClick?: MouseEventHandler;
12
- ref: ForwardedRef<HTMLElement>;
13
- tabIndex?: number;
14
- target?: '_blank' | '_self' | '_top' | '_parent';
15
- testId?: string;
16
- size: SizeType;
17
- stackIndex?: number;
18
- 'aria-controls'?: string;
19
- 'aria-expanded'?: boolean;
20
- 'aria-haspopup'?: boolean | 'dialog';
21
- };
22
- /**
23
- * __Avatar content context__
24
- *
25
- * This context provides the props for the AvatarContent component, enabling
26
- * consumers to compose the AvatarContent with the Avatar component.
27
- */
28
- export declare const AvatarContentContext: import('react').Context<AvatarContentContextProps>;
29
- export {};
@@ -1,5 +0,0 @@
1
- /**
2
- * Used to ensure Avatar sub-components are used within a Avatar component,
3
- * and provide a useful error message if not.
4
- */
5
- export declare const EnsureIsInsideAvatarContext: import('react').Context<boolean>;
@@ -1,3 +0,0 @@
1
- import { type MouseEventHandler } from 'react';
2
- declare const getCustomElement: (isDisabled?: boolean, href?: string, onClick?: MouseEventHandler, ariaHasPopup?: boolean | 'dialog') => 'a' | 'button' | 'span';
3
- export default getCustomElement;
@@ -1,17 +0,0 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- import { type FC, type ReactNode } from 'react';
6
- interface IconWrapperProps {
7
- bgColor?: string;
8
- children?: ReactNode;
9
- label?: string;
10
- }
11
- /**
12
- * __Icon wrapper__
13
- *
14
- * An icon wrapper is used internally only.
15
- */
16
- declare const IconWrapper: FC<IconWrapperProps>;
17
- export default IconWrapper;
@@ -1,19 +0,0 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- import { type FC } from 'react';
6
- import { type PresenceProps } from '../presence';
7
- import { type AppearanceType, type IndicatorSizeType } from '../types';
8
- interface PresenceWrapperProps extends PresenceProps {
9
- appearance: AppearanceType;
10
- size: IndicatorSizeType;
11
- testId?: string;
12
- }
13
- /**
14
- * __Presence wrapper__
15
- *
16
- * A presence wrapper is used internally to position presence ontop of the avatar.
17
- */
18
- declare const PresenceWrapper: FC<PresenceWrapperProps>;
19
- export default PresenceWrapper;
@@ -1,19 +0,0 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- import { type FC } from 'react';
6
- import { type StatusProps } from '../status';
7
- import { type AppearanceType, type IndicatorSizeType } from '../types';
8
- interface StatusWrapperProps extends StatusProps {
9
- appearance: AppearanceType;
10
- size: IndicatorSizeType;
11
- testId?: string;
12
- }
13
- /**
14
- * __Status wrapper__
15
- *
16
- * A status wrapper is used internally to position status on top of the avatar.
17
- */
18
- declare const StatusWrapper: FC<StatusWrapperProps>;
19
- export default StatusWrapper;
@@ -1 +0,0 @@
1
- export declare const useEnsureIsInsideAvatar: () => void;