@pnkx-lib/ui 1.0.3 → 1.0.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.
@@ -5,8 +5,9 @@ import { ControllerRenderProps } from 'react-hook-form';
5
5
  import { Dayjs } from 'dayjs';
6
6
  import { default as default_2 } from 'react';
7
7
  import { IAllProps } from '@tinymce/tinymce-react';
8
- import { InputProps } from 'antd';
8
+ import { InputProps as InputProps_2 } from 'antd';
9
9
  import { JSX } from 'react/jsx-runtime';
10
+ import { JSX as JSX_2 } from 'react';
10
11
  import { RadioGroupProps } from 'antd';
11
12
  import { RangePickerProps } from 'antd/es/date-picker';
12
13
  import * as React_2 from 'react';
@@ -50,19 +51,9 @@ export declare interface DatePickerDMYProps extends Omit<ReactDatePickerProps, "
50
51
  size?: TSize;
51
52
  }
52
53
 
53
- export declare const Input: (props: Props) => JSX.Element;
54
+ export declare const Input: (props: InputProps) => JSX.Element;
54
55
 
55
- export declare class PnkxField<TComponent extends React_2.ComponentType<any>> extends React_2.PureComponent<PnkxFieldProps<TComponent>> {
56
- render(): JSX.Element;
57
- }
58
-
59
- export declare type PnkxFieldProps<TComponent extends React_2.ComponentType<any>> = {
60
- control: Control<any, any>;
61
- name: string;
62
- component: TComponent;
63
- } & Omit<ComponentPropsType<TComponent>, "control" | "name" | "formState" | "field" | "fieldState">;
64
-
65
- export declare interface Props extends InputProps {
56
+ export declare interface InputProps extends InputProps_2 {
66
57
  field?: ControllerRenderProps<any, any>;
67
58
  formState?: UseFormStateReturn<any>;
68
59
  label?: string;
@@ -77,6 +68,28 @@ export declare interface Props extends InputProps {
77
68
  suffix?: string;
78
69
  }
79
70
 
71
+ export declare class PnkxField<TComponent extends React_2.ComponentType<any>> extends React_2.PureComponent<PnkxFieldProps<TComponent>> {
72
+ render(): JSX.Element;
73
+ }
74
+
75
+ export declare type PnkxFieldProps<TComponent extends React_2.ComponentType<any>> = {
76
+ control: Control<any, any>;
77
+ name: string;
78
+ component: TComponent;
79
+ } & Omit<ComponentPropsType<TComponent>, "control" | "name" | "formState" | "field" | "fieldState">;
80
+
81
+ export declare interface PropsNumberFormat extends Omit<InputProps, "onChange" | "afterOnChange" | "value" | "defaultValue" | "iconStartInput" | "iconEndInput"> {
82
+ onChange?: (event: any) => void;
83
+ afterOnChange?: (value: string | number) => void;
84
+ value?: string;
85
+ name?: string;
86
+ ref: any;
87
+ type?: TInputNumberType;
88
+ prefix?: string;
89
+ suffix?: string;
90
+ helperText?: () => JSX_2.Element | null;
91
+ }
92
+
80
93
  export declare interface RadioProps extends Omit<RadioGroupProps, "options" | "onChange"> {
81
94
  field?: ControllerRenderProps<any, any>;
82
95
  formState?: UseFormStateReturn<any>;
@@ -127,6 +140,8 @@ export declare interface TextAreaProps extends TextAreaProps_2 {
127
140
  required?: boolean;
128
141
  }
129
142
 
143
+ declare type TInputNumberType = "number" | "money";
144
+
130
145
  export declare const TinyMCE: {
131
146
  (props: TinyProps): JSX.Element;
132
147
  displayName: string;
@@ -12,8 +12,9 @@ import { DefaultOptionType } from 'antd/es/cascader';
12
12
  import { DefaultValues } from 'react-hook-form';
13
13
  import { FieldValues } from 'react-hook-form';
14
14
  import { IAllProps } from '@tinymce/tinymce-react';
15
- import { InputProps } from 'antd';
15
+ import { InputProps as InputProps_2 } from 'antd';
16
16
  import { JSX } from 'react/jsx-runtime';
17
+ import { JSX as JSX_2 } from 'react';
17
18
  import { ModalProps } from 'antd';
18
19
  import { ParagraphProps } from 'antd/es/typography/Paragraph';
19
20
  import { PopoverProps as PopoverProps_2 } from 'antd';
@@ -114,7 +115,22 @@ export declare interface ErrorMessageProps {
114
115
  isSubmitted?: boolean;
115
116
  }
116
117
 
117
- export declare const Input: (props: Props) => JSX.Element;
118
+ export declare const Input: (props: InputProps) => JSX.Element;
119
+
120
+ export declare interface InputProps extends InputProps_2 {
121
+ field?: ControllerRenderProps<any, any>;
122
+ formState?: UseFormStateReturn<any>;
123
+ label?: string;
124
+ customStyleInput?: string;
125
+ type?: CustomInputTypeAttribute;
126
+ afterOnChange?: (value: number | string | null) => void;
127
+ iconStartInput?: default_2.ReactNode;
128
+ iconEndInput?: default_2.ReactNode;
129
+ allowNegative?: boolean;
130
+ decimalScale?: number;
131
+ prefix?: string;
132
+ suffix?: string;
133
+ }
118
134
 
119
135
  export declare const Label: ({ label, required }: LabelProps) => JSX.Element;
120
136
 
@@ -145,19 +161,16 @@ export declare type PopoverProps = PopoverProps_2;
145
161
 
146
162
  export declare type PopoverPropsUnion = BaseProps_2 & PopoverProps;
147
163
 
148
- export declare interface Props extends InputProps {
149
- field?: ControllerRenderProps<any, any>;
150
- formState?: UseFormStateReturn<any>;
151
- label?: string;
152
- customStyleInput?: string;
153
- type?: CustomInputTypeAttribute;
154
- afterOnChange?: (value: number | string | null) => void;
155
- iconStartInput?: default_2.ReactNode;
156
- iconEndInput?: default_2.ReactNode;
157
- allowNegative?: boolean;
158
- decimalScale?: number;
164
+ export declare interface PropsNumberFormat extends Omit<InputProps, "onChange" | "afterOnChange" | "value" | "defaultValue" | "iconStartInput" | "iconEndInput"> {
165
+ onChange?: (event: any) => void;
166
+ afterOnChange?: (value: string | number) => void;
167
+ value?: string;
168
+ name?: string;
169
+ ref: any;
170
+ type?: TInputNumberType;
159
171
  prefix?: string;
160
172
  suffix?: string;
173
+ helperText?: () => JSX_2.Element | null;
161
174
  }
162
175
 
163
176
  export declare interface RadioProps extends Omit<RadioGroupProps, "options" | "onChange"> {
@@ -273,6 +286,8 @@ export declare interface TextAreaProps extends TextAreaProps_2 {
273
286
  required?: boolean;
274
287
  }
275
288
 
289
+ declare type TInputNumberType = "number" | "money";
290
+
276
291
  export declare const TinyMCE: {
277
292
  (props: TinyProps): JSX.Element;
278
293
  displayName: string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pnkx-lib/ui",
3
3
  "private": false,
4
- "version": "1.0.3",
4
+ "version": "1.0.4",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "exports": {