@pnkx-lib/ui 1.3.4 → 1.3.6

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,11 +1,12 @@
1
- import { C as i, D as s, I as d, P as l, R as o, a as r, S as c, T as k } from "../chunks/Switch-CzMyITg3.js";
1
+ import { D as i, I as s, P as o, R as r, a as d } from "../chunks/Switch-C9zRQPNY.js";
2
+ import { C as t, R as c, S as k } from "../chunks/Checkbox-CTyXv2Fp.js";
2
3
  export {
3
- i as CheckboxField,
4
- s as DatePickerField,
5
- d as Input,
6
- l as PnkxField,
7
- o as RadioGroup,
4
+ t as CheckboxField,
5
+ i as DatePickerField,
6
+ s as Input,
7
+ o as PnkxField,
8
+ c as RadioGroup,
8
9
  r as RangePickerField,
9
- c as Select,
10
- k as TinyMCE
10
+ k as Select,
11
+ d as TinyMCE
11
12
  };
package/dist/index.js CHANGED
@@ -1,41 +1,41 @@
1
- import { e, g as o, B as r, C as t, f as i, d as l, D as p, F as d, H as n, L as c, j as F, M as S, k as C, P as T, R as b, c as g, m as P, S as k, h as m, i as u, l as x, T as M, b as y, a as R, t as f } from "./chunks/Heading-0P1VChK0.js";
2
- import { E as B, L as D, T as L } from "./chunks/createSuper-DBIhZ50y.js";
3
- import { C as w, D as H, I, P as j, R as v, a as G, S as q, T as z } from "./chunks/Switch-CzMyITg3.js";
1
+ import { e, g as o, B as r, C as t, f as i, d as l, D as p, F as d, H as n, L as c, j as F, M as S, k as C, P as b, R as g, c as P, m as T, S as k, h as m, i as u, l as x, T as M, b as R, a as y, t as f } from "./chunks/Heading-DPghjWhA.js";
2
+ import { D as B, E as D, I as L, L as E, P as w, R as H, a as I, T as j } from "./chunks/Switch-C9zRQPNY.js";
3
+ import { C as G, R as q, S as z } from "./chunks/Checkbox-CTyXv2Fp.js";
4
4
  export {
5
5
  e as Badge,
6
6
  o as Breadcrumb,
7
7
  r as Button,
8
8
  t as CascaderField,
9
- w as CheckboxField,
9
+ G as CheckboxField,
10
10
  i as Col,
11
11
  l as Container,
12
- H as DatePickerField,
12
+ B as DatePickerField,
13
13
  p as Dropdown,
14
- B as ErrorMessage,
14
+ D as ErrorMessage,
15
15
  d as Flex,
16
16
  n as Heading,
17
- I as Input,
18
- D as Label,
17
+ L as Input,
18
+ E as Label,
19
19
  c as Layout,
20
20
  F as Menu,
21
21
  S as Modal,
22
22
  C as Pagination,
23
- j as PnkxField,
24
- T as Popover,
25
- v as RadioGroup,
26
- G as RangePickerField,
27
- b as Row,
28
- g as SearchFiltersForm,
29
- q as Select,
30
- P as Sidebar,
23
+ w as PnkxField,
24
+ b as Popover,
25
+ q as RadioGroup,
26
+ H as RangePickerField,
27
+ g as Row,
28
+ P as SearchFiltersForm,
29
+ z as Select,
30
+ T as Sidebar,
31
31
  k as Skeleton,
32
32
  m as Space,
33
33
  u as Splitter,
34
34
  x as Steps,
35
35
  M as Table,
36
- y as Tabs,
37
- z as TinyMCE,
38
- R as Tooltip,
39
- L as Typography,
36
+ R as Tabs,
37
+ I as TinyMCE,
38
+ y as Tooltip,
39
+ j as Typography,
40
40
  f as typeColorMap
41
41
  };
@@ -67,6 +67,7 @@ import { TitleProps } from 'antd/es/typography/Title';
67
67
  import { TooltipProps as TooltipProps_2 } from 'antd';
68
68
  import { UploadFile } from 'antd';
69
69
  import { UploadProps } from 'antd';
70
+ import { UseFormReset } from 'react-hook-form';
70
71
  import { UseFormReturn } from 'react-hook-form';
71
72
  import { UseFormSetValue } from 'react-hook-form';
72
73
  import { UseFormStateReturn } from 'react-hook-form';
@@ -407,6 +408,7 @@ export declare interface SearchFiltersFormProps<T extends FieldValues> {
407
408
  control: Control<T, any, T>;
408
409
  setValue?: UseFormSetValue<T>;
409
410
  handleSubmit?: FormEventHandler<any>;
411
+ reset?: UseFormReset<T>;
410
412
  }) => default_2.ReactNode;
411
413
  onReset?: () => void;
412
414
  classNamesContainer?: string;
@@ -441,6 +443,7 @@ export declare interface SidebarProps {
441
443
  children?: Array<{
442
444
  name: string;
443
445
  href: string;
446
+ icon?: React.ReactNode;
444
447
  }>;
445
448
  }>;
446
449
  }
@@ -503,7 +506,7 @@ declare type TabItem = {
503
506
  disabled?: boolean;
504
507
  };
505
508
 
506
- export declare const Table: <T extends RowCommon>({ dataSource, columns, loading, totalItems, filters, onChangePage, onChangePageSize, onSort, rowsSelected, onSelect, onRowClick, rowKey, className, ...rest }: TableCommonProps<T>) => JSX.Element;
509
+ export declare const Table: <T extends RowCommon>({ dataSource, columns, loading, totalItems, filters, onChangePage, onChangePageSize, onSort, rowsSelected, onSelect, onRowClick, rowKey, className, editable, onSave, ...rest }: TableCommonProps<T>) => JSX.Element;
507
510
 
508
511
  export declare type TableColumnsType<T> = TableColumnsType_2<T>;
509
512
 
@@ -523,10 +526,10 @@ export declare interface TableCommonProps<T> extends Omit<TableProps<T>, "column
523
526
  rowsSelected?: default_2.Key[];
524
527
  onSelect: (newSelectedRowKeys: default_2.Key[]) => void;
525
528
  onRowClick?: (record: T) => void;
526
- rowKey?: string;
529
+ rowKey?: string | ((record: T) => string);
527
530
  className?: string;
528
531
  editable?: boolean;
529
- onSave?: (data: T[]) => void;
532
+ onSave?: (data: T) => void;
530
533
  }
531
534
 
532
535
  export declare const Tabs: default_2.FC<TabsProps>;
@@ -51,6 +51,7 @@ import { TabsProps as TabsProps_2 } from 'antd';
51
51
  import { TextProps } from 'antd/es/typography/Text';
52
52
  import { TitleProps } from 'antd/es/typography/Title';
53
53
  import { TooltipProps as TooltipProps_2 } from 'antd';
54
+ import { UseFormReset } from 'react-hook-form';
54
55
  import { UseFormReturn } from 'react-hook-form';
55
56
  import { UseFormSetValue } from 'react-hook-form';
56
57
 
@@ -291,6 +292,7 @@ export declare interface SearchFiltersFormProps<T extends FieldValues> {
291
292
  control: Control<T, any, T>;
292
293
  setValue?: UseFormSetValue<T>;
293
294
  handleSubmit?: FormEventHandler<any>;
295
+ reset?: UseFormReset<T>;
294
296
  }) => default_2.ReactNode;
295
297
  onReset?: () => void;
296
298
  classNamesContainer?: string;
@@ -313,6 +315,7 @@ export declare interface SidebarProps {
313
315
  children?: Array<{
314
316
  name: string;
315
317
  href: string;
318
+ icon?: React.ReactNode;
316
319
  }>;
317
320
  }>;
318
321
  }
@@ -365,7 +368,7 @@ declare type TabItem = {
365
368
  disabled?: boolean;
366
369
  };
367
370
 
368
- export declare const Table: <T extends RowCommon>({ dataSource, columns, loading, totalItems, filters, onChangePage, onChangePageSize, onSort, rowsSelected, onSelect, onRowClick, rowKey, className, ...rest }: TableCommonProps<T>) => JSX.Element;
371
+ export declare const Table: <T extends RowCommon>({ dataSource, columns, loading, totalItems, filters, onChangePage, onChangePageSize, onSort, rowsSelected, onSelect, onRowClick, rowKey, className, editable, onSave, ...rest }: TableCommonProps<T>) => JSX.Element;
369
372
 
370
373
  export declare type TableColumnsType<T> = TableColumnsType_2<T>;
371
374
 
@@ -385,10 +388,10 @@ export declare interface TableCommonProps<T> extends Omit<TableProps<T>, "column
385
388
  rowsSelected?: default_2.Key[];
386
389
  onSelect: (newSelectedRowKeys: default_2.Key[]) => void;
387
390
  onRowClick?: (record: T) => void;
388
- rowKey?: string;
391
+ rowKey?: string | ((record: T) => string);
389
392
  className?: string;
390
393
  editable?: boolean;
391
- onSave?: (data: T[]) => void;
394
+ onSave?: (data: T) => void;
392
395
  }
393
396
 
394
397
  export declare const Tabs: default_2.FC<TabsProps>;
package/dist/ui/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { e, g as o, B as r, C as t, f as l, d as p, D as i, F as d, H as n, L as S, j as b, M as g, k as T, P as c, R as m, c as C, m as F, S as M, h as u, i as y, l as B, T as L, b as f, a as h, t as x } from "../chunks/Heading-0P1VChK0.js";
2
- import { E as k, L as w, T as D } from "../chunks/createSuper-DBIhZ50y.js";
1
+ import { e, g as o, B as r, C as t, f as l, d as p, D as i, F as d, H as n, L as S, j as b, M as g, k as T, P as c, R as m, c as C, m as F, S as M, h as u, i as y, l as B, T as L, b as f, a as h, t as x } from "../chunks/Heading-DPghjWhA.js";
2
+ import { E as k, L as w, T as D } from "../chunks/Switch-C9zRQPNY.js";
3
3
  export {
4
4
  e as Badge,
5
5
  o as Breadcrumb,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pnkx-lib/ui",
3
3
  "private": false,
4
- "version": "1.3.4",
4
+ "version": "1.3.6",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "exports": {