@atlaskit/avatar 21.9.0 → 21.9.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.
@@ -1,7 +1,8 @@
1
1
  // eslint-disable-next-line @repo/internal/fs/filename-pattern-match
2
- import core, {
2
+ import type {
3
3
  API,
4
4
  ASTPath,
5
+ default as core,
5
6
  FileInfo,
6
7
  ImportDeclaration,
7
8
  ImportSpecifier,
@@ -1,7 +1,8 @@
1
1
  // eslint-disable-next-line @repo/internal/fs/filename-pattern-match
2
- import core, {
2
+ import type {
3
3
  API,
4
4
  ASTPath,
5
+ default as core,
5
6
  FileInfo,
6
7
  ImportDeclaration,
7
8
  ImportSpecifier,
@@ -24,7 +24,7 @@ var _templateObject;
24
24
  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; }
25
25
  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; }
26
26
  var packageName = "@atlaskit/avatar";
27
- var packageVersion = "21.9.0";
27
+ var packageVersion = "21.9.1";
28
28
 
29
29
  // eslint-disable-next-line @repo/internal/react/consistent-types-definitions
30
30
 
@@ -150,8 +150,11 @@ var Avatar = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref) {
150
150
  role: containerShouldBeImage ? 'img' : undefined,
151
151
  "aria-labelledby": containerShouldBeImage ? "".concat(uuid, "-label") : undefined,
152
152
  style: {
153
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
153
154
  display: 'inline-block',
155
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
154
156
  position: 'relative',
157
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
155
158
  outline: 0,
156
159
  zIndex: stackIndex
157
160
  }
@@ -88,6 +88,7 @@ var AvatarImage = function AvatarImage(_ref3) {
88
88
  "data-testid": testId && "".concat(testId, "--image"),
89
89
  css: avatarImageStyles,
90
90
  style: {
91
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
91
92
  borderRadius: borderRadius
92
93
  },
93
94
  onError: function onError() {
@@ -94,7 +94,9 @@ var PresenceWrapper = exports.PresenceWrapper = function PresenceWrapper(_ref2)
94
94
  "aria-hidden": "true",
95
95
  "data-testid": testId && "".concat(testId, "--presence"),
96
96
  style: {
97
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
97
98
  pointerEvents: 'none',
99
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
98
100
  position: 'absolute',
99
101
  bottom: "".concat(position, "px"),
100
102
  height: "".concat(_constants.ICON_SIZES[size], "px"),
@@ -60,7 +60,9 @@ var Skeleton = function Skeleton(_ref5) {
60
60
  color = _ref5.color,
61
61
  weight = _ref5.weight;
62
62
  return (0, _react.jsx)("div", {
63
- css: [skeletonStyles, sizeStyles[size !== null && size !== void 0 ? size : 'medium'], appearance === 'square' ? radiusStyles[size !== null && size !== void 0 ? size : 'medium'] : defaultRadiusStyles, weight === 'strong' ? strongOpacityStyles : defaultOpacityStyles],
63
+ css: [skeletonStyles, sizeStyles[size !== null && size !== void 0 ? size : 'medium'], appearance === 'square' ? radiusStyles[size !== null && size !== void 0 ? size : 'medium'] : defaultRadiusStyles, weight === 'strong' ? strongOpacityStyles : defaultOpacityStyles]
64
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
65
+ ,
64
66
  style: (0, _defineProperty2.default)({}, _constants.CSS_VAR_AVATAR_BGCOLOR, color !== null && color !== void 0 ? color : 'currentColor')
65
67
  });
66
68
  };
@@ -92,6 +92,7 @@ var StatusWrapper = exports.StatusWrapper = function StatusWrapper(_ref2) {
92
92
  "aria-hidden": "true",
93
93
  "data-testid": testId && "".concat(testId, "--status"),
94
94
  style: {
95
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
95
96
  position: 'absolute',
96
97
  height: "".concat(_constants.ICON_SIZES[size], "px"),
97
98
  right: "".concat(position, "px"),
@@ -12,7 +12,7 @@ import { PresenceWrapper } from './Presence';
12
12
  import { StatusWrapper } from './Status';
13
13
  import { getButtonProps, getCustomElement, getLinkProps } from './utilities';
14
14
  const packageName = "@atlaskit/avatar";
15
- const packageVersion = "21.9.0";
15
+ const packageVersion = "21.9.1";
16
16
 
17
17
  // eslint-disable-next-line @repo/internal/react/consistent-types-definitions
18
18
 
@@ -226,8 +226,11 @@ const Avatar = /*#__PURE__*/forwardRef(({
226
226
  role: containerShouldBeImage ? 'img' : undefined,
227
227
  "aria-labelledby": containerShouldBeImage ? `${uuid}-label` : undefined,
228
228
  style: {
229
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
229
230
  display: 'inline-block',
231
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
230
232
  position: 'relative',
233
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
231
234
  outline: 0,
232
235
  zIndex: stackIndex
233
236
  }
@@ -76,6 +76,7 @@ const AvatarImage = ({
76
76
  "data-testid": testId && `${testId}--image`,
77
77
  css: avatarImageStyles,
78
78
  style: {
79
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
79
80
  borderRadius: borderRadius
80
81
  },
81
82
  onError: () => setHasImageErrored(true),
@@ -83,7 +83,9 @@ export const PresenceWrapper = ({
83
83
  "aria-hidden": "true",
84
84
  "data-testid": testId && `${testId}--presence`,
85
85
  style: {
86
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
86
87
  pointerEvents: 'none',
88
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
87
89
  position: 'absolute',
88
90
  bottom: `${position}px`,
89
91
  height: `${ICON_SIZES[size]}px`,
@@ -52,7 +52,9 @@ const Skeleton = ({
52
52
  color,
53
53
  weight
54
54
  }) => jsx("div", {
55
- css: [skeletonStyles, sizeStyles[size !== null && size !== void 0 ? size : 'medium'], appearance === 'square' ? radiusStyles[size !== null && size !== void 0 ? size : 'medium'] : defaultRadiusStyles, weight === 'strong' ? strongOpacityStyles : defaultOpacityStyles],
55
+ css: [skeletonStyles, sizeStyles[size !== null && size !== void 0 ? size : 'medium'], appearance === 'square' ? radiusStyles[size !== null && size !== void 0 ? size : 'medium'] : defaultRadiusStyles, weight === 'strong' ? strongOpacityStyles : defaultOpacityStyles]
56
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
57
+ ,
56
58
  style: {
57
59
  [CSS_VAR_AVATAR_BGCOLOR]: color !== null && color !== void 0 ? color : 'currentColor'
58
60
  }
@@ -81,6 +81,7 @@ export const StatusWrapper = ({
81
81
  "aria-hidden": "true",
82
82
  "data-testid": testId && `${testId}--status`,
83
83
  style: {
84
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
84
85
  position: 'absolute',
85
86
  height: `${ICON_SIZES[size]}px`,
86
87
  right: `${position}px`,
@@ -17,7 +17,7 @@ import { PresenceWrapper } from './Presence';
17
17
  import { StatusWrapper } from './Status';
18
18
  import { getButtonProps, getCustomElement, getLinkProps } from './utilities';
19
19
  var packageName = "@atlaskit/avatar";
20
- var packageVersion = "21.9.0";
20
+ var packageVersion = "21.9.1";
21
21
 
22
22
  // eslint-disable-next-line @repo/internal/react/consistent-types-definitions
23
23
 
@@ -143,8 +143,11 @@ var Avatar = /*#__PURE__*/forwardRef(function (_ref2, ref) {
143
143
  role: containerShouldBeImage ? 'img' : undefined,
144
144
  "aria-labelledby": containerShouldBeImage ? "".concat(uuid, "-label") : undefined,
145
145
  style: {
146
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
146
147
  display: 'inline-block',
148
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
147
149
  position: 'relative',
150
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
148
151
  outline: 0,
149
152
  zIndex: stackIndex
150
153
  }
@@ -83,6 +83,7 @@ var AvatarImage = function AvatarImage(_ref3) {
83
83
  "data-testid": testId && "".concat(testId, "--image"),
84
84
  css: avatarImageStyles,
85
85
  style: {
86
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
86
87
  borderRadius: borderRadius
87
88
  },
88
89
  onError: function onError() {
@@ -83,7 +83,9 @@ export var PresenceWrapper = function PresenceWrapper(_ref2) {
83
83
  "aria-hidden": "true",
84
84
  "data-testid": testId && "".concat(testId, "--presence"),
85
85
  style: {
86
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
86
87
  pointerEvents: 'none',
88
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
87
89
  position: 'absolute',
88
90
  bottom: "".concat(position, "px"),
89
91
  height: "".concat(ICON_SIZES[size], "px"),
@@ -56,7 +56,9 @@ var Skeleton = function Skeleton(_ref5) {
56
56
  color = _ref5.color,
57
57
  weight = _ref5.weight;
58
58
  return jsx("div", {
59
- css: [skeletonStyles, sizeStyles[size !== null && size !== void 0 ? size : 'medium'], appearance === 'square' ? radiusStyles[size !== null && size !== void 0 ? size : 'medium'] : defaultRadiusStyles, weight === 'strong' ? strongOpacityStyles : defaultOpacityStyles],
59
+ css: [skeletonStyles, sizeStyles[size !== null && size !== void 0 ? size : 'medium'], appearance === 'square' ? radiusStyles[size !== null && size !== void 0 ? size : 'medium'] : defaultRadiusStyles, weight === 'strong' ? strongOpacityStyles : defaultOpacityStyles]
60
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
61
+ ,
60
62
  style: _defineProperty({}, CSS_VAR_AVATAR_BGCOLOR, color !== null && color !== void 0 ? color : 'currentColor')
61
63
  });
62
64
  };
@@ -81,6 +81,7 @@ export var StatusWrapper = function StatusWrapper(_ref2) {
81
81
  "aria-hidden": "true",
82
82
  "data-testid": testId && "".concat(testId, "--status"),
83
83
  style: {
84
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
84
85
  position: 'absolute',
85
86
  height: "".concat(ICON_SIZES[size], "px"),
86
87
  right: "".concat(position, "px"),
@@ -1,6 +1,6 @@
1
1
  /** @jsx jsx */
2
- import { FC } from 'react';
3
- import { AppearanceType, SizeType } from './types';
2
+ import { type FC } from 'react';
3
+ import { type AppearanceType, type SizeType } from './types';
4
4
  interface AvatarImageProps {
5
5
  appearance: AppearanceType;
6
6
  size: SizeType;
@@ -1,5 +1,5 @@
1
1
  /** @jsx jsx */
2
- import { FC, ReactNode } from 'react';
2
+ import { type FC, type ReactNode } from 'react';
3
3
  interface IconWrapperProps {
4
4
  bgColor?: string;
5
5
  children?: ReactNode;
@@ -1,5 +1,5 @@
1
- import { FC, ReactNode } from 'react';
2
- import { AppearanceType, IndicatorSizeType, Presence } from './types';
1
+ import { type FC, type ReactNode } from 'react';
2
+ import { type AppearanceType, type IndicatorSizeType, type Presence } from './types';
3
3
  export interface PresenceProps {
4
4
  /**
5
5
  * Used to override the default border color of the presence indicator.
@@ -1,6 +1,6 @@
1
1
  /** @jsx jsx */
2
- import { FC } from 'react';
3
- import { AppearanceType, SizeType } from './types';
2
+ import { type FC } from 'react';
3
+ import { type AppearanceType, type SizeType } from './types';
4
4
  export interface SkeletonProps {
5
5
  /**
6
6
  * Indicates the shape of the avatar skeleton. Most avatars are circular, but square avatars can be used for container objects.
@@ -1,5 +1,5 @@
1
- import { FC, ReactNode } from 'react';
2
- import { AppearanceType, IndicatorSizeType, Status } from './types';
1
+ import { type FC, type ReactNode } from 'react';
2
+ import { type AppearanceType, type IndicatorSizeType, type Status } from './types';
3
3
  export interface StatusProps {
4
4
  /**
5
5
  * Override the default border color of the status indicator. This accepts
@@ -1,4 +1,4 @@
1
- import { AvatarSizeMap, IndicatorSizeType } from './types';
1
+ import { type AvatarSizeMap, type IndicatorSizeType } from './types';
2
2
  export declare const AVATAR_SIZES: AvatarSizeMap;
3
3
  export declare const AVATAR_RADIUS: AvatarSizeMap;
4
4
  export declare const BORDER_WIDTH = 2;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
2
+ import { type UIAnalyticsEvent } from '@atlaskit/analytics-next';
3
3
  export type AvatarSizeMap = Record<SizeType, number>;
4
4
  export type AppearanceType = 'circle' | 'square';
5
5
  export type SizeType = 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge';
@@ -1,4 +1,4 @@
1
- import { MouseEventHandler } from 'react';
1
+ import { type MouseEventHandler } from 'react';
2
2
  export declare const getLinkProps: (href: string, target?: string) => {
3
3
  href: string;
4
4
  rel: string | null;
@@ -1,6 +1,6 @@
1
1
  /** @jsx jsx */
2
- import { FC } from 'react';
3
- import { AppearanceType, SizeType } from './types';
2
+ import { type FC } from 'react';
3
+ import { type AppearanceType, type SizeType } from './types';
4
4
  interface AvatarImageProps {
5
5
  appearance: AppearanceType;
6
6
  size: SizeType;
@@ -1,5 +1,5 @@
1
1
  /** @jsx jsx */
2
- import { FC, ReactNode } from 'react';
2
+ import { type FC, type ReactNode } from 'react';
3
3
  interface IconWrapperProps {
4
4
  bgColor?: string;
5
5
  children?: ReactNode;
@@ -1,5 +1,5 @@
1
- import { FC, ReactNode } from 'react';
2
- import { AppearanceType, IndicatorSizeType, Presence } from './types';
1
+ import { type FC, type ReactNode } from 'react';
2
+ import { type AppearanceType, type IndicatorSizeType, type Presence } from './types';
3
3
  export interface PresenceProps {
4
4
  /**
5
5
  * Used to override the default border color of the presence indicator.
@@ -1,6 +1,6 @@
1
1
  /** @jsx jsx */
2
- import { FC } from 'react';
3
- import { AppearanceType, SizeType } from './types';
2
+ import { type FC } from 'react';
3
+ import { type AppearanceType, type SizeType } from './types';
4
4
  export interface SkeletonProps {
5
5
  /**
6
6
  * Indicates the shape of the avatar skeleton. Most avatars are circular, but square avatars can be used for container objects.
@@ -1,5 +1,5 @@
1
- import { FC, ReactNode } from 'react';
2
- import { AppearanceType, IndicatorSizeType, Status } from './types';
1
+ import { type FC, type ReactNode } from 'react';
2
+ import { type AppearanceType, type IndicatorSizeType, type Status } from './types';
3
3
  export interface StatusProps {
4
4
  /**
5
5
  * Override the default border color of the status indicator. This accepts
@@ -1,4 +1,4 @@
1
- import { AvatarSizeMap, IndicatorSizeType } from './types';
1
+ import { type AvatarSizeMap, type IndicatorSizeType } from './types';
2
2
  export declare const AVATAR_SIZES: AvatarSizeMap;
3
3
  export declare const AVATAR_RADIUS: AvatarSizeMap;
4
4
  export declare const BORDER_WIDTH = 2;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
2
+ import { type UIAnalyticsEvent } from '@atlaskit/analytics-next';
3
3
  export type AvatarSizeMap = Record<SizeType, number>;
4
4
  export type AppearanceType = 'circle' | 'square';
5
5
  export type SizeType = 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge';
@@ -1,4 +1,4 @@
1
- import { MouseEventHandler } from 'react';
1
+ import { type MouseEventHandler } from 'react';
2
2
  export declare const getLinkProps: (href: string, target?: string) => {
3
3
  href: string;
4
4
  rel: string | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/avatar",
3
- "version": "21.9.0",
3
+ "version": "21.9.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/"
@@ -47,8 +47,8 @@
47
47
  "@atlaskit/analytics-next": "^9.3.0",
48
48
  "@atlaskit/icon": "^22.3.0",
49
49
  "@atlaskit/platform-feature-flags": "^0.2.0",
50
- "@atlaskit/primitives": "^6.1.0",
51
- "@atlaskit/theme": "^12.8.0",
50
+ "@atlaskit/primitives": "^7.0.0",
51
+ "@atlaskit/theme": "^12.9.0",
52
52
  "@atlaskit/tokens": "^1.49.0",
53
53
  "@babel/runtime": "^7.0.0",
54
54
  "@emotion/react": "^11.7.1",
@@ -66,7 +66,6 @@
66
66
  "@atlaskit/textfield": "^6.3.0",
67
67
  "@atlaskit/tooltip": "^18.4.0",
68
68
  "@atlaskit/visual-regression": "*",
69
- "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
70
69
  "@emotion/styled": "^11.0.0",
71
70
  "@testing-library/react": "^12.1.5",
72
71
  "@types/jscodeshift": "^0.11.0",
@@ -103,7 +102,6 @@
103
102
  }
104
103
  },
105
104
  "homepage": "https://atlassian.design/components/avatar/",
106
- "prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1",
107
105
  "platform-feature-flags": {
108
106
  "platform.design-system-team.avatar-item-font-size_830x6": {
109
107
  "type": "boolean"