@atlaskit/avatar 25.15.0 → 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 (64) hide show
  1. package/Avatar/package.json +1 -8
  2. package/AvatarItem/package.json +1 -8
  3. package/CHANGELOG.md +34 -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 +6 -2
  14. package/dist/cjs/size-utils.js +16 -0
  15. package/dist/cjs/skeleton.js +8 -2
  16. package/dist/es2019/avatar.js +6 -2
  17. package/dist/es2019/size-utils.js +11 -0
  18. package/dist/es2019/skeleton.js +14 -7
  19. package/dist/esm/avatar.js +6 -2
  20. package/dist/esm/size-utils.js +10 -0
  21. package/dist/esm/skeleton.js +8 -2
  22. package/dist/types/size-utils.d.ts +6 -0
  23. package/get-appearance/package.json +1 -8
  24. package/package.json +22 -26
  25. package/presence/package.json +1 -8
  26. package/skeleton/package.json +1 -8
  27. package/status/package.json +1 -8
  28. package/types/package.json +1 -8
  29. package/use-avatar-context/package.json +1 -8
  30. package/dist/types-ts4.5/avatar-content.d.ts +0 -21
  31. package/dist/types-ts4.5/avatar-context.d.ts +0 -14
  32. package/dist/types-ts4.5/avatar-item.d.ts +0 -64
  33. package/dist/types-ts4.5/avatar-radius.d.ts +0 -2
  34. package/dist/types-ts4.5/avatar-sizes.d.ts +0 -2
  35. package/dist/types-ts4.5/avatar.d.ts +0 -126
  36. package/dist/types-ts4.5/constants.d.ts +0 -2
  37. package/dist/types-ts4.5/entry-points/avatar-content.d.ts +0 -1
  38. package/dist/types-ts4.5/entry-points/avatar-context.d.ts +0 -2
  39. package/dist/types-ts4.5/entry-points/avatar-item.d.ts +0 -2
  40. package/dist/types-ts4.5/entry-points/avatar.d.ts +0 -2
  41. package/dist/types-ts4.5/entry-points/constants.d.ts +0 -3
  42. package/dist/types-ts4.5/entry-points/get-appearance.d.ts +0 -1
  43. package/dist/types-ts4.5/entry-points/presence-old.d.ts +0 -3
  44. package/dist/types-ts4.5/entry-points/presence.d.ts +0 -2
  45. package/dist/types-ts4.5/entry-points/skeleton.d.ts +0 -2
  46. package/dist/types-ts4.5/entry-points/status-old.d.ts +0 -3
  47. package/dist/types-ts4.5/entry-points/status.d.ts +0 -2
  48. package/dist/types-ts4.5/entry-points/types.d.ts +0 -1
  49. package/dist/types-ts4.5/entry-points/use-avatar-context.d.ts +0 -1
  50. package/dist/types-ts4.5/get-appearance.d.ts +0 -3
  51. package/dist/types-ts4.5/index.d.ts +0 -19
  52. package/dist/types-ts4.5/internal/avatar-image.d.ts +0 -21
  53. package/dist/types-ts4.5/internal/content-context.d.ts +0 -29
  54. package/dist/types-ts4.5/internal/ensure-is-inside-avatar-context.d.ts +0 -5
  55. package/dist/types-ts4.5/internal/get-custom-element.d.ts +0 -3
  56. package/dist/types-ts4.5/internal/icon-wrapper.d.ts +0 -17
  57. package/dist/types-ts4.5/internal/presence-wrapper.d.ts +0 -19
  58. package/dist/types-ts4.5/internal/status-wrapper.d.ts +0 -19
  59. package/dist/types-ts4.5/internal/use-ensure-is-inside-avatar.d.ts +0 -1
  60. package/dist/types-ts4.5/presence.d.ts +0 -33
  61. package/dist/types-ts4.5/skeleton.d.ts +0 -34
  62. package/dist/types-ts4.5/status.d.ts +0 -32
  63. package/dist/types-ts4.5/types.d.ts +0 -8
  64. package/dist/types-ts4.5/use-avatar-context.d.ts +0 -2
@@ -21,12 +21,13 @@ var _ensureIsInsideAvatarContext = require("./internal/ensure-is-inside-avatar-c
21
21
  var _getCustomElement = _interopRequireDefault(require("./internal/get-custom-element"));
22
22
  var _presenceWrapper = _interopRequireDefault(require("./internal/presence-wrapper"));
23
23
  var _statusWrapper = _interopRequireDefault(require("./internal/status-wrapper"));
24
+ var _sizeUtils = require("./size-utils");
24
25
  var _useAvatarContext = require("./use-avatar-context");
25
26
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
26
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; }
27
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; }
28
29
  var packageName = "@atlaskit/avatar";
29
- var packageVersion = "0.0.0-development";
30
+ var packageVersion = "25.15.1";
30
31
  var containerStyles = null;
31
32
 
32
33
  // eslint-disable-next-line @repo/internal/react/consistent-types-definitions
@@ -69,7 +70,10 @@ var Avatar = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
69
70
  var _useAnalyticsEvents = (0, _analyticsNext.useAnalyticsEvents)(),
70
71
  createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
71
72
  var context = (0, _useAvatarContext.useAvatarContext)();
72
- var size = sizeProp || (context === null || context === void 0 ? void 0 : context.size) || 'medium';
73
+ var size = (0, _sizeUtils.getAvatarSize)({
74
+ appearance: appearance,
75
+ size: sizeProp || (context === null || context === void 0 ? void 0 : context.size) || 'medium'
76
+ });
73
77
  var customPresenceNode = /*#__PURE__*/(0, _react.isValidElement)(presence) ? presence : null;
74
78
  var customStatusNode = /*#__PURE__*/(0, _react.isValidElement)(status) ? status : null;
75
79
  var isValidIconSize = size !== 'xxlarge' && size !== 'xsmall';
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getAvatarSize = exports.SQUARE_AVATAR_MAX_SIZE_FF = void 0;
7
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
8
+ var SQUARE_AVATAR_MAX_SIZE_FF = exports.SQUARE_AVATAR_MAX_SIZE_FF = 'platform_square_avatar_remove_xlarge_xxlarge_sizes';
9
+ var getAvatarSize = exports.getAvatarSize = function getAvatarSize(_ref) {
10
+ var appearance = _ref.appearance,
11
+ size = _ref.size;
12
+ if (appearance === 'square' && (size === 'xlarge' || size === 'xxlarge') && (0, _platformFeatureFlags.fg)('platform_square_avatar_remove_xlarge_xxlarge_sizes')) {
13
+ return 'large';
14
+ }
15
+ return size;
16
+ };
@@ -11,6 +11,7 @@ require("./skeleton.compiled.css");
11
11
  var React = _interopRequireWildcard(require("react"));
12
12
  var _runtime = require("@compiled/react/runtime");
13
13
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
14
+ var _sizeUtils = require("./size-utils");
14
15
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
15
16
  var bgColorCssVar = '--avatar-skeleton-background-color';
16
17
  var styles = {
@@ -38,12 +39,17 @@ var sizeStyles = {
38
39
  */
39
40
  var Skeleton = function Skeleton(_ref) {
40
41
  var size = _ref.size,
41
- appearance = _ref.appearance,
42
+ _ref$appearance = _ref.appearance,
43
+ appearance = _ref$appearance === void 0 ? 'circle' : _ref$appearance,
42
44
  color = _ref.color,
43
45
  weight = _ref.weight;
46
+ var avatarSize = (0, _sizeUtils.getAvatarSize)({
47
+ appearance: appearance,
48
+ size: size !== null && size !== void 0 ? size : 'medium'
49
+ });
44
50
  return /*#__PURE__*/React.createElement("div", {
45
51
  style: (0, _defineProperty2.default)({}, bgColorCssVar, color !== null && color !== void 0 ? color : 'currentColor'),
46
- className: (0, _runtime.ax)([styles.root, sizeStyles[size !== null && size !== void 0 ? size : 'medium'], appearance === 'square' && styles.square, appearance === 'hexagon' && styles.hexagon, weight === 'strong' && styles.strongOpacity])
52
+ className: (0, _runtime.ax)([styles.root, sizeStyles[avatarSize], appearance === 'square' && styles.square, appearance === 'hexagon' && styles.hexagon, weight === 'strong' && styles.strongOpacity])
47
53
  });
48
54
  };
49
55
  var _default = exports.default = Skeleton;
@@ -12,9 +12,10 @@ import { EnsureIsInsideAvatarContext } from './internal/ensure-is-inside-avatar-
12
12
  import getCustomElement from './internal/get-custom-element';
13
13
  import PresenceWrapper from './internal/presence-wrapper';
14
14
  import StatusWrapper from './internal/status-wrapper';
15
+ import { getAvatarSize } from './size-utils';
15
16
  import { useAvatarContext } from './use-avatar-context';
16
17
  const packageName = "@atlaskit/avatar";
17
- const packageVersion = "0.0.0-development";
18
+ const packageVersion = "25.15.1";
18
19
  const containerStyles = null;
19
20
 
20
21
  // eslint-disable-next-line @repo/internal/react/consistent-types-definitions
@@ -56,7 +57,10 @@ const Avatar = /*#__PURE__*/forwardRef(({
56
57
  createAnalyticsEvent
57
58
  } = useAnalyticsEvents();
58
59
  const context = useAvatarContext();
59
- const size = sizeProp || (context === null || context === void 0 ? void 0 : context.size) || 'medium';
60
+ const size = getAvatarSize({
61
+ appearance,
62
+ size: sizeProp || (context === null || context === void 0 ? void 0 : context.size) || 'medium'
63
+ });
60
64
  const customPresenceNode = /*#__PURE__*/isValidElement(presence) ? presence : null;
61
65
  const customStatusNode = /*#__PURE__*/isValidElement(status) ? status : null;
62
66
  const isValidIconSize = size !== 'xxlarge' && size !== 'xsmall';
@@ -0,0 +1,11 @@
1
+ import { fg } from '@atlaskit/platform-feature-flags';
2
+ export const SQUARE_AVATAR_MAX_SIZE_FF = 'platform_square_avatar_remove_xlarge_xxlarge_sizes';
3
+ export const getAvatarSize = ({
4
+ appearance,
5
+ size
6
+ }) => {
7
+ if (appearance === 'square' && (size === 'xlarge' || size === 'xxlarge') && fg('platform_square_avatar_remove_xlarge_xxlarge_sizes')) {
8
+ return 'large';
9
+ }
10
+ return size;
11
+ };
@@ -2,6 +2,7 @@
2
2
  import "./skeleton.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
5
+ import { getAvatarSize } from './size-utils';
5
6
  const bgColorCssVar = '--avatar-skeleton-background-color';
6
7
  const styles = {
7
8
  root: "_2rko1qll _189e1dm9 _1dqonqa1 _1h6d1j28 _1e0c1o8l _bfhk1r8p _tzy4nh7s",
@@ -28,13 +29,19 @@ const sizeStyles = {
28
29
  */
29
30
  const Skeleton = ({
30
31
  size,
31
- appearance,
32
+ appearance = 'circle',
32
33
  color,
33
34
  weight
34
- }) => /*#__PURE__*/React.createElement("div", {
35
- style: {
36
- [bgColorCssVar]: color !== null && color !== void 0 ? color : 'currentColor'
37
- },
38
- className: ax([styles.root, sizeStyles[size !== null && size !== void 0 ? size : 'medium'], appearance === 'square' && styles.square, appearance === 'hexagon' && styles.hexagon, weight === 'strong' && styles.strongOpacity])
39
- });
35
+ }) => {
36
+ const avatarSize = getAvatarSize({
37
+ appearance,
38
+ size: size !== null && size !== void 0 ? size : 'medium'
39
+ });
40
+ return /*#__PURE__*/React.createElement("div", {
41
+ style: {
42
+ [bgColorCssVar]: color !== null && color !== void 0 ? color : 'currentColor'
43
+ },
44
+ className: ax([styles.root, sizeStyles[avatarSize], appearance === 'square' && styles.square, appearance === 'hexagon' && styles.hexagon, weight === 'strong' && styles.strongOpacity])
45
+ });
46
+ };
40
47
  export default Skeleton;
@@ -15,9 +15,10 @@ import { EnsureIsInsideAvatarContext } from './internal/ensure-is-inside-avatar-
15
15
  import getCustomElement from './internal/get-custom-element';
16
16
  import PresenceWrapper from './internal/presence-wrapper';
17
17
  import StatusWrapper from './internal/status-wrapper';
18
+ import { getAvatarSize } from './size-utils';
18
19
  import { useAvatarContext } from './use-avatar-context';
19
20
  var packageName = "@atlaskit/avatar";
20
- var packageVersion = "0.0.0-development";
21
+ var packageVersion = "25.15.1";
21
22
  var containerStyles = null;
22
23
 
23
24
  // eslint-disable-next-line @repo/internal/react/consistent-types-definitions
@@ -60,7 +61,10 @@ var Avatar = /*#__PURE__*/forwardRef(function (_ref, ref) {
60
61
  var _useAnalyticsEvents = useAnalyticsEvents(),
61
62
  createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
62
63
  var context = useAvatarContext();
63
- var size = sizeProp || (context === null || context === void 0 ? void 0 : context.size) || 'medium';
64
+ var size = getAvatarSize({
65
+ appearance: appearance,
66
+ size: sizeProp || (context === null || context === void 0 ? void 0 : context.size) || 'medium'
67
+ });
64
68
  var customPresenceNode = /*#__PURE__*/isValidElement(presence) ? presence : null;
65
69
  var customStatusNode = /*#__PURE__*/isValidElement(status) ? status : null;
66
70
  var isValidIconSize = size !== 'xxlarge' && size !== 'xsmall';
@@ -0,0 +1,10 @@
1
+ import { fg } from '@atlaskit/platform-feature-flags';
2
+ export var SQUARE_AVATAR_MAX_SIZE_FF = 'platform_square_avatar_remove_xlarge_xxlarge_sizes';
3
+ export var getAvatarSize = function getAvatarSize(_ref) {
4
+ var appearance = _ref.appearance,
5
+ size = _ref.size;
6
+ if (appearance === 'square' && (size === 'xlarge' || size === 'xxlarge') && fg('platform_square_avatar_remove_xlarge_xxlarge_sizes')) {
7
+ return 'large';
8
+ }
9
+ return size;
10
+ };
@@ -3,6 +3,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  import "./skeleton.compiled.css";
4
4
  import * as React from 'react';
5
5
  import { ax, ix } from "@compiled/react/runtime";
6
+ import { getAvatarSize } from './size-utils';
6
7
  var bgColorCssVar = '--avatar-skeleton-background-color';
7
8
  var styles = {
8
9
  root: "_2rko1qll _189e1dm9 _1dqonqa1 _1h6d1j28 _1e0c1o8l _bfhk1r8p _tzy4nh7s",
@@ -29,12 +30,17 @@ var sizeStyles = {
29
30
  */
30
31
  var Skeleton = function Skeleton(_ref) {
31
32
  var size = _ref.size,
32
- appearance = _ref.appearance,
33
+ _ref$appearance = _ref.appearance,
34
+ appearance = _ref$appearance === void 0 ? 'circle' : _ref$appearance,
33
35
  color = _ref.color,
34
36
  weight = _ref.weight;
37
+ var avatarSize = getAvatarSize({
38
+ appearance: appearance,
39
+ size: size !== null && size !== void 0 ? size : 'medium'
40
+ });
35
41
  return /*#__PURE__*/React.createElement("div", {
36
42
  style: _defineProperty({}, bgColorCssVar, color !== null && color !== void 0 ? color : 'currentColor'),
37
- className: ax([styles.root, sizeStyles[size !== null && size !== void 0 ? size : 'medium'], appearance === 'square' && styles.square, appearance === 'hexagon' && styles.hexagon, weight === 'strong' && styles.strongOpacity])
43
+ className: ax([styles.root, sizeStyles[avatarSize], appearance === 'square' && styles.square, appearance === 'hexagon' && styles.hexagon, weight === 'strong' && styles.strongOpacity])
38
44
  });
39
45
  };
40
46
  export default Skeleton;
@@ -0,0 +1,6 @@
1
+ import { type AppearanceType, type SizeType } from './types';
2
+ export declare const SQUARE_AVATAR_MAX_SIZE_FF = "platform_square_avatar_remove_xlarge_xxlarge_sizes";
3
+ export declare const getAvatarSize: ({ appearance, size, }: {
4
+ appearance: AppearanceType;
5
+ size: SizeType;
6
+ }) => SizeType;
@@ -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.0",
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:^",
@@ -74,6 +66,7 @@
74
66
  "@testing-library/react": "^16.3.0",
75
67
  "@testing-library/user-event": "^14.4.3",
76
68
  "jest-in-case": "^1.0.2",
69
+ "react": "^18.2.0",
77
70
  "react-dom": "^18.2.0"
78
71
  },
79
72
  "keywords": [
@@ -111,6 +104,9 @@
111
104
  },
112
105
  "platform-dst-motion-uplift": {
113
106
  "type": "boolean"
107
+ },
108
+ "platform_square_avatar_remove_xlarge_xxlarge_sizes": {
109
+ "type": "boolean"
114
110
  }
115
111
  }
116
112
  }
@@ -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';