@atlaskit/select 17.11.3 → 17.11.6

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.
Files changed (34) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/cjs/Select.js +1 -1
  3. package/dist/es2019/Select.js +1 -1
  4. package/dist/esm/Select.js +1 -1
  5. package/dist/types/index.d.ts +1 -1
  6. package/dist/types/types.d.ts +2 -2
  7. package/dist/types-ts4.5/index.d.ts +1 -1
  8. package/dist/types-ts4.5/types.d.ts +2 -2
  9. package/package.json +5 -4
  10. package/dist/cjs/extract-react-types/ert.js +0 -7
  11. package/dist/cjs/extract-react-types/react-popper-props.js +0 -9
  12. package/dist/cjs/extract-react-types/react-select-async.js +0 -9
  13. package/dist/cjs/extract-react-types/react-select-creatable.js +0 -9
  14. package/dist/cjs/extract-react-types/react-select-props.js +0 -9
  15. package/dist/es2019/extract-react-types/ert.js +0 -1
  16. package/dist/es2019/extract-react-types/react-popper-props.js +0 -3
  17. package/dist/es2019/extract-react-types/react-select-async.js +0 -3
  18. package/dist/es2019/extract-react-types/react-select-creatable.js +0 -3
  19. package/dist/es2019/extract-react-types/react-select-props.js +0 -3
  20. package/dist/esm/extract-react-types/ert.js +0 -1
  21. package/dist/esm/extract-react-types/react-popper-props.js +0 -3
  22. package/dist/esm/extract-react-types/react-select-async.js +0 -3
  23. package/dist/esm/extract-react-types/react-select-creatable.js +0 -3
  24. package/dist/esm/extract-react-types/react-select-props.js +0 -3
  25. package/dist/types/extract-react-types/ert.d.ts +0 -2
  26. package/dist/types/extract-react-types/react-popper-props.d.ts +0 -21
  27. package/dist/types/extract-react-types/react-select-async.d.ts +0 -24
  28. package/dist/types/extract-react-types/react-select-creatable.d.ts +0 -38
  29. package/dist/types/extract-react-types/react-select-props.d.ts +0 -163
  30. package/dist/types-ts4.5/extract-react-types/ert.d.ts +0 -2
  31. package/dist/types-ts4.5/extract-react-types/react-popper-props.d.ts +0 -21
  32. package/dist/types-ts4.5/extract-react-types/react-select-async.d.ts +0 -24
  33. package/dist/types-ts4.5/extract-react-types/react-select-creatable.d.ts +0 -38
  34. package/dist/types-ts4.5/extract-react-types/react-select-props.d.ts +0 -163
package/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # @atlaskit/select
2
2
 
3
+ ## 17.11.6
4
+
5
+ ### Patch Changes
6
+
7
+ - [#118744](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/118744)
8
+ [`998268697de7d`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/998268697de7d) -
9
+ Remove remnants of `extract-react-types`.
10
+
11
+ ## 17.11.5
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies
16
+
17
+ ## 17.11.4
18
+
19
+ ### Patch Changes
20
+
21
+ - Updated dependencies
22
+
3
23
  ## 17.11.3
4
24
 
5
25
  ### Patch Changes
@@ -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.11.3";
12
+ var packageVersion = "17.11.6";
13
13
  var SelectWithoutAnalytics = exports.SelectWithoutAnalytics = (0, _createSelect.default)(_reactSelect.default);
14
14
  var createAndFireEventOnAtlaskit = (0, _analyticsNext.createAndFireEvent)('atlaskit');
15
15
  var Select = (0, _analyticsNext.withAnalyticsContext)({
@@ -2,7 +2,7 @@ import ReactSelect 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.11.3";
5
+ const packageVersion = "17.11.6";
6
6
  export const SelectWithoutAnalytics = createSelect(ReactSelect);
7
7
  const createAndFireEventOnAtlaskit = createAndFireEvent('atlaskit');
8
8
  const Select = withAnalyticsContext({
@@ -2,7 +2,7 @@ import ReactSelect 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.11.3";
5
+ var packageVersion = "17.11.6";
6
6
  export var SelectWithoutAnalytics = createSelect(ReactSelect);
7
7
  var createAndFireEventOnAtlaskit = createAndFireEvent('atlaskit');
8
8
  var Select = withAnalyticsContext({
@@ -12,7 +12,7 @@ export { default as CountrySelect } from './CountrySelect';
12
12
  export { default as RadioSelect } from './RadioSelect';
13
13
  export { default as PopupSelect } from './PopupSelect';
14
14
  export type { PopupSelectProps, ModifierList } from './PopupSelect';
15
- export type { SelectInstance, ActionMeta, ControlProps, FormatOptionLabelMeta, InputActionMeta, InputProps, MenuProps, MenuListComponentProps, OptionProps, OptionsType, OptionType, SelectComponentsConfig, SelectProps, StylesConfig, ValueContainerProps, ValueType, GroupedOptionsType, GroupType, ClearIndicatorProps, DropdownIndicatorProps, IndicatorSeparatorProps, LoadingIndicatorProps, MultiValueProps, MultiValueRemoveProps, ReactSelectProps, SingleValueProps, NoticeProps, ValidationState, GroupProps, AsyncSelectProps, PlaceholderProps, } from './types';
15
+ export type { SelectInstance, ActionMeta, ControlProps, FormatOptionLabelMeta, InputActionMeta, InputProps, MenuProps, MenuListComponentProps, OptionProps, OptionsType, OptionType, SelectComponentsConfig, SelectProps, StylesConfig, ValueContainerProps, ValueType, GroupedOptionsType, GroupType, ClearIndicatorProps, DropdownIndicatorProps, IndicatorSeparatorProps, LoadingIndicatorProps, MultiValueProps, MultiValueRemoveProps, ReactSelectProps, SingleValueProps, NoticeProps, ValidationState, GroupProps, AsyncSelectProps, PlaceholderProps, AriaOnFocusProps, } from './types';
16
16
  /**
17
17
  * Types not exported on the public API, didn't find usages in sourcegraph
18
18
  *
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { type WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
3
- import { type SelectInstance, type Props as ReactSelectProps, type FormatOptionLabelMeta, type OnChangeValue as RSValueType, type ActionMeta as RSActionMeta, type GroupBase as GroupType, type Options as RSOptionsType, type SelectComponentsConfig as RSSelectComponentsConfig, type StylesConfig as RSStylesConfig, type InputActionMeta, type ClearIndicatorProps, type DropdownIndicatorProps, type IndicatorSeparatorProps, type LoadingIndicatorProps, type NoticeProps, type ControlProps as RSControlProps, type GroupProps as RSGroupProps, type InputProps, type MenuProps as RSMenuProps, type MenuListProps as RSMenuListComponentProps, type MultiValueProps, type OptionProps as ReactSelectOptionProps, type PlaceholderProps as RSPlaceholderProps, type SingleValueProps, type ValueContainerProps as RSValueContainerProps, type MultiValueRemoveProps } from 'react-select';
3
+ import { type SelectInstance, type Props as ReactSelectProps, type FormatOptionLabelMeta, type OnChangeValue as RSValueType, type ActionMeta as RSActionMeta, type GroupBase as GroupType, type Options as RSOptionsType, type SelectComponentsConfig as RSSelectComponentsConfig, type StylesConfig as RSStylesConfig, type InputActionMeta, type ClearIndicatorProps, type DropdownIndicatorProps, type IndicatorSeparatorProps, type LoadingIndicatorProps, type NoticeProps, type ControlProps as RSControlProps, type GroupProps as RSGroupProps, type InputProps, type MenuProps as RSMenuProps, type MenuListProps as RSMenuListComponentProps, type MultiValueProps, type OptionProps as ReactSelectOptionProps, type PlaceholderProps as RSPlaceholderProps, type SingleValueProps, type ValueContainerProps as RSValueContainerProps, type MultiValueRemoveProps, type AriaOnFocusProps } from 'react-select';
4
4
  import type BaseSelect from 'react-select/base';
5
5
  import { type AsyncProps } from 'react-select/async';
6
6
  import { type CreatableProps } from 'react-select/creatable';
@@ -64,7 +64,7 @@ export type AtlaskitSelectRefType = {
64
64
  blur: () => void;
65
65
  focus: () => void;
66
66
  };
67
- export type { SelectInstance, FormatOptionLabelMeta, InputActionMeta, GroupType, InputProps, MultiValueProps, ReactSelectProps, SingleValueProps, ClearIndicatorProps, DropdownIndicatorProps, IndicatorSeparatorProps, LoadingIndicatorProps, NoticeProps, MultiValueRemoveProps, };
67
+ export type { SelectInstance, FormatOptionLabelMeta, InputActionMeta, GroupType, InputProps, MultiValueProps, ReactSelectProps, SingleValueProps, ClearIndicatorProps, DropdownIndicatorProps, IndicatorSeparatorProps, LoadingIndicatorProps, NoticeProps, MultiValueRemoveProps, AriaOnFocusProps, };
68
68
  declare module 'react-select/base' {
69
69
  interface Props<Option, IsMulti extends boolean, Group extends GroupType<Option>> {
70
70
  [key: string]: any;
@@ -12,7 +12,7 @@ export { default as CountrySelect } from './CountrySelect';
12
12
  export { default as RadioSelect } from './RadioSelect';
13
13
  export { default as PopupSelect } from './PopupSelect';
14
14
  export type { PopupSelectProps, ModifierList } from './PopupSelect';
15
- export type { SelectInstance, ActionMeta, ControlProps, FormatOptionLabelMeta, InputActionMeta, InputProps, MenuProps, MenuListComponentProps, OptionProps, OptionsType, OptionType, SelectComponentsConfig, SelectProps, StylesConfig, ValueContainerProps, ValueType, GroupedOptionsType, GroupType, ClearIndicatorProps, DropdownIndicatorProps, IndicatorSeparatorProps, LoadingIndicatorProps, MultiValueProps, MultiValueRemoveProps, ReactSelectProps, SingleValueProps, NoticeProps, ValidationState, GroupProps, AsyncSelectProps, PlaceholderProps, } from './types';
15
+ export type { SelectInstance, ActionMeta, ControlProps, FormatOptionLabelMeta, InputActionMeta, InputProps, MenuProps, MenuListComponentProps, OptionProps, OptionsType, OptionType, SelectComponentsConfig, SelectProps, StylesConfig, ValueContainerProps, ValueType, GroupedOptionsType, GroupType, ClearIndicatorProps, DropdownIndicatorProps, IndicatorSeparatorProps, LoadingIndicatorProps, MultiValueProps, MultiValueRemoveProps, ReactSelectProps, SingleValueProps, NoticeProps, ValidationState, GroupProps, AsyncSelectProps, PlaceholderProps, AriaOnFocusProps, } from './types';
16
16
  /**
17
17
  * Types not exported on the public API, didn't find usages in sourcegraph
18
18
  *
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { type WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
3
- import { type SelectInstance, type Props as ReactSelectProps, type FormatOptionLabelMeta, type OnChangeValue as RSValueType, type ActionMeta as RSActionMeta, type GroupBase as GroupType, type Options as RSOptionsType, type SelectComponentsConfig as RSSelectComponentsConfig, type StylesConfig as RSStylesConfig, type InputActionMeta, type ClearIndicatorProps, type DropdownIndicatorProps, type IndicatorSeparatorProps, type LoadingIndicatorProps, type NoticeProps, type ControlProps as RSControlProps, type GroupProps as RSGroupProps, type InputProps, type MenuProps as RSMenuProps, type MenuListProps as RSMenuListComponentProps, type MultiValueProps, type OptionProps as ReactSelectOptionProps, type PlaceholderProps as RSPlaceholderProps, type SingleValueProps, type ValueContainerProps as RSValueContainerProps, type MultiValueRemoveProps } from 'react-select';
3
+ import { type SelectInstance, type Props as ReactSelectProps, type FormatOptionLabelMeta, type OnChangeValue as RSValueType, type ActionMeta as RSActionMeta, type GroupBase as GroupType, type Options as RSOptionsType, type SelectComponentsConfig as RSSelectComponentsConfig, type StylesConfig as RSStylesConfig, type InputActionMeta, type ClearIndicatorProps, type DropdownIndicatorProps, type IndicatorSeparatorProps, type LoadingIndicatorProps, type NoticeProps, type ControlProps as RSControlProps, type GroupProps as RSGroupProps, type InputProps, type MenuProps as RSMenuProps, type MenuListProps as RSMenuListComponentProps, type MultiValueProps, type OptionProps as ReactSelectOptionProps, type PlaceholderProps as RSPlaceholderProps, type SingleValueProps, type ValueContainerProps as RSValueContainerProps, type MultiValueRemoveProps, type AriaOnFocusProps } from 'react-select';
4
4
  import type BaseSelect from 'react-select/base';
5
5
  import { type AsyncProps } from 'react-select/async';
6
6
  import { type CreatableProps } from 'react-select/creatable';
@@ -64,7 +64,7 @@ export type AtlaskitSelectRefType = {
64
64
  blur: () => void;
65
65
  focus: () => void;
66
66
  };
67
- export type { SelectInstance, FormatOptionLabelMeta, InputActionMeta, GroupType, InputProps, MultiValueProps, ReactSelectProps, SingleValueProps, ClearIndicatorProps, DropdownIndicatorProps, IndicatorSeparatorProps, LoadingIndicatorProps, NoticeProps, MultiValueRemoveProps, };
67
+ export type { SelectInstance, FormatOptionLabelMeta, InputActionMeta, GroupType, InputProps, MultiValueProps, ReactSelectProps, SingleValueProps, ClearIndicatorProps, DropdownIndicatorProps, IndicatorSeparatorProps, LoadingIndicatorProps, NoticeProps, MultiValueRemoveProps, AriaOnFocusProps, };
68
68
  declare module 'react-select/base' {
69
69
  interface Props<Option, IsMulti extends boolean, Group extends GroupType<Option>> {
70
70
  [key: string]: any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/select",
3
- "version": "17.11.3",
3
+ "version": "17.11.6",
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/"
@@ -43,9 +43,9 @@
43
43
  },
44
44
  "dependencies": {
45
45
  "@atlaskit/analytics-next": "^9.3.0",
46
- "@atlaskit/icon": "^22.5.0",
47
- "@atlaskit/platform-feature-flags": "^0.2.0",
48
- "@atlaskit/primitives": "^9.0.0",
46
+ "@atlaskit/icon": "^22.6.0",
47
+ "@atlaskit/platform-feature-flags": "^0.3.0",
48
+ "@atlaskit/primitives": "^11.0.0",
49
49
  "@atlaskit/spinner": "^16.2.0",
50
50
  "@atlaskit/theme": "^12.11.0",
51
51
  "@atlaskit/tokens": "^1.53.0",
@@ -84,6 +84,7 @@
84
84
  "jscodeshift": "^0.13.0",
85
85
  "react-dom": "^16.8.0",
86
86
  "react-select-event": "^5.5.0",
87
+ "react-test-renderer": "^16.8.0",
87
88
  "react-value": "^0.2.0",
88
89
  "typescript": "~5.4.2",
89
90
  "wait-for-expect": "^1.2.0"
@@ -1,7 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = ertHackForSelect;
7
- function ertHackForSelect(_) {}
@@ -1,9 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = ertHackForPopper;
7
- // this is to DOCUMENT/display the underlying react popper props, for our atlaskit/select documentation
8
-
9
- function ertHackForPopper(_) {}
@@ -1,9 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = ertHackForPopper;
7
- // for documentation ONLY
8
-
9
- function ertHackForPopper(_) {}
@@ -1,9 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = ertHackForSelect;
7
- // for documentation purposes ONLY
8
-
9
- function ertHackForSelect(_) {}
@@ -1,9 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = ertHackForSelect;
7
- // this is to DOCUMENT/display the underlying react select props, for our atlaskit/select documentation
8
-
9
- function ertHackForSelect(_) {}
@@ -1 +0,0 @@
1
- export default function ertHackForSelect(_) {}
@@ -1,3 +0,0 @@
1
- // this is to DOCUMENT/display the underlying react popper props, for our atlaskit/select documentation
2
-
3
- export default function ertHackForPopper(_) {}
@@ -1,3 +0,0 @@
1
- // for documentation ONLY
2
-
3
- export default function ertHackForPopper(_) {}
@@ -1,3 +0,0 @@
1
- // for documentation purposes ONLY
2
-
3
- export default function ertHackForSelect(_) {}
@@ -1,3 +0,0 @@
1
- // this is to DOCUMENT/display the underlying react select props, for our atlaskit/select documentation
2
-
3
- export default function ertHackForSelect(_) {}
@@ -1 +0,0 @@
1
- export default function ertHackForSelect(_) {}
@@ -1,3 +0,0 @@
1
- // this is to DOCUMENT/display the underlying react popper props, for our atlaskit/select documentation
2
-
3
- export default function ertHackForPopper(_) {}
@@ -1,3 +0,0 @@
1
- // for documentation ONLY
2
-
3
- export default function ertHackForPopper(_) {}
@@ -1,3 +0,0 @@
1
- // for documentation purposes ONLY
2
-
3
- export default function ertHackForSelect(_) {}
@@ -1,3 +0,0 @@
1
- // this is to DOCUMENT/display the underlying react select props, for our atlaskit/select documentation
2
-
3
- export default function ertHackForSelect(_) {}
@@ -1,2 +0,0 @@
1
- import { type SelectProps, type OptionType } from '../types';
2
- export default function ertHackForSelect(_: SelectProps<OptionType>): void;
@@ -1,21 +0,0 @@
1
- /// <reference types="react" />
2
- import { type Modifier, type Options } from '@popperjs/core';
3
- type Placement = 'auto' | 'auto-start' | 'auto-end' | 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'right' | 'right-start' | 'right-end' | 'left' | 'left-start' | 'left-end';
4
- type Strategy = 'absolute' | 'fixed';
5
- interface NativeReactPopperProps<Name = unknown> {
6
- /** Function `(?HTMLElement) => void` that can be used to obtain popper reference */
7
- innerRef?: React.Ref<any>;
8
- /** One of the accepted placement values listed in the Popper.js documentation.
9
- Your popper is going to be placed according to the value of this property.
10
- Defaults to bottom.*/
11
- placement?: Placement;
12
- /** Describes the positioning strategy to use. By default, it is absolute, which in the simplest cases does not
13
- * require repositioning of the popper. If your reference element is in a fixed container, use the fixed strategy. */
14
- strategy: Strategy;
15
- /** An object containing custom settings for the Popper.js modifiers.
16
- You can use this property to override their settings or to inject your custom ones.
17
- See [Popper Modifiers](https://popper.js.org/docs/v2/modifiers/) for full details. */
18
- modifiers?: ReadonlyArray<Modifier<Name, Options>>;
19
- }
20
- export default function ertHackForPopper(_: NativeReactPopperProps): void;
21
- export {};
@@ -1,24 +0,0 @@
1
- import { type GroupBase, type OptionsOrGroups } from 'react-select';
2
- export interface ReactSelectAsyncProps<Option = unknown, Group extends GroupBase<Option> = GroupBase<Option>> {
3
- /**
4
- * The default set of options to show before the user starts searching. When
5
- * set to `true`, the results for loadOptions('') will be autoloaded.
6
- */
7
- defaultOptions?: OptionsOrGroups<Option, Group> | boolean;
8
- /**
9
- * If cacheOptions is truthy, then the loaded data will be cached. The cache
10
- * will remain until `cacheOptions` changes value.
11
- */
12
- cacheOptions?: any;
13
- /**
14
- * Function that returns a promise, which is the set of options to be used
15
- * once the promise resolves.
16
- */
17
- loadOptions?: (inputValue: string, callback: (options: OptionsOrGroups<Option, Group>) => void) => Promise<OptionsOrGroups<Option, Group>> | void;
18
- /**
19
- * Will cause the select to be displayed in the loading state, even if the
20
- * Async select is not currently waiting for loadOptions to resolve
21
- */
22
- isLoading?: boolean;
23
- }
24
- export default function ertHackForPopper(_: ReactSelectAsyncProps): void;
@@ -1,38 +0,0 @@
1
- import { type ReactNode } from 'react';
2
- import { type GetOptionLabel, type GetOptionValue, type GroupBase, type Options, type OptionsOrGroups } from 'react-select';
3
- export interface Accessors<Option> {
4
- getOptionValue: GetOptionValue<Option>;
5
- getOptionLabel: GetOptionLabel<Option>;
6
- }
7
- export interface ReactSelectCreatableProps<Option = unknown, Group extends GroupBase<Option> = GroupBase<Option>> {
8
- /**
9
- * Allow options to be created while the `isLoading` prop is true. Useful to
10
- * prevent the "create new ..." option being displayed while async results are
11
- * still being loaded.
12
- */
13
- allowCreateWhileLoading?: boolean;
14
- /** Sets the position of the createOption element in your options list. Defaults to 'last' */
15
- createOptionPosition?: 'first' | 'last';
16
- /**
17
- * Gets the label for the "create new ..." option in the menu. Is given the
18
- * current input value.
19
- */
20
- formatCreateLabel?: (inputValue: string) => ReactNode;
21
- /**
22
- * Determines whether the "create new ..." option should be displayed based on
23
- * the current input value, select value and options array.
24
- */
25
- isValidNewOption?: (inputValue: string, value: Options<Option>, options: OptionsOrGroups<Option, Group>, accessors: Accessors<Option>) => boolean;
26
- /**
27
- * Returns the data for the new option when it is created. Used to display the
28
- * value, and is passed to `onChange`.
29
- */
30
- getNewOptionData?: (inputValue: string, optionLabel: ReactNode) => Option;
31
- /**
32
- * If provided, this will be called with the input value when a new option is
33
- * created, and `onChange` will **not** be called. Use this when you need more
34
- * control over what happens when new options are created.
35
- */
36
- onCreateOption?: (inputValue: string) => void;
37
- }
38
- export default function ertHackForSelect(_: ReactSelectCreatableProps): void;
@@ -1,163 +0,0 @@
1
- import { type FocusEventHandler, type KeyboardEventHandler, type ReactNode } from 'react';
2
- interface FilterOptionOption<Option> {
3
- readonly label: string;
4
- readonly value: string;
5
- readonly data: Option;
6
- }
7
- import { type StylesConfig } from '../types';
8
- import { type ActionMeta, type AriaLiveMessages, type FormatOptionLabelMeta, type GetOptionLabel, type GetOptionValue, type GroupBase, type InputActionMeta, type MenuPlacement, type MenuPosition, type OnChangeValue, type Options, type OptionsOrGroups, type PropsValue, type SelectComponentsConfig, type ThemeConfig } from 'react-select';
9
- interface NativeReactSelectProps<Option = unknown, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>> {
10
- /** Use this to provide a descriptive name for people who use assistive technology. */
11
- 'aria-label'?: string;
12
- /** HTML ID of an element that should be used as the label (for assistive technology). */
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 technology). */
15
- 'aria-describedby'?: string;
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
- '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. */
19
- ariaLiveMessages?: AriaLiveMessages<Option, IsMulti, Group>;
20
- /** Focus the control when it is mounted. */
21
- autoFocus?: boolean;
22
- /** Remove the currently focused option when the user presses backspace when Select isClearable or isMulti. */
23
- backspaceRemovesValue?: boolean;
24
- /** Remove focus from the input when the user selects an option (handy for dismissing the keyboard on touch devices). */
25
- blurInputOnSelect?: boolean;
26
- /** When the user reaches the top/bottom of the menu, prevent scroll on the scroll-parent. */
27
- captureMenuScroll?: boolean;
28
- /** Sets a className attribute on the outer component. */
29
- className?: string;
30
- classNamePrefix?: string | null;
31
- /** Close the select menu when the user selects an option. */
32
- closeMenuOnSelect?: boolean;
33
- closeMenuOnScroll?: boolean | EventListener;
34
- /**
35
- This complex object includes all the compositional components that are used in `react-select`. If you wish to overwrite a component, pass in an object with the appropriate namespace.
36
-
37
- If you only wish to restyle a component, we recommend using the `styles` prop instead. For a list of the components that can be passed in, and the shape that will be passed to them, see [the components docs](/components).
38
- */
39
- components?: SelectComponentsConfig<Option, IsMulti, Group>;
40
- /** Whether the value of the select, e.g. SingleValue, should be displayed in the control. */
41
- controlShouldRenderValue?: boolean;
42
- /** Delimiter used to join multiple values into a single HTML Input value. */
43
- delimiter?: string;
44
- /** Clear all values when the user presses escape AND the menu is closed. */
45
- escapeClearsValue?: boolean;
46
- /** Custom method to filter whether an option should be displayed in the menu. */
47
- filterOption?: ((option?: FilterOptionOption<Option>, inputValue?: string) => boolean) | null;
48
- /** Formats group labels in the menu as React components. [Custom label example](/components/select/examples#customization). */
49
- formatGroupLabel?: (group?: Group) => ReactNode;
50
- /** Formats option labels in the menu and control as React components. */
51
- formatOptionLabel?: (data?: Option, formatOptionLabelMeta?: FormatOptionLabelMeta<Option>) => ReactNode;
52
- /**
53
- Resolves option data to a string to be displayed as the label by components.
54
-
55
- Note: Failure to resolve to a string type can interfere with filtering and assistive technology support.
56
- */
57
- getOptionLabel?: GetOptionLabel<Option>;
58
- /** Resolves option data to a string to compare options and specify value attributes. */
59
- getOptionValue?: GetOptionValue<Option>;
60
- /** Hide the selected option from the menu. */
61
- hideSelectedOptions?: boolean;
62
- /** The ID to set on the SelectContainer component. */
63
- id?: string;
64
- /** The value of the search input. */
65
- inputValue?: string;
66
- /** The ID of the search input. */
67
- inputId?: string;
68
- /** Define an ID prefix for the select components. For example, `{your-id}-value`. */
69
- instanceId?: number | string;
70
- /** Sets whether the select value is clearable. */
71
- isClearable?: boolean;
72
- /** Sets whether the select is disabled. People won't be able to interact with the select and it won't appear in the focus order.
73
- * Wherever possible, prefer using validation and error messaging over disabled fields for a more accessible experience. */
74
- isDisabled?: boolean;
75
- /** Sets whether the select is in a state of loading (async). */
76
- isLoading?: boolean;
77
- /**
78
- Override the built-in logic to detect whether an option is disabled.
79
- */
80
- isOptionDisabled?: (option?: Option, selectValue?: Options<Option>) => boolean;
81
- /** Override the built-in logic to detect whether an option is selected. */
82
- isOptionSelected?: (option?: Option, selectValue?: Options<Option>) => boolean;
83
- /** Support multiple selected options. */
84
- isMulti?: IsMulti;
85
- /** Sets if the select direction is right-to-left.*/
86
- isRtl?: boolean;
87
- /** Sets whether to enable search functionality. */
88
- isSearchable?: boolean;
89
- /** Async text to display when options are loading. */
90
- loadingMessage?: (obj?: {
91
- inputValue?: string;
92
- }) => ReactNode;
93
- /** Minimum height of the menu before flipping. */
94
- minMenuHeight?: number;
95
- /** Maximum height of the menu before scrolling. */
96
- maxMenuHeight?: number;
97
- /** Sets whether the menu is open. */
98
- menuIsOpen?: boolean;
99
- /** Default placement of the menu in relation to the control. 'auto' will flip when there isn't enough space below the control. */
100
- menuPlacement?: MenuPlacement;
101
- /** The CSS position value of the menu, when "fixed" extra layout management is required. */
102
- menuPosition?: MenuPosition;
103
- /** Whether the menu should use a portal, and where it should attach. */
104
- menuPortalTarget?: HTMLElement | null;
105
- /** Whether to block scroll events when the menu is open. */
106
- menuShouldBlockScroll?: boolean;
107
- /** Whether the menu should be scrolled into view when it opens. */
108
- menuShouldScrollIntoView?: boolean;
109
- /** Name of the HTML Input (optional - without this, no input will be rendered). */
110
- name?: string;
111
- /** Text to display when there are no options. */
112
- noOptionsMessage?: (obj?: {
113
- inputValue?: string;
114
- }) => ReactNode;
115
- /** Handle blur events on the control. */
116
- onBlur?: FocusEventHandler<HTMLInputElement>;
117
- /** Handle change events on the select. */
118
- onChange?: (newValue?: OnChangeValue<Option, IsMulti>, actionMeta?: ActionMeta<Option>) => void;
119
- /** Handle focus events on the control. */
120
- onFocus?: FocusEventHandler<HTMLInputElement>;
121
- /** Handle change events on the input. */
122
- onInputChange?: (newValue?: string, actionMeta?: InputActionMeta) => void;
123
- /** Handle key down events on the select. */
124
- onKeyDown?: KeyboardEventHandler<HTMLDivElement>;
125
- /** Handle the menu opening. */
126
- onMenuOpen?: () => void;
127
- /** Handle the menu closing. */
128
- onMenuClose?: () => void;
129
- /** Sent when the user scrolls to the top of the menu. */
130
- onMenuScrollToTop?: (event?: WheelEvent | TouchEvent) => void;
131
- /** Sent when the user scrolls to the bottom of the menu. */
132
- onMenuScrollToBottom?: (event?: WheelEvent | TouchEvent) => void;
133
- /** Allows control of whether the menu is opened when the select is focused. */
134
- openMenuOnFocus?: boolean;
135
- /** Allows control of whether the menu is opened when the select is clicked. */
136
- openMenuOnClick?: boolean;
137
- /** Array of options that populate the select menu. */
138
- options?: OptionsOrGroups<Option, Group>;
139
- /** Number of options to jump in menu when page{up|down} keys are used. */
140
- pageSize?: number;
141
- /** Placeholder for the select value. */
142
- placeholder?: ReactNode;
143
- /** Status to relay to screen readers. */
144
- screenReaderStatus?: (obj?: {
145
- count?: number;
146
- }) => string;
147
- /** Style modifier methods. */
148
- styles?: StylesConfig;
149
- /** Theme modifier method. */
150
- theme?: ThemeConfig;
151
- /** Sets the tabIndex attribute on the input. */
152
- tabIndex?: number;
153
- /** Select the currently focused option when the user presses tab. */
154
- tabSelectsValue?: boolean;
155
- /** The value of the select; reflected by the selected option. */
156
- value?: PropsValue<Option>;
157
- /** Sets the form attribute on the input. */
158
- form?: string;
159
- /** Marks the value-holding input as required for form validation. */
160
- required?: boolean;
161
- }
162
- export default function ertHackForSelect(_: NativeReactSelectProps): void;
163
- export {};
@@ -1,2 +0,0 @@
1
- import { type SelectProps, type OptionType } from '../types';
2
- export default function ertHackForSelect(_: SelectProps<OptionType>): void;
@@ -1,21 +0,0 @@
1
- /// <reference types="react" />
2
- import { type Modifier, type Options } from '@popperjs/core';
3
- type Placement = 'auto' | 'auto-start' | 'auto-end' | 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'right' | 'right-start' | 'right-end' | 'left' | 'left-start' | 'left-end';
4
- type Strategy = 'absolute' | 'fixed';
5
- interface NativeReactPopperProps<Name = unknown> {
6
- /** Function `(?HTMLElement) => void` that can be used to obtain popper reference */
7
- innerRef?: React.Ref<any>;
8
- /** One of the accepted placement values listed in the Popper.js documentation.
9
- Your popper is going to be placed according to the value of this property.
10
- Defaults to bottom.*/
11
- placement?: Placement;
12
- /** Describes the positioning strategy to use. By default, it is absolute, which in the simplest cases does not
13
- * require repositioning of the popper. If your reference element is in a fixed container, use the fixed strategy. */
14
- strategy: Strategy;
15
- /** An object containing custom settings for the Popper.js modifiers.
16
- You can use this property to override their settings or to inject your custom ones.
17
- See [Popper Modifiers](https://popper.js.org/docs/v2/modifiers/) for full details. */
18
- modifiers?: ReadonlyArray<Modifier<Name, Options>>;
19
- }
20
- export default function ertHackForPopper(_: NativeReactPopperProps): void;
21
- export {};
@@ -1,24 +0,0 @@
1
- import { type GroupBase, type OptionsOrGroups } from 'react-select';
2
- export interface ReactSelectAsyncProps<Option = unknown, Group extends GroupBase<Option> = GroupBase<Option>> {
3
- /**
4
- * The default set of options to show before the user starts searching. When
5
- * set to `true`, the results for loadOptions('') will be autoloaded.
6
- */
7
- defaultOptions?: OptionsOrGroups<Option, Group> | boolean;
8
- /**
9
- * If cacheOptions is truthy, then the loaded data will be cached. The cache
10
- * will remain until `cacheOptions` changes value.
11
- */
12
- cacheOptions?: any;
13
- /**
14
- * Function that returns a promise, which is the set of options to be used
15
- * once the promise resolves.
16
- */
17
- loadOptions?: (inputValue: string, callback: (options: OptionsOrGroups<Option, Group>) => void) => Promise<OptionsOrGroups<Option, Group>> | void;
18
- /**
19
- * Will cause the select to be displayed in the loading state, even if the
20
- * Async select is not currently waiting for loadOptions to resolve
21
- */
22
- isLoading?: boolean;
23
- }
24
- export default function ertHackForPopper(_: ReactSelectAsyncProps): void;
@@ -1,38 +0,0 @@
1
- import { type ReactNode } from 'react';
2
- import { type GetOptionLabel, type GetOptionValue, type GroupBase, type Options, type OptionsOrGroups } from 'react-select';
3
- export interface Accessors<Option> {
4
- getOptionValue: GetOptionValue<Option>;
5
- getOptionLabel: GetOptionLabel<Option>;
6
- }
7
- export interface ReactSelectCreatableProps<Option = unknown, Group extends GroupBase<Option> = GroupBase<Option>> {
8
- /**
9
- * Allow options to be created while the `isLoading` prop is true. Useful to
10
- * prevent the "create new ..." option being displayed while async results are
11
- * still being loaded.
12
- */
13
- allowCreateWhileLoading?: boolean;
14
- /** Sets the position of the createOption element in your options list. Defaults to 'last' */
15
- createOptionPosition?: 'first' | 'last';
16
- /**
17
- * Gets the label for the "create new ..." option in the menu. Is given the
18
- * current input value.
19
- */
20
- formatCreateLabel?: (inputValue: string) => ReactNode;
21
- /**
22
- * Determines whether the "create new ..." option should be displayed based on
23
- * the current input value, select value and options array.
24
- */
25
- isValidNewOption?: (inputValue: string, value: Options<Option>, options: OptionsOrGroups<Option, Group>, accessors: Accessors<Option>) => boolean;
26
- /**
27
- * Returns the data for the new option when it is created. Used to display the
28
- * value, and is passed to `onChange`.
29
- */
30
- getNewOptionData?: (inputValue: string, optionLabel: ReactNode) => Option;
31
- /**
32
- * If provided, this will be called with the input value when a new option is
33
- * created, and `onChange` will **not** be called. Use this when you need more
34
- * control over what happens when new options are created.
35
- */
36
- onCreateOption?: (inputValue: string) => void;
37
- }
38
- export default function ertHackForSelect(_: ReactSelectCreatableProps): void;
@@ -1,163 +0,0 @@
1
- import { type FocusEventHandler, type KeyboardEventHandler, type ReactNode } from 'react';
2
- interface FilterOptionOption<Option> {
3
- readonly label: string;
4
- readonly value: string;
5
- readonly data: Option;
6
- }
7
- import { type StylesConfig } from '../types';
8
- import { type ActionMeta, type AriaLiveMessages, type FormatOptionLabelMeta, type GetOptionLabel, type GetOptionValue, type GroupBase, type InputActionMeta, type MenuPlacement, type MenuPosition, type OnChangeValue, type Options, type OptionsOrGroups, type PropsValue, type SelectComponentsConfig, type ThemeConfig } from 'react-select';
9
- interface NativeReactSelectProps<Option = unknown, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>> {
10
- /** Use this to provide a descriptive name for people who use assistive technology. */
11
- 'aria-label'?: string;
12
- /** HTML ID of an element that should be used as the label (for assistive technology). */
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 technology). */
15
- 'aria-describedby'?: string;
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
- '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. */
19
- ariaLiveMessages?: AriaLiveMessages<Option, IsMulti, Group>;
20
- /** Focus the control when it is mounted. */
21
- autoFocus?: boolean;
22
- /** Remove the currently focused option when the user presses backspace when Select isClearable or isMulti. */
23
- backspaceRemovesValue?: boolean;
24
- /** Remove focus from the input when the user selects an option (handy for dismissing the keyboard on touch devices). */
25
- blurInputOnSelect?: boolean;
26
- /** When the user reaches the top/bottom of the menu, prevent scroll on the scroll-parent. */
27
- captureMenuScroll?: boolean;
28
- /** Sets a className attribute on the outer component. */
29
- className?: string;
30
- classNamePrefix?: string | null;
31
- /** Close the select menu when the user selects an option. */
32
- closeMenuOnSelect?: boolean;
33
- closeMenuOnScroll?: boolean | EventListener;
34
- /**
35
- This complex object includes all the compositional components that are used in `react-select`. If you wish to overwrite a component, pass in an object with the appropriate namespace.
36
-
37
- If you only wish to restyle a component, we recommend using the `styles` prop instead. For a list of the components that can be passed in, and the shape that will be passed to them, see [the components docs](/components).
38
- */
39
- components?: SelectComponentsConfig<Option, IsMulti, Group>;
40
- /** Whether the value of the select, e.g. SingleValue, should be displayed in the control. */
41
- controlShouldRenderValue?: boolean;
42
- /** Delimiter used to join multiple values into a single HTML Input value. */
43
- delimiter?: string;
44
- /** Clear all values when the user presses escape AND the menu is closed. */
45
- escapeClearsValue?: boolean;
46
- /** Custom method to filter whether an option should be displayed in the menu. */
47
- filterOption?: ((option?: FilterOptionOption<Option>, inputValue?: string) => boolean) | null;
48
- /** Formats group labels in the menu as React components. [Custom label example](/components/select/examples#customization). */
49
- formatGroupLabel?: (group?: Group) => ReactNode;
50
- /** Formats option labels in the menu and control as React components. */
51
- formatOptionLabel?: (data?: Option, formatOptionLabelMeta?: FormatOptionLabelMeta<Option>) => ReactNode;
52
- /**
53
- Resolves option data to a string to be displayed as the label by components.
54
-
55
- Note: Failure to resolve to a string type can interfere with filtering and assistive technology support.
56
- */
57
- getOptionLabel?: GetOptionLabel<Option>;
58
- /** Resolves option data to a string to compare options and specify value attributes. */
59
- getOptionValue?: GetOptionValue<Option>;
60
- /** Hide the selected option from the menu. */
61
- hideSelectedOptions?: boolean;
62
- /** The ID to set on the SelectContainer component. */
63
- id?: string;
64
- /** The value of the search input. */
65
- inputValue?: string;
66
- /** The ID of the search input. */
67
- inputId?: string;
68
- /** Define an ID prefix for the select components. For example, `{your-id}-value`. */
69
- instanceId?: number | string;
70
- /** Sets whether the select value is clearable. */
71
- isClearable?: boolean;
72
- /** Sets whether the select is disabled. People won't be able to interact with the select and it won't appear in the focus order.
73
- * Wherever possible, prefer using validation and error messaging over disabled fields for a more accessible experience. */
74
- isDisabled?: boolean;
75
- /** Sets whether the select is in a state of loading (async). */
76
- isLoading?: boolean;
77
- /**
78
- Override the built-in logic to detect whether an option is disabled.
79
- */
80
- isOptionDisabled?: (option?: Option, selectValue?: Options<Option>) => boolean;
81
- /** Override the built-in logic to detect whether an option is selected. */
82
- isOptionSelected?: (option?: Option, selectValue?: Options<Option>) => boolean;
83
- /** Support multiple selected options. */
84
- isMulti?: IsMulti;
85
- /** Sets if the select direction is right-to-left.*/
86
- isRtl?: boolean;
87
- /** Sets whether to enable search functionality. */
88
- isSearchable?: boolean;
89
- /** Async text to display when options are loading. */
90
- loadingMessage?: (obj?: {
91
- inputValue?: string;
92
- }) => ReactNode;
93
- /** Minimum height of the menu before flipping. */
94
- minMenuHeight?: number;
95
- /** Maximum height of the menu before scrolling. */
96
- maxMenuHeight?: number;
97
- /** Sets whether the menu is open. */
98
- menuIsOpen?: boolean;
99
- /** Default placement of the menu in relation to the control. 'auto' will flip when there isn't enough space below the control. */
100
- menuPlacement?: MenuPlacement;
101
- /** The CSS position value of the menu, when "fixed" extra layout management is required. */
102
- menuPosition?: MenuPosition;
103
- /** Whether the menu should use a portal, and where it should attach. */
104
- menuPortalTarget?: HTMLElement | null;
105
- /** Whether to block scroll events when the menu is open. */
106
- menuShouldBlockScroll?: boolean;
107
- /** Whether the menu should be scrolled into view when it opens. */
108
- menuShouldScrollIntoView?: boolean;
109
- /** Name of the HTML Input (optional - without this, no input will be rendered). */
110
- name?: string;
111
- /** Text to display when there are no options. */
112
- noOptionsMessage?: (obj?: {
113
- inputValue?: string;
114
- }) => ReactNode;
115
- /** Handle blur events on the control. */
116
- onBlur?: FocusEventHandler<HTMLInputElement>;
117
- /** Handle change events on the select. */
118
- onChange?: (newValue?: OnChangeValue<Option, IsMulti>, actionMeta?: ActionMeta<Option>) => void;
119
- /** Handle focus events on the control. */
120
- onFocus?: FocusEventHandler<HTMLInputElement>;
121
- /** Handle change events on the input. */
122
- onInputChange?: (newValue?: string, actionMeta?: InputActionMeta) => void;
123
- /** Handle key down events on the select. */
124
- onKeyDown?: KeyboardEventHandler<HTMLDivElement>;
125
- /** Handle the menu opening. */
126
- onMenuOpen?: () => void;
127
- /** Handle the menu closing. */
128
- onMenuClose?: () => void;
129
- /** Sent when the user scrolls to the top of the menu. */
130
- onMenuScrollToTop?: (event?: WheelEvent | TouchEvent) => void;
131
- /** Sent when the user scrolls to the bottom of the menu. */
132
- onMenuScrollToBottom?: (event?: WheelEvent | TouchEvent) => void;
133
- /** Allows control of whether the menu is opened when the select is focused. */
134
- openMenuOnFocus?: boolean;
135
- /** Allows control of whether the menu is opened when the select is clicked. */
136
- openMenuOnClick?: boolean;
137
- /** Array of options that populate the select menu. */
138
- options?: OptionsOrGroups<Option, Group>;
139
- /** Number of options to jump in menu when page{up|down} keys are used. */
140
- pageSize?: number;
141
- /** Placeholder for the select value. */
142
- placeholder?: ReactNode;
143
- /** Status to relay to screen readers. */
144
- screenReaderStatus?: (obj?: {
145
- count?: number;
146
- }) => string;
147
- /** Style modifier methods. */
148
- styles?: StylesConfig;
149
- /** Theme modifier method. */
150
- theme?: ThemeConfig;
151
- /** Sets the tabIndex attribute on the input. */
152
- tabIndex?: number;
153
- /** Select the currently focused option when the user presses tab. */
154
- tabSelectsValue?: boolean;
155
- /** The value of the select; reflected by the selected option. */
156
- value?: PropsValue<Option>;
157
- /** Sets the form attribute on the input. */
158
- form?: string;
159
- /** Marks the value-holding input as required for form validation. */
160
- required?: boolean;
161
- }
162
- export default function ertHackForSelect(_: NativeReactSelectProps): void;
163
- export {};