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

Package detail

@kalamazoo/avatar

stevenselcuk35Apache-2.01.0.2TypeScript support: included

A component that represents a user.

atlaskit, react, ui

readme

Avatar

The Avatars represent users that are collaborating within the same application. You can use an avatar for projects, repositories and spaces within the Atlassian applications.

Installation

yarn add @kalamazoo/avatar

Usage

Detailed docs and example usage can be found here.

changelog

@kalamazoo/avatar

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 '@kalamazoo/theme';
    
    colors.colorPalette('8');

    to this:

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

    or for multi entry-point users:

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

    to this:

    import * as colorPalettes from '@kalamazoo/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:

    @kalamazoo/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:

    @kalamazoo/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 `@kalamazoo/theme/colors`;

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

    import colors from `@kalamazoo/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 @kalamazoo/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)