@pnkx-lib/ui 1.9.36 → 1.9.38

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/types/fields.d.ts CHANGED
@@ -6,8 +6,8 @@ import { Dayjs } from 'dayjs';
6
6
  import { default as default_2 } from 'react';
7
7
  import { IAllProps } from '@tinymce/tinymce-react';
8
8
  import { InputProps as InputProps_2 } from 'antd';
9
- import { JSX as JSX_2 } from 'react/jsx-runtime';
10
- import { JSX as JSX_3 } from 'react';
9
+ import { JSX } from 'react/jsx-runtime';
10
+ import { JSX as JSX_2 } from 'react';
11
11
  import { RadioGroupProps } from 'antd';
12
12
  import { RangePickerProps } from 'antd/es/date-picker';
13
13
  import * as React_2 from 'react';
@@ -20,7 +20,7 @@ import { UploadProps } from 'antd';
20
20
  import { UseFormSetValue } from 'react-hook-form';
21
21
  import { UseFormStateReturn } from 'react-hook-form';
22
22
 
23
- export declare const CheckboxField: (props: CheckboxFieldProps) => JSX_2.Element;
23
+ export declare const CheckboxField: (props: CheckboxFieldProps) => JSX.Element;
24
24
 
25
25
  export declare interface CheckboxFieldProps extends Omit<CheckboxProps, "onChange" | "checked"> {
26
26
  field?: ControllerRenderProps<any, any>;
@@ -53,9 +53,9 @@ export declare interface DatePickerDMYProps extends Omit<ReactDatePickerProps, "
53
53
  size?: TSize;
54
54
  }
55
55
 
56
- export declare const DatePickerField: (props: DatePickerDMYProps) => JSX_2.Element;
56
+ export declare const DatePickerField: (props: DatePickerDMYProps) => JSX.Element;
57
57
 
58
- export declare const Input: (props: InputProps) => JSX_2.Element;
58
+ export declare const Input: (props: InputProps) => JSX.Element;
59
59
 
60
60
  export declare interface InputProps extends InputProps_2 {
61
61
  field?: ControllerRenderProps<any, any>;
@@ -73,7 +73,7 @@ export declare interface InputProps extends InputProps_2 {
73
73
  }
74
74
 
75
75
  export declare class PnkxField<TComponent extends React_2.ComponentType<any>> extends React_2.PureComponent<PnkxFieldProps<TComponent>> {
76
- render(): JSX_2.Element;
76
+ render(): JSX.Element;
77
77
  }
78
78
 
79
79
  export declare type PnkxFieldProps<TComponent extends React_2.ComponentType<any>> = {
@@ -91,10 +91,10 @@ export declare interface PropsNumberFormat extends Omit<InputProps, "onChange" |
91
91
  type?: TInputNumberType;
92
92
  prefix?: string;
93
93
  suffix?: string;
94
- helperText?: () => JSX_3.Element | null;
94
+ helperText?: () => JSX_2.Element | null;
95
95
  }
96
96
 
97
- export declare const RadioGroup: (props: RadioProps) => JSX_2.Element;
97
+ export declare const RadioGroup: (props: RadioProps) => JSX.Element;
98
98
 
99
99
  export declare interface RadioProps extends Omit<RadioGroupProps, "options" | "onChange"> {
100
100
  field?: ControllerRenderProps<any, any>;
@@ -107,7 +107,7 @@ export declare interface RadioProps extends Omit<RadioGroupProps, "options" | "o
107
107
  position?: TPositionRadio;
108
108
  }
109
109
 
110
- export declare const RangePickerField: (props: RangePickerFieldProps) => JSX_2.Element;
110
+ export declare const RangePickerField: (props: RangePickerFieldProps) => JSX.Element;
111
111
 
112
112
  export declare interface RangePickerFieldProps extends Omit<RangePickerProps, "value" | "onChange"> {
113
113
  field?: ControllerRenderProps<any, any>;
@@ -119,7 +119,7 @@ export declare interface RangePickerFieldProps extends Omit<RangePickerProps, "v
119
119
  customStyleDatePicker?: string;
120
120
  }
121
121
 
122
- export declare const Select: (props: SelectFieldProps) => JSX_2.Element;
122
+ export declare const Select: (props: SelectFieldProps) => JSX.Element;
123
123
 
124
124
  export declare interface SelectFieldProps extends SelectProps {
125
125
  field?: ControllerRenderProps<any, any>;
@@ -153,7 +153,7 @@ export declare interface TextAreaProps extends TextAreaProps_2 {
153
153
  declare type TInputNumberType = "number" | "money";
154
154
 
155
155
  export declare const TinyMCE: {
156
- (props: TinyProps): JSX_2.Element;
156
+ (props: TinyProps): JSX.Element;
157
157
  displayName: string;
158
158
  };
159
159
 
package/types/hooks.d.ts CHANGED
@@ -1,15 +1,16 @@
1
- import { ArgsProps } from 'antd/lib/message';
2
- import { ArgsProps as ArgsProps_2 } from 'antd/es/notification';
1
+ import { ArgsProps } from 'antd/es/notification';
2
+ import { ArgsProps as ArgsProps_2 } from 'antd/lib/message';
3
3
  import { default as default_2 } from 'react';
4
4
 
5
5
  export declare type InitialFiltersSearch<T> = T & PaginationFilters;
6
6
 
7
- export declare type OptionalArgsMessage = Partial<ArgsProps> & {
8
- type?: ArgsProps["type"];
7
+ export declare type OptionalArgsMessage = Partial<ArgsProps_2> & {
8
+ type?: ArgsProps_2["type"];
9
9
  };
10
10
 
11
- export declare type OptionalArgsToast = Partial<ArgsProps_2> & {
11
+ export declare type OptionalArgsToast = Partial<ArgsProps> & {
12
12
  message?: React.ReactNode;
13
+ type?: "success" | "error" | "info" | "warning";
13
14
  };
14
15
 
15
16
  export declare interface PaginationFilters {
@@ -33,6 +34,18 @@ export declare const useFiltersHandler: <T>(initialFilters: InitialFiltersSearch
33
34
 
34
35
  export declare const useMessage: (defaultProps?: OptionalArgsMessage) => (overrideProps?: OptionalArgsMessage) => void;
35
36
 
36
- export declare const useToast: (defaultProps?: OptionalArgsToast) => (overrideProps?: OptionalArgsToast) => void;
37
+ export declare const useToast: (defaultProps?: OptionalArgsToast) => {
38
+ (overrideProps?: OptionalArgsToast): void;
39
+ success(props?: OptionalArgsToast): void;
40
+ error(props?: OptionalArgsToast): void;
41
+ info(props?: OptionalArgsToast): void;
42
+ warning(props?: OptionalArgsToast): void;
43
+ };
44
+
45
+ export declare const useToggle: () => {
46
+ open: boolean;
47
+ toggle: () => void;
48
+ shouldRender: boolean;
49
+ };
37
50
 
38
51
  export { }