@atlaskit/select 15.7.5 → 15.7.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @atlaskit/select
2
2
 
3
+ ## 15.7.6
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
3
9
  ## 15.7.5
4
10
 
5
11
  ### Patch Changes
@@ -184,8 +184,7 @@ describe('Convert positionFixed:boolean to strategy:"fixed"|"absolute"', () => {
184
184
 
185
185
  describe('Warn use of the `modifiers` prop', () => {
186
186
  check({
187
- it:
188
- 'should add warning comment when using the modifier prop in `popperProps`',
187
+ it: 'should add warning comment when using the modifier prop in `popperProps`',
189
188
  original: `
190
189
  import { PopupSelect } from '@atlaskit/select';
191
190
 
@@ -14,7 +14,7 @@ var _analyticsNext = require("@atlaskit/analytics-next");
14
14
  var _createSelect = _interopRequireDefault(require("./createSelect"));
15
15
 
16
16
  var packageName = "@atlaskit/select";
17
- var packageVersion = "15.7.5";
17
+ var packageVersion = "15.7.6";
18
18
  var SelectWithoutAnalytics = (0, _createSelect.default)(_reactSelect.default);
19
19
  exports.SelectWithoutAnalytics = SelectWithoutAnalytics;
20
20
  var createAndFireEventOnAtlaskit = (0, _analyticsNext.createAndFireEvent)('atlaskit');
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/select",
3
- "version": "15.7.5",
3
+ "version": "15.7.6",
4
4
  "sideEffects": false
5
5
  }
@@ -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 = "15.7.5";
5
+ const packageVersion = "15.7.6";
6
6
  export const SelectWithoutAnalytics = createSelect(Select);
7
7
  const createAndFireEventOnAtlaskit = createAndFireEvent('atlaskit');
8
8
  export default withAnalyticsContext({
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/select",
3
- "version": "15.7.5",
3
+ "version": "15.7.6",
4
4
  "sideEffects": false
5
5
  }
@@ -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 = "15.7.5";
5
+ var packageVersion = "15.7.6";
6
6
  export var SelectWithoutAnalytics = createSelect(Select);
7
7
  var createAndFireEventOnAtlaskit = createAndFireEvent('atlaskit');
8
8
  export default withAnalyticsContext({
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/select",
3
- "version": "15.7.5",
3
+ "version": "15.7.6",
4
4
  "sideEffects": false
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/select",
3
- "version": "15.7.5",
3
+ "version": "15.7.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/"
@@ -12,14 +12,6 @@
12
12
  "module": "dist/esm/index.js",
13
13
  "module:es2019": "dist/es2019/index.js",
14
14
  "types": "dist/types/index.d.ts",
15
- "typesVersions": {
16
- ">=4.0 <4.5": {
17
- "*": [
18
- "dist/types-ts4.0/*",
19
- "dist/types-ts4.0/index.d.ts"
20
- ]
21
- }
22
- },
23
15
  "sideEffects": false,
24
16
  "atlaskit:src": "src/index.tsx",
25
17
  "atlassian": {
@@ -37,7 +29,7 @@
37
29
  "@atlaskit/icon": "^21.11.0",
38
30
  "@atlaskit/spinner": "^15.2.0",
39
31
  "@atlaskit/theme": "^12.2.0",
40
- "@atlaskit/tokens": "^0.10.0",
32
+ "@atlaskit/tokens": "^0.11.0",
41
33
  "@atlaskit/visually-hidden": "^1.1.0",
42
34
  "@babel/runtime": "^7.0.0",
43
35
  "@emotion/react": "^11.7.1",
package/report.api.md CHANGED
@@ -259,7 +259,7 @@ export { components };
259
259
  // @public (undocumented)
260
260
  export type ControlProps<
261
261
  OptionType,
262
- IsMulti extends boolean = false
262
+ IsMulti extends boolean = false,
263
263
  > = ControlProps_2<OptionType, IsMulti>;
264
264
 
265
265
  // @public (undocumented)
@@ -483,7 +483,7 @@ type defaultModifiers = 'offset' | 'preventOverflow';
483
483
  // @public (undocumented)
484
484
  export type FormatOptionLabelMeta<
485
485
  OptionType,
486
- IsMulti extends boolean = false
486
+ IsMulti extends boolean = false,
487
487
  > = FormatOptionLabelMeta_2<OptionType, IsMulti>;
488
488
 
489
489
  // @public (undocumented)
@@ -505,13 +505,13 @@ export { GroupType };
505
505
  // @public (undocumented)
506
506
  export type IndicatorComponentType<
507
507
  OptionType,
508
- IsMulti extends boolean = false
508
+ IsMulti extends boolean = false,
509
509
  > = IndicatorComponentType_2<OptionType, IsMulti>;
510
510
 
511
511
  // @public (undocumented)
512
512
  export type IndicatorProps<
513
513
  OptionType,
514
- IsMulti extends boolean = false
514
+ IsMulti extends boolean = false,
515
515
  > = IndicatorProps_2<OptionType, IsMulti>;
516
516
 
517
517
  // @public (undocumented)
@@ -526,13 +526,13 @@ export { makeCreatableSelect };
526
526
  // @public (undocumented)
527
527
  export type MenuListComponentProps<
528
528
  OptionType,
529
- IsMulti extends boolean = false
529
+ IsMulti extends boolean = false,
530
530
  > = MenuListComponentProps_2<OptionType, IsMulti>;
531
531
 
532
532
  // @public (undocumented)
533
533
  export type MenuProps<
534
534
  OptionType,
535
- IsMulti extends boolean = false
535
+ IsMulti extends boolean = false,
536
536
  > = MenuProps_2<OptionType, IsMulti>;
537
537
 
538
538
  export { mergeStyles };
@@ -552,7 +552,7 @@ type ModifierList =
552
552
  // @public (undocumented)
553
553
  export interface OptionProps<
554
554
  Option = OptionType,
555
- IsMulti extends boolean = false
555
+ IsMulti extends boolean = false,
556
556
  > extends OptionProps_2<Option, IsMulti> {
557
557
  // (undocumented)
558
558
  [key: string]: any;
@@ -594,7 +594,7 @@ type PopperPropsNoChildren<Modifiers> = Omit<
594
594
  // @public (undocumented)
595
595
  export class PopupSelect<
596
596
  Option = OptionType,
597
- IsMulti extends boolean = false
597
+ IsMulti extends boolean = false,
598
598
  > extends PureComponent<PopupSelectProps<Option, IsMulti>, State> {
599
599
  close: (
600
600
  options?:
@@ -701,7 +701,7 @@ export class PopupSelect<
701
701
  export interface PopupSelectProps<
702
702
  Option = OptionType,
703
703
  IsMulti extends boolean = false,
704
- Modifiers = ModifierList
704
+ Modifiers = ModifierList,
705
705
  > extends Props<Option, IsMulti> {
706
706
  closeMenuOnSelect?: boolean;
707
707
  // (undocumented)
@@ -751,7 +751,7 @@ export const RadioSelect: ({
751
751
  // @public (undocumented)
752
752
  export type SelectComponentsConfig<
753
753
  OptionType,
754
- IsMulti extends boolean = false
754
+ IsMulti extends boolean = false,
755
755
  > = SelectComponentsConfig_2<OptionType, IsMulti>;
756
756
 
757
757
  // @public (undocumented)
@@ -877,7 +877,7 @@ interface State<Modifiers = string> {
877
877
  // @public (undocumented)
878
878
  export type StylesConfig<
879
879
  Option = OptionType,
880
- IsMulti extends boolean = false
880
+ IsMulti extends boolean = false,
881
881
  > = StylesConfig_2<Option, IsMulti>;
882
882
 
883
883
  // @public (undocumented)
@@ -886,13 +886,13 @@ type ValidationState = 'default' | 'error' | 'success';
886
886
  // @public (undocumented)
887
887
  export type ValueContainerProps<
888
888
  OptionType,
889
- IsMulti extends boolean = false
889
+ IsMulti extends boolean = false,
890
890
  > = ValueContainerProps_2<OptionType, IsMulti>;
891
891
 
892
892
  // @public (undocumented)
893
893
  export type ValueType<
894
894
  OptionType,
895
- IsMulti extends boolean = false
895
+ IsMulti extends boolean = false,
896
896
  > = ValueType_2<OptionType, IsMulti>;
897
897
 
898
898
  // (No @packageDocumentation comment for this package)
@@ -1,44 +0,0 @@
1
- /// <reference types="react" />
2
- declare const _default: {
3
- new <Option = import("./types").OptionType, IsMulti extends boolean = false>(props: import("./types").SelectProps<Option, IsMulti>): {
4
- components: Partial<import("react-select/src/components").SelectComponents<Option, IsMulti, import("react-select").GroupTypeBase<Option>>>;
5
- select: import("react-select").default<Option, false, import("react-select").GroupTypeBase<Option>, import("react-select/src/Select").default<Option, false, import("react-select").GroupTypeBase<Option>>> | null;
6
- UNSAFE_componentWillReceiveProps(nextProps: import("./types").SelectProps<Option, IsMulti>): void;
7
- cacheComponents: (components: Partial<import("react-select/src/components").SelectComponents<Option, IsMulti, import("react-select").GroupTypeBase<Option>>>) => void;
8
- focus(): void;
9
- blur(): void;
10
- onSelectRef: (ref: import("react-select").default<Option, false, import("react-select").GroupTypeBase<Option>, import("react-select/src/Select").default<Option, false, import("react-select").GroupTypeBase<Option>>>) => void;
11
- render(): JSX.Element;
12
- context: any;
13
- setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<import("./types").SelectProps<Option, IsMulti>>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
14
- forceUpdate(callBack?: (() => void) | undefined): void;
15
- readonly props: Readonly<import("./types").SelectProps<Option, IsMulti>> & Readonly<{
16
- children?: import("react").ReactNode;
17
- }>;
18
- state: Readonly<{}>;
19
- refs: {
20
- [key: string]: import("react").ReactInstance;
21
- };
22
- componentDidMount?(): void;
23
- shouldComponentUpdate?(nextProps: Readonly<import("./types").SelectProps<Option, IsMulti>>, nextState: Readonly<{}>, nextContext: any): boolean;
24
- componentWillUnmount?(): void;
25
- componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
26
- getSnapshotBeforeUpdate?(prevProps: Readonly<import("./types").SelectProps<Option, IsMulti>>, prevState: Readonly<{}>): any;
27
- componentDidUpdate?(prevProps: Readonly<import("./types").SelectProps<Option, IsMulti>>, prevState: Readonly<{}>, snapshot?: any): void;
28
- componentWillMount?(): void;
29
- UNSAFE_componentWillMount?(): void;
30
- componentWillReceiveProps?(nextProps: Readonly<import("./types").SelectProps<Option, IsMulti>>, nextContext: any): void;
31
- componentWillUpdate?(nextProps: Readonly<import("./types").SelectProps<Option, IsMulti>>, nextState: Readonly<{}>, nextContext: any): void;
32
- UNSAFE_componentWillUpdate?(nextProps: Readonly<import("./types").SelectProps<Option, IsMulti>>, nextState: Readonly<{}>, nextContext: any): void;
33
- };
34
- defaultProps: {
35
- validationState: string;
36
- spacing: string;
37
- onClickPreventDefault: boolean;
38
- tabSelectsValue: boolean;
39
- components: {};
40
- styles: {};
41
- };
42
- contextType?: import("react").Context<any> | undefined;
43
- };
44
- export default _default;
@@ -1,44 +0,0 @@
1
- /// <reference types="react" />
2
- declare const _default: {
3
- new <Option = import("./types").OptionType, IsMulti extends boolean = false>(props: import("./types").SelectProps<Option, IsMulti>): {
4
- components: Partial<import("react-select/src/components").SelectComponents<Option, IsMulti, import("react-select").GroupTypeBase<Option>>>;
5
- select: import("react-select").default<Option, false, import("react-select").GroupTypeBase<Option>, import("react-select/src/Select").default<Option, false, import("react-select").GroupTypeBase<Option>>> | null;
6
- UNSAFE_componentWillReceiveProps(nextProps: import("./types").SelectProps<Option, IsMulti>): void;
7
- cacheComponents: (components: Partial<import("react-select/src/components").SelectComponents<Option, IsMulti, import("react-select").GroupTypeBase<Option>>>) => void;
8
- focus(): void;
9
- blur(): void;
10
- onSelectRef: (ref: import("react-select").default<Option, false, import("react-select").GroupTypeBase<Option>, import("react-select/src/Select").default<Option, false, import("react-select").GroupTypeBase<Option>>>) => void;
11
- render(): JSX.Element;
12
- context: any;
13
- setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<import("./types").SelectProps<Option, IsMulti>>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
14
- forceUpdate(callBack?: (() => void) | undefined): void;
15
- readonly props: Readonly<import("./types").SelectProps<Option, IsMulti>> & Readonly<{
16
- children?: import("react").ReactNode;
17
- }>;
18
- state: Readonly<{}>;
19
- refs: {
20
- [key: string]: import("react").ReactInstance;
21
- };
22
- componentDidMount?(): void;
23
- shouldComponentUpdate?(nextProps: Readonly<import("./types").SelectProps<Option, IsMulti>>, nextState: Readonly<{}>, nextContext: any): boolean;
24
- componentWillUnmount?(): void;
25
- componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
26
- getSnapshotBeforeUpdate?(prevProps: Readonly<import("./types").SelectProps<Option, IsMulti>>, prevState: Readonly<{}>): any;
27
- componentDidUpdate?(prevProps: Readonly<import("./types").SelectProps<Option, IsMulti>>, prevState: Readonly<{}>, snapshot?: any): void;
28
- componentWillMount?(): void;
29
- UNSAFE_componentWillMount?(): void;
30
- componentWillReceiveProps?(nextProps: Readonly<import("./types").SelectProps<Option, IsMulti>>, nextContext: any): void;
31
- componentWillUpdate?(nextProps: Readonly<import("./types").SelectProps<Option, IsMulti>>, nextState: Readonly<{}>, nextContext: any): void;
32
- UNSAFE_componentWillUpdate?(nextProps: Readonly<import("./types").SelectProps<Option, IsMulti>>, nextState: Readonly<{}>, nextContext: any): void;
33
- };
34
- defaultProps: {
35
- validationState: string;
36
- spacing: string;
37
- onClickPreventDefault: boolean;
38
- tabSelectsValue: boolean;
39
- components: {};
40
- styles: {};
41
- };
42
- contextType?: import("react").Context<any> | undefined;
43
- };
44
- export default _default;
@@ -1,4 +0,0 @@
1
- /// <reference types="react" />
2
- import { SelectProps, OptionType } from './types';
3
- declare const CheckboxSelect: ({ components, ...props }: SelectProps<OptionType, true>) => JSX.Element;
4
- export default CheckboxSelect;
@@ -1,6 +0,0 @@
1
- import { jsx } from '@emotion/react';
2
- import { groupedCountries } from './data/countries';
3
- import { SelectProps } from './types';
4
- declare type Country = typeof groupedCountries[number]['options'][number];
5
- declare const CountrySelect: (props: SelectProps<Country>) => jsx.JSX.Element;
6
- export default CountrySelect;
@@ -1,44 +0,0 @@
1
- /// <reference types="react" />
2
- declare const _default: {
3
- new <Option = import("./types").OptionType, IsMulti extends boolean = false>(props: import("./types").SelectProps<Option, IsMulti>): {
4
- components: Partial<import("react-select/src/components").SelectComponents<Option, IsMulti, import("react-select").GroupTypeBase<Option>>>;
5
- select: import("react-select").default<Option, false, import("react-select").GroupTypeBase<Option>, import("react-select/src/Select").default<Option, false, import("react-select").GroupTypeBase<Option>>> | null;
6
- UNSAFE_componentWillReceiveProps(nextProps: import("./types").SelectProps<Option, IsMulti>): void;
7
- cacheComponents: (components: Partial<import("react-select/src/components").SelectComponents<Option, IsMulti, import("react-select").GroupTypeBase<Option>>>) => void;
8
- focus(): void;
9
- blur(): void;
10
- onSelectRef: (ref: import("react-select").default<Option, false, import("react-select").GroupTypeBase<Option>, import("react-select/src/Select").default<Option, false, import("react-select").GroupTypeBase<Option>>>) => void;
11
- render(): JSX.Element;
12
- context: any;
13
- setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<import("./types").SelectProps<Option, IsMulti>>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
14
- forceUpdate(callBack?: (() => void) | undefined): void;
15
- readonly props: Readonly<import("./types").SelectProps<Option, IsMulti>> & Readonly<{
16
- children?: import("react").ReactNode;
17
- }>;
18
- state: Readonly<{}>;
19
- refs: {
20
- [key: string]: import("react").ReactInstance;
21
- };
22
- componentDidMount?(): void;
23
- shouldComponentUpdate?(nextProps: Readonly<import("./types").SelectProps<Option, IsMulti>>, nextState: Readonly<{}>, nextContext: any): boolean;
24
- componentWillUnmount?(): void;
25
- componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
26
- getSnapshotBeforeUpdate?(prevProps: Readonly<import("./types").SelectProps<Option, IsMulti>>, prevState: Readonly<{}>): any;
27
- componentDidUpdate?(prevProps: Readonly<import("./types").SelectProps<Option, IsMulti>>, prevState: Readonly<{}>, snapshot?: any): void;
28
- componentWillMount?(): void;
29
- UNSAFE_componentWillMount?(): void;
30
- componentWillReceiveProps?(nextProps: Readonly<import("./types").SelectProps<Option, IsMulti>>, nextContext: any): void;
31
- componentWillUpdate?(nextProps: Readonly<import("./types").SelectProps<Option, IsMulti>>, nextState: Readonly<{}>, nextContext: any): void;
32
- UNSAFE_componentWillUpdate?(nextProps: Readonly<import("./types").SelectProps<Option, IsMulti>>, nextState: Readonly<{}>, nextContext: any): void;
33
- };
34
- defaultProps: {
35
- validationState: string;
36
- spacing: string;
37
- onClickPreventDefault: boolean;
38
- tabSelectsValue: boolean;
39
- components: {};
40
- styles: {};
41
- };
42
- contextType?: import("react").Context<any> | undefined;
43
- };
44
- export default _default;
@@ -1,143 +0,0 @@
1
- import React, { PureComponent, ReactNode } from 'react';
2
- import Select from 'react-select';
3
- import { PopperProps } from 'react-popper';
4
- import { OptionType, ActionMeta, ReactSelectProps, StylesConfig, ValueType, ValidationState } from '../types';
5
- import { UnbindFn } from 'bind-event-listener';
6
- declare type defaultModifiers = 'offset' | 'preventOverflow';
7
- declare type PopperPropsNoChildren<Modifiers> = Omit<PopperProps<Modifiers>, 'children'>;
8
- interface PopupSelectTriggerProps {
9
- ref: any;
10
- 'aria-haspopup': 'true';
11
- 'aria-expanded': boolean;
12
- 'aria-controls'?: string;
13
- }
14
- declare type ModifierList = 'offset' | 'computeStyles' | 'preventOverflow' | 'handleFlipStyle' | 'flip' | 'popperOffsets' | 'arrow' | 'hide' | string;
15
- export interface PopupSelectProps<Option = OptionType, IsMulti extends boolean = false, Modifiers = ModifierList> extends ReactSelectProps<Option, IsMulti> {
16
- /**
17
- * Defines whether the menu should close when selected. Defaults to "true"
18
- */
19
- closeMenuOnSelect?: boolean;
20
- /**
21
- * The footer content shown at the bottom of the Popup, underneath the Select options
22
- */
23
- footer?: ReactNode;
24
- /**
25
- The props passed down to React Popper.
26
-
27
- Use these to override the default positioning strategy, behaviour and placement used by this library.
28
- For more information, see the [React Popper documentation](https://popper.js.org/react-popper/v2/render-props).
29
-
30
- */
31
- popperProps?: PopperPropsNoChildren<Modifiers>;
32
- /**
33
- * The maximum number of options the select can contain without rendering the search field. Defaults to 5.
34
- */
35
- searchThreshold?: number;
36
- /**
37
- * If false, renders a select with no search field. If true, renders a search field in the select when the
38
- * number of options exceeds the `searchThreshold`. Defaults to true.
39
- */
40
- isSearchable?: boolean;
41
- /**
42
- * The maximum width for the popup menu. Can be a number, representing width in pixels,
43
- * or a string containing a CSS length datatype.
44
- */
45
- maxMenuWidth?: number | string;
46
- /**
47
- * The maximum width for the popup menu. Can be a number, representing width in pixels,
48
- * or a string containing a CSS length datatype.
49
- */
50
- minMenuWidth?: number | string;
51
- /**
52
- Render props used to anchor the popup to your content.
53
-
54
- Make this an interactive element, such as an @atlaskit/button component.
55
-
56
- The provided render props in `options` are detailed below:
57
- - `isOpen`: The current state of the popup.
58
- Use this to change the appearance of your target based on the state of your component
59
- - `ref`: Pass this ref to the element the Popup should be attached to
60
- - `aria-haspopup`, `aria-expanded`, `aria-controls`: Spread these onto a target element to
61
- ensure your experience is accessible
62
- */
63
- target?: (options: PopupSelectTriggerProps & {
64
- isOpen: boolean;
65
- }) => ReactNode;
66
- isOpen?: boolean;
67
- defaultIsOpen?: boolean;
68
- spacing?: string;
69
- validationState?: ValidationState;
70
- isInvalid?: boolean;
71
- }
72
- interface State<Modifiers = string> {
73
- focusLockEnabled: boolean;
74
- isOpen: boolean;
75
- mergedComponents: Object;
76
- mergedPopperProps: PopperPropsNoChildren<defaultModifiers | Modifiers>;
77
- }
78
- export default class PopupSelect<Option = OptionType, IsMulti extends boolean = false> extends PureComponent<PopupSelectProps<Option, IsMulti>, State> {
79
- menuRef: HTMLElement | null;
80
- selectRef: Select<Option, IsMulti> | null;
81
- targetRef: HTMLElement | null;
82
- unbindWindowClick: UnbindFn | null;
83
- unbindWindowKeydown: UnbindFn | null;
84
- defaultStyles: StylesConfig<Option, IsMulti>;
85
- isOpenControlled: boolean;
86
- defaultOpenState: boolean | undefined;
87
- state: {
88
- focusLockEnabled: boolean;
89
- isOpen: boolean;
90
- mergedComponents: {
91
- Control: React.FC<import("../types").ControlProps<OptionType, boolean>>;
92
- DropdownIndicator: () => import("@emotion/react").jsx.JSX.Element;
93
- Menu: ({ children, innerProps, ...props }: import("../types").MenuProps<OptionType, boolean>) => import("@emotion/react").jsx.JSX.Element;
94
- };
95
- mergedPopperProps: PopperPropsNoChildren<string>;
96
- };
97
- popperWrapperId: string;
98
- static defaultProps: {
99
- closeMenuOnSelect: boolean;
100
- components: {};
101
- maxMenuHeight: number;
102
- maxMenuWidth: number;
103
- minMenuWidth: number;
104
- popperProps: {};
105
- isSearchable: boolean;
106
- searchThreshold: number;
107
- styles: {};
108
- options: never[];
109
- };
110
- static getDerivedStateFromProps(props: PopupSelectProps<OptionType>, state: State): Partial<State<string>> | null;
111
- componentDidMount(): void;
112
- componentWillUnmount(): void;
113
- componentDidUpdate(prevProps: PopupSelectProps<Option, IsMulti>): void;
114
- handleKeyDown: (event: KeyboardEvent) => void;
115
- handleClick: ({ target }: MouseEvent) => void;
116
- handleSelectChange: (value: ValueType<Option, IsMulti>, actionMeta: ActionMeta<Option>) => void;
117
- handleFirstPopperUpdate: () => void;
118
- /**
119
- * Opens the popup
120
- *
121
- * @param options.controlOverride - Force the popup to open when it's open state is being controlled
122
- */
123
- open: (options?: {
124
- controlOverride?: boolean | undefined;
125
- } | undefined) => void;
126
- /**
127
- * Closes the popup
128
- *
129
- * @param options.controlOverride - Force the popup to close when it's open state is being controlled
130
- */
131
- close: (options?: {
132
- controlOverride?: boolean | undefined;
133
- } | undefined) => void;
134
- resolveTargetRef: (popperRef: React.Ref<HTMLElement>) => (ref: HTMLElement) => void;
135
- resolveMenuRef: (popperRef: React.Ref<HTMLElement>) => (ref: HTMLElement) => void;
136
- getSelectRef: (ref: Select<Option, IsMulti>) => void;
137
- getItemCount: () => number;
138
- getMaxHeight: () => number | undefined;
139
- showSearchControl: () => boolean | undefined;
140
- renderSelect: () => JSX.Element | null;
141
- render(): JSX.Element;
142
- }
143
- export {};
@@ -1,19 +0,0 @@
1
- /** @jsx jsx */
2
- import { FC, ReactNode, CSSProperties } from 'react';
3
- import { jsx } from '@emotion/react';
4
- import { ControlProps, MenuProps, OptionType } from '../types';
5
- interface MenuDialogProps {
6
- maxWidth?: number | string;
7
- minWidth?: number | string;
8
- style: CSSProperties;
9
- children: ReactNode;
10
- id: string;
11
- }
12
- export declare const MenuDialog: FC<MenuDialogProps>;
13
- export declare const DummyControl: FC<ControlProps<OptionType, boolean>>;
14
- export declare const defaultComponents: {
15
- Control: FC<ControlProps<OptionType, boolean>>;
16
- DropdownIndicator: () => jsx.JSX.Element;
17
- Menu: ({ children, innerProps, ...props }: MenuProps<OptionType, boolean>) => jsx.JSX.Element;
18
- };
19
- export {};
@@ -1,2 +0,0 @@
1
- export { default } from './PopupSelect';
2
- export type { PopupSelectProps } from './PopupSelect';
@@ -1,4 +0,0 @@
1
- /// <reference types="react" />
2
- import { SelectProps, OptionType } from './types';
3
- declare const RadioSelect: ({ components, ...props }: SelectProps<OptionType>) => JSX.Element;
4
- export default RadioSelect;
@@ -1,87 +0,0 @@
1
- /// <reference types="react" />
2
- import Select from 'react-select';
3
- export declare const SelectWithoutAnalytics: {
4
- new <Option = import("./types").OptionType, IsMulti extends boolean = false>(props: import("./types").SelectProps<Option, IsMulti>): {
5
- components: Partial<import("react-select/src/components").SelectComponents<Option, IsMulti, import("react-select").GroupTypeBase<Option>>>;
6
- select: Select<Option, false, import("react-select").GroupTypeBase<Option>, import("react-select/src/Select").default<Option, false, import("react-select").GroupTypeBase<Option>>> | null;
7
- UNSAFE_componentWillReceiveProps(nextProps: import("./types").SelectProps<Option, IsMulti>): void;
8
- cacheComponents: (components: Partial<import("react-select/src/components").SelectComponents<Option, IsMulti, import("react-select").GroupTypeBase<Option>>>) => void;
9
- focus(): void;
10
- blur(): void;
11
- onSelectRef: (ref: Select<Option, false, import("react-select").GroupTypeBase<Option>, import("react-select/src/Select").default<Option, false, import("react-select").GroupTypeBase<Option>>>) => void;
12
- render(): JSX.Element;
13
- context: any;
14
- setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<import("./types").SelectProps<Option, IsMulti>>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
15
- forceUpdate(callBack?: (() => void) | undefined): void;
16
- readonly props: Readonly<import("./types").SelectProps<Option, IsMulti>> & Readonly<{
17
- children?: import("react").ReactNode;
18
- }>;
19
- state: Readonly<{}>;
20
- refs: {
21
- [key: string]: import("react").ReactInstance;
22
- };
23
- componentDidMount?(): void;
24
- shouldComponentUpdate?(nextProps: Readonly<import("./types").SelectProps<Option, IsMulti>>, nextState: Readonly<{}>, nextContext: any): boolean;
25
- componentWillUnmount?(): void;
26
- componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
27
- getSnapshotBeforeUpdate?(prevProps: Readonly<import("./types").SelectProps<Option, IsMulti>>, prevState: Readonly<{}>): any;
28
- componentDidUpdate?(prevProps: Readonly<import("./types").SelectProps<Option, IsMulti>>, prevState: Readonly<{}>, snapshot?: any): void;
29
- componentWillMount?(): void;
30
- UNSAFE_componentWillMount?(): void;
31
- componentWillReceiveProps?(nextProps: Readonly<import("./types").SelectProps<Option, IsMulti>>, nextContext: any): void;
32
- componentWillUpdate?(nextProps: Readonly<import("./types").SelectProps<Option, IsMulti>>, nextState: Readonly<{}>, nextContext: any): void;
33
- UNSAFE_componentWillUpdate?(nextProps: Readonly<import("./types").SelectProps<Option, IsMulti>>, nextState: Readonly<{}>, nextContext: any): void;
34
- };
35
- defaultProps: {
36
- validationState: string;
37
- spacing: string;
38
- onClickPreventDefault: boolean;
39
- tabSelectsValue: boolean;
40
- components: {};
41
- styles: {};
42
- };
43
- contextType?: import("react").Context<any> | undefined;
44
- };
45
- declare const _default: {
46
- new <Option = import("./types").OptionType, IsMulti extends boolean = false>(props: import("./types").SelectProps<Option, IsMulti>): {
47
- components: Partial<import("react-select/src/components").SelectComponents<Option, IsMulti, import("react-select").GroupTypeBase<Option>>>;
48
- select: Select<Option, false, import("react-select").GroupTypeBase<Option>, import("react-select/src/Select").default<Option, false, import("react-select").GroupTypeBase<Option>>> | null;
49
- UNSAFE_componentWillReceiveProps(nextProps: import("./types").SelectProps<Option, IsMulti>): void;
50
- cacheComponents: (components: Partial<import("react-select/src/components").SelectComponents<Option, IsMulti, import("react-select").GroupTypeBase<Option>>>) => void;
51
- focus(): void;
52
- blur(): void;
53
- onSelectRef: (ref: Select<Option, false, import("react-select").GroupTypeBase<Option>, import("react-select/src/Select").default<Option, false, import("react-select").GroupTypeBase<Option>>>) => void;
54
- render(): JSX.Element;
55
- context: any;
56
- setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<import("./types").SelectProps<Option, IsMulti>>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
57
- forceUpdate(callBack?: (() => void) | undefined): void;
58
- readonly props: Readonly<import("./types").SelectProps<Option, IsMulti>> & Readonly<{
59
- children?: import("react").ReactNode;
60
- }>;
61
- state: Readonly<{}>;
62
- refs: {
63
- [key: string]: import("react").ReactInstance;
64
- };
65
- componentDidMount?(): void;
66
- shouldComponentUpdate?(nextProps: Readonly<import("./types").SelectProps<Option, IsMulti>>, nextState: Readonly<{}>, nextContext: any): boolean;
67
- componentWillUnmount?(): void;
68
- componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
69
- getSnapshotBeforeUpdate?(prevProps: Readonly<import("./types").SelectProps<Option, IsMulti>>, prevState: Readonly<{}>): any;
70
- componentDidUpdate?(prevProps: Readonly<import("./types").SelectProps<Option, IsMulti>>, prevState: Readonly<{}>, snapshot?: any): void;
71
- componentWillMount?(): void;
72
- UNSAFE_componentWillMount?(): void;
73
- componentWillReceiveProps?(nextProps: Readonly<import("./types").SelectProps<Option, IsMulti>>, nextContext: any): void;
74
- componentWillUpdate?(nextProps: Readonly<import("./types").SelectProps<Option, IsMulti>>, nextState: Readonly<{}>, nextContext: any): void;
75
- UNSAFE_componentWillUpdate?(nextProps: Readonly<import("./types").SelectProps<Option, IsMulti>>, nextState: Readonly<{}>, nextContext: any): void;
76
- };
77
- defaultProps: {
78
- validationState: string;
79
- spacing: string;
80
- onClickPreventDefault: boolean;
81
- tabSelectsValue: boolean;
82
- components: {};
83
- styles: {};
84
- };
85
- contextType?: import("react").Context<any> | undefined;
86
- };
87
- export default _default;
@@ -1,5 +0,0 @@
1
- /** @jsx jsx */
2
- import { jsx } from '@emotion/react';
3
- export { ClearIndicator, DropdownIndicator, LoadingIndicator, } from './indicators';
4
- export declare const MultiValueRemove: (props: any) => jsx.JSX.Element;
5
- export declare const IndicatorSeparator: null;
@@ -1,5 +0,0 @@
1
- import { FC } from 'react';
2
- import { IndicatorProps } from '../types';
3
- export declare const ClearIndicator: FC<IndicatorProps<any, any>>;
4
- export declare const DropdownIndicator: FC<IndicatorProps<any, any>>;
5
- export declare const LoadingIndicator: FC<any>;
@@ -1,4 +0,0 @@
1
- import { FC } from 'react';
2
- import { OptionProps, OptionType } from '../types';
3
- export declare const CheckboxOption: FC<OptionProps<OptionType, true>>;
4
- export declare const RadioOption: FC<OptionProps>;
@@ -1,45 +0,0 @@
1
- import React, { ComponentType } from 'react';
2
- import Select from 'react-select';
3
- import { SelectProps, SelectComponentsConfig, OptionType } from './types';
4
- export default function createSelect(WrappedComponent: ComponentType<any>): {
5
- new <Option = OptionType, IsMulti extends boolean = false>(props: SelectProps<Option, IsMulti>): {
6
- components: Partial<import("react-select/src/components").SelectComponents<Option, IsMulti, import("react-select").GroupTypeBase<Option>>>;
7
- select: Select<Option, false, import("react-select").GroupTypeBase<Option>, import("react-select/src/Select").default<Option, false, import("react-select").GroupTypeBase<Option>>> | null;
8
- UNSAFE_componentWillReceiveProps(nextProps: SelectProps<Option, IsMulti>): void;
9
- cacheComponents: (components: Partial<import("react-select/src/components").SelectComponents<Option, IsMulti, import("react-select").GroupTypeBase<Option>>>) => void;
10
- focus(): void;
11
- blur(): void;
12
- onSelectRef: (ref: Select<Option, false, import("react-select").GroupTypeBase<Option>, import("react-select/src/Select").default<Option, false, import("react-select").GroupTypeBase<Option>>>) => void;
13
- render(): JSX.Element;
14
- context: any;
15
- setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<SelectProps<Option, IsMulti>>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
16
- forceUpdate(callBack?: (() => void) | undefined): void;
17
- readonly props: Readonly<SelectProps<Option, IsMulti>> & Readonly<{
18
- children?: React.ReactNode;
19
- }>;
20
- state: Readonly<{}>;
21
- refs: {
22
- [key: string]: React.ReactInstance;
23
- };
24
- componentDidMount?(): void;
25
- shouldComponentUpdate?(nextProps: Readonly<SelectProps<Option, IsMulti>>, nextState: Readonly<{}>, nextContext: any): boolean;
26
- componentWillUnmount?(): void;
27
- componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
28
- getSnapshotBeforeUpdate?(prevProps: Readonly<SelectProps<Option, IsMulti>>, prevState: Readonly<{}>): any;
29
- componentDidUpdate?(prevProps: Readonly<SelectProps<Option, IsMulti>>, prevState: Readonly<{}>, snapshot?: any): void;
30
- componentWillMount?(): void;
31
- UNSAFE_componentWillMount?(): void;
32
- componentWillReceiveProps?(nextProps: Readonly<SelectProps<Option, IsMulti>>, nextContext: any): void;
33
- componentWillUpdate?(nextProps: Readonly<SelectProps<Option, IsMulti>>, nextState: Readonly<{}>, nextContext: any): void;
34
- UNSAFE_componentWillUpdate?(nextProps: Readonly<SelectProps<Option, IsMulti>>, nextState: Readonly<{}>, nextContext: any): void;
35
- };
36
- defaultProps: {
37
- validationState: string;
38
- spacing: string;
39
- onClickPreventDefault: boolean;
40
- tabSelectsValue: boolean;
41
- components: {};
42
- styles: {};
43
- };
44
- contextType?: React.Context<any> | undefined;
45
- };
@@ -1,19 +0,0 @@
1
- interface Country {
2
- abbr: string;
3
- code: string;
4
- icon: string;
5
- name: string;
6
- suggested?: boolean;
7
- }
8
- export declare const allCountries: Array<Country>;
9
- export declare const groupedCountries: readonly [
10
- {
11
- readonly label: "Suggested";
12
- readonly options: Country[];
13
- },
14
- {
15
- readonly label: "All Countries";
16
- readonly options: Country[];
17
- }
18
- ];
19
- export {};
@@ -1,2 +0,0 @@
1
- import { SelectProps, OptionType } from './types';
2
- export default function ertHackForSelect(_: SelectProps<OptionType>): void;
@@ -1,14 +0,0 @@
1
- export { components, createFilter, mergeStyles } from 'react-select';
2
- export { makeAsyncSelect } from 'react-select/async';
3
- export { makeCreatableSelect } from 'react-select/creatable';
4
- export { CheckboxOption, RadioOption } from './components/input-options';
5
- export { default, SelectWithoutAnalytics } from './Select';
6
- export { default as AsyncSelect } from './AsyncSelect';
7
- export { default as CheckboxSelect } from './CheckboxSelect';
8
- export { default as CountrySelect } from './CountrySelect';
9
- export { default as RadioSelect } from './RadioSelect';
10
- export { default as CreatableSelect } from './CreatableSelect';
11
- export { default as AsyncCreatableSelect } from './AsyncCreatableSelect';
12
- export { default as PopupSelect } from './PopupSelect';
13
- export type { PopupSelectProps } from './PopupSelect';
14
- export type { ActionMeta, ControlProps, FormatOptionLabelMeta, IndicatorComponentType, IndicatorProps, InputActionMeta, InputProps, MenuProps, MenuListComponentProps, OptionProps, OptionsType, OptionType, SelectComponentsConfig, SelectProps, StylesConfig, ValueContainerProps, ValueType, GroupedOptionsType, GroupType, } from './types';
@@ -1,2 +0,0 @@
1
- import { StylesConfig, ValidationState } from './types';
2
- export default function baseStyles<Option, IsMulti extends boolean>(validationState: ValidationState, isCompact: boolean | undefined, appearance: 'default' | 'subtle' | 'none'): StylesConfig<Option, IsMulti>;
@@ -1,45 +0,0 @@
1
- /// <reference types="react" />
2
- import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
3
- import { Props as ReactSelectProps, FormatOptionLabelMeta as RSFormatOptionLabelMeta, ValueType as RSValueType, ActionMeta as RSActionMeta, GroupTypeBase as GroupType, OptionsType as RSOptionsType, SelectComponentsConfig as RSSelectComponentsConfig, IndicatorComponentType as RSIndicatorComponentType, StylesConfig as RSStylesConfig, InputActionMeta as RSInputActionMeta, IndicatorProps as RSIndicatorProps, ControlProps as RSControlProps, GroupProps as RSGroupProps, InputProps, MenuProps as RSMenuProps, MenuListComponentProps as RSMenuListComponentProps, MultiValueProps, OptionProps as ReactSelectOptionProps, PlaceholderProps as RSPlaceholderProps, SingleValueProps, ValueContainerProps as RSValueContainerProps, GroupedOptionsType } from 'react-select';
4
- import { AsyncProps as ReactAsyncSelectProps } from 'react-select/async';
5
- export declare type ValidationState = 'default' | 'error' | 'success';
6
- export interface OptionType {
7
- [key: string]: any;
8
- label: string;
9
- value: string | number;
10
- }
11
- export declare type OptionsType<Option = OptionType> = RSOptionsType<Option>;
12
- export interface OptionProps<Option = OptionType, IsMulti extends boolean = false> extends ReactSelectOptionProps<Option, IsMulti> {
13
- [key: string]: any;
14
- Icon?: React.ComponentType<{
15
- label: string;
16
- size?: 'small' | 'medium' | 'large' | 'xlarge';
17
- onClick?: (e: MouseEvent) => void;
18
- primaryColor?: string;
19
- secondaryColor?: string;
20
- }>;
21
- isDisabled: boolean;
22
- isFocused: boolean;
23
- isSelected: boolean;
24
- }
25
- export interface SelectProps<OptionType, IsMulti extends boolean = false> extends ReactSelectProps<OptionType, IsMulti>, WithAnalyticsEventsProps {
26
- spacing?: 'compact' | 'default';
27
- validationState?: ValidationState;
28
- appearance?: 'default' | 'subtle' | 'none';
29
- isInvalid?: boolean;
30
- }
31
- export declare type ActionMeta<Option = OptionType> = RSActionMeta<Option>;
32
- export declare type InputActionMeta = RSInputActionMeta;
33
- export declare type ControlProps<OptionType, IsMulti extends boolean = false> = RSControlProps<OptionType, IsMulti>;
34
- export declare type FormatOptionLabelMeta<OptionType, IsMulti extends boolean = false> = RSFormatOptionLabelMeta<OptionType, IsMulti>;
35
- export declare type IndicatorProps<OptionType, IsMulti extends boolean = false> = RSIndicatorProps<OptionType, IsMulti>;
36
- export declare type IndicatorComponentType<OptionType, IsMulti extends boolean = false> = RSIndicatorComponentType<OptionType, IsMulti>;
37
- export declare type ValueType<OptionType, IsMulti extends boolean = false> = RSValueType<OptionType, IsMulti>;
38
- export declare type StylesConfig<Option = OptionType, IsMulti extends boolean = false> = RSStylesConfig<Option, IsMulti>;
39
- export declare type SelectComponentsConfig<OptionType, IsMulti extends boolean = false> = RSSelectComponentsConfig<OptionType, IsMulti>;
40
- export declare type GroupProps<OptionType, IsMulti extends boolean = false> = RSGroupProps<OptionType, IsMulti>;
41
- export declare type MenuProps<OptionType, IsMulti extends boolean = false> = RSMenuProps<OptionType, IsMulti>;
42
- export declare type MenuListComponentProps<OptionType, IsMulti extends boolean = false> = RSMenuListComponentProps<OptionType, IsMulti>;
43
- export declare type PlaceholderProps<OptionType, IsMulti extends boolean = false> = RSPlaceholderProps<OptionType, IsMulti>;
44
- export declare type ValueContainerProps<OptionType, IsMulti extends boolean = false> = RSValueContainerProps<OptionType, IsMulti>;
45
- export type { GroupType, InputProps, MultiValueProps, ReactAsyncSelectProps, ReactSelectProps, SingleValueProps, GroupedOptionsType, };