@atlaskit/react-select 1.5.2 → 1.6.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.
Files changed (60) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/cjs/components/group.js +2 -7
  3. package/dist/cjs/components/index.js +0 -3
  4. package/dist/cjs/components/indicators.js +54 -133
  5. package/dist/cjs/components/input.js +5 -8
  6. package/dist/cjs/components/menu.js +16 -18
  7. package/dist/cjs/components/multi-value.js +47 -10
  8. package/dist/cjs/components/single-value.js +1 -2
  9. package/dist/cjs/index.js +0 -7
  10. package/dist/cjs/select.js +88 -131
  11. package/dist/cjs/styles.js +0 -1
  12. package/dist/cjs/utils.js +1 -2
  13. package/dist/es2019/components/group.js +2 -7
  14. package/dist/es2019/components/index.js +1 -4
  15. package/dist/es2019/components/indicators.js +39 -113
  16. package/dist/es2019/components/input.js +5 -9
  17. package/dist/es2019/components/menu.js +16 -26
  18. package/dist/es2019/components/multi-value.js +48 -12
  19. package/dist/es2019/components/single-value.js +1 -4
  20. package/dist/es2019/index.js +0 -1
  21. package/dist/es2019/select.js +7 -52
  22. package/dist/es2019/styles.js +1 -2
  23. package/dist/es2019/utils.js +0 -2
  24. package/dist/esm/components/group.js +2 -7
  25. package/dist/esm/components/index.js +1 -4
  26. package/dist/esm/components/indicators.js +54 -133
  27. package/dist/esm/components/input.js +5 -8
  28. package/dist/esm/components/menu.js +16 -18
  29. package/dist/esm/components/multi-value.js +48 -11
  30. package/dist/esm/components/single-value.js +1 -2
  31. package/dist/esm/index.js +0 -1
  32. package/dist/esm/select.js +88 -131
  33. package/dist/esm/styles.js +1 -2
  34. package/dist/esm/utils.js +1 -2
  35. package/dist/types/components/group.d.ts +1 -2
  36. package/dist/types/components/index.d.ts +16 -22
  37. package/dist/types/components/indicators.d.ts +1 -16
  38. package/dist/types/components/input.d.ts +1 -1
  39. package/dist/types/components/menu.d.ts +3 -3
  40. package/dist/types/components/multi-value.d.ts +3 -2
  41. package/dist/types/components/single-value.d.ts +1 -1
  42. package/dist/types/index.d.ts +1 -3
  43. package/dist/types/select.d.ts +15 -28
  44. package/dist/types/styles.d.ts +1 -3
  45. package/dist/types/theme.d.ts +0 -1
  46. package/dist/types/types.d.ts +0 -1
  47. package/dist/types-ts4.5/components/group.d.ts +1 -2
  48. package/dist/types-ts4.5/components/index.d.ts +16 -22
  49. package/dist/types-ts4.5/components/indicators.d.ts +1 -16
  50. package/dist/types-ts4.5/components/input.d.ts +1 -1
  51. package/dist/types-ts4.5/components/menu.d.ts +3 -3
  52. package/dist/types-ts4.5/components/multi-value.d.ts +3 -2
  53. package/dist/types-ts4.5/components/single-value.d.ts +1 -1
  54. package/dist/types-ts4.5/index.d.ts +1 -3
  55. package/dist/types-ts4.5/select.d.ts +15 -28
  56. package/dist/types-ts4.5/styles.d.ts +1 -3
  57. package/dist/types-ts4.5/theme.d.ts +0 -1
  58. package/dist/types-ts4.5/types.d.ts +0 -1
  59. package/package.json +8 -2
  60. package/types/package.json +17 -0
@@ -3,7 +3,6 @@ import { type AriaLiveMessages, type AriaSelection } from './accessibility';
3
3
  import { type SelectComponentsConfig } from './components';
4
4
  import { type FilterOptionOption } from './filters';
5
5
  import { type ClassNamesConfig, type StylesConfig, type StylesProps } from './styles';
6
- import { type ThemeConfig } from './theme';
7
6
  import { type ActionMeta, type FocusDirection, type GetOptionLabel, type GetOptionValue, type GroupBase, type InputActionMeta, type MenuPlacement, type MenuPosition, type OnChangeValue, type Options, type OptionsOrGroups, type PropsValue, type SetValueAction } from './types';
8
7
  export type FormatOptionLabelContext = 'menu' | 'value';
9
8
  export interface FormatOptionLabelMeta<Option> {
@@ -373,12 +372,6 @@ export interface SelectProps<Option, IsMulti extends boolean, Group extends Grou
373
372
  * A basic example can be found at the bottom of the [Replacing builtins](/advanced#replacing-builtins) documentation.
374
373
  */
375
374
  styles: StylesConfig<Option, IsMulti, Group>;
376
- /**
377
- * Theme modifier method
378
- *
379
- * @deprecated {@link https://hello.atlassian.net/browse/ENGHEALTH-14529 Internal documentation for deprecation (no external access)}
380
- */
381
- theme?: ThemeConfig;
382
375
  /**
383
376
  * Sets the tabIndex attribute on the input for focus. Since focus is already managed, the only acceptable value to be used is '-1' in rare cases when removing this field from the document tab order is required.
384
377
  *
@@ -583,7 +576,6 @@ export default class Select<Option = unknown, IsMulti extends boolean = false, G
583
576
  removeValue: (removedValue: Option) => void;
584
577
  clearValue: () => void;
585
578
  popValue: () => void;
586
- getTheme(): import("./types").Theme;
587
579
  getFocusedOptionId: (focusedOption: Option) => string | null;
588
580
  getFocusableOptionsWithIds: () => FocusableOptionWithId<Option>[];
589
581
  getValue: () => Options<Option>;
@@ -603,7 +595,6 @@ export default class Select<Option = unknown, IsMulti extends boolean = false, G
603
595
  children?: React.ReactNode;
604
596
  }>;
605
597
  setValue: (newValue: OnChangeValue<Option, IsMulti>, action: SetValueAction, option?: Option | undefined) => void;
606
- theme: import("./types").Theme;
607
598
  };
608
599
  getOptionLabel: (data: Option) => string;
609
600
  getOptionValue: (data: Option) => string;
@@ -614,28 +605,25 @@ export default class Select<Option = unknown, IsMulti extends boolean = false, G
614
605
  ClearIndicator: <Option_1, IsMulti_1 extends boolean, Group_1 extends GroupBase<Option_1>>(props: import(".").ClearIndicatorProps<Option_1, IsMulti_1, Group_1>) => import("@emotion/react").jsx.JSX.Element;
615
606
  Control: <Option_2, IsMulti_2 extends boolean, Group_2 extends GroupBase<Option_2>>(props: import(".").ControlProps<Option_2, IsMulti_2, Group_2>) => import("@emotion/react").jsx.JSX.Element;
616
607
  DropdownIndicator: <Option_3, IsMulti_3 extends boolean, Group_3 extends GroupBase<Option_3>>(props: import(".").DropdownIndicatorProps<Option_3, IsMulti_3, Group_3>) => import("@emotion/react").jsx.JSX.Element;
617
- DownChevron: (props: import("./components/indicators").DownChevronProps) => import("@emotion/react").jsx.JSX.Element;
618
- CrossIcon: (props: import("./components/indicators").CrossIconProps) => import("@emotion/react").jsx.JSX.Element;
619
608
  Group: <Option_4, IsMulti_4 extends boolean, Group_4 extends GroupBase<Option_4>>(props: import(".").GroupProps<Option_4, IsMulti_4, Group_4>) => import("@emotion/react").jsx.JSX.Element;
620
609
  GroupHeading: <Option_5, IsMulti_5 extends boolean, Group_5 extends GroupBase<Option_5>>(props: import(".").GroupHeadingProps<Option_5, IsMulti_5, Group_5>) => import("@emotion/react").jsx.JSX.Element;
621
610
  IndicatorsContainer: <Option_6, IsMulti_6 extends boolean, Group_6 extends GroupBase<Option_6>>(props: import(".").IndicatorsContainerProps<Option_6, IsMulti_6, Group_6>) => import("@emotion/react").jsx.JSX.Element;
622
- IndicatorSeparator: <Option_7, IsMulti_7 extends boolean, Group_7 extends GroupBase<Option_7>>(props: import(".").IndicatorSeparatorProps<Option_7, IsMulti_7, Group_7>) => import("@emotion/react").jsx.JSX.Element;
623
- Input: <Option_8, IsMulti_8 extends boolean, Group_8 extends GroupBase<Option_8>>(props: import(".").InputProps<Option_8, IsMulti_8, Group_8>) => import("@emotion/react").jsx.JSX.Element;
624
- LoadingIndicator: <Option_9, IsMulti_9 extends boolean, Group_9 extends GroupBase<Option_9>>({ innerProps, isRtl, size, ...restProps }: import(".").LoadingIndicatorProps<Option_9, IsMulti_9, Group_9>) => import("@emotion/react").jsx.JSX.Element;
625
- Menu: <Option_10, IsMulti_10 extends boolean, Group_10 extends GroupBase<Option_10>>(props: import("./components/menu").MenuProps<Option_10, IsMulti_10, Group_10>) => import("@emotion/react").jsx.JSX.Element;
626
- MenuList: <Option_11, IsMulti_11 extends boolean, Group_11 extends GroupBase<Option_11>>(props: import("./components/menu").MenuListProps<Option_11, IsMulti_11, Group_11>) => import("@emotion/react").jsx.JSX.Element;
627
- MenuPortal: <Option_12, IsMulti_12 extends boolean, Group_12 extends GroupBase<Option_12>>(props: import("./components/menu").MenuPortalProps<Option_12, IsMulti_12, Group_12>) => import("@emotion/react").jsx.JSX.Element | null;
628
- LoadingMessage: <Option_13, IsMulti_13 extends boolean, Group_13 extends GroupBase<Option_13>>({ children, innerProps, ...restProps }: import("./components/menu").NoticeProps<Option_13, IsMulti_13, Group_13>) => import("@emotion/react").jsx.JSX.Element;
629
- NoOptionsMessage: <Option_14, IsMulti_14 extends boolean, Group_14 extends GroupBase<Option_14>>({ children, innerProps, ...restProps }: import("./components/menu").NoticeProps<Option_14, IsMulti_14, Group_14>) => import("@emotion/react").jsx.JSX.Element;
630
- MultiValue: <Option_15, IsMulti_15 extends boolean, Group_15 extends GroupBase<Option_15>>(props: import(".").MultiValueProps<Option_15, IsMulti_15, Group_15>) => import("@emotion/react").jsx.JSX.Element;
631
- MultiValueContainer: <Option_16, IsMulti_16 extends boolean, Group_16 extends GroupBase<Option_16>>({ children, innerProps, }: import(".").MultiValueGenericProps<Option_16, IsMulti_16, Group_16>) => import("@emotion/react").jsx.JSX.Element;
632
- MultiValueLabel: <Option_16, IsMulti_16 extends boolean, Group_16 extends GroupBase<Option_16>>({ children, innerProps, }: import(".").MultiValueGenericProps<Option_16, IsMulti_16, Group_16>) => import("@emotion/react").jsx.JSX.Element;
611
+ Input: <Option_7, IsMulti_7 extends boolean, Group_7 extends GroupBase<Option_7>>(props: import(".").InputProps<Option_7, IsMulti_7, Group_7>) => import("@emotion/react").jsx.JSX.Element;
612
+ LoadingIndicator: <Option_8, IsMulti_8 extends boolean, Group_8 extends GroupBase<Option_8>>({ innerProps, isRtl, size, ...restProps }: import(".").LoadingIndicatorProps<Option_8, IsMulti_8, Group_8>) => import("@emotion/react").jsx.JSX.Element;
613
+ Menu: <Option_9, IsMulti_9 extends boolean, Group_9 extends GroupBase<Option_9>>(props: import("./components/menu").MenuProps<Option_9, IsMulti_9, Group_9>) => import("@emotion/react").jsx.JSX.Element;
614
+ MenuList: <Option_10, IsMulti_10 extends boolean, Group_10 extends GroupBase<Option_10>>(props: import("./components/menu").MenuListProps<Option_10, IsMulti_10, Group_10>) => import("@emotion/react").jsx.JSX.Element;
615
+ MenuPortal: <Option_11, IsMulti_11 extends boolean, Group_11 extends GroupBase<Option_11>>(props: import("./components/menu").MenuPortalProps<Option_11, IsMulti_11, Group_11>) => import("@emotion/react").jsx.JSX.Element | null;
616
+ LoadingMessage: <Option_12, IsMulti_12 extends boolean, Group_12 extends GroupBase<Option_12>>({ children, innerProps, ...restProps }: import("./components/menu").NoticeProps<Option_12, IsMulti_12, Group_12>) => import("@emotion/react").jsx.JSX.Element;
617
+ NoOptionsMessage: <Option_13, IsMulti_13 extends boolean, Group_13 extends GroupBase<Option_13>>({ children, innerProps, ...restProps }: import("./components/menu").NoticeProps<Option_13, IsMulti_13, Group_13>) => import("@emotion/react").jsx.JSX.Element;
618
+ MultiValue: <Option_14, IsMulti_14 extends boolean, Group_14 extends GroupBase<Option_14>>(props: import(".").MultiValueProps<Option_14, IsMulti_14, Group_14>) => import("@emotion/react").jsx.JSX.Element;
619
+ MultiValueContainer: <Option_15, IsMulti_15 extends boolean, Group_15 extends GroupBase<Option_15>>({ children, innerProps, }: import(".").MultiValueGenericProps<Option_15, IsMulti_15, Group_15>) => import("@emotion/react").jsx.JSX.Element;
620
+ MultiValueLabel: <Option_15, IsMulti_15 extends boolean, Group_15 extends GroupBase<Option_15>>({ children, innerProps, }: import(".").MultiValueGenericProps<Option_15, IsMulti_15, Group_15>) => import("@emotion/react").jsx.JSX.Element;
633
621
  MultiValueRemove: typeof import("./components/multi-value").MultiValueRemove;
634
- Option: <Option_17, IsMulti_17 extends boolean, Group_17 extends GroupBase<Option_17>>(props: import(".").OptionProps<Option_17, IsMulti_17, Group_17>) => import("@emotion/react").jsx.JSX.Element;
635
- Placeholder: <Option_18, IsMulti_18 extends boolean, Group_18 extends GroupBase<Option_18>>(props: import(".").PlaceholderProps<Option_18, IsMulti_18, Group_18>) => import("@emotion/react").jsx.JSX.Element;
636
- SelectContainer: <Option_19, IsMulti_19 extends boolean, Group_19 extends GroupBase<Option_19>>(props: import(".").ContainerProps<Option_19, IsMulti_19, Group_19>) => import("@emotion/react").jsx.JSX.Element;
637
- SingleValue: <Option_20, IsMulti_20 extends boolean, Group_20 extends GroupBase<Option_20>>(props: import(".").SingleValueProps<Option_20, IsMulti_20, Group_20>) => import("@emotion/react").jsx.JSX.Element;
638
- ValueContainer: <Option_21, IsMulti_21 extends boolean, Group_21 extends GroupBase<Option_21>>(props: import(".").ValueContainerProps<Option_21, IsMulti_21, Group_21>) => import("@emotion/react").jsx.JSX.Element;
622
+ Option: <Option_16, IsMulti_16 extends boolean, Group_16 extends GroupBase<Option_16>>(props: import(".").OptionProps<Option_16, IsMulti_16, Group_16>) => import("@emotion/react").jsx.JSX.Element;
623
+ Placeholder: <Option_17, IsMulti_17 extends boolean, Group_17 extends GroupBase<Option_17>>(props: import(".").PlaceholderProps<Option_17, IsMulti_17, Group_17>) => import("@emotion/react").jsx.JSX.Element;
624
+ SelectContainer: <Option_18, IsMulti_18 extends boolean, Group_18 extends GroupBase<Option_18>>(props: import(".").ContainerProps<Option_18, IsMulti_18, Group_18>) => import("@emotion/react").jsx.JSX.Element;
625
+ SingleValue: <Option_19, IsMulti_19 extends boolean, Group_19 extends GroupBase<Option_19>>(props: import(".").SingleValueProps<Option_19, IsMulti_19, Group_19>) => import("@emotion/react").jsx.JSX.Element;
626
+ ValueContainer: <Option_20, IsMulti_20 extends boolean, Group_20 extends GroupBase<Option_20>>(props: import(".").ValueContainerProps<Option_20, IsMulti_20, Group_20>) => import("@emotion/react").jsx.JSX.Element;
639
627
  };
640
628
  buildCategorizedOptions: () => CategorizedGroupOrOption<Option, Group>[];
641
629
  getCategorizedOptions: () => CategorizedGroupOrOption<Option, Group>[];
@@ -682,7 +670,6 @@ export default class Select<Option = unknown, IsMulti extends boolean = false, G
682
670
  renderPlaceholderOrValue(): JSX.Element | JSX.Element[] | null;
683
671
  renderClearIndicator(): JSX.Element | null;
684
672
  renderLoadingIndicator(): JSX.Element | null;
685
- renderIndicatorSeparator(): JSX.Element | null;
686
673
  renderDropdownIndicator(): JSX.Element | null;
687
674
  renderMenu(): JSX.Element | null;
688
675
  renderFormField(): JSX.Element | undefined;
@@ -1,7 +1,7 @@
1
1
  import { type ContainerProps, type IndicatorsContainerProps, type ValueContainerProps } from './components/containers';
2
2
  import { type ControlProps } from './components/control';
3
3
  import { type GroupHeadingProps, type GroupProps } from './components/group';
4
- import { type ClearIndicatorProps, type DropdownIndicatorProps, type IndicatorSeparatorProps, type LoadingIndicatorProps } from './components/indicators';
4
+ import { type ClearIndicatorProps, type DropdownIndicatorProps, type LoadingIndicatorProps } from './components/indicators';
5
5
  import { type InputProps } from './components/input';
6
6
  import { type MenuListProps, type MenuProps, type NoticeProps, type PortalStyleArgs } from './components/menu';
7
7
  import { type MultiValueProps } from './components/multi-value';
@@ -17,7 +17,6 @@ export interface StylesProps<Option, IsMulti extends boolean, Group extends Grou
17
17
  group: GroupProps<Option, IsMulti, Group>;
18
18
  groupHeading: GroupHeadingProps<Option, IsMulti, Group>;
19
19
  indicatorsContainer: IndicatorsContainerProps<Option, IsMulti, Group>;
20
- indicatorSeparator: IndicatorSeparatorProps<Option, IsMulti, Group>;
21
20
  input: InputProps<Option, IsMulti, Group>;
22
21
  loadingIndicator: LoadingIndicatorProps<Option, IsMulti, Group>;
23
22
  loadingMessage: NoticeProps<Option, IsMulti, Group>;
@@ -50,7 +49,6 @@ export declare function mergeStyles<Option, IsMulti extends boolean, Group exten
50
49
  group?: ((base: CSSObjectWithLabel, props: GroupProps<Option, IsMulti, Group>) => CSSObjectWithLabel) | undefined;
51
50
  groupHeading?: ((base: CSSObjectWithLabel, props: GroupHeadingProps<Option, IsMulti, Group>) => CSSObjectWithLabel) | undefined;
52
51
  indicatorsContainer?: ((base: CSSObjectWithLabel, props: IndicatorsContainerProps<Option, IsMulti, Group>) => CSSObjectWithLabel) | undefined;
53
- indicatorSeparator?: ((base: CSSObjectWithLabel, props: IndicatorSeparatorProps<Option, IsMulti, Group>) => CSSObjectWithLabel) | undefined;
54
52
  input?: ((base: CSSObjectWithLabel, props: InputProps<Option, IsMulti, Group>) => CSSObjectWithLabel) | undefined;
55
53
  loadingIndicator?: ((base: CSSObjectWithLabel, props: LoadingIndicatorProps<Option, IsMulti, Group>) => CSSObjectWithLabel) | undefined;
56
54
  loadingMessage?: ((base: CSSObjectWithLabel, props: NoticeProps<Option, IsMulti, Group>) => CSSObjectWithLabel) | undefined;
@@ -24,4 +24,3 @@ export declare const spacing: {
24
24
  menuGutter: number;
25
25
  };
26
26
  export declare const defaultTheme: Theme;
27
- export type ThemeConfig = Theme | ((theme: Theme) => Theme);
@@ -63,7 +63,6 @@ export interface CommonProps<Option, IsMulti extends boolean, Group extends Grou
63
63
  selectOption: (newValue: Option) => void;
64
64
  selectProps: SelectProps<Option, IsMulti, Group>;
65
65
  setValue: (newValue: OnChangeValue<Option, IsMulti>, action: SetValueAction, option?: Option) => void;
66
- theme: Theme;
67
66
  }
68
67
  export interface CommonPropsAndClassName<Option, IsMulti extends boolean, Group extends GroupBase<Option>> extends CommonProps<Option, IsMulti, Group> {
69
68
  className?: string | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/react-select",
3
- "version": "1.5.2",
3
+ "version": "1.6.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",
@@ -25,12 +25,15 @@
25
25
  "./base": "./src/select.tsx",
26
26
  "./async": "./src/async.tsx",
27
27
  "./creatable": "./src/creatable.tsx",
28
- "./async-creatable": "./src/async-creatable.tsx"
28
+ "./async-creatable": "./src/async-creatable.tsx",
29
+ "./types": "./src/types.tsx"
29
30
  },
30
31
  "dependencies": {
31
32
  "@atlaskit/ds-lib": "^3.3.0",
33
+ "@atlaskit/icon": "^23.0.1",
32
34
  "@atlaskit/platform-feature-flags": "^0.3.0",
33
35
  "@atlaskit/primitives": "^13.3.0",
36
+ "@atlaskit/spinner": "^16.3.0",
34
37
  "@atlaskit/tokens": "^2.4.0",
35
38
  "@babel/runtime": "^7.0.0",
36
39
  "@emotion/react": "^11.7.1",
@@ -66,6 +69,9 @@
66
69
  },
67
70
  "design-system-select-fix-placement": {
68
71
  "type": "boolean"
72
+ },
73
+ "platform-visual-refresh-icons-legacy-facade": {
74
+ "type": "boolean"
69
75
  }
70
76
  },
71
77
  "techstack": {
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "@atlaskit/react-select/types",
3
+ "main": "../dist/cjs/types.js",
4
+ "module": "../dist/esm/types.js",
5
+ "module:es2019": "../dist/es2019/types.js",
6
+ "sideEffects": [
7
+ "**/*.compiled.css"
8
+ ],
9
+ "types": "../dist/types/types.d.ts",
10
+ "typesVersions": {
11
+ ">=4.5 <5.4": {
12
+ "*": [
13
+ "../dist/types-ts4.5/types.d.ts"
14
+ ]
15
+ }
16
+ }
17
+ }