gantri-components 2.30.0 → 2.31.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.
@@ -5,5 +5,6 @@ export declare const StyledContainer: import("styled-components").StyledComponen
5
5
  export declare const StyledHeader: import("styled-components").StyledComponent<"header", import("styled-components").DefaultTheme, {}, never>;
6
6
  export declare const StyledItem: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
7
7
  $basic: boolean;
8
+ $disabled?: boolean | undefined;
8
9
  $selected: boolean;
9
10
  }, never>;
@@ -6,6 +6,7 @@ export interface DropdownMenuProps<T = Record<string, unknown>> {
6
6
  className?: string;
7
7
  header?: ReactNode;
8
8
  idProperty?: keyof T;
9
+ /** Can optionally include `disabled: true` to any index to disable that item. */
9
10
  items: T[];
10
11
  keyProperty?: (item?: T) => string;
11
12
  labelProperty?: keyof T | ((item?: T) => string);
@@ -1,3 +1,5 @@
1
- import { FC, PropsWithChildren } from 'react';
2
1
  import { SearchFieldProps } from './search-field.types';
3
- export declare const SearchField: FC<PropsWithChildren<SearchFieldProps<any>>>;
2
+ export declare const SearchField: {
3
+ <T>(props: SearchFieldProps<T>): JSX.Element;
4
+ defaultProps: Partial<SearchFieldProps<any>>;
5
+ };
@@ -3,7 +3,7 @@ import { Property } from 'csstype';
3
3
  import { DropdownMenuProps } from '../dropdown-menu/dropdown-menu.types';
4
4
  import { ErrorMessageType } from '../text-field';
5
5
  import { BlurChangeEvent, DropdownChangeEvent } from '../dropdown';
6
- export interface SearchFieldProps<T> extends Pick<DropdownMenuProps<T>, Exclude<keyof DropdownMenuProps<T>, 'items'>> {
6
+ export interface SearchFieldProps<T = Record<string, unknown>> extends Omit<DropdownMenuProps<T>, 'items'> {
7
7
  borderless?: boolean;
8
8
  className?: string;
9
9
  disabled?: boolean;
@@ -11,6 +11,7 @@ export interface SearchFieldProps<T> extends Pick<DropdownMenuProps<T>, Exclude<
11
11
  errorMessage?: ErrorMessageType;
12
12
  hideErrors?: boolean;
13
13
  icon?: ReactElement;
14
+ /** Can optionally include `disabled: true` to any index to disable that item. */
14
15
  items?: T[];
15
16
  keyProperty?: (option?: T) => string;
16
17
  labelPosition?: 'top' | 'left';