@televet/kibble-ui 1.13.2-beta.42tpxg8.8 → 1.13.2

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,26 +1,18 @@
1
- import React, { ReactNode, ChangeEvent } from 'react';
1
+ import React, { ReactNode } from 'react';
2
2
  import { SelectProps as CSelectProps } from '@chakra-ui/react';
3
- import { MenuListProps } from 'components/Overlay/Menu/components/MenuList/menuList.component';
4
3
  import { WithFormControlProps } from '../FormControl/formControl.component';
5
4
  import { SelectOptionProps } from 'components/Forms/Select/select.types';
6
- export interface SelectListProps extends Omit<MenuListProps, 'canSelectAll' | 'canSelectGroups' | 'isMultiSelect' | 'onSelectAll' | 'menuItems' | 'shouldTruncateText'> {
7
- onClose?: (selectedOption: (SelectOptionProps | undefined)[]) => void;
8
- defaultLeftElement?: ReactNode;
9
- }
10
- export interface SelectBaseProps extends WithFormControlProps, CSelectProps {
5
+ export interface SelectProps extends WithFormControlProps, CSelectProps {
6
+ useBrowserDefaultMenu?: boolean;
11
7
  options: SelectOptionProps[];
8
+ listProps?: {
9
+ isGrouped?: boolean;
10
+ isSearchable?: boolean;
11
+ onSelect?: (selectedOption: SelectOptionProps) => void;
12
+ onClose?: (selectedOption: (SelectOptionProps | undefined)[]) => void;
13
+ defaultLeftElement?: ReactNode;
14
+ };
12
15
  shouldTruncateText?: boolean;
13
16
  }
14
- export interface BrowserDefaultSelect extends SelectBaseProps {
15
- useBrowserDefaultMenu?: boolean;
16
- onChange: (e: ChangeEvent<HTMLSelectElement>) => void;
17
- listProps?: never;
18
- }
19
- export interface CustomSelect extends SelectBaseProps {
20
- useBrowserDefaultMenu?: never;
21
- onChange?: never;
22
- listProps?: SelectListProps;
23
- }
24
- export declare type SelectProps = BrowserDefaultSelect | CustomSelect;
25
17
  declare const WrappedSelect: React.FC<SelectProps>;
26
18
  export { WrappedSelect as Select };
@@ -1,4 +1,3 @@
1
1
  import { MenuItemProps } from '../../Overlay/Menu';
2
2
  export interface SelectOptionProps extends MenuItemProps {
3
- isPlaceholder?: boolean;
4
3
  }
@@ -1,5 +1,4 @@
1
1
  export * from './DataDisplay';
2
- export * from './Feedback';
3
2
  export * from './Disclosure';
4
3
  export * from './Forms';
5
4
  export * from './Layout';