letalkui 0.0.43 → 0.0.44

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.
Files changed (38) hide show
  1. package/dist/{chunk-2CEQHXZS.mjs → chunk-3EDUDDNY.mjs} +1 -1
  2. package/dist/{chunk-2CEQHXZS.mjs.map → chunk-3EDUDDNY.mjs.map} +1 -1
  3. package/dist/chunk-46R3ISKS.mjs +1 -0
  4. package/dist/{chunk-MDQEAXOA.mjs.map → chunk-46R3ISKS.mjs.map} +1 -1
  5. package/dist/{chunk-WGZNT73I.mjs → chunk-56TUJURJ.mjs} +1 -1
  6. package/dist/{chunk-WGZNT73I.mjs.map → chunk-56TUJURJ.mjs.map} +1 -1
  7. package/dist/{chunk-A3GY6EHZ.mjs → chunk-FHSOVS6Y.mjs} +1 -1
  8. package/dist/{chunk-A3GY6EHZ.mjs.map → chunk-FHSOVS6Y.mjs.map} +1 -1
  9. package/dist/{chunk-53K3RQ4T.mjs → chunk-GKTOZPE7.mjs} +1 -1
  10. package/dist/{chunk-53K3RQ4T.mjs.map → chunk-GKTOZPE7.mjs.map} +1 -1
  11. package/dist/chunk-SSRDZ5RQ.mjs +1 -0
  12. package/dist/chunk-SSRDZ5RQ.mjs.map +1 -0
  13. package/dist/chunk-ZQORH4QG.mjs +1 -0
  14. package/dist/chunk-ZQORH4QG.mjs.map +1 -0
  15. package/dist/components/index.d.mts +39 -2
  16. package/dist/components/index.d.ts +39 -2
  17. package/dist/components/index.js +1 -1
  18. package/dist/components/index.js.map +1 -1
  19. package/dist/components/index.mjs +1 -1
  20. package/dist/components/index.mjs.map +1 -1
  21. package/dist/containers/index.mjs +1 -1
  22. package/dist/containers/index.mjs.map +1 -1
  23. package/dist/index.d.mts +2 -2
  24. package/dist/index.d.ts +2 -2
  25. package/dist/index.js +1 -1
  26. package/dist/index.js.map +1 -1
  27. package/dist/index.mjs +1 -1
  28. package/dist/index.mjs.map +1 -1
  29. package/dist/primitives/index.mjs +1 -1
  30. package/dist/primitives/index.mjs.map +1 -1
  31. package/dist/utils/index.mjs +1 -1
  32. package/dist/utils/index.mjs.map +1 -1
  33. package/package.json +1 -1
  34. package/dist/chunk-H5XWNBBV.mjs +0 -1
  35. package/dist/chunk-H5XWNBBV.mjs.map +0 -1
  36. package/dist/chunk-MDQEAXOA.mjs +0 -1
  37. package/dist/chunk-Z3RQ7GZU.mjs +0 -1
  38. package/dist/chunk-Z3RQ7GZU.mjs.map +0 -1
@@ -1,8 +1,8 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { P as PrimitiveButtonProps, b as PrimitiveTextProps } from '../index-DTqQu9zF.mjs';
3
- import { DialogProps, SxProps, Theme, InputProps, AutocompleteProps } from '@mui/material';
4
3
  import * as React$1 from 'react';
5
4
  import React__default, { PropsWithChildren, ReactNode } from 'react';
5
+ import { DialogProps, SxProps, Theme, InputProps, AutocompleteProps } from '@mui/material';
6
6
 
7
7
  type ButtonProps = Omit<PrimitiveButtonProps, "variant">;
8
8
 
@@ -13,6 +13,43 @@ declare const Button: {
13
13
  Ghost: ({ children, ...props }: ButtonProps) => react_jsx_runtime.JSX.Element;
14
14
  };
15
15
 
16
+ type DataTableColumnAlign = "left" | "center" | "right";
17
+ type DataTableColumn<T> = {
18
+ key: string;
19
+ label: string;
20
+ align?: DataTableColumnAlign;
21
+ width?: number | string;
22
+ render?: (value: unknown, row: T) => React__default.ReactNode;
23
+ };
24
+ type DataTableBasePaginationProps = {
25
+ page: number;
26
+ rowsPerPage: number;
27
+ onPageChange: (page: number) => void;
28
+ onRowsPerPageChange?: (rowsPerPage: number) => void;
29
+ rowsPerPageOptions?: number[];
30
+ };
31
+ type DataTablePaginationProps = (DataTableBasePaginationProps & {
32
+ mode: "server";
33
+ totalRows: number;
34
+ }) | (DataTableBasePaginationProps & {
35
+ mode: "client" | "none";
36
+ totalRows?: undefined;
37
+ });
38
+ type DataTableSize = "small" | "medium";
39
+ type DataTableProps<T> = {
40
+ columns: DataTableColumn<T>[];
41
+ data: T[];
42
+ loading?: boolean;
43
+ skeletonRows?: number;
44
+ emptyState?: React__default.ReactNode;
45
+ stickyHeader?: boolean;
46
+ size?: DataTableSize;
47
+ pagination?: DataTablePaginationProps;
48
+ getRowKey?: (row: T) => string | number;
49
+ };
50
+
51
+ declare const DataTable: <T>(props: DataTableProps<T>) => react_jsx_runtime.JSX.Element;
52
+
16
53
  type TitleProps = PropsWithChildren<object>;
17
54
  type HeaderProps = PropsWithChildren<object>;
18
55
  type FooterProps = PropsWithChildren<object>;
@@ -187,4 +224,4 @@ type TextFieldProps = InputFieldProps & {
187
224
 
188
225
  declare const TextField: ({ label, subLabel, errorText, isOptional, id, characterCount, ...props }: TextFieldProps) => react_jsx_runtime.JSX.Element;
189
226
 
190
- export { Button, Dialog, Input, Loading, Portlet, SelectField, Text, TextField };
227
+ export { Button, DataTable, type DataTableColumn, type DataTablePaginationProps, type DataTableProps, Dialog, Input, Loading, Portlet, SelectField, Text, TextField };
@@ -1,8 +1,8 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { P as PrimitiveButtonProps, b as PrimitiveTextProps } from '../index-DTqQu9zF.js';
3
- import { DialogProps, SxProps, Theme, InputProps, AutocompleteProps } from '@mui/material';
4
3
  import * as React$1 from 'react';
5
4
  import React__default, { PropsWithChildren, ReactNode } from 'react';
5
+ import { DialogProps, SxProps, Theme, InputProps, AutocompleteProps } from '@mui/material';
6
6
 
7
7
  type ButtonProps = Omit<PrimitiveButtonProps, "variant">;
8
8
 
@@ -13,6 +13,43 @@ declare const Button: {
13
13
  Ghost: ({ children, ...props }: ButtonProps) => react_jsx_runtime.JSX.Element;
14
14
  };
15
15
 
16
+ type DataTableColumnAlign = "left" | "center" | "right";
17
+ type DataTableColumn<T> = {
18
+ key: string;
19
+ label: string;
20
+ align?: DataTableColumnAlign;
21
+ width?: number | string;
22
+ render?: (value: unknown, row: T) => React__default.ReactNode;
23
+ };
24
+ type DataTableBasePaginationProps = {
25
+ page: number;
26
+ rowsPerPage: number;
27
+ onPageChange: (page: number) => void;
28
+ onRowsPerPageChange?: (rowsPerPage: number) => void;
29
+ rowsPerPageOptions?: number[];
30
+ };
31
+ type DataTablePaginationProps = (DataTableBasePaginationProps & {
32
+ mode: "server";
33
+ totalRows: number;
34
+ }) | (DataTableBasePaginationProps & {
35
+ mode: "client" | "none";
36
+ totalRows?: undefined;
37
+ });
38
+ type DataTableSize = "small" | "medium";
39
+ type DataTableProps<T> = {
40
+ columns: DataTableColumn<T>[];
41
+ data: T[];
42
+ loading?: boolean;
43
+ skeletonRows?: number;
44
+ emptyState?: React__default.ReactNode;
45
+ stickyHeader?: boolean;
46
+ size?: DataTableSize;
47
+ pagination?: DataTablePaginationProps;
48
+ getRowKey?: (row: T) => string | number;
49
+ };
50
+
51
+ declare const DataTable: <T>(props: DataTableProps<T>) => react_jsx_runtime.JSX.Element;
52
+
16
53
  type TitleProps = PropsWithChildren<object>;
17
54
  type HeaderProps = PropsWithChildren<object>;
18
55
  type FooterProps = PropsWithChildren<object>;
@@ -187,4 +224,4 @@ type TextFieldProps = InputFieldProps & {
187
224
 
188
225
  declare const TextField: ({ label, subLabel, errorText, isOptional, id, characterCount, ...props }: TextFieldProps) => react_jsx_runtime.JSX.Element;
189
226
 
190
- export { Button, Dialog, Input, Loading, Portlet, SelectField, Text, TextField };
227
+ export { Button, DataTable, type DataTableColumn, type DataTablePaginationProps, type DataTableProps, Dialog, Input, Loading, Portlet, SelectField, Text, TextField };