@atlaskit/select 15.6.0 → 15.7.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 +30 -0
- package/dist/cjs/CountrySelect.js +8 -8
- package/dist/cjs/PopupSelect/PopupSelect.js +28 -24
- package/dist/cjs/PopupSelect/components.js +8 -8
- package/dist/cjs/Select.js +1 -1
- package/dist/cjs/components/index.js +14 -3
- package/dist/cjs/components/indicators.js +5 -5
- package/dist/cjs/components/input-options.js +44 -37
- package/dist/cjs/createSelect.js +4 -2
- package/dist/cjs/styles.js +8 -15
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/CountrySelect.js +1 -1
- package/dist/es2019/PopupSelect/PopupSelect.js +21 -18
- package/dist/es2019/PopupSelect/components.js +1 -1
- package/dist/es2019/Select.js +1 -1
- package/dist/es2019/components/index.js +22 -7
- package/dist/es2019/components/indicators.js +1 -1
- package/dist/es2019/components/input-options.js +46 -39
- package/dist/es2019/createSelect.js +3 -1
- package/dist/es2019/styles.js +6 -15
- package/dist/es2019/version.json +1 -1
- package/dist/esm/CountrySelect.js +1 -1
- package/dist/esm/PopupSelect/PopupSelect.js +28 -24
- package/dist/esm/PopupSelect/components.js +1 -1
- package/dist/esm/Select.js +1 -1
- package/dist/esm/components/index.js +14 -3
- package/dist/esm/components/indicators.js +1 -1
- package/dist/esm/components/input-options.js +40 -33
- package/dist/esm/createSelect.js +4 -2
- package/dist/esm/styles.js +8 -15
- package/dist/esm/version.json +1 -1
- package/dist/types/AsyncCreatableSelect.d.ts +1 -0
- package/dist/types/AsyncSelect.d.ts +1 -0
- package/dist/types/CountrySelect.d.ts +3 -2
- package/dist/types/CreatableSelect.d.ts +1 -0
- package/dist/types/PopupSelect/PopupSelect.d.ts +16 -6
- package/dist/types/PopupSelect/components.d.ts +3 -2
- package/dist/types/Select.d.ts +2 -0
- package/dist/types/components/index.d.ts +3 -2
- package/dist/types/createSelect.d.ts +1 -0
- package/dist/types/styles.d.ts +1 -1
- package/dist/types/types.d.ts +1 -0
- package/package.json +11 -11
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { PureComponent, ReactNode } from 'react';
|
|
2
2
|
import Select from 'react-select';
|
|
3
3
|
import { PopperProps } from 'react-popper';
|
|
4
|
-
import { OptionType, ActionMeta, ReactSelectProps, StylesConfig, ValueType } from '../types';
|
|
4
|
+
import { OptionType, ActionMeta, ReactSelectProps, StylesConfig, ValueType, ValidationState } from '../types';
|
|
5
5
|
import { UnbindFn } from 'bind-event-listener';
|
|
6
6
|
declare type defaultModifiers = 'offset' | 'preventOverflow';
|
|
7
7
|
declare type PopperPropsNoChildren<Modifiers> = Omit<PopperProps<Modifiers>, 'children'>;
|
|
@@ -11,7 +11,8 @@ interface PopupSelectTriggerProps {
|
|
|
11
11
|
'aria-expanded': boolean;
|
|
12
12
|
'aria-controls'?: string;
|
|
13
13
|
}
|
|
14
|
-
|
|
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> {
|
|
15
16
|
/**
|
|
16
17
|
* Defines whether the menu should close when selected. Defaults to "true"
|
|
17
18
|
*/
|
|
@@ -29,9 +30,14 @@ export interface PopupSelectProps<Option = OptionType, IsMulti extends boolean =
|
|
|
29
30
|
*/
|
|
30
31
|
popperProps?: PopperPropsNoChildren<Modifiers>;
|
|
31
32
|
/**
|
|
32
|
-
* The maximum number of options the
|
|
33
|
+
* The maximum number of options the select can contain without rendering the search field. Defaults to 5.
|
|
33
34
|
*/
|
|
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;
|
|
35
41
|
/**
|
|
36
42
|
* The maximum width for the popup menu. Can be a number, representing width in pixels,
|
|
37
43
|
* or a string containing a CSS length datatype.
|
|
@@ -59,6 +65,9 @@ export interface PopupSelectProps<Option = OptionType, IsMulti extends boolean =
|
|
|
59
65
|
}) => ReactNode;
|
|
60
66
|
isOpen?: boolean;
|
|
61
67
|
defaultIsOpen?: boolean;
|
|
68
|
+
spacing?: string;
|
|
69
|
+
validationState?: ValidationState;
|
|
70
|
+
isInvalid?: boolean;
|
|
62
71
|
}
|
|
63
72
|
interface State<Modifiers = string> {
|
|
64
73
|
isOpen: boolean;
|
|
@@ -78,8 +87,8 @@ export default class PopupSelect<Option = OptionType, IsMulti extends boolean =
|
|
|
78
87
|
isOpen: boolean;
|
|
79
88
|
mergedComponents: {
|
|
80
89
|
Control: React.FC<import("../types").ControlProps<OptionType, boolean>>;
|
|
81
|
-
DropdownIndicator: () => JSX.Element;
|
|
82
|
-
Menu: ({ children, innerProps, ...props }: import("../types").MenuProps<OptionType, boolean>) => JSX.Element;
|
|
90
|
+
DropdownIndicator: () => import("@emotion/react").jsx.JSX.Element;
|
|
91
|
+
Menu: ({ children, innerProps, ...props }: import("../types").MenuProps<OptionType, boolean>) => import("@emotion/react").jsx.JSX.Element;
|
|
83
92
|
};
|
|
84
93
|
mergedPopperProps: PopperPropsNoChildren<string>;
|
|
85
94
|
};
|
|
@@ -91,6 +100,7 @@ export default class PopupSelect<Option = OptionType, IsMulti extends boolean =
|
|
|
91
100
|
maxMenuWidth: number;
|
|
92
101
|
minMenuWidth: number;
|
|
93
102
|
popperProps: {};
|
|
103
|
+
isSearchable: boolean;
|
|
94
104
|
searchThreshold: number;
|
|
95
105
|
styles: {};
|
|
96
106
|
options: never[];
|
|
@@ -123,7 +133,7 @@ export default class PopupSelect<Option = OptionType, IsMulti extends boolean =
|
|
|
123
133
|
getSelectRef: (ref: Select<Option, IsMulti>) => void;
|
|
124
134
|
getItemCount: () => number;
|
|
125
135
|
getMaxHeight: () => number | undefined;
|
|
126
|
-
showSearchControl: () => boolean;
|
|
136
|
+
showSearchControl: () => boolean | undefined;
|
|
127
137
|
renderSelect: () => JSX.Element | null;
|
|
128
138
|
render(): JSX.Element;
|
|
129
139
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { FC, ReactNode, CSSProperties } from 'react';
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
3
4
|
import { ControlProps, MenuProps, OptionType } from '../types';
|
|
4
5
|
interface MenuDialogProps {
|
|
5
6
|
maxWidth?: number | string;
|
|
@@ -12,7 +13,7 @@ export declare const MenuDialog: FC<MenuDialogProps>;
|
|
|
12
13
|
export declare const DummyControl: FC<ControlProps<OptionType, boolean>>;
|
|
13
14
|
export declare const defaultComponents: {
|
|
14
15
|
Control: FC<ControlProps<OptionType, boolean>>;
|
|
15
|
-
DropdownIndicator: () => JSX.Element;
|
|
16
|
-
Menu: ({ children, innerProps, ...props }: MenuProps<OptionType, boolean>) => JSX.Element;
|
|
16
|
+
DropdownIndicator: () => jsx.JSX.Element;
|
|
17
|
+
Menu: ({ children, innerProps, ...props }: MenuProps<OptionType, boolean>) => jsx.JSX.Element;
|
|
17
18
|
};
|
|
18
19
|
export {};
|
package/dist/types/Select.d.ts
CHANGED
|
@@ -34,6 +34,7 @@ export declare const SelectWithoutAnalytics: {
|
|
|
34
34
|
};
|
|
35
35
|
defaultProps: {
|
|
36
36
|
validationState: string;
|
|
37
|
+
isInvalid: boolean;
|
|
37
38
|
spacing: string;
|
|
38
39
|
onClickPreventDefault: boolean;
|
|
39
40
|
tabSelectsValue: boolean;
|
|
@@ -76,6 +77,7 @@ declare const _default: {
|
|
|
76
77
|
};
|
|
77
78
|
defaultProps: {
|
|
78
79
|
validationState: string;
|
|
80
|
+
isInvalid: boolean;
|
|
79
81
|
spacing: string;
|
|
80
82
|
onClickPreventDefault: boolean;
|
|
81
83
|
tabSelectsValue: boolean;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
2
3
|
export { ClearIndicator, DropdownIndicator, LoadingIndicator, } from './indicators';
|
|
3
|
-
export declare const MultiValueRemove: (props: any) => JSX.Element;
|
|
4
|
+
export declare const MultiValueRemove: (props: any) => jsx.JSX.Element;
|
|
4
5
|
export declare const IndicatorSeparator: null;
|
package/dist/types/styles.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { StylesConfig, ValidationState } from './types';
|
|
2
|
-
export default function baseStyles<Option, IsMulti extends boolean>(validationState: ValidationState, isCompact: boolean, appearance: 'default' | 'subtle' | 'none'): StylesConfig<Option, IsMulti>;
|
|
2
|
+
export default function baseStyles<Option, IsMulti extends boolean>(validationState: ValidationState, isCompact: boolean | undefined, appearance: 'default' | 'subtle' | 'none'): StylesConfig<Option, IsMulti>;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -26,6 +26,7 @@ export interface SelectProps<OptionType, IsMulti extends boolean = false> extend
|
|
|
26
26
|
spacing?: 'compact' | 'default';
|
|
27
27
|
validationState?: ValidationState;
|
|
28
28
|
appearance?: 'default' | 'subtle' | 'none';
|
|
29
|
+
isInvalid?: boolean;
|
|
29
30
|
}
|
|
30
31
|
export declare type ActionMeta<Option = OptionType> = RSActionMeta<Option>;
|
|
31
32
|
export declare type InputActionMeta = RSInputActionMeta;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/select",
|
|
3
|
-
"version": "15.
|
|
3
|
+
"version": "15.7.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/"
|
|
@@ -27,11 +27,11 @@
|
|
|
27
27
|
"@atlaskit/analytics-next": "^8.2.0",
|
|
28
28
|
"@atlaskit/icon": "^21.10.0",
|
|
29
29
|
"@atlaskit/spinner": "^15.0.0",
|
|
30
|
-
"@atlaskit/theme": "^12.
|
|
30
|
+
"@atlaskit/theme": "^12.2.0",
|
|
31
31
|
"@atlaskit/tokens": "^0.10.0",
|
|
32
|
-
"@atlaskit/visually-hidden": "^1.
|
|
32
|
+
"@atlaskit/visually-hidden": "^1.1.0",
|
|
33
33
|
"@babel/runtime": "^7.0.0",
|
|
34
|
-
"@emotion/
|
|
34
|
+
"@emotion/react": "^11.7.1",
|
|
35
35
|
"@popperjs/core": "^2.9.1",
|
|
36
36
|
"@types/react-select": "^4.0.18",
|
|
37
37
|
"bind-event-listener": "^2.1.1",
|
|
@@ -52,18 +52,18 @@
|
|
|
52
52
|
"@atlaskit/button": "^16.3.0",
|
|
53
53
|
"@atlaskit/checkbox": "^12.2.0",
|
|
54
54
|
"@atlaskit/docs": "*",
|
|
55
|
-
"@atlaskit/drawer": "^7.
|
|
55
|
+
"@atlaskit/drawer": "^7.2.0",
|
|
56
56
|
"@atlaskit/form": "^8.5.0",
|
|
57
|
-
"@atlaskit/logo": "^13.
|
|
58
|
-
"@atlaskit/modal-dialog": "^12.
|
|
59
|
-
"@atlaskit/radio": "^5.
|
|
60
|
-
"@atlaskit/section-message": "^6.
|
|
57
|
+
"@atlaskit/logo": "^13.9.0",
|
|
58
|
+
"@atlaskit/modal-dialog": "^12.3.0",
|
|
59
|
+
"@atlaskit/radio": "^5.4.0",
|
|
60
|
+
"@atlaskit/section-message": "^6.2.0",
|
|
61
61
|
"@atlaskit/ssr": "*",
|
|
62
62
|
"@atlaskit/tooltip": "^17.5.0",
|
|
63
63
|
"@atlaskit/visual-regression": "*",
|
|
64
64
|
"@atlaskit/webdriver-runner": "*",
|
|
65
65
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
66
|
-
"@emotion/styled": "^
|
|
66
|
+
"@emotion/styled": "^11.0.0",
|
|
67
67
|
"@testing-library/react": "^8.0.1",
|
|
68
68
|
"@testing-library/user-event": "10.4.0",
|
|
69
69
|
"ast-types": "^0.13.3",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"jscodeshift": "^0.13.0",
|
|
72
72
|
"react-dom": "^16.8.0",
|
|
73
73
|
"react-value": "^0.2.0",
|
|
74
|
-
"typescript": "4.
|
|
74
|
+
"typescript": "4.3.5",
|
|
75
75
|
"wait-for-expect": "^1.2.0"
|
|
76
76
|
},
|
|
77
77
|
"techstack": {
|