@top-message/ui-lib 1.20.8 → 1.21.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,7 +5,6 @@ export * from './card';
5
5
  export * from './dropdown';
6
6
  export * from './menu';
7
7
  export * from './float-button';
8
- export * from './select';
9
8
  export * from './dropdown-menu';
10
9
  export * from './table';
11
10
  export * from './chat-bubble';
@@ -15,7 +14,7 @@ export * from './date-picker';
15
14
  export * from './phone-input';
16
15
  export * from './modal';
17
16
  export * from './segmented';
18
- export * from './select-multiple';
17
+ export * from './select';
19
18
  export * from './search-input';
20
19
  export * from './breadcrumbs';
21
20
  export * from './input-select';
@@ -1,17 +1,26 @@
1
1
  import { CSSProperties, FC, ReactNode } from 'react';
2
- import { MenuItemProps } from '../..';
2
+ import { IconNames } from '../..';
3
+ export type SelectOption = {
4
+ label: ReactNode;
5
+ value: number | string;
6
+ disabled?: boolean;
7
+ };
3
8
  type Props = {
9
+ options: SelectOption[];
10
+ value: string | number | string[] | number[] | null;
11
+ onChange: (values: string | number | string[] | number[]) => void;
12
+ showSearch?: boolean;
13
+ hideDropdown?: boolean;
14
+ customSuffixIcon?: IconNames;
15
+ label?: ReactNode;
16
+ message?: ReactNode;
17
+ placeholder: string;
18
+ status?: 'warning' | 'danger';
4
19
  className?: string;
5
20
  style?: CSSProperties;
6
- placeholder: string;
7
- options: MenuItemProps[];
8
- value: (string | number)[] | null;
9
- isOpen: boolean;
10
- setOpen: (isOpen: boolean) => void;
21
+ onClick?: () => void;
22
+ multiple?: boolean;
11
23
  disabled?: boolean;
12
- status?: 'danger' | 'warning';
13
- label?: ReactNode;
14
- message?: string;
15
24
  };
16
25
  export declare const Select: FC<Props>;
17
26
  export {};
@@ -1 +1,2 @@
1
1
  export { Select } from './Select';
2
+ export type { SelectOption } from './Select';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@top-message/ui-lib",
3
- "version": "1.20.8",
3
+ "version": "1.21.1",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist",
@@ -74,8 +74,7 @@
74
74
  "g": "^2.0.1",
75
75
  "pnpm": "^8.15.4",
76
76
  "react": "^18.2.0",
77
- "react-phone-input-2": "^2.15.1",
78
- "react-select": "^5.8.0"
77
+ "react-phone-input-2": "^2.15.1"
79
78
  },
80
79
  "eslintConfig": {
81
80
  "extends": [
@@ -1,26 +0,0 @@
1
- import { CSSProperties, FC, ReactNode } from 'react';
2
- import { IconNames } from '../..';
3
- export type SelectOption = {
4
- label: ReactNode;
5
- value: number | string;
6
- disabled?: boolean;
7
- };
8
- type Props = {
9
- options: SelectOption[];
10
- value: string | number | string[] | number[] | null;
11
- onChange: (values: string | number | string[] | number[]) => void;
12
- showSearch?: boolean;
13
- hideDropdown?: boolean;
14
- customSuffixIcon?: IconNames;
15
- label?: ReactNode;
16
- message?: ReactNode;
17
- placeholder: string;
18
- status?: 'warning' | 'danger';
19
- className?: string;
20
- style?: CSSProperties;
21
- onClick?: () => void;
22
- multiple?: boolean;
23
- disabled?: boolean;
24
- };
25
- export declare const SelectMultiple: FC<Props>;
26
- export {};
@@ -1,2 +0,0 @@
1
- export { SelectMultiple } from './SelectMultiple';
2
- export type { SelectOption } from './SelectMultiple';