qucoon-components 0.0.4 → 0.0.5
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/dist/index.cjs.js +141 -141
- package/dist/index.es.js +13093 -13000
- package/dist/style.css +1 -1
- package/dist/types/components/custom/StatusIndicator.d.ts +3 -1
- package/dist/types/components/ui/select/BaseSelect.d.ts +1 -1
- package/dist/types/components/ui/table/BaseDataGrid.d.ts +1 -0
- package/dist/types/components/ui/table/renderers/StatusRenderer.d.ts +8 -4
- package/dist/types/components/ui/table/types/index.d.ts +61 -3
- package/package.json +1 -1
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
+
import { StatusMap } from '..';
|
|
2
3
|
export type StatusIndicatorProps = {
|
|
3
|
-
status:
|
|
4
|
+
status: string;
|
|
4
5
|
size?: number;
|
|
5
6
|
className?: string;
|
|
6
7
|
style?: React.CSSProperties;
|
|
8
|
+
statusMap?: StatusMap;
|
|
7
9
|
};
|
|
8
10
|
declare const StatusIndicator: React.FC<StatusIndicatorProps>;
|
|
9
11
|
export default StatusIndicator;
|
|
@@ -24,7 +24,7 @@ export type BaseSelectProps<T extends FormikValues> = {
|
|
|
24
24
|
name?: string;
|
|
25
25
|
formik?: Formik<T>;
|
|
26
26
|
selectOptions: BaseSelectOption[];
|
|
27
|
-
size?: "x-small" | "small" | "medium";
|
|
27
|
+
size?: "x-small" | "small" | "medium" | "large";
|
|
28
28
|
containerStyle?: React.CSSProperties;
|
|
29
29
|
selectInputProps?: React.SelectHTMLAttributes<HTMLSelectElement>;
|
|
30
30
|
};
|
|
@@ -40,6 +40,7 @@ export type BaseDataGridProps = {
|
|
|
40
40
|
defaultFilterPanelProps?: FilterPanelProps;
|
|
41
41
|
gridOptions?: GridOptions;
|
|
42
42
|
customization?: DataGridCustomization;
|
|
43
|
+
suppressDefaultStatusRenderer?: boolean;
|
|
43
44
|
};
|
|
44
45
|
declare const BaseDataGrid: import('react').MemoExoticComponent<(props: BaseDataGridProps) => import("react/jsx-runtime").JSX.Element>;
|
|
45
46
|
export default BaseDataGrid;
|
|
@@ -4,15 +4,19 @@ export type StatusMap = {
|
|
|
4
4
|
[status: string]: {
|
|
5
5
|
color: string;
|
|
6
6
|
backgroundColor: string;
|
|
7
|
+
label?: string;
|
|
8
|
+
icon?: React.ReactNode;
|
|
7
9
|
};
|
|
8
10
|
};
|
|
9
11
|
export type StatusRendererProps = {
|
|
10
|
-
|
|
12
|
+
value?: any;
|
|
13
|
+
data?: any;
|
|
14
|
+
status?: string;
|
|
11
15
|
showIndicator?: boolean;
|
|
12
|
-
|
|
13
|
-
onClick?: () => void;
|
|
16
|
+
statusMap?: StatusMap;
|
|
17
|
+
onClick?: (data: any) => void;
|
|
14
18
|
className?: string;
|
|
15
19
|
style?: React.CSSProperties;
|
|
16
|
-
} & ICellRendererParams
|
|
20
|
+
} & Partial<ICellRendererParams>;
|
|
17
21
|
declare const StatusRenderer: React.FC<StatusRendererProps>;
|
|
18
22
|
export default StatusRenderer;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ColDef, GridOptions, SelectionChangedEvent } from 'ag-grid-community';
|
|
2
2
|
import { CSSProperties } from 'react';
|
|
3
|
-
import { HeaderControlsProps } from '../../..';
|
|
3
|
+
import { HeaderControlsProps, StatusRendererProps } from '../../..';
|
|
4
4
|
export type ColumnType = Omit<ColDef, "field"> & {
|
|
5
5
|
field: string;
|
|
6
6
|
style?: React.CSSProperties;
|
|
@@ -30,7 +30,7 @@ export interface DataGridTheme {
|
|
|
30
30
|
className?: string;
|
|
31
31
|
style?: CSSProperties;
|
|
32
32
|
agThemeClass?: string;
|
|
33
|
-
customCssVariables?: Record<
|
|
33
|
+
customCssVariables?: Partial<Record<BaseDataGridCssVariable, string>>;
|
|
34
34
|
};
|
|
35
35
|
header?: {
|
|
36
36
|
className?: string;
|
|
@@ -86,7 +86,10 @@ export interface DataGridCustomization {
|
|
|
86
86
|
emptyState?: React.FC<any>;
|
|
87
87
|
loadingOverlay?: React.FC<any>;
|
|
88
88
|
pagination?: React.FC<any>;
|
|
89
|
-
|
|
89
|
+
statusRenderer?: {
|
|
90
|
+
component: React.FC<StatusRendererProps>;
|
|
91
|
+
params?: StatusRendererProps;
|
|
92
|
+
};
|
|
90
93
|
};
|
|
91
94
|
callbacks?: {
|
|
92
95
|
onRowClick?: (event: any) => void;
|
|
@@ -144,6 +147,8 @@ export type FilterPanelProps = FilterState & FilterActions & {
|
|
|
144
147
|
showGlobalSearch?: boolean;
|
|
145
148
|
showColumnFilters?: boolean;
|
|
146
149
|
showSortingControls?: boolean;
|
|
150
|
+
style?: React.CSSProperties;
|
|
151
|
+
className?: string;
|
|
147
152
|
};
|
|
148
153
|
export type ServerSideOperations = "refresh" | "search" | "filter" | "sort" | "pagination";
|
|
149
154
|
export type ServerSideOperationsConfig = Partial<Record<ServerSideOperations, {
|
|
@@ -165,3 +170,56 @@ export type DefaultPaginationConfig = {
|
|
|
165
170
|
totalRecords?: number;
|
|
166
171
|
totalPages?: number;
|
|
167
172
|
};
|
|
173
|
+
export declare const BASE_DATA_GRID_CSS_VARIABLES: {
|
|
174
|
+
readonly '--ag-row-height': "Height of each row (e.g., \"45px\")";
|
|
175
|
+
readonly '--ag-header-height': "Height of header row (e.g., \"44px\")";
|
|
176
|
+
readonly '--ag-cell-horizontal-padding': "Horizontal padding in cells (e.g., \"12px\")";
|
|
177
|
+
readonly '--ag-cell-vertical-padding': "Vertical padding in cells (e.g., \"8px\")";
|
|
178
|
+
readonly '--ag-grid-size': "Base size unit for consistent spacing (e.g., \"8px\")";
|
|
179
|
+
readonly '--ag-background-color': "Main grid background color";
|
|
180
|
+
readonly '--ag-header-background-color': "Header background color";
|
|
181
|
+
readonly '--ag-odd-row-background-color': "Alternate row background color";
|
|
182
|
+
readonly '--ag-row-hover-color': "Row hover background color";
|
|
183
|
+
readonly '--ag-selected-row-background-color': "Selected row background color";
|
|
184
|
+
readonly '--ag-foreground-color': "Main text color";
|
|
185
|
+
readonly '--ag-header-foreground-color': "Header text color";
|
|
186
|
+
readonly '--ag-secondary-foreground-color': "Secondary text color (disabled, etc.)";
|
|
187
|
+
readonly '--ag-border-color': "Main border color for cells";
|
|
188
|
+
readonly '--ag-header-border-color': "Header border color";
|
|
189
|
+
readonly '--ag-row-border-color': "Row border color";
|
|
190
|
+
readonly '--ag-borders': "Enable/disable borders (1 or 0)";
|
|
191
|
+
readonly '--ag-borders-critical': "Critical borders only (1 or 0)";
|
|
192
|
+
readonly '--ag-checkbox-checked-color': "Checkbox checked color";
|
|
193
|
+
readonly '--ag-checkbox-unchecked-color': "Checkbox unchecked color";
|
|
194
|
+
readonly '--ag-input-focus-border-color': "Input focus border color";
|
|
195
|
+
readonly '--ag-wrapper-border-radius': "Grid wrapper border radius";
|
|
196
|
+
readonly '--ag-card-shadow': "Card/panel shadow";
|
|
197
|
+
readonly '--ag-popup-shadow': "Popup/dropdown shadow";
|
|
198
|
+
};
|
|
199
|
+
export declare const getAvailableCssVariables: () => {
|
|
200
|
+
readonly '--ag-row-height': "Height of each row (e.g., \"45px\")";
|
|
201
|
+
readonly '--ag-header-height': "Height of header row (e.g., \"44px\")";
|
|
202
|
+
readonly '--ag-cell-horizontal-padding': "Horizontal padding in cells (e.g., \"12px\")";
|
|
203
|
+
readonly '--ag-cell-vertical-padding': "Vertical padding in cells (e.g., \"8px\")";
|
|
204
|
+
readonly '--ag-grid-size': "Base size unit for consistent spacing (e.g., \"8px\")";
|
|
205
|
+
readonly '--ag-background-color': "Main grid background color";
|
|
206
|
+
readonly '--ag-header-background-color': "Header background color";
|
|
207
|
+
readonly '--ag-odd-row-background-color': "Alternate row background color";
|
|
208
|
+
readonly '--ag-row-hover-color': "Row hover background color";
|
|
209
|
+
readonly '--ag-selected-row-background-color': "Selected row background color";
|
|
210
|
+
readonly '--ag-foreground-color': "Main text color";
|
|
211
|
+
readonly '--ag-header-foreground-color': "Header text color";
|
|
212
|
+
readonly '--ag-secondary-foreground-color': "Secondary text color (disabled, etc.)";
|
|
213
|
+
readonly '--ag-border-color': "Main border color for cells";
|
|
214
|
+
readonly '--ag-header-border-color': "Header border color";
|
|
215
|
+
readonly '--ag-row-border-color': "Row border color";
|
|
216
|
+
readonly '--ag-borders': "Enable/disable borders (1 or 0)";
|
|
217
|
+
readonly '--ag-borders-critical': "Critical borders only (1 or 0)";
|
|
218
|
+
readonly '--ag-checkbox-checked-color': "Checkbox checked color";
|
|
219
|
+
readonly '--ag-checkbox-unchecked-color': "Checkbox unchecked color";
|
|
220
|
+
readonly '--ag-input-focus-border-color': "Input focus border color";
|
|
221
|
+
readonly '--ag-wrapper-border-radius': "Grid wrapper border radius";
|
|
222
|
+
readonly '--ag-card-shadow': "Card/panel shadow";
|
|
223
|
+
readonly '--ag-popup-shadow': "Popup/dropdown shadow";
|
|
224
|
+
};
|
|
225
|
+
export type BaseDataGridCssVariable = keyof typeof BASE_DATA_GRID_CSS_VARIABLES;
|