@atlaskit/user-picker 10.22.6 → 10.23.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @atlaskit/user-picker
2
2
 
3
+ ## 10.23.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#136484](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/136484)
8
+ [`b41c0d44e7b21`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/b41c0d44e7b21) -
9
+ [ux] Allow supplying custom byline to Group items
10
+
3
11
  ## 10.22.6
4
12
 
5
13
  ### Patch Changes
@@ -12,7 +12,7 @@ var _utils = require("./components/utils");
12
12
  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; }
13
13
  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; }
14
14
  var packageName = "@atlaskit/user-picker";
15
- var packageVersion = "10.22.6";
15
+ var packageVersion = "10.23.0";
16
16
  var UUID_REGEXP_TEAMS_GROUPS = /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;
17
17
  var UUID_REGEXP_OLD_AAID = /^[a-fA-F0-9]{1,8}:[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;
18
18
  var UUID_REGEXP_NEW_AAID = /^[a-fA-F0-9]{24,24}$/;
@@ -69,12 +69,14 @@ var GroupOption = exports.GroupOption = /*#__PURE__*/function (_React$PureCompon
69
69
  }));
70
70
  });
71
71
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "renderByline", function () {
72
- var isSelected = _this.props.isSelected;
72
+ var _this$props2 = _this.props,
73
+ isSelected = _this$props2.isSelected,
74
+ group = _this$props2.group;
73
75
  return (0, _react2.jsx)("span", {
74
76
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
75
77
  css: (0, _AvatarItemOption.textWrapper)(isSelected ? "var(--ds-text-selected, ".concat(_colors.B400, ")") : "var(--ds-text-subtlest, ".concat(_colors.N200, ")")),
76
78
  "data-testid": "user-picker-group-secondary-text"
77
- }, (0, _react2.jsx)(_reactIntlNext.FormattedMessage, _i18n.messages.groupByline));
79
+ }, group.byline ? group.byline : (0, _react2.jsx)(_reactIntlNext.FormattedMessage, _i18n.messages.groupByline));
78
80
  });
79
81
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "getLozengeProps", function () {
80
82
  return typeof _this.props.group.lozenge === 'string' ? {
@@ -47,6 +47,7 @@ var groupTagContainer = (0, _primitives.xcss)({
47
47
  paddingLeft: 'space.025'
48
48
  });
49
49
  var nameWrapper = (0, _react2.css)({
50
+ font: "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
50
51
  paddingLeft: "var(--ds-space-050, 4px)"
51
52
  });
52
53
  var MultiValue = exports.MultiValue = /*#__PURE__*/function (_React$Component) {
@@ -2,7 +2,7 @@ import { createAndFireEvent } from '@atlaskit/analytics-next';
2
2
  import { v4 as uuidv4 } from 'uuid';
3
3
  import { isCustom, isExternalUser } from './components/utils';
4
4
  const packageName = "@atlaskit/user-picker";
5
- const packageVersion = "10.22.6";
5
+ const packageVersion = "10.23.0";
6
6
  const UUID_REGEXP_TEAMS_GROUPS = /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;
7
7
  const UUID_REGEXP_OLD_AAID = /^[a-fA-F0-9]{1,8}:[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;
8
8
  const UUID_REGEXP_NEW_AAID = /^[a-fA-F0-9]{24,24}$/;
@@ -51,13 +51,14 @@ export class GroupOption extends React.PureComponent {
51
51
  })));
52
52
  _defineProperty(this, "renderByline", () => {
53
53
  const {
54
- isSelected
54
+ isSelected,
55
+ group
55
56
  } = this.props;
56
57
  return jsx("span", {
57
58
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
58
59
  css: textWrapper(isSelected ? `var(--ds-text-selected, ${B400})` : `var(--ds-text-subtlest, ${N200})`),
59
60
  "data-testid": "user-picker-group-secondary-text"
60
- }, jsx(FormattedMessage, messages.groupByline));
61
+ }, group.byline ? group.byline : jsx(FormattedMessage, messages.groupByline));
61
62
  });
62
63
  _defineProperty(this, "getLozengeProps", () => typeof this.props.group.lozenge === 'string' ? {
63
64
  text: this.props.group.lozenge
@@ -34,7 +34,8 @@ const groupTagContainer = xcss({
34
34
  paddingLeft: 'space.025'
35
35
  });
36
36
  const nameWrapper = css({
37
- paddingLeft: `${"var(--ds-space-050, 4px)"}`
37
+ font: "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
38
+ paddingLeft: "var(--ds-space-050, 4px)"
38
39
  });
39
40
  export class MultiValue extends React.Component {
40
41
  constructor(props) {
@@ -5,7 +5,7 @@ import { createAndFireEvent } from '@atlaskit/analytics-next';
5
5
  import { v4 as uuidv4 } from 'uuid';
6
6
  import { isCustom, isExternalUser } from './components/utils';
7
7
  var packageName = "@atlaskit/user-picker";
8
- var packageVersion = "10.22.6";
8
+ var packageVersion = "10.23.0";
9
9
  var UUID_REGEXP_TEAMS_GROUPS = /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;
10
10
  var UUID_REGEXP_OLD_AAID = /^[a-fA-F0-9]{1,8}:[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;
11
11
  var UUID_REGEXP_NEW_AAID = /^[a-fA-F0-9]{24,24}$/;
@@ -65,12 +65,14 @@ export var GroupOption = /*#__PURE__*/function (_React$PureComponent) {
65
65
  }));
66
66
  });
67
67
  _defineProperty(_assertThisInitialized(_this), "renderByline", function () {
68
- var isSelected = _this.props.isSelected;
68
+ var _this$props2 = _this.props,
69
+ isSelected = _this$props2.isSelected,
70
+ group = _this$props2.group;
69
71
  return jsx("span", {
70
72
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
71
73
  css: textWrapper(isSelected ? "var(--ds-text-selected, ".concat(B400, ")") : "var(--ds-text-subtlest, ".concat(N200, ")")),
72
74
  "data-testid": "user-picker-group-secondary-text"
73
- }, jsx(FormattedMessage, messages.groupByline));
75
+ }, group.byline ? group.byline : jsx(FormattedMessage, messages.groupByline));
74
76
  });
75
77
  _defineProperty(_assertThisInitialized(_this), "getLozengeProps", function () {
76
78
  return typeof _this.props.group.lozenge === 'string' ? {
@@ -42,6 +42,7 @@ var groupTagContainer = xcss({
42
42
  paddingLeft: 'space.025'
43
43
  });
44
44
  var nameWrapper = css({
45
+ font: "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
45
46
  paddingLeft: "var(--ds-space-050, 4px)"
46
47
  });
47
48
  export var MultiValue = /*#__PURE__*/function (_React$Component) {
@@ -293,6 +293,7 @@ export declare const GroupType = "group";
293
293
  export interface Group extends OptionData {
294
294
  highlight?: GroupHighlight;
295
295
  type: 'group';
296
+ byline?: string;
296
297
  }
297
298
  export interface Custom extends OptionData {
298
299
  avatarUrl?: string;
@@ -296,6 +296,7 @@ export declare const GroupType = "group";
296
296
  export interface Group extends OptionData {
297
297
  highlight?: GroupHighlight;
298
298
  type: 'group';
299
+ byline?: string;
299
300
  }
300
301
  export interface Custom extends OptionData {
301
302
  avatarUrl?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/user-picker",
3
- "version": "10.22.6",
3
+ "version": "10.23.0",
4
4
  "description": "Fabric component for display a dropdown to select a user from",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -30,30 +30,26 @@
30
30
  },
31
31
  "atlassian": {
32
32
  "team": "Search Platform: Search Experience",
33
- "releaseModel": "continuous",
34
33
  "website": {
35
34
  "name": "User Picker"
36
- },
37
- "productPushConsumption": [
38
- "jira"
39
- ]
35
+ }
40
36
  },
41
37
  "config": {
42
38
  "access": "public"
43
39
  },
44
40
  "dependencies": {
45
41
  "@atlaskit/analytics-next": "^10.1.0",
46
- "@atlaskit/avatar": "^21.14.0",
47
- "@atlaskit/icon": "^22.12.0",
42
+ "@atlaskit/avatar": "^21.15.0",
43
+ "@atlaskit/icon": "^22.15.0",
48
44
  "@atlaskit/logo": "^14.2.0",
49
45
  "@atlaskit/lozenge": "^11.10.0",
50
46
  "@atlaskit/popper": "^6.2.0",
51
- "@atlaskit/primitives": "^12.0.0",
52
- "@atlaskit/select": "^17.13.0",
47
+ "@atlaskit/primitives": "^12.1.0",
48
+ "@atlaskit/select": "^17.15.0",
53
49
  "@atlaskit/spinner": "^16.3.0",
54
50
  "@atlaskit/teams-avatar": "^1.1.0",
55
51
  "@atlaskit/theme": "^13.0.0",
56
- "@atlaskit/tokens": "^1.58.0",
52
+ "@atlaskit/tokens": "^1.59.0",
57
53
  "@atlaskit/tooltip": "^18.7.0",
58
54
  "@atlaskit/ufo": "^0.3.0",
59
55
  "@babel/runtime": "^7.0.0",