@atlaskit/user-picker 11.21.2 → 11.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 +15 -0
- package/afm-cc/tsconfig.json +0 -1
- package/afm-jira/tsconfig.json +0 -1
- package/afm-products/tsconfig.json +0 -1
- package/dist/cjs/components/BaseUserPicker.js +18 -22
- package/dist/es2019/components/BaseUserPicker.js +18 -20
- package/dist/esm/components/BaseUserPicker.js +18 -22
- package/dist/types/components/BaseUserPicker.d.ts +8 -7
- package/dist/types/components/PopupUserPicker.d.ts +4 -0
- package/dist/types/components/UserPicker.d.ts +3 -1
- package/dist/types/components/popup.d.ts +2 -2
- package/dist/types/types.d.ts +4 -0
- package/dist/types-ts4.5/components/BaseUserPicker.d.ts +8 -7
- package/dist/types-ts4.5/components/PopupUserPicker.d.ts +4 -0
- package/dist/types-ts4.5/components/UserPicker.d.ts +3 -1
- package/dist/types-ts4.5/components/popup.d.ts +2 -2
- package/dist/types-ts4.5/types.d.ts +4 -0
- package/package.json +2 -5
- package/tsconfig.json +1 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/user-picker
|
|
2
2
|
|
|
3
|
+
## 11.23.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`4222fa748c46e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4222fa748c46e) -
|
|
8
|
+
[ux] Feature flag clean up to enable keyboard interactions in with header prop plugin in
|
|
9
|
+
Confluence
|
|
10
|
+
|
|
11
|
+
## 11.22.0
|
|
12
|
+
|
|
13
|
+
### Minor Changes
|
|
14
|
+
|
|
15
|
+
- [`c474c86e4ed4d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c474c86e4ed4d) -
|
|
16
|
+
Add isHeaderFocused prop to enable tabbing through header plugin in user picker.
|
|
17
|
+
|
|
3
18
|
## 11.21.2
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
package/afm-cc/tsconfig.json
CHANGED
package/afm-jira/tsconfig.json
CHANGED
|
@@ -25,7 +25,6 @@ var _i18n = require("./i18n");
|
|
|
25
25
|
var _utils = require("./utils");
|
|
26
26
|
var _groupOptionsByType = require("../util/group-options-by-type");
|
|
27
27
|
var _ufoExperiences = require("../util/ufoExperiences");
|
|
28
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
29
28
|
var _excluded = ["aria-labelledby", "aria-describedby"];
|
|
30
29
|
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; }
|
|
31
30
|
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; }
|
|
@@ -253,7 +252,7 @@ var BaseUserPickerWithoutAnalytics = exports.BaseUserPickerWithoutAnalytics = /*
|
|
|
253
252
|
});
|
|
254
253
|
});
|
|
255
254
|
(0, _defineProperty2.default)(_this, "handleBlur", function () {
|
|
256
|
-
if (_this.
|
|
255
|
+
if (_this.props.isFooterFocused || _this.props.isHeaderFocused) {
|
|
257
256
|
return;
|
|
258
257
|
}
|
|
259
258
|
(0, _utils.callCallback)(_this.props.onBlur, _this.getSessionId());
|
|
@@ -269,7 +268,7 @@ var BaseUserPickerWithoutAnalytics = exports.BaseUserPickerWithoutAnalytics = /*
|
|
|
269
268
|
});
|
|
270
269
|
});
|
|
271
270
|
(0, _defineProperty2.default)(_this, "handleClose", function () {
|
|
272
|
-
if (_this.
|
|
271
|
+
if (_this.props.isFooterFocused || _this.props.isHeaderFocused) {
|
|
273
272
|
return;
|
|
274
273
|
}
|
|
275
274
|
_this.resetInputState();
|
|
@@ -332,17 +331,19 @@ var BaseUserPickerWithoutAnalytics = exports.BaseUserPickerWithoutAnalytics = /*
|
|
|
332
331
|
}
|
|
333
332
|
}
|
|
334
333
|
_this.props.onKeyDown && _this.props.onKeyDown(event);
|
|
335
|
-
if (
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
334
|
+
if (event.key === 'Escape') {
|
|
335
|
+
_this.setState({
|
|
336
|
+
menuIsOpen: false,
|
|
337
|
+
options: []
|
|
338
|
+
});
|
|
339
|
+
_this.props.setIsFooterFocused && _this.props.setIsFooterFocused(false);
|
|
340
|
+
_this.props.setIsHeaderFocused && _this.props.setIsHeaderFocused(false);
|
|
341
|
+
}
|
|
342
|
+
if (event.key === 'Tab' && _this.props.setIsFooterFocused && _this.props.footer) {
|
|
343
|
+
_this.props.setIsFooterFocused(true);
|
|
344
|
+
}
|
|
345
|
+
if (event.key === 'Tab' && _this.props.setIsHeaderFocused && _this.props.header) {
|
|
346
|
+
_this.props.setIsHeaderFocused(true);
|
|
346
347
|
}
|
|
347
348
|
});
|
|
348
349
|
(0, _defineProperty2.default)(_this, "handleClearIndicatorHover", function (hoveringClearIndicator) {
|
|
@@ -401,7 +402,7 @@ var BaseUserPickerWithoutAnalytics = exports.BaseUserPickerWithoutAnalytics = /*
|
|
|
401
402
|
}
|
|
402
403
|
});
|
|
403
404
|
(0, _defineProperty2.default)(_this, "shouldKeepMenuOpen", function () {
|
|
404
|
-
return Boolean(!!_this.props.footer) && Boolean(_this.props.isFooterFocused);
|
|
405
|
+
return Boolean(!!_this.props.footer) && Boolean(_this.props.isFooterFocused) || Boolean(!!_this.props.header) && Boolean(_this.props.isHeaderFocused);
|
|
405
406
|
});
|
|
406
407
|
_this.state = {
|
|
407
408
|
options: [],
|
|
@@ -437,11 +438,6 @@ var BaseUserPickerWithoutAnalytics = exports.BaseUserPickerWithoutAnalytics = /*
|
|
|
437
438
|
get: function get() {
|
|
438
439
|
return this.props.openMenuOnClick && !this.props.isMulti;
|
|
439
440
|
}
|
|
440
|
-
}, {
|
|
441
|
-
key: "isCreateTeamA11yEnabled",
|
|
442
|
-
get: function get() {
|
|
443
|
-
return (0, _platformFeatureFlags.fg)('a11y-create-team-is-not-focusable-and-has-no-btn');
|
|
444
|
-
}
|
|
445
441
|
}, {
|
|
446
442
|
key: "componentDidMount",
|
|
447
443
|
value: function componentDidMount() {
|
|
@@ -466,8 +462,8 @@ var BaseUserPickerWithoutAnalytics = exports.BaseUserPickerWithoutAnalytics = /*
|
|
|
466
462
|
count = _this$state2.count,
|
|
467
463
|
inputValue = _this$state2.inputValue;
|
|
468
464
|
|
|
469
|
-
// Close menu when isFooterFocused changes from true to false
|
|
470
|
-
if (
|
|
465
|
+
// Close menu when isFooterFocused or isHeaderFocused changes from true to false
|
|
466
|
+
if (menuIsOpen && (prevProps.isFooterFocused === true && this.props.isFooterFocused === false || prevProps.isHeaderFocused === true && this.props.isHeaderFocused === false) && !this.shouldKeepMenuOpen()) {
|
|
471
467
|
this.resetInputState();
|
|
472
468
|
(0, _utils.callCallback)(this.props.onClose, this.getSessionId());
|
|
473
469
|
this.setState({
|
|
@@ -13,7 +13,6 @@ import { messages } from './i18n';
|
|
|
13
13
|
import { callCallback, extractOptionValue, getOptions, isIterable, isPopupUserPickerByComponent, isDefaultValuePopulated, isSingleValue, optionToSelectableOptions } from './utils';
|
|
14
14
|
import { groupOptionsByType } from '../util/group-options-by-type';
|
|
15
15
|
import { userPickerOptionsShownUfoExperience } from '../util/ufoExperiences';
|
|
16
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
17
16
|
const loadingMessage = () => null;
|
|
18
17
|
const classNamePrefix = 'fabric-user-picker';
|
|
19
18
|
export class BaseUserPickerWithoutAnalytics extends React.Component {
|
|
@@ -243,7 +242,7 @@ export class BaseUserPickerWithoutAnalytics extends React.Component {
|
|
|
243
242
|
});
|
|
244
243
|
});
|
|
245
244
|
_defineProperty(this, "handleBlur", () => {
|
|
246
|
-
if (this.
|
|
245
|
+
if (this.props.isFooterFocused || this.props.isHeaderFocused) {
|
|
247
246
|
return;
|
|
248
247
|
}
|
|
249
248
|
callCallback(this.props.onBlur, this.getSessionId());
|
|
@@ -259,7 +258,7 @@ export class BaseUserPickerWithoutAnalytics extends React.Component {
|
|
|
259
258
|
});
|
|
260
259
|
});
|
|
261
260
|
_defineProperty(this, "handleClose", () => {
|
|
262
|
-
if (this.
|
|
261
|
+
if (this.props.isFooterFocused || this.props.isHeaderFocused) {
|
|
263
262
|
return;
|
|
264
263
|
}
|
|
265
264
|
this.resetInputState();
|
|
@@ -322,17 +321,19 @@ export class BaseUserPickerWithoutAnalytics extends React.Component {
|
|
|
322
321
|
}
|
|
323
322
|
}
|
|
324
323
|
this.props.onKeyDown && this.props.onKeyDown(event);
|
|
325
|
-
if (
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
324
|
+
if (event.key === 'Escape') {
|
|
325
|
+
this.setState({
|
|
326
|
+
menuIsOpen: false,
|
|
327
|
+
options: []
|
|
328
|
+
});
|
|
329
|
+
this.props.setIsFooterFocused && this.props.setIsFooterFocused(false);
|
|
330
|
+
this.props.setIsHeaderFocused && this.props.setIsHeaderFocused(false);
|
|
331
|
+
}
|
|
332
|
+
if (event.key === 'Tab' && this.props.setIsFooterFocused && this.props.footer) {
|
|
333
|
+
this.props.setIsFooterFocused(true);
|
|
334
|
+
}
|
|
335
|
+
if (event.key === 'Tab' && this.props.setIsHeaderFocused && this.props.header) {
|
|
336
|
+
this.props.setIsHeaderFocused(true);
|
|
336
337
|
}
|
|
337
338
|
});
|
|
338
339
|
_defineProperty(this, "handleClearIndicatorHover", hoveringClearIndicator => {
|
|
@@ -385,7 +386,7 @@ export class BaseUserPickerWithoutAnalytics extends React.Component {
|
|
|
385
386
|
}));
|
|
386
387
|
}
|
|
387
388
|
});
|
|
388
|
-
_defineProperty(this, "shouldKeepMenuOpen", () => Boolean(!!this.props.footer) && Boolean(this.props.isFooterFocused));
|
|
389
|
+
_defineProperty(this, "shouldKeepMenuOpen", () => Boolean(!!this.props.footer) && Boolean(this.props.isFooterFocused) || Boolean(!!this.props.header) && Boolean(this.props.isHeaderFocused));
|
|
389
390
|
this.state = {
|
|
390
391
|
options: [],
|
|
391
392
|
isDefaultSet: false,
|
|
@@ -416,9 +417,6 @@ export class BaseUserPickerWithoutAnalytics extends React.Component {
|
|
|
416
417
|
get isMenuOpenOnClickForSingleSelect() {
|
|
417
418
|
return this.props.openMenuOnClick && !this.props.isMulti;
|
|
418
419
|
}
|
|
419
|
-
get isCreateTeamA11yEnabled() {
|
|
420
|
-
return fg('a11y-create-team-is-not-focusable-and-has-no-btn');
|
|
421
|
-
}
|
|
422
420
|
componentDidMount() {
|
|
423
421
|
const {
|
|
424
422
|
open,
|
|
@@ -441,8 +439,8 @@ export class BaseUserPickerWithoutAnalytics extends React.Component {
|
|
|
441
439
|
inputValue
|
|
442
440
|
} = this.state;
|
|
443
441
|
|
|
444
|
-
// Close menu when isFooterFocused changes from true to false
|
|
445
|
-
if (
|
|
442
|
+
// Close menu when isFooterFocused or isHeaderFocused changes from true to false
|
|
443
|
+
if (menuIsOpen && (prevProps.isFooterFocused === true && this.props.isFooterFocused === false || prevProps.isHeaderFocused === true && this.props.isHeaderFocused === false) && !this.shouldKeepMenuOpen()) {
|
|
446
444
|
this.resetInputState();
|
|
447
445
|
callCallback(this.props.onClose, this.getSessionId());
|
|
448
446
|
this.setState({
|
|
@@ -27,7 +27,6 @@ import { messages } from './i18n';
|
|
|
27
27
|
import { callCallback, extractOptionValue, getOptions, isIterable, isPopupUserPickerByComponent, isDefaultValuePopulated, isSingleValue, optionToSelectableOptions } from './utils';
|
|
28
28
|
import { groupOptionsByType } from '../util/group-options-by-type';
|
|
29
29
|
import { userPickerOptionsShownUfoExperience } from '../util/ufoExperiences';
|
|
30
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
31
30
|
var loadingMessage = function loadingMessage() {
|
|
32
31
|
return null;
|
|
33
32
|
};
|
|
@@ -247,7 +246,7 @@ export var BaseUserPickerWithoutAnalytics = /*#__PURE__*/function (_React$Compon
|
|
|
247
246
|
});
|
|
248
247
|
});
|
|
249
248
|
_defineProperty(_this, "handleBlur", function () {
|
|
250
|
-
if (_this.
|
|
249
|
+
if (_this.props.isFooterFocused || _this.props.isHeaderFocused) {
|
|
251
250
|
return;
|
|
252
251
|
}
|
|
253
252
|
callCallback(_this.props.onBlur, _this.getSessionId());
|
|
@@ -263,7 +262,7 @@ export var BaseUserPickerWithoutAnalytics = /*#__PURE__*/function (_React$Compon
|
|
|
263
262
|
});
|
|
264
263
|
});
|
|
265
264
|
_defineProperty(_this, "handleClose", function () {
|
|
266
|
-
if (_this.
|
|
265
|
+
if (_this.props.isFooterFocused || _this.props.isHeaderFocused) {
|
|
267
266
|
return;
|
|
268
267
|
}
|
|
269
268
|
_this.resetInputState();
|
|
@@ -326,17 +325,19 @@ export var BaseUserPickerWithoutAnalytics = /*#__PURE__*/function (_React$Compon
|
|
|
326
325
|
}
|
|
327
326
|
}
|
|
328
327
|
_this.props.onKeyDown && _this.props.onKeyDown(event);
|
|
329
|
-
if (
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
328
|
+
if (event.key === 'Escape') {
|
|
329
|
+
_this.setState({
|
|
330
|
+
menuIsOpen: false,
|
|
331
|
+
options: []
|
|
332
|
+
});
|
|
333
|
+
_this.props.setIsFooterFocused && _this.props.setIsFooterFocused(false);
|
|
334
|
+
_this.props.setIsHeaderFocused && _this.props.setIsHeaderFocused(false);
|
|
335
|
+
}
|
|
336
|
+
if (event.key === 'Tab' && _this.props.setIsFooterFocused && _this.props.footer) {
|
|
337
|
+
_this.props.setIsFooterFocused(true);
|
|
338
|
+
}
|
|
339
|
+
if (event.key === 'Tab' && _this.props.setIsHeaderFocused && _this.props.header) {
|
|
340
|
+
_this.props.setIsHeaderFocused(true);
|
|
340
341
|
}
|
|
341
342
|
});
|
|
342
343
|
_defineProperty(_this, "handleClearIndicatorHover", function (hoveringClearIndicator) {
|
|
@@ -395,7 +396,7 @@ export var BaseUserPickerWithoutAnalytics = /*#__PURE__*/function (_React$Compon
|
|
|
395
396
|
}
|
|
396
397
|
});
|
|
397
398
|
_defineProperty(_this, "shouldKeepMenuOpen", function () {
|
|
398
|
-
return Boolean(!!_this.props.footer) && Boolean(_this.props.isFooterFocused);
|
|
399
|
+
return Boolean(!!_this.props.footer) && Boolean(_this.props.isFooterFocused) || Boolean(!!_this.props.header) && Boolean(_this.props.isHeaderFocused);
|
|
399
400
|
});
|
|
400
401
|
_this.state = {
|
|
401
402
|
options: [],
|
|
@@ -431,11 +432,6 @@ export var BaseUserPickerWithoutAnalytics = /*#__PURE__*/function (_React$Compon
|
|
|
431
432
|
get: function get() {
|
|
432
433
|
return this.props.openMenuOnClick && !this.props.isMulti;
|
|
433
434
|
}
|
|
434
|
-
}, {
|
|
435
|
-
key: "isCreateTeamA11yEnabled",
|
|
436
|
-
get: function get() {
|
|
437
|
-
return fg('a11y-create-team-is-not-focusable-and-has-no-btn');
|
|
438
|
-
}
|
|
439
435
|
}, {
|
|
440
436
|
key: "componentDidMount",
|
|
441
437
|
value: function componentDidMount() {
|
|
@@ -460,8 +456,8 @@ export var BaseUserPickerWithoutAnalytics = /*#__PURE__*/function (_React$Compon
|
|
|
460
456
|
count = _this$state2.count,
|
|
461
457
|
inputValue = _this$state2.inputValue;
|
|
462
458
|
|
|
463
|
-
// Close menu when isFooterFocused changes from true to false
|
|
464
|
-
if (
|
|
459
|
+
// Close menu when isFooterFocused or isHeaderFocused changes from true to false
|
|
460
|
+
if (menuIsOpen && (prevProps.isFooterFocused === true && this.props.isFooterFocused === false || prevProps.isHeaderFocused === true && this.props.isHeaderFocused === false) && !this.shouldKeepMenuOpen()) {
|
|
465
461
|
this.resetInputState();
|
|
466
462
|
callCallback(this.props.onClose, this.getSessionId());
|
|
467
463
|
this.setState({
|
|
@@ -49,7 +49,6 @@ export declare class BaseUserPickerWithoutAnalytics extends React.Component<Base
|
|
|
49
49
|
private get isMenuOpenOnClickForSingleSelect();
|
|
50
50
|
abortOptionsShownUfoExperience: () => void;
|
|
51
51
|
startOptionsShownUfoExperience: () => void;
|
|
52
|
-
private get isCreateTeamA11yEnabled();
|
|
53
52
|
private executeLoadOptions;
|
|
54
53
|
private handleFocus;
|
|
55
54
|
private resetInputState;
|
|
@@ -78,7 +77,7 @@ export declare const BaseUserPicker: React.ForwardRefExoticComponent<Pick<Omit<{
|
|
|
78
77
|
ariaDescribedBy?: string;
|
|
79
78
|
ariaLabel?: string;
|
|
80
79
|
ariaLabelledBy?: string;
|
|
81
|
-
ariaLive?:
|
|
80
|
+
ariaLive?: 'polite' | 'off' | 'assertive';
|
|
82
81
|
autoFocus?: boolean;
|
|
83
82
|
captureMenuScroll?: boolean;
|
|
84
83
|
clearValueLabel?: string;
|
|
@@ -90,7 +89,7 @@ export declare const BaseUserPicker: React.ForwardRefExoticComponent<Pick<Omit<{
|
|
|
90
89
|
fieldId: string | null;
|
|
91
90
|
footer?: React.ReactNode;
|
|
92
91
|
forwardedRef?: React.ForwardedRef<UserPickerRef>;
|
|
93
|
-
groupByTypeOrder?: NonNullable<OptionData[
|
|
92
|
+
groupByTypeOrder?: NonNullable<OptionData['type']>[];
|
|
94
93
|
header?: React.ReactNode;
|
|
95
94
|
height?: number | string;
|
|
96
95
|
includeTeamsUpdates?: boolean;
|
|
@@ -98,6 +97,7 @@ export declare const BaseUserPicker: React.ForwardRefExoticComponent<Pick<Omit<{
|
|
|
98
97
|
isClearable?: boolean;
|
|
99
98
|
isDisabled?: boolean;
|
|
100
99
|
isFooterFocused?: boolean;
|
|
100
|
+
isHeaderFocused?: boolean;
|
|
101
101
|
isInvalid?: boolean;
|
|
102
102
|
isLoading?: boolean;
|
|
103
103
|
isMulti?: boolean;
|
|
@@ -112,7 +112,7 @@ export declare const BaseUserPicker: React.ForwardRefExoticComponent<Pick<Omit<{
|
|
|
112
112
|
menuIsOpen?: boolean;
|
|
113
113
|
menuMinWidth?: number;
|
|
114
114
|
menuPortalTarget?: HTMLElement;
|
|
115
|
-
menuPosition?:
|
|
115
|
+
menuPosition?: 'absolute' | 'fixed';
|
|
116
116
|
menuShouldBlockScroll?: boolean;
|
|
117
117
|
name?: string;
|
|
118
118
|
noBorder?: boolean;
|
|
@@ -132,13 +132,14 @@ export declare const BaseUserPicker: React.ForwardRefExoticComponent<Pick<Omit<{
|
|
|
132
132
|
openMenuOnClick?: boolean;
|
|
133
133
|
options?: OptionData[];
|
|
134
134
|
placeholder?: React.ReactNode;
|
|
135
|
-
placeholderAvatar?:
|
|
135
|
+
placeholderAvatar?: 'person' | 'team';
|
|
136
136
|
popupSelectProps?: PopupSelectProps<OptionData>;
|
|
137
137
|
required?: boolean;
|
|
138
138
|
search?: string;
|
|
139
139
|
setIsFooterFocused?: React.Dispatch<React.SetStateAction<boolean>>;
|
|
140
|
+
setIsHeaderFocused?: React.Dispatch<React.SetStateAction<boolean>>;
|
|
140
141
|
showClearIndicator?: boolean;
|
|
141
|
-
strategy?:
|
|
142
|
+
strategy?: 'fixed' | 'absolute';
|
|
142
143
|
styles?: StylesConfig;
|
|
143
144
|
subtle?: boolean;
|
|
144
145
|
suggestEmailsForDomain?: string;
|
|
@@ -159,7 +160,7 @@ export declare const BaseUserPicker: React.ForwardRefExoticComponent<Pick<Omit<{
|
|
|
159
160
|
*/
|
|
160
161
|
UNSAFE_hasDraggableParentComponent?: boolean;
|
|
161
162
|
width: string | number;
|
|
162
|
-
}, keyof WithAnalyticsEventsProps>,
|
|
163
|
+
}, keyof WithAnalyticsEventsProps>, 'options' | 'noOptionsMessage' | 'placeholder' | 'addMoreMessage' | 'allowEmail' | 'anchor' | 'appearance' | 'ariaDescribedBy' | 'ariaLabel' | 'ariaLabelledBy' | 'ariaLive' | 'autoFocus' | 'captureMenuScroll' | 'clearValueLabel' | 'closeMenuOnScroll' | 'components' | 'defaultValue' | 'disableInput' | 'emailLabel' | 'fieldId' | 'footer' | 'forwardedRef' | 'groupByTypeOrder' | 'header' | 'height' | 'includeTeamsUpdates' | 'inputId' | 'isDisabled' | 'isFooterFocused' | 'isInvalid' | 'isLoading' | 'isValidEmail' | 'loadOptions' | 'loadUserSource' | 'maxOptions' | 'maxPickerHeight' | 'menuIsOpen' | 'menuMinWidth' | 'menuPortalTarget' | 'menuPosition' | 'menuShouldBlockScroll' | 'name' | 'onBlur' | 'onChange' | 'onClear' | 'onClose' | 'onFocus' | 'onInputChange' | 'onKeyDown' | 'onOpen' | 'onSelection' | 'open' | 'placeholderAvatar' | 'popupSelectProps' | 'required' | 'search' | 'setIsFooterFocused' | 'showClearIndicator' | 'strategy' | 'styles' | 'suggestEmailsForDomain' | 'UNSAFE_hasDraggableParentComponent' | 'value' | 'width' | 'pickerProps' | 'SelectComponent'> & {
|
|
163
164
|
isClearable?: boolean | undefined;
|
|
164
165
|
isMulti?: boolean | undefined;
|
|
165
166
|
loadOptionsErrorMessage?: ((value: {
|
|
@@ -47,6 +47,7 @@ export declare const PopupUserPicker: React.ForwardRefExoticComponent<Omit<Pick<
|
|
|
47
47
|
isClearable?: boolean;
|
|
48
48
|
isDisabled?: boolean;
|
|
49
49
|
isFooterFocused?: boolean;
|
|
50
|
+
isHeaderFocused?: boolean;
|
|
50
51
|
isInvalid?: boolean;
|
|
51
52
|
isLoading?: boolean;
|
|
52
53
|
isMulti?: boolean;
|
|
@@ -86,6 +87,7 @@ export declare const PopupUserPicker: React.ForwardRefExoticComponent<Omit<Pick<
|
|
|
86
87
|
required?: boolean;
|
|
87
88
|
search?: string;
|
|
88
89
|
setIsFooterFocused?: React.Dispatch<React.SetStateAction<boolean>>;
|
|
90
|
+
setIsHeaderFocused?: React.Dispatch<React.SetStateAction<boolean>>;
|
|
89
91
|
showClearIndicator?: boolean;
|
|
90
92
|
strategy?: "fixed" | "absolute";
|
|
91
93
|
styles?: import("@atlaskit/select").StylesConfig;
|
|
@@ -155,6 +157,7 @@ export declare const PopupUserPicker: React.ForwardRefExoticComponent<Omit<Pick<
|
|
|
155
157
|
height?: number | string | undefined;
|
|
156
158
|
includeTeamsUpdates?: boolean | undefined;
|
|
157
159
|
isFooterFocused?: boolean | undefined;
|
|
160
|
+
isHeaderFocused?: boolean | undefined;
|
|
158
161
|
isValidEmail?: import("./emailValidation").EmailValidator | undefined;
|
|
159
162
|
loadOptions?: import("..").LoadOptions | undefined;
|
|
160
163
|
loadOptionsErrorMessage?: ((value: {
|
|
@@ -173,6 +176,7 @@ export declare const PopupUserPicker: React.ForwardRefExoticComponent<Omit<Pick<
|
|
|
173
176
|
placeholderAvatar?: "person" | "team" | undefined;
|
|
174
177
|
popupSelectProps?: import("@atlaskit/select").PopupSelectProps<import("..").OptionData> | undefined;
|
|
175
178
|
setIsFooterFocused?: React.Dispatch<React.SetStateAction<boolean>> | undefined;
|
|
179
|
+
setIsHeaderFocused?: React.Dispatch<React.SetStateAction<boolean>> | undefined;
|
|
176
180
|
showClearIndicator?: boolean | undefined;
|
|
177
181
|
strategy?: "fixed" | "absolute" | undefined;
|
|
178
182
|
subtle?: boolean | undefined;
|
|
@@ -38,6 +38,7 @@ export declare const UserPicker: React.ForwardRefExoticComponent<Pick<Omit<{
|
|
|
38
38
|
isClearable?: boolean;
|
|
39
39
|
isDisabled?: boolean;
|
|
40
40
|
isFooterFocused?: boolean;
|
|
41
|
+
isHeaderFocused?: boolean;
|
|
41
42
|
isInvalid?: boolean;
|
|
42
43
|
isLoading?: boolean;
|
|
43
44
|
isMulti?: boolean;
|
|
@@ -77,6 +78,7 @@ export declare const UserPicker: React.ForwardRefExoticComponent<Pick<Omit<{
|
|
|
77
78
|
required?: boolean;
|
|
78
79
|
search?: string;
|
|
79
80
|
setIsFooterFocused?: React.Dispatch<React.SetStateAction<boolean>>;
|
|
81
|
+
setIsHeaderFocused?: React.Dispatch<React.SetStateAction<boolean>>;
|
|
80
82
|
showClearIndicator?: boolean;
|
|
81
83
|
strategy?: "fixed" | "absolute";
|
|
82
84
|
styles?: import("@atlaskit/select").StylesConfig;
|
|
@@ -86,7 +88,7 @@ export declare const UserPicker: React.ForwardRefExoticComponent<Pick<Omit<{
|
|
|
86
88
|
UNSAFE_hasDraggableParentComponent?: boolean;
|
|
87
89
|
value?: import("..").Value;
|
|
88
90
|
width?: number | string;
|
|
89
|
-
}, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "placeholder" | "isDisabled" | "onChange" | "onInputChange" | "value" | "appearance" | "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "components" | "inputId" | "isClearable" | "isInvalid" | "isLoading" | "menuIsOpen" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "name" | "noOptionsMessage" | "onBlur" | "onFocus" | "onKeyDown" | "openMenuOnClick" | "options" | "styles" | "required" | "search" | "anchor" | "addMoreMessage" | "allowEmail" | "ariaDescribedBy" | "ariaLabel" | "ariaLabelledBy" | "ariaLive" | "clearValueLabel" | "defaultValue" | "disableInput" | "emailLabel" | "fieldId" | "footer" | "forwardedRef" | "groupByTypeOrder" | "header" | "height" | "includeTeamsUpdates" | "isFooterFocused" | "isValidEmail" | "loadOptions" | "loadOptionsErrorMessage" | "loadUserSource" | "maxOptions" | "maxPickerHeight" | "menuMinWidth" | "noBorder" | "onClear" | "onClose" | "onOpen" | "onSelection" | "open" | "placeholderAvatar" | "popupSelectProps" | "setIsFooterFocused" | "showClearIndicator" | "strategy" | "subtle" | "suggestEmailsForDomain" | "textFieldBackgroundColor" | "UNSAFE_hasDraggableParentComponent"> & {
|
|
91
|
+
}, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "placeholder" | "isDisabled" | "onChange" | "onInputChange" | "value" | "appearance" | "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "components" | "inputId" | "isClearable" | "isInvalid" | "isLoading" | "menuIsOpen" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "name" | "noOptionsMessage" | "onBlur" | "onFocus" | "onKeyDown" | "openMenuOnClick" | "options" | "styles" | "required" | "search" | "anchor" | "addMoreMessage" | "allowEmail" | "ariaDescribedBy" | "ariaLabel" | "ariaLabelledBy" | "ariaLive" | "clearValueLabel" | "defaultValue" | "disableInput" | "emailLabel" | "fieldId" | "footer" | "forwardedRef" | "groupByTypeOrder" | "header" | "height" | "includeTeamsUpdates" | "isFooterFocused" | "isHeaderFocused" | "isValidEmail" | "loadOptions" | "loadOptionsErrorMessage" | "loadUserSource" | "maxOptions" | "maxPickerHeight" | "menuMinWidth" | "noBorder" | "onClear" | "onClose" | "onOpen" | "onSelection" | "open" | "placeholderAvatar" | "popupSelectProps" | "setIsFooterFocused" | "setIsHeaderFocused" | "showClearIndicator" | "strategy" | "subtle" | "suggestEmailsForDomain" | "textFieldBackgroundColor" | "UNSAFE_hasDraggableParentComponent"> & {
|
|
90
92
|
isMulti?: boolean | undefined;
|
|
91
93
|
width?: number | string | undefined;
|
|
92
94
|
} & {} & React.RefAttributes<any>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type MemoizedFn } from 'memoize-one';
|
|
2
2
|
import { type Placement } from '@atlaskit/popper';
|
|
3
3
|
import { type Target, type BoundariesElement, type RootBoundary } from '../types';
|
|
4
|
-
export declare const getPopupProps: MemoizedFn<(width: string | number, target: Target, onFlip: (data: any) => any, boundariesElement?: BoundariesElement, offset?: number[], placement?: Placement, rootBoundary?: RootBoundary, shouldFlip?: boolean, popupTitle?: string, strategy?:
|
|
4
|
+
export declare const getPopupProps: MemoizedFn<(width: string | number, target: Target, onFlip: (data: any) => any, boundariesElement?: BoundariesElement, offset?: number[], placement?: Placement, rootBoundary?: RootBoundary, shouldFlip?: boolean, popupTitle?: string, strategy?: 'fixed' | 'absolute') => {
|
|
5
5
|
autoFocus: boolean;
|
|
6
6
|
controlShouldRenderValue: boolean;
|
|
7
7
|
maxMenuWidth: string | number;
|
|
@@ -41,7 +41,7 @@ export declare const getPopupProps: MemoizedFn<(width: string | number, target:
|
|
|
41
41
|
order?: undefined;
|
|
42
42
|
})[];
|
|
43
43
|
placement: Placement;
|
|
44
|
-
strategy:
|
|
44
|
+
strategy: 'fixed' | 'absolute';
|
|
45
45
|
};
|
|
46
46
|
popupTitle: string | undefined;
|
|
47
47
|
searchThreshold: number;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -80,6 +80,8 @@ export type UserPickerProps = WithAnalyticsEventsProps & {
|
|
|
80
80
|
isDisabled?: boolean;
|
|
81
81
|
/** Checks if the footer is focused or not. This is needed to keep the menu open when the footer is focused */
|
|
82
82
|
isFooterFocused?: boolean;
|
|
83
|
+
/** Checks if the header is focused or not. This is needed to keep the menu open when the header is focused */
|
|
84
|
+
isHeaderFocused?: boolean;
|
|
83
85
|
/** Display the picker with a style to show the value is invalid */
|
|
84
86
|
isInvalid?: boolean;
|
|
85
87
|
/** Show the loading indicator. */
|
|
@@ -170,6 +172,8 @@ export type UserPickerProps = WithAnalyticsEventsProps & {
|
|
|
170
172
|
search?: string;
|
|
171
173
|
/** Sets if the footer is focused or not. This is needed to keep the menu open when the footer is focused */
|
|
172
174
|
setIsFooterFocused?: React.Dispatch<React.SetStateAction<boolean>>;
|
|
175
|
+
/** Sets if the header is focused or not. This is needed to keep the menu open when the header is focused */
|
|
176
|
+
setIsHeaderFocused?: React.Dispatch<React.SetStateAction<boolean>>;
|
|
173
177
|
/** Override default behavior and show the clear indicator. */
|
|
174
178
|
showClearIndicator?: boolean;
|
|
175
179
|
/** Positioning strategy for the popper element */
|
|
@@ -49,7 +49,6 @@ export declare class BaseUserPickerWithoutAnalytics extends React.Component<Base
|
|
|
49
49
|
private get isMenuOpenOnClickForSingleSelect();
|
|
50
50
|
abortOptionsShownUfoExperience: () => void;
|
|
51
51
|
startOptionsShownUfoExperience: () => void;
|
|
52
|
-
private get isCreateTeamA11yEnabled();
|
|
53
52
|
private executeLoadOptions;
|
|
54
53
|
private handleFocus;
|
|
55
54
|
private resetInputState;
|
|
@@ -78,7 +77,7 @@ export declare const BaseUserPicker: React.ForwardRefExoticComponent<Pick<Omit<{
|
|
|
78
77
|
ariaDescribedBy?: string;
|
|
79
78
|
ariaLabel?: string;
|
|
80
79
|
ariaLabelledBy?: string;
|
|
81
|
-
ariaLive?:
|
|
80
|
+
ariaLive?: 'polite' | 'off' | 'assertive';
|
|
82
81
|
autoFocus?: boolean;
|
|
83
82
|
captureMenuScroll?: boolean;
|
|
84
83
|
clearValueLabel?: string;
|
|
@@ -90,7 +89,7 @@ export declare const BaseUserPicker: React.ForwardRefExoticComponent<Pick<Omit<{
|
|
|
90
89
|
fieldId: string | null;
|
|
91
90
|
footer?: React.ReactNode;
|
|
92
91
|
forwardedRef?: React.ForwardedRef<UserPickerRef>;
|
|
93
|
-
groupByTypeOrder?: NonNullable<OptionData[
|
|
92
|
+
groupByTypeOrder?: NonNullable<OptionData['type']>[];
|
|
94
93
|
header?: React.ReactNode;
|
|
95
94
|
height?: number | string;
|
|
96
95
|
includeTeamsUpdates?: boolean;
|
|
@@ -98,6 +97,7 @@ export declare const BaseUserPicker: React.ForwardRefExoticComponent<Pick<Omit<{
|
|
|
98
97
|
isClearable?: boolean;
|
|
99
98
|
isDisabled?: boolean;
|
|
100
99
|
isFooterFocused?: boolean;
|
|
100
|
+
isHeaderFocused?: boolean;
|
|
101
101
|
isInvalid?: boolean;
|
|
102
102
|
isLoading?: boolean;
|
|
103
103
|
isMulti?: boolean;
|
|
@@ -112,7 +112,7 @@ export declare const BaseUserPicker: React.ForwardRefExoticComponent<Pick<Omit<{
|
|
|
112
112
|
menuIsOpen?: boolean;
|
|
113
113
|
menuMinWidth?: number;
|
|
114
114
|
menuPortalTarget?: HTMLElement;
|
|
115
|
-
menuPosition?:
|
|
115
|
+
menuPosition?: 'absolute' | 'fixed';
|
|
116
116
|
menuShouldBlockScroll?: boolean;
|
|
117
117
|
name?: string;
|
|
118
118
|
noBorder?: boolean;
|
|
@@ -132,13 +132,14 @@ export declare const BaseUserPicker: React.ForwardRefExoticComponent<Pick<Omit<{
|
|
|
132
132
|
openMenuOnClick?: boolean;
|
|
133
133
|
options?: OptionData[];
|
|
134
134
|
placeholder?: React.ReactNode;
|
|
135
|
-
placeholderAvatar?:
|
|
135
|
+
placeholderAvatar?: 'person' | 'team';
|
|
136
136
|
popupSelectProps?: PopupSelectProps<OptionData>;
|
|
137
137
|
required?: boolean;
|
|
138
138
|
search?: string;
|
|
139
139
|
setIsFooterFocused?: React.Dispatch<React.SetStateAction<boolean>>;
|
|
140
|
+
setIsHeaderFocused?: React.Dispatch<React.SetStateAction<boolean>>;
|
|
140
141
|
showClearIndicator?: boolean;
|
|
141
|
-
strategy?:
|
|
142
|
+
strategy?: 'fixed' | 'absolute';
|
|
142
143
|
styles?: StylesConfig;
|
|
143
144
|
subtle?: boolean;
|
|
144
145
|
suggestEmailsForDomain?: string;
|
|
@@ -159,7 +160,7 @@ export declare const BaseUserPicker: React.ForwardRefExoticComponent<Pick<Omit<{
|
|
|
159
160
|
*/
|
|
160
161
|
UNSAFE_hasDraggableParentComponent?: boolean;
|
|
161
162
|
width: string | number;
|
|
162
|
-
}, keyof WithAnalyticsEventsProps>,
|
|
163
|
+
}, keyof WithAnalyticsEventsProps>, 'options' | 'noOptionsMessage' | 'placeholder' | 'addMoreMessage' | 'allowEmail' | 'anchor' | 'appearance' | 'ariaDescribedBy' | 'ariaLabel' | 'ariaLabelledBy' | 'ariaLive' | 'autoFocus' | 'captureMenuScroll' | 'clearValueLabel' | 'closeMenuOnScroll' | 'components' | 'defaultValue' | 'disableInput' | 'emailLabel' | 'fieldId' | 'footer' | 'forwardedRef' | 'groupByTypeOrder' | 'header' | 'height' | 'includeTeamsUpdates' | 'inputId' | 'isDisabled' | 'isFooterFocused' | 'isInvalid' | 'isLoading' | 'isValidEmail' | 'loadOptions' | 'loadUserSource' | 'maxOptions' | 'maxPickerHeight' | 'menuIsOpen' | 'menuMinWidth' | 'menuPortalTarget' | 'menuPosition' | 'menuShouldBlockScroll' | 'name' | 'onBlur' | 'onChange' | 'onClear' | 'onClose' | 'onFocus' | 'onInputChange' | 'onKeyDown' | 'onOpen' | 'onSelection' | 'open' | 'placeholderAvatar' | 'popupSelectProps' | 'required' | 'search' | 'setIsFooterFocused' | 'showClearIndicator' | 'strategy' | 'styles' | 'suggestEmailsForDomain' | 'UNSAFE_hasDraggableParentComponent' | 'value' | 'width' | 'pickerProps' | 'SelectComponent'> & {
|
|
163
164
|
isClearable?: boolean | undefined;
|
|
164
165
|
isMulti?: boolean | undefined;
|
|
165
166
|
loadOptionsErrorMessage?: ((value: {
|
|
@@ -47,6 +47,7 @@ export declare const PopupUserPicker: React.ForwardRefExoticComponent<Omit<Pick<
|
|
|
47
47
|
isClearable?: boolean;
|
|
48
48
|
isDisabled?: boolean;
|
|
49
49
|
isFooterFocused?: boolean;
|
|
50
|
+
isHeaderFocused?: boolean;
|
|
50
51
|
isInvalid?: boolean;
|
|
51
52
|
isLoading?: boolean;
|
|
52
53
|
isMulti?: boolean;
|
|
@@ -86,6 +87,7 @@ export declare const PopupUserPicker: React.ForwardRefExoticComponent<Omit<Pick<
|
|
|
86
87
|
required?: boolean;
|
|
87
88
|
search?: string;
|
|
88
89
|
setIsFooterFocused?: React.Dispatch<React.SetStateAction<boolean>>;
|
|
90
|
+
setIsHeaderFocused?: React.Dispatch<React.SetStateAction<boolean>>;
|
|
89
91
|
showClearIndicator?: boolean;
|
|
90
92
|
strategy?: "fixed" | "absolute";
|
|
91
93
|
styles?: import("@atlaskit/select").StylesConfig;
|
|
@@ -161,6 +163,7 @@ export declare const PopupUserPicker: React.ForwardRefExoticComponent<Omit<Pick<
|
|
|
161
163
|
height?: number | string | undefined;
|
|
162
164
|
includeTeamsUpdates?: boolean | undefined;
|
|
163
165
|
isFooterFocused?: boolean | undefined;
|
|
166
|
+
isHeaderFocused?: boolean | undefined;
|
|
164
167
|
isValidEmail?: import("./emailValidation").EmailValidator | undefined;
|
|
165
168
|
loadOptions?: import("..").LoadOptions | undefined;
|
|
166
169
|
loadOptionsErrorMessage?: ((value: {
|
|
@@ -179,6 +182,7 @@ export declare const PopupUserPicker: React.ForwardRefExoticComponent<Omit<Pick<
|
|
|
179
182
|
placeholderAvatar?: "person" | "team" | undefined;
|
|
180
183
|
popupSelectProps?: import("@atlaskit/select").PopupSelectProps<import("..").OptionData> | undefined;
|
|
181
184
|
setIsFooterFocused?: React.Dispatch<React.SetStateAction<boolean>> | undefined;
|
|
185
|
+
setIsHeaderFocused?: React.Dispatch<React.SetStateAction<boolean>> | undefined;
|
|
182
186
|
showClearIndicator?: boolean | undefined;
|
|
183
187
|
strategy?: "fixed" | "absolute" | undefined;
|
|
184
188
|
subtle?: boolean | undefined;
|
|
@@ -38,6 +38,7 @@ export declare const UserPicker: React.ForwardRefExoticComponent<Pick<Omit<{
|
|
|
38
38
|
isClearable?: boolean;
|
|
39
39
|
isDisabled?: boolean;
|
|
40
40
|
isFooterFocused?: boolean;
|
|
41
|
+
isHeaderFocused?: boolean;
|
|
41
42
|
isInvalid?: boolean;
|
|
42
43
|
isLoading?: boolean;
|
|
43
44
|
isMulti?: boolean;
|
|
@@ -77,6 +78,7 @@ export declare const UserPicker: React.ForwardRefExoticComponent<Pick<Omit<{
|
|
|
77
78
|
required?: boolean;
|
|
78
79
|
search?: string;
|
|
79
80
|
setIsFooterFocused?: React.Dispatch<React.SetStateAction<boolean>>;
|
|
81
|
+
setIsHeaderFocused?: React.Dispatch<React.SetStateAction<boolean>>;
|
|
80
82
|
showClearIndicator?: boolean;
|
|
81
83
|
strategy?: "fixed" | "absolute";
|
|
82
84
|
styles?: import("@atlaskit/select").StylesConfig;
|
|
@@ -86,7 +88,7 @@ export declare const UserPicker: React.ForwardRefExoticComponent<Pick<Omit<{
|
|
|
86
88
|
UNSAFE_hasDraggableParentComponent?: boolean;
|
|
87
89
|
value?: import("..").Value;
|
|
88
90
|
width?: number | string;
|
|
89
|
-
}, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "placeholder" | "isDisabled" | "onChange" | "onInputChange" | "value" | "appearance" | "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "components" | "inputId" | "isClearable" | "isInvalid" | "isLoading" | "menuIsOpen" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "name" | "noOptionsMessage" | "onBlur" | "onFocus" | "onKeyDown" | "openMenuOnClick" | "options" | "styles" | "required" | "search" | "anchor" | "addMoreMessage" | "allowEmail" | "ariaDescribedBy" | "ariaLabel" | "ariaLabelledBy" | "ariaLive" | "clearValueLabel" | "defaultValue" | "disableInput" | "emailLabel" | "fieldId" | "footer" | "forwardedRef" | "groupByTypeOrder" | "header" | "height" | "includeTeamsUpdates" | "isFooterFocused" | "isValidEmail" | "loadOptions" | "loadOptionsErrorMessage" | "loadUserSource" | "maxOptions" | "maxPickerHeight" | "menuMinWidth" | "noBorder" | "onClear" | "onClose" | "onOpen" | "onSelection" | "open" | "placeholderAvatar" | "popupSelectProps" | "setIsFooterFocused" | "showClearIndicator" | "strategy" | "subtle" | "suggestEmailsForDomain" | "textFieldBackgroundColor" | "UNSAFE_hasDraggableParentComponent"> & {
|
|
91
|
+
}, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "placeholder" | "isDisabled" | "onChange" | "onInputChange" | "value" | "appearance" | "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "components" | "inputId" | "isClearable" | "isInvalid" | "isLoading" | "menuIsOpen" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "name" | "noOptionsMessage" | "onBlur" | "onFocus" | "onKeyDown" | "openMenuOnClick" | "options" | "styles" | "required" | "search" | "anchor" | "addMoreMessage" | "allowEmail" | "ariaDescribedBy" | "ariaLabel" | "ariaLabelledBy" | "ariaLive" | "clearValueLabel" | "defaultValue" | "disableInput" | "emailLabel" | "fieldId" | "footer" | "forwardedRef" | "groupByTypeOrder" | "header" | "height" | "includeTeamsUpdates" | "isFooterFocused" | "isHeaderFocused" | "isValidEmail" | "loadOptions" | "loadOptionsErrorMessage" | "loadUserSource" | "maxOptions" | "maxPickerHeight" | "menuMinWidth" | "noBorder" | "onClear" | "onClose" | "onOpen" | "onSelection" | "open" | "placeholderAvatar" | "popupSelectProps" | "setIsFooterFocused" | "setIsHeaderFocused" | "showClearIndicator" | "strategy" | "subtle" | "suggestEmailsForDomain" | "textFieldBackgroundColor" | "UNSAFE_hasDraggableParentComponent"> & {
|
|
90
92
|
isMulti?: boolean | undefined;
|
|
91
93
|
width?: number | string | undefined;
|
|
92
94
|
} & {} & React.RefAttributes<any>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type MemoizedFn } from 'memoize-one';
|
|
2
2
|
import { type Placement } from '@atlaskit/popper';
|
|
3
3
|
import { type Target, type BoundariesElement, type RootBoundary } from '../types';
|
|
4
|
-
export declare const getPopupProps: MemoizedFn<(width: string | number, target: Target, onFlip: (data: any) => any, boundariesElement?: BoundariesElement, offset?: number[], placement?: Placement, rootBoundary?: RootBoundary, shouldFlip?: boolean, popupTitle?: string, strategy?:
|
|
4
|
+
export declare const getPopupProps: MemoizedFn<(width: string | number, target: Target, onFlip: (data: any) => any, boundariesElement?: BoundariesElement, offset?: number[], placement?: Placement, rootBoundary?: RootBoundary, shouldFlip?: boolean, popupTitle?: string, strategy?: 'fixed' | 'absolute') => {
|
|
5
5
|
autoFocus: boolean;
|
|
6
6
|
controlShouldRenderValue: boolean;
|
|
7
7
|
maxMenuWidth: string | number;
|
|
@@ -41,7 +41,7 @@ export declare const getPopupProps: MemoizedFn<(width: string | number, target:
|
|
|
41
41
|
order?: undefined;
|
|
42
42
|
})[];
|
|
43
43
|
placement: Placement;
|
|
44
|
-
strategy:
|
|
44
|
+
strategy: 'fixed' | 'absolute';
|
|
45
45
|
};
|
|
46
46
|
popupTitle: string | undefined;
|
|
47
47
|
searchThreshold: number;
|
|
@@ -80,6 +80,8 @@ export type UserPickerProps = WithAnalyticsEventsProps & {
|
|
|
80
80
|
isDisabled?: boolean;
|
|
81
81
|
/** Checks if the footer is focused or not. This is needed to keep the menu open when the footer is focused */
|
|
82
82
|
isFooterFocused?: boolean;
|
|
83
|
+
/** Checks if the header is focused or not. This is needed to keep the menu open when the header is focused */
|
|
84
|
+
isHeaderFocused?: boolean;
|
|
83
85
|
/** Display the picker with a style to show the value is invalid */
|
|
84
86
|
isInvalid?: boolean;
|
|
85
87
|
/** Show the loading indicator. */
|
|
@@ -170,6 +172,8 @@ export type UserPickerProps = WithAnalyticsEventsProps & {
|
|
|
170
172
|
search?: string;
|
|
171
173
|
/** Sets if the footer is focused or not. This is needed to keep the menu open when the footer is focused */
|
|
172
174
|
setIsFooterFocused?: React.Dispatch<React.SetStateAction<boolean>>;
|
|
175
|
+
/** Sets if the header is focused or not. This is needed to keep the menu open when the header is focused */
|
|
176
|
+
setIsHeaderFocused?: React.Dispatch<React.SetStateAction<boolean>>;
|
|
173
177
|
/** Override default behavior and show the clear indicator. */
|
|
174
178
|
showClearIndicator?: boolean;
|
|
175
179
|
/** Positioning strategy for the popper element */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/user-picker",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.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/"
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@atlaskit/afm-i18n-platform-elements-user-picker": "2.7.0",
|
|
46
46
|
"@atlaskit/analytics-next": "^11.1.0",
|
|
47
|
-
"@atlaskit/avatar": "^25.
|
|
47
|
+
"@atlaskit/avatar": "^25.8.0",
|
|
48
48
|
"@atlaskit/feature-gate-js-client": "^5.5.0",
|
|
49
49
|
"@atlaskit/icon": "^31.0.0",
|
|
50
50
|
"@atlaskit/logo": "^19.10.0",
|
|
@@ -118,9 +118,6 @@
|
|
|
118
118
|
},
|
|
119
119
|
"jira_ai_agent_avatar_user_picker_user_option": {
|
|
120
120
|
"type": "boolean"
|
|
121
|
-
},
|
|
122
|
-
"a11y-create-team-is-not-focusable-and-has-no-btn": {
|
|
123
|
-
"type": "boolean"
|
|
124
121
|
}
|
|
125
122
|
}
|
|
126
123
|
}
|