gantri-components 1.95.3 → 1.97.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.
@@ -6,18 +6,18 @@ export interface ColorPickerProps {
6
6
  * List of colors to render,
7
7
  * defaults to gantri's product colors list
8
8
  * */
9
- colors?: Color[];
9
+ colors?: ProductColor[];
10
10
  labelText?: string;
11
11
  labelTx?: string;
12
12
  labelTxValues?: Record<string, unknown>;
13
13
  name?: string;
14
14
  onChange?: (event: ColorPickerChangeEvent) => void;
15
- onValueChange?: (selected: Color | Color[]) => void;
15
+ onValueChange?: (selected: ProductColor | ProductColor[]) => void;
16
16
  readOnly?: boolean;
17
17
  value?: string | string[];
18
18
  variant?: ColorPickerVariant;
19
19
  }
20
- export interface Color {
20
+ export interface ProductColor {
21
21
  code: string;
22
22
  name: string;
23
23
  value: string;
@@ -1 +1,2 @@
1
1
  export * from './color-picker';
2
+ export * from './color-picker.types';
@@ -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,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>>;
@@ -27,6 +27,12 @@ export interface SearchFieldProps<T> extends Pick<DropdownMenuProps<T>, Exclude<
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
  }