@atlaskit/user-picker 11.0.4 → 11.0.5
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 +9 -0
- package/dist/cjs/analytics.js +1 -1
- package/dist/cjs/components/AvatarItemOption.js +1 -1
- package/dist/cjs/components/ExternalUserOption/ExternalAvatarItemOption.js +1 -1
- package/dist/cjs/components/MultiValue.js +1 -1
- package/dist/cjs/components/PopupControl.js +1 -1
- package/dist/cjs/components/PopupUserPicker.js +4 -1
- package/dist/cjs/components/UserOption.js +4 -1
- package/dist/cjs/components/UserPicker.js +4 -1
- package/dist/cjs/components/styles.js +10 -3
- package/dist/es2019/analytics.js +1 -1
- package/dist/es2019/components/AvatarItemOption.js +1 -1
- package/dist/es2019/components/ExternalUserOption/ExternalAvatarItemOption.js +1 -1
- package/dist/es2019/components/MultiValue.js +1 -1
- package/dist/es2019/components/PopupControl.js +1 -1
- package/dist/es2019/components/PopupUserPicker.js +4 -1
- package/dist/es2019/components/UserOption.js +4 -1
- package/dist/es2019/components/UserPicker.js +4 -1
- package/dist/es2019/components/styles.js +17 -7
- package/dist/esm/analytics.js +1 -1
- package/dist/esm/components/AvatarItemOption.js +1 -1
- package/dist/esm/components/ExternalUserOption/ExternalAvatarItemOption.js +1 -1
- package/dist/esm/components/MultiValue.js +1 -1
- package/dist/esm/components/PopupControl.js +1 -1
- package/dist/esm/components/PopupUserPicker.js +4 -1
- package/dist/esm/components/UserOption.js +4 -1
- package/dist/esm/components/UserPicker.js +4 -1
- package/dist/esm/components/styles.js +10 -3
- package/dist/types/components/styles.d.ts +2 -2
- package/dist/types-ts4.5/components/styles.d.ts +2 -2
- package/package.json +10 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/user-picker
|
|
2
2
|
|
|
3
|
+
## 11.0.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#121751](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/121751)
|
|
8
|
+
[`fa503e3c2f7af`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/fa503e3c2f7af) -
|
|
9
|
+
[ux] Update avatar size on user picker
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
3
12
|
## 11.0.4
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
package/dist/cjs/analytics.js
CHANGED
|
@@ -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 = "11.0.
|
|
15
|
+
var packageVersion = "11.0.5";
|
|
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}$/;
|
|
@@ -53,7 +53,7 @@ var optionWrapper = (0, _react2.css)({
|
|
|
53
53
|
});
|
|
54
54
|
var getTextStyle = function getTextStyle(isSecondary) {
|
|
55
55
|
var secondaryCssArgs = isSecondary ? {
|
|
56
|
-
font: "var(--ds-font-body-small, normal 400 11px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu,
|
|
56
|
+
font: "var(--ds-font-body-small, normal 400 11px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)"
|
|
57
57
|
} : {};
|
|
58
58
|
return (0, _react2.css)(_objectSpread({
|
|
59
59
|
margin: 0,
|
|
@@ -46,7 +46,7 @@ var textSection = (0, _react.css)({
|
|
|
46
46
|
var getTextStyle = function getTextStyle(isSecondary) {
|
|
47
47
|
var secondaryCssArgs = isSecondary ? {
|
|
48
48
|
color: "var(--ds-text-selected, ".concat(_colors.B400, ")"),
|
|
49
|
-
font: "var(--ds-font-body-small, normal 400 11px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu,
|
|
49
|
+
font: "var(--ds-font-body-small, normal 400 11px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)"
|
|
50
50
|
} : {};
|
|
51
51
|
return (0, _react.css)(_objectSpread(_objectSpread({
|
|
52
52
|
display: 'flex',
|
|
@@ -47,7 +47,7 @@ var groupTagContainer = (0, _primitives.xcss)({
|
|
|
47
47
|
marginTop: '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,
|
|
50
|
+
font: "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)",
|
|
51
51
|
paddingLeft: "var(--ds-space-050, 4px)"
|
|
52
52
|
});
|
|
53
53
|
var MultiValue = exports.MultiValue = /*#__PURE__*/function (_React$Component) {
|
|
@@ -26,7 +26,7 @@ var controlWrapper = (0, _react2.css)({
|
|
|
26
26
|
});
|
|
27
27
|
var labelStyle = (0, _react2.css)({
|
|
28
28
|
color: "var(--ds-text-subtlest, ".concat(_colors.N200, ")"),
|
|
29
|
-
font: "var(--ds-font-body-UNSAFE_small, normal 400 12px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu,
|
|
29
|
+
font: "var(--ds-font-body-UNSAFE_small, normal 400 12px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)",
|
|
30
30
|
fontWeight: "var(--ds-font-weight-semibold, 600)",
|
|
31
31
|
paddingBottom: "var(--ds-space-050, 4px)",
|
|
32
32
|
paddingLeft: "var(--ds-space-0, 0px)",
|
|
@@ -19,6 +19,7 @@ var _components = require("./components");
|
|
|
19
19
|
var _styles = require("./styles");
|
|
20
20
|
var _popup = require("./popup");
|
|
21
21
|
var _BaseUserPicker = require("./BaseUserPicker");
|
|
22
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
22
23
|
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
23
24
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
24
25
|
var PopupUserPickerWithoutAnalytics = exports.PopupUserPickerWithoutAnalytics = /*#__PURE__*/function (_React$Component) {
|
|
@@ -62,7 +63,9 @@ var PopupUserPickerWithoutAnalytics = exports.PopupUserPickerWithoutAnalytics =
|
|
|
62
63
|
shouldFlip = _this$props.shouldFlip,
|
|
63
64
|
styles = _this$props.styles;
|
|
64
65
|
var width = this.props.width;
|
|
65
|
-
var selectStyles = (0, _styles.getPopupStyles)(width, isMulti, styles
|
|
66
|
+
var selectStyles = (0, _styles.getPopupStyles)(width, isMulti, styles,
|
|
67
|
+
// eslint-disable-next-line @atlaskit/platform/no-preconditioning, @atlaskit/platform/ensure-feature-flag-prefix
|
|
68
|
+
(0, _platformFeatureFlags.fg)('platform-component-visual-refresh') && (0, _platformFeatureFlags.fg)('visual-refresh-user-picker'));
|
|
66
69
|
return /*#__PURE__*/_react.default.createElement(_BaseUserPicker.BaseUserPickerWithoutAnalytics, (0, _extends2.default)({}, this.props, {
|
|
67
70
|
SelectComponent: _select.PopupSelect,
|
|
68
71
|
width: width,
|
|
@@ -18,6 +18,7 @@ var _AvatarItemOption = require("./AvatarItemOption");
|
|
|
18
18
|
var _HighlightText = require("./HighlightText");
|
|
19
19
|
var _SizeableAvatar = require("./SizeableAvatar");
|
|
20
20
|
var _utils = require("./utils");
|
|
21
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
21
22
|
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
22
23
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /**
|
|
23
24
|
* @jsxRuntime classic
|
|
@@ -67,7 +68,9 @@ var UserOption = exports.UserOption = /*#__PURE__*/function (_React$PureComponen
|
|
|
67
68
|
avatarUrl = _this$props.user.avatarUrl,
|
|
68
69
|
status = _this$props.status;
|
|
69
70
|
return (0, _react.jsx)(_SizeableAvatar.SizeableAvatar, {
|
|
70
|
-
appearance:
|
|
71
|
+
appearance:
|
|
72
|
+
// eslint-disable-next-line @atlaskit/platform/no-preconditioning, @atlaskit/platform/ensure-feature-flag-prefix
|
|
73
|
+
(0, _platformFeatureFlags.fg)('platform-component-visual-refresh') && (0, _platformFeatureFlags.fg)('visual-refresh-user-picker') ? "medium" : "big",
|
|
71
74
|
src: avatarUrl,
|
|
72
75
|
presence: status
|
|
73
76
|
});
|
|
@@ -26,6 +26,7 @@ var _MessagesIntlProvider = _interopRequireDefault(require("./MessagesIntlProvid
|
|
|
26
26
|
var _UserSourceProvider = require("../clients/UserSourceProvider");
|
|
27
27
|
var _ufoExperiences = require("../util/ufoExperiences");
|
|
28
28
|
var _uuid = require("uuid");
|
|
29
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
29
30
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
30
31
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
31
32
|
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; }
|
|
@@ -96,7 +97,9 @@ var UserPickerWithoutAnalytics = exports.UserPickerWithoutAnalytics = /*#__PURE_
|
|
|
96
97
|
SelectComponent: SelectComponent
|
|
97
98
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
98
99
|
,
|
|
99
|
-
styles: (0, _styles.getStyles)(width, isMulti, this.props.appearance === 'compact', this.props.styles, this.props.isInvalid
|
|
100
|
+
styles: (0, _styles.getStyles)(width, isMulti, this.props.appearance === 'compact', this.props.styles, this.props.isInvalid,
|
|
101
|
+
// eslint-disable-next-line @atlaskit/platform/no-preconditioning, @atlaskit/platform/ensure-feature-flag-prefix
|
|
102
|
+
(0, _platformFeatureFlags.fg)('platform-component-visual-refresh') && (0, _platformFeatureFlags.fg)('visual-refresh-user-picker')),
|
|
100
103
|
components: (0, _components.getComponents)(isMulti, anchor),
|
|
101
104
|
pickerProps: pickerProps
|
|
102
105
|
})))));
|
|
@@ -17,7 +17,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
17
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
|
-
var getStyles = exports.getStyles = (0, _memoizeOne.default)(function (width, isMulti, isCompact, overrideStyles, isInvalid) {
|
|
20
|
+
var getStyles = exports.getStyles = (0, _memoizeOne.default)(function (width, isMulti, isCompact, overrideStyles, isInvalid, isVisualRefresh, isPopupStyles) {
|
|
21
21
|
var styles = {
|
|
22
22
|
menu: function menu(css, state) {
|
|
23
23
|
return _objectSpread(_objectSpread({}, css), {}, {
|
|
@@ -134,6 +134,13 @@ var getStyles = exports.getStyles = (0, _memoizeOne.default)(function (width, is
|
|
|
134
134
|
});
|
|
135
135
|
},
|
|
136
136
|
option: function option(css) {
|
|
137
|
+
if (isVisualRefresh) {
|
|
138
|
+
return _objectSpread(_objectSpread({}, css), {}, {
|
|
139
|
+
overflow: 'hidden',
|
|
140
|
+
paddingLeft: isPopupStyles ? "var(--ds-space-200, 16px)" : "var(--ds-space-100, 8px)",
|
|
141
|
+
paddingRight: isPopupStyles ? "var(--ds-space-200, 16px)" : "var(--ds-space-100, 8px)"
|
|
142
|
+
});
|
|
143
|
+
}
|
|
137
144
|
return _objectSpread(_objectSpread({}, css), {}, {
|
|
138
145
|
overflow: 'hidden'
|
|
139
146
|
});
|
|
@@ -168,6 +175,6 @@ var getStyles = exports.getStyles = (0, _memoizeOne.default)(function (width, is
|
|
|
168
175
|
};
|
|
169
176
|
return overrideStyles ? (0, _select.mergeStyles)(styles, overrideStyles) : styles;
|
|
170
177
|
});
|
|
171
|
-
var getPopupStyles = exports.getPopupStyles = (0, _memoizeOne.default)(function (width, isMulti, overrideStyles) {
|
|
172
|
-
return _objectSpread({}, getStyles(width, isMulti, false, overrideStyles));
|
|
178
|
+
var getPopupStyles = exports.getPopupStyles = (0, _memoizeOne.default)(function (width, isMulti, overrideStyles, isVisualRefresh) {
|
|
179
|
+
return _objectSpread({}, getStyles(width, isMulti, false, overrideStyles, false, isVisualRefresh, true));
|
|
173
180
|
});
|
package/dist/es2019/analytics.js
CHANGED
|
@@ -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 = "11.0.
|
|
5
|
+
const packageVersion = "11.0.5";
|
|
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}$/;
|
|
@@ -36,7 +36,7 @@ const optionWrapper = css({
|
|
|
36
36
|
});
|
|
37
37
|
const getTextStyle = isSecondary => {
|
|
38
38
|
const secondaryCssArgs = isSecondary ? {
|
|
39
|
-
font: "var(--ds-font-body-small, normal 400 11px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu,
|
|
39
|
+
font: "var(--ds-font-body-small, normal 400 11px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)"
|
|
40
40
|
} : {};
|
|
41
41
|
return css({
|
|
42
42
|
margin: 0,
|
|
@@ -37,7 +37,7 @@ const textSection = css({
|
|
|
37
37
|
const getTextStyle = isSecondary => {
|
|
38
38
|
const secondaryCssArgs = isSecondary ? {
|
|
39
39
|
color: `var(--ds-text-selected, ${B400})`,
|
|
40
|
-
font: "var(--ds-font-body-small, normal 400 11px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu,
|
|
40
|
+
font: "var(--ds-font-body-small, normal 400 11px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)"
|
|
41
41
|
} : {};
|
|
42
42
|
return css({
|
|
43
43
|
display: 'flex',
|
|
@@ -35,7 +35,7 @@ const groupTagContainer = xcss({
|
|
|
35
35
|
marginTop: 'space.025'
|
|
36
36
|
});
|
|
37
37
|
const nameWrapper = css({
|
|
38
|
-
font: "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu,
|
|
38
|
+
font: "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)",
|
|
39
39
|
paddingLeft: "var(--ds-space-050, 4px)"
|
|
40
40
|
});
|
|
41
41
|
export class MultiValue extends React.Component {
|
|
@@ -14,7 +14,7 @@ const controlWrapper = css({
|
|
|
14
14
|
});
|
|
15
15
|
const labelStyle = css({
|
|
16
16
|
color: `var(--ds-text-subtlest, ${N200})`,
|
|
17
|
-
font: "var(--ds-font-body-UNSAFE_small, normal 400 12px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu,
|
|
17
|
+
font: "var(--ds-font-body-UNSAFE_small, normal 400 12px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)",
|
|
18
18
|
fontWeight: "var(--ds-font-weight-semibold, 600)",
|
|
19
19
|
paddingBottom: "var(--ds-space-050, 4px)",
|
|
20
20
|
paddingLeft: "var(--ds-space-0, 0px)",
|
|
@@ -7,6 +7,7 @@ import { getPopupComponents } from './components';
|
|
|
7
7
|
import { getPopupStyles } from './styles';
|
|
8
8
|
import { getPopupProps } from './popup';
|
|
9
9
|
import { BaseUserPickerWithoutAnalytics } from './BaseUserPicker';
|
|
10
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
11
|
export class PopupUserPickerWithoutAnalytics extends React.Component {
|
|
11
12
|
constructor(...args) {
|
|
12
13
|
super(...args);
|
|
@@ -46,7 +47,9 @@ export class PopupUserPickerWithoutAnalytics extends React.Component {
|
|
|
46
47
|
styles
|
|
47
48
|
} = this.props;
|
|
48
49
|
const width = this.props.width;
|
|
49
|
-
const selectStyles = getPopupStyles(width, isMulti, styles
|
|
50
|
+
const selectStyles = getPopupStyles(width, isMulti, styles,
|
|
51
|
+
// eslint-disable-next-line @atlaskit/platform/no-preconditioning, @atlaskit/platform/ensure-feature-flag-prefix
|
|
52
|
+
fg('platform-component-visual-refresh') && fg('visual-refresh-user-picker'));
|
|
50
53
|
return /*#__PURE__*/React.createElement(BaseUserPickerWithoutAnalytics, _extends({}, this.props, {
|
|
51
54
|
SelectComponent: PopupSelect,
|
|
52
55
|
width: width,
|
|
@@ -11,6 +11,7 @@ import { AvatarItemOption, textWrapper } from './AvatarItemOption';
|
|
|
11
11
|
import { HighlightText } from './HighlightText';
|
|
12
12
|
import { SizeableAvatar } from './SizeableAvatar';
|
|
13
13
|
import { hasValue } from './utils';
|
|
14
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
14
15
|
export class UserOption extends React.PureComponent {
|
|
15
16
|
constructor(...args) {
|
|
16
17
|
super(...args);
|
|
@@ -54,7 +55,9 @@ export class UserOption extends React.PureComponent {
|
|
|
54
55
|
status
|
|
55
56
|
} = this.props;
|
|
56
57
|
return jsx(SizeableAvatar, {
|
|
57
|
-
appearance:
|
|
58
|
+
appearance:
|
|
59
|
+
// eslint-disable-next-line @atlaskit/platform/no-preconditioning, @atlaskit/platform/ensure-feature-flag-prefix
|
|
60
|
+
fg('platform-component-visual-refresh') && fg('visual-refresh-user-picker') ? "medium" : "big",
|
|
58
61
|
src: avatarUrl,
|
|
59
62
|
presence: status
|
|
60
63
|
});
|
|
@@ -13,6 +13,7 @@ import MessagesIntlProvider from './MessagesIntlProvider';
|
|
|
13
13
|
import { ExusUserSourceProvider } from '../clients/UserSourceProvider';
|
|
14
14
|
import { userPickerRenderedUfoExperience as experience, UfoErrorBoundary } from '../util/ufoExperiences';
|
|
15
15
|
import { v4 as uuidv4 } from 'uuid';
|
|
16
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
16
17
|
export class UserPickerWithoutAnalytics extends React.Component {
|
|
17
18
|
constructor(props) {
|
|
18
19
|
super(props);
|
|
@@ -73,7 +74,9 @@ export class UserPickerWithoutAnalytics extends React.Component {
|
|
|
73
74
|
SelectComponent: SelectComponent
|
|
74
75
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
75
76
|
,
|
|
76
|
-
styles: getStyles(width, isMulti, this.props.appearance === 'compact', this.props.styles, this.props.isInvalid
|
|
77
|
+
styles: getStyles(width, isMulti, this.props.appearance === 'compact', this.props.styles, this.props.isInvalid,
|
|
78
|
+
// eslint-disable-next-line @atlaskit/platform/no-preconditioning, @atlaskit/platform/ensure-feature-flag-prefix
|
|
79
|
+
fg('platform-component-visual-refresh') && fg('visual-refresh-user-picker')),
|
|
77
80
|
components: getComponents(isMulti, anchor),
|
|
78
81
|
pickerProps: pickerProps
|
|
79
82
|
})))));
|
|
@@ -4,7 +4,7 @@ import { mergeStyles } from '@atlaskit/select';
|
|
|
4
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
|
-
export const getStyles = memoizeOne((width, isMulti, isCompact, overrideStyles, isInvalid) => {
|
|
7
|
+
export const getStyles = memoizeOne((width, isMulti, isCompact, overrideStyles, isInvalid, isVisualRefresh, isPopupStyles) => {
|
|
8
8
|
let styles = {
|
|
9
9
|
menu: (css, state) => ({
|
|
10
10
|
...css,
|
|
@@ -119,10 +119,20 @@ export const getStyles = memoizeOne((width, isMulti, isCompact, overrideStyles,
|
|
|
119
119
|
textOverflow: 'ellipsis'
|
|
120
120
|
};
|
|
121
121
|
},
|
|
122
|
-
option: css =>
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
122
|
+
option: css => {
|
|
123
|
+
if (isVisualRefresh) {
|
|
124
|
+
return {
|
|
125
|
+
...css,
|
|
126
|
+
overflow: 'hidden',
|
|
127
|
+
paddingLeft: isPopupStyles ? "var(--ds-space-200, 16px)" : "var(--ds-space-100, 8px)",
|
|
128
|
+
paddingRight: isPopupStyles ? "var(--ds-space-200, 16px)" : "var(--ds-space-100, 8px)"
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
return {
|
|
132
|
+
...css,
|
|
133
|
+
overflow: 'hidden'
|
|
134
|
+
};
|
|
135
|
+
},
|
|
126
136
|
input: (css, state) => ({
|
|
127
137
|
...css,
|
|
128
138
|
gridArea: '1/2/2/3',
|
|
@@ -151,6 +161,6 @@ export const getStyles = memoizeOne((width, isMulti, isCompact, overrideStyles,
|
|
|
151
161
|
};
|
|
152
162
|
return overrideStyles ? mergeStyles(styles, overrideStyles) : styles;
|
|
153
163
|
});
|
|
154
|
-
export const getPopupStyles = memoizeOne((width, isMulti, overrideStyles) => ({
|
|
155
|
-
...getStyles(width, isMulti, false, overrideStyles)
|
|
164
|
+
export const getPopupStyles = memoizeOne((width, isMulti, overrideStyles, isVisualRefresh) => ({
|
|
165
|
+
...getStyles(width, isMulti, false, overrideStyles, false, isVisualRefresh, true)
|
|
156
166
|
}));
|
package/dist/esm/analytics.js
CHANGED
|
@@ -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 = "11.0.
|
|
8
|
+
var packageVersion = "11.0.5";
|
|
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}$/;
|
|
@@ -43,7 +43,7 @@ var optionWrapper = css({
|
|
|
43
43
|
});
|
|
44
44
|
var getTextStyle = function getTextStyle(isSecondary) {
|
|
45
45
|
var secondaryCssArgs = isSecondary ? {
|
|
46
|
-
font: "var(--ds-font-body-small, normal 400 11px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu,
|
|
46
|
+
font: "var(--ds-font-body-small, normal 400 11px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)"
|
|
47
47
|
} : {};
|
|
48
48
|
return css(_objectSpread({
|
|
49
49
|
margin: 0,
|
|
@@ -42,7 +42,7 @@ var textSection = css({
|
|
|
42
42
|
var getTextStyle = function getTextStyle(isSecondary) {
|
|
43
43
|
var secondaryCssArgs = isSecondary ? {
|
|
44
44
|
color: "var(--ds-text-selected, ".concat(B400, ")"),
|
|
45
|
-
font: "var(--ds-font-body-small, normal 400 11px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu,
|
|
45
|
+
font: "var(--ds-font-body-small, normal 400 11px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)"
|
|
46
46
|
} : {};
|
|
47
47
|
return css(_objectSpread(_objectSpread({
|
|
48
48
|
display: 'flex',
|
|
@@ -42,7 +42,7 @@ var groupTagContainer = xcss({
|
|
|
42
42
|
marginTop: '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,
|
|
45
|
+
font: "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)",
|
|
46
46
|
paddingLeft: "var(--ds-space-050, 4px)"
|
|
47
47
|
});
|
|
48
48
|
export var MultiValue = /*#__PURE__*/function (_React$Component) {
|
|
@@ -21,7 +21,7 @@ var controlWrapper = css({
|
|
|
21
21
|
});
|
|
22
22
|
var labelStyle = css({
|
|
23
23
|
color: "var(--ds-text-subtlest, ".concat(N200, ")"),
|
|
24
|
-
font: "var(--ds-font-body-UNSAFE_small, normal 400 12px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu,
|
|
24
|
+
font: "var(--ds-font-body-UNSAFE_small, normal 400 12px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)",
|
|
25
25
|
fontWeight: "var(--ds-font-weight-semibold, 600)",
|
|
26
26
|
paddingBottom: "var(--ds-space-050, 4px)",
|
|
27
27
|
paddingLeft: "var(--ds-space-0, 0px)",
|
|
@@ -14,6 +14,7 @@ import { getPopupComponents } from './components';
|
|
|
14
14
|
import { getPopupStyles } from './styles';
|
|
15
15
|
import { getPopupProps } from './popup';
|
|
16
16
|
import { BaseUserPickerWithoutAnalytics } from './BaseUserPicker';
|
|
17
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
17
18
|
export var PopupUserPickerWithoutAnalytics = /*#__PURE__*/function (_React$Component) {
|
|
18
19
|
function PopupUserPickerWithoutAnalytics() {
|
|
19
20
|
var _this;
|
|
@@ -55,7 +56,9 @@ export var PopupUserPickerWithoutAnalytics = /*#__PURE__*/function (_React$Compo
|
|
|
55
56
|
shouldFlip = _this$props.shouldFlip,
|
|
56
57
|
styles = _this$props.styles;
|
|
57
58
|
var width = this.props.width;
|
|
58
|
-
var selectStyles = getPopupStyles(width, isMulti, styles
|
|
59
|
+
var selectStyles = getPopupStyles(width, isMulti, styles,
|
|
60
|
+
// eslint-disable-next-line @atlaskit/platform/no-preconditioning, @atlaskit/platform/ensure-feature-flag-prefix
|
|
61
|
+
fg('platform-component-visual-refresh') && fg('visual-refresh-user-picker'));
|
|
59
62
|
return /*#__PURE__*/React.createElement(BaseUserPickerWithoutAnalytics, _extends({}, this.props, {
|
|
60
63
|
SelectComponent: PopupSelect,
|
|
61
64
|
width: width,
|
|
@@ -18,6 +18,7 @@ import { AvatarItemOption, textWrapper } from './AvatarItemOption';
|
|
|
18
18
|
import { HighlightText } from './HighlightText';
|
|
19
19
|
import { SizeableAvatar } from './SizeableAvatar';
|
|
20
20
|
import { hasValue } from './utils';
|
|
21
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
21
22
|
export var UserOption = /*#__PURE__*/function (_React$PureComponent) {
|
|
22
23
|
function UserOption() {
|
|
23
24
|
var _this;
|
|
@@ -62,7 +63,9 @@ export var UserOption = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
62
63
|
avatarUrl = _this$props.user.avatarUrl,
|
|
63
64
|
status = _this$props.status;
|
|
64
65
|
return jsx(SizeableAvatar, {
|
|
65
|
-
appearance:
|
|
66
|
+
appearance:
|
|
67
|
+
// eslint-disable-next-line @atlaskit/platform/no-preconditioning, @atlaskit/platform/ensure-feature-flag-prefix
|
|
68
|
+
fg('platform-component-visual-refresh') && fg('visual-refresh-user-picker') ? "medium" : "big",
|
|
66
69
|
src: avatarUrl,
|
|
67
70
|
presence: status
|
|
68
71
|
});
|
|
@@ -22,6 +22,7 @@ import MessagesIntlProvider from './MessagesIntlProvider';
|
|
|
22
22
|
import { ExusUserSourceProvider } from '../clients/UserSourceProvider';
|
|
23
23
|
import { userPickerRenderedUfoExperience as experience, UfoErrorBoundary } from '../util/ufoExperiences';
|
|
24
24
|
import { v4 as uuidv4 } from 'uuid';
|
|
25
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
25
26
|
export var UserPickerWithoutAnalytics = /*#__PURE__*/function (_React$Component) {
|
|
26
27
|
function UserPickerWithoutAnalytics(props) {
|
|
27
28
|
var _this;
|
|
@@ -86,7 +87,9 @@ export var UserPickerWithoutAnalytics = /*#__PURE__*/function (_React$Component)
|
|
|
86
87
|
SelectComponent: SelectComponent
|
|
87
88
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
88
89
|
,
|
|
89
|
-
styles: getStyles(width, isMulti, this.props.appearance === 'compact', this.props.styles, this.props.isInvalid
|
|
90
|
+
styles: getStyles(width, isMulti, this.props.appearance === 'compact', this.props.styles, this.props.isInvalid,
|
|
91
|
+
// eslint-disable-next-line @atlaskit/platform/no-preconditioning, @atlaskit/platform/ensure-feature-flag-prefix
|
|
92
|
+
fg('platform-component-visual-refresh') && fg('visual-refresh-user-picker')),
|
|
90
93
|
components: getComponents(isMulti, anchor),
|
|
91
94
|
pickerProps: pickerProps
|
|
92
95
|
})))));
|
|
@@ -10,7 +10,7 @@ import { mergeStyles } from '@atlaskit/select';
|
|
|
10
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
|
-
export var getStyles = memoizeOne(function (width, isMulti, isCompact, overrideStyles, isInvalid) {
|
|
13
|
+
export var getStyles = memoizeOne(function (width, isMulti, isCompact, overrideStyles, isInvalid, isVisualRefresh, isPopupStyles) {
|
|
14
14
|
var styles = {
|
|
15
15
|
menu: function menu(css, state) {
|
|
16
16
|
return _objectSpread(_objectSpread({}, css), {}, {
|
|
@@ -127,6 +127,13 @@ export var getStyles = memoizeOne(function (width, isMulti, isCompact, overrideS
|
|
|
127
127
|
});
|
|
128
128
|
},
|
|
129
129
|
option: function option(css) {
|
|
130
|
+
if (isVisualRefresh) {
|
|
131
|
+
return _objectSpread(_objectSpread({}, css), {}, {
|
|
132
|
+
overflow: 'hidden',
|
|
133
|
+
paddingLeft: isPopupStyles ? "var(--ds-space-200, 16px)" : "var(--ds-space-100, 8px)",
|
|
134
|
+
paddingRight: isPopupStyles ? "var(--ds-space-200, 16px)" : "var(--ds-space-100, 8px)"
|
|
135
|
+
});
|
|
136
|
+
}
|
|
130
137
|
return _objectSpread(_objectSpread({}, css), {}, {
|
|
131
138
|
overflow: 'hidden'
|
|
132
139
|
});
|
|
@@ -161,6 +168,6 @@ export var getStyles = memoizeOne(function (width, isMulti, isCompact, overrideS
|
|
|
161
168
|
};
|
|
162
169
|
return overrideStyles ? mergeStyles(styles, overrideStyles) : styles;
|
|
163
170
|
});
|
|
164
|
-
export var getPopupStyles = memoizeOne(function (width, isMulti, overrideStyles) {
|
|
165
|
-
return _objectSpread({}, getStyles(width, isMulti, false, overrideStyles));
|
|
171
|
+
export var getPopupStyles = memoizeOne(function (width, isMulti, overrideStyles, isVisualRefresh) {
|
|
172
|
+
return _objectSpread({}, getStyles(width, isMulti, false, overrideStyles, false, isVisualRefresh, true));
|
|
166
173
|
});
|
|
@@ -2,5 +2,5 @@ import { type StylesConfig } from '@atlaskit/select';
|
|
|
2
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
|
-
export declare const getStyles: import("memoize-one").MemoizedFn<(width: string | number, isMulti?: boolean, isCompact?: boolean, overrideStyles?: StylesConfig, isInvalid?: boolean) => StylesConfig>;
|
|
6
|
-
export declare const getPopupStyles: import("memoize-one").MemoizedFn<(width: string | number, isMulti?: boolean, overrideStyles?: StylesConfig) => StylesConfig>;
|
|
5
|
+
export declare const getStyles: import("memoize-one").MemoizedFn<(width: string | number, isMulti?: boolean, isCompact?: boolean, overrideStyles?: StylesConfig, isInvalid?: boolean, isVisualRefresh?: boolean, isPopupStyles?: boolean) => StylesConfig>;
|
|
6
|
+
export declare const getPopupStyles: import("memoize-one").MemoizedFn<(width: string | number, isMulti?: boolean, overrideStyles?: StylesConfig, isVisualRefresh?: boolean) => StylesConfig>;
|
|
@@ -2,5 +2,5 @@ import { type StylesConfig } from '@atlaskit/select';
|
|
|
2
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
|
-
export declare const getStyles: import("memoize-one").MemoizedFn<(width: string | number, isMulti?: boolean, isCompact?: boolean, overrideStyles?: StylesConfig, isInvalid?: boolean) => StylesConfig>;
|
|
6
|
-
export declare const getPopupStyles: import("memoize-one").MemoizedFn<(width: string | number, isMulti?: boolean, overrideStyles?: StylesConfig) => StylesConfig>;
|
|
5
|
+
export declare const getStyles: import("memoize-one").MemoizedFn<(width: string | number, isMulti?: boolean, isCompact?: boolean, overrideStyles?: StylesConfig, isInvalid?: boolean, isVisualRefresh?: boolean, isPopupStyles?: boolean) => StylesConfig>;
|
|
6
|
+
export declare const getPopupStyles: import("memoize-one").MemoizedFn<(width: string | number, isMulti?: boolean, overrideStyles?: StylesConfig, isVisualRefresh?: boolean) => StylesConfig>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/user-picker",
|
|
3
|
-
"version": "11.0.
|
|
3
|
+
"version": "11.0.5",
|
|
4
4
|
"description": "Fabric component for display a dropdown to select a user from",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"@atlaskit/avatar": "^24.0.0",
|
|
54
54
|
"@atlaskit/icon": "^24.1.0",
|
|
55
55
|
"@atlaskit/logo": "^16.0.0",
|
|
56
|
-
"@atlaskit/lozenge": "^12.
|
|
56
|
+
"@atlaskit/lozenge": "^12.2.0",
|
|
57
57
|
"@atlaskit/people-teams-ui-public": "^3.0.0",
|
|
58
58
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
59
59
|
"@atlaskit/popper": "^7.0.0",
|
|
@@ -61,8 +61,8 @@
|
|
|
61
61
|
"@atlaskit/select": "^20.0.0",
|
|
62
62
|
"@atlaskit/spinner": "^18.0.0",
|
|
63
63
|
"@atlaskit/teams-avatar": "^2.1.0",
|
|
64
|
-
"@atlaskit/theme": "^
|
|
65
|
-
"@atlaskit/tokens": "^4.
|
|
64
|
+
"@atlaskit/theme": "^18.0.0",
|
|
65
|
+
"@atlaskit/tokens": "^4.3.0",
|
|
66
66
|
"@atlaskit/tooltip": "^20.0.0",
|
|
67
67
|
"@atlaskit/ufo": "^0.4.0",
|
|
68
68
|
"@babel/runtime": "^7.0.0",
|
|
@@ -114,6 +114,12 @@
|
|
|
114
114
|
},
|
|
115
115
|
"pass-aria-describedby-to-baseuserpicker": {
|
|
116
116
|
"type": "boolean"
|
|
117
|
+
},
|
|
118
|
+
"platform-component-visual-refresh": {
|
|
119
|
+
"type": "boolean"
|
|
120
|
+
},
|
|
121
|
+
"visual-refresh-user-picker": {
|
|
122
|
+
"type": "boolean"
|
|
117
123
|
}
|
|
118
124
|
}
|
|
119
125
|
}
|