@bluemarble/bm-components 0.0.25 → 0.0.28
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/esm/index.js +14 -420
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/Input/index.d.ts +1 -0
- package/dist/esm/types/components/LargeButton/index.d.ts +1 -1
- package/dist/esm/types/components/TabPanel/index.d.ts +11 -0
- package/dist/esm/types/components/index.d.ts +1 -3
- package/dist/index.d.ts +12 -86
- package/package.json +1 -1
|
@@ -5,5 +5,5 @@ interface LargeButtonProps extends ButtonProps {
|
|
|
5
5
|
children: ReactNode;
|
|
6
6
|
CircularProgressProps?: CircularProgressProps;
|
|
7
7
|
}
|
|
8
|
-
export declare const LargeButton: ({ loading, children, CircularProgressProps, ...rest }: LargeButtonProps) => JSX.Element;
|
|
8
|
+
export declare const LargeButton: ({ loading, children, CircularProgressProps, sx, ...rest }: LargeButtonProps) => JSX.Element;
|
|
9
9
|
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export declare function getTabProps(index: string): {
|
|
3
|
+
id: string;
|
|
4
|
+
"aria-controls": string;
|
|
5
|
+
};
|
|
6
|
+
export interface TabPanelProps {
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
value: number;
|
|
9
|
+
index: number;
|
|
10
|
+
}
|
|
11
|
+
export declare const TabPanel: (props: TabPanelProps) => JSX.Element;
|
|
@@ -7,6 +7,4 @@ export { Checkbox } from "./Checkbox";
|
|
|
7
7
|
export { Switch } from "./Switch";
|
|
8
8
|
export { Radio } from "./Radio";
|
|
9
9
|
export { LargeButton } from "./LargeButton";
|
|
10
|
-
export {
|
|
11
|
-
export { useEditableGrid } from "./hooks/useEditableGrid";
|
|
12
|
-
export { useEvent } from "./hooks/useEvent";
|
|
10
|
+
export { TabPanel, getTabProps, TabPanelProps } from "./TabPanel";
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React, { ReactNode, FC } from 'react';
|
|
3
|
-
import { TableCellProps, TextFieldProps, TableRowProps, StandardTextFieldProps, SelectProps as SelectProps$1, FormControlProps, InputLabelProps, AutocompleteRenderInputParams, AutocompleteProps as AutocompleteProps$1, CheckboxProps as CheckboxProps$1, FormControlLabelProps, SwitchProps as SwitchProps$1, RadioGroupProps, ButtonProps, CircularProgressProps
|
|
3
|
+
import { TableCellProps, TextFieldProps, TableRowProps, StandardTextFieldProps, SelectProps as SelectProps$1, FormControlProps, InputLabelProps, AutocompleteRenderInputParams, AutocompleteProps as AutocompleteProps$1, CheckboxProps as CheckboxProps$1, FormControlLabelProps, SwitchProps as SwitchProps$1, RadioGroupProps, ButtonProps, CircularProgressProps } from '@mui/material';
|
|
4
4
|
import IMask$1 from 'imask';
|
|
5
5
|
|
|
6
6
|
interface ColumnTitleProps {
|
|
@@ -74,6 +74,7 @@ declare const Td: React.MemoExoticComponent<({ children, ...props }: TableCellPr
|
|
|
74
74
|
interface InputProps extends StandardTextFieldProps {
|
|
75
75
|
name: string;
|
|
76
76
|
label: string;
|
|
77
|
+
shrink?: boolean;
|
|
77
78
|
withFormik?: boolean;
|
|
78
79
|
}
|
|
79
80
|
declare const Input: FC<InputProps>;
|
|
@@ -179,92 +180,17 @@ interface LargeButtonProps extends ButtonProps {
|
|
|
179
180
|
children: ReactNode;
|
|
180
181
|
CircularProgressProps?: CircularProgressProps;
|
|
181
182
|
}
|
|
182
|
-
declare const LargeButton: ({ loading, children, CircularProgressProps, ...rest }: LargeButtonProps) => JSX.Element;
|
|
183
|
+
declare const LargeButton: ({ loading, children, CircularProgressProps, sx, ...rest }: LargeButtonProps) => JSX.Element;
|
|
183
184
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
interface GridInputProps extends BaseTextFieldProps {
|
|
194
|
-
onDefaultValue?: (value: string) => string;
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
interface onSaveOptions<T> {
|
|
198
|
-
prop: keyof T;
|
|
199
|
-
newValue: string;
|
|
185
|
+
declare function getTabProps(index: string): {
|
|
186
|
+
id: string;
|
|
187
|
+
"aria-controls": string;
|
|
188
|
+
};
|
|
189
|
+
interface TabPanelProps {
|
|
190
|
+
children: React.ReactNode;
|
|
191
|
+
value: number;
|
|
200
192
|
index: number;
|
|
201
193
|
}
|
|
202
|
-
|
|
203
|
-
id?: string | number;
|
|
204
|
-
name: keyof T | "";
|
|
205
|
-
label: string;
|
|
206
|
-
visible?: boolean;
|
|
207
|
-
type?: GridInputProps["type"] | "select" | "autocomplete";
|
|
208
|
-
inputProps?: GridInputProps;
|
|
209
|
-
select?: Omit<InputSelectCellProps, "setCanSave" | "onInputChange">;
|
|
210
|
-
formatLabelValue?: (value: string) => string;
|
|
211
|
-
required?: boolean;
|
|
212
|
-
TableCellProps?: TableCellProps;
|
|
213
|
-
newRow?: {
|
|
214
|
-
defaultValue?: string;
|
|
215
|
-
};
|
|
216
|
-
}
|
|
217
|
-
interface EditableGridProps<T> {
|
|
218
|
-
columns: ColumnsProps<T>[];
|
|
219
|
-
data: Array<T>;
|
|
220
|
-
primaryKey: keyof T;
|
|
221
|
-
focusedIndex: {
|
|
222
|
-
x: number;
|
|
223
|
-
y: number;
|
|
224
|
-
};
|
|
225
|
-
isEditing: boolean;
|
|
226
|
-
bordered?: boolean;
|
|
227
|
-
onSave: (item: T, options: onSaveOptions<T>) => void;
|
|
228
|
-
setFocusedIndex: (props: {
|
|
229
|
-
x: number;
|
|
230
|
-
y: number;
|
|
231
|
-
}) => void;
|
|
232
|
-
setIsEditing: (value: boolean) => void;
|
|
233
|
-
canEditTable: boolean;
|
|
234
|
-
setCanEditTable: (value: boolean) => void;
|
|
235
|
-
selectedRows: number[];
|
|
236
|
-
setSelectedRows: (value: number[]) => void;
|
|
237
|
-
checkbox?: boolean;
|
|
238
|
-
checkMultiple?: boolean;
|
|
239
|
-
onSaveNewRow?: (newRow: T) => void;
|
|
240
|
-
canInsertNewRow: boolean;
|
|
241
|
-
setCanInsertNewRow: (value: boolean) => void;
|
|
242
|
-
}
|
|
243
|
-
declare function EditableGrid<T extends Record<string, any>>({ columns, data, primaryKey, onSave, setFocusedIndex, setIsEditing, focusedIndex, isEditing, bordered, canEditTable, setCanEditTable, selectedRows, setSelectedRows, checkbox, checkMultiple, onSaveNewRow, canInsertNewRow, }: EditableGridProps<T>): JSX.Element;
|
|
244
|
-
|
|
245
|
-
declare type useEditableGridResponseProps<T> = {
|
|
246
|
-
data: Array<T>;
|
|
247
|
-
focusedIndex: {
|
|
248
|
-
x: number;
|
|
249
|
-
y: number;
|
|
250
|
-
};
|
|
251
|
-
isEditing: boolean;
|
|
252
|
-
setData: (props: Array<T>) => void;
|
|
253
|
-
setIsEditing: (value: boolean) => void;
|
|
254
|
-
setFocusedIndex: (props: {
|
|
255
|
-
x: number;
|
|
256
|
-
y: number;
|
|
257
|
-
}) => void;
|
|
258
|
-
onSave: (newItem: T, props: onSaveOptions<T>) => void;
|
|
259
|
-
canEditTable: boolean;
|
|
260
|
-
setCanEditTable: (value: boolean) => void;
|
|
261
|
-
selectedRows: number[];
|
|
262
|
-
setSelectedRows: (value: number[]) => void;
|
|
263
|
-
canInsertNewRow: boolean;
|
|
264
|
-
setCanInsertNewRow: (value: boolean) => void;
|
|
265
|
-
};
|
|
266
|
-
declare function useEditableGrid<T>(): useEditableGridResponseProps<T>;
|
|
267
|
-
|
|
268
|
-
declare function useEvent(event: keyof WindowEventMap, handler: (ev: any) => void, passive?: boolean): void;
|
|
194
|
+
declare const TabPanel: (props: TabPanelProps) => JSX.Element;
|
|
269
195
|
|
|
270
|
-
export { Autocomplete, Checkbox, ColumnTitleProps,
|
|
196
|
+
export { Autocomplete, Checkbox, ColumnTitleProps, EditableTableCell, FilterProps, Grid, IFilter, Input, InputMask, LargeButton, Radio, Select, Switch, TabPanel, TabPanelProps, Td, Tr, filterData, getTabProps };
|