@pnkx-lib/ui 1.0.0

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.
@@ -0,0 +1,168 @@
1
+ import { CheckboxProps } from 'antd';
2
+ import { Control } from 'react-hook-form';
3
+ import { ControllerFieldState } from 'react-hook-form';
4
+ import { ControllerRenderProps } from 'react-hook-form';
5
+ import { Dayjs } from 'dayjs';
6
+ import { default as default_2 } from 'react';
7
+ import { IAllProps } from '@tinymce/tinymce-react';
8
+ import { InputProps } from 'antd';
9
+ import { JSX } from 'react/jsx-runtime';
10
+ import { RadioGroupProps } from 'antd';
11
+ import { RangePickerProps } from 'antd/es/date-picker';
12
+ import * as React_2 from 'react';
13
+ import { ReactDatePickerProps } from 'react-datepicker';
14
+ import { SelectProps } from 'antd';
15
+ import { SwitchProps } from 'antd';
16
+ import { TextAreaProps as TextAreaProps_2 } from 'antd/es/input';
17
+ import { UploadFile } from 'antd';
18
+ import { UploadProps } from 'antd';
19
+ import { UseFormSetValue } from 'react-hook-form';
20
+ import { UseFormStateReturn } from 'react-hook-form';
21
+
22
+ export declare interface CheckboxFieldProps extends Omit<CheckboxProps, "onChange" | "checked"> {
23
+ field?: ControllerRenderProps<any, any>;
24
+ formState?: UseFormStateReturn<any>;
25
+ label?: string;
26
+ required?: boolean;
27
+ afterOnChange?: (checked: boolean) => void;
28
+ customStyleContainer?: string;
29
+ customStyleCheckbox?: string;
30
+ }
31
+
32
+ declare type ComponentPropsType<TComponent> = TComponent extends React_2.ComponentType<infer P> ? P : never;
33
+
34
+ declare type CustomInputTypeAttribute = default_2.HTMLInputTypeAttribute | "money";
35
+
36
+ export declare interface DatePickerDMYProps extends Omit<ReactDatePickerProps, "onChange"> {
37
+ field?: ControllerRenderProps<any, any>;
38
+ formState?: UseFormStateReturn<any>;
39
+ setValue?: UseFormSetValue<any>;
40
+ customStyleDatepicker?: string;
41
+ disabledInputChange?: boolean;
42
+ required?: boolean;
43
+ dateFormat?: string | string[];
44
+ placeholder?: string;
45
+ label?: string;
46
+ maxDate?: Date;
47
+ showTimeSelect?: boolean;
48
+ customOnChange?: (date: any, event: default_2.SyntheticEvent<any>) => void;
49
+ customValue?: Date | null;
50
+ size?: TSize;
51
+ }
52
+
53
+ export declare const Input: (props: Props) => JSX.Element;
54
+
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 {
66
+ field?: ControllerRenderProps<any, any>;
67
+ formState?: UseFormStateReturn<any>;
68
+ label?: string;
69
+ customStyleInput?: string;
70
+ type?: CustomInputTypeAttribute;
71
+ afterOnChange?: (value: number | string | null) => void;
72
+ iconStartInput?: default_2.ReactNode;
73
+ iconEndInput?: default_2.ReactNode;
74
+ allowNegative?: boolean;
75
+ decimalScale?: number;
76
+ prefix?: string;
77
+ suffix?: string;
78
+ }
79
+
80
+ export declare interface RadioProps extends Omit<RadioGroupProps, "options" | "onChange"> {
81
+ field?: ControllerRenderProps<any, any>;
82
+ formState?: UseFormStateReturn<any>;
83
+ customStyleRadioGroup?: string;
84
+ customStyleRadio?: string;
85
+ customStyleWrap?: string;
86
+ afterOnchange?: (value: any) => void;
87
+ options: TOptionGRadio[];
88
+ position?: TPositionRadio;
89
+ }
90
+
91
+ export declare interface RangePickerFieldProps extends Omit<RangePickerProps, "value" | "onChange"> {
92
+ field?: ControllerRenderProps<any, any>;
93
+ formState?: UseFormStateReturn<any>;
94
+ label?: string;
95
+ required?: boolean;
96
+ afterOnChange?: (dates: [Dayjs | null, Dayjs | null] | null, dateStrings: [string, string]) => void;
97
+ customStyleContainer?: string;
98
+ customStyleDatePicker?: string;
99
+ }
100
+
101
+ export declare interface SelectFieldProps extends SelectProps {
102
+ field?: ControllerRenderProps<any, any>;
103
+ formState?: UseFormStateReturn<any>;
104
+ setValue?: UseFormSetValue<any>;
105
+ label?: string;
106
+ required?: boolean;
107
+ afterOnChange?: (value: any) => void;
108
+ customStyleContainer?: string;
109
+ }
110
+
111
+ export declare interface SwitchFieldProps extends Omit<SwitchProps, "onChange" | "checked"> {
112
+ field?: ControllerRenderProps<any, any>;
113
+ formState?: UseFormStateReturn<any>;
114
+ label?: string;
115
+ required?: boolean;
116
+ afterOnChange?: (checked: boolean) => void;
117
+ customStyleContainer?: string;
118
+ customStyleSwitch?: string;
119
+ }
120
+
121
+ export declare interface TextAreaProps extends TextAreaProps_2 {
122
+ field?: ControllerRenderProps<any, any>;
123
+ formState?: UseFormStateReturn<any>;
124
+ label?: string;
125
+ customStyleTextarea?: string;
126
+ afterOnChange?: (value: string) => void;
127
+ required?: boolean;
128
+ }
129
+
130
+ export declare const TinyMCE: {
131
+ (props: TinyProps): JSX.Element;
132
+ displayName: string;
133
+ };
134
+
135
+ export declare interface TinyProps extends IAllProps {
136
+ height?: number | string;
137
+ openHidenMenubar?: boolean;
138
+ required?: boolean;
139
+ field?: ControllerRenderProps<any, any>;
140
+ formState?: UseFormStateReturn<any>;
141
+ label?: string;
142
+ customStyleLabel?: string;
143
+ text_patterns?: any;
144
+ }
145
+
146
+ declare type TOptionGRadio = {
147
+ label: string;
148
+ value: string | number;
149
+ };
150
+
151
+ declare type TPositionRadio = "before" | "after";
152
+
153
+ declare type TSize = "small" | "medium" | "large";
154
+
155
+ export declare interface UploadFieldProps extends Omit<UploadProps, "value" | "onChange" | "fileList"> {
156
+ field?: ControllerRenderProps<any, any>;
157
+ formState?: UseFormStateReturn<any>;
158
+ fieldState?: ControllerFieldState;
159
+ label?: string;
160
+ required?: boolean;
161
+ maxFiles?: number;
162
+ uploadButtonText?: string;
163
+ customStyleContainer?: string;
164
+ customStyleUpload?: string;
165
+ afterOnChange?: (fileList: UploadFile[]) => void;
166
+ }
167
+
168
+ export { }
@@ -0,0 +1,347 @@
1
+ import { ArgsProps } from 'antd/es/notification';
2
+ import { BadgeProps as BadgeProps_2 } from 'antd';
3
+ import { ButtonProps as ButtonProps_2 } from 'antd';
4
+ import { CascaderProps } from 'antd/es/cascader';
5
+ import { CheckboxProps } from 'antd';
6
+ import { ColumnsType } from 'antd/es/table';
7
+ import { Control } from 'react-hook-form';
8
+ import { ControllerFieldState } from 'react-hook-form';
9
+ import { ControllerRenderProps } from 'react-hook-form';
10
+ import { Dayjs } from 'dayjs';
11
+ import { default as default_2 } from 'react';
12
+ import { DefaultOptionType } from 'antd/es/cascader';
13
+ import { DefaultValues } from 'react-hook-form';
14
+ import { FieldValues } from 'react-hook-form';
15
+ import { IAllProps } from '@tinymce/tinymce-react';
16
+ import { InputProps } from 'antd';
17
+ import { JSX } from 'react/jsx-runtime';
18
+ import { ModalProps } from 'antd';
19
+ import { PaginationFilters } from '../../../../../../../../../../src/interface/common';
20
+ import { ParagraphProps } from 'antd/es/typography/Paragraph';
21
+ import { PopoverProps as PopoverProps_2 } from 'antd';
22
+ import { RadioGroupProps } from 'antd';
23
+ import { RangePickerProps } from 'antd/es/date-picker';
24
+ import * as React_2 from 'react';
25
+ import { ReactDatePickerProps } from 'react-datepicker';
26
+ import { ReactNode } from 'react';
27
+ import { RowCommon } from '../../../../../../../../../../src/interface/common';
28
+ import { SelectProps } from 'antd';
29
+ import { SkeletonProps as SkeletonProps_2 } from 'antd';
30
+ import { SwitchProps } from 'antd';
31
+ import { TableProps } from 'antd/lib/table';
32
+ import { TabsProps as TabsProps_2 } from 'antd';
33
+ import { TextAreaProps as TextAreaProps_2 } from 'antd/es/input';
34
+ import { TextProps } from 'antd/es/typography/Text';
35
+ import { TitleProps } from 'antd/es/typography/Title';
36
+ import { TooltipProps as TooltipProps_2 } from 'antd';
37
+ import { UploadFile } from 'antd';
38
+ import { UploadProps } from 'antd';
39
+ import { UseFormHandleSubmit } from 'react-hook-form';
40
+ import { UseFormReturn } from 'react-hook-form';
41
+ import { UseFormSetValue } from 'react-hook-form';
42
+ import { UseFormStateReturn } from 'react-hook-form';
43
+
44
+ export declare const Badge: ({ type, ...rest }: BadgeProps) => JSX.Element;
45
+
46
+ export declare interface BadgeProps extends BadgeProps_2 {
47
+ type?: "error" | "info" | "success" | "warning";
48
+ }
49
+
50
+ declare type BaseProps = {
51
+ customStyleContainer?: string;
52
+ customStyleCascader?: string;
53
+ };
54
+
55
+ declare type BaseProps_2 = {
56
+ customStyleContainer?: string;
57
+ customStylePopover?: string;
58
+ };
59
+
60
+ export declare const Button: default_2.FC<ButtonProps>;
61
+
62
+ export declare type ButtonProps = ButtonProps_2;
63
+
64
+ export declare const CascaderField: (props: CascaderFieldProps) => JSX.Element;
65
+
66
+ export declare type CascaderFieldProps = BaseProps & (SingleCascaderProps | MultipleCascaderProps);
67
+
68
+ export declare interface CheckboxFieldProps extends Omit<CheckboxProps, "onChange" | "checked"> {
69
+ field?: ControllerRenderProps<any, any>;
70
+ formState?: UseFormStateReturn<any>;
71
+ label?: string;
72
+ required?: boolean;
73
+ afterOnChange?: (checked: boolean) => void;
74
+ customStyleContainer?: string;
75
+ customStyleCheckbox?: string;
76
+ }
77
+
78
+ declare type ComponentPropsType<TComponent> = TComponent extends React_2.ComponentType<infer P> ? P : never;
79
+
80
+ export declare const Container: default_2.FC<ContainerProps>;
81
+
82
+ export declare interface ContainerProps {
83
+ children: default_2.ReactNode;
84
+ size?: TailwindMaxWidth;
85
+ className?: string;
86
+ }
87
+
88
+ export declare interface CustomeModalProps extends ModalProps {
89
+ children?: ReactNode;
90
+ onSubmit?: () => void;
91
+ }
92
+
93
+ declare type CustomInputTypeAttribute = default_2.HTMLInputTypeAttribute | "money";
94
+
95
+ export declare interface DatePickerDMYProps extends Omit<ReactDatePickerProps, "onChange"> {
96
+ field?: ControllerRenderProps<any, any>;
97
+ formState?: UseFormStateReturn<any>;
98
+ setValue?: UseFormSetValue<any>;
99
+ customStyleDatepicker?: string;
100
+ disabledInputChange?: boolean;
101
+ required?: boolean;
102
+ dateFormat?: string | string[];
103
+ placeholder?: string;
104
+ label?: string;
105
+ maxDate?: Date;
106
+ showTimeSelect?: boolean;
107
+ customOnChange?: (date: any, event: default_2.SyntheticEvent<any>) => void;
108
+ customValue?: Date | null;
109
+ size?: TSize;
110
+ }
111
+
112
+ export declare const ErrorMessage: default_2.MemoExoticComponent<({ errorMessage, isTouched, isSubmitted }: ErrorMessageProps) => JSX.Element | null>;
113
+
114
+ export declare interface ErrorMessageProps {
115
+ errorMessage?: string;
116
+ isTouched?: boolean;
117
+ isSubmitted?: boolean;
118
+ }
119
+
120
+ export declare type InitialFiltersSearch<T> = T & PaginationFilters;
121
+
122
+ export declare const Input: (props: Props) => JSX.Element;
123
+
124
+ export declare const Label: ({ label, required }: LabelProps) => JSX.Element;
125
+
126
+ export declare interface LabelProps {
127
+ label: string;
128
+ required?: boolean;
129
+ }
130
+
131
+ export declare const Modal: ({ children, onOk, onSubmit, ...rest }: CustomeModalProps) => JSX.Element;
132
+
133
+ declare type MultipleCascaderProps = CascaderProps<DefaultOptionType, string, true> & {
134
+ multiple: true;
135
+ };
136
+
137
+ export declare type OptionalArgs = Partial<ArgsProps> & {
138
+ message?: React.ReactNode;
139
+ };
140
+
141
+ export declare class PnkxField<TComponent extends React_2.ComponentType<any>> extends React_2.PureComponent<PnkxFieldProps<TComponent>> {
142
+ render(): JSX.Element;
143
+ }
144
+
145
+ export declare type PnkxFieldProps<TComponent extends React_2.ComponentType<any>> = {
146
+ control: Control<any, any>;
147
+ name: string;
148
+ component: TComponent;
149
+ } & Omit<ComponentPropsType<TComponent>, "control" | "name" | "formState" | "field" | "fieldState">;
150
+
151
+ export declare const Popover: (props: PopoverPropsUnion) => JSX.Element;
152
+
153
+ declare type PopoverProps = PopoverProps_2;
154
+
155
+ export declare type PopoverPropsUnion = BaseProps_2 & PopoverProps;
156
+
157
+ export declare interface Props extends InputProps {
158
+ field?: ControllerRenderProps<any, any>;
159
+ formState?: UseFormStateReturn<any>;
160
+ label?: string;
161
+ customStyleInput?: string;
162
+ type?: CustomInputTypeAttribute;
163
+ afterOnChange?: (value: number | string | null) => void;
164
+ iconStartInput?: default_2.ReactNode;
165
+ iconEndInput?: default_2.ReactNode;
166
+ allowNegative?: boolean;
167
+ decimalScale?: number;
168
+ prefix?: string;
169
+ suffix?: string;
170
+ }
171
+
172
+ export declare interface RadioProps extends Omit<RadioGroupProps, "options" | "onChange"> {
173
+ field?: ControllerRenderProps<any, any>;
174
+ formState?: UseFormStateReturn<any>;
175
+ customStyleRadioGroup?: string;
176
+ customStyleRadio?: string;
177
+ customStyleWrap?: string;
178
+ afterOnchange?: (value: any) => void;
179
+ options: TOptionGRadio[];
180
+ position?: TPositionRadio;
181
+ }
182
+
183
+ export declare interface RangePickerFieldProps extends Omit<RangePickerProps, "value" | "onChange"> {
184
+ field?: ControllerRenderProps<any, any>;
185
+ formState?: UseFormStateReturn<any>;
186
+ label?: string;
187
+ required?: boolean;
188
+ afterOnChange?: (dates: [Dayjs | null, Dayjs | null] | null, dateStrings: [string, string]) => void;
189
+ customStyleContainer?: string;
190
+ customStyleDatePicker?: string;
191
+ }
192
+
193
+ export declare const SearchFiltersForm: <T extends FieldValues = FieldValues>({ initialValues, renderFilterFields, onSubmit, onReset, classNamesContainer, classNameWrapperForm, hideDefaultSubmit, hideResetButton, }: SearchFiltersFormProps<T> & Partial<UseFormReturn<T>>) => JSX.Element;
194
+
195
+ export declare interface SearchFiltersFormProps<T extends FieldValues> {
196
+ renderFilterFields?: (options: {
197
+ control: Control<T, any, T>;
198
+ setValue?: UseFormSetValue<T>;
199
+ handleSubmit?: UseFormHandleSubmit<T, T>;
200
+ }) => default_2.ReactNode;
201
+ onReset?: () => void;
202
+ classNamesContainer?: string;
203
+ classNameWrapperForm?: string;
204
+ hideDefaultSubmit?: boolean;
205
+ hideResetButton?: boolean;
206
+ initialValues?: DefaultValues<T>;
207
+ onSubmit: (data: T) => void;
208
+ }
209
+
210
+ export declare interface SelectFieldProps extends SelectProps {
211
+ field?: ControllerRenderProps<any, any>;
212
+ formState?: UseFormStateReturn<any>;
213
+ setValue?: UseFormSetValue<any>;
214
+ label?: string;
215
+ required?: boolean;
216
+ afterOnChange?: (value: any) => void;
217
+ customStyleContainer?: string;
218
+ }
219
+
220
+ declare type SingleCascaderProps = CascaderProps<DefaultOptionType, string> & {
221
+ multiple?: false;
222
+ };
223
+
224
+ export declare const Skeleton: ({ type }: SkeletonProps) => JSX.Element;
225
+
226
+ export declare interface SkeletonProps extends SkeletonProps_2 {
227
+ type?: "table" | "form";
228
+ }
229
+
230
+ export declare interface SwitchFieldProps extends Omit<SwitchProps, "onChange" | "checked"> {
231
+ field?: ControllerRenderProps<any, any>;
232
+ formState?: UseFormStateReturn<any>;
233
+ label?: string;
234
+ required?: boolean;
235
+ afterOnChange?: (checked: boolean) => void;
236
+ customStyleContainer?: string;
237
+ customStyleSwitch?: string;
238
+ }
239
+
240
+ declare type TabItem = {
241
+ key: string;
242
+ label: default_2.ReactNode;
243
+ children: default_2.ReactNode;
244
+ disabled?: boolean;
245
+ };
246
+
247
+ export declare const Table: <T extends RowCommon>({ data, columns, loading, totalItems, filters, onChangePage, onChangePageSize, onSort, rowsSelected, onSelect, onRowClick, ...rest }: TableCommonProps<T>) => JSX.Element;
248
+
249
+ export declare interface TableCommonProps<T> extends TableProps<T> {
250
+ data: T[];
251
+ columns: ColumnsType<T>;
252
+ loading?: boolean;
253
+ totalItems: number;
254
+ filters: any;
255
+ onChangePage: (page: number) => void;
256
+ onChangePageSize: (size: number) => void;
257
+ onSort?: (event: default_2.MouseEvent<unknown>, sortField: string) => void;
258
+ rowsSelected: default_2.Key[];
259
+ onSelect: (newSelectedRowKeys: default_2.Key[]) => void;
260
+ onRowClick?: (record: T) => void;
261
+ }
262
+
263
+ export declare const Tabs: default_2.FC<TabsProps>;
264
+
265
+ export declare type TabsProps = TabsProps_2 & {
266
+ items: TabItem[];
267
+ lazyRender?: boolean;
268
+ };
269
+
270
+ export declare type TailwindMaxWidth = "max-w-xs" | "max-w-sm" | "max-w-md" | "max-w-lg" | "max-w-xl" | "max-w-2xl" | "max-w-3xl" | "max-w-4xl" | "max-w-5xl" | "max-w-6xl" | "max-w-7xl" | "max-w-full" | "max-w-screen-sm" | "max-w-screen-md" | "max-w-screen-lg" | "max-w-screen-xl" | "max-w-screen-2xl";
271
+
272
+ export declare interface TextAreaProps extends TextAreaProps_2 {
273
+ field?: ControllerRenderProps<any, any>;
274
+ formState?: UseFormStateReturn<any>;
275
+ label?: string;
276
+ customStyleTextarea?: string;
277
+ afterOnChange?: (value: string) => void;
278
+ required?: boolean;
279
+ }
280
+
281
+ export declare const TinyMCE: {
282
+ (props: TinyProps): JSX.Element;
283
+ displayName: string;
284
+ };
285
+
286
+ export declare interface TinyProps extends IAllProps {
287
+ height?: number | string;
288
+ openHidenMenubar?: boolean;
289
+ required?: boolean;
290
+ field?: ControllerRenderProps<any, any>;
291
+ formState?: UseFormStateReturn<any>;
292
+ label?: string;
293
+ customStyleLabel?: string;
294
+ text_patterns?: any;
295
+ }
296
+
297
+ export declare const Tooltip: default_2.FC<TooltipProps>;
298
+
299
+ export declare type TooltipProps = TooltipProps_2;
300
+
301
+ declare type TOptionGRadio = {
302
+ label: string;
303
+ value: string | number;
304
+ };
305
+
306
+ declare type TPositionRadio = "before" | "after";
307
+
308
+ declare type TSize = "small" | "medium" | "large";
309
+
310
+ export declare const typeColorMap: Record<NonNullable<BadgeProps["type"]>, string>;
311
+
312
+ export declare const Typography: {
313
+ Title: (props: TitleProps) => JSX.Element;
314
+ Paragraph: (props: ParagraphProps) => JSX.Element;
315
+ Text: (props: TextProps) => JSX.Element;
316
+ };
317
+
318
+ export declare interface UploadFieldProps extends Omit<UploadProps, "value" | "onChange" | "fileList"> {
319
+ field?: ControllerRenderProps<any, any>;
320
+ formState?: UseFormStateReturn<any>;
321
+ fieldState?: ControllerFieldState;
322
+ label?: string;
323
+ required?: boolean;
324
+ maxFiles?: number;
325
+ uploadButtonText?: string;
326
+ customStyleContainer?: string;
327
+ customStyleUpload?: string;
328
+ afterOnChange?: (fileList: UploadFile[]) => void;
329
+ }
330
+
331
+ export declare const useFiltersHandler: <T>(initialFilters: InitialFiltersSearch<T>) => {
332
+ filters: InitialFiltersSearch<T>;
333
+ rowsSelected: default_2.Key[];
334
+ setRowsSelected: default_2.Dispatch<default_2.SetStateAction<default_2.Key[]>>;
335
+ setFilters: default_2.Dispatch<default_2.SetStateAction<InitialFiltersSearch<T>>>;
336
+ goToPage: (PageIndex: number) => void;
337
+ changeRowlimit: (value: number) => void;
338
+ resetToInitialFilters: () => void;
339
+ handleCheckBox: (newSelectedRowKeys: default_2.Key[]) => void;
340
+ handleChangePage: (nextPage: number) => void;
341
+ handleRequestSort: (sortField: string | number | symbol) => void;
342
+ handleSearch: (nextFilters: InitialFiltersSearch<T>) => void;
343
+ };
344
+
345
+ export declare const useToast: (defaultProps?: OptionalArgs) => () => void;
346
+
347
+ export { }
@@ -0,0 +1,161 @@
1
+ import { BadgeProps as BadgeProps_2 } from 'antd';
2
+ import { ButtonProps as ButtonProps_2 } from 'antd';
3
+ import { CascaderProps } from 'antd/es/cascader';
4
+ import { ColumnsType } from 'antd/es/table';
5
+ import { Control } from 'react-hook-form';
6
+ import { default as default_2 } from 'react';
7
+ import { DefaultOptionType } from 'antd/es/cascader';
8
+ import { DefaultValues } from 'react-hook-form';
9
+ import { FieldValues } from 'react-hook-form';
10
+ import { JSX } from 'react/jsx-runtime';
11
+ import { ModalProps } from 'antd';
12
+ import { ParagraphProps } from 'antd/es/typography/Paragraph';
13
+ import { PopoverProps as PopoverProps_2 } from 'antd';
14
+ import { ReactNode } from 'react';
15
+ import { RowCommon } from '../../../../../../../../../../src/interface/common';
16
+ import { SkeletonProps as SkeletonProps_2 } from 'antd';
17
+ import { TableProps } from 'antd/lib/table';
18
+ import { TabsProps as TabsProps_2 } from 'antd';
19
+ import { TextProps } from 'antd/es/typography/Text';
20
+ import { TitleProps } from 'antd/es/typography/Title';
21
+ import { TooltipProps as TooltipProps_2 } from 'antd';
22
+ import { UseFormHandleSubmit } from 'react-hook-form';
23
+ import { UseFormReturn } from 'react-hook-form';
24
+ import { UseFormSetValue } from 'react-hook-form';
25
+
26
+ export declare const Badge: ({ type, ...rest }: BadgeProps) => JSX.Element;
27
+
28
+ export declare interface BadgeProps extends BadgeProps_2 {
29
+ type?: "error" | "info" | "success" | "warning";
30
+ }
31
+
32
+ declare type BaseProps = {
33
+ customStyleContainer?: string;
34
+ customStyleCascader?: string;
35
+ };
36
+
37
+ declare type BaseProps_2 = {
38
+ customStyleContainer?: string;
39
+ customStylePopover?: string;
40
+ };
41
+
42
+ export declare const Button: default_2.FC<ButtonProps>;
43
+
44
+ export declare type ButtonProps = ButtonProps_2;
45
+
46
+ export declare const CascaderField: (props: CascaderFieldProps) => JSX.Element;
47
+
48
+ export declare type CascaderFieldProps = BaseProps & (SingleCascaderProps | MultipleCascaderProps);
49
+
50
+ export declare const Container: default_2.FC<ContainerProps>;
51
+
52
+ export declare interface ContainerProps {
53
+ children: default_2.ReactNode;
54
+ size?: TailwindMaxWidth;
55
+ className?: string;
56
+ }
57
+
58
+ export declare interface CustomeModalProps extends ModalProps {
59
+ children?: ReactNode;
60
+ onSubmit?: () => void;
61
+ }
62
+
63
+ export declare const ErrorMessage: default_2.MemoExoticComponent<({ errorMessage, isTouched, isSubmitted }: ErrorMessageProps) => JSX.Element | null>;
64
+
65
+ export declare interface ErrorMessageProps {
66
+ errorMessage?: string;
67
+ isTouched?: boolean;
68
+ isSubmitted?: boolean;
69
+ }
70
+
71
+ export declare const Label: ({ label, required }: LabelProps) => JSX.Element;
72
+
73
+ export declare interface LabelProps {
74
+ label: string;
75
+ required?: boolean;
76
+ }
77
+
78
+ export declare const Modal: ({ children, onOk, onSubmit, ...rest }: CustomeModalProps) => JSX.Element;
79
+
80
+ declare type MultipleCascaderProps = CascaderProps<DefaultOptionType, string, true> & {
81
+ multiple: true;
82
+ };
83
+
84
+ export declare const Popover: (props: PopoverPropsUnion) => JSX.Element;
85
+
86
+ declare type PopoverProps = PopoverProps_2;
87
+
88
+ export declare type PopoverPropsUnion = BaseProps_2 & PopoverProps;
89
+
90
+ export declare const SearchFiltersForm: <T extends FieldValues = FieldValues>({ initialValues, renderFilterFields, onSubmit, onReset, classNamesContainer, classNameWrapperForm, hideDefaultSubmit, hideResetButton, }: SearchFiltersFormProps<T> & Partial<UseFormReturn<T>>) => JSX.Element;
91
+
92
+ export declare interface SearchFiltersFormProps<T extends FieldValues> {
93
+ renderFilterFields?: (options: {
94
+ control: Control<T, any, T>;
95
+ setValue?: UseFormSetValue<T>;
96
+ handleSubmit?: UseFormHandleSubmit<T, T>;
97
+ }) => default_2.ReactNode;
98
+ onReset?: () => void;
99
+ classNamesContainer?: string;
100
+ classNameWrapperForm?: string;
101
+ hideDefaultSubmit?: boolean;
102
+ hideResetButton?: boolean;
103
+ initialValues?: DefaultValues<T>;
104
+ onSubmit: (data: T) => void;
105
+ }
106
+
107
+ declare type SingleCascaderProps = CascaderProps<DefaultOptionType, string> & {
108
+ multiple?: false;
109
+ };
110
+
111
+ export declare const Skeleton: ({ type }: SkeletonProps) => JSX.Element;
112
+
113
+ export declare interface SkeletonProps extends SkeletonProps_2 {
114
+ type?: "table" | "form";
115
+ }
116
+
117
+ declare type TabItem = {
118
+ key: string;
119
+ label: default_2.ReactNode;
120
+ children: default_2.ReactNode;
121
+ disabled?: boolean;
122
+ };
123
+
124
+ export declare const Table: <T extends RowCommon>({ data, columns, loading, totalItems, filters, onChangePage, onChangePageSize, onSort, rowsSelected, onSelect, onRowClick, ...rest }: TableCommonProps<T>) => JSX.Element;
125
+
126
+ export declare interface TableCommonProps<T> extends TableProps<T> {
127
+ data: T[];
128
+ columns: ColumnsType<T>;
129
+ loading?: boolean;
130
+ totalItems: number;
131
+ filters: any;
132
+ onChangePage: (page: number) => void;
133
+ onChangePageSize: (size: number) => void;
134
+ onSort?: (event: default_2.MouseEvent<unknown>, sortField: string) => void;
135
+ rowsSelected: default_2.Key[];
136
+ onSelect: (newSelectedRowKeys: default_2.Key[]) => void;
137
+ onRowClick?: (record: T) => void;
138
+ }
139
+
140
+ export declare const Tabs: default_2.FC<TabsProps>;
141
+
142
+ export declare type TabsProps = TabsProps_2 & {
143
+ items: TabItem[];
144
+ lazyRender?: boolean;
145
+ };
146
+
147
+ export declare type TailwindMaxWidth = "max-w-xs" | "max-w-sm" | "max-w-md" | "max-w-lg" | "max-w-xl" | "max-w-2xl" | "max-w-3xl" | "max-w-4xl" | "max-w-5xl" | "max-w-6xl" | "max-w-7xl" | "max-w-full" | "max-w-screen-sm" | "max-w-screen-md" | "max-w-screen-lg" | "max-w-screen-xl" | "max-w-screen-2xl";
148
+
149
+ export declare const Tooltip: default_2.FC<TooltipProps>;
150
+
151
+ export declare type TooltipProps = TooltipProps_2;
152
+
153
+ export declare const typeColorMap: Record<NonNullable<BadgeProps["type"]>, string>;
154
+
155
+ export declare const Typography: {
156
+ Title: (props: TitleProps) => JSX.Element;
157
+ Paragraph: (props: ParagraphProps) => JSX.Element;
158
+ Text: (props: TextProps) => JSX.Element;
159
+ };
160
+
161
+ export { }
@@ -0,0 +1,19 @@
1
+ import { e, B as o, C as r, d as t, M as l, P as p, c as T, S as d, T as b, b as i, a as n, t as C } from "../chunks/Badge-D0BZUAPX.js";
2
+ import { E as c, L as g, T as m } from "../chunks/AntdIcon-BppsuyXF.js";
3
+ export {
4
+ e as Badge,
5
+ o as Button,
6
+ r as CascaderField,
7
+ t as Container,
8
+ c as ErrorMessage,
9
+ g as Label,
10
+ l as Modal,
11
+ p as Popover,
12
+ T as SearchFiltersForm,
13
+ d as Skeleton,
14
+ b as Table,
15
+ i as Tabs,
16
+ n as Tooltip,
17
+ m as Typography,
18
+ C as typeColorMap
19
+ };