zds-pickers 4.0.18 → 4.0.20
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,32 @@ 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<
|
|
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
|
+
menuPortalTarget?: HTMLElement | null;
|
|
26
|
+
menuPosition?: "fixed" | "absolute";
|
|
27
|
+
menuShouldScrollIntoView?: boolean;
|
|
28
|
+
onChange: (value: number) => void;
|
|
29
|
+
options: Option<number>[] | {
|
|
30
|
+
entries: Option<number>[];
|
|
31
|
+
}[];
|
|
32
|
+
preserveMenuWidth?: boolean;
|
|
33
|
+
selectProps?: {
|
|
34
|
+
actionButton?: React.ReactNode;
|
|
35
|
+
inputValue?: string;
|
|
36
|
+
placeholder?: React.ReactNode;
|
|
37
|
+
};
|
|
38
|
+
shrinkLabel?: boolean;
|
|
39
|
+
value: number;
|
|
40
|
+
} & {
|
|
16
41
|
highToLow?: boolean;
|
|
17
42
|
includeLabel?: boolean;
|
|
18
43
|
includePicker?: boolean;
|
|
@@ -7,7 +7,32 @@ 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<
|
|
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
|
+
menuPortalTarget?: HTMLElement | null;
|
|
21
|
+
menuPosition?: "fixed" | "absolute";
|
|
22
|
+
menuShouldScrollIntoView?: boolean;
|
|
23
|
+
onChange: (value: Curve) => void;
|
|
24
|
+
options: Option<Curve>[] | {
|
|
25
|
+
entries: Option<Curve>[];
|
|
26
|
+
}[];
|
|
27
|
+
preserveMenuWidth?: boolean;
|
|
28
|
+
selectProps?: {
|
|
29
|
+
actionButton?: React.ReactNode;
|
|
30
|
+
inputValue?: string;
|
|
31
|
+
placeholder?: React.ReactNode;
|
|
32
|
+
};
|
|
33
|
+
shrinkLabel?: boolean;
|
|
34
|
+
value: Curve;
|
|
35
|
+
} & {
|
|
11
36
|
inverted?: boolean;
|
|
12
37
|
Tooltip?: React.FC<TooltipProps>;
|
|
13
38
|
} & 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;
|
|
@@ -19,6 +19,9 @@ type SelectProps<T> = {
|
|
|
19
19
|
}) => React.ReactNode;
|
|
20
20
|
isSearchable?: boolean;
|
|
21
21
|
label?: string;
|
|
22
|
+
menuPortalTarget?: HTMLElement | null;
|
|
23
|
+
menuPosition?: 'fixed' | 'absolute';
|
|
24
|
+
menuShouldScrollIntoView?: boolean;
|
|
22
25
|
onChange: (value: Option<T>['value']) => void;
|
|
23
26
|
options: Option<T>[] | {
|
|
24
27
|
entries: Option<T>[];
|
package/lib/pickers/Select.tsx
CHANGED
|
@@ -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
|
|
@@ -97,6 +102,9 @@ type SelectProps<T> = {
|
|
|
97
102
|
) => React.ReactNode
|
|
98
103
|
isSearchable?: boolean
|
|
99
104
|
label?: string
|
|
105
|
+
menuPortalTarget?: HTMLElement | null
|
|
106
|
+
menuPosition?: 'fixed' | 'absolute'
|
|
107
|
+
menuShouldScrollIntoView?: boolean
|
|
100
108
|
onChange: (value: Option<T>['value']) => void
|
|
101
109
|
options: Option<T>[] | { entries: Option<T>[] }[]
|
|
102
110
|
preserveMenuWidth?: boolean
|