zds-pickers 4.0.18 → 4.0.19

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.
@@ -12,7 +12,29 @@ type KnobPickerProps = SelectProps<number> & {
12
12
  value: number;
13
13
  };
14
14
  type KnobPickerRef = SelectInstance<Option<number>, false, GroupBase<Option<number>>>;
15
- declare const KnobPicker: import("react").ForwardRefExoticComponent<SelectProps<number> & {
15
+ declare const KnobPicker: import("react").ForwardRefExoticComponent<Partial<import("node_modules/react-select/dist/declarations/src/components").SelectComponents<Option<number>, false, GroupBase<Option<number>>>> & {
16
+ className?: string;
17
+ components?: object;
18
+ disabled?: boolean;
19
+ filterOptions?: ((candidate: Option<number>, inputValue: string) => boolean) | undefined;
20
+ formatOptionLabel?: (option: Option<unknown>, { context }: {
21
+ context: "menu" | "value";
22
+ }) => React.ReactNode;
23
+ isSearchable?: boolean;
24
+ label?: string;
25
+ onChange: (value: number) => void;
26
+ options: Option<number>[] | {
27
+ entries: Option<number>[];
28
+ }[];
29
+ preserveMenuWidth?: boolean;
30
+ selectProps?: {
31
+ actionButton?: React.ReactNode;
32
+ inputValue?: string;
33
+ placeholder?: React.ReactNode;
34
+ };
35
+ shrinkLabel?: boolean;
36
+ value: number;
37
+ } & {
16
38
  highToLow?: boolean;
17
39
  includeLabel?: boolean;
18
40
  includePicker?: boolean;
@@ -7,7 +7,29 @@ type ResponseCurvePickerProps = SelectProps<Curve> & {
7
7
  Tooltip?: React.FC<TooltipProps>;
8
8
  };
9
9
  type ResponseCurvePickerRef = SelectInstance<Option<Curve>, false, GroupBase<Option<Curve>>>;
10
- declare const ResponseCurvePicker: import("react").ForwardRefExoticComponent<SelectProps<Curve> & {
10
+ declare const ResponseCurvePicker: import("react").ForwardRefExoticComponent<Partial<import("node_modules/react-select/dist/declarations/src/components").SelectComponents<Option<Curve>, false, GroupBase<Option<Curve>>>> & {
11
+ className?: string;
12
+ components?: object;
13
+ disabled?: boolean;
14
+ filterOptions?: ((candidate: Option<Curve>, inputValue: string) => boolean) | undefined;
15
+ formatOptionLabel?: (option: Option<unknown>, { context }: {
16
+ context: "menu" | "value";
17
+ }) => React.ReactNode;
18
+ isSearchable?: boolean;
19
+ label?: string;
20
+ onChange: (value: Curve) => void;
21
+ options: Option<Curve>[] | {
22
+ entries: Option<Curve>[];
23
+ }[];
24
+ preserveMenuWidth?: boolean;
25
+ selectProps?: {
26
+ actionButton?: React.ReactNode;
27
+ inputValue?: string;
28
+ placeholder?: React.ReactNode;
29
+ };
30
+ shrinkLabel?: boolean;
31
+ value: Curve;
32
+ } & {
11
33
  inverted?: boolean;
12
34
  Tooltip?: React.FC<TooltipProps>;
13
35
  } & import("react").RefAttributes<SelectInstance<Option<Curve>, false, GroupBase<Option<Curve>>>>>;
@@ -1,5 +1,5 @@
1
1
  import { type JSX } from 'react';
2
- import { type GroupBase, type SelectInstance } from 'react-select';
2
+ import { type GroupBase, type SelectComponentsConfig, type SelectInstance } from 'react-select';
3
3
  type PassedSelectProps = {
4
4
  actionButton?: React.ReactNode;
5
5
  inputValue?: string;
@@ -9,7 +9,7 @@ type Option<T> = {
9
9
  label: React.ReactNode;
10
10
  value: T;
11
11
  };
12
- type SelectProps<T> = {
12
+ type SelectProps<T> = SelectComponentsConfig<Option<T>, false, GroupBase<Option<T>>> & {
13
13
  className?: string;
14
14
  components?: object;
15
15
  disabled?: boolean;
@@ -11,6 +11,7 @@ import ReactSelect, {
11
11
  type IndicatorsContainerProps,
12
12
  components as originalComponents,
13
13
  type PlaceholderProps,
14
+ type SelectComponentsConfig,
14
15
  type SelectInstance,
15
16
  type SingleValue,
16
17
  type StylesConfig,
@@ -86,7 +87,11 @@ const CustomValueContainer = <T,>({
86
87
  </ValueContainer>
87
88
  )
88
89
 
89
- type SelectProps<T> = {
90
+ type SelectProps<T> = SelectComponentsConfig<
91
+ Option<T>,
92
+ false,
93
+ GroupBase<Option<T>>
94
+ > & {
90
95
  className?: string
91
96
  components?: object
92
97
  disabled?: boolean
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zds-pickers",
3
- "version": "4.0.18",
3
+ "version": "4.0.19",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.es.js",
6
6
  "types": "./dist/types/index.d.ts",