gantri-components 1.95.2 → 1.96.1
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/dist/components/dropdown/dropdown.d.ts +1 -1
- package/dist/components/dropdown/dropdown.presets.d.ts +1 -1
- package/dist/components/dropdown/dropdown.types.d.ts +1 -1
- package/dist/components/search-field/search-field.d.ts +1 -1
- package/dist/components/search-field/search-field.presets.d.ts +1 -1
- package/dist/components/search-field/search-field.types.d.ts +8 -2
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { DropdownProps } from './dropdown.types';
|
|
2
|
-
export declare const DropdownPresets: Partial<DropdownProps
|
|
2
|
+
export declare const DropdownPresets: Partial<DropdownProps<any>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ChangeEvent, CSSProperties, FocusEvent, ReactElement } from 'react';
|
|
2
2
|
import { DropdownMenuProps } from '../dropdown-menu/dropdown-menu.types';
|
|
3
3
|
import { ErrorMessageType } from '../text-field';
|
|
4
|
-
export interface DropdownProps<T
|
|
4
|
+
export interface DropdownProps<T> extends Pick<DropdownMenuProps<T>, Exclude<keyof DropdownMenuProps<T>, 'items'>> {
|
|
5
5
|
borderless?: boolean;
|
|
6
6
|
className?: string;
|
|
7
7
|
disabled?: boolean;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { SearchFieldProps } from './search-field.types';
|
|
2
|
-
export declare const SearchFieldPresets: Partial<SearchFieldProps
|
|
2
|
+
export declare const SearchFieldPresets: Partial<SearchFieldProps<any>>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { CSSProperties, FocusEvent, ReactElement } from 'react';
|
|
2
2
|
import { DropdownMenuProps } from '../dropdown-menu/dropdown-menu.types';
|
|
3
3
|
import { ErrorMessageType } from '../text-field';
|
|
4
|
-
import { BlurChangeEvent,
|
|
5
|
-
export interface SearchFieldProps<T
|
|
4
|
+
import { BlurChangeEvent, DropdownChangeEvent } from '../dropdown';
|
|
5
|
+
export interface SearchFieldProps<T> extends Pick<DropdownMenuProps<T>, Exclude<keyof DropdownMenuProps<T>, 'items'>> {
|
|
6
6
|
borderless?: boolean;
|
|
7
7
|
className?: string;
|
|
8
8
|
disabled?: boolean;
|
|
@@ -27,6 +27,12 @@ export interface SearchFieldProps<T = DefaultDropdownRecord> extends Pick<Dropdo
|
|
|
27
27
|
};
|
|
28
28
|
renderPlaceholder?: (option?: T) => JSX.Element;
|
|
29
29
|
resetSelectionOnDisabled?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* If internal, the component will search over the provided list of items,
|
|
32
|
+
* If external, the onTextChange event is emitted, so an external search can be executed
|
|
33
|
+
* the new items must be provided after.
|
|
34
|
+
* */
|
|
35
|
+
searchMode?: 'internal' | 'external';
|
|
30
36
|
style?: CSSProperties;
|
|
31
37
|
variant?: 'line' | 'filled';
|
|
32
38
|
}
|