@atlaskit/select 17.0.5 → 17.1.1
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/CheckboxSelect.js +6 -2
- package/dist/cjs/Select.js +1 -1
- package/dist/es2019/CheckboxSelect.js +7 -2
- package/dist/es2019/Select.js +1 -1
- package/dist/esm/CheckboxSelect.js +7 -2
- package/dist/esm/Select.js +1 -1
- package/dist/types/CheckboxSelect.d.ts +2 -2
- package/dist/types/components/input-options.d.ts +1 -1
- package/dist/types/extract-react-types/react-select-props.d.ts +58 -58
- package/dist/types-ts4.5/CheckboxSelect.d.ts +2 -2
- package/dist/types-ts4.5/components/input-options.d.ts +1 -1
- package/dist/types-ts4.5/extract-react-types/react-select-props.d.ts +58 -58
- package/package.json +6 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/select
|
|
2
2
|
|
|
3
|
+
## 17.1.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#73588](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/73588) [`d06aa1426a45`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/d06aa1426a45) - Thess packages has been added to the Jira push model.
|
|
8
|
+
|
|
9
|
+
## 17.1.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [#72872](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/72872) [`26b963783de7`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/26b963783de7) - DSP-16671 Update CheckboxSelect to accept generic type arg for OptionType
|
|
14
|
+
|
|
3
15
|
## 17.0.5
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -17,7 +17,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
17
17
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
18
18
|
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; }
|
|
19
19
|
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; }
|
|
20
|
-
var
|
|
20
|
+
var CheckboxSelectInternal = function CheckboxSelectInternal(_ref) {
|
|
21
21
|
var components = _ref.components,
|
|
22
22
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
23
23
|
var mergedComponents = (0, _react.useMemo)(function () {
|
|
@@ -32,5 +32,9 @@ var CheckboxSelect = /*#__PURE__*/_react.default.memo(function (_ref) {
|
|
|
32
32
|
}, props, {
|
|
33
33
|
components: mergedComponents
|
|
34
34
|
}));
|
|
35
|
-
}
|
|
35
|
+
};
|
|
36
|
+
var CheckboxSelect = /*#__PURE__*/_react.default.memo(CheckboxSelectInternal
|
|
37
|
+
// Type casting as `React.memo` does not forward generic types
|
|
38
|
+
// Reference: https://github.com/DefinitelyTyped/DefinitelyTyped/issues/37087#issuecomment-656596623
|
|
39
|
+
);
|
|
36
40
|
var _default = exports.default = CheckboxSelect;
|
package/dist/cjs/Select.js
CHANGED
|
@@ -9,7 +9,7 @@ var _reactSelect = _interopRequireDefault(require("react-select"));
|
|
|
9
9
|
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
10
10
|
var _createSelect = _interopRequireDefault(require("./createSelect"));
|
|
11
11
|
var packageName = "@atlaskit/select";
|
|
12
|
-
var packageVersion = "17.
|
|
12
|
+
var packageVersion = "17.1.1";
|
|
13
13
|
var SelectWithoutAnalytics = exports.SelectWithoutAnalytics = (0, _createSelect.default)(_reactSelect.default);
|
|
14
14
|
var createAndFireEventOnAtlaskit = (0, _analyticsNext.createAndFireEvent)('atlaskit');
|
|
15
15
|
var _default = exports.default = (0, _analyticsNext.withAnalyticsContext)({
|
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import React, { useMemo } from 'react';
|
|
3
3
|
import Select from './Select';
|
|
4
4
|
import { CheckboxOption } from './components/input-options';
|
|
5
|
-
const
|
|
5
|
+
const CheckboxSelectInternal = ({
|
|
6
6
|
components,
|
|
7
7
|
...props
|
|
8
8
|
}) => {
|
|
@@ -17,5 +17,10 @@ const CheckboxSelect = /*#__PURE__*/React.memo(({
|
|
|
17
17
|
}, props, {
|
|
18
18
|
components: mergedComponents
|
|
19
19
|
}));
|
|
20
|
-
}
|
|
20
|
+
};
|
|
21
|
+
const CheckboxSelect = /*#__PURE__*/React.memo(CheckboxSelectInternal
|
|
22
|
+
// Type casting as `React.memo` does not forward generic types
|
|
23
|
+
// Reference: https://github.com/DefinitelyTyped/DefinitelyTyped/issues/37087#issuecomment-656596623
|
|
24
|
+
);
|
|
25
|
+
|
|
21
26
|
export default CheckboxSelect;
|
package/dist/es2019/Select.js
CHANGED
|
@@ -2,7 +2,7 @@ import Select from 'react-select';
|
|
|
2
2
|
import { withAnalyticsEvents, withAnalyticsContext, createAndFireEvent } from '@atlaskit/analytics-next';
|
|
3
3
|
import createSelect from './createSelect';
|
|
4
4
|
const packageName = "@atlaskit/select";
|
|
5
|
-
const packageVersion = "17.
|
|
5
|
+
const packageVersion = "17.1.1";
|
|
6
6
|
export const SelectWithoutAnalytics = createSelect(Select);
|
|
7
7
|
const createAndFireEventOnAtlaskit = createAndFireEvent('atlaskit');
|
|
8
8
|
export default withAnalyticsContext({
|
|
@@ -7,7 +7,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
7
7
|
import React, { useMemo } from 'react';
|
|
8
8
|
import Select from './Select';
|
|
9
9
|
import { CheckboxOption } from './components/input-options';
|
|
10
|
-
var
|
|
10
|
+
var CheckboxSelectInternal = function CheckboxSelectInternal(_ref) {
|
|
11
11
|
var components = _ref.components,
|
|
12
12
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
13
13
|
var mergedComponents = useMemo(function () {
|
|
@@ -22,5 +22,10 @@ var CheckboxSelect = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
22
22
|
}, props, {
|
|
23
23
|
components: mergedComponents
|
|
24
24
|
}));
|
|
25
|
-
}
|
|
25
|
+
};
|
|
26
|
+
var CheckboxSelect = /*#__PURE__*/React.memo(CheckboxSelectInternal
|
|
27
|
+
// Type casting as `React.memo` does not forward generic types
|
|
28
|
+
// Reference: https://github.com/DefinitelyTyped/DefinitelyTyped/issues/37087#issuecomment-656596623
|
|
29
|
+
);
|
|
30
|
+
|
|
26
31
|
export default CheckboxSelect;
|
package/dist/esm/Select.js
CHANGED
|
@@ -2,7 +2,7 @@ import Select from 'react-select';
|
|
|
2
2
|
import { withAnalyticsEvents, withAnalyticsContext, createAndFireEvent } from '@atlaskit/analytics-next';
|
|
3
3
|
import createSelect from './createSelect';
|
|
4
4
|
var packageName = "@atlaskit/select";
|
|
5
|
-
var packageVersion = "17.
|
|
5
|
+
var packageVersion = "17.1.1";
|
|
6
6
|
export var SelectWithoutAnalytics = createSelect(Select);
|
|
7
7
|
var createAndFireEventOnAtlaskit = createAndFireEvent('atlaskit');
|
|
8
8
|
export default withAnalyticsContext({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import { SelectProps, OptionType } from './types';
|
|
3
|
-
declare const CheckboxSelect:
|
|
3
|
+
declare const CheckboxSelect: <OptionT extends OptionType>({ components, ...props }: SelectProps<OptionT, true>) => JSX.Element;
|
|
4
4
|
export default CheckboxSelect;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
import { OptionProps, OptionType } from '../types';
|
|
3
|
-
export declare const CheckboxOption:
|
|
3
|
+
export declare const CheckboxOption: <OptionT extends OptionType>(props: OptionProps<OptionT, true>) => JSX.Element;
|
|
4
4
|
export declare const RadioOption: FC<OptionProps>;
|
|
@@ -7,28 +7,28 @@ interface FilterOptionOption<Option> {
|
|
|
7
7
|
import { StylesConfig } from '../types';
|
|
8
8
|
import { ActionMeta, AriaLiveMessages, FormatOptionLabelMeta, GetOptionLabel, GetOptionValue, GroupBase, InputActionMeta, MenuPlacement, MenuPosition, OnChangeValue, Options, OptionsOrGroups, PropsValue, SelectComponentsConfig, ThemeConfig } from 'react-select';
|
|
9
9
|
interface NativeReactSelectProps<Option = unknown, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>> {
|
|
10
|
-
/**
|
|
10
|
+
/** Use this to provide a descriptive name for people who use assistive technology. */
|
|
11
11
|
'aria-label'?: string;
|
|
12
|
-
/** HTML ID of an element that should be used as the label (for assistive
|
|
12
|
+
/** HTML ID of an element that should be used as the label (for assistive technology). */
|
|
13
13
|
'aria-labelledby'?: string;
|
|
14
|
-
/** Identifies the element (or elements) that describes the object. By default this is associated with the placeholder. The value in this prop is additional to the label, not replacing the default. Use this to give additional information, hints, or examples about how to complete a field (for assistive
|
|
14
|
+
/** Identifies the element (or elements) that describes the object. By default this is associated with the placeholder. The value in this prop is additional to the label, not replacing the default. Use this to give additional information, hints, or examples about how to complete a field (for assistive technology). */
|
|
15
15
|
'aria-describedby'?: string;
|
|
16
|
-
/** Used to set the priority with which screen
|
|
16
|
+
/** Used to set the priority with which assistive technology like screen readers should treat updates to live regions. The possible settings are?: off, polite (default) or assertive. */
|
|
17
17
|
'aria-live'?: 'off' | 'polite' | 'assertive';
|
|
18
|
-
/** Customize the messages used by the aria-live component. See react-select v5.4.0 documentation for full details */
|
|
18
|
+
/** Customize the messages used by the aria-live component. See react-select v5.4.0 documentation for full details. */
|
|
19
19
|
ariaLiveMessages?: AriaLiveMessages<Option, IsMulti, Group>;
|
|
20
|
-
/** Focus the control when it is mounted */
|
|
20
|
+
/** Focus the control when it is mounted. */
|
|
21
21
|
autoFocus?: boolean;
|
|
22
|
-
/** Remove the currently focused option when the user presses backspace when Select isClearable or isMulti */
|
|
22
|
+
/** Remove the currently focused option when the user presses backspace when Select isClearable or isMulti. */
|
|
23
23
|
backspaceRemovesValue?: boolean;
|
|
24
|
-
/** Remove focus from the input when the user selects an option (handy for dismissing the keyboard on touch devices) */
|
|
24
|
+
/** Remove focus from the input when the user selects an option (handy for dismissing the keyboard on touch devices). */
|
|
25
25
|
blurInputOnSelect?: boolean;
|
|
26
|
-
/** When the user reaches the top/bottom of the menu, prevent scroll on the scroll-parent */
|
|
26
|
+
/** When the user reaches the top/bottom of the menu, prevent scroll on the scroll-parent. */
|
|
27
27
|
captureMenuScroll?: boolean;
|
|
28
|
-
/** Sets a className attribute on the outer component */
|
|
28
|
+
/** Sets a className attribute on the outer component. */
|
|
29
29
|
className?: string;
|
|
30
30
|
classNamePrefix?: string | null;
|
|
31
|
-
/** Close the select menu when the user selects an option */
|
|
31
|
+
/** Close the select menu when the user selects an option. */
|
|
32
32
|
closeMenuOnSelect?: boolean;
|
|
33
33
|
closeMenuOnScroll?: boolean | EventListener;
|
|
34
34
|
/**
|
|
@@ -39,123 +39,123 @@ interface NativeReactSelectProps<Option = unknown, IsMulti extends boolean = fal
|
|
|
39
39
|
components?: SelectComponentsConfig<Option, IsMulti, Group>;
|
|
40
40
|
/** Whether the value of the select, e.g. SingleValue, should be displayed in the control. */
|
|
41
41
|
controlShouldRenderValue?: boolean;
|
|
42
|
-
/** Delimiter used to join multiple values into a single HTML Input value */
|
|
42
|
+
/** Delimiter used to join multiple values into a single HTML Input value. */
|
|
43
43
|
delimiter?: string;
|
|
44
|
-
/** Clear all values when the user presses escape AND the menu is closed */
|
|
44
|
+
/** Clear all values when the user presses escape AND the menu is closed. */
|
|
45
45
|
escapeClearsValue?: boolean;
|
|
46
|
-
/** Custom method to filter whether an option should be displayed in the menu */
|
|
46
|
+
/** Custom method to filter whether an option should be displayed in the menu. */
|
|
47
47
|
filterOption?: ((option?: FilterOptionOption<Option>, inputValue?: string) => boolean) | null;
|
|
48
48
|
/** Formats group labels in the menu as React components. [Custom label example](/components/select/examples#customization). */
|
|
49
49
|
formatGroupLabel?: (group?: Group) => ReactNode;
|
|
50
|
-
/** Formats option labels in the menu and control as React components */
|
|
50
|
+
/** Formats option labels in the menu and control as React components. */
|
|
51
51
|
formatOptionLabel?: (data?: Option, formatOptionLabelMeta?: FormatOptionLabelMeta<Option>) => ReactNode;
|
|
52
52
|
/**
|
|
53
53
|
Resolves option data to a string to be displayed as the label by components.
|
|
54
54
|
|
|
55
|
-
Note
|
|
55
|
+
Note: Failure to resolve to a string type can interfere with filtering and assistive technology support.
|
|
56
56
|
*/
|
|
57
57
|
getOptionLabel?: GetOptionLabel<Option>;
|
|
58
|
-
/** Resolves option data to a string to compare options and specify value attributes */
|
|
58
|
+
/** Resolves option data to a string to compare options and specify value attributes. */
|
|
59
59
|
getOptionValue?: GetOptionValue<Option>;
|
|
60
|
-
/** Hide the selected option from the menu */
|
|
60
|
+
/** Hide the selected option from the menu. */
|
|
61
61
|
hideSelectedOptions?: boolean;
|
|
62
62
|
/** The id to set on the SelectContainer component. */
|
|
63
63
|
id?: string;
|
|
64
|
-
/** The value of the search input */
|
|
64
|
+
/** The value of the search input. */
|
|
65
65
|
inputValue?: string;
|
|
66
|
-
/** The id of the search input */
|
|
66
|
+
/** The id of the search input. */
|
|
67
67
|
inputId?: string;
|
|
68
|
-
/** Define an id prefix for the select components
|
|
68
|
+
/** Define an id prefix for the select components. For example, `{your-id}-value`. */
|
|
69
69
|
instanceId?: number | string;
|
|
70
|
-
/**
|
|
70
|
+
/** Sets whether the select value is clearable. */
|
|
71
71
|
isClearable?: boolean;
|
|
72
|
-
/**
|
|
72
|
+
/** Sets whether the select is disabled. */
|
|
73
73
|
isDisabled?: boolean;
|
|
74
|
-
/**
|
|
74
|
+
/** Sets whether the select is in a state of loading (async). */
|
|
75
75
|
isLoading?: boolean;
|
|
76
76
|
/**
|
|
77
77
|
Override the built-in logic to detect whether an option is disabled.
|
|
78
78
|
*/
|
|
79
79
|
isOptionDisabled?: (option?: Option, selectValue?: Options<Option>) => boolean;
|
|
80
|
-
/** Override the built-in logic to detect whether an option is selected */
|
|
80
|
+
/** Override the built-in logic to detect whether an option is selected. */
|
|
81
81
|
isOptionSelected?: (option?: Option, selectValue?: Options<Option>) => boolean;
|
|
82
|
-
/** Support multiple selected options */
|
|
82
|
+
/** Support multiple selected options. */
|
|
83
83
|
isMulti?: IsMulti;
|
|
84
|
-
/**
|
|
84
|
+
/** Sets if the select direction is right-to-left.*/
|
|
85
85
|
isRtl?: boolean;
|
|
86
|
-
/**
|
|
86
|
+
/** Sets whether to enable search functionality. */
|
|
87
87
|
isSearchable?: boolean;
|
|
88
|
-
/** Async
|
|
88
|
+
/** Async text to display when options are loading. */
|
|
89
89
|
loadingMessage?: (obj?: {
|
|
90
90
|
inputValue?: string;
|
|
91
91
|
}) => ReactNode;
|
|
92
|
-
/** Minimum height of the menu before flipping */
|
|
92
|
+
/** Minimum height of the menu before flipping. */
|
|
93
93
|
minMenuHeight?: number;
|
|
94
|
-
/** Maximum height of the menu before scrolling */
|
|
94
|
+
/** Maximum height of the menu before scrolling. */
|
|
95
95
|
maxMenuHeight?: number;
|
|
96
|
-
/**
|
|
96
|
+
/** Sets whether the menu is open. */
|
|
97
97
|
menuIsOpen?: boolean;
|
|
98
98
|
/** Default placement of the menu in relation to the control. 'auto' will flip when there isn't enough space below the control. */
|
|
99
99
|
menuPlacement?: MenuPlacement;
|
|
100
|
-
/** The CSS position value of the menu, when "fixed" extra layout management is required */
|
|
100
|
+
/** The CSS position value of the menu, when "fixed" extra layout management is required. */
|
|
101
101
|
menuPosition?: MenuPosition;
|
|
102
102
|
/** Whether the menu should use a portal, and where it should attach. */
|
|
103
103
|
menuPortalTarget?: HTMLElement | null;
|
|
104
|
-
/** Whether to block scroll events when the menu is open */
|
|
104
|
+
/** Whether to block scroll events when the menu is open. */
|
|
105
105
|
menuShouldBlockScroll?: boolean;
|
|
106
|
-
/** Whether the menu should be scrolled into view when it opens */
|
|
106
|
+
/** Whether the menu should be scrolled into view when it opens. */
|
|
107
107
|
menuShouldScrollIntoView?: boolean;
|
|
108
|
-
/** Name of the HTML Input (optional - without this, no input will be rendered) */
|
|
108
|
+
/** Name of the HTML Input (optional - without this, no input will be rendered). */
|
|
109
109
|
name?: string;
|
|
110
|
-
/** Text to display when there are no options */
|
|
110
|
+
/** Text to display when there are no options. */
|
|
111
111
|
noOptionsMessage?: (obj?: {
|
|
112
112
|
inputValue?: string;
|
|
113
113
|
}) => ReactNode;
|
|
114
|
-
/** Handle blur events on the control */
|
|
114
|
+
/** Handle blur events on the control. */
|
|
115
115
|
onBlur?: FocusEventHandler<HTMLInputElement>;
|
|
116
|
-
/** Handle change events on the select */
|
|
116
|
+
/** Handle change events on the select. */
|
|
117
117
|
onChange?: (newValue?: OnChangeValue<Option, IsMulti>, actionMeta?: ActionMeta<Option>) => void;
|
|
118
|
-
/** Handle focus events on the control */
|
|
118
|
+
/** Handle focus events on the control. */
|
|
119
119
|
onFocus?: FocusEventHandler<HTMLInputElement>;
|
|
120
|
-
/** Handle change events on the input */
|
|
120
|
+
/** Handle change events on the input. */
|
|
121
121
|
onInputChange?: (newValue?: string, actionMeta?: InputActionMeta) => void;
|
|
122
|
-
/** Handle key down events on the select */
|
|
122
|
+
/** Handle key down events on the select. */
|
|
123
123
|
onKeyDown?: KeyboardEventHandler<HTMLDivElement>;
|
|
124
|
-
/** Handle the menu opening */
|
|
124
|
+
/** Handle the menu opening. */
|
|
125
125
|
onMenuOpen?: () => void;
|
|
126
|
-
/** Handle the menu closing */
|
|
126
|
+
/** Handle the menu closing. */
|
|
127
127
|
onMenuClose?: () => void;
|
|
128
|
-
/** Fired when the user scrolls to the top of the menu */
|
|
128
|
+
/** Fired when the user scrolls to the top of the menu. */
|
|
129
129
|
onMenuScrollToTop?: (event?: WheelEvent | TouchEvent) => void;
|
|
130
|
-
/** Fired when the user scrolls to the bottom of the menu */
|
|
130
|
+
/** Fired when the user scrolls to the bottom of the menu. */
|
|
131
131
|
onMenuScrollToBottom?: (event?: WheelEvent | TouchEvent) => void;
|
|
132
|
-
/** Allows control of whether the menu is opened when the
|
|
132
|
+
/** Allows control of whether the menu is opened when the select is focused. */
|
|
133
133
|
openMenuOnFocus?: boolean;
|
|
134
|
-
/** Allows control of whether the menu is opened when the
|
|
134
|
+
/** Allows control of whether the menu is opened when the select is clicked. */
|
|
135
135
|
openMenuOnClick?: boolean;
|
|
136
|
-
/** Array of options that populate the select menu */
|
|
136
|
+
/** Array of options that populate the select menu. */
|
|
137
137
|
options?: OptionsOrGroups<Option, Group>;
|
|
138
|
-
/** Number of options to jump in menu when page{up|down} keys are used */
|
|
138
|
+
/** Number of options to jump in menu when page{up|down} keys are used. */
|
|
139
139
|
pageSize?: number;
|
|
140
|
-
/** Placeholder for the select value */
|
|
140
|
+
/** Placeholder for the select value. */
|
|
141
141
|
placeholder?: ReactNode;
|
|
142
|
-
/** Status to relay to screen readers */
|
|
142
|
+
/** Status to relay to screen readers. */
|
|
143
143
|
screenReaderStatus?: (obj?: {
|
|
144
144
|
count?: number;
|
|
145
145
|
}) => string;
|
|
146
146
|
/** Style modifier methods. */
|
|
147
147
|
styles?: StylesConfig;
|
|
148
|
-
/** Theme modifier method */
|
|
148
|
+
/** Theme modifier method. */
|
|
149
149
|
theme?: ThemeConfig;
|
|
150
|
-
/** Sets the tabIndex attribute on the input */
|
|
150
|
+
/** Sets the tabIndex attribute on the input. */
|
|
151
151
|
tabIndex?: number;
|
|
152
|
-
/** Select the currently focused option when the user presses tab */
|
|
152
|
+
/** Select the currently focused option when the user presses tab. */
|
|
153
153
|
tabSelectsValue?: boolean;
|
|
154
|
-
/** The value of the select; reflected by the selected option */
|
|
154
|
+
/** The value of the select; reflected by the selected option. */
|
|
155
155
|
value?: PropsValue<Option>;
|
|
156
|
-
/** Sets the form attribute on the input */
|
|
156
|
+
/** Sets the form attribute on the input. */
|
|
157
157
|
form?: string;
|
|
158
|
-
/** Marks the value-holding input as required for form validation */
|
|
158
|
+
/** Marks the value-holding input as required for form validation. */
|
|
159
159
|
required?: boolean;
|
|
160
160
|
}
|
|
161
161
|
export default function ertHackForSelect(_: NativeReactSelectProps): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import { SelectProps, OptionType } from './types';
|
|
3
|
-
declare const CheckboxSelect:
|
|
3
|
+
declare const CheckboxSelect: <OptionT extends OptionType>({ components, ...props }: SelectProps<OptionT, true>) => JSX.Element;
|
|
4
4
|
export default CheckboxSelect;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
import { OptionProps, OptionType } from '../types';
|
|
3
|
-
export declare const CheckboxOption:
|
|
3
|
+
export declare const CheckboxOption: <OptionT extends OptionType>(props: OptionProps<OptionT, true>) => JSX.Element;
|
|
4
4
|
export declare const RadioOption: FC<OptionProps>;
|
|
@@ -7,28 +7,28 @@ interface FilterOptionOption<Option> {
|
|
|
7
7
|
import { StylesConfig } from '../types';
|
|
8
8
|
import { ActionMeta, AriaLiveMessages, FormatOptionLabelMeta, GetOptionLabel, GetOptionValue, GroupBase, InputActionMeta, MenuPlacement, MenuPosition, OnChangeValue, Options, OptionsOrGroups, PropsValue, SelectComponentsConfig, ThemeConfig } from 'react-select';
|
|
9
9
|
interface NativeReactSelectProps<Option = unknown, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>> {
|
|
10
|
-
/**
|
|
10
|
+
/** Use this to provide a descriptive name for people who use assistive technology. */
|
|
11
11
|
'aria-label'?: string;
|
|
12
|
-
/** HTML ID of an element that should be used as the label (for assistive
|
|
12
|
+
/** HTML ID of an element that should be used as the label (for assistive technology). */
|
|
13
13
|
'aria-labelledby'?: string;
|
|
14
|
-
/** Identifies the element (or elements) that describes the object. By default this is associated with the placeholder. The value in this prop is additional to the label, not replacing the default. Use this to give additional information, hints, or examples about how to complete a field (for assistive
|
|
14
|
+
/** Identifies the element (or elements) that describes the object. By default this is associated with the placeholder. The value in this prop is additional to the label, not replacing the default. Use this to give additional information, hints, or examples about how to complete a field (for assistive technology). */
|
|
15
15
|
'aria-describedby'?: string;
|
|
16
|
-
/** Used to set the priority with which screen
|
|
16
|
+
/** Used to set the priority with which assistive technology like screen readers should treat updates to live regions. The possible settings are?: off, polite (default) or assertive. */
|
|
17
17
|
'aria-live'?: 'off' | 'polite' | 'assertive';
|
|
18
|
-
/** Customize the messages used by the aria-live component. See react-select v5.4.0 documentation for full details */
|
|
18
|
+
/** Customize the messages used by the aria-live component. See react-select v5.4.0 documentation for full details. */
|
|
19
19
|
ariaLiveMessages?: AriaLiveMessages<Option, IsMulti, Group>;
|
|
20
|
-
/** Focus the control when it is mounted */
|
|
20
|
+
/** Focus the control when it is mounted. */
|
|
21
21
|
autoFocus?: boolean;
|
|
22
|
-
/** Remove the currently focused option when the user presses backspace when Select isClearable or isMulti */
|
|
22
|
+
/** Remove the currently focused option when the user presses backspace when Select isClearable or isMulti. */
|
|
23
23
|
backspaceRemovesValue?: boolean;
|
|
24
|
-
/** Remove focus from the input when the user selects an option (handy for dismissing the keyboard on touch devices) */
|
|
24
|
+
/** Remove focus from the input when the user selects an option (handy for dismissing the keyboard on touch devices). */
|
|
25
25
|
blurInputOnSelect?: boolean;
|
|
26
|
-
/** When the user reaches the top/bottom of the menu, prevent scroll on the scroll-parent */
|
|
26
|
+
/** When the user reaches the top/bottom of the menu, prevent scroll on the scroll-parent. */
|
|
27
27
|
captureMenuScroll?: boolean;
|
|
28
|
-
/** Sets a className attribute on the outer component */
|
|
28
|
+
/** Sets a className attribute on the outer component. */
|
|
29
29
|
className?: string;
|
|
30
30
|
classNamePrefix?: string | null;
|
|
31
|
-
/** Close the select menu when the user selects an option */
|
|
31
|
+
/** Close the select menu when the user selects an option. */
|
|
32
32
|
closeMenuOnSelect?: boolean;
|
|
33
33
|
closeMenuOnScroll?: boolean | EventListener;
|
|
34
34
|
/**
|
|
@@ -39,123 +39,123 @@ interface NativeReactSelectProps<Option = unknown, IsMulti extends boolean = fal
|
|
|
39
39
|
components?: SelectComponentsConfig<Option, IsMulti, Group>;
|
|
40
40
|
/** Whether the value of the select, e.g. SingleValue, should be displayed in the control. */
|
|
41
41
|
controlShouldRenderValue?: boolean;
|
|
42
|
-
/** Delimiter used to join multiple values into a single HTML Input value */
|
|
42
|
+
/** Delimiter used to join multiple values into a single HTML Input value. */
|
|
43
43
|
delimiter?: string;
|
|
44
|
-
/** Clear all values when the user presses escape AND the menu is closed */
|
|
44
|
+
/** Clear all values when the user presses escape AND the menu is closed. */
|
|
45
45
|
escapeClearsValue?: boolean;
|
|
46
|
-
/** Custom method to filter whether an option should be displayed in the menu */
|
|
46
|
+
/** Custom method to filter whether an option should be displayed in the menu. */
|
|
47
47
|
filterOption?: ((option?: FilterOptionOption<Option>, inputValue?: string) => boolean) | null;
|
|
48
48
|
/** Formats group labels in the menu as React components. [Custom label example](/components/select/examples#customization). */
|
|
49
49
|
formatGroupLabel?: (group?: Group) => ReactNode;
|
|
50
|
-
/** Formats option labels in the menu and control as React components */
|
|
50
|
+
/** Formats option labels in the menu and control as React components. */
|
|
51
51
|
formatOptionLabel?: (data?: Option, formatOptionLabelMeta?: FormatOptionLabelMeta<Option>) => ReactNode;
|
|
52
52
|
/**
|
|
53
53
|
Resolves option data to a string to be displayed as the label by components.
|
|
54
54
|
|
|
55
|
-
Note
|
|
55
|
+
Note: Failure to resolve to a string type can interfere with filtering and assistive technology support.
|
|
56
56
|
*/
|
|
57
57
|
getOptionLabel?: GetOptionLabel<Option>;
|
|
58
|
-
/** Resolves option data to a string to compare options and specify value attributes */
|
|
58
|
+
/** Resolves option data to a string to compare options and specify value attributes. */
|
|
59
59
|
getOptionValue?: GetOptionValue<Option>;
|
|
60
|
-
/** Hide the selected option from the menu */
|
|
60
|
+
/** Hide the selected option from the menu. */
|
|
61
61
|
hideSelectedOptions?: boolean;
|
|
62
62
|
/** The id to set on the SelectContainer component. */
|
|
63
63
|
id?: string;
|
|
64
|
-
/** The value of the search input */
|
|
64
|
+
/** The value of the search input. */
|
|
65
65
|
inputValue?: string;
|
|
66
|
-
/** The id of the search input */
|
|
66
|
+
/** The id of the search input. */
|
|
67
67
|
inputId?: string;
|
|
68
|
-
/** Define an id prefix for the select components
|
|
68
|
+
/** Define an id prefix for the select components. For example, `{your-id}-value`. */
|
|
69
69
|
instanceId?: number | string;
|
|
70
|
-
/**
|
|
70
|
+
/** Sets whether the select value is clearable. */
|
|
71
71
|
isClearable?: boolean;
|
|
72
|
-
/**
|
|
72
|
+
/** Sets whether the select is disabled. */
|
|
73
73
|
isDisabled?: boolean;
|
|
74
|
-
/**
|
|
74
|
+
/** Sets whether the select is in a state of loading (async). */
|
|
75
75
|
isLoading?: boolean;
|
|
76
76
|
/**
|
|
77
77
|
Override the built-in logic to detect whether an option is disabled.
|
|
78
78
|
*/
|
|
79
79
|
isOptionDisabled?: (option?: Option, selectValue?: Options<Option>) => boolean;
|
|
80
|
-
/** Override the built-in logic to detect whether an option is selected */
|
|
80
|
+
/** Override the built-in logic to detect whether an option is selected. */
|
|
81
81
|
isOptionSelected?: (option?: Option, selectValue?: Options<Option>) => boolean;
|
|
82
|
-
/** Support multiple selected options */
|
|
82
|
+
/** Support multiple selected options. */
|
|
83
83
|
isMulti?: IsMulti;
|
|
84
|
-
/**
|
|
84
|
+
/** Sets if the select direction is right-to-left.*/
|
|
85
85
|
isRtl?: boolean;
|
|
86
|
-
/**
|
|
86
|
+
/** Sets whether to enable search functionality. */
|
|
87
87
|
isSearchable?: boolean;
|
|
88
|
-
/** Async
|
|
88
|
+
/** Async text to display when options are loading. */
|
|
89
89
|
loadingMessage?: (obj?: {
|
|
90
90
|
inputValue?: string;
|
|
91
91
|
}) => ReactNode;
|
|
92
|
-
/** Minimum height of the menu before flipping */
|
|
92
|
+
/** Minimum height of the menu before flipping. */
|
|
93
93
|
minMenuHeight?: number;
|
|
94
|
-
/** Maximum height of the menu before scrolling */
|
|
94
|
+
/** Maximum height of the menu before scrolling. */
|
|
95
95
|
maxMenuHeight?: number;
|
|
96
|
-
/**
|
|
96
|
+
/** Sets whether the menu is open. */
|
|
97
97
|
menuIsOpen?: boolean;
|
|
98
98
|
/** Default placement of the menu in relation to the control. 'auto' will flip when there isn't enough space below the control. */
|
|
99
99
|
menuPlacement?: MenuPlacement;
|
|
100
|
-
/** The CSS position value of the menu, when "fixed" extra layout management is required */
|
|
100
|
+
/** The CSS position value of the menu, when "fixed" extra layout management is required. */
|
|
101
101
|
menuPosition?: MenuPosition;
|
|
102
102
|
/** Whether the menu should use a portal, and where it should attach. */
|
|
103
103
|
menuPortalTarget?: HTMLElement | null;
|
|
104
|
-
/** Whether to block scroll events when the menu is open */
|
|
104
|
+
/** Whether to block scroll events when the menu is open. */
|
|
105
105
|
menuShouldBlockScroll?: boolean;
|
|
106
|
-
/** Whether the menu should be scrolled into view when it opens */
|
|
106
|
+
/** Whether the menu should be scrolled into view when it opens. */
|
|
107
107
|
menuShouldScrollIntoView?: boolean;
|
|
108
|
-
/** Name of the HTML Input (optional - without this, no input will be rendered) */
|
|
108
|
+
/** Name of the HTML Input (optional - without this, no input will be rendered). */
|
|
109
109
|
name?: string;
|
|
110
|
-
/** Text to display when there are no options */
|
|
110
|
+
/** Text to display when there are no options. */
|
|
111
111
|
noOptionsMessage?: (obj?: {
|
|
112
112
|
inputValue?: string;
|
|
113
113
|
}) => ReactNode;
|
|
114
|
-
/** Handle blur events on the control */
|
|
114
|
+
/** Handle blur events on the control. */
|
|
115
115
|
onBlur?: FocusEventHandler<HTMLInputElement>;
|
|
116
|
-
/** Handle change events on the select */
|
|
116
|
+
/** Handle change events on the select. */
|
|
117
117
|
onChange?: (newValue?: OnChangeValue<Option, IsMulti>, actionMeta?: ActionMeta<Option>) => void;
|
|
118
|
-
/** Handle focus events on the control */
|
|
118
|
+
/** Handle focus events on the control. */
|
|
119
119
|
onFocus?: FocusEventHandler<HTMLInputElement>;
|
|
120
|
-
/** Handle change events on the input */
|
|
120
|
+
/** Handle change events on the input. */
|
|
121
121
|
onInputChange?: (newValue?: string, actionMeta?: InputActionMeta) => void;
|
|
122
|
-
/** Handle key down events on the select */
|
|
122
|
+
/** Handle key down events on the select. */
|
|
123
123
|
onKeyDown?: KeyboardEventHandler<HTMLDivElement>;
|
|
124
|
-
/** Handle the menu opening */
|
|
124
|
+
/** Handle the menu opening. */
|
|
125
125
|
onMenuOpen?: () => void;
|
|
126
|
-
/** Handle the menu closing */
|
|
126
|
+
/** Handle the menu closing. */
|
|
127
127
|
onMenuClose?: () => void;
|
|
128
|
-
/** Fired when the user scrolls to the top of the menu */
|
|
128
|
+
/** Fired when the user scrolls to the top of the menu. */
|
|
129
129
|
onMenuScrollToTop?: (event?: WheelEvent | TouchEvent) => void;
|
|
130
|
-
/** Fired when the user scrolls to the bottom of the menu */
|
|
130
|
+
/** Fired when the user scrolls to the bottom of the menu. */
|
|
131
131
|
onMenuScrollToBottom?: (event?: WheelEvent | TouchEvent) => void;
|
|
132
|
-
/** Allows control of whether the menu is opened when the
|
|
132
|
+
/** Allows control of whether the menu is opened when the select is focused. */
|
|
133
133
|
openMenuOnFocus?: boolean;
|
|
134
|
-
/** Allows control of whether the menu is opened when the
|
|
134
|
+
/** Allows control of whether the menu is opened when the select is clicked. */
|
|
135
135
|
openMenuOnClick?: boolean;
|
|
136
|
-
/** Array of options that populate the select menu */
|
|
136
|
+
/** Array of options that populate the select menu. */
|
|
137
137
|
options?: OptionsOrGroups<Option, Group>;
|
|
138
|
-
/** Number of options to jump in menu when page{up|down} keys are used */
|
|
138
|
+
/** Number of options to jump in menu when page{up|down} keys are used. */
|
|
139
139
|
pageSize?: number;
|
|
140
|
-
/** Placeholder for the select value */
|
|
140
|
+
/** Placeholder for the select value. */
|
|
141
141
|
placeholder?: ReactNode;
|
|
142
|
-
/** Status to relay to screen readers */
|
|
142
|
+
/** Status to relay to screen readers. */
|
|
143
143
|
screenReaderStatus?: (obj?: {
|
|
144
144
|
count?: number;
|
|
145
145
|
}) => string;
|
|
146
146
|
/** Style modifier methods. */
|
|
147
147
|
styles?: StylesConfig;
|
|
148
|
-
/** Theme modifier method */
|
|
148
|
+
/** Theme modifier method. */
|
|
149
149
|
theme?: ThemeConfig;
|
|
150
|
-
/** Sets the tabIndex attribute on the input */
|
|
150
|
+
/** Sets the tabIndex attribute on the input. */
|
|
151
151
|
tabIndex?: number;
|
|
152
|
-
/** Select the currently focused option when the user presses tab */
|
|
152
|
+
/** Select the currently focused option when the user presses tab. */
|
|
153
153
|
tabSelectsValue?: boolean;
|
|
154
|
-
/** The value of the select; reflected by the selected option */
|
|
154
|
+
/** The value of the select; reflected by the selected option. */
|
|
155
155
|
value?: PropsValue<Option>;
|
|
156
|
-
/** Sets the form attribute on the input */
|
|
156
|
+
/** Sets the form attribute on the input. */
|
|
157
157
|
form?: string;
|
|
158
|
-
/** Marks the value-holding input as required for form validation */
|
|
158
|
+
/** Marks the value-holding input as required for form validation. */
|
|
159
159
|
required?: boolean;
|
|
160
160
|
}
|
|
161
161
|
export default function ertHackForSelect(_: NativeReactSelectProps): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/select",
|
|
3
|
-
"version": "17.
|
|
3
|
+
"version": "17.1.1",
|
|
4
4
|
"description": "Select allows users to make a single selection or multiple selections from a list of options.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -25,6 +25,9 @@
|
|
|
25
25
|
"atlassian": {
|
|
26
26
|
"team": "Design System Team",
|
|
27
27
|
"releaseModel": "continuous",
|
|
28
|
+
"productPushConsumption": [
|
|
29
|
+
"jira"
|
|
30
|
+
],
|
|
28
31
|
"website": {
|
|
29
32
|
"name": "Select",
|
|
30
33
|
"category": "Components"
|
|
@@ -38,12 +41,12 @@
|
|
|
38
41
|
".": "./src/index.tsx"
|
|
39
42
|
},
|
|
40
43
|
"dependencies": {
|
|
41
|
-
"@atlaskit/analytics-next": "^9.
|
|
44
|
+
"@atlaskit/analytics-next": "^9.2.0",
|
|
42
45
|
"@atlaskit/icon": "^22.0.0",
|
|
43
46
|
"@atlaskit/platform-feature-flags": "^0.2.0",
|
|
44
47
|
"@atlaskit/spinner": "^16.0.0",
|
|
45
48
|
"@atlaskit/theme": "^12.6.0",
|
|
46
|
-
"@atlaskit/tokens": "^1.
|
|
49
|
+
"@atlaskit/tokens": "^1.37.0",
|
|
47
50
|
"@atlaskit/visually-hidden": "^1.2.0",
|
|
48
51
|
"@babel/runtime": "^7.0.0",
|
|
49
52
|
"@emotion/react": "^11.7.1",
|