gantri-components 1.95.0 → 1.95.3

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,3 +1,3 @@
1
1
  import { FC, PropsWithChildren } from 'react';
2
2
  import { DropdownProps } from './dropdown.types';
3
- export declare const Dropdown: FC<PropsWithChildren<DropdownProps>>;
3
+ export declare const Dropdown: FC<PropsWithChildren<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 = Record<string, unknown>> extends Pick<DropdownMenuProps<T>, Exclude<keyof DropdownMenuProps<T>, 'items'>> {
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;
@@ -44,7 +44,7 @@ export interface BlurChangeEvent extends Pick<FocusEvent<HTMLDivElement>, Exclud
44
44
  name: string;
45
45
  };
46
46
  }
47
- export declare type DefaultDropdownRecord = {
47
+ export declare type DefaultDropdownRecord<T extends number | string = string> = {
48
48
  label: string;
49
- value: string;
49
+ value: T;
50
50
  };
@@ -1,3 +1,3 @@
1
1
  import { FC, PropsWithChildren } from 'react';
2
2
  import { SearchFieldProps } from './search-field.types';
3
- export declare const SearchField: FC<PropsWithChildren<SearchFieldProps>>;
3
+ export declare const SearchField: FC<PropsWithChildren<SearchFieldProps<any>>>;
@@ -2,7 +2,7 @@ import { CSSProperties, FocusEvent, ReactElement } from 'react';
2
2
  import { DropdownMenuProps } from '../dropdown-menu/dropdown-menu.types';
3
3
  import { ErrorMessageType } from '../text-field';
4
4
  import { BlurChangeEvent, DropdownChangeEvent } from '../dropdown';
5
- export interface SearchFieldProps<T = Record<string, unknown>> extends Pick<DropdownMenuProps<T>, Exclude<keyof DropdownMenuProps<T>, 'items'>> {
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gantri-components",
3
- "version": "1.95.0",
3
+ "version": "1.95.3",
4
4
  "main": "dist/index.cjs.js",
5
5
  "module": "dist/index.esm.js",
6
6
  "umd": "dist/index.umd.js",