@pnkx-lib/ui 1.0.3 → 1.0.5
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/dist/types/fields.d.ts +28 -13
- package/dist/types/index.d.ts +31 -14
- package/dist/types/ui.d.ts +3 -1
- package/package.json +3 -2
package/dist/types/fields.d.ts
CHANGED
@@ -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:
|
54
|
+
export declare const Input: (props: InputProps) => JSX.Element;
|
54
55
|
|
55
|
-
export declare
|
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;
|
package/dist/types/index.d.ts
CHANGED
@@ -2,7 +2,7 @@ import { BadgeProps as BadgeProps_2 } from 'antd';
|
|
2
2
|
import { ButtonProps as ButtonProps_2 } from 'antd';
|
3
3
|
import { CascaderProps } from 'antd/es/cascader';
|
4
4
|
import { CheckboxProps } from 'antd';
|
5
|
-
import { ColumnsType } from 'antd/es/table';
|
5
|
+
import { ColumnsType as ColumnsType_2 } from 'antd/es/table';
|
6
6
|
import { Control } from 'react-hook-form';
|
7
7
|
import { ControllerFieldState } from 'react-hook-form';
|
8
8
|
import { ControllerRenderProps } from 'react-hook-form';
|
@@ -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';
|
@@ -72,6 +73,8 @@ export declare interface CheckboxFieldProps extends Omit<CheckboxProps, "onChang
|
|
72
73
|
customStyleCheckbox?: string;
|
73
74
|
}
|
74
75
|
|
76
|
+
export declare type ColumnsType<T> = ColumnsType_2<T>;
|
77
|
+
|
75
78
|
declare type ComponentPropsType<TComponent> = TComponent extends React_2.ComponentType<infer P> ? P : never;
|
76
79
|
|
77
80
|
export declare const Container: default_2.FC<ContainerProps>;
|
@@ -114,7 +117,22 @@ export declare interface ErrorMessageProps {
|
|
114
117
|
isSubmitted?: boolean;
|
115
118
|
}
|
116
119
|
|
117
|
-
export declare const Input: (props:
|
120
|
+
export declare const Input: (props: InputProps) => JSX.Element;
|
121
|
+
|
122
|
+
export declare interface InputProps extends InputProps_2 {
|
123
|
+
field?: ControllerRenderProps<any, any>;
|
124
|
+
formState?: UseFormStateReturn<any>;
|
125
|
+
label?: string;
|
126
|
+
customStyleInput?: string;
|
127
|
+
type?: CustomInputTypeAttribute;
|
128
|
+
afterOnChange?: (value: number | string | null) => void;
|
129
|
+
iconStartInput?: default_2.ReactNode;
|
130
|
+
iconEndInput?: default_2.ReactNode;
|
131
|
+
allowNegative?: boolean;
|
132
|
+
decimalScale?: number;
|
133
|
+
prefix?: string;
|
134
|
+
suffix?: string;
|
135
|
+
}
|
118
136
|
|
119
137
|
export declare const Label: ({ label, required }: LabelProps) => JSX.Element;
|
120
138
|
|
@@ -145,19 +163,16 @@ export declare type PopoverProps = PopoverProps_2;
|
|
145
163
|
|
146
164
|
export declare type PopoverPropsUnion = BaseProps_2 & PopoverProps;
|
147
165
|
|
148
|
-
export declare interface
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
iconStartInput?: default_2.ReactNode;
|
156
|
-
iconEndInput?: default_2.ReactNode;
|
157
|
-
allowNegative?: boolean;
|
158
|
-
decimalScale?: number;
|
166
|
+
export declare interface PropsNumberFormat extends Omit<InputProps, "onChange" | "afterOnChange" | "value" | "defaultValue" | "iconStartInput" | "iconEndInput"> {
|
167
|
+
onChange?: (event: any) => void;
|
168
|
+
afterOnChange?: (value: string | number) => void;
|
169
|
+
value?: string;
|
170
|
+
name?: string;
|
171
|
+
ref: any;
|
172
|
+
type?: TInputNumberType;
|
159
173
|
prefix?: string;
|
160
174
|
suffix?: string;
|
175
|
+
helperText?: () => JSX_2.Element | null;
|
161
176
|
}
|
162
177
|
|
163
178
|
export declare interface RadioProps extends Omit<RadioGroupProps, "options" | "onChange"> {
|
@@ -273,6 +288,8 @@ export declare interface TextAreaProps extends TextAreaProps_2 {
|
|
273
288
|
required?: boolean;
|
274
289
|
}
|
275
290
|
|
291
|
+
declare type TInputNumberType = "number" | "money";
|
292
|
+
|
276
293
|
export declare const TinyMCE: {
|
277
294
|
(props: TinyProps): JSX.Element;
|
278
295
|
displayName: string;
|
package/dist/types/ui.d.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import { BadgeProps as BadgeProps_2 } from 'antd';
|
2
2
|
import { ButtonProps as ButtonProps_2 } from 'antd';
|
3
3
|
import { CascaderProps } from 'antd/es/cascader';
|
4
|
-
import { ColumnsType } from 'antd/es/table';
|
4
|
+
import { ColumnsType as ColumnsType_2 } from 'antd/es/table';
|
5
5
|
import { Control } from 'react-hook-form';
|
6
6
|
import { default as default_2 } from 'react';
|
7
7
|
import { DefaultOptionType } from 'antd/es/cascader';
|
@@ -46,6 +46,8 @@ export declare const CascaderField: (props: CascaderFieldProps) => JSX.Element;
|
|
46
46
|
|
47
47
|
export declare type CascaderFieldProps = BaseProps & (SingleCascaderProps | MultipleCascaderProps);
|
48
48
|
|
49
|
+
export declare type ColumnsType<T> = ColumnsType_2<T>;
|
50
|
+
|
49
51
|
export declare const Container: default_2.FC<ContainerProps>;
|
50
52
|
|
51
53
|
export declare interface ContainerProps {
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@pnkx-lib/ui",
|
3
3
|
"private": false,
|
4
|
-
"version": "1.0.
|
4
|
+
"version": "1.0.5",
|
5
5
|
"type": "module",
|
6
6
|
"main": "./dist/index.js",
|
7
7
|
"exports": {
|
@@ -58,11 +58,12 @@
|
|
58
58
|
"eslint-plugin-react-refresh": "^0.4.19",
|
59
59
|
"eslint-plugin-storybook": "^0.11.6",
|
60
60
|
"globals": "^15.15.0",
|
61
|
+
"rollup-plugin-visualizer": "^5.14.0",
|
61
62
|
"storybook": "^8.6.7",
|
62
63
|
"tailwindcss": "^4.0.17",
|
63
64
|
"typescript": "~5.7.2",
|
64
65
|
"typescript-eslint": "^8.24.1",
|
65
|
-
"vite": "^6.2.
|
66
|
+
"vite": "^6.2.6",
|
66
67
|
"vite-plugin-dts": "^4.5.3",
|
67
68
|
"vitest": "^3.0.9"
|
68
69
|
},
|