@redsift/table 6.1.0-alpha.0 → 6.2.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.
- package/index.d.ts +84 -4
- package/index.js +582 -23
- package/index.js.map +1 -1
- package/package.json +2 -2
- package/style/index.css +4 -0
package/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { DataGridProProps, GridColumns } from '@mui/x-data-grid-pro';
|
|
2
|
+
export { GRID_DETAIL_PANEL_TOGGLE_COL_DEF, GridAlignment, GridColDef, GridColumns, GridFilterItem, GridFilterModel } from '@mui/x-data-grid-pro';
|
|
3
|
+
import { Ref, ReactElement, ComponentProps, ReactNode } from 'react';
|
|
4
4
|
|
|
5
5
|
/** Component Type. */
|
|
6
6
|
declare type Comp<P, T = HTMLElement> = {
|
|
@@ -16,11 +16,27 @@ declare type Comp<P, T = HTMLElement> = {
|
|
|
16
16
|
/** Component base class name. */
|
|
17
17
|
className?: string;
|
|
18
18
|
};
|
|
19
|
+
/** Get types of the values of a record. */
|
|
20
|
+
declare type ValueOf$1<T extends Record<any, any>> = T[keyof T];
|
|
21
|
+
/**
|
|
22
|
+
* Color palette.
|
|
23
|
+
*/
|
|
24
|
+
declare const ColorPalette: {
|
|
25
|
+
readonly primary: "primary";
|
|
26
|
+
readonly secondary: "secondary";
|
|
27
|
+
readonly error: "error";
|
|
28
|
+
readonly warning: "warning";
|
|
29
|
+
readonly info: "info";
|
|
30
|
+
readonly success: "success";
|
|
31
|
+
};
|
|
32
|
+
declare type ColorPalette = ValueOf$1<typeof ColorPalette>;
|
|
33
|
+
declare type Color = ColorPalette | string;
|
|
19
34
|
|
|
20
35
|
interface DataGridProps extends DataGridProProps {
|
|
21
36
|
hideToolbar?: boolean;
|
|
22
37
|
license: string;
|
|
23
38
|
$height?: string;
|
|
39
|
+
column?: GridColumns;
|
|
24
40
|
}
|
|
25
41
|
|
|
26
42
|
declare type StyledDataGridProps = {
|
|
@@ -31,4 +47,68 @@ declare const DataGrid: Comp<DataGridProps, HTMLDivElement>;
|
|
|
31
47
|
|
|
32
48
|
declare const Toolbar: () => JSX.Element;
|
|
33
49
|
|
|
34
|
-
|
|
50
|
+
/** Get types of the values of a record. */
|
|
51
|
+
declare type ValueOf<T extends Record<any, any>> = T[keyof T];
|
|
52
|
+
/**
|
|
53
|
+
* Component variant.
|
|
54
|
+
*/
|
|
55
|
+
declare const ShieldVariant: {
|
|
56
|
+
readonly success: "success";
|
|
57
|
+
readonly successLocked: "successLocked";
|
|
58
|
+
readonly successUnlocked: "successUnlocked";
|
|
59
|
+
readonly fail: "fail";
|
|
60
|
+
readonly failLocked: "failLocked";
|
|
61
|
+
readonly failUnlocked: "failUnlocked";
|
|
62
|
+
readonly warning: "warning";
|
|
63
|
+
readonly warningLocked: "warningLocked";
|
|
64
|
+
readonly warningUnlocked: "warningUnlocked";
|
|
65
|
+
readonly noData: "noData";
|
|
66
|
+
readonly ignored: "ignored";
|
|
67
|
+
readonly email: "email";
|
|
68
|
+
readonly question: "question";
|
|
69
|
+
};
|
|
70
|
+
declare type ShieldVariant = ValueOf<typeof ShieldVariant>;
|
|
71
|
+
/**
|
|
72
|
+
* Component props.
|
|
73
|
+
*/
|
|
74
|
+
interface ShieldProps extends ComponentProps<'div'> {
|
|
75
|
+
/** Shield variant. */
|
|
76
|
+
variant?: ShieldVariant;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* The Shield component.
|
|
81
|
+
*/
|
|
82
|
+
declare const Shield: Comp<ShieldProps, HTMLDivElement>;
|
|
83
|
+
|
|
84
|
+
interface TextCellProps extends ComponentProps<'div'> {
|
|
85
|
+
/** Including Badge Component. */
|
|
86
|
+
badge?: ReactNode;
|
|
87
|
+
/**
|
|
88
|
+
* Icon path data (`d` property of the `path` SVG element).<br />
|
|
89
|
+
* See <a href="https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths">https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths</a>.<br />
|
|
90
|
+
* Recommended path data come from mdi/js.<br />
|
|
91
|
+
* See <a href="https://www.npmjs.com/package/@mdi/js">https://www.npmjs.com/package/@mdi/js</a>.
|
|
92
|
+
*/
|
|
93
|
+
leftIcon?: string;
|
|
94
|
+
/** Left Icon Color variant. */
|
|
95
|
+
leftIconColor?: Color | string;
|
|
96
|
+
/**
|
|
97
|
+
* Icon path data (`d` property of the `path` SVG element).<br />
|
|
98
|
+
* See <a href="https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths">https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths</a>.<br />
|
|
99
|
+
* Recommended path data come from mdi/js.<br />
|
|
100
|
+
* See <a href="https://www.npmjs.com/package/@mdi/js">https://www.npmjs.com/package/@mdi/js</a>.
|
|
101
|
+
*/
|
|
102
|
+
rightIcon?: string;
|
|
103
|
+
/** Right Icon Color variant. */
|
|
104
|
+
rightIconColor?: Color | string;
|
|
105
|
+
/** Shield variant. */
|
|
106
|
+
shieldVariant?: ShieldVariant;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* The Cell component.
|
|
111
|
+
*/
|
|
112
|
+
declare const TextCell: Comp<TextCellProps, HTMLDivElement>;
|
|
113
|
+
|
|
114
|
+
export { DataGrid, DataGridProps, Shield, ShieldProps, ShieldVariant, StyledDataGridProps, TextCell, Toolbar, ValueOf };
|