@atlaskit/user-picker 10.17.0 → 10.18.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,17 @@
1
1
  # @atlaskit/user-picker
2
2
 
3
+ ## 10.18.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#71808](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/71808) [`eaf1018c6017`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/eaf1018c6017) - Displaying users title in Atlas search results and changing meta style to align to the right without fixed width
8
+
9
+ ## 10.17.1
10
+
11
+ ### Patch Changes
12
+
13
+ - [#72162](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/72162) [`dadc682d36ba`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/dadc682d36ba) - Replace hardcoded values with space tokens
14
+
3
15
  ## 10.17.0
4
16
 
5
17
  ### Minor 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.17.0";
15
+ var packageVersion = "10.18.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}$/;
@@ -7,14 +7,14 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.AddOptionAvatar = void 0;
8
8
  var _email = _interopRequireDefault(require("@atlaskit/icon/glyph/email"));
9
9
  var _colors = require("@atlaskit/theme/colors");
10
- var _react = _interopRequireDefault(require("react"));
11
- var _react2 = require("@emotion/react");
10
+ var _react = require("@emotion/react");
11
+ var _react2 = _interopRequireDefault(require("react"));
12
12
  /** @jsx jsx */
13
13
 
14
14
  var getEmailAvatarWrapperStyle = function getEmailAvatarWrapperStyle(isLozenge) {
15
- var padding = isLozenge ? 0 : 4;
16
- return (0, _react2.css)({
17
- padding: "".concat(padding, "px"),
15
+ var padding = isLozenge ? "var(--ds-space-0, 0px)" : "var(--ds-space-050, 4px)";
16
+ return (0, _react.css)({
17
+ padding: padding,
18
18
  backgroundColor: "var(--ds-background-neutral, ".concat(_colors.N40, ")"),
19
19
  borderRadius: '50%',
20
20
  display: 'flex',
@@ -24,9 +24,9 @@ var getEmailAvatarWrapperStyle = function getEmailAvatarWrapperStyle(isLozenge)
24
24
  var AddOptionAvatar = exports.AddOptionAvatar = function AddOptionAvatar(_ref) {
25
25
  var isLozenge = _ref.isLozenge,
26
26
  label = _ref.label;
27
- return (0, _react2.jsx)("div", {
27
+ return (0, _react.jsx)("div", {
28
28
  css: getEmailAvatarWrapperStyle(isLozenge)
29
- }, (0, _react2.jsx)(_email.default, {
29
+ }, (0, _react.jsx)(_email.default, {
30
30
  label: label,
31
31
  size: isLozenge ? 'small' : 'medium',
32
32
  primaryColor: "var(--ds-text-subtle, ".concat(_colors.N500, ")")
@@ -44,7 +44,7 @@ var groupTagContainer = (0, _primitives.xcss)({
44
44
  paddingLeft: 'space.025'
45
45
  });
46
46
  var nameWrapper = (0, _react2.css)({
47
- paddingLeft: '5px'
47
+ paddingLeft: "var(--ds-space-050, 4px)"
48
48
  });
49
49
  var MultiValue = exports.MultiValue = /*#__PURE__*/function (_React$Component) {
50
50
  (0, _inherits2.default)(MultiValue, _React$Component);
@@ -16,7 +16,7 @@ var _excluded = ["ref"];
16
16
  /** @jsx jsx */
17
17
  var avatarItemComponent = (0, _react.css)({
18
18
  border: 'none !important',
19
- padding: '0 !important',
19
+ padding: "var(--ds-space-0, 0px)".concat(" !important"),
20
20
  width: 'auto',
21
21
  overflow: 'hidden',
22
22
  minWidth: '100px',
@@ -23,7 +23,7 @@ var _excluded = ["children"];
23
23
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
24
24
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /** @jsx jsx */
25
25
  var placeholderIconContainer = (0, _react.css)({
26
- paddingLeft: "".concat(_styles.BORDER_PADDING, "px"),
26
+ paddingLeft: _styles.BORDER_PADDING,
27
27
  lineHeight: 0,
28
28
  gridArea: '1/1/2/2'
29
29
  });
@@ -14,7 +14,7 @@ var _excluded = ["paddingTop", "paddingBottom", "paddingLeft", "paddingRight"],
14
14
  _excluded2 = ["paddingTop", "paddingBottom", "position"];
15
15
  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; }
16
16
  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; }
17
- var BORDER_PADDING = exports.BORDER_PADDING = 6;
17
+ var BORDER_PADDING = exports.BORDER_PADDING = "var(--ds-space-075, 6px)";
18
18
  var AVATAR_PADDING = exports.AVATAR_PADDING = 6;
19
19
  var INDICATOR_WIDTH = exports.INDICATOR_WIDTH = 39;
20
20
  var getStyles = exports.getStyles = (0, _memoizeOne.default)(function (width, isMulti, isCompact, overrideStyles) {
@@ -85,8 +85,8 @@ var getStyles = exports.getStyles = (0, _memoizeOne.default)(function (width, is
85
85
  var isMulti = state.selectProps.isMulti;
86
86
  return _objectSpread(_objectSpread({}, css), {}, {
87
87
  gridTemplateColumns: 'auto 1fr',
88
- paddingTop: isCompact ? 0 : "".concat(BORDER_PADDING, "px"),
89
- paddingBottom: isCompact ? 0 : "".concat(BORDER_PADDING, "px"),
88
+ paddingTop: isCompact ? 0 : BORDER_PADDING,
89
+ paddingBottom: isCompact ? 0 : BORDER_PADDING,
90
90
  paddingLeft: isMulti ? BORDER_PADDING : 0,
91
91
  overflowX: 'hidden',
92
92
  overflowY: 'auto',
@@ -125,7 +125,7 @@ var getStyles = exports.getStyles = (0, _memoizeOne.default)(function (width, is
125
125
  }
126
126
  return _objectSpread(_objectSpread({}, css), {}, {
127
127
  gridArea: '1/2/2/3',
128
- paddingLeft: state.selectProps.isMulti ? 0 : "".concat(BORDER_PADDING, "px"),
128
+ paddingLeft: state.selectProps.isMulti ? 0 : BORDER_PADDING,
129
129
  /* Margin left right of 2px set by default */
130
130
  // margin: `0 ${BORDER_PADDING}px`,
131
131
  margin: 0,
@@ -148,7 +148,7 @@ var getStyles = exports.getStyles = (0, _memoizeOne.default)(function (width, is
148
148
  /* Padding top and bottom of 2 is set by default. */
149
149
  paddingTop: 0,
150
150
  paddingBottom: 0,
151
- paddingLeft: state.selectProps.isMulti ? 0 : "".concat(BORDER_PADDING, "px"),
151
+ paddingLeft: state.selectProps.isMulti ? 0 : BORDER_PADDING,
152
152
  '& input::placeholder': {
153
153
  /* Chrome, Firefox, Opera, Safari 10.1+ */
154
154
  color: "var(--ds-text-subtlest, ".concat(_colors.N100, ")"),
@@ -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.17.0";
5
+ const packageVersion = "10.18.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}$/;
@@ -1,12 +1,12 @@
1
1
  /** @jsx jsx */
2
2
  import EmailIcon from '@atlaskit/icon/glyph/email';
3
3
  import { N40, N500 } from '@atlaskit/theme/colors';
4
- import React from 'react';
5
4
  import { css, jsx } from '@emotion/react';
5
+ import React from 'react';
6
6
  const getEmailAvatarWrapperStyle = isLozenge => {
7
- const padding = isLozenge ? 0 : 4;
7
+ const padding = isLozenge ? `${"var(--ds-space-0, 0px)"}` : `${"var(--ds-space-050, 4px)"}`;
8
8
  return css({
9
- padding: `${padding}px`,
9
+ padding: padding,
10
10
  backgroundColor: `var(--ds-background-neutral, ${N40})`,
11
11
  borderRadius: '50%',
12
12
  display: 'flex',
@@ -30,7 +30,7 @@ const groupTagContainer = xcss({
30
30
  paddingLeft: 'space.025'
31
31
  });
32
32
  const nameWrapper = css({
33
- paddingLeft: '5px'
33
+ paddingLeft: `${"var(--ds-space-050, 4px)"}`
34
34
  });
35
35
  export class MultiValue extends React.Component {
36
36
  constructor(props) {
@@ -7,7 +7,7 @@ import { SizeableAvatar } from './SizeableAvatar';
7
7
  import { getAvatarUrl } from './utils';
8
8
  const avatarItemComponent = css({
9
9
  border: 'none !important',
10
- padding: '0 !important',
10
+ padding: `${"var(--ds-space-0, 0px)"} !important`,
11
11
  width: 'auto',
12
12
  overflow: 'hidden',
13
13
  minWidth: '100px',
@@ -7,7 +7,7 @@ import { SizeableAvatar } from './SizeableAvatar';
7
7
  import { BORDER_PADDING } from './styles';
8
8
  import ValueContainerWrapper from './ValueContainerWrapper';
9
9
  const placeholderIconContainer = css({
10
- paddingLeft: `${BORDER_PADDING}px`,
10
+ paddingLeft: BORDER_PADDING,
11
11
  lineHeight: 0,
12
12
  gridArea: '1/1/2/2'
13
13
  });
@@ -1,7 +1,7 @@
1
1
  import { B100, N0, N10, N20, N30, N40, N100, R50, R400 } from '@atlaskit/theme/colors';
2
2
  import memoizeOne from 'memoize-one';
3
3
  import { mergeStyles } from '@atlaskit/select';
4
- export const BORDER_PADDING = 6;
4
+ export const BORDER_PADDING = "var(--ds-space-075, 6px)";
5
5
  export const AVATAR_PADDING = 6;
6
6
  export const INDICATOR_WIDTH = 39;
7
7
  export const getStyles = memoizeOne((width, isMulti, isCompact, overrideStyles) => {
@@ -73,8 +73,8 @@ export const getStyles = memoizeOne((width, isMulti, isCompact, overrideStyles)
73
73
  return {
74
74
  ...css,
75
75
  gridTemplateColumns: 'auto 1fr',
76
- paddingTop: isCompact ? 0 : `${BORDER_PADDING}px`,
77
- paddingBottom: isCompact ? 0 : `${BORDER_PADDING}px`,
76
+ paddingTop: isCompact ? 0 : BORDER_PADDING,
77
+ paddingBottom: isCompact ? 0 : BORDER_PADDING,
78
78
  paddingLeft: isMulti ? BORDER_PADDING : 0,
79
79
  overflowX: 'hidden',
80
80
  overflowY: 'auto',
@@ -111,7 +111,7 @@ export const getStyles = memoizeOne((width, isMulti, isCompact, overrideStyles)
111
111
  return {
112
112
  ...css,
113
113
  gridArea: '1/2/2/3',
114
- paddingLeft: state.selectProps.isMulti ? 0 : `${BORDER_PADDING}px`,
114
+ paddingLeft: state.selectProps.isMulti ? 0 : BORDER_PADDING,
115
115
  /* Margin left right of 2px set by default */
116
116
  // margin: `0 ${BORDER_PADDING}px`,
117
117
  margin: 0,
@@ -133,7 +133,7 @@ export const getStyles = memoizeOne((width, isMulti, isCompact, overrideStyles)
133
133
  /* Padding top and bottom of 2 is set by default. */
134
134
  paddingTop: 0,
135
135
  paddingBottom: 0,
136
- paddingLeft: state.selectProps.isMulti ? 0 : `${BORDER_PADDING}px`,
136
+ paddingLeft: state.selectProps.isMulti ? 0 : BORDER_PADDING,
137
137
  '& input::placeholder': {
138
138
  /* Chrome, Firefox, Opera, Safari 10.1+ */
139
139
  color: `var(--ds-text-subtlest, ${N100})`,
@@ -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.17.0";
8
+ var packageVersion = "10.18.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}$/;
@@ -1,12 +1,12 @@
1
1
  /** @jsx jsx */
2
2
  import EmailIcon from '@atlaskit/icon/glyph/email';
3
3
  import { N40, N500 } from '@atlaskit/theme/colors';
4
- import React from 'react';
5
4
  import { css, jsx } from '@emotion/react';
5
+ import React from 'react';
6
6
  var getEmailAvatarWrapperStyle = function getEmailAvatarWrapperStyle(isLozenge) {
7
- var padding = isLozenge ? 0 : 4;
7
+ var padding = isLozenge ? "var(--ds-space-0, 0px)" : "var(--ds-space-050, 4px)";
8
8
  return css({
9
- padding: "".concat(padding, "px"),
9
+ padding: padding,
10
10
  backgroundColor: "var(--ds-background-neutral, ".concat(N40, ")"),
11
11
  borderRadius: '50%',
12
12
  display: 'flex',
@@ -38,7 +38,7 @@ var groupTagContainer = xcss({
38
38
  paddingLeft: 'space.025'
39
39
  });
40
40
  var nameWrapper = css({
41
- paddingLeft: '5px'
41
+ paddingLeft: "var(--ds-space-050, 4px)"
42
42
  });
43
43
  export var MultiValue = /*#__PURE__*/function (_React$Component) {
44
44
  _inherits(MultiValue, _React$Component);
@@ -9,7 +9,7 @@ import { SizeableAvatar } from './SizeableAvatar';
9
9
  import { getAvatarUrl } from './utils';
10
10
  var avatarItemComponent = css({
11
11
  border: 'none !important',
12
- padding: '0 !important',
12
+ padding: "var(--ds-space-0, 0px)".concat(" !important"),
13
13
  width: 'auto',
14
14
  overflow: 'hidden',
15
15
  minWidth: '100px',
@@ -17,7 +17,7 @@ import { SizeableAvatar } from './SizeableAvatar';
17
17
  import { BORDER_PADDING } from './styles';
18
18
  import ValueContainerWrapper from './ValueContainerWrapper';
19
19
  var placeholderIconContainer = css({
20
- paddingLeft: "".concat(BORDER_PADDING, "px"),
20
+ paddingLeft: BORDER_PADDING,
21
21
  lineHeight: 0,
22
22
  gridArea: '1/1/2/2'
23
23
  });
@@ -7,7 +7,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
7
7
  import { B100, N0, N10, N20, N30, N40, N100, R50, R400 } from '@atlaskit/theme/colors';
8
8
  import memoizeOne from 'memoize-one';
9
9
  import { mergeStyles } from '@atlaskit/select';
10
- export var BORDER_PADDING = 6;
10
+ export var BORDER_PADDING = "var(--ds-space-075, 6px)";
11
11
  export var AVATAR_PADDING = 6;
12
12
  export var INDICATOR_WIDTH = 39;
13
13
  export var getStyles = memoizeOne(function (width, isMulti, isCompact, overrideStyles) {
@@ -78,8 +78,8 @@ export var getStyles = memoizeOne(function (width, isMulti, isCompact, overrideS
78
78
  var isMulti = state.selectProps.isMulti;
79
79
  return _objectSpread(_objectSpread({}, css), {}, {
80
80
  gridTemplateColumns: 'auto 1fr',
81
- paddingTop: isCompact ? 0 : "".concat(BORDER_PADDING, "px"),
82
- paddingBottom: isCompact ? 0 : "".concat(BORDER_PADDING, "px"),
81
+ paddingTop: isCompact ? 0 : BORDER_PADDING,
82
+ paddingBottom: isCompact ? 0 : BORDER_PADDING,
83
83
  paddingLeft: isMulti ? BORDER_PADDING : 0,
84
84
  overflowX: 'hidden',
85
85
  overflowY: 'auto',
@@ -118,7 +118,7 @@ export var getStyles = memoizeOne(function (width, isMulti, isCompact, overrideS
118
118
  }
119
119
  return _objectSpread(_objectSpread({}, css), {}, {
120
120
  gridArea: '1/2/2/3',
121
- paddingLeft: state.selectProps.isMulti ? 0 : "".concat(BORDER_PADDING, "px"),
121
+ paddingLeft: state.selectProps.isMulti ? 0 : BORDER_PADDING,
122
122
  /* Margin left right of 2px set by default */
123
123
  // margin: `0 ${BORDER_PADDING}px`,
124
124
  margin: 0,
@@ -141,7 +141,7 @@ export var getStyles = memoizeOne(function (width, isMulti, isCompact, overrideS
141
141
  /* Padding top and bottom of 2 is set by default. */
142
142
  paddingTop: 0,
143
143
  paddingBottom: 0,
144
- paddingLeft: state.selectProps.isMulti ? 0 : "".concat(BORDER_PADDING, "px"),
144
+ paddingLeft: state.selectProps.isMulti ? 0 : BORDER_PADDING,
145
145
  '& input::placeholder': {
146
146
  /* Chrome, Firefox, Opera, Safari 10.1+ */
147
147
  color: "var(--ds-text-subtlest, ".concat(N100, ")"),
@@ -1,5 +1,5 @@
1
1
  import { StylesConfig } from '@atlaskit/select';
2
- export declare const BORDER_PADDING = 6;
2
+ export declare const BORDER_PADDING: "var(--ds-space-075)";
3
3
  export declare const AVATAR_PADDING = 6;
4
4
  export declare const INDICATOR_WIDTH = 39;
5
5
  export declare const getStyles: import("memoize-one").MemoizedFn<(width: string | number, isMulti?: boolean, isCompact?: boolean, overrideStyles?: StylesConfig) => {
@@ -240,6 +240,7 @@ export interface OptionData {
240
240
  name: string;
241
241
  type?: 'user' | 'team' | 'email' | 'group' | 'custom' | 'external_user';
242
242
  tooltip?: string;
243
+ title?: string;
243
244
  }
244
245
  export declare const UserType = "user";
245
246
  export declare const ExternalUserType = "external_user";
@@ -1,5 +1,5 @@
1
1
  import { StylesConfig } from '@atlaskit/select';
2
- export declare const BORDER_PADDING = 6;
2
+ export declare const BORDER_PADDING: "var(--ds-space-075)";
3
3
  export declare const AVATAR_PADDING = 6;
4
4
  export declare const INDICATOR_WIDTH = 39;
5
5
  export declare const getStyles: import("memoize-one").MemoizedFn<(width: string | number, isMulti?: boolean, isCompact?: boolean, overrideStyles?: StylesConfig) => {
@@ -243,6 +243,7 @@ export interface OptionData {
243
243
  name: string;
244
244
  type?: 'user' | 'team' | 'email' | 'group' | 'custom' | 'external_user';
245
245
  tooltip?: string;
246
+ title?: string;
246
247
  }
247
248
  export declare const UserType = "user";
248
249
  export declare const ExternalUserType = "external_user";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/user-picker",
3
- "version": "10.17.0",
3
+ "version": "10.18.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/"