@astral/ui 1.40.3 → 1.42.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/DataGrid/DataGrid.d.ts +6 -1
- package/DataGrid/DataGrid.js +6 -2
- package/DataGrid/DataGridLoader/DataGridLoader.d.ts +2 -1
- package/DataGrid/DataGridLoader/DataGridLoader.js +2 -2
- package/DataGrid/DataGridLoader/styles.js +2 -2
- package/DataGrid/styles.d.ts +14 -0
- package/DataGrid/styles.js +7 -1
- package/Dialog/Dialog.d.ts +12 -1
- package/Dialog/Dialog.js +2 -2
- package/Dialog/index.d.ts +0 -1
- package/Dialog/index.js +0 -1
- package/esm/DataGrid/DataGrid.d.ts +6 -1
- package/esm/DataGrid/DataGrid.js +7 -3
- package/esm/DataGrid/DataGridLoader/DataGridLoader.d.ts +2 -1
- package/esm/DataGrid/DataGridLoader/DataGridLoader.js +2 -2
- package/esm/DataGrid/DataGridLoader/styles.js +2 -2
- package/esm/DataGrid/styles.d.ts +14 -0
- package/esm/DataGrid/styles.js +6 -0
- package/esm/Dialog/Dialog.d.ts +12 -1
- package/esm/Dialog/Dialog.js +2 -2
- package/esm/Dialog/index.d.ts +0 -1
- package/esm/Dialog/index.js +0 -1
- package/package.json +2 -2
- package/Dialog/types.d.ts +0 -6
- package/Dialog/types.js +0 -2
- package/esm/Dialog/types.d.ts +0 -6
- package/esm/Dialog/types.js +0 -1
package/DataGrid/DataGrid.d.ts
CHANGED
|
@@ -63,6 +63,11 @@ export type DataGridProps<Data extends object = DataGridRow, SortField extends k
|
|
|
63
63
|
* Флажок загрузки данных
|
|
64
64
|
*/
|
|
65
65
|
loading?: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* @example <DataGrid disabled={true} />
|
|
68
|
+
* Флажок блокировки таблицы
|
|
69
|
+
*/
|
|
70
|
+
disabled?: boolean;
|
|
66
71
|
/**
|
|
67
72
|
* @default '-'
|
|
68
73
|
* @example <DataGrid emptyCellValue{'Нет данных'} />
|
|
@@ -82,4 +87,4 @@ export type DataGridProps<Data extends object = DataGridRow, SortField extends k
|
|
|
82
87
|
*/
|
|
83
88
|
footerHeight?: number;
|
|
84
89
|
};
|
|
85
|
-
export declare function DataGrid<Data extends object = DataGridRow, SortField extends keyof Data = keyof Data>({ columns, rows, selectedRows, sorting, maxHeight, minDisplayRows, onRowClick, onSelectRow, Footer, noDataPlaceholder, loading, onSort, keyId, emptyCellValue, className, footerHeight, }: DataGridProps<Data, SortField>): JSX.Element;
|
|
90
|
+
export declare function DataGrid<Data extends object = DataGridRow, SortField extends keyof Data = keyof Data>({ columns, rows, selectedRows, sorting, maxHeight, minDisplayRows, onRowClick, onSelectRow, Footer, noDataPlaceholder, loading, disabled, onSort, keyId, emptyCellValue, className, footerHeight, }: DataGridProps<Data, SortField>): JSX.Element;
|
package/DataGrid/DataGrid.js
CHANGED
|
@@ -13,9 +13,13 @@ const DataGridBody_1 = require("./DataGridBody");
|
|
|
13
13
|
const DataGridLoader_1 = __importDefault(require("./DataGridLoader/DataGridLoader"));
|
|
14
14
|
const DataGridNoData_1 = require("./DataGridNoData");
|
|
15
15
|
const styles_1 = require("./styles");
|
|
16
|
-
function DataGrid({ columns, rows = [], selectedRows = [], sorting, maxHeight, minDisplayRows = 10, onRowClick, onSelectRow, Footer, noDataPlaceholder, loading, onSort, keyId, emptyCellValue, className, footerHeight = 50, }) {
|
|
16
|
+
function DataGrid({ columns, rows = [], selectedRows = [], sorting, maxHeight, minDisplayRows = 10, onRowClick, onSelectRow, Footer, noDataPlaceholder, loading, disabled, onSort, keyId, emptyCellValue, className, footerHeight = 50, }) {
|
|
17
17
|
const selectable = Boolean(onSelectRow);
|
|
18
18
|
const withFooter = Boolean(Footer);
|
|
19
|
+
const isTableDisabled = loading || disabled;
|
|
20
|
+
const TableContainer = isTableDisabled
|
|
21
|
+
? styles_1.DisabledTableContainer
|
|
22
|
+
: styles_1.StyledTableContainer;
|
|
19
23
|
const handleSelectAllRows = (event) => {
|
|
20
24
|
if (!onSelectRow) {
|
|
21
25
|
return;
|
|
@@ -45,6 +49,6 @@ function DataGrid({ columns, rows = [], selectedRows = [], sorting, maxHeight, m
|
|
|
45
49
|
}
|
|
46
50
|
return null;
|
|
47
51
|
}, [noDataPlaceholder, loading]);
|
|
48
|
-
return ((0, jsx_runtime_1.jsxs)(styles_1.DataGridContainer, Object.assign({ maxHeight: maxHeight, className: className }, { children: [(0, jsx_runtime_1.jsx)(
|
|
52
|
+
return ((0, jsx_runtime_1.jsxs)(styles_1.DataGridContainer, Object.assign({ maxHeight: maxHeight, className: className }, { children: [(0, jsx_runtime_1.jsx)(TableContainer, Object.assign({ inert: isTableDisabled ? '' : false }, { children: (0, jsx_runtime_1.jsxs)(Table_1.Table, Object.assign({ stickyHeader: true }, { children: [(0, jsx_runtime_1.jsx)(DataGridHead_1.DataGridHead, { onSort: onSort, rowsCount: rows.length, uncheckedRowsCount: uncheckedRowsCount, onSelectAllRows: handleSelectAllRows, selectable: selectable, sorting: sorting, columns: columns }), (0, jsx_runtime_1.jsx)(DataGridBody_1.DataGridBody, { keyId: keyId, selectedRows: selectedRows, minDisplayRows: minDisplayRows, onRowClick: onRowClick, onSelectRow: handleSelectRow, selectable: selectable, rows: rows, columns: columns, emptyCellValue: emptyCellValue, noDataPlaceholder: renderedPlaceholder() })] })) })), (0, jsx_runtime_1.jsx)(DataGridLoader_1.default, { footerHeight: footerHeight, withFooter: withFooter, disabled: disabled, loading: loading }), Footer] })));
|
|
49
53
|
}
|
|
50
54
|
exports.DataGrid = DataGrid;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export type DataGridLoaderProps = {
|
|
3
3
|
loading?: boolean;
|
|
4
|
+
disabled?: boolean;
|
|
4
5
|
withFooter: boolean;
|
|
5
6
|
footerHeight: number;
|
|
6
7
|
};
|
|
7
|
-
declare const DataGridLoader: ({ loading, withFooter, footerHeight, }: DataGridLoaderProps) => JSX.Element;
|
|
8
|
+
declare const DataGridLoader: ({ loading, disabled, withFooter, footerHeight, }: DataGridLoaderProps) => JSX.Element;
|
|
8
9
|
export default DataGridLoader;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
4
|
const styles_1 = require("./styles");
|
|
5
|
-
const DataGridLoader = ({ loading = false, withFooter, footerHeight, }) => {
|
|
6
|
-
return ((0, jsx_runtime_1.jsxs)(styles_1.LoaderWrapper, { children: [loading && ((0, jsx_runtime_1.jsx)(styles_1.Backdrop, { withFooter: withFooter, footerHeight: footerHeight })), loading && (0, jsx_runtime_1.jsx)(styles_1.StyledLinearProgress, {}), !loading && (0, jsx_runtime_1.jsx)(styles_1.StyledDivider, {})] }));
|
|
5
|
+
const DataGridLoader = ({ loading = false, disabled = false, withFooter, footerHeight, }) => {
|
|
6
|
+
return ((0, jsx_runtime_1.jsxs)(styles_1.LoaderWrapper, { children: [(loading || disabled) && ((0, jsx_runtime_1.jsx)(styles_1.Backdrop, { withFooter: withFooter, footerHeight: footerHeight })), loading && (0, jsx_runtime_1.jsx)(styles_1.StyledLinearProgress, {}), !loading && (0, jsx_runtime_1.jsx)(styles_1.StyledDivider, {})] }));
|
|
7
7
|
};
|
|
8
8
|
exports.default = DataGridLoader;
|
|
@@ -13,8 +13,8 @@ exports.Backdrop = styles_1.styled.div `
|
|
|
13
13
|
/* Если в DataGrid передан Footer, нужно чтобы Backdrop не перекрывал его в состоянии loading, поэтому тут его высота вычитается из всей высоты бэкдропа */
|
|
14
14
|
height: ${({ withFooter, footerHeight }) => withFooter ? `calc(100% - ${footerHeight}px) ` : '100%'};
|
|
15
15
|
|
|
16
|
-
background-color: ${({ theme }) => theme.palette.
|
|
17
|
-
opacity: 0.
|
|
16
|
+
background-color: ${({ theme }) => theme.palette.background.element};
|
|
17
|
+
opacity: 0.3;
|
|
18
18
|
`;
|
|
19
19
|
exports.StyledDivider = (0, styles_1.styled)(Divider_1.Divider) `
|
|
20
20
|
border-width: 1px;
|
package/DataGrid/styles.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export declare const DataGridContainer: import("@emotion/styled").StyledComponen
|
|
|
10
10
|
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
11
11
|
}, "sx" | "children" | keyof import("@mui/material/OverridableComponent").CommonProps> & {
|
|
12
12
|
maxHeight?: number | undefined;
|
|
13
|
+
inert?: false | "" | undefined;
|
|
13
14
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
14
15
|
export declare const StyledTableContainer: import("@emotion/styled").StyledComponent<import("../Table").TableContainerProps & {
|
|
15
16
|
theme?: import("@emotion/react").Theme | undefined;
|
|
@@ -21,4 +22,17 @@ export declare const StyledTableContainer: import("@emotion/styled").StyledCompo
|
|
|
21
22
|
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
22
23
|
}, "sx" | "children" | keyof import("@mui/material/OverridableComponent").CommonProps> & {
|
|
23
24
|
maxHeight?: number | undefined;
|
|
25
|
+
inert?: false | "" | undefined;
|
|
26
|
+
}, {}, {}>;
|
|
27
|
+
export declare const DisabledTableContainer: import("@emotion/styled").StyledComponent<import("../Table").TableContainerProps & {
|
|
28
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
29
|
+
} & {
|
|
30
|
+
children?: import("react").ReactNode;
|
|
31
|
+
classes?: Partial<import("@mui/material").TableContainerClasses> | undefined;
|
|
32
|
+
sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
|
|
33
|
+
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "css" | "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & {
|
|
34
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
35
|
+
}, "sx" | "children" | keyof import("@mui/material/OverridableComponent").CommonProps> & {
|
|
36
|
+
maxHeight?: number | undefined;
|
|
37
|
+
inert?: false | "" | undefined;
|
|
24
38
|
}, {}, {}>;
|
package/DataGrid/styles.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.StyledTableContainer = exports.DataGridContainer = void 0;
|
|
3
|
+
exports.DisabledTableContainer = exports.StyledTableContainer = exports.DataGridContainer = void 0;
|
|
4
4
|
const styles_1 = require("../styles");
|
|
5
5
|
const Table_1 = require("../Table");
|
|
6
6
|
exports.DataGridContainer = styles_1.styled.div `
|
|
@@ -18,3 +18,9 @@ exports.StyledTableContainer = (0, styles_1.styled)(Table_1.TableContainer, {
|
|
|
18
18
|
}) `
|
|
19
19
|
height: 100%;
|
|
20
20
|
`;
|
|
21
|
+
exports.DisabledTableContainer = (0, styles_1.styled)(exports.StyledTableContainer) `
|
|
22
|
+
background: ${({ theme }) => theme.palette.background.element};
|
|
23
|
+
mix-blend-mode: luminosity;
|
|
24
|
+
|
|
25
|
+
pointer-events: none;
|
|
26
|
+
`;
|
package/Dialog/Dialog.d.ts
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { DialogProps } from '
|
|
2
|
+
import { DialogProps as MuiDialogProps } from '@mui/material';
|
|
3
|
+
import { WithoutEmotionSpecific } from '../types';
|
|
4
|
+
export type DialogProps = WithoutEmotionSpecific<Omit<MuiDialogProps, 'title'>> & {
|
|
5
|
+
/**
|
|
6
|
+
* Заголовок
|
|
7
|
+
*/
|
|
8
|
+
title?: JSX.Element | JSX.Element[] | string;
|
|
9
|
+
/**
|
|
10
|
+
* Отключить кликабельность фонового компонента
|
|
11
|
+
*/
|
|
12
|
+
disableBackdropClick?: boolean;
|
|
13
|
+
};
|
|
3
14
|
export declare const Dialog: ({ children, title, disableBackdropClick, onClose, ...props }: DialogProps) => JSX.Element;
|
package/Dialog/Dialog.js
CHANGED
|
@@ -14,7 +14,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
14
14
|
exports.Dialog = void 0;
|
|
15
15
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
16
16
|
const material_1 = require("@mui/material");
|
|
17
|
-
const
|
|
17
|
+
const DialogTitle_1 = require("../DialogTitle");
|
|
18
18
|
const Dialog = (_a) => {
|
|
19
19
|
var { children, title, disableBackdropClick, onClose } = _a, props = __rest(_a, ["children", "title", "disableBackdropClick", "onClose"]);
|
|
20
20
|
const handleClose = onClose &&
|
|
@@ -24,6 +24,6 @@ const Dialog = (_a) => {
|
|
|
24
24
|
}
|
|
25
25
|
onClose(event, reason);
|
|
26
26
|
});
|
|
27
|
-
return ((0, jsx_runtime_1.jsxs)(material_1.Dialog, Object.assign({ onClose: handleClose }, props, { children: [title && (0, jsx_runtime_1.jsx)(
|
|
27
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.Dialog, Object.assign({ onClose: handleClose }, props, { children: [title && (0, jsx_runtime_1.jsx)(DialogTitle_1.DialogTitle, Object.assign({ onClose: onClose }, { children: title })), children] })));
|
|
28
28
|
};
|
|
29
29
|
exports.Dialog = Dialog;
|
package/Dialog/index.d.ts
CHANGED
package/Dialog/index.js
CHANGED
|
@@ -63,6 +63,11 @@ export type DataGridProps<Data extends object = DataGridRow, SortField extends k
|
|
|
63
63
|
* Флажок загрузки данных
|
|
64
64
|
*/
|
|
65
65
|
loading?: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* @example <DataGrid disabled={true} />
|
|
68
|
+
* Флажок блокировки таблицы
|
|
69
|
+
*/
|
|
70
|
+
disabled?: boolean;
|
|
66
71
|
/**
|
|
67
72
|
* @default '-'
|
|
68
73
|
* @example <DataGrid emptyCellValue{'Нет данных'} />
|
|
@@ -82,4 +87,4 @@ export type DataGridProps<Data extends object = DataGridRow, SortField extends k
|
|
|
82
87
|
*/
|
|
83
88
|
footerHeight?: number;
|
|
84
89
|
};
|
|
85
|
-
export declare function DataGrid<Data extends object = DataGridRow, SortField extends keyof Data = keyof Data>({ columns, rows, selectedRows, sorting, maxHeight, minDisplayRows, onRowClick, onSelectRow, Footer, noDataPlaceholder, loading, onSort, keyId, emptyCellValue, className, footerHeight, }: DataGridProps<Data, SortField>): JSX.Element;
|
|
90
|
+
export declare function DataGrid<Data extends object = DataGridRow, SortField extends keyof Data = keyof Data>({ columns, rows, selectedRows, sorting, maxHeight, minDisplayRows, onRowClick, onSelectRow, Footer, noDataPlaceholder, loading, disabled, onSort, keyId, emptyCellValue, className, footerHeight, }: DataGridProps<Data, SortField>): JSX.Element;
|
package/esm/DataGrid/DataGrid.js
CHANGED
|
@@ -6,10 +6,14 @@ import { DataGridHead } from './DataGridHead';
|
|
|
6
6
|
import { DataGridBody } from './DataGridBody';
|
|
7
7
|
import DataGridLoader from './DataGridLoader/DataGridLoader';
|
|
8
8
|
import { DataGridNoData } from './DataGridNoData';
|
|
9
|
-
import { DataGridContainer, StyledTableContainer } from './styles';
|
|
10
|
-
export function DataGrid({ columns, rows = [], selectedRows = [], sorting, maxHeight, minDisplayRows = 10, onRowClick, onSelectRow, Footer, noDataPlaceholder, loading, onSort, keyId, emptyCellValue, className, footerHeight = 50, }) {
|
|
9
|
+
import { DataGridContainer, DisabledTableContainer, StyledTableContainer, } from './styles';
|
|
10
|
+
export function DataGrid({ columns, rows = [], selectedRows = [], sorting, maxHeight, minDisplayRows = 10, onRowClick, onSelectRow, Footer, noDataPlaceholder, loading, disabled, onSort, keyId, emptyCellValue, className, footerHeight = 50, }) {
|
|
11
11
|
const selectable = Boolean(onSelectRow);
|
|
12
12
|
const withFooter = Boolean(Footer);
|
|
13
|
+
const isTableDisabled = loading || disabled;
|
|
14
|
+
const TableContainer = isTableDisabled
|
|
15
|
+
? DisabledTableContainer
|
|
16
|
+
: StyledTableContainer;
|
|
13
17
|
const handleSelectAllRows = (event) => {
|
|
14
18
|
if (!onSelectRow) {
|
|
15
19
|
return;
|
|
@@ -39,5 +43,5 @@ export function DataGrid({ columns, rows = [], selectedRows = [], sorting, maxHe
|
|
|
39
43
|
}
|
|
40
44
|
return null;
|
|
41
45
|
}, [noDataPlaceholder, loading]);
|
|
42
|
-
return (_jsxs(DataGridContainer, Object.assign({ maxHeight: maxHeight, className: className }, { children: [_jsx(
|
|
46
|
+
return (_jsxs(DataGridContainer, Object.assign({ maxHeight: maxHeight, className: className }, { children: [_jsx(TableContainer, Object.assign({ inert: isTableDisabled ? '' : false }, { children: _jsxs(Table, Object.assign({ stickyHeader: true }, { children: [_jsx(DataGridHead, { onSort: onSort, rowsCount: rows.length, uncheckedRowsCount: uncheckedRowsCount, onSelectAllRows: handleSelectAllRows, selectable: selectable, sorting: sorting, columns: columns }), _jsx(DataGridBody, { keyId: keyId, selectedRows: selectedRows, minDisplayRows: minDisplayRows, onRowClick: onRowClick, onSelectRow: handleSelectRow, selectable: selectable, rows: rows, columns: columns, emptyCellValue: emptyCellValue, noDataPlaceholder: renderedPlaceholder() })] })) })), _jsx(DataGridLoader, { footerHeight: footerHeight, withFooter: withFooter, disabled: disabled, loading: loading }), Footer] })));
|
|
43
47
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export type DataGridLoaderProps = {
|
|
3
3
|
loading?: boolean;
|
|
4
|
+
disabled?: boolean;
|
|
4
5
|
withFooter: boolean;
|
|
5
6
|
footerHeight: number;
|
|
6
7
|
};
|
|
7
|
-
declare const DataGridLoader: ({ loading, withFooter, footerHeight, }: DataGridLoaderProps) => JSX.Element;
|
|
8
|
+
declare const DataGridLoader: ({ loading, disabled, withFooter, footerHeight, }: DataGridLoaderProps) => JSX.Element;
|
|
8
9
|
export default DataGridLoader;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Backdrop, LoaderWrapper, StyledDivider, StyledLinearProgress, } from './styles';
|
|
3
|
-
const DataGridLoader = ({ loading = false, withFooter, footerHeight, }) => {
|
|
4
|
-
return (_jsxs(LoaderWrapper, { children: [loading && (_jsx(Backdrop, { withFooter: withFooter, footerHeight: footerHeight })), loading && _jsx(StyledLinearProgress, {}), !loading && _jsx(StyledDivider, {})] }));
|
|
3
|
+
const DataGridLoader = ({ loading = false, disabled = false, withFooter, footerHeight, }) => {
|
|
4
|
+
return (_jsxs(LoaderWrapper, { children: [(loading || disabled) && (_jsx(Backdrop, { withFooter: withFooter, footerHeight: footerHeight })), loading && _jsx(StyledLinearProgress, {}), !loading && _jsx(StyledDivider, {})] }));
|
|
5
5
|
};
|
|
6
6
|
export default DataGridLoader;
|
|
@@ -10,8 +10,8 @@ export const Backdrop = styled.div `
|
|
|
10
10
|
/* Если в DataGrid передан Footer, нужно чтобы Backdrop не перекрывал его в состоянии loading, поэтому тут его высота вычитается из всей высоты бэкдропа */
|
|
11
11
|
height: ${({ withFooter, footerHeight }) => withFooter ? `calc(100% - ${footerHeight}px) ` : '100%'};
|
|
12
12
|
|
|
13
|
-
background-color: ${({ theme }) => theme.palette.
|
|
14
|
-
opacity: 0.
|
|
13
|
+
background-color: ${({ theme }) => theme.palette.background.element};
|
|
14
|
+
opacity: 0.3;
|
|
15
15
|
`;
|
|
16
16
|
export const StyledDivider = styled(Divider) `
|
|
17
17
|
border-width: 1px;
|
package/esm/DataGrid/styles.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export declare const DataGridContainer: import("@emotion/styled").StyledComponen
|
|
|
10
10
|
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
11
11
|
}, "sx" | "children" | keyof import("@mui/material/OverridableComponent").CommonProps> & {
|
|
12
12
|
maxHeight?: number | undefined;
|
|
13
|
+
inert?: false | "" | undefined;
|
|
13
14
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
14
15
|
export declare const StyledTableContainer: import("@emotion/styled").StyledComponent<import("../Table").TableContainerProps & {
|
|
15
16
|
theme?: import("@emotion/react").Theme | undefined;
|
|
@@ -21,4 +22,17 @@ export declare const StyledTableContainer: import("@emotion/styled").StyledCompo
|
|
|
21
22
|
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
22
23
|
}, "sx" | "children" | keyof import("@mui/material/OverridableComponent").CommonProps> & {
|
|
23
24
|
maxHeight?: number | undefined;
|
|
25
|
+
inert?: false | "" | undefined;
|
|
26
|
+
}, {}, {}>;
|
|
27
|
+
export declare const DisabledTableContainer: import("@emotion/styled").StyledComponent<import("../Table").TableContainerProps & {
|
|
28
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
29
|
+
} & {
|
|
30
|
+
children?: import("react").ReactNode;
|
|
31
|
+
classes?: Partial<import("@mui/material").TableContainerClasses> | undefined;
|
|
32
|
+
sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
|
|
33
|
+
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "css" | "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & {
|
|
34
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
35
|
+
}, "sx" | "children" | keyof import("@mui/material/OverridableComponent").CommonProps> & {
|
|
36
|
+
maxHeight?: number | undefined;
|
|
37
|
+
inert?: false | "" | undefined;
|
|
24
38
|
}, {}, {}>;
|
package/esm/DataGrid/styles.js
CHANGED
|
@@ -15,3 +15,9 @@ export const StyledTableContainer = styled(TableContainer, {
|
|
|
15
15
|
}) `
|
|
16
16
|
height: 100%;
|
|
17
17
|
`;
|
|
18
|
+
export const DisabledTableContainer = styled(StyledTableContainer) `
|
|
19
|
+
background: ${({ theme }) => theme.palette.background.element};
|
|
20
|
+
mix-blend-mode: luminosity;
|
|
21
|
+
|
|
22
|
+
pointer-events: none;
|
|
23
|
+
`;
|
package/esm/Dialog/Dialog.d.ts
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { DialogProps } from '
|
|
2
|
+
import { DialogProps as MuiDialogProps } from '@mui/material';
|
|
3
|
+
import { WithoutEmotionSpecific } from '../types';
|
|
4
|
+
export type DialogProps = WithoutEmotionSpecific<Omit<MuiDialogProps, 'title'>> & {
|
|
5
|
+
/**
|
|
6
|
+
* Заголовок
|
|
7
|
+
*/
|
|
8
|
+
title?: JSX.Element | JSX.Element[] | string;
|
|
9
|
+
/**
|
|
10
|
+
* Отключить кликабельность фонового компонента
|
|
11
|
+
*/
|
|
12
|
+
disableBackdropClick?: boolean;
|
|
13
|
+
};
|
|
3
14
|
export declare const Dialog: ({ children, title, disableBackdropClick, onClose, ...props }: DialogProps) => JSX.Element;
|
package/esm/Dialog/Dialog.js
CHANGED
|
@@ -10,8 +10,8 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
10
10
|
return t;
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
-
import { Dialog as MuiDialog } from '@mui/material';
|
|
14
|
-
import { DialogTitle } from '../
|
|
13
|
+
import { Dialog as MuiDialog, } from '@mui/material';
|
|
14
|
+
import { DialogTitle } from '../DialogTitle';
|
|
15
15
|
export const Dialog = (_a) => {
|
|
16
16
|
var { children, title, disableBackdropClick, onClose } = _a, props = __rest(_a, ["children", "title", "disableBackdropClick", "onClose"]);
|
|
17
17
|
const handleClose = onClose &&
|
package/esm/Dialog/index.d.ts
CHANGED
package/esm/Dialog/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astral/ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.42.0",
|
|
4
4
|
"browser": "./esm/index.js",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@astral/icons": "^1.
|
|
7
|
+
"@astral/icons": "^1.42.0",
|
|
8
8
|
"@emotion/cache": "11.7.1",
|
|
9
9
|
"@emotion/react": "11.9.0",
|
|
10
10
|
"@emotion/server": "11.4.0",
|
package/Dialog/types.d.ts
DELETED
package/Dialog/types.js
DELETED
package/esm/Dialog/types.d.ts
DELETED
package/esm/Dialog/types.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|