@wonderflow/react-components 3.0.0-beta.26 → 3.0.0-beta.27
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.
|
@@ -2,14 +2,38 @@ import { MenuItemProps } from '..';
|
|
|
2
2
|
import { PropsWithChildren } from 'react';
|
|
3
3
|
import { Except } from 'type-fest';
|
|
4
4
|
export declare type AutocompleteOptionProps = PropsWithChildren<PropsWithClass> & Except<MenuItemProps, 'padding' | 'autoFocus' | 'description' | 'onClick'> & {
|
|
5
|
+
/**
|
|
6
|
+
* Value of the option.
|
|
7
|
+
* This is the value that will be passed to the `onChange` callback.
|
|
8
|
+
*/
|
|
5
9
|
value: string;
|
|
10
|
+
/**
|
|
11
|
+
* Callback called when the option is clicked.
|
|
12
|
+
* It passes the value and the inner text of the option as arguments.
|
|
13
|
+
*/
|
|
6
14
|
onClick?(value?: string, content?: string): void;
|
|
15
|
+
/**
|
|
16
|
+
* Label of the option. This is the text that will be displayed in the option, which can be
|
|
17
|
+
* different from the value.
|
|
18
|
+
*/
|
|
7
19
|
children: string;
|
|
8
20
|
};
|
|
9
21
|
export declare const AutocompleteOption: import("react").ForwardRefExoticComponent<PropsWithClass & {
|
|
10
22
|
children?: import("react").ReactNode;
|
|
11
23
|
} & Except<MenuItemProps, "description" | "onClick" | "autoFocus" | "padding"> & {
|
|
24
|
+
/**
|
|
25
|
+
* Value of the option.
|
|
26
|
+
* This is the value that will be passed to the `onChange` callback.
|
|
27
|
+
*/
|
|
12
28
|
value: string;
|
|
29
|
+
/**
|
|
30
|
+
* Callback called when the option is clicked.
|
|
31
|
+
* It passes the value and the inner text of the option as arguments.
|
|
32
|
+
*/
|
|
13
33
|
onClick?(value?: string | undefined, content?: string | undefined): void;
|
|
34
|
+
/**
|
|
35
|
+
* Label of the option. This is the text that will be displayed in the option, which can be
|
|
36
|
+
* different from the value.
|
|
37
|
+
*/
|
|
14
38
|
children: string;
|
|
15
39
|
} & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -2,8 +2,19 @@ import { AutocompleteOptionProps } from './autocomplete-option';
|
|
|
2
2
|
import { ForwardRefExoticComponent, ReactNode } from 'react';
|
|
3
3
|
import { TextfieldProps } from '..';
|
|
4
4
|
export declare type AutocompleteProps = TextfieldProps & {
|
|
5
|
+
/**
|
|
6
|
+
* The callback called when an option is picked from the list
|
|
7
|
+
*/
|
|
5
8
|
onChange?(value?: string): void;
|
|
9
|
+
/**
|
|
10
|
+
* Set the maximum height of the options list after which
|
|
11
|
+
* it will scroll.
|
|
12
|
+
*/
|
|
6
13
|
maxHeight?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Custom empty message to display when there are no options or
|
|
16
|
+
* when the value does not match any of the options.
|
|
17
|
+
*/
|
|
7
18
|
emptyMessage?: ReactNode;
|
|
8
19
|
};
|
|
9
20
|
declare type AutocompleteComponent = ForwardRefExoticComponent<AutocompleteProps> & {
|
package/package.json
CHANGED
package/themes/dark.css
CHANGED