@atlaskit/user-picker 10.20.4 → 10.21.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.
Files changed (65) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/cjs/analytics.js +1 -1
  3. package/dist/cjs/components/AddOptionAvatar.js +13 -7
  4. package/dist/cjs/components/AvatarItemOption.js +18 -12
  5. package/dist/cjs/components/CustomOption/main.js +5 -2
  6. package/dist/cjs/components/EmailOption/main.js +5 -2
  7. package/dist/cjs/components/ExternalUserOption/ExternalAvatarItemOption.js +18 -12
  8. package/dist/cjs/components/ExternalUserOption/InfoIcon.js +2 -0
  9. package/dist/cjs/components/ExternalUserOption/SourcesTooltipContent.js +4 -0
  10. package/dist/cjs/components/ExternalUserOption/main.js +16 -7
  11. package/dist/cjs/components/GroupOption/main.js +7 -2
  12. package/dist/cjs/components/Menu.js +4 -2
  13. package/dist/cjs/components/MultiValue.js +1 -1
  14. package/dist/cjs/components/PopupControl.js +2 -1
  15. package/dist/cjs/components/SingleValue.js +4 -0
  16. package/dist/cjs/components/SingleValueContainer.js +5 -2
  17. package/dist/cjs/components/TeamOption/main.js +6 -2
  18. package/dist/cjs/components/UserOption.js +6 -2
  19. package/dist/cjs/components/UserPicker.js +3 -1
  20. package/dist/cjs/components/ValueContainerWrapper.js +4 -1
  21. package/dist/es2019/analytics.js +1 -1
  22. package/dist/es2019/components/AddOptionAvatar.js +12 -7
  23. package/dist/es2019/components/AvatarItemOption.js +19 -11
  24. package/dist/es2019/components/CustomOption/main.js +5 -1
  25. package/dist/es2019/components/EmailOption/main.js +5 -1
  26. package/dist/es2019/components/ExternalUserOption/ExternalAvatarItemOption.js +8 -1
  27. package/dist/es2019/components/ExternalUserOption/InfoIcon.js +1 -0
  28. package/dist/es2019/components/ExternalUserOption/SourcesTooltipContent.js +3 -0
  29. package/dist/es2019/components/ExternalUserOption/main.js +17 -6
  30. package/dist/es2019/components/GroupOption/main.js +8 -1
  31. package/dist/es2019/components/Menu.js +4 -1
  32. package/dist/es2019/components/MultiValue.js +1 -0
  33. package/dist/es2019/components/PopupControl.js +2 -0
  34. package/dist/es2019/components/SingleValue.js +4 -0
  35. package/dist/es2019/components/SingleValueContainer.js +5 -1
  36. package/dist/es2019/components/TeamOption/main.js +6 -1
  37. package/dist/es2019/components/UserOption.js +6 -1
  38. package/dist/es2019/components/UserPicker.js +3 -1
  39. package/dist/es2019/components/ValueContainerWrapper.js +4 -1
  40. package/dist/esm/analytics.js +1 -1
  41. package/dist/esm/components/AddOptionAvatar.js +12 -7
  42. package/dist/esm/components/AvatarItemOption.js +18 -11
  43. package/dist/esm/components/CustomOption/main.js +5 -1
  44. package/dist/esm/components/EmailOption/main.js +5 -1
  45. package/dist/esm/components/ExternalUserOption/ExternalAvatarItemOption.js +18 -11
  46. package/dist/esm/components/ExternalUserOption/InfoIcon.js +1 -0
  47. package/dist/esm/components/ExternalUserOption/SourcesTooltipContent.js +3 -0
  48. package/dist/esm/components/ExternalUserOption/main.js +17 -6
  49. package/dist/esm/components/GroupOption/main.js +8 -1
  50. package/dist/esm/components/Menu.js +4 -1
  51. package/dist/esm/components/MultiValue.js +1 -0
  52. package/dist/esm/components/PopupControl.js +2 -0
  53. package/dist/esm/components/SingleValue.js +4 -0
  54. package/dist/esm/components/SingleValueContainer.js +5 -1
  55. package/dist/esm/components/TeamOption/main.js +6 -1
  56. package/dist/esm/components/UserOption.js +6 -1
  57. package/dist/esm/components/UserPicker.js +3 -1
  58. package/dist/esm/components/ValueContainerWrapper.js +4 -1
  59. package/dist/types/index.d.ts +1 -1
  60. package/dist/types-ts4.5/index.d.ts +1 -1
  61. package/docs/0-intro.tsx +30 -36
  62. package/docs/1-smart-user-picker.tsx +12 -12
  63. package/docs/2-popup-user-picker.tsx +16 -22
  64. package/package.json +99 -99
  65. package/report.api.md +416 -429
@@ -3,6 +3,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
3
3
  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) { _defineProperty(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; }
4
4
  /** @jsx jsx */
5
5
 
6
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
6
7
  import { css, jsx } from '@emotion/react';
7
8
  import { B400 } from '@atlaskit/theme/colors';
8
9
  var outerWrapper = function outerWrapper(isDisabled) {
@@ -14,7 +15,9 @@ var outerWrapper = function outerWrapper(isDisabled) {
14
15
  outline: 'none',
15
16
  margin: 0,
16
17
  width: '100%',
18
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
17
19
  cursor: isDisabled ? 'not-allowed' : 'pointer',
20
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
18
21
  opacity: isDisabled ? "var(--ds-opacity-disabled, 0.4)" : undefined
19
22
  });
20
23
  };
@@ -45,6 +48,7 @@ var getTextStyle = function getTextStyle(isSecondary) {
45
48
  secondaryCssArgs: secondaryCssArgs
46
49
  }), {}, {
47
50
  whiteSpace: 'nowrap',
51
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
48
52
  '> span': {
49
53
  maxWidth: 'inherit'
50
54
  }
@@ -56,15 +60,18 @@ export var ExternalAvatarItemOption = function ExternalAvatarItemOption(_ref) {
56
60
  primaryText = _ref.primaryText,
57
61
  secondaryText = _ref.secondaryText,
58
62
  sourcesInfoTooltip = _ref.sourcesInfoTooltip;
59
- return jsx("div", {
60
- css: outerWrapper(isDisabled)
61
- }, avatar, jsx("div", {
62
- css: detailsWrapper
63
- }, jsx("div", {
64
- css: textSection
65
- }, jsx("div", null, jsx("div", {
66
- css: getTextStyle()
67
- }, primaryText)), secondaryText && jsx("div", null, jsx("div", {
68
- css: getTextStyle(true)
69
- }, secondaryText))), jsx("div", null, sourcesInfoTooltip)));
63
+ return (
64
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
65
+ jsx("div", {
66
+ css: outerWrapper(isDisabled)
67
+ }, avatar, jsx("div", {
68
+ css: detailsWrapper
69
+ }, jsx("div", {
70
+ css: textSection
71
+ }, jsx("div", null, jsx("div", {
72
+ css: getTextStyle()
73
+ }, primaryText)), secondaryText && jsx("div", null, jsx("div", {
74
+ css: getTextStyle(true)
75
+ }, secondaryText))), jsx("div", null, sourcesInfoTooltip)))
76
+ );
70
77
  };
@@ -1,6 +1,7 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
2
  /** @jsx jsx */
3
3
  import { useCallback, useState } from 'react';
4
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
4
5
  import { css, jsx } from '@emotion/react';
5
6
  import EditorPanelIcon from '@atlaskit/icon/glyph/editor/panel';
6
7
  import { N50, N200 } from '@atlaskit/theme/colors';
@@ -2,6 +2,7 @@
2
2
  import { Box, xcss } from '@atlaskit/primitives';
3
3
  import React from 'react';
4
4
  import { FormattedMessage } from 'react-intl-next';
5
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
5
6
  import { css, jsx } from '@emotion/react';
6
7
  import { AtlassianIcon, ConfluenceIcon, JiraIcon } from '@atlaskit/logo';
7
8
  import Spinner from '@atlaskit/spinner/spinner';
@@ -14,6 +15,8 @@ var sourcesTooltipContainer = xcss({
14
15
  paddingBottom: 'space.050',
15
16
  paddingRight: 'space.050'
16
17
  });
18
+
19
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
17
20
  export var sourceWrapper = css({
18
21
  paddingTop: "var(--ds-space-050, 4px)",
19
22
  display: 'flex',
@@ -10,6 +10,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
10
10
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
11
11
  /** @jsx jsx */
12
12
  import React from 'react';
13
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
13
14
  import { css, jsx } from '@emotion/react';
14
15
  import { B400, N200, N800 } from '@atlaskit/theme/colors';
15
16
  import Tooltip from '@atlaskit/tooltip';
@@ -21,6 +22,8 @@ import { ExternalUserSourcesContainer } from '../ExternalUserSourcesContainer';
21
22
  import InfoIcon from './InfoIcon';
22
23
  import { ExternalAvatarItemOption } from './ExternalAvatarItemOption';
23
24
  import { SourcesTooltipContent } from './SourcesTooltipContent';
25
+
26
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
24
27
  export var imageContainer = css({
25
28
  height: '16px',
26
29
  width: '16px',
@@ -29,6 +32,8 @@ export var imageContainer = css({
29
32
  alignItems: 'center',
30
33
  justifyContent: 'center'
31
34
  });
35
+
36
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
32
37
  export var emailDomainWrapper = css({
33
38
  fontWeight: 'bold'
34
39
  });
@@ -45,7 +50,9 @@ var ExternalUserOptionImpl = /*#__PURE__*/function (_React$PureComponent) {
45
50
  _defineProperty(_assertThisInitialized(_this), "getPrimaryText", function () {
46
51
  var name = _this.props.user.name;
47
52
  return jsx("span", {
48
- key: "name",
53
+ key: "name"
54
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
55
+ ,
49
56
  css: textWrapper(_this.props.isSelected ? "var(--ds-text-selected, ".concat(B400, ")") : "var(--ds-text, ".concat(N800, ")"))
50
57
  }, name);
51
58
  });
@@ -60,6 +67,7 @@ var ExternalUserOptionImpl = /*#__PURE__*/function (_React$PureComponent) {
60
67
 
61
68
  // Render byline if present
62
69
  if (byline) {
70
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
63
71
  return jsx("span", {
64
72
  css: textWrapper(textColor)
65
73
  }, byline);
@@ -72,11 +80,14 @@ var ExternalUserOptionImpl = /*#__PURE__*/function (_React$PureComponent) {
72
80
  emailUser = _email$split2[0],
73
81
  emailDomain = _email$split2[1];
74
82
  var emailDomainWithAt = "@".concat(emailDomain);
75
- return jsx("span", {
76
- css: textWrapper(textColor)
77
- }, emailUser, jsx("span", {
78
- css: emailDomainWrapper
79
- }, emailDomainWithAt));
83
+ return (
84
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
85
+ jsx("span", {
86
+ css: textWrapper(textColor)
87
+ }, emailUser, jsx("span", {
88
+ css: emailDomainWrapper
89
+ }, emailDomainWithAt))
90
+ );
80
91
  }
81
92
  });
82
93
  _defineProperty(_assertThisInitialized(_this), "renderAvatar", function () {
@@ -10,14 +10,18 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
10
10
  /** @jsx jsx */
11
11
  import React from 'react';
12
12
  import { FormattedMessage } from 'react-intl-next';
13
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
13
14
  import { css, jsx } from '@emotion/react';
14
15
  import { N20, B400, N800, N200 } from '@atlaskit/theme/colors';
15
16
  import PeopleIcon from '@atlaskit/icon/glyph/people';
16
17
  import { AvatarItemOption, textWrapper } from '../AvatarItemOption';
17
18
  import { messages } from '../i18n';
18
19
  import { HighlightText } from '../HighlightText';
20
+
21
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
19
22
  export var groupOptionIconWrapper = css({
20
23
  padding: "var(--ds-space-025, 2px)",
24
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
21
25
  '> span': {
22
26
  backgroundColor: "var(--ds-background-neutral, ".concat(N20, ")"),
23
27
  borderRadius: '50%',
@@ -41,7 +45,9 @@ export var GroupOption = /*#__PURE__*/function (_React$PureComponent) {
41
45
  name = _this$props$group.name,
42
46
  highlight = _this$props$group.highlight;
43
47
  return [jsx("span", {
44
- key: "name",
48
+ key: "name"
49
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
50
+ ,
45
51
  css: textWrapper(isSelected ? "var(--ds-text-selected, ".concat(B400, ")") : "var(--ds-text, ".concat(N800, ")"))
46
52
  }, jsx(HighlightText, {
47
53
  highlights: highlight && highlight.name
@@ -58,6 +64,7 @@ export var GroupOption = /*#__PURE__*/function (_React$PureComponent) {
58
64
  _defineProperty(_assertThisInitialized(_this), "renderByline", function () {
59
65
  var isSelected = _this.props.isSelected;
60
66
  return jsx("span", {
67
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
61
68
  css: textWrapper(isSelected ? "var(--ds-text-selected, ".concat(B400, ")") : "var(--ds-text-subtlest, ".concat(N200, ")")),
62
69
  "data-testid": "user-picker-group-secondary-text"
63
70
  }, jsx(FormattedMessage, messages.groupByline));
@@ -8,6 +8,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
8
8
  /** @jsx jsx */
9
9
  import React from 'react';
10
10
  import { components } from '@atlaskit/select';
11
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
11
12
  import { css, jsx } from '@emotion/react';
12
13
  var getFooterStyle = function getFooterStyle() {
13
14
  return css({
@@ -24,7 +25,9 @@ export var Menu = /*#__PURE__*/function (_React$Component) {
24
25
  _createClass(Menu, [{
25
26
  key: "render",
26
27
  value: function render() {
27
- return jsx(components.Menu, this.props, this.props.selectProps.header, this.props.children, this.props.selectProps.footer && jsx("div", {
28
+ return jsx(components.Menu, this.props, this.props.selectProps.header, this.props.children, this.props.selectProps.footer &&
29
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
30
+ jsx("div", {
28
31
  css: getFooterStyle()
29
32
  }, this.props.selectProps.footer));
30
33
  }
@@ -15,6 +15,7 @@ import React from 'react';
15
15
  import { FormattedMessage } from 'react-intl-next';
16
16
  import { Box, xcss } from '@atlaskit/primitives';
17
17
  import { components } from '@atlaskit/select';
18
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
18
19
  import { css, jsx } from '@emotion/react';
19
20
  import { AddOptionAvatar } from './AddOptionAvatar';
20
21
  import { SizeableAvatar } from './SizeableAvatar';
@@ -8,6 +8,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
8
8
  /** @jsx jsx */
9
9
  import React from 'react';
10
10
  import { components } from '@atlaskit/select';
11
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
11
12
  import { css, jsx } from '@emotion/react';
12
13
  import { N200 } from '@atlaskit/theme/colors';
13
14
  var spacing = 8;
@@ -24,6 +25,7 @@ var getLabelStyle = function getLabelStyle() {
24
25
  color: "var(--ds-text-subtlest, ".concat(N200, ")"),
25
26
  fontSize: "".concat(fontSize, "px"),
26
27
  fontWeight: 600,
28
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
27
29
  lineHeight: "".concat(lineHeight),
28
30
  paddingBottom: "var(--ds-space-050, 4px)",
29
31
  paddingLeft: "var(--ds-space-0, 0px)",
@@ -3,16 +3,20 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
3
3
  var _excluded = ["ref"];
4
4
  /** @jsx jsx */
5
5
  import { AvatarItem } from '@atlaskit/avatar';
6
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
6
7
  import { css, jsx } from '@emotion/react';
7
8
  import { components } from '@atlaskit/select';
8
9
  import { SizeableAvatar } from './SizeableAvatar';
9
10
  import { getAvatarUrl } from './utils';
10
11
  var avatarItemComponent = css({
12
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
11
13
  border: 'none !important',
14
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
12
15
  padding: "var(--ds-space-0, 0px)".concat(" !important"),
13
16
  width: 'auto',
14
17
  overflow: 'hidden',
15
18
  minWidth: '100px',
19
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
16
20
  '& > span': {
17
21
  boxSizing: 'border-box'
18
22
  },
@@ -11,12 +11,14 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
11
11
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
12
12
  /** @jsx jsx */
13
13
  import { components } from '@atlaskit/select';
14
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
14
15
  import { css, jsx } from '@emotion/react';
15
16
  import React from 'react';
16
17
  import { SizeableAvatar } from './SizeableAvatar';
17
18
  import { BORDER_PADDING } from './styles';
18
19
  import ValueContainerWrapper from './ValueContainerWrapper';
19
20
  var placeholderIconContainer = css({
21
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
20
22
  paddingLeft: BORDER_PADDING,
21
23
  lineHeight: 0,
22
24
  gridArea: '1/1/2/2'
@@ -55,7 +57,9 @@ export var SingleValueContainer = /*#__PURE__*/function (_React$Component) {
55
57
  _defineProperty(_assertThisInitialized(_this), "onValueContainerClick", _this.props.selectProps.onValueContainerClick);
56
58
  _defineProperty(_assertThisInitialized(_this), "Wrapper", function (_ref) {
57
59
  var children = _ref.children;
58
- return _this.onValueContainerClick ? jsx("div", {
60
+ return _this.onValueContainerClick ?
61
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
62
+ jsx("div", {
59
63
  css: css({
60
64
  flexGrow: 1
61
65
  }),
@@ -10,6 +10,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
10
10
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
11
11
  /** @jsx jsx */
12
12
  import { B400, N800, N200 } from '@atlaskit/theme/colors';
13
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
13
14
  import { jsx } from '@emotion/react';
14
15
  import React from 'react';
15
16
  import { FormattedMessage } from 'react-intl-next';
@@ -32,7 +33,9 @@ export var TeamOption = /*#__PURE__*/function (_React$PureComponent) {
32
33
  name = _this$props$team.name,
33
34
  highlight = _this$props$team.highlight;
34
35
  return [jsx("span", {
35
- key: "name",
36
+ key: "name"
37
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
38
+ ,
36
39
  css: textWrapper(_this.props.isSelected ? "var(--ds-text-selected, ".concat(B400, ")") : "var(--ds-text, ".concat(N800, ")"))
37
40
  }, jsx(HighlightText, {
38
41
  highlights: highlight && highlight.name
@@ -74,6 +77,7 @@ export var TeamOption = /*#__PURE__*/function (_React$PureComponent) {
74
77
  });
75
78
  _defineProperty(_assertThisInitialized(_this), "getBylineComponent", function (isSelected, message) {
76
79
  return jsx("span", {
80
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
77
81
  css: textWrapper(isSelected ? "var(--ds-text-selected, ".concat(B400, ")") : "var(--ds-text-subtlest, ".concat(N200, ")")),
78
82
  "data-testid": "user-picker-team-secondary-text"
79
83
  }, message);
@@ -97,6 +101,7 @@ export var TeamOption = /*#__PURE__*/function (_React$PureComponent) {
97
101
  return undefined;
98
102
  }
99
103
  return jsx("span", {
104
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
100
105
  css: textWrapper(_this.props.isSelected ? "var(--ds-text-selected, ".concat(B400, ")") : "var(--ds-text-subtlest, ".concat(N200, ")"))
101
106
  }, _this.props.team.byline);
102
107
  });
@@ -9,6 +9,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
9
9
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
10
10
  /** @jsx jsx */
11
11
  import { B400, N800, N200 } from '@atlaskit/theme/colors';
12
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
12
13
  import { jsx } from '@emotion/react';
13
14
  import React from 'react';
14
15
  import { AvatarItemOption, textWrapper } from './AvatarItemOption';
@@ -31,7 +32,9 @@ export var UserOption = /*#__PURE__*/function (_React$PureComponent) {
31
32
  publicName = _this$props$user.publicName,
32
33
  highlight = _this$props$user.highlight;
33
34
  var result = [jsx("span", {
34
- key: "name",
35
+ key: "name"
36
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
37
+ ,
35
38
  css: textWrapper(_this.props.isSelected ? "var(--ds-text-selected, ".concat(B400, ")") : "var(--ds-text, ".concat(N800, ")"))
36
39
  }, jsx(HighlightText, {
37
40
  highlights: highlight && highlight.name
@@ -40,6 +43,7 @@ export var UserOption = /*#__PURE__*/function (_React$PureComponent) {
40
43
  result.push(jsx(React.Fragment, {
41
44
  key: "publicName"
42
45
  }, ' ', jsx("span", {
46
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
43
47
  css: textWrapper(_this.props.isSelected ? "var(--ds-text-selected, ".concat(B400, ")") : "var(--ds-text-subtlest, ".concat(N200, ")"))
44
48
  }, "(", jsx(HighlightText, {
45
49
  highlights: highlight && highlight.publicName
@@ -49,6 +53,7 @@ export var UserOption = /*#__PURE__*/function (_React$PureComponent) {
49
53
  });
50
54
  _defineProperty(_assertThisInitialized(_this), "renderSecondaryText", function () {
51
55
  return _this.props.user.byline ? jsx("span", {
56
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
52
57
  css: textWrapper(_this.props.isSelected ? "var(--ds-text-selected, ".concat(B400, ")") : "var(--ds-text-subtlest, ".concat(N200, ")"))
53
58
  }, _this.props.user.byline) : undefined;
54
59
  });
@@ -82,7 +82,9 @@ export var UserPickerWithoutAnalytics = /*#__PURE__*/function (_React$Component)
82
82
  fetchUserSource: loadUserSource
83
83
  }, /*#__PURE__*/React.createElement(BaseUserPickerWithoutAnalytics, _extends({}, this.props, {
84
84
  width: width,
85
- SelectComponent: SelectComponent,
85
+ SelectComponent: SelectComponent
86
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
87
+ ,
86
88
  styles: getStyles(width, isMulti, this.props.appearance === 'compact', this.props.styles),
87
89
  components: getComponents(isMulti, anchor),
88
90
  pickerProps: pickerProps
@@ -1,4 +1,5 @@
1
1
  /** @jsx jsx */
2
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
2
3
  import { css, jsx } from '@emotion/react';
3
4
 
4
5
  /**
@@ -10,7 +11,9 @@ var ValueContainerWrapper = function ValueContainerWrapper(_ref) {
10
11
  var children = _ref.children,
11
12
  isEnabled = _ref.isEnabled,
12
13
  onMouseDown = _ref.onMouseDown;
13
- return isEnabled ? jsx("div", {
14
+ return isEnabled ?
15
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
16
+ jsx("div", {
14
17
  css: css({
15
18
  flexGrow: 1
16
19
  }),
@@ -1,5 +1,5 @@
1
1
  export { isValidEmail } from './components/emailValidation';
2
- export type { EmailValidationResponse, EmailValidator, } from './components/emailValidation';
2
+ export type { EmailValidationResponse, EmailValidator } from './components/emailValidation';
3
3
  export { UserPicker as default } from './components/UserPicker';
4
4
  export { PopupUserPicker } from './components/PopupUserPicker';
5
5
  export { isEmail, isExternalUser, isTeam, isUser } from './components/utils';
@@ -1,5 +1,5 @@
1
1
  export { isValidEmail } from './components/emailValidation';
2
- export type { EmailValidationResponse, EmailValidator, } from './components/emailValidation';
2
+ export type { EmailValidationResponse, EmailValidator } from './components/emailValidation';
3
3
  export { UserPicker as default } from './components/UserPicker';
4
4
  export { PopupUserPicker } from './components/PopupUserPicker';
5
5
  export { isEmail, isExternalUser, isTeam, isUser } from './components/utils';
package/docs/0-intro.tsx CHANGED
@@ -1,11 +1,5 @@
1
1
  import React from 'react';
2
- import {
3
- code,
4
- Example,
5
- md,
6
- Props,
7
- AtlassianInternalWarning,
8
- } from '@atlaskit/docs';
2
+ import { code, Example, md, Props, AtlassianInternalWarning } from '@atlaskit/docs';
9
3
 
10
4
  export default md`
11
5
  ${(<AtlassianInternalWarning />)}
@@ -26,39 +20,39 @@ export default md`
26
20
  ${code`import UserPicker from '@atlaskit/user-picker';`}
27
21
 
28
22
  ${(
29
- <Example
30
- packageName="@atlaskit/user-picker"
31
- Component={require('../examples/00-single').default}
32
- title="Single User Picker"
33
- source={require('!!raw-loader!../examples/00-single')}
34
- />
35
- )}
23
+ <Example
24
+ packageName="@atlaskit/user-picker"
25
+ Component={require('../examples/00-single').default}
26
+ title="Single User Picker"
27
+ source={require('!!raw-loader!../examples/00-single')}
28
+ />
29
+ )}
36
30
 
37
31
  ${(
38
- <Example
39
- packageName="@atlaskit/user-picker"
40
- Component={require('../examples/01-multi').default}
41
- title="Multi User Picker"
42
- source={require('!!raw-loader!../examples/01-multi')}
43
- />
44
- )}
32
+ <Example
33
+ packageName="@atlaskit/user-picker"
34
+ Component={require('../examples/01-multi').default}
35
+ title="Multi User Picker"
36
+ source={require('!!raw-loader!../examples/01-multi')}
37
+ />
38
+ )}
45
39
 
46
40
  ${(
47
- <Example
48
- packageName="@atlaskit/user-picker"
49
- Component={require('../examples/11-watchers').default}
50
- title="Watchers"
51
- source={require('!!raw-loader!../examples/11-watchers')}
52
- />
53
- )}
41
+ <Example
42
+ packageName="@atlaskit/user-picker"
43
+ Component={require('../examples/11-watchers').default}
44
+ title="Watchers"
45
+ source={require('!!raw-loader!../examples/11-watchers')}
46
+ />
47
+ )}
54
48
 
55
49
  ${(
56
- <Props
57
- heading="User Picker Props"
58
- props={require('!!extract-react-types-loader!../src/components/UserPicker')}
59
- overrides={{
60
- createAnalyticsEvent: () => null,
61
- }}
62
- />
63
- )}
50
+ <Props
51
+ heading="User Picker Props"
52
+ props={require('!!extract-react-types-loader!../src/components/UserPicker')}
53
+ overrides={{
54
+ createAnalyticsEvent: () => null,
55
+ }}
56
+ />
57
+ )}
64
58
  `;
@@ -4,16 +4,16 @@ import SectionMessage from '@atlaskit/section-message';
4
4
 
5
5
  export default md`
6
6
  ${(
7
- <SectionMessage
8
- appearance="warning"
9
- title="Note: @atlaskit/user-picker/smart-user-picker is deprecated."
10
- >
11
- SmartUserPicker has moved packages! Please use{' '}
12
- <a href="https://statlas.prod.atl-paas.net/atlassian-frontend/master#packages/smart-experiences/smart-user-picker">
13
- @atlaskit/smart-user-picker
14
- </a>{' '}
15
- instead. Alternatively, @atlaskit/smart-hooks will be ready by end of
16
- FY22Q4. Contact #help-smart-experiences for further details.
17
- </SectionMessage>
18
- )}
7
+ <SectionMessage
8
+ appearance="warning"
9
+ title="Note: @atlaskit/user-picker/smart-user-picker is deprecated."
10
+ >
11
+ SmartUserPicker has moved packages! Please use{' '}
12
+ <a href="https://statlas.prod.atl-paas.net/atlassian-frontend/master#packages/smart-experiences/smart-user-picker">
13
+ @atlaskit/smart-user-picker
14
+ </a>{' '}
15
+ instead. Alternatively, @atlaskit/smart-hooks will be ready by end of FY22Q4. Contact
16
+ #help-smart-experiences for further details.
17
+ </SectionMessage>
18
+ )}
19
19
  `;
@@ -1,11 +1,5 @@
1
1
  import React from 'react';
2
- import {
3
- code,
4
- Example,
5
- md,
6
- Props,
7
- AtlassianInternalWarning,
8
- } from '@atlaskit/docs';
2
+ import { code, Example, md, Props, AtlassianInternalWarning } from '@atlaskit/docs';
9
3
 
10
4
  export default md`
11
5
  ${(<AtlassianInternalWarning />)}
@@ -19,21 +13,21 @@ export default md`
19
13
  ${code`import { PopupUserPicker } from '@atlaskit/user-picker';`}
20
14
 
21
15
  ${(
22
- <Example
23
- packageName="@atlaskit/user-picker"
24
- Component={require('../examples/19-popup-config').default}
25
- title="Modal"
26
- source={require('!!raw-loader!../examples/19-popup-config')}
27
- />
28
- )}
16
+ <Example
17
+ packageName="@atlaskit/user-picker"
18
+ Component={require('../examples/19-popup-config').default}
19
+ title="Modal"
20
+ source={require('!!raw-loader!../examples/19-popup-config')}
21
+ />
22
+ )}
29
23
 
30
24
  ${(
31
- <Props
32
- heading="Popup User Picker Props"
33
- props={require('!!extract-react-types-loader!../src/components/PopupUserPicker')}
34
- overrides={{
35
- createAnalyticsEvent: () => null,
36
- }}
37
- />
38
- )}
25
+ <Props
26
+ heading="Popup User Picker Props"
27
+ props={require('!!extract-react-types-loader!../src/components/PopupUserPicker')}
28
+ overrides={{
29
+ createAnalyticsEvent: () => null,
30
+ }}
31
+ />
32
+ )}
39
33
  `;