gantri-components 2.30.0-beta.2 → 2.30.0-beta.4
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-menu/dropdown-menu.d.ts +3 -3
- package/dist/components/dropdown-menu/dropdown-menu.styles.d.ts +1 -0
- package/dist/components/dropdown-menu/dropdown-menu.types.d.ts +5 -1
- package/dist/components/search-field/search-field.d.ts +5 -2
- package/dist/components/search-field/search-field.types.d.ts +2 -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,5 +1,5 @@
|
|
|
1
|
-
import { DropdownMenuProps } from './dropdown-menu.types';
|
|
1
|
+
import { DropdownMenuProps, DropdownItemBase } from './dropdown-menu.types';
|
|
2
2
|
export declare const DropdownMenu: {
|
|
3
|
-
<T>(props: DropdownMenuProps<T>): JSX.Element;
|
|
4
|
-
defaultProps: Partial<DropdownMenuProps<
|
|
3
|
+
<T extends DropdownItemBase>(props: DropdownMenuProps<T>): JSX.Element;
|
|
4
|
+
defaultProps: Partial<DropdownMenuProps<DropdownItemBase>>;
|
|
5
5
|
};
|
|
@@ -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>;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { Property } from 'csstype';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
import { Maybe } from '../../global';
|
|
4
|
-
export interface
|
|
4
|
+
export interface DropdownItemBase {
|
|
5
|
+
[key: string]: unknown;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface DropdownMenuProps<T = DropdownItemBase> {
|
|
5
9
|
autoSelectFirst?: boolean;
|
|
6
10
|
className?: string;
|
|
7
11
|
header?: ReactNode;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
import { FC, PropsWithChildren } from 'react';
|
|
2
1
|
import { SearchFieldProps } from './search-field.types';
|
|
3
|
-
|
|
2
|
+
import { DropdownItemBase } from '../dropdown-menu/dropdown-menu.types';
|
|
3
|
+
export declare const SearchField: {
|
|
4
|
+
<T extends DropdownItemBase>(props: SearchFieldProps<T>): JSX.Element;
|
|
5
|
+
defaultProps: Partial<SearchFieldProps<any>>;
|
|
6
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { CSSProperties, FocusEvent, ReactElement } from 'react';
|
|
2
2
|
import { Property } from 'csstype';
|
|
3
|
-
import { DropdownMenuProps } from '../dropdown-menu/dropdown-menu.types';
|
|
3
|
+
import { DropdownItemBase, 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 = DropdownItemBase> extends Pick<DropdownMenuProps<T>, Exclude<keyof DropdownMenuProps<T>, 'items'>> {
|
|
7
7
|
borderless?: boolean;
|
|
8
8
|
className?: string;
|
|
9
9
|
disabled?: boolean;
|