@atlaskit/avatar 21.1.0 → 21.1.2

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/avatar
2
2
 
3
+ ## 21.1.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`47f0e63c935`](https://bitbucket.org/atlassian/atlassian-frontend/commits/47f0e63c935) - Internal changes to apply spacing tokens. This should be a no-op change.
8
+
9
+ ## 21.1.1
10
+
11
+ ### Patch Changes
12
+
13
+ - [`bc989043572`](https://bitbucket.org/atlassian/atlassian-frontend/commits/bc989043572) - Internal changes to apply spacing tokens. This should be a no-op change.
14
+
3
15
  ## 21.1.0
4
16
 
5
17
  ### Minor Changes
@@ -38,7 +38,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
38
38
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
39
39
 
40
40
  var packageName = "@atlaskit/avatar";
41
- var packageVersion = "21.1.0";
41
+ var packageVersion = "21.1.2";
42
42
 
43
43
  var getStyles = function getStyles(css, _ref) {
44
44
  var size = _ref.size,
@@ -50,7 +50,7 @@ var getStyles = function getStyles(css, _ref) {
50
50
  isInteractive = _ref.isInteractive,
51
51
  isDisabled = _ref.isDisabled;
52
52
  return (//eslint-disable-next-line @repo/internal/react/no-css-string-literals
53
- css(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n height: ", "px;\n width: ", "px;\n align-items: stretch;\n background-color: ", ";\n border-radius: ", ";\n box-sizing: content-box;\n cursor: inherit;\n display: flex;\n flex-direction: column;\n justify-content: center;\n outline: none;\n overflow: hidden;\n position: static;\n transform: translateZ(0);\n transition: transform 200ms, opacity 200ms;\n box-shadow: 0 0 0 ", "px ", ";\n border: none;\n margin: ", "px;\n padding: 0;\n\n /* Added font-size and font-family styles to fix alignment issue in firefox for interactive button avatar */\n font-size: inherit;\n font-family: inherit;\n\n &::-moz-focus-inner {\n border: 0;\n margin: 0;\n padding: 0;\n }\n\n &::after {\n background-color: transparent;\n bottom: 0px;\n\n /* Added border-radius style to fix hover issue in safari */\n border-radius: ", ";\n content: ' ';\n left: 0px;\n opacity: 0;\n pointer-events: none;\n position: absolute;\n right: 0px;\n top: 0px;\n transition: opacity 200ms;\n width: 100%;\n }\n\n ", "\n\n ", "\n\n ", "\n "])), size, size, borderColor, appearance === 'circle' ? '50%' : "".concat(radius, "px"), _constants.BORDER_WIDTH, borderColor, _constants.BORDER_WIDTH, appearance === 'circle' ? '50%' : "".concat(radius, "px"), stackIndex && "position: relative;", isInteractive && "\n cursor: pointer;\n\n :focus {\n outline: none;\n box-shadow: 0 0 0 ".concat(_constants.BORDER_WIDTH, "px ", "var(--ds-border-focused, ".concat(_colors.B300, ")"), "\n }\n\n :hover {\n &::after {\n background-color: ", "var(--ds-interaction-hovered, ".concat(_colors.N70A, ")"), ";\n opacity: 1;\n }\n }\n\n :active {\n &::after {\n background-color: ", "var(--ds-interaction-pressed, ".concat(_colors.N70A, ")"), ";\n opacity: 1;\n }\n }\n\n :active {\n transform: scale(").concat(_constants.ACTIVE_SCALE_FACTOR, ");\n }\n\n @media screen and (forced-colors: active) {\n &:focus-visible {\n outline: 1px solid\n }\n }\n "), isDisabled && "\n cursor: not-allowed;\n\n &::after {\n opacity: ".concat("var(--ds-opacity-disabled, 0.7)", ";\n pointer-events: none;\n background-color: ", "var(--ds-surface, ".concat(_colors.N0, ")"), ";\n }\n "))
53
+ css(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n height: ", "px;\n width: ", "px;\n align-items: stretch;\n background-color: ", ";\n border-radius: ", ";\n box-sizing: content-box;\n cursor: inherit;\n display: flex;\n flex-direction: column;\n justify-content: center;\n outline: none;\n overflow: hidden;\n position: static;\n transform: translateZ(0);\n transition: transform 200ms, opacity 200ms;\n box-shadow: 0 0 0 ", "px ", ";\n border: none;\n margin: ", "px;\n padding: ", ";\n\n /* Added font-size and font-family styles to fix alignment issue in firefox for interactive button avatar */\n font-size: inherit;\n font-family: inherit;\n\n &::-moz-focus-inner {\n border: 0;\n margin: ", ";\n padding: ", ";\n }\n\n &::after {\n background-color: transparent;\n bottom: 0px;\n\n /* Added border-radius style to fix hover issue in safari */\n border-radius: ", ";\n content: ' ';\n left: 0px;\n opacity: 0;\n pointer-events: none;\n position: absolute;\n right: 0px;\n top: 0px;\n transition: opacity 200ms;\n width: 100%;\n }\n\n ", "\n\n ", "\n\n ", "\n "])), size, size, borderColor, appearance === 'circle' ? '50%' : "".concat(radius, "px"), _constants.BORDER_WIDTH, borderColor, _constants.BORDER_WIDTH, "var(--ds-scale-0, 0px)", "var(--ds-scale-0, 0px)", "var(--ds-scale-0, 0px)", appearance === 'circle' ? '50%' : "".concat(radius, "px"), stackIndex && "position: relative;", isInteractive && "\n cursor: pointer;\n\n :focus {\n outline: none;\n box-shadow: 0 0 0 ".concat(_constants.BORDER_WIDTH, "px ", "var(--ds-border-focused, ".concat(_colors.B300, ")"), "\n }\n\n :hover {\n &::after {\n background-color: ", "var(--ds-interaction-hovered, ".concat(_colors.N70A, ")"), ";\n opacity: 1;\n }\n }\n\n :active {\n &::after {\n background-color: ", "var(--ds-interaction-pressed, ".concat(_colors.N70A, ")"), ";\n opacity: 1;\n }\n }\n\n :active {\n transform: scale(").concat(_constants.ACTIVE_SCALE_FACTOR, ");\n }\n\n @media screen and (forced-colors: active) {\n &:focus-visible {\n outline: 1px solid\n }\n }\n "), isDisabled && "\n cursor: not-allowed;\n\n &::after {\n opacity: ".concat("var(--ds-opacity-disabled, 0.7)", ";\n pointer-events: none;\n background-color: ", "var(--ds-surface, ".concat(_colors.N0, ")"), ";\n }\n "))
54
54
  );
55
55
  };
56
56
  /**
@@ -34,8 +34,10 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
34
34
  var avatarItemStyles = (0, _react2.css)({
35
35
  minWidth: 0,
36
36
  maxWidth: '100%',
37
- paddingLeft: "".concat((0, _constants.gridSize)(), "px"),
37
+ // TODO Delete this comment after verifying spacing token -> previous value ``${gridSize()}px``
38
+ paddingLeft: "var(--ds-scale-100, 8px)",
38
39
  flex: '1 1 100%',
40
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
39
41
  lineHeight: '1.4'
40
42
  });
41
43
 
@@ -44,7 +46,7 @@ var getStyles = function getStyles(css, _ref) {
44
46
  isInteractive = _ref.isInteractive,
45
47
  isDisabled = _ref.isDisabled;
46
48
  return (//eslint-disable-next-line @repo/internal/react/no-css-string-literals
47
- css(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n align-items: center;\n background-color: ", ";\n border-radius: ", "px;\n border: ", "px solid transparent;\n box-sizing: border-box;\n color: inherit;\n display: flex;\n font-size: inherit;\n font-style: normal;\n font-weight: normal;\n line-height: 1;\n outline: none;\n margin: 0;\n padding: ", "px;\n text-align: left;\n text-decoration: none;\n width: 100%;\n\n ", "\n\n ", "\n "])), backgroundColor, (0, _constants.borderRadius)(), _constants2.BORDER_WIDTH, (0, _constants.gridSize)() / 2, isInteractive && "\n :hover {\n background-color: ".concat("var(--ds-background-neutral-subtle-hovered, ".concat((0, _colors.backgroundHover)(), ")"), ";\n cursor: pointer;\n text-decoration: none;\n }\n\n :focus {\n outline: none;\n border-color: ", "var(--ds-border-focused, ".concat(_colors.B200, ")"), ";\n }\n\n :active {\n background-color: ", "var(--ds-background-neutral-subtle-pressed, ".concat((0, _colors.backgroundActive)(), ")"), ";\n }\n "), isDisabled && "\n cursor: not-allowed;\n opacity: ".concat("var(--ds-opacity-disabled, 0.5)", ";\n pointer-events: none;\n "))
49
+ css(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n align-items: center;\n background-color: ", ";\n border-radius: ", "px;\n border: ", "px solid transparent;\n box-sizing: border-box;\n color: inherit;\n display: flex;\n font-size: inherit;\n font-style: normal;\n font-weight: normal;\n line-height: 1;\n outline: none;\n margin: ", ";\n padding: ", ";\n text-align: left;\n text-decoration: none;\n width: 100%;\n\n ", "\n\n ", "\n "])), backgroundColor, (0, _constants.borderRadius)(), _constants2.BORDER_WIDTH, "var(--ds-scale-0, 0px)", "var(--ds-scale-050, 4px)", isInteractive && "\n :hover {\n background-color: ".concat("var(--ds-background-neutral-subtle-hovered, ".concat((0, _colors.backgroundHover)(), ")"), ";\n cursor: pointer;\n text-decoration: none;\n }\n\n :focus {\n outline: none;\n border-color: ", "var(--ds-border-focused, ".concat(_colors.B200, ")"), ";\n }\n\n :active {\n background-color: ", "var(--ds-background-neutral-subtle-pressed, ".concat((0, _colors.backgroundActive)(), ")"), ";\n }\n "), isDisabled && "\n cursor: not-allowed;\n opacity: ".concat("var(--ds-opacity-disabled, 0.5)", ";\n pointer-events: none;\n "))
48
50
  );
49
51
  };
50
52
  /**
package/dist/cjs/Text.js CHANGED
@@ -20,7 +20,8 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
20
20
  var getStyles = function getStyles(isSecondary, shouldTruncate) {
21
21
  return (0, _react.css)(_objectSpread(_objectSpread({
22
22
  display: 'block',
23
- margin: 0,
23
+ // TODO Delete this comment after verifying spacing token -> previous value `0`
24
+ margin: "var(--ds-scale-0, 0px)",
24
25
  color: "var(--ds-text, ".concat(_colors.N900, ")")
25
26
  }, shouldTruncate && {
26
27
  overflowX: 'hidden',
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/avatar",
3
- "version": "21.1.0",
3
+ "version": "21.1.2",
4
4
  "sideEffects": false
5
5
  }
@@ -10,7 +10,7 @@ import { PresenceWrapper } from './Presence';
10
10
  import { StatusWrapper } from './Status';
11
11
  import { getButtonProps, getCustomElement, getLinkProps } from './utilities';
12
12
  const packageName = "@atlaskit/avatar";
13
- const packageVersion = "21.1.0";
13
+ const packageVersion = "21.1.2";
14
14
 
15
15
  const getStyles = (css, {
16
16
  size,
@@ -40,7 +40,7 @@ css`
40
40
  box-shadow: 0 0 0 ${BORDER_WIDTH}px ${borderColor};
41
41
  border: none;
42
42
  margin: ${BORDER_WIDTH}px;
43
- padding: 0;
43
+ padding: ${"var(--ds-scale-0, 0px)"};
44
44
 
45
45
  /* Added font-size and font-family styles to fix alignment issue in firefox for interactive button avatar */
46
46
  font-size: inherit;
@@ -48,8 +48,8 @@ css`
48
48
 
49
49
  &::-moz-focus-inner {
50
50
  border: 0;
51
- margin: 0;
52
- padding: 0;
51
+ margin: ${"var(--ds-scale-0, 0px)"};
52
+ padding: ${"var(--ds-scale-0, 0px)"};
53
53
  }
54
54
 
55
55
  &::after {
@@ -3,15 +3,17 @@
3
3
  import { createElement, forwardRef, Fragment } from 'react';
4
4
  import { ClassNames, css, jsx } from '@emotion/react';
5
5
  import { B200, backgroundActive, backgroundHover } from '@atlaskit/theme/colors';
6
- import { borderRadius, gridSize } from '@atlaskit/theme/constants';
6
+ import { borderRadius } from '@atlaskit/theme/constants';
7
7
  import { BORDER_WIDTH } from './constants';
8
8
  import Text from './Text';
9
9
  import { getButtonProps, getCustomElement, getLinkProps } from './utilities';
10
10
  const avatarItemStyles = css({
11
11
  minWidth: 0,
12
12
  maxWidth: '100%',
13
- paddingLeft: `${gridSize()}px`,
13
+ // TODO Delete this comment after verifying spacing token -> previous value ``${gridSize()}px``
14
+ paddingLeft: "var(--ds-scale-100, 8px)",
14
15
  flex: '1 1 100%',
16
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
15
17
  lineHeight: '1.4'
16
18
  });
17
19
 
@@ -33,8 +35,8 @@ css`
33
35
  font-weight: normal;
34
36
  line-height: 1;
35
37
  outline: none;
36
- margin: 0;
37
- padding: ${gridSize() / 2}px;
38
+ margin: ${"var(--ds-scale-0, 0px)"};
39
+ padding: ${"var(--ds-scale-050, 4px)"};
38
40
  text-align: left;
39
41
  text-decoration: none;
40
42
  width: 100%;
@@ -5,7 +5,8 @@ import { N200, N900 } from '@atlaskit/theme/colors';
5
5
 
6
6
  const getStyles = (isSecondary, shouldTruncate) => css({
7
7
  display: 'block',
8
- margin: 0,
8
+ // TODO Delete this comment after verifying spacing token -> previous value `0`
9
+ margin: "var(--ds-scale-0, 0px)",
9
10
  color: `var(--ds-text, ${N900})`,
10
11
  ...(shouldTruncate && {
11
12
  overflowX: 'hidden',
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/avatar",
3
- "version": "21.1.0",
3
+ "version": "21.1.2",
4
4
  "sideEffects": false
5
5
  }
@@ -20,7 +20,7 @@ import { PresenceWrapper } from './Presence';
20
20
  import { StatusWrapper } from './Status';
21
21
  import { getButtonProps, getCustomElement, getLinkProps } from './utilities';
22
22
  var packageName = "@atlaskit/avatar";
23
- var packageVersion = "21.1.0";
23
+ var packageVersion = "21.1.2";
24
24
 
25
25
  var getStyles = function getStyles(css, _ref) {
26
26
  var size = _ref.size,
@@ -32,7 +32,7 @@ var getStyles = function getStyles(css, _ref) {
32
32
  isInteractive = _ref.isInteractive,
33
33
  isDisabled = _ref.isDisabled;
34
34
  return (//eslint-disable-next-line @repo/internal/react/no-css-string-literals
35
- css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n height: ", "px;\n width: ", "px;\n align-items: stretch;\n background-color: ", ";\n border-radius: ", ";\n box-sizing: content-box;\n cursor: inherit;\n display: flex;\n flex-direction: column;\n justify-content: center;\n outline: none;\n overflow: hidden;\n position: static;\n transform: translateZ(0);\n transition: transform 200ms, opacity 200ms;\n box-shadow: 0 0 0 ", "px ", ";\n border: none;\n margin: ", "px;\n padding: 0;\n\n /* Added font-size and font-family styles to fix alignment issue in firefox for interactive button avatar */\n font-size: inherit;\n font-family: inherit;\n\n &::-moz-focus-inner {\n border: 0;\n margin: 0;\n padding: 0;\n }\n\n &::after {\n background-color: transparent;\n bottom: 0px;\n\n /* Added border-radius style to fix hover issue in safari */\n border-radius: ", ";\n content: ' ';\n left: 0px;\n opacity: 0;\n pointer-events: none;\n position: absolute;\n right: 0px;\n top: 0px;\n transition: opacity 200ms;\n width: 100%;\n }\n\n ", "\n\n ", "\n\n ", "\n "])), size, size, borderColor, appearance === 'circle' ? '50%' : "".concat(radius, "px"), BORDER_WIDTH, borderColor, BORDER_WIDTH, appearance === 'circle' ? '50%' : "".concat(radius, "px"), stackIndex && "position: relative;", isInteractive && "\n cursor: pointer;\n\n :focus {\n outline: none;\n box-shadow: 0 0 0 ".concat(BORDER_WIDTH, "px ", "var(--ds-border-focused, ".concat(B300, ")"), "\n }\n\n :hover {\n &::after {\n background-color: ", "var(--ds-interaction-hovered, ".concat(N70A, ")"), ";\n opacity: 1;\n }\n }\n\n :active {\n &::after {\n background-color: ", "var(--ds-interaction-pressed, ".concat(N70A, ")"), ";\n opacity: 1;\n }\n }\n\n :active {\n transform: scale(").concat(ACTIVE_SCALE_FACTOR, ");\n }\n\n @media screen and (forced-colors: active) {\n &:focus-visible {\n outline: 1px solid\n }\n }\n "), isDisabled && "\n cursor: not-allowed;\n\n &::after {\n opacity: ".concat("var(--ds-opacity-disabled, 0.7)", ";\n pointer-events: none;\n background-color: ", "var(--ds-surface, ".concat(N0, ")"), ";\n }\n "))
35
+ css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n height: ", "px;\n width: ", "px;\n align-items: stretch;\n background-color: ", ";\n border-radius: ", ";\n box-sizing: content-box;\n cursor: inherit;\n display: flex;\n flex-direction: column;\n justify-content: center;\n outline: none;\n overflow: hidden;\n position: static;\n transform: translateZ(0);\n transition: transform 200ms, opacity 200ms;\n box-shadow: 0 0 0 ", "px ", ";\n border: none;\n margin: ", "px;\n padding: ", ";\n\n /* Added font-size and font-family styles to fix alignment issue in firefox for interactive button avatar */\n font-size: inherit;\n font-family: inherit;\n\n &::-moz-focus-inner {\n border: 0;\n margin: ", ";\n padding: ", ";\n }\n\n &::after {\n background-color: transparent;\n bottom: 0px;\n\n /* Added border-radius style to fix hover issue in safari */\n border-radius: ", ";\n content: ' ';\n left: 0px;\n opacity: 0;\n pointer-events: none;\n position: absolute;\n right: 0px;\n top: 0px;\n transition: opacity 200ms;\n width: 100%;\n }\n\n ", "\n\n ", "\n\n ", "\n "])), size, size, borderColor, appearance === 'circle' ? '50%' : "".concat(radius, "px"), BORDER_WIDTH, borderColor, BORDER_WIDTH, "var(--ds-scale-0, 0px)", "var(--ds-scale-0, 0px)", "var(--ds-scale-0, 0px)", appearance === 'circle' ? '50%' : "".concat(radius, "px"), stackIndex && "position: relative;", isInteractive && "\n cursor: pointer;\n\n :focus {\n outline: none;\n box-shadow: 0 0 0 ".concat(BORDER_WIDTH, "px ", "var(--ds-border-focused, ".concat(B300, ")"), "\n }\n\n :hover {\n &::after {\n background-color: ", "var(--ds-interaction-hovered, ".concat(N70A, ")"), ";\n opacity: 1;\n }\n }\n\n :active {\n &::after {\n background-color: ", "var(--ds-interaction-pressed, ".concat(N70A, ")"), ";\n opacity: 1;\n }\n }\n\n :active {\n transform: scale(").concat(ACTIVE_SCALE_FACTOR, ");\n }\n\n @media screen and (forced-colors: active) {\n &:focus-visible {\n outline: 1px solid\n }\n }\n "), isDisabled && "\n cursor: not-allowed;\n\n &::after {\n opacity: ".concat("var(--ds-opacity-disabled, 0.7)", ";\n pointer-events: none;\n background-color: ", "var(--ds-surface, ".concat(N0, ")"), ";\n }\n "))
36
36
  );
37
37
  };
38
38
  /**
@@ -12,15 +12,17 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
12
12
  import { createElement, forwardRef, Fragment } from 'react';
13
13
  import { ClassNames, css, jsx } from '@emotion/react';
14
14
  import { B200, backgroundActive, backgroundHover } from '@atlaskit/theme/colors';
15
- import { borderRadius, gridSize } from '@atlaskit/theme/constants';
15
+ import { borderRadius } from '@atlaskit/theme/constants';
16
16
  import { BORDER_WIDTH } from './constants';
17
17
  import Text from './Text';
18
18
  import { getButtonProps, getCustomElement, getLinkProps } from './utilities';
19
19
  var avatarItemStyles = css({
20
20
  minWidth: 0,
21
21
  maxWidth: '100%',
22
- paddingLeft: "".concat(gridSize(), "px"),
22
+ // TODO Delete this comment after verifying spacing token -> previous value ``${gridSize()}px``
23
+ paddingLeft: "var(--ds-scale-100, 8px)",
23
24
  flex: '1 1 100%',
25
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
24
26
  lineHeight: '1.4'
25
27
  });
26
28
 
@@ -29,7 +31,7 @@ var getStyles = function getStyles(css, _ref) {
29
31
  isInteractive = _ref.isInteractive,
30
32
  isDisabled = _ref.isDisabled;
31
33
  return (//eslint-disable-next-line @repo/internal/react/no-css-string-literals
32
- css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n align-items: center;\n background-color: ", ";\n border-radius: ", "px;\n border: ", "px solid transparent;\n box-sizing: border-box;\n color: inherit;\n display: flex;\n font-size: inherit;\n font-style: normal;\n font-weight: normal;\n line-height: 1;\n outline: none;\n margin: 0;\n padding: ", "px;\n text-align: left;\n text-decoration: none;\n width: 100%;\n\n ", "\n\n ", "\n "])), backgroundColor, borderRadius(), BORDER_WIDTH, gridSize() / 2, isInteractive && "\n :hover {\n background-color: ".concat("var(--ds-background-neutral-subtle-hovered, ".concat(backgroundHover(), ")"), ";\n cursor: pointer;\n text-decoration: none;\n }\n\n :focus {\n outline: none;\n border-color: ", "var(--ds-border-focused, ".concat(B200, ")"), ";\n }\n\n :active {\n background-color: ", "var(--ds-background-neutral-subtle-pressed, ".concat(backgroundActive(), ")"), ";\n }\n "), isDisabled && "\n cursor: not-allowed;\n opacity: ".concat("var(--ds-opacity-disabled, 0.5)", ";\n pointer-events: none;\n "))
34
+ css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n align-items: center;\n background-color: ", ";\n border-radius: ", "px;\n border: ", "px solid transparent;\n box-sizing: border-box;\n color: inherit;\n display: flex;\n font-size: inherit;\n font-style: normal;\n font-weight: normal;\n line-height: 1;\n outline: none;\n margin: ", ";\n padding: ", ";\n text-align: left;\n text-decoration: none;\n width: 100%;\n\n ", "\n\n ", "\n "])), backgroundColor, borderRadius(), BORDER_WIDTH, "var(--ds-scale-0, 0px)", "var(--ds-scale-050, 4px)", isInteractive && "\n :hover {\n background-color: ".concat("var(--ds-background-neutral-subtle-hovered, ".concat(backgroundHover(), ")"), ";\n cursor: pointer;\n text-decoration: none;\n }\n\n :focus {\n outline: none;\n border-color: ", "var(--ds-border-focused, ".concat(B200, ")"), ";\n }\n\n :active {\n background-color: ", "var(--ds-background-neutral-subtle-pressed, ".concat(backgroundActive(), ")"), ";\n }\n "), isDisabled && "\n cursor: not-allowed;\n opacity: ".concat("var(--ds-opacity-disabled, 0.5)", ";\n pointer-events: none;\n "))
33
35
  );
34
36
  };
35
37
  /**
package/dist/esm/Text.js CHANGED
@@ -12,7 +12,8 @@ import { N200, N900 } from '@atlaskit/theme/colors';
12
12
  var getStyles = function getStyles(isSecondary, shouldTruncate) {
13
13
  return css(_objectSpread(_objectSpread({
14
14
  display: 'block',
15
- margin: 0,
15
+ // TODO Delete this comment after verifying spacing token -> previous value `0`
16
+ margin: "var(--ds-scale-0, 0px)",
16
17
  color: "var(--ds-text, ".concat(N900, ")")
17
18
  }, shouldTruncate && {
18
19
  overflowX: 'hidden',
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/avatar",
3
- "version": "21.1.0",
3
+ "version": "21.1.2",
4
4
  "sideEffects": false
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/avatar",
3
- "version": "21.1.0",
3
+ "version": "21.1.2",
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,16 +12,10 @@
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.0 <4.5": {
17
- "*": [
18
- "dist/types-ts4.0/*"
19
- ]
20
- }
21
- },
22
15
  "sideEffects": false,
23
16
  "atlaskit:src": "src/index.ts",
24
17
  "atlassian": {
18
+ "disableProductCI": true,
25
19
  "team": "Design System Team",
26
20
  "releaseModel": "scheduled",
27
21
  "website": {
@@ -51,7 +45,7 @@
51
45
  "react": "^16.8.0"
52
46
  },
53
47
  "devDependencies": {
54
- "@atlaskit/button": "^16.3.0",
48
+ "@atlaskit/button": "^16.4.0",
55
49
  "@atlaskit/docs": "*",
56
50
  "@atlaskit/ds-lib": "^2.1.1",
57
51
  "@atlaskit/field-base": "^15.0.0",
@@ -86,6 +80,7 @@
86
80
  "design-system": "v1",
87
81
  "ui-components": "lite-mode",
88
82
  "analytics": "analytics-next",
83
+ "design-tokens": "spacing",
89
84
  "theming": "tokens",
90
85
  "styling": [
91
86
  "static",
package/report.api.md CHANGED
@@ -1,6 +1,10 @@
1
- ## API Report File for "@atlaskit/avatar".
1
+ ## API Report File for "@atlaskit/avatar"
2
2
 
3
- > Do not edit this file. This report is auto-generated by [API Extractor](https://api-extractor.com/).
3
+ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4
+
5
+ <!--
6
+ Generated API Report version: 2.0
7
+ -->
4
8
 
5
9
  [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
6
10
 
@@ -15,253 +19,135 @@ import { Ref } from 'react';
15
19
  import { RefAttributes } from 'react';
16
20
  import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
17
21
 
18
- export declare const ACTIVE_SCALE_FACTOR = 0.9;
22
+ // @public (undocumented)
23
+ export const ACTIVE_SCALE_FACTOR = 0.9;
19
24
 
20
- export declare type AppearanceType = 'circle' | 'square';
25
+ // @public (undocumented)
26
+ export type AppearanceType = 'circle' | 'square';
21
27
 
22
- /**
23
- * __Avatar__
24
- *
25
- * An avatar is a visual representation of a user or entity.
26
- *
27
- * - [Examples](https://atlassian.design/components/avatar/examples)
28
- * - [Code](https://atlassian.design/components/avatar/code)
29
- * - [Usage](https://atlassian.design/components/avatar/usage)
30
- */
31
- declare const Avatar: ForwardRefExoticComponent<
28
+ // @public
29
+ const Avatar: ForwardRefExoticComponent<
32
30
  AvatarPropTypes & RefAttributes<HTMLElement>
33
31
  >;
34
32
  export default Avatar;
35
33
 
36
- export declare const AVATAR_RADIUS: AvatarSizeMap;
34
+ // @public (undocumented)
35
+ export const AVATAR_RADIUS: AvatarSizeMap;
37
36
 
38
- export declare const AVATAR_SIZES: AvatarSizeMap;
37
+ // @public (undocumented)
38
+ export const AVATAR_SIZES: AvatarSizeMap;
39
39
 
40
- export declare type AvatarClickEventHandler = (
40
+ // @public (undocumented)
41
+ export type AvatarClickEventHandler = (
41
42
  event: React.MouseEvent,
42
43
  analyticsEvent?: UIAnalyticsEvent,
43
44
  ) => void;
44
45
 
45
- /**
46
- * __Avatar item__
47
- *
48
- * An avatar item is a wrapper that goes around an avatar when it's displayed alongside text, such as a name or status.
49
- *
50
- * - [Examples](https://atlassian.design/components/avatar/avatar-item/examples)
51
- * - [Code](https://atlassian.design/components/avatar/avatar-item/code)
52
- */
53
- export declare const AvatarItem: ForwardRefExoticComponent<
46
+ // @public
47
+ export const AvatarItem: ForwardRefExoticComponent<
54
48
  AvatarItemProps & RefAttributes<HTMLElement>
55
49
  >;
56
50
 
57
- export declare interface AvatarItemProps {
58
- /**
59
- * Used to provide better content to screen readers when using presence/status. Rather
60
- * than a screen reader speaking "online, approved, John Smith", passing in an label
61
- * allows a custom message like "John Smith (approved and online)".
62
- */
63
- label?: string;
64
- /**
65
- * Slot to place an avatar element. Use @atlaskit/avatar.
66
- */
51
+ // @public (undocumented)
52
+ export interface AvatarItemProps {
67
53
  avatar: ReactNode;
68
- /**
69
- * Change background color.
70
- */
71
54
  backgroundColor?: string;
72
- /**
73
- * Use a custom component instead of the default span.
74
- */
75
55
  children?: (props: CustomAvatarItemProps) => ReactNode;
76
- /**
77
- * URL for avatars being used as a link.
78
- */
79
56
  href?: string;
80
- /**
81
- * Disable the item from being interactive
82
- */
83
57
  isDisabled?: boolean;
84
- /**
85
- * Handler to be called on click.
86
- */
58
+ isTruncationDisabled?: boolean;
59
+ label?: string;
87
60
  onClick?: AvatarClickEventHandler;
88
- /**
89
- * PrimaryText text.
90
- */
91
61
  primaryText?: ReactNode;
92
- /**
93
- * SecondaryText text.
94
- */
95
62
  secondaryText?: ReactNode;
96
- /**
97
- * Pass target down to the anchor, if href is provided.
98
- */
99
63
  target?: '_blank' | '_self' | '_top' | '_parent';
100
- /**
101
- * By default, overflowing text is truncated if it exceeds the container width. Use this prop to disable this.
102
- */
103
- isTruncationDisabled?: boolean;
104
- /**
105
- * 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
106
- */
107
64
  testId?: string;
108
65
  }
109
66
 
110
- export declare interface AvatarPropTypes {
111
- /**
112
- * Indicates the shape of the avatar. Most avatars are circular, but square avatars
113
- * can be used for 'container' objects.
114
- */
67
+ // @public (undocumented)
68
+ export interface AvatarPropTypes {
69
+ analyticsContext?: Record<string, any>;
115
70
  appearance?: AppearanceType;
116
- /**
117
- * Used to provide better content to screen readers when using presence/status. Rather
118
- * than a screen reader speaking "online, approved, John Smith", passing in a label
119
- * allows a custom message like "John Smith (approved and online)".
120
- */
121
- label?: string;
122
- /**
123
- * Used to override the default border color around the avatar body.
124
- * Accepts any color argument that the border-color CSS property accepts.
125
- */
126
71
  borderColor?: string;
127
- /**
128
- * Supply a custom avatar component instead of the default
129
- */
130
72
  children?: (props: CustomAvatarProps) => ReactNode;
131
- /**
132
- * Provides a url for avatars being used as a link.
133
- */
134
73
  href?: string;
135
- /**
136
- * Change the style to indicate the avatar is disabled.
137
- */
138
74
  isDisabled?: boolean;
139
- /**
140
- * Provides alt text for the avatar image.
141
- */
75
+ label?: string;
142
76
  name?: string;
143
- /**
144
- * Indicates a user's online status by showing a small icon on the avatar.
145
- * Refer to presence values on the Presence component.
146
- * Alternatively accepts any React element. For best results, it is recommended to
147
- * use square content with height and width of 100%.
148
- */
77
+ onClick?: AvatarClickEventHandler;
149
78
  presence?: ('online' | 'busy' | 'focus' | 'offline') | ReactNode;
150
- /**
151
- * Defines the size of the avatar
152
- */
153
79
  size?: SizeType;
154
- /**
155
- * A url to load an image from (this can also be a base64 encoded image).
156
- */
157
80
  src?: string;
158
- /**
159
- * Indicates contextual information by showing a small icon on the avatar.
160
- * Refer to status values on the Status component.
161
- */
162
- status?: ('approved' | 'declined' | 'locked') | ReactNode;
163
- /**
164
- * The index of where this avatar is in the group `stack`.
165
- */
166
81
  stackIndex?: number;
167
- /**
168
- * Assign specific tabIndex order to the underlying node.
169
- */
82
+ status?: ('approved' | 'declined' | 'locked') | ReactNode;
170
83
  tabIndex?: number;
171
- /**
172
- * Pass target down to the anchor, if href is provided.
173
- */
174
84
  target?: '_blank' | '_self' | '_top' | '_parent';
175
- /**
176
- * Handler to be called on click.
177
- */
178
- onClick?: AvatarClickEventHandler;
179
- /**
180
- * 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
181
- */
182
85
  testId?: string;
183
- /**
184
- * Analytics context meta data
185
- */
186
- analyticsContext?: Record<string, any>;
187
86
  }
188
87
 
189
- declare type AvatarSizeMap = Record<SizeType, number>;
88
+ // @public (undocumented)
89
+ type AvatarSizeMap = Record<SizeType, number>;
190
90
 
191
- export declare const BORDER_WIDTH = 2;
91
+ // @public (undocumented)
92
+ export const BORDER_WIDTH = 2;
192
93
 
193
- export declare interface CustomAvatarItemProps {
194
- testId?: string;
195
- onClick?: MouseEventHandler;
94
+ // @public (undocumented)
95
+ export interface CustomAvatarItemProps {
96
+ // (undocumented)
97
+ 'aria-disabled'?: boolean | 'false' | 'true' | undefined;
98
+ 'aria-label'?: string;
99
+ // (undocumented)
100
+ children: ReactNode;
101
+ // (undocumented)
196
102
  className?: string;
103
+ // (undocumented)
197
104
  href?: string;
198
- children: ReactNode;
105
+ // (undocumented)
106
+ onClick?: MouseEventHandler;
107
+ // (undocumented)
199
108
  ref: Ref<HTMLElement>;
200
- /**
201
- * This is used in render props so is okay to be defined.
202
- * eslint-disable-next-line consistent-props-definitions
203
- */
204
- 'aria-label'?: string;
205
- 'aria-disabled'?: boolean | 'false' | 'true' | undefined;
109
+ // (undocumented)
110
+ testId?: string;
206
111
  }
207
112
 
208
- export declare interface CustomAvatarProps {
209
- /**
210
- * This is used in render props so is okay to be defined.
211
- * eslint-disable-next-line consistent-props-definitions
212
- */
113
+ // @public (undocumented)
114
+ export interface CustomAvatarProps {
213
115
  'aria-label'?: string;
214
- tabIndex?: number;
215
- testId?: string;
216
- onClick?: MouseEventHandler;
116
+ // (undocumented)
117
+ children: ReactNode;
118
+ // (undocumented)
217
119
  className?: string;
120
+ // (undocumented)
218
121
  href?: string;
219
- children: ReactNode;
122
+ // (undocumented)
123
+ onClick?: MouseEventHandler;
124
+ // (undocumented)
220
125
  ref: Ref<HTMLElement>;
126
+ // (undocumented)
127
+ tabIndex?: number;
128
+ // (undocumented)
129
+ testId?: string;
221
130
  }
222
131
 
223
- export declare type IndicatorSizeType = 'small' | 'medium' | 'large' | 'xlarge';
132
+ // @public (undocumented)
133
+ export type IndicatorSizeType = 'small' | 'medium' | 'large' | 'xlarge';
224
134
 
225
- /**
226
- * __Avatar presence__
227
- *
228
- * A presence shows an avatar’s availability.
229
- *
230
- * - [Examples](https://atlassian.design/components/avatar/avatar-presence/examples)
231
- * - [Code](https://atlassian.design/components/avatar/avatar-presence/code)
232
- * - [Usage](https://atlassian.design/components/avatar/avatar-presence/usage)
233
- */
234
- export declare const Presence: FC<PresenceProps>;
135
+ // @public
136
+ export const Presence: FC<PresenceProps>;
235
137
 
236
- export declare interface PresenceProps {
237
- /**
238
- * Used to override the default border color of the presence indicator.
239
- * Accepts any color argument that the border-color CSS property accepts.
240
- */
138
+ // @public (undocumented)
139
+ export interface PresenceProps {
241
140
  borderColor?: string;
242
- /**
243
- * Content to use as a custom presence indicator (usually not required if
244
- * consuming Presence separate to Avatar).
245
- */
246
141
  children?: ReactNode;
247
- /**
248
- * The type of presence indicator to show
249
- */
250
142
  presence?: PresenceType;
251
- /**
252
- * Test Id
253
- */
254
143
  testId?: string;
255
144
  }
256
145
 
257
- export declare type PresenceType =
258
- | 'busy'
259
- | 'focus'
260
- | 'offline'
261
- | 'online'
262
- | ReactNode;
146
+ // @public (undocumented)
147
+ export type PresenceType = 'busy' | 'focus' | 'offline' | 'online' | ReactNode;
263
148
 
264
- export declare type SizeType =
149
+ // @public (undocumented)
150
+ export type SizeType =
265
151
  | 'xsmall'
266
152
  | 'small'
267
153
  | 'medium'
@@ -269,54 +155,33 @@ export declare type SizeType =
269
155
  | 'xlarge'
270
156
  | 'xxlarge';
271
157
 
272
- /**
273
- * __Skeleton__
274
- *
275
- * A skeleton is the loading state for the avatar component.
276
- *
277
- * - [Examples](https://atlassian.design/components/avatar/avatar-skeleton/examples)
278
- * - [Code](https://atlassian.design/components/avatar/avatar-skeleton/code)
279
- */
280
- export declare const Skeleton: FC<SkeletonProps>;
158
+ // @public
159
+ export const Skeleton: FC<SkeletonProps>;
281
160
 
282
- export declare interface SkeletonProps {
161
+ // @public (undocumented)
162
+ export interface SkeletonProps {
163
+ // (undocumented)
283
164
  appearance?: AppearanceType;
165
+ // (undocumented)
284
166
  color?: string;
167
+ // (undocumented)
285
168
  size?: SizeType;
169
+ // (undocumented)
286
170
  weight?: 'normal' | 'strong';
287
171
  }
288
172
 
289
- /**
290
- * __Avatar status__
291
- *
292
- * An avatar status shows contextual information, such as if someone approves or declines something.
293
- *
294
- * - [Examples](https://atlassian.design/components/avatar/avatar-status/examples)
295
- * - [Code](https://atlassian.design/components/avatar/avatar-status/code)
296
- */
297
- export declare const Status: FC<StatusProps>;
173
+ // @public
174
+ export const Status: FC<StatusProps>;
298
175
 
299
- export declare interface StatusProps {
300
- /**
301
- * Override the default border color of the status indicator. This accepts
302
- * any color argument that the CSS property `border-color` accepts.
303
- */
176
+ // @public (undocumented)
177
+ export interface StatusProps {
304
178
  borderColor?: string;
305
- /**
306
- * Content to use as a custom status indicator. Not needed if consuming
307
- * `Status` separate to `Avatar`.
308
- */
309
179
  children?: ReactNode;
310
- /**
311
- * Content to use as a custom status indicator. Not needed if consuming
312
- * `Status` separate to `Avatar`.
313
- */
314
180
  status?: StatusType;
315
181
  }
316
182
 
317
- export declare type StatusType =
318
- | ('approved' | 'declined' | 'locked')
319
- | ReactNode;
183
+ // @public (undocumented)
184
+ export type StatusType = ('approved' | 'declined' | 'locked') | ReactNode;
320
185
 
321
- export {};
186
+ // (No @packageDocumentation comment for this package)
322
187
  ```
@@ -1,106 +0,0 @@
1
- /** @jsx jsx */
2
- import { MouseEventHandler, ReactNode, Ref } from 'react';
3
- import { AppearanceType, AvatarClickEventHandler, SizeType } from './types';
4
- export interface CustomAvatarProps {
5
- /**
6
- * This is used in render props so is okay to be defined.
7
- * eslint-disable-next-line consistent-props-definitions
8
- */
9
- 'aria-label'?: string;
10
- tabIndex?: number;
11
- testId?: string;
12
- onClick?: MouseEventHandler;
13
- className?: string;
14
- href?: string;
15
- children: ReactNode;
16
- ref: Ref<HTMLElement>;
17
- }
18
- export interface AvatarPropTypes {
19
- /**
20
- * Indicates the shape of the avatar. Most avatars are circular, but square avatars
21
- * can be used for 'container' objects.
22
- */
23
- appearance?: AppearanceType;
24
- /**
25
- * Used to provide better content to screen readers when using presence/status. Rather
26
- * than a screen reader speaking "online, approved, John Smith", passing in a label
27
- * allows a custom message like "John Smith (approved and online)".
28
- */
29
- label?: string;
30
- /**
31
- * Used to override the default border color around the avatar body.
32
- * Accepts any color argument that the border-color CSS property accepts.
33
- */
34
- borderColor?: string;
35
- /**
36
- * Supply a custom avatar component instead of the default
37
- */
38
- children?: (props: CustomAvatarProps) => ReactNode;
39
- /**
40
- * Provides a url for avatars being used as a link.
41
- */
42
- href?: string;
43
- /**
44
- * Change the style to indicate the avatar is disabled.
45
- */
46
- isDisabled?: boolean;
47
- /**
48
- * Provides alt text for the avatar image.
49
- */
50
- name?: string;
51
- /**
52
- * Indicates a user's online status by showing a small icon on the avatar.
53
- * Refer to presence values on the Presence component.
54
- * Alternatively accepts any React element. For best results, it is recommended to
55
- * use square content with height and width of 100%.
56
- */
57
- presence?: ('online' | 'busy' | 'focus' | 'offline') | ReactNode;
58
- /**
59
- * Defines the size of the avatar
60
- */
61
- size?: SizeType;
62
- /**
63
- * A url to load an image from (this can also be a base64 encoded image).
64
- */
65
- src?: string;
66
- /**
67
- * Indicates contextual information by showing a small icon on the avatar.
68
- * Refer to status values on the Status component.
69
- */
70
- status?: ('approved' | 'declined' | 'locked') | ReactNode;
71
- /**
72
- * The index of where this avatar is in the group `stack`.
73
- */
74
- stackIndex?: number;
75
- /**
76
- * Assign specific tabIndex order to the underlying node.
77
- */
78
- tabIndex?: number;
79
- /**
80
- * Pass target down to the anchor, if href is provided.
81
- */
82
- target?: '_blank' | '_self' | '_top' | '_parent';
83
- /**
84
- * Handler to be called on click.
85
- */
86
- onClick?: AvatarClickEventHandler;
87
- /**
88
- * 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
89
- */
90
- testId?: string;
91
- /**
92
- * Analytics context meta data
93
- */
94
- analyticsContext?: Record<string, any>;
95
- }
96
- /**
97
- * __Avatar__
98
- *
99
- * An avatar is a visual representation of a user or entity.
100
- *
101
- * - [Examples](https://atlassian.design/components/avatar/examples)
102
- * - [Code](https://atlassian.design/components/avatar/code)
103
- * - [Usage](https://atlassian.design/components/avatar/usage)
104
- */
105
- declare const Avatar: import("react").ForwardRefExoticComponent<AvatarPropTypes & import("react").RefAttributes<HTMLElement>>;
106
- export default Avatar;
@@ -1,19 +0,0 @@
1
- /** @jsx jsx */
2
- import { FC } from 'react';
3
- import { AppearanceType, SizeType } from './types';
4
- interface AvatarImageProps {
5
- appearance: AppearanceType;
6
- size: SizeType;
7
- alt?: string;
8
- src?: string;
9
- testId?: string;
10
- }
11
- export declare const ICON_BACKGROUND: "var(--ds-icon-inverse)";
12
- export declare const ICON_COLOR: "var(--ds-icon-subtle)";
13
- /**
14
- * __Avatar image__
15
- *
16
- * An avatar image is an internal component used to control the rendering phases of an image.
17
- */
18
- declare const AvatarImage: FC<AvatarImageProps>;
19
- export default AvatarImage;
@@ -1,79 +0,0 @@
1
- /** @jsx jsx */
2
- import { MouseEventHandler, ReactNode, Ref } from 'react';
3
- import { AvatarClickEventHandler } from './types';
4
- export interface CustomAvatarItemProps {
5
- testId?: string;
6
- onClick?: MouseEventHandler;
7
- className?: string;
8
- href?: string;
9
- children: ReactNode;
10
- ref: Ref<HTMLElement>;
11
- /**
12
- * This is used in render props so is okay to be defined.
13
- * eslint-disable-next-line consistent-props-definitions
14
- */
15
- 'aria-label'?: string;
16
- 'aria-disabled'?: boolean | 'false' | 'true' | undefined;
17
- }
18
- export interface AvatarItemProps {
19
- /**
20
- * Used to provide better content to screen readers when using presence/status. Rather
21
- * than a screen reader speaking "online, approved, John Smith", passing in an label
22
- * allows a custom message like "John Smith (approved and online)".
23
- */
24
- label?: string;
25
- /**
26
- * Slot to place an avatar element. Use @atlaskit/avatar.
27
- */
28
- avatar: ReactNode;
29
- /**
30
- * Change background color.
31
- */
32
- backgroundColor?: string;
33
- /**
34
- * Use a custom component instead of the default span.
35
- */
36
- children?: (props: CustomAvatarItemProps) => ReactNode;
37
- /**
38
- * URL for avatars being used as a link.
39
- */
40
- href?: string;
41
- /**
42
- * Disable the item from being interactive
43
- */
44
- isDisabled?: boolean;
45
- /**
46
- * Handler to be called on click.
47
- */
48
- onClick?: AvatarClickEventHandler;
49
- /**
50
- * PrimaryText text.
51
- */
52
- primaryText?: ReactNode;
53
- /**
54
- * SecondaryText text.
55
- */
56
- secondaryText?: ReactNode;
57
- /**
58
- * Pass target down to the anchor, if href is provided.
59
- */
60
- target?: '_blank' | '_self' | '_top' | '_parent';
61
- /**
62
- * By default, overflowing text is truncated if it exceeds the container width. Use this prop to disable this.
63
- */
64
- isTruncationDisabled?: boolean;
65
- /**
66
- * 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
67
- */
68
- testId?: string;
69
- }
70
- /**
71
- * __Avatar item__
72
- *
73
- * An avatar item is a wrapper that goes around an avatar when it's displayed alongside text, such as a name or status.
74
- *
75
- * - [Examples](https://atlassian.design/components/avatar/avatar-item/examples)
76
- * - [Code](https://atlassian.design/components/avatar/avatar-item/code)
77
- */
78
- declare const AvatarItem: import("react").ForwardRefExoticComponent<AvatarItemProps & import("react").RefAttributes<HTMLElement>>;
79
- export default AvatarItem;
@@ -1,13 +0,0 @@
1
- /** @jsx jsx */
2
- import { FC, ReactNode } from 'react';
3
- interface IconWrapperProps {
4
- bgColor?: string;
5
- children?: ReactNode;
6
- }
7
- /**
8
- * __Icon wrapper__
9
- *
10
- * An icon wrapper is used internally only.
11
- */
12
- declare const IconWrapper: FC<IconWrapperProps>;
13
- export default IconWrapper;
@@ -1,45 +0,0 @@
1
- import { FC, ReactNode } from 'react';
2
- import { AppearanceType, IndicatorSizeType } from './types';
3
- export declare type PresenceType = 'busy' | 'focus' | 'offline' | 'online' | ReactNode;
4
- export interface PresenceProps {
5
- /**
6
- * Used to override the default border color of the presence indicator.
7
- * Accepts any color argument that the border-color CSS property accepts.
8
- */
9
- borderColor?: string;
10
- /**
11
- * Content to use as a custom presence indicator (usually not required if
12
- * consuming Presence separate to Avatar).
13
- */
14
- children?: ReactNode;
15
- /**
16
- * The type of presence indicator to show
17
- */
18
- presence?: PresenceType;
19
- /**
20
- * Test Id
21
- */
22
- testId?: string;
23
- }
24
- /**
25
- * __Avatar presence__
26
- *
27
- * A presence shows an avatar’s availability.
28
- *
29
- * - [Examples](https://atlassian.design/components/avatar/avatar-presence/examples)
30
- * - [Code](https://atlassian.design/components/avatar/avatar-presence/code)
31
- * - [Usage](https://atlassian.design/components/avatar/avatar-presence/usage)
32
- */
33
- declare const AvatarPresence: FC<PresenceProps>;
34
- export default AvatarPresence;
35
- export interface PresenceWrapperProps extends PresenceProps {
36
- appearance: AppearanceType;
37
- size: IndicatorSizeType;
38
- testId?: string;
39
- }
40
- /**
41
- * __Presence wrapper__
42
- *
43
- * A presence wrapper is used internally to position presence ontop of the avatar.
44
- */
45
- export declare const PresenceWrapper: FC<PresenceWrapperProps>;
@@ -1,19 +0,0 @@
1
- /** @jsx jsx */
2
- import { FC } from 'react';
3
- import { AppearanceType, SizeType } from './types';
4
- export interface SkeletonProps {
5
- appearance?: AppearanceType;
6
- color?: string;
7
- size?: SizeType;
8
- weight?: 'normal' | 'strong';
9
- }
10
- /**
11
- * __Skeleton__
12
- *
13
- * A skeleton is the loading state for the avatar component.
14
- *
15
- * - [Examples](https://atlassian.design/components/avatar/avatar-skeleton/examples)
16
- * - [Code](https://atlassian.design/components/avatar/avatar-skeleton/code)
17
- */
18
- declare const Skeleton: FC<SkeletonProps>;
19
- export default Skeleton;
@@ -1,42 +0,0 @@
1
- import { FC, ReactNode } from 'react';
2
- import { AppearanceType, IndicatorSizeType } from './types';
3
- export declare type StatusType = ('approved' | 'declined' | 'locked') | ReactNode;
4
- export interface StatusProps {
5
- /**
6
- * Override the default border color of the status indicator. This accepts
7
- * any color argument that the CSS property `border-color` accepts.
8
- */
9
- borderColor?: string;
10
- /**
11
- * Content to use as a custom status indicator. Not needed if consuming
12
- * `Status` separate to `Avatar`.
13
- */
14
- children?: ReactNode;
15
- /**
16
- * Content to use as a custom status indicator. Not needed if consuming
17
- * `Status` separate to `Avatar`.
18
- */
19
- status?: StatusType;
20
- }
21
- /**
22
- * __Avatar status__
23
- *
24
- * An avatar status shows contextual information, such as if someone approves or declines something.
25
- *
26
- * - [Examples](https://atlassian.design/components/avatar/avatar-status/examples)
27
- * - [Code](https://atlassian.design/components/avatar/avatar-status/code)
28
- */
29
- declare const AvatarStatus: FC<StatusProps>;
30
- export default AvatarStatus;
31
- interface StatusWrapperProps extends StatusProps {
32
- appearance: AppearanceType;
33
- size: IndicatorSizeType;
34
- children: ReactNode;
35
- testId?: string;
36
- }
37
- /**
38
- * Status wrapper**
39
- *
40
- * A status wrapper is used internally to position status ontop of the avatar.
41
- */
42
- export declare const StatusWrapper: FC<StatusWrapperProps>;
@@ -1,13 +0,0 @@
1
- /** @jsx jsx */
2
- import { FC, ReactNode } from 'react';
3
- /**
4
- * __Text__
5
- *
6
- * Text is used internally only.
7
- */
8
- declare const Text: FC<{
9
- isSecondary?: boolean;
10
- children: ReactNode;
11
- shouldTruncate: boolean;
12
- }>;
13
- export default Text;
@@ -1,7 +0,0 @@
1
- import { AvatarSizeMap, IndicatorSizeType } from './types';
2
- export declare const AVATAR_SIZES: AvatarSizeMap;
3
- export declare const AVATAR_RADIUS: AvatarSizeMap;
4
- export declare const BORDER_WIDTH = 2;
5
- export declare const ACTIVE_SCALE_FACTOR = 0.9;
6
- export declare const ICON_SIZES: Record<IndicatorSizeType, number>;
7
- export declare const ICON_OFFSET: Record<IndicatorSizeType, number>;
@@ -1,2 +0,0 @@
1
- export { default } from '../AvatarItem';
2
- export type { AvatarItemProps, CustomAvatarItemProps } from '../AvatarItem';
@@ -1 +0,0 @@
1
- export { default } from '../Avatar';
@@ -1,2 +0,0 @@
1
- export { default } from '../Presence';
2
- export type { PresenceType, PresenceProps } from '../Presence';
@@ -1,2 +0,0 @@
1
- export { default } from '../Skeleton';
2
- export type { SkeletonProps } from '../Skeleton';
@@ -1,2 +0,0 @@
1
- export { default } from '../Status';
2
- export type { StatusType, StatusProps } from '../Status';
@@ -1 +0,0 @@
1
- export type { AppearanceType, SizeType, IndicatorSizeType, AvatarClickEventHandler, } from '../types';
@@ -1,12 +0,0 @@
1
- export { default } from './Avatar';
2
- export type { AvatarPropTypes, CustomAvatarProps } from './Avatar';
3
- export { default as AvatarItem } from './AvatarItem';
4
- export type { AvatarItemProps, CustomAvatarItemProps } from './AvatarItem';
5
- export { default as Presence } from './Presence';
6
- export type { PresenceProps, PresenceType } from './Presence';
7
- export { default as Status } from './Status';
8
- export type { StatusProps, StatusType } from './Status';
9
- export { default as Skeleton } from './Skeleton';
10
- export type { SkeletonProps } from './Skeleton';
11
- export { AVATAR_SIZES, BORDER_WIDTH, AVATAR_RADIUS, ACTIVE_SCALE_FACTOR, } from './constants';
12
- export type { AvatarClickEventHandler, AppearanceType, SizeType, IndicatorSizeType, } from './types';
@@ -1,7 +0,0 @@
1
- /// <reference types="react" />
2
- import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
3
- export declare type AvatarSizeMap = Record<SizeType, number>;
4
- export declare type AppearanceType = 'circle' | 'square';
5
- export declare type SizeType = 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge';
6
- export declare type IndicatorSizeType = 'small' | 'medium' | 'large' | 'xlarge';
7
- export declare type AvatarClickEventHandler = (event: React.MouseEvent, analyticsEvent?: UIAnalyticsEvent) => void;
@@ -1,11 +0,0 @@
1
- import { MouseEventHandler } from 'react';
2
- export declare const getLinkProps: (href: string, target?: string | undefined) => {
3
- href: string;
4
- rel: string | null;
5
- target: string | undefined;
6
- };
7
- export declare const getButtonProps: (onClick: MouseEventHandler) => {
8
- type: string;
9
- onClick: MouseEventHandler<Element>;
10
- };
11
- export declare const getCustomElement: (isDisabled?: boolean | undefined, href?: string | undefined, onClick?: MouseEventHandler<Element> | undefined) => "button" | "a" | "span";