@kvdbil/components 12.4.2 → 13.0.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kvdbil/components",
3
- "version": "12.4.2",
3
+ "version": "13.0.0",
4
4
  "sideEffects": false,
5
5
  "main": "cjs/index.js",
6
6
  "module": "esm/index.js",
@@ -31,7 +31,7 @@
31
31
  "react-collapse": ">= 5.0.1",
32
32
  "react-day-picker": ">= 7.4.8",
33
33
  "react-dom": ">= 17.0.0",
34
- "react-select": "3.0.8",
34
+ "react-select": "5.7.3",
35
35
  "react-transition-group": ">= 4.0.0",
36
36
  "styled-components": ">= 5.1.17"
37
37
  },
@@ -69,7 +69,6 @@
69
69
  "@types/react": "^16.9.49",
70
70
  "@types/react-collapse": "^5.0.0",
71
71
  "@types/react-dom": "^16.9.8",
72
- "@types/react-select": "^3.0.22",
73
72
  "@types/react-transition-group": "^4.4.0",
74
73
  "@types/styled-components": "^5.1.13",
75
74
  "@types/uuid": "^8.3.0",
@@ -97,7 +96,7 @@
97
96
  "react-dom": "^17.0.2",
98
97
  "react-is": "^16.13.1",
99
98
  "react-scripts": "^4.0.3",
100
- "react-select": "3.0.8",
99
+ "react-select": "5.7.3",
101
100
  "react-select-event": "^5.3.0",
102
101
  "react-transition-group": "^4.0.0",
103
102
  "rollup": "^2.56.3",
@@ -1,11 +1,7 @@
1
1
  import { ReactNode, RefObject } from 'react';
2
- import ReactSelect, { ActionMeta, IndicatorProps, NamedProps, OptionTypeBase, ValueType } from 'react-select';
2
+ import { ActionMeta, GroupBase, Props, SelectInstance, DropdownIndicatorProps as SelectDropdownIndicatorProps, OnChangeValue } from 'react-select';
3
3
  import { Color } from '../../Types';
4
- export interface DropdownIndicatorProps extends IndicatorProps<OptionTypeBase, false> {
5
- selectProps: {
6
- menuIsOpen?: boolean;
7
- lol?: string;
8
- };
4
+ export interface DropdownIndicatorProps extends SelectDropdownIndicatorProps {
9
5
  isFocused: boolean;
10
6
  isDisabled: boolean;
11
7
  }
@@ -13,17 +9,17 @@ declare type OptionType = {
13
9
  label: string | ReactNode;
14
10
  value: string;
15
11
  };
16
- export interface SelectProps<Option extends OptionType = OptionType, IsMulti extends boolean = false> extends NamedProps<Option, IsMulti> {
12
+ export interface SelectProps<Option = OptionType, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>> extends Props<Option, IsMulti, Group> {
17
13
  autoFocus?: boolean;
18
14
  className?: string;
19
15
  color?: Color;
20
- forwardRef?: RefObject<ReactSelect<Option, IsMulti>>;
16
+ forwardRef?: RefObject<SelectInstance<Option, IsMulti, Group>>;
21
17
  hasError?: boolean;
22
18
  height?: number;
23
19
  helperText?: string;
24
20
  isDisabled?: boolean;
25
21
  label?: string;
26
- onChange(value: ValueType<Option, IsMulti>, actionMeta: ActionMeta<Option>): void;
22
+ onChange(value: OnChangeValue<Option, IsMulti>, actionMeta: ActionMeta<Option>): void;
27
23
  placeholder?: string;
28
24
  prefix?: ReactNode;
29
25
  name: string;
@@ -52,5 +48,5 @@ export interface SelectProps<Option extends OptionType = OptionType, IsMulti ext
52
48
  * );
53
49
  * };
54
50
  */
55
- export declare function Select<Option extends OptionType = OptionType, IsMulti extends boolean = false>({ className, color, forwardRef, hasError, height, helperText, isDisabled, onBlur, onFocus, onInputChange, placeholder, name, ...props }: SelectProps<Option, IsMulti>): JSX.Element;
51
+ export declare function Select<Option = OptionType, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>({ className, color, forwardRef, hasError, height, helperText, isDisabled, onBlur, onFocus, onInputChange, placeholder, name, ...props }: SelectProps<Option, IsMulti, Group>): JSX.Element;
56
52
  export default Select;