@bluemarble/bm-components 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.
- package/dist/esm/index.js +29 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/index.d.ts +2 -0
- package/dist/index.d.ts +13 -2
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import React__default, { memo, useState, useRef, useMemo, useEffect, useCallback } from 'react';
|
|
3
|
-
import { TableHead, TableRow, TableCell, TableSortLabel, Chip, Tooltip, IconButton, Paper, LinearProgress, TableContainer, Table, TableBody, TablePagination, Popover, Box as Box$2, Typography, Autocomplete as Autocomplete$1, TextField, Button, FormControl, Select as Select$1, InputLabel, FormControlLabel, Checkbox as Checkbox$1, Switch as Switch$1, FormLabel, RadioGroup, Radio as Radio$1, CircularProgress, Stack, MenuItem } from '@mui/material';
|
|
3
|
+
import { TableHead, TableRow, TableCell, TableSortLabel, Chip, Tooltip, IconButton, Paper, LinearProgress, TableContainer, Table, TableBody, TablePagination, Popover, Box as Box$2, Typography, Autocomplete as Autocomplete$1, TextField, Button, FormControl, Select as Select$1, InputLabel, FormControlLabel, Checkbox as Checkbox$1, Switch as Switch$1, FormLabel, RadioGroup, Radio as Radio$1, CircularProgress, Stack, MenuItem, Modal as Modal$1 } from '@mui/material';
|
|
4
4
|
import emStyled from '@emotion/styled';
|
|
5
5
|
import '@emotion/react';
|
|
6
6
|
import { Field, useField } from 'formik';
|
|
@@ -15257,5 +15257,32 @@ function useGrid({ columns, filters = [], rowsPerPageOptions = [30, 60, 100], })
|
|
|
15257
15257
|
};
|
|
15258
15258
|
}
|
|
15259
15259
|
|
|
15260
|
-
|
|
15260
|
+
function useLoading() {
|
|
15261
|
+
const [state, setState] = useState([]);
|
|
15262
|
+
const isLoading = (prop) => state.includes(prop);
|
|
15263
|
+
const setLoading = (prop, remove) => {
|
|
15264
|
+
if (remove)
|
|
15265
|
+
setState((prevState) => prevState.filter((state) => state !== prop));
|
|
15266
|
+
else
|
|
15267
|
+
setState((prevState) => [...prevState, prop]);
|
|
15268
|
+
};
|
|
15269
|
+
return { isLoading, setLoading };
|
|
15270
|
+
}
|
|
15271
|
+
|
|
15272
|
+
const Modal = (_a) => {
|
|
15273
|
+
var { open, onClose } = _a, rest = __rest(_a, ["open", "onClose"]);
|
|
15274
|
+
return (React__default.createElement(Modal$1, Object.assign({ open: open, onClose: onClose, disableEnforceFocus: true }, rest),
|
|
15275
|
+
React__default.createElement(Box$2, { sx: {
|
|
15276
|
+
outline: "none",
|
|
15277
|
+
backgroundColor: "white",
|
|
15278
|
+
position: "absolute",
|
|
15279
|
+
top: "50%",
|
|
15280
|
+
left: "50%",
|
|
15281
|
+
transform: "translate(-50%, -50%)",
|
|
15282
|
+
borderRadius: 1,
|
|
15283
|
+
} },
|
|
15284
|
+
React__default.createElement(React__default.Fragment, null, rest.children))));
|
|
15285
|
+
};
|
|
15286
|
+
|
|
15287
|
+
export { Autocomplete, Grid as BaseGrid, Checkbox, EditableTableCell, Grid$1 as Grid, Input, InputMask, LargeButton, Modal, Radio, Select, Switch, TabPanel, Td, Tr, createFilter, filterData, getTabProps, useEvent, useFilter, useGrid, useLoading };
|
|
15261
15288
|
//# sourceMappingURL=index.js.map
|