@atlaskit/react-select 3.0.1 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/dist/types/select.d.ts +7 -2
- package/dist/types/styles.d.ts +21 -21
- package/dist/types/types.d.ts +1 -4
- package/dist/types/utils.d.ts +1 -1
- package/dist/types-ts4.5/select.d.ts +7 -2
- package/dist/types-ts4.5/styles.d.ts +21 -21
- package/dist/types-ts4.5/types.d.ts +1 -4
- package/dist/types-ts4.5/utils.d.ts +1 -1
- package/package.json +2 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/react-select
|
|
2
2
|
|
|
3
|
+
## 3.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#180250](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/180250)
|
|
8
|
+
[`105957fce131e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/105957fce131e) -
|
|
9
|
+
Deprecation of the `className` prop. If `className` is used for testing purposes, you should use
|
|
10
|
+
`testId` as an appropriate locator. If using `className` for styling purposes, use the
|
|
11
|
+
`components` API with the `xcss` prop.
|
|
12
|
+
|
|
13
|
+
## 3.0.2
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- [#178284](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/178284)
|
|
18
|
+
[`1c7de1d8fc547`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/1c7de1d8fc547) -
|
|
19
|
+
Remove emotion dependency
|
|
20
|
+
|
|
3
21
|
## 3.0.1
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
package/dist/types/select.d.ts
CHANGED
|
@@ -81,6 +81,11 @@ export interface SelectProps<Option, IsMulti extends boolean, Group extends Grou
|
|
|
81
81
|
captureMenuScroll: boolean;
|
|
82
82
|
/**
|
|
83
83
|
* Sets a className attribute on the outer component
|
|
84
|
+
*
|
|
85
|
+
*
|
|
86
|
+
* @deprecated {@link https://hello.atlassian.net/browse/ENGHEALTH-14529 Internal documentation for deprecation (no external access)}
|
|
87
|
+
* If used for testing purposes, use the `testId` prop as a locator instead.
|
|
88
|
+
* If used for styling purposes, use the `components` API with the xcss prop
|
|
84
89
|
*/
|
|
85
90
|
className?: string;
|
|
86
91
|
/**
|
|
@@ -604,7 +609,7 @@ export default class Select<Option = unknown, IsMulti extends boolean = false, G
|
|
|
604
609
|
getCommonProps(): {
|
|
605
610
|
clearValue: () => void;
|
|
606
611
|
cx: (...args: any) => string;
|
|
607
|
-
getStyles: <Key extends keyof StylesProps<Option, IsMulti, Group>>(key: Key, props: StylesProps<Option, IsMulti, Group>[Key]) =>
|
|
612
|
+
getStyles: <Key extends keyof StylesProps<Option, IsMulti, Group>>(key: Key, props: StylesProps<Option, IsMulti, Group>[Key]) => any;
|
|
608
613
|
getClassNames: <Key_1 extends keyof StylesProps<Option, IsMulti, Group>>(key: Key_1, props: StylesProps<Option, IsMulti, Group>[Key_1]) => string | undefined;
|
|
609
614
|
getValue: () => Options<Option>;
|
|
610
615
|
hasValue: boolean;
|
|
@@ -617,7 +622,7 @@ export default class Select<Option = unknown, IsMulti extends boolean = false, G
|
|
|
617
622
|
};
|
|
618
623
|
getOptionLabel: (data: Option) => string;
|
|
619
624
|
getOptionValue: (data: Option) => string;
|
|
620
|
-
getStyles: <Key extends keyof StylesProps<Option, IsMulti, Group>>(key: Key, props: StylesProps<Option, IsMulti, Group>[Key]) =>
|
|
625
|
+
getStyles: <Key extends keyof StylesProps<Option, IsMulti, Group>>(key: Key, props: StylesProps<Option, IsMulti, Group>[Key]) => any;
|
|
621
626
|
getClassNames: <Key extends keyof StylesProps<Option, IsMulti, Group>>(key: Key, props: StylesProps<Option, IsMulti, Group>[Key]) => string | undefined;
|
|
622
627
|
getElementId: (element: 'group' | 'input' | 'listbox' | 'option' | 'placeholder' | 'live-region' | 'multi-message' | 'single-value' | 'selected-value') => string;
|
|
623
628
|
getComponents: () => {
|
package/dist/types/styles.d.ts
CHANGED
|
@@ -42,25 +42,25 @@ export type ClassNamesConfig<Option = unknown, IsMulti extends boolean = boolean
|
|
|
42
42
|
[K in keyof StylesProps<Option, IsMulti, Group>]?: (props: StylesProps<Option, IsMulti, Group>[K]) => string;
|
|
43
43
|
};
|
|
44
44
|
export declare function mergeStyles<Option, IsMulti extends boolean, Group extends GroupBase<Option>>(source: StylesConfig<Option, IsMulti, Group>, target?: StylesConfig<Option, IsMulti, Group>): {
|
|
45
|
-
clearIndicator?: ((base:
|
|
46
|
-
container?: ((base:
|
|
47
|
-
control?: ((base:
|
|
48
|
-
dropdownIndicator?: ((base:
|
|
49
|
-
group?: ((base:
|
|
50
|
-
groupHeading?: ((base:
|
|
51
|
-
indicatorsContainer?: ((base:
|
|
52
|
-
input?: ((base:
|
|
53
|
-
loadingIndicator?: ((base:
|
|
54
|
-
loadingMessage?: ((base:
|
|
55
|
-
menu?: ((base:
|
|
56
|
-
menuList?: ((base:
|
|
57
|
-
menuPortal?: ((base:
|
|
58
|
-
multiValue?: ((base:
|
|
59
|
-
multiValueLabel?: ((base:
|
|
60
|
-
multiValueRemove?: ((base:
|
|
61
|
-
noOptionsMessage?: ((base:
|
|
62
|
-
option?: ((base:
|
|
63
|
-
placeholder?: ((base:
|
|
64
|
-
singleValue?: ((base:
|
|
65
|
-
valueContainer?: ((base:
|
|
45
|
+
clearIndicator?: ((base: any, props: ClearIndicatorProps<Option, IsMulti, Group>) => any) | undefined;
|
|
46
|
+
container?: ((base: any, props: ContainerProps<Option, IsMulti, Group>) => any) | undefined;
|
|
47
|
+
control?: ((base: any, props: ControlProps<Option, IsMulti, Group>) => any) | undefined;
|
|
48
|
+
dropdownIndicator?: ((base: any, props: DropdownIndicatorProps<Option, IsMulti, Group>) => any) | undefined;
|
|
49
|
+
group?: ((base: any, props: GroupProps<Option, IsMulti, Group>) => any) | undefined;
|
|
50
|
+
groupHeading?: ((base: any, props: GroupHeadingProps<Option, IsMulti, Group>) => any) | undefined;
|
|
51
|
+
indicatorsContainer?: ((base: any, props: IndicatorsContainerProps<Option, IsMulti, Group>) => any) | undefined;
|
|
52
|
+
input?: ((base: any, props: InputProps<Option, IsMulti, Group>) => any) | undefined;
|
|
53
|
+
loadingIndicator?: ((base: any, props: LoadingIndicatorProps<Option, IsMulti, Group>) => any) | undefined;
|
|
54
|
+
loadingMessage?: ((base: any, props: NoticeProps<Option, IsMulti, Group>) => any) | undefined;
|
|
55
|
+
menu?: ((base: any, props: MenuProps<Option, IsMulti, Group>) => any) | undefined;
|
|
56
|
+
menuList?: ((base: any, props: MenuListProps<Option, IsMulti, Group>) => any) | undefined;
|
|
57
|
+
menuPortal?: ((base: any, props: PortalStyleArgs) => any) | undefined;
|
|
58
|
+
multiValue?: ((base: any, props: MultiValueProps<Option, IsMulti, Group>) => any) | undefined;
|
|
59
|
+
multiValueLabel?: ((base: any, props: MultiValueProps<Option, IsMulti, Group>) => any) | undefined;
|
|
60
|
+
multiValueRemove?: ((base: any, props: MultiValueProps<Option, IsMulti, Group>) => any) | undefined;
|
|
61
|
+
noOptionsMessage?: ((base: any, props: NoticeProps<Option, IsMulti, Group>) => any) | undefined;
|
|
62
|
+
option?: ((base: any, props: OptionProps<Option, IsMulti, Group>) => any) | undefined;
|
|
63
|
+
placeholder?: ((base: any, props: PlaceholderProps<Option, IsMulti, Group>) => any) | undefined;
|
|
64
|
+
singleValue?: ((base: any, props: SingleValueProps<Option, IsMulti, Group>) => any) | undefined;
|
|
65
|
+
valueContainer?: ((base: any, props: ValueContainerProps<Option, IsMulti, Group>) => any) | undefined;
|
|
66
66
|
};
|
package/dist/types/types.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { type XCSSProp } from '@compiled/react';
|
|
2
|
-
import { type CSSObject } from '@emotion/react';
|
|
3
2
|
import type { XCSSAllProperties, XCSSAllPseudos } from '@atlaskit/css';
|
|
4
3
|
import { type SelectProps } from './select';
|
|
5
4
|
import { type StylesProps } from './styles';
|
|
@@ -127,6 +126,4 @@ export type MenuPosition = 'absolute' | 'fixed';
|
|
|
127
126
|
export type FocusDirection = 'up' | 'down' | 'pageup' | 'pagedown' | 'first' | 'last';
|
|
128
127
|
export type GetOptionLabel<Option> = (option: Option) => string;
|
|
129
128
|
export type GetOptionValue<Option> = (option: Option) => string;
|
|
130
|
-
export type CSSObjectWithLabel =
|
|
131
|
-
label?: string;
|
|
132
|
-
};
|
|
129
|
+
export type CSSObjectWithLabel = any;
|
package/dist/types/utils.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export declare function classNames(prefix?: string | null, state?: ClassNamesSta
|
|
|
5
5
|
export declare const cleanValue: <Option>(value: PropsValue<Option>) => Options<Option>;
|
|
6
6
|
export declare const cleanCommonProps: <Option, IsMulti extends boolean, Group extends GroupBase<Option>, AdditionalProps>(props: Partial<CommonPropsAndClassName<Option, IsMulti, Group>> & AdditionalProps) => Omit<AdditionalProps, keyof CommonPropsAndClassName<Option, IsMulti, Group>>;
|
|
7
7
|
export declare const getStyleProps: <Option, IsMulti extends boolean, Group extends GroupBase<Option>, Key extends keyof StylesProps<Option, IsMulti, Group>>(props: Pick<CommonPropsAndClassName<Option, IsMulti, Group>, 'cx' | 'getStyles' | 'getClassNames' | 'className'> & StylesProps<Option, IsMulti, Group>[Key], name: Key, classNamesState?: ClassNamesState) => {
|
|
8
|
-
css:
|
|
8
|
+
css: any;
|
|
9
9
|
className: string;
|
|
10
10
|
};
|
|
11
11
|
export declare function handleInputChange(inputValue: string, actionMeta: InputActionMeta, onInputChange?: (newValue: string, actionMeta: InputActionMeta) => string | void): string;
|
|
@@ -81,6 +81,11 @@ export interface SelectProps<Option, IsMulti extends boolean, Group extends Grou
|
|
|
81
81
|
captureMenuScroll: boolean;
|
|
82
82
|
/**
|
|
83
83
|
* Sets a className attribute on the outer component
|
|
84
|
+
*
|
|
85
|
+
*
|
|
86
|
+
* @deprecated {@link https://hello.atlassian.net/browse/ENGHEALTH-14529 Internal documentation for deprecation (no external access)}
|
|
87
|
+
* If used for testing purposes, use the `testId` prop as a locator instead.
|
|
88
|
+
* If used for styling purposes, use the `components` API with the xcss prop
|
|
84
89
|
*/
|
|
85
90
|
className?: string;
|
|
86
91
|
/**
|
|
@@ -604,7 +609,7 @@ export default class Select<Option = unknown, IsMulti extends boolean = false, G
|
|
|
604
609
|
getCommonProps(): {
|
|
605
610
|
clearValue: () => void;
|
|
606
611
|
cx: (...args: any) => string;
|
|
607
|
-
getStyles: <Key extends keyof StylesProps<Option, IsMulti, Group>>(key: Key, props: StylesProps<Option, IsMulti, Group>[Key]) =>
|
|
612
|
+
getStyles: <Key extends keyof StylesProps<Option, IsMulti, Group>>(key: Key, props: StylesProps<Option, IsMulti, Group>[Key]) => any;
|
|
608
613
|
getClassNames: <Key_1 extends keyof StylesProps<Option, IsMulti, Group>>(key: Key_1, props: StylesProps<Option, IsMulti, Group>[Key_1]) => string | undefined;
|
|
609
614
|
getValue: () => Options<Option>;
|
|
610
615
|
hasValue: boolean;
|
|
@@ -617,7 +622,7 @@ export default class Select<Option = unknown, IsMulti extends boolean = false, G
|
|
|
617
622
|
};
|
|
618
623
|
getOptionLabel: (data: Option) => string;
|
|
619
624
|
getOptionValue: (data: Option) => string;
|
|
620
|
-
getStyles: <Key extends keyof StylesProps<Option, IsMulti, Group>>(key: Key, props: StylesProps<Option, IsMulti, Group>[Key]) =>
|
|
625
|
+
getStyles: <Key extends keyof StylesProps<Option, IsMulti, Group>>(key: Key, props: StylesProps<Option, IsMulti, Group>[Key]) => any;
|
|
621
626
|
getClassNames: <Key extends keyof StylesProps<Option, IsMulti, Group>>(key: Key, props: StylesProps<Option, IsMulti, Group>[Key]) => string | undefined;
|
|
622
627
|
getElementId: (element: 'group' | 'input' | 'listbox' | 'option' | 'placeholder' | 'live-region' | 'multi-message' | 'single-value' | 'selected-value') => string;
|
|
623
628
|
getComponents: () => {
|
|
@@ -42,25 +42,25 @@ export type ClassNamesConfig<Option = unknown, IsMulti extends boolean = boolean
|
|
|
42
42
|
[K in keyof StylesProps<Option, IsMulti, Group>]?: (props: StylesProps<Option, IsMulti, Group>[K]) => string;
|
|
43
43
|
};
|
|
44
44
|
export declare function mergeStyles<Option, IsMulti extends boolean, Group extends GroupBase<Option>>(source: StylesConfig<Option, IsMulti, Group>, target?: StylesConfig<Option, IsMulti, Group>): {
|
|
45
|
-
clearIndicator?: ((base:
|
|
46
|
-
container?: ((base:
|
|
47
|
-
control?: ((base:
|
|
48
|
-
dropdownIndicator?: ((base:
|
|
49
|
-
group?: ((base:
|
|
50
|
-
groupHeading?: ((base:
|
|
51
|
-
indicatorsContainer?: ((base:
|
|
52
|
-
input?: ((base:
|
|
53
|
-
loadingIndicator?: ((base:
|
|
54
|
-
loadingMessage?: ((base:
|
|
55
|
-
menu?: ((base:
|
|
56
|
-
menuList?: ((base:
|
|
57
|
-
menuPortal?: ((base:
|
|
58
|
-
multiValue?: ((base:
|
|
59
|
-
multiValueLabel?: ((base:
|
|
60
|
-
multiValueRemove?: ((base:
|
|
61
|
-
noOptionsMessage?: ((base:
|
|
62
|
-
option?: ((base:
|
|
63
|
-
placeholder?: ((base:
|
|
64
|
-
singleValue?: ((base:
|
|
65
|
-
valueContainer?: ((base:
|
|
45
|
+
clearIndicator?: ((base: any, props: ClearIndicatorProps<Option, IsMulti, Group>) => any) | undefined;
|
|
46
|
+
container?: ((base: any, props: ContainerProps<Option, IsMulti, Group>) => any) | undefined;
|
|
47
|
+
control?: ((base: any, props: ControlProps<Option, IsMulti, Group>) => any) | undefined;
|
|
48
|
+
dropdownIndicator?: ((base: any, props: DropdownIndicatorProps<Option, IsMulti, Group>) => any) | undefined;
|
|
49
|
+
group?: ((base: any, props: GroupProps<Option, IsMulti, Group>) => any) | undefined;
|
|
50
|
+
groupHeading?: ((base: any, props: GroupHeadingProps<Option, IsMulti, Group>) => any) | undefined;
|
|
51
|
+
indicatorsContainer?: ((base: any, props: IndicatorsContainerProps<Option, IsMulti, Group>) => any) | undefined;
|
|
52
|
+
input?: ((base: any, props: InputProps<Option, IsMulti, Group>) => any) | undefined;
|
|
53
|
+
loadingIndicator?: ((base: any, props: LoadingIndicatorProps<Option, IsMulti, Group>) => any) | undefined;
|
|
54
|
+
loadingMessage?: ((base: any, props: NoticeProps<Option, IsMulti, Group>) => any) | undefined;
|
|
55
|
+
menu?: ((base: any, props: MenuProps<Option, IsMulti, Group>) => any) | undefined;
|
|
56
|
+
menuList?: ((base: any, props: MenuListProps<Option, IsMulti, Group>) => any) | undefined;
|
|
57
|
+
menuPortal?: ((base: any, props: PortalStyleArgs) => any) | undefined;
|
|
58
|
+
multiValue?: ((base: any, props: MultiValueProps<Option, IsMulti, Group>) => any) | undefined;
|
|
59
|
+
multiValueLabel?: ((base: any, props: MultiValueProps<Option, IsMulti, Group>) => any) | undefined;
|
|
60
|
+
multiValueRemove?: ((base: any, props: MultiValueProps<Option, IsMulti, Group>) => any) | undefined;
|
|
61
|
+
noOptionsMessage?: ((base: any, props: NoticeProps<Option, IsMulti, Group>) => any) | undefined;
|
|
62
|
+
option?: ((base: any, props: OptionProps<Option, IsMulti, Group>) => any) | undefined;
|
|
63
|
+
placeholder?: ((base: any, props: PlaceholderProps<Option, IsMulti, Group>) => any) | undefined;
|
|
64
|
+
singleValue?: ((base: any, props: SingleValueProps<Option, IsMulti, Group>) => any) | undefined;
|
|
65
|
+
valueContainer?: ((base: any, props: ValueContainerProps<Option, IsMulti, Group>) => any) | undefined;
|
|
66
66
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { type XCSSProp } from '@compiled/react';
|
|
2
|
-
import { type CSSObject } from '@emotion/react';
|
|
3
2
|
import type { XCSSAllProperties, XCSSAllPseudos } from '@atlaskit/css';
|
|
4
3
|
import { type SelectProps } from './select';
|
|
5
4
|
import { type StylesProps } from './styles';
|
|
@@ -127,6 +126,4 @@ export type MenuPosition = 'absolute' | 'fixed';
|
|
|
127
126
|
export type FocusDirection = 'up' | 'down' | 'pageup' | 'pagedown' | 'first' | 'last';
|
|
128
127
|
export type GetOptionLabel<Option> = (option: Option) => string;
|
|
129
128
|
export type GetOptionValue<Option> = (option: Option) => string;
|
|
130
|
-
export type CSSObjectWithLabel =
|
|
131
|
-
label?: string;
|
|
132
|
-
};
|
|
129
|
+
export type CSSObjectWithLabel = any;
|
|
@@ -5,7 +5,7 @@ export declare function classNames(prefix?: string | null, state?: ClassNamesSta
|
|
|
5
5
|
export declare const cleanValue: <Option>(value: PropsValue<Option>) => Options<Option>;
|
|
6
6
|
export declare const cleanCommonProps: <Option, IsMulti extends boolean, Group extends GroupBase<Option>, AdditionalProps>(props: Partial<CommonPropsAndClassName<Option, IsMulti, Group>> & AdditionalProps) => Omit<AdditionalProps, keyof CommonPropsAndClassName<Option, IsMulti, Group>>;
|
|
7
7
|
export declare const getStyleProps: <Option, IsMulti extends boolean, Group extends GroupBase<Option>, Key extends keyof StylesProps<Option, IsMulti, Group>>(props: Pick<CommonPropsAndClassName<Option, IsMulti, Group>, 'cx' | 'getStyles' | 'getClassNames' | 'className'> & StylesProps<Option, IsMulti, Group>[Key], name: Key, classNamesState?: ClassNamesState) => {
|
|
8
|
-
css:
|
|
8
|
+
css: any;
|
|
9
9
|
className: string;
|
|
10
10
|
};
|
|
11
11
|
export declare function handleInputChange(inputValue: string, actionMeta: InputActionMeta, onInputChange?: (newValue: string, actionMeta: InputActionMeta) => string | void): string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/react-select",
|
|
3
|
-
"version": "3.0
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"description": "A forked version of react-select to only be used in atlaskit/select",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -8,8 +8,7 @@
|
|
|
8
8
|
"registry": "https://registry.npmjs.org/"
|
|
9
9
|
},
|
|
10
10
|
"atlassian": {
|
|
11
|
-
"team": "Design System Team"
|
|
12
|
-
"runReact18": true
|
|
11
|
+
"team": "Design System Team"
|
|
13
12
|
},
|
|
14
13
|
"repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
|
|
15
14
|
"main": "dist/cjs/index.js",
|
|
@@ -38,7 +37,6 @@
|
|
|
38
37
|
"@atlaskit/tokens": "^5.4.0",
|
|
39
38
|
"@babel/runtime": "^7.0.0",
|
|
40
39
|
"@compiled/react": "^0.18.3",
|
|
41
|
-
"@emotion/react": "^11.7.1",
|
|
42
40
|
"@floating-ui/dom": "^1.0.1",
|
|
43
41
|
"memoize-one": "^6.0.0",
|
|
44
42
|
"use-isomorphic-layout-effect": "^1.1.2"
|
|
@@ -90,7 +88,6 @@
|
|
|
90
88
|
"deprecation": "no-deprecated-imports",
|
|
91
89
|
"styling": [
|
|
92
90
|
"static",
|
|
93
|
-
"emotion",
|
|
94
91
|
"compiled"
|
|
95
92
|
]
|
|
96
93
|
}
|