Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@atlaskit/avatar

atlassian202.8kApache-2.025.4.4TypeScript support: included

An avatar is a visual representation of a user or entity.

atlaskit, react, ui

readme

Avatar

An avatar is a visual representation of a user or entity.

Installation

yarn add @atlaskit/avatar

Usage

Detailed docs and example usage can be found here.

changelog

@atlaskit/avatar

25.4.4

Patch Changes

  • Updated dependencies

25.4.3

Patch Changes

  • Updated dependencies

25.4.2

Patch Changes

  • Updated dependencies

25.4.1

Patch Changes

  • eb7832f0123e5 - Updates the Avatar hexagon shape to work better with circular images.

25.4.0

Minor Changes

  • a37090c1d91de - Adds a new hexagon appearance (<Avatar appearance="hexagon">) as well as a <Skeleton appearance="hexagon"> and internal Image default loader for this. The intent with this appearance is documented as displaying AI agents: circle for users, square for app entities (teams, projects, spaces), andhexagon for agent entities.

25.3.2

Patch Changes

  • 2e422847ee061 - [ux] Revert PR (Add a new prop to set the container element for avatar content)

25.3.1

Patch Changes

  • 42beb385671cf - [ux] Add a new prop to set the container element for avatar content"

25.3.0

Minor Changes

  • e314c4cb133f7 - [ux] Updates avatar and avatar group styles to reflect our new visual design language. These changes were previously behind a feature flag and are now fully rolled out.

25.2.1

Patch Changes

  • 39e543109ec09 - add type info to forwardRef components
  • Updated dependencies

25.2.0

Minor Changes

  • 955c510552199 - We are testing a visual change behind a feature flag. Square avatar border radius will be updated to be consistent with the new ADS Tile System. If this change is successful it will be available in a later release.

Patch Changes

  • Updated dependencies

25.1.20

Patch Changes

  • 248faa32d4835 - Internal changes to how borders are applied.
  • Updated dependencies

25.1.19

Patch Changes

  • f0662cd7a143e - Internal changes to how borders are applied.
  • Updated dependencies

25.1.18

Patch Changes

  • Updated dependencies

25.1.17

Patch Changes

  • 74c2f420ee49b - Internal changes to how border radius is applied.
  • Updated dependencies

25.1.16

Patch Changes

  • Updated dependencies

25.1.15

Patch Changes

  • 23bcc5bbc9cee - Internal changes to how border radius is applied.
  • Updated dependencies

25.1.14

Patch Changes

  • cd70a377d007c - Internal changes to how border radius is applied.

25.1.13

Patch Changes

  • ef3b2dfa2f8a8 - Internal changes to use radius tokens. No visual changes.

25.1.12

Patch Changes

25.1.11

Patch Changes

  • Updated dependencies

25.1.10

Patch Changes

  • Updated dependencies

25.1.9

Patch Changes

  • Updated dependencies

25.1.8

Patch Changes

  • #193214 c661806a65543 - Internal changes to how border radius and border width values are applied. No visual change.
  • Updated dependencies

25.1.7

Patch Changes

  • Updated dependencies

25.1.6

Patch Changes

  • Updated dependencies

25.1.5

Patch Changes

  • Updated dependencies

25.1.4

Patch Changes

  • Updated dependencies

25.1.3

Patch Changes

  • Updated dependencies

25.1.2

Patch Changes

  • Updated dependencies

25.1.1

Patch Changes

25.1.0

Minor Changes

25.0.5

Patch Changes

  • Updated dependencies

25.0.4

Patch Changes

25.0.3

Patch Changes

25.0.2

Patch Changes

  • #129972 b2d69a39e6687 - Update @compiled/react dependency for improved type checking support.
  • Updated dependencies

25.0.1

Patch Changes

  • Updated dependencies

25.0.0

Major Changes

  • #122909 5330c20b7c5fd - Migrated from @emotion/react to @compiled/react in order to improve performance, align with the rest of the Atlaskit techstack, and support React 18 Streaming SSR. Please note, in order to use this version of @atlaskit/avatar, you will need to ensure that your bundler is configured to handle .css imports correctly.

    Most bundlers come with built-in support for .css imports, so you may not need to do anything. If you are using a different bundler, please refer to the documentation for that bundler to understand how to handle .css imports.

Patch Changes

  • Updated dependencies

24.0.1

Patch Changes

  • Updated dependencies

24.0.0

Major Changes

  • #119746 42617a5e15cd2 - Removes the children prop from AvatarItem, along with the CustomAvatarItemProps type. Limiting the amount of customization that can be applied. This change is in preparation for the migration from @emotion/react to Compiled CSS-in-JS.

23.0.0

Major Changes

  • #117222 a80e8994489e7 - Removes the option to provide a function to the children prop to create a custom avatar. A new AvatarContent sub-component is now available, which similarly enables custom content to be provided for the avatar. This change is in preparation for the migration from @emotion/react to Compiled CSS-in-JS.

    Example usage before and after:

    Before

    import Avatar from '@atlaskit/avatar';
    
    <Avatar>
        {(props) => (
            <span {...props}>
                Custom content
            </span>
        )}
    <Avatar>

    After

    import Avatar, { AvatarContent } from '@atlaskit/avatar';
    
    <Avatar>
        <AvatarContent>
            Custom content
        </AvatarContent>
    <Avatar>

Patch Changes

  • Updated dependencies

22.0.0

Major Changes

Patch Changes

  • Updated dependencies

21.18.4

Patch Changes

  • Updated dependencies

21.18.3

Patch Changes

21.18.2

Patch Changes

  • Updated dependencies

21.18.1

Patch Changes

  • Updated dependencies

21.18.0

Minor Changes

Patch Changes

  • Updated dependencies

21.17.9

Patch Changes

21.17.8

Patch Changes

21.17.7

Patch Changes

  • Updated dependencies

21.17.6

Patch Changes

21.17.5

Patch Changes

  • Updated dependencies

21.17.4

Patch Changes

  • Updated dependencies

21.17.3

Patch Changes

  • #165531 57f451bda8919 - Adds side-effect config to support Compiled css extraction in third-party apps

21.17.2

Patch Changes

21.17.1

Patch Changes

  • #157335 51a41686c7949 - Fixes lineheight issue for xxxsmall avatars which was throwing off the positioning of the fallback icon

21.17.0

Minor Changes

21.16.1

Patch Changes

  • Updated dependencies

21.16.0

Minor Changes

Patch Changes

  • #154751 002c8762275d8 - Fix focus styles overriding custom border styles when focus is not visible.
  • Updated dependencies

21.15.5

Patch Changes

  • Updated dependencies

21.15.4

Patch Changes

  • Updated dependencies

21.15.3

Patch Changes

  • #148281 3c4de48168ffe - Update the import path of useId* from @atlaskit/ds-lib
  • Updated dependencies

21.15.2

Patch Changes

  • Updated dependencies

21.15.1

Patch Changes

21.15.0

Minor Changes

21.14.1

Patch Changes

  • Updated dependencies

21.14.0

Minor Changes

  • #127511 db30e29344013 - Widening range of react and react-dom peer dependencies from ^16.8.0 || ^17.0.0 || ~18.2.0 to the wider range of ^16.8.0 || ^17.0.0 || ^18.0.0` (where applicable).

    This change has been done to enable usage of `react@18.3as well as to have a consistent peer dependency range forreactandreact-domfor/platform` packages.

Patch Changes

  • Updated dependencies

21.13.1

Patch Changes

  • Updated dependencies

21.13.0

Minor Changes

  • #128333 e8ee91f820e6f - Refactors the way focus-rings are applied to avatars and avatar-groups in relation to custom border colors.

Patch Changes

  • Updated dependencies

21.12.1

Patch Changes

  • Updated dependencies

21.12.0

Minor Changes

21.11.2

Patch Changes

21.11.1

Patch Changes

  • Updated dependencies

21.11.0

Minor Changes

  • #116644 40234970169dc - [ux] DSP-19190 We are testing a new visual appearance behind a feature flag. If successful it will be released at a later date.

21.10.4

Patch Changes

  • Updated dependencies

21.10.3

Patch Changes

  • Updated dependencies

21.10.2

Patch Changes

  • #113372 4b4faf5caa25a - [ux] The font size and font weight of avatar group more button is brought in line with design system guidelines.

21.10.1

Patch Changes

  • Updated dependencies

21.10.0

Minor Changes

  • #111696 20c2d58f6f8a9 - Explicitly set jsxRuntime to classic via pragma comments in order to avoid issues where jsxRuntime is implicitly set to automatic.

Patch Changes

  • Updated dependencies

21.9.2

Patch Changes

  • #110310 ea4751db471b1 - Allow maker-provided prop to override the context value for the AvatarContext's size property.
  • Updated dependencies

21.9.1

Patch Changes

  • Updated dependencies

21.9.0

Minor Changes

  • #96699 65f87a3ac916 - [ux] Increase font size of secondary text from computed 11.9px to 12px.

21.8.0

Minor Changes

21.7.0

Minor Changes

21.6.1

Patch Changes

21.6.0

Minor Changes

  • #95982 44381801376a - Creates a context to set the size prop for all avatars under the provider.

21.5.2

Patch Changes

21.5.1

Patch Changes

21.5.0

Minor Changes

21.4.6

Patch Changes

  • #70213 31068e587071 - [ux] Removes decorative images of presence and status from view of assistive technologies. The presence and status are announced as part of the labeling of the parent component and therefore no longer necessary.

21.4.5

Patch Changes

21.4.4

Patch Changes

21.4.3

Patch Changes

  • #63807 538c46e739b6 - [ux] Add accessible name to non-interactive avatars. If you are a making a test that relies on there being only a single element containing the avatar's expected text, skipping any elements with a hidden attribute will narrow down your search to only the visible element; this will make the test act the same as it would before this change.

21.4.2

Patch Changes

  • Updated dependencies

21.4.1

Patch Changes

21.4.0

Minor Changes

21.3.9

Patch Changes

21.3.8

Patch Changes

21.3.7

Patch Changes

  • #36754 4ae083a7e66 - Use @af/accessibility-testing for default jest-axe config and jest-axe import in accessibility testing.

21.3.6

Patch Changes

  • #35441 599bfe90ee3 - Internal change to use shape tokens. There is no expected visual change.

21.3.5

Patch Changes

  • #36027 342bd17ba74 - Fix presence and status props being expanded to all strings instead of the allowed values.

21.3.4

Patch Changes

  • #34811 abf69e9a4f6 - Removes usage of deprecated theme mixins in favor of static token / color usage.

21.3.3

Patch Changes

  • #34804 e2d375fa634 - Refactor how some internal styles are applied; no functional changes.

21.3.2

Patch Changes

21.3.1

Patch Changes

21.3.0

Minor Changes

Patch Changes

  • Updated dependencies

21.2.1

Patch Changes

21.2.0

Minor Changes

  • #30248 51928bbe70c - [ux] Removes status/presence indicator images from the accessibility tree for the Avatar component.

Patch Changes

  • 64f11e50567 - [ux] Adds accessible name to standalone Presence and Status components.
  • 0ecd2a2238b - Add more precision to custom component check for status and presence

21.1.10

Patch Changes

  • #30134 5aab9bfc96c - Replace gridSize in spacing values with corresponding spacing tokens

21.1.9

Patch Changes

  • Updated dependencies

21.1.8

Patch Changes

  • Updated dependencies

21.1.7

Patch Changes

  • #29390 18aeca8c199 - Internal change to update token references. There is no expected behaviour or visual change.

21.1.6

Patch Changes

  • #29227 4ee60bafc6d - ED-16603: Remove tooltips from VR tests and make them opt in. To opt-in, add allowedSideEffects when loading the page.

21.1.5

Patch Changes

  • Updated dependencies

21.1.4

Patch Changes

  • Updated dependencies

21.1.3

Patch Changes

  • Updated dependencies

21.1.2

Patch Changes

  • #26699 47f0e63c935 - Internal changes to apply spacing tokens. This should be a no-op change.

21.1.1

Patch Changes

  • #26488 bc989043572 - Internal changes to apply spacing tokens. This should be a no-op change.

21.1.0

Minor Changes

  • #24710 c1d012d6d20 - Updates @emotion/core to @emotion/react; v10 to v11. There is no expected behaviour change.

Patch Changes

  • Updated dependencies

21.0.3

Patch Changes

  • #24968 f9cd9e55e43 - Update to disabled tokens which slightly affects the opacity in disabled states

21.0.2

Patch Changes

21.0.1

Patch Changes

21.0.0

Major Changes

  • #21570 92bb02bc46b - [ux] There are no code changes required to consume this major, but you should be aware that internal changes have been made to how @atlaskit/avatar loads images.

    Before, the image loading behaviour was written in JS. Now, it leans on a standard HTML img tag if you provide a src prop, allowing it to rely on the browser to optimise the loading. These changes should result in faster image loading and an improved server-side rendering story.

    In this version, the breaking change is that you will no longer see a fallback icon while the image is loading. We have intentionally removed this loading behaviour as it is no longer consistent with our native img behaviour-first approach, and was a source of SSR bugs. Avatar images will load either instantly from the cache, or very fast from a CDN. In the edge cases where there is an error with the image src provided, we will still fall back to a default icon.

Patch Changes

  • be23a6d8ee1 - [ux] Updates color tokens used to be more semantically accurate

20.5.10

Patch Changes

  • Updated dependencies

20.5.9

Patch Changes

20.5.8

Patch Changes

  • Updated dependencies

20.5.7

Patch Changes

  • Updated dependencies

20.5.6

Patch Changes

  • Updated dependencies

20.5.5

Patch Changes

20.5.4

Patch Changes

  • 19d72473dfb - Updates usage of deprecated token names so they're aligned with the latest naming conventions. No UI or visual changes
  • Updated dependencies

20.5.3

Patch Changes

  • Updated dependencies

20.5.2

Patch Changes

  • #15998 f460cc7c411 - Builds for this package now pass through a tokens babel plugin, removing runtime invocations of the tokens() function and improving bundle size.
  • Updated dependencies

20.5.1

Patch Changes

  • Updated dependencies

20.5.0

Minor Changes

Patch Changes

  • Updated dependencies

20.4.2

Patch Changes

  • Updated dependencies

20.4.1

Patch Changes

  • #13864 0a759df738f - When Avatar is not interactive and no name prop is provided, role and an empty aria-label attributes are not rendered anymore. Screen readers consider these images as decorative now and doesn't announce them as "Unlabeled image".
  • 016d19b8038 - [ux] When avatars are disabled they no longer will appear as interactive.
  • Updated dependencies

20.4.0

Minor Changes

Patch Changes

  • Updated dependencies

20.3.3

Patch Changes

20.3.2

Patch Changes

20.3.1

Patch Changes

  • #11649 34992526ab4 - Removes duplicate dependency (@atlaskit/tooltip) from dependency array.

20.3.0

Minor Changes

  • #11113 8f84c89cad5 - [ux] The styles of overflow button of avatar group has been aligned with default button styles. Also, contrast issue of the button has been fixed.

Patch Changes

  • af5707375f7 - Internal code changes.
  • cfcefd986eb - Adds jsdoc description to exported components.
  • 4e8f13c9b8a - Renames internal props to match naming convention.
  • 1974621bc4d - Add eslint rule disable for enforcing filename and extension
  • 9e335c673bb - Rename no-type-suffix eslint rule to type-name-no-type-suffix-nor-props, and add restriction for nameing types props.
  • 1512054d655 - Fixed no-type-suffix eslint errors
  • ebd98351a30 - Corrects internal jsdoc declarations.
  • 70679cfeb04 - Fixed eslint errors by using css object notation
  • 7ea77bc9fbe - Internal changes.
  • Updated dependencies

20.2.2

Patch Changes

  • #8644 79c23df6340 - Use injected package name and version for analytics instead of version.json.
  • Updated dependencies

20.2.1

Patch Changes

20.2.0

Minor Changes

  • #8178 1a8fcbf9878 - [ux] Avatar and AvatarItem now accept a label prop which allows the components to be accessible when viewed in a screen reader. The isDisabled prop now correctly generates the appropriate markup (was a span, now a disabled button) for screen reader users.

Patch Changes

  • 8308fe23b9b - Removing incorrect cursor styles from non-interactive AvatarItems
  • Updated dependencies

20.1.1

Patch Changes

  • #7762 fe59fc62a58 - Increased the contrast for the fallback icon of the Avatar package so that it passes WCAG AA contrast requirements.

20.1.0

Minor Changes

  • #7170 4f9e6e2db5 - These packages now have defined entry points -- this means that you cannot access internal files in the packages that are not meant to be public. Sub-components in these packages have been explicitly defined, aiding tree-shaking and reducing bundle size.

Patch Changes

  • Updated dependencies

20.0.8

Patch Changes

20.0.7

Patch Changes

  • #6228 5c1b4d64ef - [ux] There were two browser specific issues in avatar component. 1- Misalignment in firefox (Interactive button avatar is incorrectly aligned) — To fix this we added font-size and font-family to button element. 2- Hover issue in safari (On hover avatar was showing rectangular background) — To fix this we have added border radius to avatar on hover.

20.0.6

Patch Changes

  • #5497 5f58283e1f - Export types using Typescript's new "export type" syntax to satisfy Typescript's --isolatedModules compiler option. This requires version 3.8 of Typescript, read more about how we handle Typescript versions here: https://atlaskit.atlassian.com/get-started Also add typescript to devDependencies to denote version that the package was built with.

20.0.5

Patch Changes

  • Updated dependencies

20.0.4

Patch Changes

  • Updated dependencies

20.0.3

Patch Changes

  • #3885 6c525a8229 - Upgraded to TypeScript 3.9.6 and tslib to 2.0.0

    Since tslib is a dependency for all our packages we recommend that products also follow this tslib upgrade to prevent duplicates of tslib being bundled.

20.0.2

Patch Changes

  • #3293 954cc87b62 - The readme and package information has been updated to point to the new design system website.

20.0.1

Patch Changes

  • #4044 dfd7418707 - Added types for function parameters in the Presence, Status and Skeleton avatar sub-components. Without these types we were unable to generate prop tables in the documentation site using extract-react-types.

20.0.0

Major Changes

  • #3428 cde426961a - Changes to Avatar in this release are intended to provide users with more flexible and performant customization options.

    Previously Avatars could only be customized like so:

    <Avatar component={Button} />

    This is restrictive in that you're not able to pass custom props or children to button without passing props directly through to Avatar first.

    Now with render props, we can enable that:

    const initials = 'MCB';
    
    <Avatar render={(props) => <Button {...props}>{initials} // custom initials etc.</Button>} />;

    Since there are significant prop and API changes we provided a codemod to help consumers upgrade their components.

    Running the codemod cli

    To run the codemod: You first need to have the latest avatar installed before you can run the codemod

    yarn upgrade @atlaskit/avatar@^19.0.0

    Once upgraded, use the Atlaskit codemod-cli;

    npx @atlaskit/codemod-cli --parser [PARSER] --extensions [FILE_EXTENSIONS] [TARGET_PATH]

    Or run npx @atlaskit/codemod-cli -h for more details on usage. For Atlassians, refer to this doc for more details on the codemod CLI.

    Change summary:

    • BREAKING: Avatar's component prop is now a renderProp and has been renamed to render
    • BREAKING: AvatarItem's component prop is now a renderProp and has been renamed to render
    • Avatar now forwards its ref
    • AvatarItem now forwards its ref
    • Type AvatarClickType has been renamed to AvatarClickEventHandler

Patch Changes

  • cacf9a3097 - Fixes a regression in AvatarItem where the default padding was 16px instead of 4px.
  • e99c1c2ac8 - Removes text decoration from AvatarItems rendered as anchor tags
  • 19b9dc6daf - Avatar now sends complete contextualised analytics metadata.
  • db053b24d8 - Update all the theme imports to be tree-shakable

19.0.0

Major Changes

Patch Changes

  • Updated dependencies

18.0.2

Patch Changes

  • #2443 1c401b41d6 - Codemod updated to target the correct avatarItem prop name
  • e3cb6026bc - Updates the v18 codemod to ensure it doesnt format files that are not relevant

18.0.1

Patch Changes

  • #2866 54a9514fcf - Build and supporting files will no longer be published to npm

18.0.0

Major Changes

  • #2137 b1fa2d6d1c - Avatar has been refactored to improve performance and be compliant with the lite-mode specification. Since there are significant prop and API changes, we will be providing a codemod to help consumers upgrade their components.

    To run the codemod:

    You first need to have the latest avatar installed before you can run the codemod

    yarn upgrade @atlaskit/avatar@^18.0.0

    Run the codemod cli

    npx @atlaskit/codemod-cli /path/to/target/directory

    For more information on @atlaskit/codemod-cli please refer to this doc

    Summary

    • Fixes re-rendering issues
    • Removes all deprecated theme API. This includes previous experimental dark-mode theme support
    • Stop accepting and spreading arbitrary props
    • Removes analytics-next HOCs in favor of hook variant (You may need to update snapshot tests)
    • Removes all usage of HOCs
    • Replaces styled-components v3 with @emotion/core to improve runtime and bundlesize

    Avatar API / PROP CHANGES

    • enableTooltip removed. Please use @atlaskit/tooltip instead
    • onClick method signature has been simplified to onChange(event, analyticsEvent)
    • isHover removed
    • isActive removed
    • isFocus removed
    • isSelected removed
    • theme removed
    • Added prop types to the component prop
    • BORDER_WIDTH is now a single value rather than an object
    • withPseudoState, getProps, getBorderRadius, getInnerStyles have been removed and are therefor no longer available. These methods were for designed for internal use and use within the AvatarGroup component.

    Avatar Item API / PROP CHANGES

    • enableTruncation renamed to isTruncationDisabled
    • onClick method signature has been simplified to onChange(event, analyticsEvent)
    • isHover removed
    • isActive removed
    • isFocus removed
    • isSelected removed
    • theme removed
    • Added prop types to the component prop

17.1.11

Patch Changes

  • Updated dependencies

17.1.10

Patch Changes

17.1.9

Patch Changes

17.1.8

Patch Changes

17.1.7

Patch Changes

17.1.6

Patch Changes

17.1.5

Patch Changes

17.1.4

Patch Changes

  • [patch]d222c2b987:

    Theme has been converted to Typescript. Typescript consumers will now get static type safety. Flow types are no longer provided.

    Breaking

    ** getTokens props changes ** When defining the value function passed into a ThemeProvider, the getTokens parameter cannot be called without props; if no props are provided an empty object {} must be passed in:

    <CustomTheme.Provider
      value={t => ({ ...t(), backgroundColor: '#333'})}
    >

    becomes:

    <CustomTheme.Provider
      value={t => ({ ...t({}), backgroundColor: '#333'})}
    >

    ** Color palette changes ** Color palettes have been moved into their own file. Users will need to update imports from this:

    import { colors } from '@atlaskit/theme';
    
    colors.colorPalette('8');

    to this:

    import { colorPalette } from '@atlaskit/theme';
    
    colorPalette.colorPalette('8');

    or for multi entry-point users:

    import * as colors from '@atlaskit/theme/colors';
    
    colors.colorPalette('8');

    to this:

    import * as colorPalettes from '@atlaskit/theme/color-palette';
    
    colorPalettes.colorPalette('8');

17.1.3

Patch Changes

  • [patch]35d2229b2a:

    Adding missing license to packages and update to Copyright 2019 Atlassian Pty Ltd.

17.1.2

Patch Changes

  • [patch]a2d0043716:

    Updated version of analytics-next to fix potential incompatibilities with TS 3.6

17.1.1

Patch Changes

  • [patch]8dff68dffa:

    AvatarItems will only present a pointer cursor if onClick or href has been supplied

17.1.0

Minor Changes

  • [minor]79689c9027:

    Adding an optional prop testId that will set the attribute value data-testid. It will help products to write better integration and end to end tests.

17.0.1

Patch Changes

  • [patch]40bda8f796:

    @atlaskit/avatar-group has been converted to Typescript. Typescript consumers will now get static type safety. Flow types are no longer provided. No API or behavioural changes.

17.0.0

Major Changes

  • [major]8d0f37c23e:

    @atlaskit/avatar has been converted to Typescript. Typescript consumers will now get static type safety. Flow types are no longer provided. No API or behavioural changes.

16.1.0

Minor Changes

16.0.14

Patch Changes

  • [patch]097b696613:

    Components now depend on TS 3.6 internally, in order to fix an issue with TS resolving non-relative imports as relative imports

16.0.13

Patch Changes

16.0.12

Patch Changes

  • [patch]708028db86:

    Change all the imports to theme in Core to use multi entry points

16.0.11

Patch Changes

  • [patch]de35ce8c67:

    Updates component maintainers

16.0.10

Patch Changes

  • [patch]926b43142b:

    Analytics-next has been converted to Typescript. Typescript consumers will now get static type safety. Flow types are no longer provided. No behavioural changes.

    Breaking changes

    • withAnalyticsForSumTypeProps alias has been removed, please use withAnalyticsEvents
    • AnalyticsContextWrappedComp alias has been removed, please use withAnalyticsContext

    Breaking changes to TypeScript annotations

    • withAnalyticsEvents now infers proptypes automatically, consumers no longer need to provide props as a generic type.
    • withAnalyticsContext now infers proptypes automatically, consumers no longer need to provide props as a generic type.
    • Type WithAnalyticsEventProps has been renamed to WithAnalyticsEventsProps to match source code
    • Type CreateUIAnalyticsEventSignature has been renamed to CreateUIAnalyticsEvent to match source code
    • Type UIAnalyticsEventHandlerSignature has been renamed to UIAnalyticsEventHandler to match source code
    • Type AnalyticsEventsPayload has been renamed to AnalyticsEventPayload
    • Type ObjectType has been removed, please use Record<string, any> or [key: string]: any
    • Type UIAnalyticsEventInterface has been removed, please use UIAnalyticsEvent
    • Type AnalyticsEventInterface has been removed, please use AnalyticsEvent
    • Type CreateAndFireEventFunction removed and should now be inferred by TypeScript
    • Type AnalyticsEventUpdater removed and should now be inferred by TypeScript

16.0.9

Patch Changes

  • [patch]d905cbc0ac:

    Adding a condition to check if the component are referenced in tests running in CI. It reduces the noise and help reading the CI log.

16.0.8

16.0.7

Patch Changes

  • [patch]9f8ab1084b:

    Consume analytics-next ts type definitions as an ambient declaration.

16.0.6

16.0.5

Patch Changes

  • [patch]4615439434:

    index.ts will now be ignored when publishing to npm

16.0.4

16.0.3

16.0.2

16.0.1

  • [patch]21854842b5:
    • Clean couple of TODO's that were already done

16.0.0

  • [major]7c17b35107:
    • Updates react and react-dom peer dependencies to react@^16.8.0 and react-dom@^16.8.0. To use this package, please ensure you use at least this version of react and react-dom.

15.0.5

  • [patch]d01ab3961b:
    • Bugfix: fixes issue with src image flickering

15.0.4

15.0.3

15.0.2

  • [patch]ea173a3ee2:
    • Internal changes only. Component is now SSR compatible. If server side rendered, Avatar Images will begin to load immediately; before client bundle is ready. If this is undesired, imageUrl can be passed in after component is mounted.

15.0.1

15.0.0

  • [major]76299208e6:

    • Drop ES5 from all the flow modules

    Dropping CJS support in all @atlaskit packages

    As a breaking change, all @atlaskit packages will be dropping cjs distributions and will only distribute esm. This means all distributed code will be transpiled, but will still contain import and export declarations.

    The major reason for doing this is to allow us to support multiple entry points in packages, e.g:

    import colors from `@atlaskit/theme/colors`;

    Previously this was sort of possible for consumers by doing something like:

    import colors from `@atlaskit/theme/dist/esm/colors`;

    This has a couple of issues. 1, it treats the file system as API making internal refactors harder, we have to worry about how consumers might be using things that aren't actually supposed to be used. 2. We are unable to do this internally in @atlaskit packages. This leads to lots of packages bundling all of theme, just to use a single color, especially in situations where tree shaking fails.

    To support being able to use multiple entrypoints internally, we unfortunately cannot have multiple distributions as they would need to have very different imports from of their own internal dependencies.

    ES Modules are widely supported by all modern bundlers and can be worked around in node environments.

    We may choose to revisit this solution in the future if we find any unintended condequences, but we see this as a pretty sane path forward which should lead to some major bundle size decreases, saner API's and simpler package architecture.

    Please reach out to #fabric-build (if in Atlassian) or create an issue in Design System Support (for external) if you have any questions or queries about this.

14.1.9

  • [patch]92d8e6317c:
    • Check if the DOM is available when rendering an AvatarImage so that SSR rendered Avatars will render with the provided image.

14.1.8

14.1.7

14.1.6

  • [patch]d13242d:
    • Change API to experimental theming API to namespace component themes into separate contexts and make theming simpler. Update all dependant components.

14.1.5

14.1.4

14.1.3

  • [patch]a981c43:
    • Update Avatar to allow to use a custom icon as status.

14.1.2

  • [patch] Adds missing implicit @babel/runtime dependency b71751b

14.1.1

  • [patch] Update avatar index exports to fix babel transpilation bug 0208158

14.1.0

  • [minor] Adds new theming API to Avatar and AvatarItem components 79dd93f

14.0.11

14.0.10

  • [patch] Fix bug where analytics was causing avatar to always have an onClick and render with onClick styles/attributes. 966f1fb

14.0.8

14.0.7

  • [patch] updated the custom component proxy to be class instead of function to fix the errors related to innerRef 06690a6
  • [none] Updated dependencies 06690a6

14.0.6

14.0.5

14.0.4

14.0.3

  • [patch] Update docs, change dev deps 25d6e48
  • [none] Updated dependencies 25d6e48

14.0.2

14.0.1

14.0.0

13.0.0

12.0.0

  • [major] Split avatar-group into its own package 8a01bcd
  • [none] Updated dependencies 8a01bcd

11.2.2

11.2.1

11.2.0

11.1.1

11.1.0

11.0.1

11.0.0

10.0.7

  • [patch] Fix text color for items with href in AvatarGroup 2cbb9ff
  • [none] Updated dependencies 2cbb9ff

10.0.6

10.0.4

  • [patch] Fix clipping of dropdown items in avatar group for certain browsers 7b82fa6

10.0.3

  • [patch] Fix avatars appearing clickable when no onClick or href prop is provided e6fec4f

10.0.2

  • [patch] Fix native tooltips appearing for avatars without a src prop 6a3fb67

10.0.0

  • [major] Bump to React 16.3. 4251858

9.2.3

  • [patch] Remove dependency on @atlaskit/polyfill as it is not being used. f0f9307
  • [patch] Add "sideEffects: false" to AKM2 packages to allow consumer's to tree-shake c3b018a

9.2.2

  • [patch] Makes packages Flow types compatible with version 0.67 25daac0

9.2.1

  • [patch] Re-releasing due to potentially broken babel release 9ed0bba

9.2.0

  • [minor] Update styled-components dependency to support versions 1.4.6 - 3 ceccf30

9.1.0

  • [minor] Create skeleton representations of various components cd628e4

9.0.4

9.0.2

  • [patch] Remove babel-plugin-react-flow-props-to-prop-types 06c1f08

9.0.1

  • [patch] Packages Flow types for elements components 3111e74

9.0.0

  • [major] onAvatarClick prop on AvatarGroup now has a second argument. This second argument is the item that was clicked on. 23a488e

8.4.1

  • [patch] Migrate Navigation from Ak repo to ak mk 2 repo, Fixed flow typing inconsistencies in ak mk 2 bdeef5b

8.4.0

  • [minor] Add React 16 support. 12ea6e4

8.3.10

  • [patch] update flow dep, fix flow errors 722ad83
  • [patch] update flow dep, fix flow errors 722ad83

8.3.6

  • [patch] migrating avatar package to new repo f3f5e51

8.3.5 (2017-11-30)

  • bug fix; release stories with fixed console errors (3321c2b)

8.3.4 (2017-11-28)

  • bug fix; fix avatar group having less width than its children (issues closed: ak-3872) (e88ee42)

8.3.3 (2017-11-23)

  • bug fix; fix avatar group's more items dropdown not being tabbable (issues closed: ak-3707) (a0ee45d)

8.3.2 (2017-11-20)

  • bug fix; fS-3907 Use Tooltip component in Avatar (2126336)

8.3.1 (2017-11-16)

  • bug fix; avatar flex styles are now explicit to fix Firefox issue (issues closed: ak-3898) (73ac57d)

8.3.0 (2017-11-16)

  • feature; added a new prop background in AvatarItem to have custom background (issues closed: ak-3706) (e93888c)

8.2.4 (2017-11-15)

  • bug fix; fix incorrect border radius on Avatars (issues closed: ak-3897) (6570495)

8.2.3 (2017-11-15)

  • bug fix; explicitly disable tooltip on avatar when rendered in a group dropdown (593f2e9)

8.2.2 (2017-11-15)

  • bug fix; improve avatar perf by caching styled components (issues closed: ak-3699) (0e6fa65)

8.2.1 (2017-11-14)

  • bug fix; add additional link target options (issues closed: ak-3886) (a932aa8)

8.2.0 (2017-11-14)

  • feature; aK-3883 Expose boundariesElement property on AvatarGroup component (78001fd)

8.1.0 (2017-11-13)

  • feature; add support for focus presence type (issues closed: ak-3758) (06b6da3)
  • bug fix; AvatarGroup more indicator fixed in Firefox (issues closed: ak-3791) (6c9464e)

8.0.11 (2017-11-02)

  • bug fix; added missing dependencies (issues closed: ak-3782) (4dbc3ef)

8.0.10 (2017-10-26)

  • bug fix; fix to rebuild stories (793b2a7)

8.0.9 (2017-10-22)

  • bug fix; update dependencies for react-16 (077d1ad)

8.0.8 (2017-10-15)

  • bug fix; fix borked styles caused by missing semicolons in CSS (issues closed: ak-3694) (07e0c54)

8.0.7 (2017-10-13)

  • bug fix; add polyfill from AK polyfills package (issues closed: ak-3667) (a841e6d)

8.0.6 (2017-10-09)

  • bug fix; remove the console error Invalid prop types for border (de45a14)

8.0.5 (2017-09-18)

  • bug fix; fix avatar isInteractive style (1296049)

8.0.4 (2017-09-12)

  • bug fix; avatars now display in Firefox when used in an Avatar Group (1db854f)

8.0.3 (2017-09-11)

  • bug fix; limit avatar + more count to maxCount size (issues closed: ak-3472) (3516192)

8.0.1 (2017-09-05)

  • bug fix; update dark theme color palette (issues closed: ak-3172) (d23e55f)

8.0.0 (2017-08-11)

  • bug fix; fix the theme-dependency (db90333)
  • breaking; affects internal styled-components implementation (d14522a)
  • breaking; implement dark mode theme (d14522a)
  • feature; dark mode for avatar (3eb7531)

7.0.0 (2017-08-11)

  • breaking; affects internal styled-components implementation (d14522a)
  • breaking; implement dark mode theme (d14522a)
  • feature; dark mode for avatar (3eb7531)

6.4.5 (2017-08-04)

  • bug fix; moves babel-plugin-react-flow-props-to-prop-types to a devDependency (6378b88)

6.4.4 (2017-08-03)

  • bug fix; fixes uncaught type error in avatar by consuming latest util-shared-styles (issues closed: ak-3067) (be705fa)

6.4.3 (2017-07-28)

  • fix; fixes avatars devDeps to include lozenge and button-group (d9ae05f)

6.4.2 (2017-07-27)

  • fix; rename jsnext:main to jsnext:experimental:main temporarily (c7508e0)

6.4.1 (2017-07-25)

  • fix; use class transform in loose mode in babel to improve load performance in apps (fde719a)

6.1.0 (2017-07-17)

  • fix; rerelease, failed prepublish scripts (5fd82f8)
  • feature; added ES module builds to dist and add jsnext:main to most ADG packages (ea76507)

5.0.0 (2017-07-12)

  • feature; added the xxlarge size to Avatar (5cfbfb5)
  • feature; adds AvatarGroup export with 'stack' and 'grid' appearances (59dac0c)
  • feature; adds AvatarItem named export to Avatar (9939bfd)
  • feature; adds name prop to Avatar (replaces label) (5cfe547)
  • feature; adds tooltips for Avatars (816402a)
  • feature; avatar how handles href, onClick and arbitrary `component` prop functionality (763e00c)
  • feature; presence prop now accepts a react element in addition to its enumerable values (rep (dfcc3f7)
  • feature; replaced presenceBorderColor prop with `borderColor` (0e4c171)

  • breaking; Removed presenceBorderColor prop (replaced with `borderColor`)

  • breaking; `icon` prop has been replaced with a more accepting `presence` prop
  • breaking; Label prop has been replaced with `name`

4.0.6 (2017-06-27)

  • fix; when src is removed after mount show default image (d3e9e2a)

4.0.4 (2017-05-26)

  • fix; change align-items: middle to align-items: center (8740b22)
  • fix; add prop-types as a dependency to avoid React 15.x warnings (92598eb)

4.0.3 (2017-05-23)

  • fix; update util-shared-styles and util-readme dependencies (9c0e218)

4.0.2 (2017-05-11)

  • fix; load avatar from src prop correctly (d94798e)

4.0.1 (2017-05-10)

  • fix; testing releasing more than 5 packages at a time (e69b832)

4.0.0 (2017-05-03)

  • feature; optional square avatar appearance (c43c905)
  • breaking; Previously you could pass a custom Presence to an Avatar via the Avatar's children. Now, these custom Presence or icon elements should be passed to the new 'icon' prop. This change has been made to avoid overloading the concept of Presence and to make the API clearer.
  • ISSUES CLOSED: AK-1645

3.0.3 (2017-04-27)

  • fix; isolate getPresenceSVG in its own module so we only export a single React Component (ca8e14b)
  • fix; remove unused constants.js, import correctly from Avatar component for tests (fcaccb9)

3.0.2 (2017-04-27)

  • fix; update legal copy to be more clear. Not all modules include ADG license. (f3a945e)

3.0.1 (2017-04-26)

  • fix; update legal copy and fix broken links for component README on npm. New contribution and (0b3e454)

3.0.0 (2017-04-13)

  • null refactor avatar to styled-components (21a371c)
  • breaking; added peerDependency "styled-components", removed dependency "classnames"
  • ISSUES CLOSED: AK-2099

2.1.5 (2017-04-04)

  • fix; fixes avatar to be able to be tested using mocha and jsdom (7a0f9fb)

2.1.4 (2017-03-23)

  • fix; Empty commit to release the component (49c08ee)

2.1.2 (2017-03-21)

  • fix; maintainers for all the packages were added (261d00a)

2.1.0 (2017-03-06)

  • feature; adds 'xsmall' size to avatar appearance (16px) (d8da663)

2.0.2 (2017-02-16)

  • fix; refactor stories to use // rather than http:// (a0826cf)

2.0.1 (2017-02-10)

  • fix; Dummy commit to release components to registry (5bac43b)