@pnkx-lib/ui 1.0.6 → 1.0.8

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 { I as s, P as e, T as i } from "../chunks/Switch-B0z-9IsF.js";
1
+ import { I as s, P as e, T as i } from "../chunks/Switch-CV_omX2f.js";
2
2
  export {
3
3
  s as Input,
4
4
  e as PnkxField,
package/dist/index.js CHANGED
@@ -1,23 +1,29 @@
1
- import { e, B as o, C as r, d as t, M as p, P as l, c as T, S as n, T as d, b as i, a as C, t as M } from "./chunks/Badge-CGBb9ohQ.js";
2
- import { E as m, L as x, T as y } from "./chunks/AntdIcon-DV7aA2xc.js";
3
- import { I as P, P as c, T as f } from "./chunks/Switch-B0z-9IsF.js";
1
+ import { e as o, g as e, B as r, C as t, f as l, d as p, D as d, F as n, L as T, M as i, P as C, R as F, c as b, S as m, T as x, b as y, a as M, t as c } from "./chunks/Layout-DiFWE7Vg.js";
2
+ import { E as g, L as u, T as B } from "./chunks/createSuper-COi32LGt.js";
3
+ import { I as P, P as E, T as S } from "./chunks/Switch-CV_omX2f.js";
4
4
  export {
5
- e as Badge,
6
- o as Button,
7
- r as CascaderField,
8
- t as Container,
9
- m as ErrorMessage,
5
+ o as Badge,
6
+ e as Breadcrumb,
7
+ r as Button,
8
+ t as CascaderField,
9
+ l as Col,
10
+ p as Container,
11
+ d as Dropdown,
12
+ g as ErrorMessage,
13
+ n as Flex,
10
14
  P as Input,
11
- x as Label,
12
- p as Modal,
13
- c as PnkxField,
14
- l as Popover,
15
- T as SearchFiltersForm,
16
- n as Skeleton,
17
- d as Table,
18
- i as Tabs,
19
- f as TinyMCE,
20
- C as Tooltip,
21
- y as Typography,
22
- M as typeColorMap
15
+ u as Label,
16
+ T as Layout,
17
+ i as Modal,
18
+ E as PnkxField,
19
+ C as Popover,
20
+ F as Row,
21
+ b as SearchFiltersForm,
22
+ m as Skeleton,
23
+ x as Table,
24
+ y as Tabs,
25
+ S as TinyMCE,
26
+ M as Tooltip,
27
+ B as Typography,
28
+ c as typeColorMap
23
29
  };
@@ -1,7 +1,14 @@
1
1
  import { BadgeProps as BadgeProps_2 } from 'antd';
2
+ import { BasicProps } from 'antd/es/layout/layout';
3
+ import { BreadcrumbItemType as BreadcrumbItemType_2 } from 'antd/es/breadcrumb/Breadcrumb';
4
+ import { BreadcrumbProps as BreadcrumbProps_2 } from 'antd';
5
+ import { BreadcrumbSeparatorType as BreadcrumbSeparatorType_2 } from 'antd/es/breadcrumb/Breadcrumb';
6
+ import { Breakpoint } from 'antd';
2
7
  import { ButtonProps as ButtonProps_2 } from 'antd';
3
8
  import { CascaderProps } from 'antd/es/cascader';
4
9
  import { CheckboxProps } from 'antd';
10
+ import { ColProps as ColProps_2 } from 'antd';
11
+ import { ColSize as ColSize_2 } from 'antd/es/grid';
5
12
  import { ColumnsType as ColumnsType_2 } from 'antd/es/table';
6
13
  import { Control } from 'react-hook-form';
7
14
  import { ControllerFieldState } from 'react-hook-form';
@@ -10,7 +17,11 @@ import { Dayjs } from 'dayjs';
10
17
  import { default as default_2 } from 'react';
11
18
  import { DefaultOptionType } from 'antd/es/cascader';
12
19
  import { DefaultValues } from 'react-hook-form';
20
+ import { DropdownButtonProps as DropdownButtonProps_2 } from 'antd/es/dropdown';
21
+ import { DropdownButtonType as DropdownButtonType_2 } from 'antd/es/dropdown';
22
+ import { DropdownProps as DropdownProps_2 } from 'antd';
13
23
  import { FieldValues } from 'react-hook-form';
24
+ import { FlexProps as FlexProps_2 } from 'antd';
14
25
  import { IAllProps } from '@tinymce/tinymce-react';
15
26
  import { InputProps as InputProps_2 } from 'antd';
16
27
  import { JSX } from 'react/jsx-runtime';
@@ -23,7 +34,10 @@ import { RangePickerProps } from 'antd/es/date-picker';
23
34
  import * as React_2 from 'react';
24
35
  import { ReactDatePickerProps } from 'react-datepicker';
25
36
  import { ReactNode } from 'react';
37
+ import { RowProps as RowProps_2 } from 'antd';
26
38
  import { SelectProps } from 'antd';
39
+ import { SiderContextProps } from 'antd/es/layout/Sider';
40
+ import { SiderProps } from 'antd/es/layout/Sider';
27
41
  import { SkeletonProps as SkeletonProps_2 } from 'antd';
28
42
  import { SwitchProps } from 'antd';
29
43
  import { TableProps } from 'antd/lib/table';
@@ -55,6 +69,45 @@ declare type BaseProps_2 = {
55
69
  popoverClassName?: string;
56
70
  };
57
71
 
72
+ declare type BaseProps_3 = {
73
+ colClassName?: string;
74
+ };
75
+
76
+ declare type BaseProps_4 = {
77
+ rowClassName?: string;
78
+ };
79
+
80
+ declare type BaseProps_5 = {
81
+ containerClassName?: string;
82
+ dropdownClassName?: string;
83
+ };
84
+
85
+ declare type BaseProps_6 = {
86
+ containerClassName?: string;
87
+ breadcrumbClassName?: string;
88
+ };
89
+
90
+ declare type BaseProps_7 = {
91
+ containerClassName?: string;
92
+ flexClassName?: string;
93
+ };
94
+
95
+ declare type BaseProps_8 = {
96
+ layoutClassName?: string;
97
+ };
98
+
99
+ export declare const Breadcrumb: (props: BreadcrumbPropsUnion) => JSX.Element;
100
+
101
+ export declare interface BreadcrumbItemType extends BreadcrumbItemType_2 {
102
+ children?: Omit<BreadcrumbItemType, "children">[];
103
+ }
104
+
105
+ export declare type BreadcrumbProps = BreadcrumbProps_2;
106
+
107
+ export declare type BreadcrumbPropsUnion = BaseProps_6 & BreadcrumbProps;
108
+
109
+ export declare type BreadcrumbSeparatorType = BreadcrumbSeparatorType_2;
110
+
58
111
  export declare const Button: default_2.FC<ButtonProps>;
59
112
 
60
113
  export declare type ButtonProps = ButtonProps_2;
@@ -73,6 +126,18 @@ export declare interface CheckboxFieldProps extends Omit<CheckboxProps, "onChang
73
126
  customStyleCheckbox?: string;
74
127
  }
75
128
 
129
+ export declare const Col: (props: ColPropsUnion) => JSX.Element;
130
+
131
+ export declare interface ColProps extends ColProps_2, Partial<Record<Breakpoint, ColSpanType | ColSize>> {
132
+ }
133
+
134
+ export declare type ColPropsUnion = BaseProps_3 & ColProps;
135
+
136
+ export declare interface ColSize extends ColSize_2 {
137
+ }
138
+
139
+ export declare type ColSpanType = number | string;
140
+
76
141
  export declare type ColumnsType<T> = ColumnsType_2<T>;
77
142
 
78
143
  declare type ComponentPropsType<TComponent> = TComponent extends React_2.ComponentType<infer P> ? P : never;
@@ -109,6 +174,16 @@ export declare interface DatePickerDMYProps extends Omit<ReactDatePickerProps, "
109
174
  size?: TSize;
110
175
  }
111
176
 
177
+ export declare const Dropdown: (props: DropdownPropsUnion) => JSX.Element;
178
+
179
+ export declare type DropdownButtonProps = DropdownButtonProps_2;
180
+
181
+ export declare type DropdownButtonType = DropdownButtonType_2;
182
+
183
+ export declare type DropdownProps = DropdownProps_2;
184
+
185
+ export declare type DropdownPropsUnion = BaseProps_5 & DropdownProps;
186
+
112
187
  export declare const ErrorMessage: default_2.MemoExoticComponent<({ errorMessage, isTouched, isSubmitted }: ErrorMessageProps) => JSX.Element | null>;
113
188
 
114
189
  export declare interface ErrorMessageProps {
@@ -117,6 +192,12 @@ export declare interface ErrorMessageProps {
117
192
  isSubmitted?: boolean;
118
193
  }
119
194
 
195
+ export declare const Flex: (props: FlexPropsUnion) => JSX.Element;
196
+
197
+ export declare type FlexProps = FlexProps_2;
198
+
199
+ export declare type FlexPropsUnion = BaseProps_7 & FlexProps;
200
+
120
201
  export declare const Input: (props: InputProps) => JSX.Element;
121
202
 
122
203
  export declare interface InputProps extends InputProps_2 {
@@ -134,6 +215,10 @@ export declare interface InputProps extends InputProps_2 {
134
215
  suffix?: string;
135
216
  }
136
217
 
218
+ export declare type InternalRouteType = Partial<BreadcrumbItemType & BreadcrumbSeparatorType>;
219
+
220
+ export declare type ItemType = Partial<BreadcrumbItemType & BreadcrumbSeparatorType>;
221
+
137
222
  export declare const Label: ({ label, required }: LabelProps) => JSX.Element;
138
223
 
139
224
  export declare interface LabelProps {
@@ -141,6 +226,16 @@ export declare interface LabelProps {
141
226
  required?: boolean;
142
227
  }
143
228
 
229
+ export declare const Layout: default_2.FC<LayoutProps> & {
230
+ Header: default_2.ForwardRefExoticComponent<BasicProps & default_2.RefAttributes<HTMLElement>>;
231
+ Footer: default_2.ForwardRefExoticComponent<BasicProps & default_2.RefAttributes<HTMLElement>>;
232
+ Content: default_2.ForwardRefExoticComponent<BasicProps & default_2.RefAttributes<HTMLElement>>;
233
+ Sider: default_2.ForwardRefExoticComponent<SiderProps & default_2.RefAttributes<HTMLDivElement>>;
234
+ _InternalSiderContext: default_2.Context<SiderContextProps>;
235
+ };
236
+
237
+ export declare type LayoutProps = BaseProps_8 & BasicProps;
238
+
144
239
  export declare const Modal: ({ children, onOk, onSubmit, ...rest }: CustomeModalProps) => JSX.Element;
145
240
 
146
241
  declare type MultipleCascaderProps = CascaderProps<DefaultOptionType, string, true> & {
@@ -196,10 +291,17 @@ export declare interface RangePickerFieldProps extends Omit<RangePickerProps, "v
196
291
  customStyleDatePicker?: string;
197
292
  }
198
293
 
294
+ export declare const Row: (props: RowPropsUnion) => JSX.Element;
295
+
199
296
  declare interface RowCommon {
200
297
  [x: string]: any;
201
298
  }
202
299
 
300
+ export declare interface RowProps extends RowProps_2 {
301
+ }
302
+
303
+ export declare type RowPropsUnion = BaseProps_4 & RowProps;
304
+
203
305
  export declare const SearchFiltersForm: <T extends FieldValues = FieldValues>({ initialValues, renderFilterFields, onSubmit, onReset, classNamesContainer, classNameWrapperForm, hideDefaultSubmit, hideResetButton, }: SearchFiltersFormProps<T> & Partial<UseFormReturn<T>>) => JSX.Element;
204
306
 
205
307
  export declare interface SearchFiltersFormProps<T extends FieldValues> {
@@ -254,7 +356,7 @@ declare type TabItem = {
254
356
  disabled?: boolean;
255
357
  };
256
358
 
257
- export declare const Table: <T extends RowCommon>({ data, columns, loading, totalItems, filters, onChangePage, onChangePageSize, onSort, rowsSelected, onSelect, onRowClick, ...rest }: TableCommonProps<T>) => JSX.Element;
359
+ export declare const Table: <T extends RowCommon>({ data, columns, loading, totalItems, filters, onChangePage, onChangePageSize, onSort, rowsSelected, onSelect, onRowClick, rowKey, ...rest }: TableCommonProps<T>) => JSX.Element;
258
360
 
259
361
  export declare interface TableCommonProps<T> extends TableProps<T> {
260
362
  data: T[];
@@ -1,17 +1,31 @@
1
1
  import { BadgeProps as BadgeProps_2 } from 'antd';
2
+ import { BasicProps } from 'antd/es/layout/layout';
3
+ import { BreadcrumbItemType as BreadcrumbItemType_2 } from 'antd/es/breadcrumb/Breadcrumb';
4
+ import { BreadcrumbProps as BreadcrumbProps_2 } from 'antd';
5
+ import { BreadcrumbSeparatorType as BreadcrumbSeparatorType_2 } from 'antd/es/breadcrumb/Breadcrumb';
6
+ import { Breakpoint } from 'antd';
2
7
  import { ButtonProps as ButtonProps_2 } from 'antd';
3
8
  import { CascaderProps } from 'antd/es/cascader';
9
+ import { ColProps as ColProps_2 } from 'antd';
10
+ import { ColSize as ColSize_2 } from 'antd/es/grid';
4
11
  import { ColumnsType as ColumnsType_2 } from 'antd/es/table';
5
12
  import { Control } from 'react-hook-form';
6
13
  import { default as default_2 } from 'react';
7
14
  import { DefaultOptionType } from 'antd/es/cascader';
8
15
  import { DefaultValues } from 'react-hook-form';
16
+ import { DropdownButtonProps as DropdownButtonProps_2 } from 'antd/es/dropdown';
17
+ import { DropdownButtonType as DropdownButtonType_2 } from 'antd/es/dropdown';
18
+ import { DropdownProps as DropdownProps_2 } from 'antd';
9
19
  import { FieldValues } from 'react-hook-form';
20
+ import { FlexProps as FlexProps_2 } from 'antd';
10
21
  import { JSX } from 'react/jsx-runtime';
11
22
  import { ModalProps } from 'antd';
12
23
  import { ParagraphProps } from 'antd/es/typography/Paragraph';
13
24
  import { PopoverProps as PopoverProps_2 } from 'antd';
14
25
  import { ReactNode } from 'react';
26
+ import { RowProps as RowProps_2 } from 'antd';
27
+ import { SiderContextProps } from 'antd/es/layout/Sider';
28
+ import { SiderProps } from 'antd/es/layout/Sider';
15
29
  import { SkeletonProps as SkeletonProps_2 } from 'antd';
16
30
  import { TableProps } from 'antd/lib/table';
17
31
  import { TabsProps as TabsProps_2 } from 'antd';
@@ -38,6 +52,45 @@ declare type BaseProps_2 = {
38
52
  popoverClassName?: string;
39
53
  };
40
54
 
55
+ declare type BaseProps_3 = {
56
+ colClassName?: string;
57
+ };
58
+
59
+ declare type BaseProps_4 = {
60
+ rowClassName?: string;
61
+ };
62
+
63
+ declare type BaseProps_5 = {
64
+ containerClassName?: string;
65
+ dropdownClassName?: string;
66
+ };
67
+
68
+ declare type BaseProps_6 = {
69
+ containerClassName?: string;
70
+ breadcrumbClassName?: string;
71
+ };
72
+
73
+ declare type BaseProps_7 = {
74
+ containerClassName?: string;
75
+ flexClassName?: string;
76
+ };
77
+
78
+ declare type BaseProps_8 = {
79
+ layoutClassName?: string;
80
+ };
81
+
82
+ export declare const Breadcrumb: (props: BreadcrumbPropsUnion) => JSX.Element;
83
+
84
+ export declare interface BreadcrumbItemType extends BreadcrumbItemType_2 {
85
+ children?: Omit<BreadcrumbItemType, "children">[];
86
+ }
87
+
88
+ export declare type BreadcrumbProps = BreadcrumbProps_2;
89
+
90
+ export declare type BreadcrumbPropsUnion = BaseProps_6 & BreadcrumbProps;
91
+
92
+ export declare type BreadcrumbSeparatorType = BreadcrumbSeparatorType_2;
93
+
41
94
  export declare const Button: default_2.FC<ButtonProps>;
42
95
 
43
96
  export declare type ButtonProps = ButtonProps_2;
@@ -46,6 +99,18 @@ export declare const CascaderField: (props: CascaderFieldProps) => JSX.Element;
46
99
 
47
100
  export declare type CascaderFieldProps = BaseProps & (SingleCascaderProps | MultipleCascaderProps);
48
101
 
102
+ export declare const Col: (props: ColPropsUnion) => JSX.Element;
103
+
104
+ export declare interface ColProps extends ColProps_2, Partial<Record<Breakpoint, ColSpanType | ColSize>> {
105
+ }
106
+
107
+ export declare type ColPropsUnion = BaseProps_3 & ColProps;
108
+
109
+ export declare interface ColSize extends ColSize_2 {
110
+ }
111
+
112
+ export declare type ColSpanType = number | string;
113
+
49
114
  export declare type ColumnsType<T> = ColumnsType_2<T>;
50
115
 
51
116
  export declare const Container: default_2.FC<ContainerProps>;
@@ -61,6 +126,16 @@ export declare interface CustomeModalProps extends ModalProps {
61
126
  onSubmit?: () => void;
62
127
  }
63
128
 
129
+ export declare const Dropdown: (props: DropdownPropsUnion) => JSX.Element;
130
+
131
+ export declare type DropdownButtonProps = DropdownButtonProps_2;
132
+
133
+ export declare type DropdownButtonType = DropdownButtonType_2;
134
+
135
+ export declare type DropdownProps = DropdownProps_2;
136
+
137
+ export declare type DropdownPropsUnion = BaseProps_5 & DropdownProps;
138
+
64
139
  export declare const ErrorMessage: default_2.MemoExoticComponent<({ errorMessage, isTouched, isSubmitted }: ErrorMessageProps) => JSX.Element | null>;
65
140
 
66
141
  export declare interface ErrorMessageProps {
@@ -69,6 +144,16 @@ export declare interface ErrorMessageProps {
69
144
  isSubmitted?: boolean;
70
145
  }
71
146
 
147
+ export declare const Flex: (props: FlexPropsUnion) => JSX.Element;
148
+
149
+ export declare type FlexProps = FlexProps_2;
150
+
151
+ export declare type FlexPropsUnion = BaseProps_7 & FlexProps;
152
+
153
+ export declare type InternalRouteType = Partial<BreadcrumbItemType & BreadcrumbSeparatorType>;
154
+
155
+ export declare type ItemType = Partial<BreadcrumbItemType & BreadcrumbSeparatorType>;
156
+
72
157
  export declare const Label: ({ label, required }: LabelProps) => JSX.Element;
73
158
 
74
159
  export declare interface LabelProps {
@@ -76,6 +161,16 @@ export declare interface LabelProps {
76
161
  required?: boolean;
77
162
  }
78
163
 
164
+ export declare const Layout: default_2.FC<LayoutProps> & {
165
+ Header: default_2.ForwardRefExoticComponent<BasicProps & default_2.RefAttributes<HTMLElement>>;
166
+ Footer: default_2.ForwardRefExoticComponent<BasicProps & default_2.RefAttributes<HTMLElement>>;
167
+ Content: default_2.ForwardRefExoticComponent<BasicProps & default_2.RefAttributes<HTMLElement>>;
168
+ Sider: default_2.ForwardRefExoticComponent<SiderProps & default_2.RefAttributes<HTMLDivElement>>;
169
+ _InternalSiderContext: default_2.Context<SiderContextProps>;
170
+ };
171
+
172
+ export declare type LayoutProps = BaseProps_8 & BasicProps;
173
+
79
174
  export declare const Modal: ({ children, onOk, onSubmit, ...rest }: CustomeModalProps) => JSX.Element;
80
175
 
81
176
  declare type MultipleCascaderProps = CascaderProps<DefaultOptionType, string, true> & {
@@ -88,10 +183,17 @@ export declare type PopoverProps = PopoverProps_2;
88
183
 
89
184
  export declare type PopoverPropsUnion = BaseProps_2 & PopoverProps;
90
185
 
186
+ export declare const Row: (props: RowPropsUnion) => JSX.Element;
187
+
91
188
  declare interface RowCommon {
92
189
  [x: string]: any;
93
190
  }
94
191
 
192
+ export declare interface RowProps extends RowProps_2 {
193
+ }
194
+
195
+ export declare type RowPropsUnion = BaseProps_4 & RowProps;
196
+
95
197
  export declare const SearchFiltersForm: <T extends FieldValues = FieldValues>({ initialValues, renderFilterFields, onSubmit, onReset, classNamesContainer, classNameWrapperForm, hideDefaultSubmit, hideResetButton, }: SearchFiltersFormProps<T> & Partial<UseFormReturn<T>>) => JSX.Element;
96
198
 
97
199
  export declare interface SearchFiltersFormProps<T extends FieldValues> {
@@ -126,7 +228,7 @@ declare type TabItem = {
126
228
  disabled?: boolean;
127
229
  };
128
230
 
129
- export declare const Table: <T extends RowCommon>({ data, columns, loading, totalItems, filters, onChangePage, onChangePageSize, onSort, rowsSelected, onSelect, onRowClick, ...rest }: TableCommonProps<T>) => JSX.Element;
231
+ export declare const Table: <T extends RowCommon>({ data, columns, loading, totalItems, filters, onChangePage, onChangePageSize, onSort, rowsSelected, onSelect, onRowClick, rowKey, ...rest }: TableCommonProps<T>) => JSX.Element;
130
232
 
131
233
  export declare interface TableCommonProps<T> extends TableProps<T> {
132
234
  data: T[];
package/dist/ui/index.js CHANGED
@@ -1,19 +1,25 @@
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-CGBb9ohQ.js";
2
- import { E as c, L as g, T as m } from "../chunks/AntdIcon-DV7aA2xc.js";
1
+ import { e as o, g as e, B as r, C as t, f as l, d as p, D as d, F as T, L as b, M as n, P as C, R as F, c, S as g, T as i, b as m, a as y, t as B } from "../chunks/Layout-DiFWE7Vg.js";
2
+ import { E as M, L as f, T as u } from "../chunks/createSuper-COi32LGt.js";
3
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
4
+ o as Badge,
5
+ e as Breadcrumb,
6
+ r as Button,
7
+ t as CascaderField,
8
+ l as Col,
9
+ p as Container,
10
+ d as Dropdown,
11
+ M as ErrorMessage,
12
+ T as Flex,
13
+ f as Label,
14
+ b as Layout,
15
+ n as Modal,
16
+ C as Popover,
17
+ F as Row,
18
+ c as SearchFiltersForm,
19
+ g as Skeleton,
20
+ i as Table,
21
+ m as Tabs,
22
+ y as Tooltip,
23
+ u as Typography,
24
+ B as typeColorMap
19
25
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pnkx-lib/ui",
3
3
  "private": false,
4
- "version": "1.0.6",
4
+ "version": "1.0.8",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "exports": {