@atlaskit/select 17.0.4 → 17.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/select
2
2
 
3
+ ## 17.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#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
8
+
9
+ ## 17.0.5
10
+
11
+ ### Patch Changes
12
+
13
+ - [#69863](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/69863) [`6c9b587369cf`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/6c9b587369cf) - Support to add additional aria-describedby on select when isSearchable is false
14
+
3
15
  ## 17.0.4
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 CheckboxSelect = /*#__PURE__*/_react.default.memo(function (_ref) {
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;
@@ -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.0.4";
12
+ var packageVersion = "17.1.0";
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)({
@@ -76,6 +76,21 @@ function createSelect(WrappedComponent) {
76
76
  this.select.blur();
77
77
  }
78
78
  }
79
+ }, {
80
+ key: "componentDidMount",
81
+ value: function componentDidMount() {
82
+ var descriptionId = this.props['aria-describedby'];
83
+ if (!this.props.isSearchable && descriptionId) {
84
+ var _this$select;
85
+ // when isSearchable is false, react-select will create its own dummy input instead of using ours,
86
+ // so we need to manually add the additional aria-describedby using ref.
87
+ var input = (_this$select = this.select) === null || _this$select === void 0 ? void 0 : _this$select.inputRef;
88
+ var ariaDescribedby = input === null || input === void 0 ? void 0 : input.getAttribute('aria-describedby');
89
+ if (!(ariaDescribedby !== null && ariaDescribedby !== void 0 && ariaDescribedby.includes(descriptionId))) {
90
+ input === null || input === void 0 || input.setAttribute('aria-describedby', "".concat(ariaDescribedby, " ").concat(descriptionId));
91
+ }
92
+ }
93
+ }
79
94
  }, {
80
95
  key: "render",
81
96
  value: function render() {
@@ -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 CheckboxSelect = /*#__PURE__*/React.memo(({
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;
@@ -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.0.4";
5
+ const packageVersion = "17.1.0";
6
6
  export const SelectWithoutAnalytics = createSelect(Select);
7
7
  const createAndFireEventOnAtlaskit = createAndFireEvent('atlaskit');
8
8
  export default withAnalyticsContext({
@@ -44,6 +44,19 @@ export default function createSelect(WrappedComponent) {
44
44
  this.select.blur();
45
45
  }
46
46
  }
47
+ componentDidMount() {
48
+ const descriptionId = this.props['aria-describedby'];
49
+ if (!this.props.isSearchable && descriptionId) {
50
+ var _this$select;
51
+ // when isSearchable is false, react-select will create its own dummy input instead of using ours,
52
+ // so we need to manually add the additional aria-describedby using ref.
53
+ const input = (_this$select = this.select) === null || _this$select === void 0 ? void 0 : _this$select.inputRef;
54
+ const ariaDescribedby = input === null || input === void 0 ? void 0 : input.getAttribute('aria-describedby');
55
+ if (!(ariaDescribedby !== null && ariaDescribedby !== void 0 && ariaDescribedby.includes(descriptionId))) {
56
+ input === null || input === void 0 ? void 0 : input.setAttribute('aria-describedby', `${ariaDescribedby} ${descriptionId}`);
57
+ }
58
+ }
59
+ }
47
60
  render() {
48
61
  const {
49
62
  styles,
@@ -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 CheckboxSelect = /*#__PURE__*/React.memo(function (_ref) {
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;
@@ -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.0.4";
5
+ var packageVersion = "17.1.0";
6
6
  export var SelectWithoutAnalytics = createSelect(Select);
7
7
  var createAndFireEventOnAtlaskit = createAndFireEvent('atlaskit');
8
8
  export default withAnalyticsContext({
@@ -66,6 +66,21 @@ export default function createSelect(WrappedComponent) {
66
66
  this.select.blur();
67
67
  }
68
68
  }
69
+ }, {
70
+ key: "componentDidMount",
71
+ value: function componentDidMount() {
72
+ var descriptionId = this.props['aria-describedby'];
73
+ if (!this.props.isSearchable && descriptionId) {
74
+ var _this$select;
75
+ // when isSearchable is false, react-select will create its own dummy input instead of using ours,
76
+ // so we need to manually add the additional aria-describedby using ref.
77
+ var input = (_this$select = this.select) === null || _this$select === void 0 ? void 0 : _this$select.inputRef;
78
+ var ariaDescribedby = input === null || input === void 0 ? void 0 : input.getAttribute('aria-describedby');
79
+ if (!(ariaDescribedby !== null && ariaDescribedby !== void 0 && ariaDescribedby.includes(descriptionId))) {
80
+ input === null || input === void 0 || input.setAttribute('aria-describedby', "".concat(ariaDescribedby, " ").concat(descriptionId));
81
+ }
82
+ }
83
+ }
69
84
  }, {
70
85
  key: "render",
71
86
  value: function render() {
@@ -8,6 +8,7 @@ declare const _default: {
8
8
  focus(): void;
9
9
  blur(): void;
10
10
  onSelectRef: (ref: import("react-select/base").default<unknown, false, import("react-select").GroupBase<unknown>>) => void;
11
+ componentDidMount(): void;
11
12
  render(): JSX.Element;
12
13
  context: any;
13
14
  setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<import("./types").SelectProps<Option, IsMulti> | import("./types").AsyncSelectProps<Option, IsMulti> | import("./types").CreatableSelectProps<Option, IsMulti>>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
@@ -19,7 +20,6 @@ declare const _default: {
19
20
  refs: {
20
21
  [key: string]: import("react").ReactInstance;
21
22
  };
22
- componentDidMount?(): void;
23
23
  shouldComponentUpdate?(nextProps: Readonly<import("./types").SelectProps<Option, IsMulti> | import("./types").AsyncSelectProps<Option, IsMulti> | import("./types").CreatableSelectProps<Option, IsMulti>>, nextState: Readonly<{}>, nextContext: any): boolean;
24
24
  componentWillUnmount?(): void;
25
25
  componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
@@ -8,6 +8,7 @@ declare const _default: {
8
8
  focus(): void;
9
9
  blur(): void;
10
10
  onSelectRef: (ref: import("react-select/base").default<unknown, false, import("react-select").GroupBase<unknown>>) => void;
11
+ componentDidMount(): void;
11
12
  render(): JSX.Element;
12
13
  context: any;
13
14
  setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<import("./types").SelectProps<Option, IsMulti> | import("./types").AsyncSelectProps<Option, IsMulti> | import("./types").CreatableSelectProps<Option, IsMulti>>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
@@ -19,7 +20,6 @@ declare const _default: {
19
20
  refs: {
20
21
  [key: string]: import("react").ReactInstance;
21
22
  };
22
- componentDidMount?(): void;
23
23
  shouldComponentUpdate?(nextProps: Readonly<import("./types").SelectProps<Option, IsMulti> | import("./types").AsyncSelectProps<Option, IsMulti> | import("./types").CreatableSelectProps<Option, IsMulti>>, nextState: Readonly<{}>, nextContext: any): boolean;
24
24
  componentWillUnmount?(): void;
25
25
  componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  import { SelectProps, OptionType } from './types';
3
- declare const CheckboxSelect: React.MemoExoticComponent<({ components, ...props }: SelectProps<OptionType, true>) => JSX.Element>;
3
+ declare const CheckboxSelect: <OptionT extends OptionType>({ components, ...props }: SelectProps<OptionT, true>) => JSX.Element;
4
4
  export default CheckboxSelect;
@@ -8,6 +8,7 @@ declare const _default: {
8
8
  focus(): void;
9
9
  blur(): void;
10
10
  onSelectRef: (ref: import("react-select/base").default<unknown, false, import("react-select").GroupBase<unknown>>) => void;
11
+ componentDidMount(): void;
11
12
  render(): JSX.Element;
12
13
  context: any;
13
14
  setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<import("./types").SelectProps<Option, IsMulti> | import("./types").AsyncSelectProps<Option, IsMulti> | import("./types").CreatableSelectProps<Option, IsMulti>>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
@@ -19,7 +20,6 @@ declare const _default: {
19
20
  refs: {
20
21
  [key: string]: import("react").ReactInstance;
21
22
  };
22
- componentDidMount?(): void;
23
23
  shouldComponentUpdate?(nextProps: Readonly<import("./types").SelectProps<Option, IsMulti> | import("./types").AsyncSelectProps<Option, IsMulti> | import("./types").CreatableSelectProps<Option, IsMulti>>, nextState: Readonly<{}>, nextContext: any): boolean;
24
24
  componentWillUnmount?(): void;
25
25
  componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
@@ -8,6 +8,7 @@ export declare const SelectWithoutAnalytics: {
8
8
  focus(): void;
9
9
  blur(): void;
10
10
  onSelectRef: (ref: import("react-select/base").default<unknown, false, import("react-select").GroupBase<unknown>>) => void;
11
+ componentDidMount(): void;
11
12
  render(): JSX.Element;
12
13
  context: any;
13
14
  setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<import("./types").SelectProps<Option, IsMulti> | import("./types").AsyncSelectProps<Option, IsMulti> | import("./types").CreatableSelectProps<Option, IsMulti>>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
@@ -19,7 +20,6 @@ export declare const SelectWithoutAnalytics: {
19
20
  refs: {
20
21
  [key: string]: import("react").ReactInstance;
21
22
  };
22
- componentDidMount?(): void;
23
23
  shouldComponentUpdate?(nextProps: Readonly<import("./types").SelectProps<Option, IsMulti> | import("./types").AsyncSelectProps<Option, IsMulti> | import("./types").CreatableSelectProps<Option, IsMulti>>, nextState: Readonly<{}>, nextContext: any): boolean;
24
24
  componentWillUnmount?(): void;
25
25
  componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
@@ -52,6 +52,7 @@ declare const _default: {
52
52
  focus(): void;
53
53
  blur(): void;
54
54
  onSelectRef: (ref: import("react-select/base").default<unknown, false, import("react-select").GroupBase<unknown>>) => void;
55
+ componentDidMount(): void;
55
56
  render(): JSX.Element;
56
57
  context: any;
57
58
  setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<import("./types").SelectProps<Option, IsMulti> | import("./types").AsyncSelectProps<Option, IsMulti> | import("./types").CreatableSelectProps<Option, IsMulti>>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
@@ -63,7 +64,6 @@ declare const _default: {
63
64
  refs: {
64
65
  [key: string]: import("react").ReactInstance;
65
66
  };
66
- componentDidMount?(): void;
67
67
  shouldComponentUpdate?(nextProps: Readonly<import("./types").SelectProps<Option, IsMulti> | import("./types").AsyncSelectProps<Option, IsMulti> | import("./types").CreatableSelectProps<Option, IsMulti>>, nextState: Readonly<{}>, nextContext: any): boolean;
68
68
  componentWillUnmount?(): void;
69
69
  componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
@@ -1,4 +1,4 @@
1
1
  import { FC } from 'react';
2
2
  import { OptionProps, OptionType } from '../types';
3
- export declare const CheckboxOption: FC<OptionProps<OptionType, true>>;
3
+ export declare const CheckboxOption: <OptionT extends OptionType>(props: OptionProps<OptionT, true>) => JSX.Element;
4
4
  export declare const RadioOption: FC<OptionProps>;
@@ -11,6 +11,7 @@ export default function createSelect(WrappedComponent: ComponentType<any>): {
11
11
  focus(): void;
12
12
  blur(): void;
13
13
  onSelectRef: (ref: BaseSelect) => void;
14
+ componentDidMount(): void;
14
15
  render(): JSX.Element;
15
16
  context: any;
16
17
  setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<SelectProps<Option, IsMulti> | AsyncSelectProps<Option, IsMulti> | CreatableSelectProps<Option, IsMulti>>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
@@ -22,7 +23,6 @@ export default function createSelect(WrappedComponent: ComponentType<any>): {
22
23
  refs: {
23
24
  [key: string]: React.ReactInstance;
24
25
  };
25
- componentDidMount?(): void;
26
26
  shouldComponentUpdate?(nextProps: Readonly<SelectProps<Option, IsMulti> | AsyncSelectProps<Option, IsMulti> | CreatableSelectProps<Option, IsMulti>>, nextState: Readonly<{}>, nextContext: any): boolean;
27
27
  componentWillUnmount?(): void;
28
28
  componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
@@ -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
- /** Aria label (for assistive tech) */
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 tech) */
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 tech). */
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 reader should treat updates to live regions. The possible settings are?: off, polite (default) or assertive */
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?: Failure to resolve to a string type can interfere with filtering and screen reader support.
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 e.g. {your-id}-value */
68
+ /** Define an id prefix for the select components. For example, `{your-id}-value`. */
69
69
  instanceId?: number | string;
70
- /** Is the select value clearable */
70
+ /** Sets whether the select value is clearable. */
71
71
  isClearable?: boolean;
72
- /** Is the select disabled */
72
+ /** Sets whether the select is disabled. */
73
73
  isDisabled?: boolean;
74
- /** Is the select in a state of loading (async) */
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
- /** Is the select direction right-to-left */
84
+ /** Sets if the select direction is right-to-left.*/
85
85
  isRtl?: boolean;
86
- /** Whether to enable search functionality */
86
+ /** Sets whether to enable search functionality. */
87
87
  isSearchable?: boolean;
88
- /** Async?: Text to display when loading options */
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
- /** Whether the menu is open */
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 Select is focused */
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 Select is clicked */
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;
@@ -8,6 +8,7 @@ declare const _default: {
8
8
  focus(): void;
9
9
  blur(): void;
10
10
  onSelectRef: (ref: import("react-select/base").default<unknown, false, import("react-select").GroupBase<unknown>>) => void;
11
+ componentDidMount(): void;
11
12
  render(): JSX.Element;
12
13
  context: any;
13
14
  setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<import("./types").SelectProps<Option, IsMulti> | import("./types").AsyncSelectProps<Option, IsMulti> | import("./types").CreatableSelectProps<Option, IsMulti>>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
@@ -19,7 +20,6 @@ declare const _default: {
19
20
  refs: {
20
21
  [key: string]: import("react").ReactInstance;
21
22
  };
22
- componentDidMount?(): void;
23
23
  shouldComponentUpdate?(nextProps: Readonly<import("./types").SelectProps<Option, IsMulti> | import("./types").AsyncSelectProps<Option, IsMulti> | import("./types").CreatableSelectProps<Option, IsMulti>>, nextState: Readonly<{}>, nextContext: any): boolean;
24
24
  componentWillUnmount?(): void;
25
25
  componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
@@ -8,6 +8,7 @@ declare const _default: {
8
8
  focus(): void;
9
9
  blur(): void;
10
10
  onSelectRef: (ref: import("react-select/base").default<unknown, false, import("react-select").GroupBase<unknown>>) => void;
11
+ componentDidMount(): void;
11
12
  render(): JSX.Element;
12
13
  context: any;
13
14
  setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<import("./types").SelectProps<Option, IsMulti> | import("./types").AsyncSelectProps<Option, IsMulti> | import("./types").CreatableSelectProps<Option, IsMulti>>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
@@ -19,7 +20,6 @@ declare const _default: {
19
20
  refs: {
20
21
  [key: string]: import("react").ReactInstance;
21
22
  };
22
- componentDidMount?(): void;
23
23
  shouldComponentUpdate?(nextProps: Readonly<import("./types").SelectProps<Option, IsMulti> | import("./types").AsyncSelectProps<Option, IsMulti> | import("./types").CreatableSelectProps<Option, IsMulti>>, nextState: Readonly<{}>, nextContext: any): boolean;
24
24
  componentWillUnmount?(): void;
25
25
  componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  import { SelectProps, OptionType } from './types';
3
- declare const CheckboxSelect: React.MemoExoticComponent<({ components, ...props }: SelectProps<OptionType, true>) => JSX.Element>;
3
+ declare const CheckboxSelect: <OptionT extends OptionType>({ components, ...props }: SelectProps<OptionT, true>) => JSX.Element;
4
4
  export default CheckboxSelect;
@@ -8,6 +8,7 @@ declare const _default: {
8
8
  focus(): void;
9
9
  blur(): void;
10
10
  onSelectRef: (ref: import("react-select/base").default<unknown, false, import("react-select").GroupBase<unknown>>) => void;
11
+ componentDidMount(): void;
11
12
  render(): JSX.Element;
12
13
  context: any;
13
14
  setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<import("./types").SelectProps<Option, IsMulti> | import("./types").AsyncSelectProps<Option, IsMulti> | import("./types").CreatableSelectProps<Option, IsMulti>>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
@@ -19,7 +20,6 @@ declare const _default: {
19
20
  refs: {
20
21
  [key: string]: import("react").ReactInstance;
21
22
  };
22
- componentDidMount?(): void;
23
23
  shouldComponentUpdate?(nextProps: Readonly<import("./types").SelectProps<Option, IsMulti> | import("./types").AsyncSelectProps<Option, IsMulti> | import("./types").CreatableSelectProps<Option, IsMulti>>, nextState: Readonly<{}>, nextContext: any): boolean;
24
24
  componentWillUnmount?(): void;
25
25
  componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
@@ -8,6 +8,7 @@ export declare const SelectWithoutAnalytics: {
8
8
  focus(): void;
9
9
  blur(): void;
10
10
  onSelectRef: (ref: import("react-select/base").default<unknown, false, import("react-select").GroupBase<unknown>>) => void;
11
+ componentDidMount(): void;
11
12
  render(): JSX.Element;
12
13
  context: any;
13
14
  setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<import("./types").SelectProps<Option, IsMulti> | import("./types").AsyncSelectProps<Option, IsMulti> | import("./types").CreatableSelectProps<Option, IsMulti>>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
@@ -19,7 +20,6 @@ export declare const SelectWithoutAnalytics: {
19
20
  refs: {
20
21
  [key: string]: import("react").ReactInstance;
21
22
  };
22
- componentDidMount?(): void;
23
23
  shouldComponentUpdate?(nextProps: Readonly<import("./types").SelectProps<Option, IsMulti> | import("./types").AsyncSelectProps<Option, IsMulti> | import("./types").CreatableSelectProps<Option, IsMulti>>, nextState: Readonly<{}>, nextContext: any): boolean;
24
24
  componentWillUnmount?(): void;
25
25
  componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
@@ -52,6 +52,7 @@ declare const _default: {
52
52
  focus(): void;
53
53
  blur(): void;
54
54
  onSelectRef: (ref: import("react-select/base").default<unknown, false, import("react-select").GroupBase<unknown>>) => void;
55
+ componentDidMount(): void;
55
56
  render(): JSX.Element;
56
57
  context: any;
57
58
  setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<import("./types").SelectProps<Option, IsMulti> | import("./types").AsyncSelectProps<Option, IsMulti> | import("./types").CreatableSelectProps<Option, IsMulti>>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
@@ -63,7 +64,6 @@ declare const _default: {
63
64
  refs: {
64
65
  [key: string]: import("react").ReactInstance;
65
66
  };
66
- componentDidMount?(): void;
67
67
  shouldComponentUpdate?(nextProps: Readonly<import("./types").SelectProps<Option, IsMulti> | import("./types").AsyncSelectProps<Option, IsMulti> | import("./types").CreatableSelectProps<Option, IsMulti>>, nextState: Readonly<{}>, nextContext: any): boolean;
68
68
  componentWillUnmount?(): void;
69
69
  componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
@@ -1,4 +1,4 @@
1
1
  import { FC } from 'react';
2
2
  import { OptionProps, OptionType } from '../types';
3
- export declare const CheckboxOption: FC<OptionProps<OptionType, true>>;
3
+ export declare const CheckboxOption: <OptionT extends OptionType>(props: OptionProps<OptionT, true>) => JSX.Element;
4
4
  export declare const RadioOption: FC<OptionProps>;
@@ -11,6 +11,7 @@ export default function createSelect(WrappedComponent: ComponentType<any>): {
11
11
  focus(): void;
12
12
  blur(): void;
13
13
  onSelectRef: (ref: BaseSelect) => void;
14
+ componentDidMount(): void;
14
15
  render(): JSX.Element;
15
16
  context: any;
16
17
  setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<SelectProps<Option, IsMulti> | AsyncSelectProps<Option, IsMulti> | CreatableSelectProps<Option, IsMulti>>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
@@ -22,7 +23,6 @@ export default function createSelect(WrappedComponent: ComponentType<any>): {
22
23
  refs: {
23
24
  [key: string]: React.ReactInstance;
24
25
  };
25
- componentDidMount?(): void;
26
26
  shouldComponentUpdate?(nextProps: Readonly<SelectProps<Option, IsMulti> | AsyncSelectProps<Option, IsMulti> | CreatableSelectProps<Option, IsMulti>>, nextState: Readonly<{}>, nextContext: any): boolean;
27
27
  componentWillUnmount?(): void;
28
28
  componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
@@ -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
- /** Aria label (for assistive tech) */
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 tech) */
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 tech). */
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 reader should treat updates to live regions. The possible settings are?: off, polite (default) or assertive */
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?: Failure to resolve to a string type can interfere with filtering and screen reader support.
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 e.g. {your-id}-value */
68
+ /** Define an id prefix for the select components. For example, `{your-id}-value`. */
69
69
  instanceId?: number | string;
70
- /** Is the select value clearable */
70
+ /** Sets whether the select value is clearable. */
71
71
  isClearable?: boolean;
72
- /** Is the select disabled */
72
+ /** Sets whether the select is disabled. */
73
73
  isDisabled?: boolean;
74
- /** Is the select in a state of loading (async) */
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
- /** Is the select direction right-to-left */
84
+ /** Sets if the select direction is right-to-left.*/
85
85
  isRtl?: boolean;
86
- /** Whether to enable search functionality */
86
+ /** Sets whether to enable search functionality. */
87
87
  isSearchable?: boolean;
88
- /** Async?: Text to display when loading options */
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
- /** Whether the menu is open */
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 Select is focused */
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 Select is clicked */
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.0.4",
3
+ "version": "17.1.0",
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/"
@@ -38,12 +38,12 @@
38
38
  ".": "./src/index.tsx"
39
39
  },
40
40
  "dependencies": {
41
- "@atlaskit/analytics-next": "^9.1.0",
41
+ "@atlaskit/analytics-next": "^9.2.0",
42
42
  "@atlaskit/icon": "^22.0.0",
43
43
  "@atlaskit/platform-feature-flags": "^0.2.0",
44
44
  "@atlaskit/spinner": "^16.0.0",
45
45
  "@atlaskit/theme": "^12.6.0",
46
- "@atlaskit/tokens": "^1.30.0",
46
+ "@atlaskit/tokens": "^1.37.0",
47
47
  "@atlaskit/visually-hidden": "^1.2.0",
48
48
  "@babel/runtime": "^7.0.0",
49
49
  "@emotion/react": "^11.7.1",
@@ -67,7 +67,6 @@
67
67
  "@af/integration-testing": "*",
68
68
  "@atlaskit/ssr": "*",
69
69
  "@atlaskit/visual-regression": "*",
70
- "@atlaskit/webdriver-runner": "*",
71
70
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
72
71
  "@atlassian/feature-flags-test-utils": "*",
73
72
  "@emotion/styled": "^11.0.0",