gantri-components 2.30.0-beta.9 → 2.31.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.
@@ -1,5 +1,5 @@
1
1
  import { DropdownMenuProps } from './dropdown-menu.types';
2
2
  export declare const DropdownMenu: {
3
3
  <T>(props: DropdownMenuProps<T>): JSX.Element;
4
- defaultProps: Partial<DropdownMenuProps<import("./dropdown-menu.types").DropdownItemBase>>;
4
+ defaultProps: Partial<DropdownMenuProps<Record<string, unknown>>>;
5
5
  };
@@ -5,6 +5,5 @@ 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;
9
8
  $selected: boolean;
10
9
  }, never>;
@@ -1,11 +1,7 @@
1
1
  import { Property } from 'csstype';
2
2
  import { ReactNode } from 'react';
3
3
  import { Maybe } from '../../global';
4
- export type DropdownItemBase = {
5
- [key: string]: unknown;
6
- disabled?: boolean;
7
- };
8
- export interface DropdownMenuProps<T = DropdownItemBase> {
4
+ export interface DropdownMenuProps<T = Record<string, unknown>> {
9
5
  autoSelectFirst?: boolean;
10
6
  className?: string;
11
7
  header?: ReactNode;
@@ -16,6 +16,7 @@ export interface ImageProps {
16
16
  * the aspectRatio transformation will inherit from this value.
17
17
  * */
18
18
  containerAspectRatio?: ResolutionAwareProp<AspectRatio>;
19
+ containerClassName?: string;
19
20
  dpr?: Optional<Dpr>;
20
21
  fallbackColor?: Optional<Color>;
21
22
  fetchImmediately?: boolean;
@@ -1,5 +1,3 @@
1
+ import { FC, PropsWithChildren } from 'react';
1
2
  import { SearchFieldProps } from './search-field.types';
2
- export declare const SearchField: {
3
- <T>(props: SearchFieldProps<T>): JSX.Element;
4
- defaultProps: Partial<SearchFieldProps<any>>;
5
- };
3
+ export declare const SearchField: FC<PropsWithChildren<SearchFieldProps<any>>>;
@@ -1,9 +1,9 @@
1
1
  import { CSSProperties, FocusEvent, ReactElement } from 'react';
2
2
  import { Property } from 'csstype';
3
- import { DropdownItemBase, DropdownMenuProps } from '../dropdown-menu/dropdown-menu.types';
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 = DropdownItemBase> extends Pick<DropdownMenuProps<T>, Exclude<keyof DropdownMenuProps<T>, 'items'>> {
6
+ export interface SearchFieldProps<T> extends Pick<DropdownMenuProps<T>, Exclude<keyof DropdownMenuProps<T>, 'items'>> {
7
7
  borderless?: boolean;
8
8
  className?: string;
9
9
  disabled?: boolean;
@@ -11,7 +11,6 @@ export interface SearchFieldProps<T = DropdownItemBase> extends Pick<DropdownMen
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. */
15
14
  items?: T[];
16
15
  keyProperty?: (option?: T) => string;
17
16
  labelPosition?: 'top' | 'left';