@atlaskit/user-picker 11.1.2 → 11.2.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 +12 -0
- package/dist/cjs/analytics.js +1 -1
- package/dist/cjs/components/BaseUserPicker.js +11 -0
- package/dist/cjs/components/ClearIndicator.compiled.css +1 -1
- package/dist/cjs/components/ClearIndicator.js +1 -1
- package/dist/cjs/components/Control.compiled.css +2 -1
- package/dist/cjs/components/Control.js +1 -1
- package/dist/cjs/components/UserPicker.js +1 -0
- package/dist/cjs/components/utils.js +1 -1
- package/dist/es2019/analytics.js +1 -1
- package/dist/es2019/components/BaseUserPicker.js +11 -0
- package/dist/es2019/components/ClearIndicator.compiled.css +1 -1
- package/dist/es2019/components/ClearIndicator.js +1 -1
- package/dist/es2019/components/Control.compiled.css +2 -1
- package/dist/es2019/components/Control.js +1 -1
- package/dist/es2019/components/UserPicker.js +1 -0
- package/dist/es2019/components/utils.js +1 -1
- package/dist/esm/analytics.js +1 -1
- package/dist/esm/components/BaseUserPicker.js +11 -0
- package/dist/esm/components/ClearIndicator.compiled.css +1 -1
- package/dist/esm/components/ClearIndicator.js +1 -1
- package/dist/esm/components/Control.compiled.css +2 -1
- package/dist/esm/components/Control.js +1 -1
- package/dist/esm/components/UserPicker.js +1 -0
- package/dist/esm/components/utils.js +1 -1
- package/dist/types/components/BaseUserPicker.d.ts +2 -1
- package/dist/types/components/PopupUserPicker.d.ts +2 -0
- package/dist/types/components/UserPicker.d.ts +2 -1
- package/dist/types/types.d.ts +6 -0
- package/dist/types-ts4.5/components/BaseUserPicker.d.ts +2 -1
- package/dist/types-ts4.5/components/PopupUserPicker.d.ts +2 -0
- package/dist/types-ts4.5/components/UserPicker.d.ts +2 -1
- package/dist/types-ts4.5/types.d.ts +6 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/user-picker
|
|
2
2
|
|
|
3
|
+
## 11.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#157545](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/157545)
|
|
8
|
+
[`77c40a08f071f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/77c40a08f071f) -
|
|
9
|
+
[ux] give keyboard focus to invalid selects in the invite people form
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
3
15
|
## 11.1.2
|
|
4
16
|
|
|
5
17
|
### 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.
|
|
15
|
+
var packageVersion = "11.2.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}$/;
|
|
@@ -390,6 +390,17 @@ var BaseUserPickerWithoutAnalytics = exports.BaseUserPickerWithoutAnalytics = /*
|
|
|
390
390
|
initialFocusHandled: false
|
|
391
391
|
};
|
|
392
392
|
_this.optionsShownUfoExperienceInstance = _ufoExperiences.userPickerOptionsShownUfoExperience.getInstance((0, _uuid.v4)());
|
|
393
|
+
if (_this.props.forwardedRef) {
|
|
394
|
+
var refValue = {
|
|
395
|
+
focus: _this.focus,
|
|
396
|
+
blur: _this.blur
|
|
397
|
+
};
|
|
398
|
+
if (typeof _this.props.forwardedRef === 'function') {
|
|
399
|
+
_this.props.forwardedRef(refValue);
|
|
400
|
+
} else {
|
|
401
|
+
_this.props.forwardedRef.current = refValue;
|
|
402
|
+
}
|
|
403
|
+
}
|
|
393
404
|
return _this;
|
|
394
405
|
}
|
|
395
406
|
(0, _inherits2.default)(BaseUserPickerWithoutAnalytics, _React$Component);
|
|
@@ -34,7 +34,7 @@ var AsyncTooltip = /*#__PURE__*/_react.default.lazy(function () {
|
|
|
34
34
|
});
|
|
35
35
|
});
|
|
36
36
|
var clearIndicatorStyles = {
|
|
37
|
-
root: "_v5641ppt _tzy4kb7n _ca0qze3t _u5f3ze3t _n3tdze3t _19bvze3t _30l3s4qr
|
|
37
|
+
root: "_v5641ppt _tzy4kb7n _ca0qze3t _u5f3ze3t _n3tdze3t _19bvze3t _30l3s4qr _1mhjidpf"
|
|
38
38
|
};
|
|
39
39
|
var ClearIndicator = exports.ClearIndicator = /*#__PURE__*/function (_React$PureComponent) {
|
|
40
40
|
function ClearIndicator() {
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
._1h6d1elr{border-color:var(--ds-border-input,#8590a2)}
|
|
4
4
|
._1h6d1j28{border-color:transparent}
|
|
5
5
|
._1h6d1p6i{border-color:var(--ds-border-focused,#388bff)}._19bvidpf{padding-left:0}
|
|
6
|
-
.
|
|
6
|
+
._1a98kb7n:hover .fabric-user-picker__clear-indicator{opacity:1}
|
|
7
|
+
._1fkdidpf .-IndicatorsContainer{opacity:0}
|
|
7
8
|
._bfhk1j28{background-color:transparent}
|
|
8
9
|
._bfhk1j9a{background-color:var(--ds-background-input,#fff)}
|
|
9
10
|
._ca0qidpf{padding-top:0}
|
|
@@ -20,7 +20,7 @@ var controlStyles = {
|
|
|
20
20
|
focused: "_1h6d1p6i _bfhk1j9a _4cvx1p6i _irr31j9a",
|
|
21
21
|
disabled: "_irr3syzs",
|
|
22
22
|
subtle: "_1h6d1j28 _bfhk1j28 _4cvx1j28 _irr31gly",
|
|
23
|
-
root: "_ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf _1h6d1elr _bfhk1j9a _p12f1osq _4cvx1elr _irr31d5g
|
|
23
|
+
root: "_ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf _1h6d1elr _bfhk1j9a _p12f1osq _1fkdidpf _4cvx1elr _irr31d5g _1a98kb7n"
|
|
24
24
|
};
|
|
25
25
|
var Control = function Control(props) {
|
|
26
26
|
return /*#__PURE__*/React.createElement(_select.components.Control, (0, _extends2.default)({}, props, {
|
|
@@ -98,6 +98,7 @@ var UserPickerWithoutAnalytics = exports.UserPickerWithoutAnalytics = /*#__PURE_
|
|
|
98
98
|
}, /*#__PURE__*/_react.default.createElement(_MessagesIntlProvider.default, null, /*#__PURE__*/_react.default.createElement(_UserSourceProvider.ExusUserSourceProvider, {
|
|
99
99
|
fetchUserSource: loadUserSource
|
|
100
100
|
}, /*#__PURE__*/_react.default.createElement(_BaseUserPicker.BaseUserPickerWithoutAnalytics, (0, _extends2.default)({}, this.props, {
|
|
101
|
+
forwardedRef: this.props.forwardedRef,
|
|
101
102
|
width: width,
|
|
102
103
|
SelectComponent: SelectComponent
|
|
103
104
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
@@ -68,7 +68,7 @@ var extractOptionValue = exports.extractOptionValue = function extractOptionValu
|
|
|
68
68
|
return value.data;
|
|
69
69
|
};
|
|
70
70
|
var isIterable = exports.isIterable = function isIterable(a) {
|
|
71
|
-
return typeof a[Symbol.iterator] === 'function';
|
|
71
|
+
return typeof (a === null || a === void 0 ? void 0 : a[Symbol.iterator]) === 'function';
|
|
72
72
|
};
|
|
73
73
|
var getOptions = exports.getOptions = (0, _memoizeOne.default)(function (options) {
|
|
74
74
|
return options.map(optionToSelectableOption);
|
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.
|
|
5
|
+
const packageVersion = "11.2.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}$/;
|
|
@@ -376,6 +376,17 @@ export class BaseUserPickerWithoutAnalytics extends React.Component {
|
|
|
376
376
|
initialFocusHandled: false
|
|
377
377
|
};
|
|
378
378
|
this.optionsShownUfoExperienceInstance = userPickerOptionsShownUfoExperience.getInstance(uuidv4());
|
|
379
|
+
if (this.props.forwardedRef) {
|
|
380
|
+
const refValue = {
|
|
381
|
+
focus: this.focus,
|
|
382
|
+
blur: this.blur
|
|
383
|
+
};
|
|
384
|
+
if (typeof this.props.forwardedRef === 'function') {
|
|
385
|
+
this.props.forwardedRef(refValue);
|
|
386
|
+
} else {
|
|
387
|
+
this.props.forwardedRef.current = refValue;
|
|
388
|
+
}
|
|
389
|
+
}
|
|
379
390
|
}
|
|
380
391
|
get isMenuOpenOnClickForSingleSelect() {
|
|
381
392
|
return this.props.openMenuOnClick && !this.props.isMulti;
|
|
@@ -11,7 +11,7 @@ const AsyncTooltip = /*#__PURE__*/React.lazy(() => import( /* webpackChunkName:
|
|
|
11
11
|
};
|
|
12
12
|
}));
|
|
13
13
|
const clearIndicatorStyles = {
|
|
14
|
-
root: "_v5641ppt _tzy4kb7n _ca0qze3t _u5f3ze3t _n3tdze3t _19bvze3t _30l3s4qr
|
|
14
|
+
root: "_v5641ppt _tzy4kb7n _ca0qze3t _u5f3ze3t _n3tdze3t _19bvze3t _30l3s4qr _1mhjidpf"
|
|
15
15
|
};
|
|
16
16
|
export class ClearIndicator extends React.PureComponent {
|
|
17
17
|
constructor(...args) {
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
._1h6d1elr{border-color:var(--ds-border-input,#8590a2)}
|
|
4
4
|
._1h6d1j28{border-color:transparent}
|
|
5
5
|
._1h6d1p6i{border-color:var(--ds-border-focused,#388bff)}._19bvidpf{padding-left:0}
|
|
6
|
-
.
|
|
6
|
+
._1a98kb7n:hover .fabric-user-picker__clear-indicator{opacity:1}
|
|
7
|
+
._1fkdidpf .-IndicatorsContainer{opacity:0}
|
|
7
8
|
._bfhk1j28{background-color:transparent}
|
|
8
9
|
._bfhk1j9a{background-color:var(--ds-background-input,#fff)}
|
|
9
10
|
._ca0qidpf{padding-top:0}
|
|
@@ -10,7 +10,7 @@ const controlStyles = {
|
|
|
10
10
|
focused: "_1h6d1p6i _bfhk1j9a _4cvx1p6i _irr31j9a",
|
|
11
11
|
disabled: "_irr3syzs",
|
|
12
12
|
subtle: "_1h6d1j28 _bfhk1j28 _4cvx1j28 _irr31gly",
|
|
13
|
-
root: "_ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf _1h6d1elr _bfhk1j9a _p12f1osq _4cvx1elr _irr31d5g
|
|
13
|
+
root: "_ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf _1h6d1elr _bfhk1j9a _p12f1osq _1fkdidpf _4cvx1elr _irr31d5g _1a98kb7n"
|
|
14
14
|
};
|
|
15
15
|
const Control = props => {
|
|
16
16
|
return /*#__PURE__*/React.createElement(components.Control, _extends({}, props, {
|
|
@@ -74,6 +74,7 @@ export class UserPickerWithoutAnalytics extends React.Component {
|
|
|
74
74
|
}, /*#__PURE__*/React.createElement(MessagesIntlProvider, null, /*#__PURE__*/React.createElement(ExusUserSourceProvider, {
|
|
75
75
|
fetchUserSource: loadUserSource
|
|
76
76
|
}, /*#__PURE__*/React.createElement(BaseUserPickerWithoutAnalytics, _extends({}, this.props, {
|
|
77
|
+
forwardedRef: this.props.forwardedRef,
|
|
77
78
|
width: width,
|
|
78
79
|
SelectComponent: SelectComponent
|
|
79
80
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
@@ -40,7 +40,7 @@ export const extractOptionValue = value => {
|
|
|
40
40
|
}
|
|
41
41
|
return value.data;
|
|
42
42
|
};
|
|
43
|
-
export const isIterable = a => typeof a[Symbol.iterator] === 'function';
|
|
43
|
+
export const isIterable = a => typeof (a === null || a === void 0 ? void 0 : a[Symbol.iterator]) === 'function';
|
|
44
44
|
export const getOptions = memoizeOne(options => options.map(optionToSelectableOption));
|
|
45
45
|
export const optionToSelectableOptions = memoizeOne(defaultValue => {
|
|
46
46
|
if (!defaultValue) {
|
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.
|
|
8
|
+
var packageVersion = "11.2.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}$/;
|
|
@@ -383,6 +383,17 @@ export var BaseUserPickerWithoutAnalytics = /*#__PURE__*/function (_React$Compon
|
|
|
383
383
|
initialFocusHandled: false
|
|
384
384
|
};
|
|
385
385
|
_this.optionsShownUfoExperienceInstance = userPickerOptionsShownUfoExperience.getInstance(uuidv4());
|
|
386
|
+
if (_this.props.forwardedRef) {
|
|
387
|
+
var refValue = {
|
|
388
|
+
focus: _this.focus,
|
|
389
|
+
blur: _this.blur
|
|
390
|
+
};
|
|
391
|
+
if (typeof _this.props.forwardedRef === 'function') {
|
|
392
|
+
_this.props.forwardedRef(refValue);
|
|
393
|
+
} else {
|
|
394
|
+
_this.props.forwardedRef.current = refValue;
|
|
395
|
+
}
|
|
396
|
+
}
|
|
386
397
|
return _this;
|
|
387
398
|
}
|
|
388
399
|
_inherits(BaseUserPickerWithoutAnalytics, _React$Component);
|
|
@@ -22,7 +22,7 @@ var AsyncTooltip = /*#__PURE__*/React.lazy(function () {
|
|
|
22
22
|
});
|
|
23
23
|
});
|
|
24
24
|
var clearIndicatorStyles = {
|
|
25
|
-
root: "_v5641ppt _tzy4kb7n _ca0qze3t _u5f3ze3t _n3tdze3t _19bvze3t _30l3s4qr
|
|
25
|
+
root: "_v5641ppt _tzy4kb7n _ca0qze3t _u5f3ze3t _n3tdze3t _19bvze3t _30l3s4qr _1mhjidpf"
|
|
26
26
|
};
|
|
27
27
|
export var ClearIndicator = /*#__PURE__*/function (_React$PureComponent) {
|
|
28
28
|
function ClearIndicator() {
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
._1h6d1elr{border-color:var(--ds-border-input,#8590a2)}
|
|
4
4
|
._1h6d1j28{border-color:transparent}
|
|
5
5
|
._1h6d1p6i{border-color:var(--ds-border-focused,#388bff)}._19bvidpf{padding-left:0}
|
|
6
|
-
.
|
|
6
|
+
._1a98kb7n:hover .fabric-user-picker__clear-indicator{opacity:1}
|
|
7
|
+
._1fkdidpf .-IndicatorsContainer{opacity:0}
|
|
7
8
|
._bfhk1j28{background-color:transparent}
|
|
8
9
|
._bfhk1j9a{background-color:var(--ds-background-input,#fff)}
|
|
9
10
|
._ca0qidpf{padding-top:0}
|
|
@@ -10,7 +10,7 @@ var controlStyles = {
|
|
|
10
10
|
focused: "_1h6d1p6i _bfhk1j9a _4cvx1p6i _irr31j9a",
|
|
11
11
|
disabled: "_irr3syzs",
|
|
12
12
|
subtle: "_1h6d1j28 _bfhk1j28 _4cvx1j28 _irr31gly",
|
|
13
|
-
root: "_ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf _1h6d1elr _bfhk1j9a _p12f1osq _4cvx1elr _irr31d5g
|
|
13
|
+
root: "_ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf _1h6d1elr _bfhk1j9a _p12f1osq _1fkdidpf _4cvx1elr _irr31d5g _1a98kb7n"
|
|
14
14
|
};
|
|
15
15
|
var Control = function Control(props) {
|
|
16
16
|
return /*#__PURE__*/React.createElement(components.Control, _extends({}, props, {
|
|
@@ -88,6 +88,7 @@ export var UserPickerWithoutAnalytics = /*#__PURE__*/function (_React$Component)
|
|
|
88
88
|
}, /*#__PURE__*/React.createElement(MessagesIntlProvider, null, /*#__PURE__*/React.createElement(ExusUserSourceProvider, {
|
|
89
89
|
fetchUserSource: loadUserSource
|
|
90
90
|
}, /*#__PURE__*/React.createElement(BaseUserPickerWithoutAnalytics, _extends({}, this.props, {
|
|
91
|
+
forwardedRef: this.props.forwardedRef,
|
|
91
92
|
width: width,
|
|
92
93
|
SelectComponent: SelectComponent
|
|
93
94
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
@@ -61,7 +61,7 @@ export var extractOptionValue = function extractOptionValue(value) {
|
|
|
61
61
|
return value.data;
|
|
62
62
|
};
|
|
63
63
|
export var isIterable = function isIterable(a) {
|
|
64
|
-
return typeof a[Symbol.iterator] === 'function';
|
|
64
|
+
return typeof (a === null || a === void 0 ? void 0 : a[Symbol.iterator]) === 'function';
|
|
65
65
|
};
|
|
66
66
|
export var getOptions = memoizeOne(function (options) {
|
|
67
67
|
return options.map(optionToSelectableOption);
|
|
@@ -132,6 +132,7 @@ export declare const BaseUserPicker: React.ForwardRefExoticComponent<Pick<Omit<{
|
|
|
132
132
|
openMenuOnClick?: boolean | undefined;
|
|
133
133
|
strategy?: "absolute" | "fixed" | undefined;
|
|
134
134
|
showClearIndicator?: boolean | undefined;
|
|
135
|
+
forwardedRef?: React.ForwardedRef<import("../types").UserPickerRef> | undefined;
|
|
135
136
|
} & {
|
|
136
137
|
SelectComponent: React.ComponentType<any>;
|
|
137
138
|
pickerProps?: any;
|
|
@@ -145,7 +146,7 @@ export declare const BaseUserPicker: React.ForwardRefExoticComponent<Pick<Omit<{
|
|
|
145
146
|
* It may be removed in a future minor or patch when a longer-term workaround is found.
|
|
146
147
|
*/
|
|
147
148
|
UNSAFE_hasDraggableParentComponent?: boolean | undefined;
|
|
148
|
-
}, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "options" | "search" | "placeholder" | "isDisabled" | "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "components" | "inputId" | "isInvalid" | "isLoading" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "name" | "noOptionsMessage" | "onBlur" | "onChange" | "onFocus" | "onInputChange" | "onKeyDown" | "styles" | "value" | "required" | "appearance" | "footer" | "defaultValue" | "fieldId" | "width" | "menuMinWidth" | "maxPickerHeight" | "loadOptions" | "loadUserSource" | "anchor" | "open" | "onSelection" | "onClear" | "onOpen" | "onClose" | "placeholderAvatar" | "addMoreMessage" | "clearValueLabel" | "allowEmail" | "suggestEmailsForDomain" | "emailLabel" | "disableInput" | "isValidEmail" | "maxOptions" | "ariaLabel" | "ariaLabelledBy" | "ariaDescribedBy" | "ariaLive" | "header" | "UNSAFE_hasDraggableParentComponent" | "strategy" | "showClearIndicator" | "SelectComponent" | "pickerProps"> & {
|
|
149
|
+
}, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "options" | "search" | "placeholder" | "isDisabled" | "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "components" | "inputId" | "isInvalid" | "isLoading" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "name" | "noOptionsMessage" | "onBlur" | "onChange" | "onFocus" | "onInputChange" | "onKeyDown" | "styles" | "value" | "required" | "appearance" | "footer" | "defaultValue" | "fieldId" | "width" | "menuMinWidth" | "maxPickerHeight" | "loadOptions" | "loadUserSource" | "anchor" | "open" | "onSelection" | "onClear" | "onOpen" | "onClose" | "placeholderAvatar" | "addMoreMessage" | "clearValueLabel" | "allowEmail" | "suggestEmailsForDomain" | "emailLabel" | "disableInput" | "isValidEmail" | "maxOptions" | "ariaLabel" | "ariaLabelledBy" | "ariaDescribedBy" | "ariaLive" | "header" | "UNSAFE_hasDraggableParentComponent" | "strategy" | "showClearIndicator" | "forwardedRef" | "SelectComponent" | "pickerProps"> & {
|
|
149
150
|
isClearable?: boolean | undefined;
|
|
150
151
|
isMulti?: boolean | undefined;
|
|
151
152
|
openMenuOnClick?: boolean | undefined;
|
|
@@ -87,6 +87,7 @@ export declare const PopupUserPicker: React.ForwardRefExoticComponent<Omit<Pick<
|
|
|
87
87
|
openMenuOnClick?: boolean | undefined;
|
|
88
88
|
strategy?: "absolute" | "fixed" | undefined;
|
|
89
89
|
showClearIndicator?: boolean | undefined;
|
|
90
|
+
forwardedRef?: React.ForwardedRef<import("../types").UserPickerRef> | undefined;
|
|
90
91
|
} & {
|
|
91
92
|
target: import("../types").Target;
|
|
92
93
|
popupTitle?: string | undefined;
|
|
@@ -165,6 +166,7 @@ export declare const PopupUserPicker: React.ForwardRefExoticComponent<Omit<Pick<
|
|
|
165
166
|
UNSAFE_hasDraggableParentComponent?: boolean | undefined;
|
|
166
167
|
strategy?: "absolute" | "fixed" | undefined;
|
|
167
168
|
showClearIndicator?: boolean | undefined;
|
|
169
|
+
forwardedRef?: React.ForwardedRef<import("../types").UserPickerRef> | undefined;
|
|
168
170
|
popupTitle?: string | undefined;
|
|
169
171
|
placement?: import("@popperjs/core").Placement | undefined;
|
|
170
172
|
rootBoundary?: import("../types").RootBoundary | undefined;
|
|
@@ -78,7 +78,8 @@ export declare const UserPicker: React.ForwardRefExoticComponent<Pick<Omit<{
|
|
|
78
78
|
openMenuOnClick?: boolean | undefined;
|
|
79
79
|
strategy?: "absolute" | "fixed" | undefined;
|
|
80
80
|
showClearIndicator?: boolean | undefined;
|
|
81
|
-
|
|
81
|
+
forwardedRef?: React.ForwardedRef<import("../types").UserPickerRef> | undefined;
|
|
82
|
+
}, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "options" | "search" | "placeholder" | "isDisabled" | "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "components" | "inputId" | "isClearable" | "isInvalid" | "isLoading" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "name" | "noOptionsMessage" | "onBlur" | "onChange" | "onFocus" | "onInputChange" | "onKeyDown" | "openMenuOnClick" | "styles" | "value" | "required" | "appearance" | "footer" | "defaultValue" | "fieldId" | "menuMinWidth" | "maxPickerHeight" | "textFieldBackgroundColor" | "loadOptions" | "loadOptionsErrorMessage" | "loadUserSource" | "anchor" | "open" | "onSelection" | "onClear" | "onOpen" | "onClose" | "subtle" | "noBorder" | "placeholderAvatar" | "addMoreMessage" | "clearValueLabel" | "allowEmail" | "suggestEmailsForDomain" | "emailLabel" | "disableInput" | "isValidEmail" | "maxOptions" | "ariaLabel" | "ariaLabelledBy" | "ariaDescribedBy" | "ariaLive" | "header" | "UNSAFE_hasDraggableParentComponent" | "strategy" | "showClearIndicator" | "forwardedRef"> & {
|
|
82
83
|
isMulti?: boolean | undefined;
|
|
83
84
|
width?: string | number | undefined;
|
|
84
85
|
} & {} & React.RefAttributes<any>>;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -180,6 +180,12 @@ export type UserPickerProps = WithAnalyticsEventsProps & {
|
|
|
180
180
|
strategy?: 'fixed' | 'absolute';
|
|
181
181
|
/** Override default behavior and show the clear indicator. */
|
|
182
182
|
showClearIndicator?: boolean;
|
|
183
|
+
/** Ref to the underlying select */
|
|
184
|
+
forwardedRef?: React.ForwardedRef<UserPickerRef>;
|
|
185
|
+
};
|
|
186
|
+
export type UserPickerRef = {
|
|
187
|
+
focus: () => void;
|
|
188
|
+
blur: () => void;
|
|
183
189
|
};
|
|
184
190
|
export type PopupUserPickerProps = UserPickerProps & {
|
|
185
191
|
/** Whether to use the popup version of the single picker */
|
|
@@ -132,6 +132,7 @@ export declare const BaseUserPicker: React.ForwardRefExoticComponent<Pick<Omit<{
|
|
|
132
132
|
openMenuOnClick?: boolean | undefined;
|
|
133
133
|
strategy?: "absolute" | "fixed" | undefined;
|
|
134
134
|
showClearIndicator?: boolean | undefined;
|
|
135
|
+
forwardedRef?: React.ForwardedRef<import("../types").UserPickerRef> | undefined;
|
|
135
136
|
} & {
|
|
136
137
|
SelectComponent: React.ComponentType<any>;
|
|
137
138
|
pickerProps?: any;
|
|
@@ -145,7 +146,7 @@ export declare const BaseUserPicker: React.ForwardRefExoticComponent<Pick<Omit<{
|
|
|
145
146
|
* It may be removed in a future minor or patch when a longer-term workaround is found.
|
|
146
147
|
*/
|
|
147
148
|
UNSAFE_hasDraggableParentComponent?: boolean | undefined;
|
|
148
|
-
}, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "options" | "search" | "placeholder" | "isDisabled" | "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "components" | "inputId" | "isInvalid" | "isLoading" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "name" | "noOptionsMessage" | "onBlur" | "onChange" | "onFocus" | "onInputChange" | "onKeyDown" | "styles" | "value" | "required" | "appearance" | "footer" | "defaultValue" | "fieldId" | "width" | "menuMinWidth" | "maxPickerHeight" | "loadOptions" | "loadUserSource" | "anchor" | "open" | "onSelection" | "onClear" | "onOpen" | "onClose" | "placeholderAvatar" | "addMoreMessage" | "clearValueLabel" | "allowEmail" | "suggestEmailsForDomain" | "emailLabel" | "disableInput" | "isValidEmail" | "maxOptions" | "ariaLabel" | "ariaLabelledBy" | "ariaDescribedBy" | "ariaLive" | "header" | "UNSAFE_hasDraggableParentComponent" | "strategy" | "showClearIndicator" | "SelectComponent" | "pickerProps"> & {
|
|
149
|
+
}, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "options" | "search" | "placeholder" | "isDisabled" | "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "components" | "inputId" | "isInvalid" | "isLoading" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "name" | "noOptionsMessage" | "onBlur" | "onChange" | "onFocus" | "onInputChange" | "onKeyDown" | "styles" | "value" | "required" | "appearance" | "footer" | "defaultValue" | "fieldId" | "width" | "menuMinWidth" | "maxPickerHeight" | "loadOptions" | "loadUserSource" | "anchor" | "open" | "onSelection" | "onClear" | "onOpen" | "onClose" | "placeholderAvatar" | "addMoreMessage" | "clearValueLabel" | "allowEmail" | "suggestEmailsForDomain" | "emailLabel" | "disableInput" | "isValidEmail" | "maxOptions" | "ariaLabel" | "ariaLabelledBy" | "ariaDescribedBy" | "ariaLive" | "header" | "UNSAFE_hasDraggableParentComponent" | "strategy" | "showClearIndicator" | "forwardedRef" | "SelectComponent" | "pickerProps"> & {
|
|
149
150
|
isClearable?: boolean | undefined;
|
|
150
151
|
isMulti?: boolean | undefined;
|
|
151
152
|
openMenuOnClick?: boolean | undefined;
|
|
@@ -87,6 +87,7 @@ export declare const PopupUserPicker: React.ForwardRefExoticComponent<Omit<Pick<
|
|
|
87
87
|
openMenuOnClick?: boolean | undefined;
|
|
88
88
|
strategy?: "absolute" | "fixed" | undefined;
|
|
89
89
|
showClearIndicator?: boolean | undefined;
|
|
90
|
+
forwardedRef?: React.ForwardedRef<import("../types").UserPickerRef> | undefined;
|
|
90
91
|
} & {
|
|
91
92
|
target: import("../types").Target;
|
|
92
93
|
popupTitle?: string | undefined;
|
|
@@ -171,6 +172,7 @@ export declare const PopupUserPicker: React.ForwardRefExoticComponent<Omit<Pick<
|
|
|
171
172
|
UNSAFE_hasDraggableParentComponent?: boolean | undefined;
|
|
172
173
|
strategy?: "absolute" | "fixed" | undefined;
|
|
173
174
|
showClearIndicator?: boolean | undefined;
|
|
175
|
+
forwardedRef?: React.ForwardedRef<import("../types").UserPickerRef> | undefined;
|
|
174
176
|
popupTitle?: string | undefined;
|
|
175
177
|
placement?: import("@popperjs/core").Placement | undefined;
|
|
176
178
|
rootBoundary?: import("../types").RootBoundary | undefined;
|
|
@@ -78,7 +78,8 @@ export declare const UserPicker: React.ForwardRefExoticComponent<Pick<Omit<{
|
|
|
78
78
|
openMenuOnClick?: boolean | undefined;
|
|
79
79
|
strategy?: "absolute" | "fixed" | undefined;
|
|
80
80
|
showClearIndicator?: boolean | undefined;
|
|
81
|
-
|
|
81
|
+
forwardedRef?: React.ForwardedRef<import("../types").UserPickerRef> | undefined;
|
|
82
|
+
}, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "options" | "search" | "placeholder" | "isDisabled" | "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "components" | "inputId" | "isClearable" | "isInvalid" | "isLoading" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "name" | "noOptionsMessage" | "onBlur" | "onChange" | "onFocus" | "onInputChange" | "onKeyDown" | "openMenuOnClick" | "styles" | "value" | "required" | "appearance" | "footer" | "defaultValue" | "fieldId" | "menuMinWidth" | "maxPickerHeight" | "textFieldBackgroundColor" | "loadOptions" | "loadOptionsErrorMessage" | "loadUserSource" | "anchor" | "open" | "onSelection" | "onClear" | "onOpen" | "onClose" | "subtle" | "noBorder" | "placeholderAvatar" | "addMoreMessage" | "clearValueLabel" | "allowEmail" | "suggestEmailsForDomain" | "emailLabel" | "disableInput" | "isValidEmail" | "maxOptions" | "ariaLabel" | "ariaLabelledBy" | "ariaDescribedBy" | "ariaLive" | "header" | "UNSAFE_hasDraggableParentComponent" | "strategy" | "showClearIndicator" | "forwardedRef"> & {
|
|
82
83
|
isMulti?: boolean | undefined;
|
|
83
84
|
width?: string | number | undefined;
|
|
84
85
|
} & {} & React.RefAttributes<any>>;
|
|
@@ -180,6 +180,12 @@ export type UserPickerProps = WithAnalyticsEventsProps & {
|
|
|
180
180
|
strategy?: 'fixed' | 'absolute';
|
|
181
181
|
/** Override default behavior and show the clear indicator. */
|
|
182
182
|
showClearIndicator?: boolean;
|
|
183
|
+
/** Ref to the underlying select */
|
|
184
|
+
forwardedRef?: React.ForwardedRef<UserPickerRef>;
|
|
185
|
+
};
|
|
186
|
+
export type UserPickerRef = {
|
|
187
|
+
focus: () => void;
|
|
188
|
+
blur: () => void;
|
|
183
189
|
};
|
|
184
190
|
export type PopupUserPickerProps = UserPickerProps & {
|
|
185
191
|
/** Whether to use the popup version of the single picker */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/user-picker",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.2.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/"
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"dependencies": {
|
|
52
52
|
"@atlaskit/analytics-next": "^11.0.0",
|
|
53
53
|
"@atlaskit/avatar": "^25.1.0",
|
|
54
|
-
"@atlaskit/icon": "^26.
|
|
54
|
+
"@atlaskit/icon": "^26.4.0",
|
|
55
55
|
"@atlaskit/link": "^3.2.0",
|
|
56
56
|
"@atlaskit/logo": "^18.1.0",
|
|
57
57
|
"@atlaskit/lozenge": "^12.2.0",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"@atlaskit/teams-avatar": "^2.3.0",
|
|
65
65
|
"@atlaskit/theme": "^18.0.0",
|
|
66
66
|
"@atlaskit/tokens": "^4.9.0",
|
|
67
|
-
"@atlaskit/tooltip": "^20.
|
|
67
|
+
"@atlaskit/tooltip": "^20.1.0",
|
|
68
68
|
"@atlaskit/ufo": "^0.4.0",
|
|
69
69
|
"@babel/runtime": "^7.0.0",
|
|
70
70
|
"@compiled/react": "^0.18.3",
|