hplx-react-elements-dev 1.1.42 → 1.1.43

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,4 +1,4 @@
1
- import { ReactNode } from "react";
1
+ import { ReactElement, ReactNode } from "react";
2
2
  export interface InputFieldProps {
3
3
  label?: string;
4
4
  fieldColor?: string;
@@ -246,26 +246,30 @@ export interface DropdownItemsProps {
246
246
  start_icon?: string;
247
247
  end_icon?: string;
248
248
  value?: any;
249
+ showCheckbox?: boolean;
249
250
  active?: boolean;
250
251
  disabled?: boolean;
251
252
  onSelect?: (value: any) => void;
252
253
  ddRef?: any;
253
254
  setChangeLeft?: any;
254
255
  }
255
- export interface DropdownFieldProps {
256
+ export type DropdownValue<IsMulti extends boolean> = IsMulti extends true ? DropdownItemsProps[] : DropdownItemsProps;
257
+ export interface DropdownFieldProps<IsMulti extends boolean> {
256
258
  label?: string;
257
259
  end_icon?: string;
258
260
  hint_text?: string;
259
261
  hint_text_icon?: string;
260
262
  disabled?: boolean;
261
263
  errorMsg?: string;
262
- value?: DropdownItemsProps;
263
- onChange?: (value: DropdownItemsProps) => void;
264
+ value?: DropdownValue<IsMulti>;
265
+ isMulti?: IsMulti;
266
+ onChange?: (newValue: DropdownValue<IsMulti>) => void;
264
267
  placeholder?: string;
265
268
  empty_text?: string;
266
269
  options?: Array<DropdownItemsProps>;
267
270
  className?: string;
268
271
  }
272
+ export type Select = <IsMulti extends boolean = false>(props: DropdownFieldProps<IsMulti>) => ReactElement;
269
273
  export interface CardType {
270
274
  title: string;
271
275
  }
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "frontend",
10
10
  "healthplix"
11
11
  ],
12
- "version": "1.1.42",
12
+ "version": "1.1.43",
13
13
  "main": "dist/esm/index.js",
14
14
  "module": "dist/esm/index.js",
15
15
  "types": "dist/esm/index.d.ts",