@astral/ui 1.13.0 → 1.14.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/BackdropStack/services/BackdropStackManager/BackdropStackManager.d.ts +2 -1
- package/DataGrid/DataGrid.d.ts +6 -1
- package/DataGrid/DataGrid.js +9 -2
- package/DataGrid/DataGridBody/DataGridBody.d.ts +2 -1
- package/DataGrid/DataGridBody/DataGridBody.js +2 -2
- package/DataGrid/DataGridBody/styles.js +1 -1
- package/DataGrid/DataGridNoData/DataGridNoData.d.ts +22 -0
- package/DataGrid/DataGridNoData/DataGridNoData.js +22 -0
- package/DataGrid/DataGridNoData/index.d.ts +1 -0
- package/DataGrid/DataGridNoData/index.js +17 -0
- package/DataGrid/DataGridNoData/styles.d.ts +23 -0
- package/DataGrid/DataGridNoData/styles.js +20 -0
- package/ListItemButton/ListItemButton.d.ts +1 -1
- package/ListItemButton/ListItemButton.js +1 -1
- package/esm/BackdropStack/services/BackdropStackManager/BackdropStackManager.d.ts +2 -1
- package/esm/DataGrid/DataGrid.d.ts +6 -1
- package/esm/DataGrid/DataGrid.js +9 -2
- package/esm/DataGrid/DataGridBody/DataGridBody.d.ts +2 -1
- package/esm/DataGrid/DataGridBody/DataGridBody.js +2 -2
- package/esm/DataGrid/DataGridBody/styles.js +1 -1
- package/esm/DataGrid/DataGridNoData/DataGridNoData.d.ts +22 -0
- package/esm/DataGrid/DataGridNoData/DataGridNoData.js +18 -0
- package/esm/DataGrid/DataGridNoData/index.d.ts +1 -0
- package/esm/DataGrid/DataGridNoData/index.js +1 -0
- package/esm/DataGrid/DataGridNoData/styles.d.ts +23 -0
- package/esm/DataGrid/DataGridNoData/styles.js +17 -0
- package/esm/ListItemButton/ListItemButton.d.ts +1 -1
- package/esm/ListItemButton/ListItemButton.js +1 -1
- package/package.json +2 -2
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { AutocompleteCloseReason } from '@mui/base/AutocompleteUnstyled/useAutocomplete';
|
|
1
2
|
declare type PopId = string;
|
|
2
|
-
export declare type Reason = 'escapeKeyDown' | 'backdropClick' | 'toggleInput' | 'blur' | null;
|
|
3
|
+
export declare type Reason = 'escapeKeyDown' | 'backdropClick' | 'toggleInput' | 'blur' | AutocompleteCloseReason | null;
|
|
3
4
|
declare class BackdropStackManager {
|
|
4
5
|
private stack;
|
|
5
6
|
private previousPopInfo;
|
package/DataGrid/DataGrid.d.ts
CHANGED
|
@@ -47,6 +47,11 @@ export declare type DataGridProps<Data extends object = DataGridRow, SortField e
|
|
|
47
47
|
* Компонент кастомного футера (н-р Pagination)
|
|
48
48
|
*/
|
|
49
49
|
Footer?: ReactNode;
|
|
50
|
+
/**
|
|
51
|
+
* @example <DataGrid noDataPlaceholder={<DataGridNoData />} />
|
|
52
|
+
* Используется для отображения placeholder при отсутствии данных в таблице
|
|
53
|
+
*/
|
|
54
|
+
noDataPlaceholder?: ReactNode;
|
|
50
55
|
/**
|
|
51
56
|
* @example <DataGrid maxHeight={900} />
|
|
52
57
|
* Максимальная высота для таблицы
|
|
@@ -70,4 +75,4 @@ export declare type DataGridProps<Data extends object = DataGridRow, SortField e
|
|
|
70
75
|
*/
|
|
71
76
|
minDisplayRows?: number;
|
|
72
77
|
};
|
|
73
|
-
export declare function DataGrid<Data extends object = DataGridRow, SortField extends keyof Data = keyof Data>({ columns, rows, selectedRows, sorting, maxHeight, minDisplayRows, onRowClick, onSelectRow, Footer, loading, onSort, keyId, emptyCellValue, }: DataGridProps<Data, SortField>): JSX.Element;
|
|
78
|
+
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, }: DataGridProps<Data, SortField>): JSX.Element;
|
package/DataGrid/DataGrid.js
CHANGED
|
@@ -30,9 +30,10 @@ var Table_1 = require("../Table");
|
|
|
30
30
|
var DataGridHead_1 = require("./DataGridHead");
|
|
31
31
|
var DataGridBody_1 = require("./DataGridBody");
|
|
32
32
|
var DataGridLoader_1 = __importDefault(require("./DataGridLoader/DataGridLoader"));
|
|
33
|
+
var DataGridNoData_1 = require("./DataGridNoData");
|
|
33
34
|
var styles_1 = require("./styles");
|
|
34
35
|
function DataGrid(_a) {
|
|
35
|
-
var columns = _a.columns, _b = _a.rows, rows = _b === void 0 ? [] : _b, _c = _a.selectedRows, selectedRows = _c === void 0 ? [] : _c, sorting = _a.sorting, maxHeight = _a.maxHeight, _d = _a.minDisplayRows, minDisplayRows = _d === void 0 ? 10 : _d, onRowClick = _a.onRowClick, onSelectRow = _a.onSelectRow, Footer = _a.Footer, loading = _a.loading, onSort = _a.onSort, keyId = _a.keyId, emptyCellValue = _a.emptyCellValue;
|
|
36
|
+
var columns = _a.columns, _b = _a.rows, rows = _b === void 0 ? [] : _b, _c = _a.selectedRows, selectedRows = _c === void 0 ? [] : _c, sorting = _a.sorting, maxHeight = _a.maxHeight, _d = _a.minDisplayRows, minDisplayRows = _d === void 0 ? 10 : _d, onRowClick = _a.onRowClick, onSelectRow = _a.onSelectRow, Footer = _a.Footer, noDataPlaceholder = _a.noDataPlaceholder, loading = _a.loading, onSort = _a.onSort, keyId = _a.keyId, emptyCellValue = _a.emptyCellValue;
|
|
36
37
|
var selectable = Boolean(onSelectRow);
|
|
37
38
|
var handleSelectAllRows = function (event) {
|
|
38
39
|
if (!onSelectRow) {
|
|
@@ -61,6 +62,12 @@ function DataGrid(_a) {
|
|
|
61
62
|
return !selectedRows.find(function (selectedRow) { return selectedRow[keyId] === row[keyId]; });
|
|
62
63
|
}).length;
|
|
63
64
|
}, [rows, selectedRows, keyId]);
|
|
64
|
-
|
|
65
|
+
var renderedPlaceholder = (0, react_1.useCallback)(function () {
|
|
66
|
+
if (!loading) {
|
|
67
|
+
return noDataPlaceholder || (0, jsx_runtime_1.jsx)(DataGridNoData_1.DataGridNoData, {});
|
|
68
|
+
}
|
|
69
|
+
return null;
|
|
70
|
+
}, [noDataPlaceholder, loading]);
|
|
71
|
+
return ((0, jsx_runtime_1.jsxs)(styles_1.DataGridContainer, { children: [(0, jsx_runtime_1.jsxs)(styles_1.StyledTableContainer, __assign({ maxHeight: maxHeight }, { children: [(0, jsx_runtime_1.jsxs)(Table_1.Table, __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, { loading: loading })] })), rows.length ? Footer : null] }));
|
|
65
72
|
}
|
|
66
73
|
exports.DataGrid = DataGrid;
|
|
@@ -10,5 +10,6 @@ export declare type DataGridBodyProps<Data> = {
|
|
|
10
10
|
onSelectRow: (row: Data) => (event: ChangeEvent<HTMLInputElement>) => void;
|
|
11
11
|
minDisplayRows: number;
|
|
12
12
|
emptyCellValue?: ReactNode;
|
|
13
|
+
noDataPlaceholder?: ReactNode;
|
|
13
14
|
};
|
|
14
|
-
export declare function DataGridBody<Data>({ rows, columns, selectable, onRowClick, onSelectRow, selectedRows, minDisplayRows, keyId, emptyCellValue, }: DataGridBodyProps<Data>): JSX.Element;
|
|
15
|
+
export declare function DataGridBody<Data>({ rows, columns, selectable, onRowClick, onSelectRow, selectedRows, minDisplayRows, keyId, emptyCellValue, noDataPlaceholder, }: DataGridBodyProps<Data>): JSX.Element;
|
|
@@ -19,7 +19,7 @@ var DataGridCell_1 = require("../DataGridCell");
|
|
|
19
19
|
var Checkbox_1 = require("../../Checkbox");
|
|
20
20
|
var styles_1 = require("./styles");
|
|
21
21
|
function DataGridBody(_a) {
|
|
22
|
-
var rows = _a.rows, columns = _a.columns, selectable = _a.selectable, onRowClick = _a.onRowClick, onSelectRow = _a.onSelectRow, _b = _a.selectedRows, selectedRows = _b === void 0 ? [] : _b, minDisplayRows = _a.minDisplayRows, keyId = _a.keyId, emptyCellValue = _a.emptyCellValue;
|
|
22
|
+
var rows = _a.rows, columns = _a.columns, selectable = _a.selectable, onRowClick = _a.onRowClick, onSelectRow = _a.onSelectRow, _b = _a.selectedRows, selectedRows = _b === void 0 ? [] : _b, minDisplayRows = _a.minDisplayRows, keyId = _a.keyId, emptyCellValue = _a.emptyCellValue, noDataPlaceholder = _a.noDataPlaceholder;
|
|
23
23
|
var renderCells = (0, react_1.useCallback)(function (row, rowId) {
|
|
24
24
|
return columns.map(function (cell, index) {
|
|
25
25
|
var cellId = "".concat(rowId, "-").concat(index);
|
|
@@ -39,6 +39,6 @@ function DataGridBody(_a) {
|
|
|
39
39
|
return ((0, jsx_runtime_1.jsxs)(Table_1.TableRow, __assign({ hover: Boolean(onRowClick), onClick: handleRowClick(row) }, { children: [selectable && ((0, jsx_runtime_1.jsx)(Table_1.TableCell, __assign({ padding: "checkbox", onClick: function (event) { return event.stopPropagation(); } }, { children: (0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { checked: checked, onChange: onSelectRow(row) }) }))), renderCells(row, rowId)] }), rowId));
|
|
40
40
|
});
|
|
41
41
|
}, [rows, keyId, selectable, selectedRows, onSelectRow, onRowClick, columns]);
|
|
42
|
-
return ((0, jsx_runtime_1.jsx)(styles_1.StyledTableBody, __assign({ empty: !rows.length, minDisplayRows: minDisplayRows }, { children: renderedRows })));
|
|
42
|
+
return ((0, jsx_runtime_1.jsx)(styles_1.StyledTableBody, __assign({ empty: !rows.length, minDisplayRows: minDisplayRows }, { children: rows.length ? renderedRows : noDataPlaceholder })));
|
|
43
43
|
}
|
|
44
44
|
exports.DataGridBody = DataGridBody;
|
|
@@ -10,7 +10,7 @@ var Table_1 = require("../../Table");
|
|
|
10
10
|
var TABLE_ROW_HEIGHT = 44;
|
|
11
11
|
exports.StyledTableBody = (0, styles_1.styled)(Table_1.TableBody, {
|
|
12
12
|
shouldForwardProp: function (prop) { return prop !== 'empty' && prop !== 'minDisplayRows'; },
|
|
13
|
-
})(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n height: ", ";\n"], ["\n height: ", ";\n"])), function (_a) {
|
|
13
|
+
})(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: relative;\n\n height: ", ";\n"], ["\n position: relative;\n\n height: ", ";\n"])), function (_a) {
|
|
14
14
|
var empty = _a.empty, minDisplayRows = _a.minDisplayRows;
|
|
15
15
|
return empty ? "".concat(TABLE_ROW_HEIGHT * minDisplayRows, "px") : 'auto';
|
|
16
16
|
});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export declare type DataGridNoDataProps = {
|
|
3
|
+
/**
|
|
4
|
+
* @default 'Нет данных'
|
|
5
|
+
* @example <DataGridNoData title='Нет данных' />
|
|
6
|
+
* @description Заголовок
|
|
7
|
+
*/
|
|
8
|
+
title?: string;
|
|
9
|
+
/**
|
|
10
|
+
* @default BaseNoDataIcon()
|
|
11
|
+
* @example <DataGridNoData noDataIcon={BaseNoDataIcon()} />
|
|
12
|
+
* @description Иконка
|
|
13
|
+
*/
|
|
14
|
+
noDataIcon?: ReactNode;
|
|
15
|
+
/**
|
|
16
|
+
* @default 250
|
|
17
|
+
* @example <DataGridNoData noDataIconWidth={250} />
|
|
18
|
+
* @description Ширина иконки (высота рассчитывается пропорционально ширине)
|
|
19
|
+
*/
|
|
20
|
+
noDataIconWidth?: number;
|
|
21
|
+
};
|
|
22
|
+
export declare const DataGridNoData: ({ title, noDataIcon, noDataIconWidth, }: DataGridNoDataProps) => JSX.Element;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.DataGridNoData = void 0;
|
|
15
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
16
|
+
var styles_1 = require("./styles");
|
|
17
|
+
var BaseNoDataIcon = function () { return ((0, jsx_runtime_1.jsxs)("svg", __assign({ viewBox: "0 0 124 124", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: [(0, jsx_runtime_1.jsx)("path", { fill: "#EBEEF1", stroke: "#B7C2CE", d: "M106.5 62a43.5 43.5 0 1 1-87 0 43.5 43.5 0 0 1 87 0Z" }), (0, jsx_runtime_1.jsx)("path", { fill: "#B7C2CE", fillRule: "evenodd", d: "m48.3 74 22.5-44.7a5.3 5.3 0 0 1 7-2.3l23.7 12a5 5 0 0 1 2.7 3l4.7 14.8c.4 1.3.3 2.7-.3 4L91 95.4a5.3 5.3 0 0 1-7.1 2.3L50.6 81a5.3 5.3 0 0 1-2.3-7Zm.9.4 22.5-44.6c1-2.1 3.6-3 5.7-1.9l23.7 12c.7.3 1.2.8 1.6 1.4l-3.3 6.5a5.3 5.3 0 0 0 2.4 7l6.3 3.3c0 .7 0 1.5-.4 2.2L90.2 95a4.4 4.4 0 0 1-5.8 1.8L51.1 80.1c-2.1-1-3-3.6-2-5.7Z", clipRule: "evenodd" }), (0, jsx_runtime_1.jsx)("path", { fill: "#fff", d: "M71.7 29.8 49.2 74.4c-1 2-.2 4.7 1.9 5.7L84.4 97c2.1 1.1 4.7.3 5.8-1.8l17.5-34.8c.3-.7.5-1.5.4-2.2l-6.3-3.2a5.3 5.3 0 0 1-2.4-7l3.3-6.6c-.4-.6-1-1.1-1.6-1.4L77.4 28c-2.1-1-4.7-.2-5.7 1.9Z" }), (0, jsx_runtime_1.jsx)("path", { fill: "#B7C2CE", fillRule: "evenodd", d: "M77 33.9c.1-.4.6-.5 1-.3l17.5 8.8a.7.7 0 0 1-.6 1.3l-17.6-8.9a.7.7 0 0 1-.3-1Zm-2.4 4.6c.2-.3.6-.5 1-.3l6.1 3.1a.7.7 0 0 1-.6 1.3l-6.2-3.1a.7.7 0 0 1-.3-1Z", clipRule: "evenodd" }), (0, jsx_runtime_1.jsx)("path", { stroke: "#B7C2CE", strokeLinecap: "round", strokeWidth: "2.1", d: "m57.1 74 5.6 2.8m4.6 2.3 2.4 1.2" }), (0, jsx_runtime_1.jsx)("path", { fill: "#B7C2CE", fillRule: "evenodd", d: "M67.8 50.5a2.6 2.6 0 0 1 3.5-1.1l25.5 12.8c1.3.6 1.8 2.2 1.1 3.5l-7.5 15a2.6 2.6 0 0 1-3.6 1.2L61.4 69a2.6 2.6 0 0 1-1.2-3.5l7.6-15Zm3-.3 25.5 12.9c.8.4 1.2 1.4.7 2.2l-1 2.3-28.5-14.3 1.2-2.3c.4-.8 1.4-1.2 2.2-.8Zm-3.7 4-1.8 3.5L93.6 72l1.9-3.6L67 54.1Zm26.1 18.7L64.8 58.6 62.6 63l28.3 14.3 2.3-4.4Zm-2.6 5.3h-.2L62.2 63.8l-1 2c-.5.9-.2 1.8.6 2.3L87.3 81c.8.4 1.8 0 2.2-.7l1-2.1Z", clipRule: "evenodd" }), (0, jsx_runtime_1.jsx)("path", { fill: "#fff", d: "M41.1 30.7c.7-.3 1.4-.5 2.1-.5l3.7 6.3a5.3 5.3 0 0 0 7.2 2l6.1-3.7c.7.4 1.2 1 1.6 1.6l19.5 33.7c1.2 2 .5 4.7-1.6 5.9L47.4 94.6c-2 1.2-4.7.5-5.9-1.5l-25-43.3c-1.1-2-.4-4.6 1.6-5.8l23-13.3Z" }), (0, jsx_runtime_1.jsx)("path", { fill: "#B7C2CE", fillRule: "evenodd", d: "M61.2 34.3c-.5-.4-1-.7-1.7-.8l-14.8-4.1a5.3 5.3 0 0 0-4 .5L17.6 43a5.3 5.3 0 0 0-2 7.2l25 43.3a5.3 5.3 0 0 0 7.2 2l32.3-18.8a5.3 5.3 0 0 0 2-7.2L62.7 36c-.4-.6-.9-1.2-1.5-1.6Zm-18-4.1c-.7 0-1.4.2-2 .5L18.1 44a4.3 4.3 0 0 0-1.6 5.8l25 43.3c1.1 2 3.7 2.7 5.8 1.5L79.7 76c2-1.2 2.8-3.8 1.6-5.9L61.8 36.4c-.4-.7-.9-1.2-1.6-1.6l-6.1 3.6a5.3 5.3 0 0 1-7.2-2l-3.7-6.2Z", clipRule: "evenodd" }), (0, jsx_runtime_1.jsx)("path", { fill: "#B7C2CE", fillRule: "evenodd", d: "M23 47.8c-.2-.4-.2-1 .2-1.1l17-9.9c.4-.2.8 0 1.1.5.3.4.2 1-.1 1.1l-17 9.9c-.4.2-1 0-1.2-.5Zm2.6 4.5c-.2-.4-.2-1 .2-1.1l6-3.5c.3-.2.8 0 1 .5.3.4.2 1-.1 1.2l-6 3.4c-.3.2-.8 0-1-.5ZM45 87.2c-.2-.2-.1-.5.1-.6l6.4-3.7a.5.5 0 0 1 .5.8l-6.4 3.7c-.2.1-.5 0-.7-.2Zm9.8-5.7c-.1-.2 0-.5.2-.6l3.3-2c.2 0 .5 0 .6.2.1.3 0 .6-.2.7l-3.3 1.9c-.2.1-.5 0-.6-.2Zm-23-17.1a2.6 2.6 0 0 1 1-3.6l26.4-15.2c1.3-.8 2.9-.3 3.6 1L71.2 61c.7 1.2.3 2.8-1 3.6L43.8 79.9c-1.3.8-2.9.3-3.6-1l-8.4-14.5Zm1.5-2.7 26.4-15.3c.8-.4 1.8-.1 2.2.6l8.4 14.6c.5.8.2 1.8-.6 2.2L43.3 79.1c-.8.4-1.8.2-2.2-.6l-1.2-2 29.3-17-.5-.8-29.3 16.9-2.5-4.3 29.3-16.9-.5-.9-29.3 17-2-3.5 29.3-17-.5-.8-29.3 17-1.2-2.3c-.5-.7-.2-1.7.6-2.2Z", clipRule: "evenodd" }), (0, jsx_runtime_1.jsx)("path", { fill: "#fff", d: "M34.7 30.1v64.1c0 3 2.4 5.4 5.4 5.4h45.4c3 0 5.4-2.4 5.4-5.4v-50c0-.6-.1-1.2-.3-1.7h-9.2A6.4 6.4 0 0 1 75 36V25.4c-.8-.4-1.8-.7-2.7-.7H40c-3 0-5.4 2.4-5.4 5.4Z" }), (0, jsx_runtime_1.jsx)("path", { fill: "#B7C2CE", fillRule: "evenodd", d: "M75 24.3c-.9-.4-1.8-.6-2.7-.6H40a6.4 6.4 0 0 0-6.4 6.4v64.1c0 3.6 2.9 6.4 6.4 6.4h45.4c3.5 0 6.4-2.8 6.4-6.4v-50a6.4 6.4 0 0 0-1.8-4.4l-13-14a6.4 6.4 0 0 0-2-1.5Zm-40.3 70V30c0-3 2.4-5.4 5.4-5.4h32.2c1 0 1.9.3 2.7.7V36c0 3.5 2.9 6.4 6.4 6.4h9.2c.2.5.3 1 .3 1.7v50c0 3-2.4 5.4-5.4 5.4H40c-3 0-5.4-2.4-5.4-5.4Z", clipRule: "evenodd" }), (0, jsx_runtime_1.jsx)("path", { fill: "#B7C2CE", fillRule: "evenodd", d: "M43 34c0-.5.5-1 1-1h20.7c.5 0 1 .5 1 1s-.5 1-1 1H44a1 1 0 0 1-1-1Zm0 3.8c0-.5.5-1 1-1h7.6c.5 0 .9.5.9 1s-.4 1-.9 1H44a1 1 0 0 1-1-1Zm-.8 52c0-.2.1-.4.4-.4H52c.3 0 .5.2.5.4 0 .3-.2.5-.5.5h-9.4c-.3 0-.4-.2-.4-.5Zm14 0c0-.2.2-.4.5-.4h4.7c.3 0 .5.2.5.4 0 .3-.2.5-.5.5h-4.7c-.3 0-.5-.2-.5-.5Zm-15-34.9c0-1.2 1-2.1 2.1-2.1h39c1.1 0 2 1 2 2v24a2 2 0 0 1-2 2.1h-39a2 2 0 0 1-2-2v-24Zm2.1-1.1h39c.6 0 1 .5 1 1v4.6h-41V55c0-.6.4-1.1 1-1.1Zm-1 20.6v4.4c0 .6.4 1.1 1 1.1h39c.6 0 1-.5 1-1v-4.5h-41Zm41-1h-41V67h41v6.6Zm0-13.1V66h-41v-5.7h41Z", clipRule: "evenodd" }), (0, jsx_runtime_1.jsx)("circle", { cx: "19.8", cy: "35.9", r: "2", fill: "#F0F4F7" }), (0, jsx_runtime_1.jsx)("circle", { cx: "101.2", cy: "28.3", r: "2.7", fill: "#F0F4F7" }), (0, jsx_runtime_1.jsx)("circle", { cx: "29.5", cy: "98.4", r: "1.9", fill: "#DDE2E8" }), (0, jsx_runtime_1.jsx)("circle", { cx: "24.3", cy: "29.7", r: "1.3", fill: "#DDE2E8" }), (0, jsx_runtime_1.jsx)("circle", { cx: "96.7", cy: "23.1", r: "1.3", fill: "#DDE2E8" }), (0, jsx_runtime_1.jsx)("circle", { cx: "103.9", cy: "86.3", r: "1.3", fill: "#EBEEF1" })] }))); };
|
|
18
|
+
var DataGridNoData = function (_a) {
|
|
19
|
+
var _b = _a.title, title = _b === void 0 ? 'Нет данных' : _b, _c = _a.noDataIcon, noDataIcon = _c === void 0 ? BaseNoDataIcon() : _c, _d = _a.noDataIconWidth, noDataIconWidth = _d === void 0 ? 250 : _d;
|
|
20
|
+
return ((0, jsx_runtime_1.jsx)(styles_1.DataGridNoDataWrapper, { children: (0, jsx_runtime_1.jsxs)(styles_1.DataGridNoDataFigure, { children: [(0, jsx_runtime_1.jsx)(styles_1.DataGridNoDataIcon, __assign({ noDataIconWidth: noDataIconWidth }, { children: noDataIcon })), (0, jsx_runtime_1.jsx)(styles_1.DataGridNoDataFigcaption, __assign({ component: "figcaption", variant: "h4" }, { children: title }))] }) }));
|
|
21
|
+
};
|
|
22
|
+
exports.DataGridNoData = DataGridNoData;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './DataGridNoData';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./DataGridNoData"), exports);
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { TypographyProps } from '../../Typography';
|
|
3
|
+
export declare const DataGridNoDataWrapper: import("@emotion/styled").StyledComponent<{
|
|
4
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
5
|
+
as?: import("react").ElementType<any> | undefined;
|
|
6
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>, {}>;
|
|
7
|
+
export declare const DataGridNoDataFigure: import("@emotion/styled").StyledComponent<{
|
|
8
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
9
|
+
as?: import("react").ElementType<any> | undefined;
|
|
10
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, {}>;
|
|
11
|
+
export declare const DataGridNoDataIcon: import("@emotion/styled").StyledComponent<{
|
|
12
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
13
|
+
as?: import("react").ElementType<any> | undefined;
|
|
14
|
+
} & {
|
|
15
|
+
noDataIconWidth: number;
|
|
16
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
17
|
+
export declare const DataGridNoDataFigcaption: import("@emotion/styled").StyledComponent<Pick<TypographyProps, string | number | symbol> & import("react").RefAttributes<HTMLElement> & {
|
|
18
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
19
|
+
} & Omit<import("@mui/material/OverridableComponent").OverrideProps<import("@mui/material").TypographyTypeMap<{}, "span">, import("react").ElementType<any>>, "color" | "variant"> & {
|
|
20
|
+
variant?: import("@mui/material").TypographyVariant | keyof import("@mui/material").TypographyPropsVariantOverrides | undefined;
|
|
21
|
+
component?: import("react").ElementType<any> | undefined;
|
|
22
|
+
color?: "primary" | "secondary" | "error" | "warning" | "info" | "success" | "text" | "textSecondary" | ((theme: import("@mui/material").Theme) => string) | undefined;
|
|
23
|
+
}, {}, {}>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
+
return cooked;
|
|
5
|
+
};
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.DataGridNoDataFigcaption = exports.DataGridNoDataIcon = exports.DataGridNoDataFigure = exports.DataGridNoDataWrapper = void 0;
|
|
8
|
+
var Typography_1 = require("../../Typography");
|
|
9
|
+
var styles_1 = require("../../styles");
|
|
10
|
+
exports.DataGridNoDataWrapper = styles_1.styled.tr(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: sticky;\n top: 50%;\n left: 50%;\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n transform: translate(-50%, -50%);\n"], ["\n position: sticky;\n top: 50%;\n left: 50%;\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n transform: translate(-50%, -50%);\n"])));
|
|
11
|
+
exports.DataGridNoDataFigure = styles_1.styled.figure(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n position: absolute;\n\n display: flex;\n flex-direction: column;\n align-items: center;\n"], ["\n position: absolute;\n\n display: flex;\n flex-direction: column;\n align-items: center;\n"])));
|
|
12
|
+
exports.DataGridNoDataIcon = styles_1.styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n svg {\n width: ", ";\n height: auto;\n }\n"], ["\n svg {\n width: ", ";\n height: auto;\n }\n"])), function (_a) {
|
|
13
|
+
var noDataIconWidth = _a.noDataIconWidth;
|
|
14
|
+
return "".concat(noDataIconWidth, "px");
|
|
15
|
+
});
|
|
16
|
+
exports.DataGridNoDataFigcaption = (0, styles_1.styled)(Typography_1.Typography)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n color: ", ";\n"], ["\n color: ", ";\n"])), function (_a) {
|
|
17
|
+
var theme = _a.theme;
|
|
18
|
+
return theme.palette.grey[600];
|
|
19
|
+
});
|
|
20
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ElementType } from 'react';
|
|
2
2
|
import { ListItemButtonProps as MuiListItemButtonProps } from '@mui/material/ListItemButton/ListItemButton';
|
|
3
3
|
export declare type ListItemButtonProps = Omit<MuiListItemButtonProps, 'disableRipple'> & {
|
|
4
|
-
component
|
|
4
|
+
component?: ElementType;
|
|
5
5
|
};
|
|
6
6
|
export declare const ListItemButton: import("react").ForwardRefExoticComponent<Pick<ListItemButtonProps, "disabled" | "action" | "alignItems" | "color" | "translate" | "divider" | "onFocusVisible" | "tabIndex" | "children" | "className" | "slot" | "style" | "title" | "key" | "css" | "autoFocus" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "component" | "selected" | "classes" | "centerRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "sx" | "TouchRippleProps" | "touchRippleRef" | "dense" | "disableGutters"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -16,5 +16,5 @@ var jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
16
16
|
var react_1 = require("react");
|
|
17
17
|
var material_1 = require("@mui/material");
|
|
18
18
|
exports.ListItemButton = (0, react_1.forwardRef)(function (props, ref) {
|
|
19
|
-
return (0, jsx_runtime_1.jsx)(material_1.ListItemButton, __assign({ ref: ref }, props, { disableRipple: true }));
|
|
19
|
+
return ((0, jsx_runtime_1.jsx)(material_1.ListItemButton, __assign({ ref: ref, component: "div" }, props, { disableRipple: true })));
|
|
20
20
|
});
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { AutocompleteCloseReason } from '@mui/base/AutocompleteUnstyled/useAutocomplete';
|
|
1
2
|
declare type PopId = string;
|
|
2
|
-
export declare type Reason = 'escapeKeyDown' | 'backdropClick' | 'toggleInput' | 'blur' | null;
|
|
3
|
+
export declare type Reason = 'escapeKeyDown' | 'backdropClick' | 'toggleInput' | 'blur' | AutocompleteCloseReason | null;
|
|
3
4
|
declare class BackdropStackManager {
|
|
4
5
|
private stack;
|
|
5
6
|
private previousPopInfo;
|
|
@@ -47,6 +47,11 @@ export declare type DataGridProps<Data extends object = DataGridRow, SortField e
|
|
|
47
47
|
* Компонент кастомного футера (н-р Pagination)
|
|
48
48
|
*/
|
|
49
49
|
Footer?: ReactNode;
|
|
50
|
+
/**
|
|
51
|
+
* @example <DataGrid noDataPlaceholder={<DataGridNoData />} />
|
|
52
|
+
* Используется для отображения placeholder при отсутствии данных в таблице
|
|
53
|
+
*/
|
|
54
|
+
noDataPlaceholder?: ReactNode;
|
|
50
55
|
/**
|
|
51
56
|
* @example <DataGrid maxHeight={900} />
|
|
52
57
|
* Максимальная высота для таблицы
|
|
@@ -70,4 +75,4 @@ export declare type DataGridProps<Data extends object = DataGridRow, SortField e
|
|
|
70
75
|
*/
|
|
71
76
|
minDisplayRows?: number;
|
|
72
77
|
};
|
|
73
|
-
export declare function DataGrid<Data extends object = DataGridRow, SortField extends keyof Data = keyof Data>({ columns, rows, selectedRows, sorting, maxHeight, minDisplayRows, onRowClick, onSelectRow, Footer, loading, onSort, keyId, emptyCellValue, }: DataGridProps<Data, SortField>): JSX.Element;
|
|
78
|
+
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, }: DataGridProps<Data, SortField>): JSX.Element;
|
package/esm/DataGrid/DataGrid.js
CHANGED
|
@@ -24,9 +24,10 @@ import { Table } from '../Table';
|
|
|
24
24
|
import { DataGridHead } from './DataGridHead';
|
|
25
25
|
import { DataGridBody } from './DataGridBody';
|
|
26
26
|
import DataGridLoader from './DataGridLoader/DataGridLoader';
|
|
27
|
+
import { DataGridNoData } from './DataGridNoData';
|
|
27
28
|
import { DataGridContainer, StyledTableContainer } from './styles';
|
|
28
29
|
export function DataGrid(_a) {
|
|
29
|
-
var columns = _a.columns, _b = _a.rows, rows = _b === void 0 ? [] : _b, _c = _a.selectedRows, selectedRows = _c === void 0 ? [] : _c, sorting = _a.sorting, maxHeight = _a.maxHeight, _d = _a.minDisplayRows, minDisplayRows = _d === void 0 ? 10 : _d, onRowClick = _a.onRowClick, onSelectRow = _a.onSelectRow, Footer = _a.Footer, loading = _a.loading, onSort = _a.onSort, keyId = _a.keyId, emptyCellValue = _a.emptyCellValue;
|
|
30
|
+
var columns = _a.columns, _b = _a.rows, rows = _b === void 0 ? [] : _b, _c = _a.selectedRows, selectedRows = _c === void 0 ? [] : _c, sorting = _a.sorting, maxHeight = _a.maxHeight, _d = _a.minDisplayRows, minDisplayRows = _d === void 0 ? 10 : _d, onRowClick = _a.onRowClick, onSelectRow = _a.onSelectRow, Footer = _a.Footer, noDataPlaceholder = _a.noDataPlaceholder, loading = _a.loading, onSort = _a.onSort, keyId = _a.keyId, emptyCellValue = _a.emptyCellValue;
|
|
30
31
|
var selectable = Boolean(onSelectRow);
|
|
31
32
|
var handleSelectAllRows = function (event) {
|
|
32
33
|
if (!onSelectRow) {
|
|
@@ -55,5 +56,11 @@ export function DataGrid(_a) {
|
|
|
55
56
|
return !selectedRows.find(function (selectedRow) { return selectedRow[keyId] === row[keyId]; });
|
|
56
57
|
}).length;
|
|
57
58
|
}, [rows, selectedRows, keyId]);
|
|
58
|
-
|
|
59
|
+
var renderedPlaceholder = useCallback(function () {
|
|
60
|
+
if (!loading) {
|
|
61
|
+
return noDataPlaceholder || _jsx(DataGridNoData, {});
|
|
62
|
+
}
|
|
63
|
+
return null;
|
|
64
|
+
}, [noDataPlaceholder, loading]);
|
|
65
|
+
return (_jsxs(DataGridContainer, { children: [_jsxs(StyledTableContainer, __assign({ maxHeight: maxHeight }, { children: [_jsxs(Table, __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, { loading: loading })] })), rows.length ? Footer : null] }));
|
|
59
66
|
}
|
|
@@ -10,5 +10,6 @@ export declare type DataGridBodyProps<Data> = {
|
|
|
10
10
|
onSelectRow: (row: Data) => (event: ChangeEvent<HTMLInputElement>) => void;
|
|
11
11
|
minDisplayRows: number;
|
|
12
12
|
emptyCellValue?: ReactNode;
|
|
13
|
+
noDataPlaceholder?: ReactNode;
|
|
13
14
|
};
|
|
14
|
-
export declare function DataGridBody<Data>({ rows, columns, selectable, onRowClick, onSelectRow, selectedRows, minDisplayRows, keyId, emptyCellValue, }: DataGridBodyProps<Data>): JSX.Element;
|
|
15
|
+
export declare function DataGridBody<Data>({ rows, columns, selectable, onRowClick, onSelectRow, selectedRows, minDisplayRows, keyId, emptyCellValue, noDataPlaceholder, }: DataGridBodyProps<Data>): JSX.Element;
|
|
@@ -16,7 +16,7 @@ import { DataGridCell } from '../DataGridCell';
|
|
|
16
16
|
import { Checkbox } from '../../Checkbox';
|
|
17
17
|
import { StyledTableBody } from './styles';
|
|
18
18
|
export function DataGridBody(_a) {
|
|
19
|
-
var rows = _a.rows, columns = _a.columns, selectable = _a.selectable, onRowClick = _a.onRowClick, onSelectRow = _a.onSelectRow, _b = _a.selectedRows, selectedRows = _b === void 0 ? [] : _b, minDisplayRows = _a.minDisplayRows, keyId = _a.keyId, emptyCellValue = _a.emptyCellValue;
|
|
19
|
+
var rows = _a.rows, columns = _a.columns, selectable = _a.selectable, onRowClick = _a.onRowClick, onSelectRow = _a.onSelectRow, _b = _a.selectedRows, selectedRows = _b === void 0 ? [] : _b, minDisplayRows = _a.minDisplayRows, keyId = _a.keyId, emptyCellValue = _a.emptyCellValue, noDataPlaceholder = _a.noDataPlaceholder;
|
|
20
20
|
var renderCells = useCallback(function (row, rowId) {
|
|
21
21
|
return columns.map(function (cell, index) {
|
|
22
22
|
var cellId = "".concat(rowId, "-").concat(index);
|
|
@@ -36,5 +36,5 @@ export function DataGridBody(_a) {
|
|
|
36
36
|
return (_jsxs(TableRow, __assign({ hover: Boolean(onRowClick), onClick: handleRowClick(row) }, { children: [selectable && (_jsx(TableCell, __assign({ padding: "checkbox", onClick: function (event) { return event.stopPropagation(); } }, { children: _jsx(Checkbox, { checked: checked, onChange: onSelectRow(row) }) }))), renderCells(row, rowId)] }), rowId));
|
|
37
37
|
});
|
|
38
38
|
}, [rows, keyId, selectable, selectedRows, onSelectRow, onRowClick, columns]);
|
|
39
|
-
return (_jsx(StyledTableBody, __assign({ empty: !rows.length, minDisplayRows: minDisplayRows }, { children: renderedRows })));
|
|
39
|
+
return (_jsx(StyledTableBody, __assign({ empty: !rows.length, minDisplayRows: minDisplayRows }, { children: rows.length ? renderedRows : noDataPlaceholder })));
|
|
40
40
|
}
|
|
@@ -7,7 +7,7 @@ import { TableBody } from '../../Table';
|
|
|
7
7
|
var TABLE_ROW_HEIGHT = 44;
|
|
8
8
|
export var StyledTableBody = styled(TableBody, {
|
|
9
9
|
shouldForwardProp: function (prop) { return prop !== 'empty' && prop !== 'minDisplayRows'; },
|
|
10
|
-
})(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n height: ", ";\n"], ["\n height: ", ";\n"])), function (_a) {
|
|
10
|
+
})(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: relative;\n\n height: ", ";\n"], ["\n position: relative;\n\n height: ", ";\n"])), function (_a) {
|
|
11
11
|
var empty = _a.empty, minDisplayRows = _a.minDisplayRows;
|
|
12
12
|
return empty ? "".concat(TABLE_ROW_HEIGHT * minDisplayRows, "px") : 'auto';
|
|
13
13
|
});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export declare type DataGridNoDataProps = {
|
|
3
|
+
/**
|
|
4
|
+
* @default 'Нет данных'
|
|
5
|
+
* @example <DataGridNoData title='Нет данных' />
|
|
6
|
+
* @description Заголовок
|
|
7
|
+
*/
|
|
8
|
+
title?: string;
|
|
9
|
+
/**
|
|
10
|
+
* @default BaseNoDataIcon()
|
|
11
|
+
* @example <DataGridNoData noDataIcon={BaseNoDataIcon()} />
|
|
12
|
+
* @description Иконка
|
|
13
|
+
*/
|
|
14
|
+
noDataIcon?: ReactNode;
|
|
15
|
+
/**
|
|
16
|
+
* @default 250
|
|
17
|
+
* @example <DataGridNoData noDataIconWidth={250} />
|
|
18
|
+
* @description Ширина иконки (высота рассчитывается пропорционально ширине)
|
|
19
|
+
*/
|
|
20
|
+
noDataIconWidth?: number;
|
|
21
|
+
};
|
|
22
|
+
export declare const DataGridNoData: ({ title, noDataIcon, noDataIconWidth, }: DataGridNoDataProps) => JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import { DataGridNoDataFigcaption, DataGridNoDataFigure, DataGridNoDataIcon, DataGridNoDataWrapper, } from './styles';
|
|
14
|
+
var BaseNoDataIcon = function () { return (_jsxs("svg", __assign({ viewBox: "0 0 124 124", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: [_jsx("path", { fill: "#EBEEF1", stroke: "#B7C2CE", d: "M106.5 62a43.5 43.5 0 1 1-87 0 43.5 43.5 0 0 1 87 0Z" }), _jsx("path", { fill: "#B7C2CE", fillRule: "evenodd", d: "m48.3 74 22.5-44.7a5.3 5.3 0 0 1 7-2.3l23.7 12a5 5 0 0 1 2.7 3l4.7 14.8c.4 1.3.3 2.7-.3 4L91 95.4a5.3 5.3 0 0 1-7.1 2.3L50.6 81a5.3 5.3 0 0 1-2.3-7Zm.9.4 22.5-44.6c1-2.1 3.6-3 5.7-1.9l23.7 12c.7.3 1.2.8 1.6 1.4l-3.3 6.5a5.3 5.3 0 0 0 2.4 7l6.3 3.3c0 .7 0 1.5-.4 2.2L90.2 95a4.4 4.4 0 0 1-5.8 1.8L51.1 80.1c-2.1-1-3-3.6-2-5.7Z", clipRule: "evenodd" }), _jsx("path", { fill: "#fff", d: "M71.7 29.8 49.2 74.4c-1 2-.2 4.7 1.9 5.7L84.4 97c2.1 1.1 4.7.3 5.8-1.8l17.5-34.8c.3-.7.5-1.5.4-2.2l-6.3-3.2a5.3 5.3 0 0 1-2.4-7l3.3-6.6c-.4-.6-1-1.1-1.6-1.4L77.4 28c-2.1-1-4.7-.2-5.7 1.9Z" }), _jsx("path", { fill: "#B7C2CE", fillRule: "evenodd", d: "M77 33.9c.1-.4.6-.5 1-.3l17.5 8.8a.7.7 0 0 1-.6 1.3l-17.6-8.9a.7.7 0 0 1-.3-1Zm-2.4 4.6c.2-.3.6-.5 1-.3l6.1 3.1a.7.7 0 0 1-.6 1.3l-6.2-3.1a.7.7 0 0 1-.3-1Z", clipRule: "evenodd" }), _jsx("path", { stroke: "#B7C2CE", strokeLinecap: "round", strokeWidth: "2.1", d: "m57.1 74 5.6 2.8m4.6 2.3 2.4 1.2" }), _jsx("path", { fill: "#B7C2CE", fillRule: "evenodd", d: "M67.8 50.5a2.6 2.6 0 0 1 3.5-1.1l25.5 12.8c1.3.6 1.8 2.2 1.1 3.5l-7.5 15a2.6 2.6 0 0 1-3.6 1.2L61.4 69a2.6 2.6 0 0 1-1.2-3.5l7.6-15Zm3-.3 25.5 12.9c.8.4 1.2 1.4.7 2.2l-1 2.3-28.5-14.3 1.2-2.3c.4-.8 1.4-1.2 2.2-.8Zm-3.7 4-1.8 3.5L93.6 72l1.9-3.6L67 54.1Zm26.1 18.7L64.8 58.6 62.6 63l28.3 14.3 2.3-4.4Zm-2.6 5.3h-.2L62.2 63.8l-1 2c-.5.9-.2 1.8.6 2.3L87.3 81c.8.4 1.8 0 2.2-.7l1-2.1Z", clipRule: "evenodd" }), _jsx("path", { fill: "#fff", d: "M41.1 30.7c.7-.3 1.4-.5 2.1-.5l3.7 6.3a5.3 5.3 0 0 0 7.2 2l6.1-3.7c.7.4 1.2 1 1.6 1.6l19.5 33.7c1.2 2 .5 4.7-1.6 5.9L47.4 94.6c-2 1.2-4.7.5-5.9-1.5l-25-43.3c-1.1-2-.4-4.6 1.6-5.8l23-13.3Z" }), _jsx("path", { fill: "#B7C2CE", fillRule: "evenodd", d: "M61.2 34.3c-.5-.4-1-.7-1.7-.8l-14.8-4.1a5.3 5.3 0 0 0-4 .5L17.6 43a5.3 5.3 0 0 0-2 7.2l25 43.3a5.3 5.3 0 0 0 7.2 2l32.3-18.8a5.3 5.3 0 0 0 2-7.2L62.7 36c-.4-.6-.9-1.2-1.5-1.6Zm-18-4.1c-.7 0-1.4.2-2 .5L18.1 44a4.3 4.3 0 0 0-1.6 5.8l25 43.3c1.1 2 3.7 2.7 5.8 1.5L79.7 76c2-1.2 2.8-3.8 1.6-5.9L61.8 36.4c-.4-.7-.9-1.2-1.6-1.6l-6.1 3.6a5.3 5.3 0 0 1-7.2-2l-3.7-6.2Z", clipRule: "evenodd" }), _jsx("path", { fill: "#B7C2CE", fillRule: "evenodd", d: "M23 47.8c-.2-.4-.2-1 .2-1.1l17-9.9c.4-.2.8 0 1.1.5.3.4.2 1-.1 1.1l-17 9.9c-.4.2-1 0-1.2-.5Zm2.6 4.5c-.2-.4-.2-1 .2-1.1l6-3.5c.3-.2.8 0 1 .5.3.4.2 1-.1 1.2l-6 3.4c-.3.2-.8 0-1-.5ZM45 87.2c-.2-.2-.1-.5.1-.6l6.4-3.7a.5.5 0 0 1 .5.8l-6.4 3.7c-.2.1-.5 0-.7-.2Zm9.8-5.7c-.1-.2 0-.5.2-.6l3.3-2c.2 0 .5 0 .6.2.1.3 0 .6-.2.7l-3.3 1.9c-.2.1-.5 0-.6-.2Zm-23-17.1a2.6 2.6 0 0 1 1-3.6l26.4-15.2c1.3-.8 2.9-.3 3.6 1L71.2 61c.7 1.2.3 2.8-1 3.6L43.8 79.9c-1.3.8-2.9.3-3.6-1l-8.4-14.5Zm1.5-2.7 26.4-15.3c.8-.4 1.8-.1 2.2.6l8.4 14.6c.5.8.2 1.8-.6 2.2L43.3 79.1c-.8.4-1.8.2-2.2-.6l-1.2-2 29.3-17-.5-.8-29.3 16.9-2.5-4.3 29.3-16.9-.5-.9-29.3 17-2-3.5 29.3-17-.5-.8-29.3 17-1.2-2.3c-.5-.7-.2-1.7.6-2.2Z", clipRule: "evenodd" }), _jsx("path", { fill: "#fff", d: "M34.7 30.1v64.1c0 3 2.4 5.4 5.4 5.4h45.4c3 0 5.4-2.4 5.4-5.4v-50c0-.6-.1-1.2-.3-1.7h-9.2A6.4 6.4 0 0 1 75 36V25.4c-.8-.4-1.8-.7-2.7-.7H40c-3 0-5.4 2.4-5.4 5.4Z" }), _jsx("path", { fill: "#B7C2CE", fillRule: "evenodd", d: "M75 24.3c-.9-.4-1.8-.6-2.7-.6H40a6.4 6.4 0 0 0-6.4 6.4v64.1c0 3.6 2.9 6.4 6.4 6.4h45.4c3.5 0 6.4-2.8 6.4-6.4v-50a6.4 6.4 0 0 0-1.8-4.4l-13-14a6.4 6.4 0 0 0-2-1.5Zm-40.3 70V30c0-3 2.4-5.4 5.4-5.4h32.2c1 0 1.9.3 2.7.7V36c0 3.5 2.9 6.4 6.4 6.4h9.2c.2.5.3 1 .3 1.7v50c0 3-2.4 5.4-5.4 5.4H40c-3 0-5.4-2.4-5.4-5.4Z", clipRule: "evenodd" }), _jsx("path", { fill: "#B7C2CE", fillRule: "evenodd", d: "M43 34c0-.5.5-1 1-1h20.7c.5 0 1 .5 1 1s-.5 1-1 1H44a1 1 0 0 1-1-1Zm0 3.8c0-.5.5-1 1-1h7.6c.5 0 .9.5.9 1s-.4 1-.9 1H44a1 1 0 0 1-1-1Zm-.8 52c0-.2.1-.4.4-.4H52c.3 0 .5.2.5.4 0 .3-.2.5-.5.5h-9.4c-.3 0-.4-.2-.4-.5Zm14 0c0-.2.2-.4.5-.4h4.7c.3 0 .5.2.5.4 0 .3-.2.5-.5.5h-4.7c-.3 0-.5-.2-.5-.5Zm-15-34.9c0-1.2 1-2.1 2.1-2.1h39c1.1 0 2 1 2 2v24a2 2 0 0 1-2 2.1h-39a2 2 0 0 1-2-2v-24Zm2.1-1.1h39c.6 0 1 .5 1 1v4.6h-41V55c0-.6.4-1.1 1-1.1Zm-1 20.6v4.4c0 .6.4 1.1 1 1.1h39c.6 0 1-.5 1-1v-4.5h-41Zm41-1h-41V67h41v6.6Zm0-13.1V66h-41v-5.7h41Z", clipRule: "evenodd" }), _jsx("circle", { cx: "19.8", cy: "35.9", r: "2", fill: "#F0F4F7" }), _jsx("circle", { cx: "101.2", cy: "28.3", r: "2.7", fill: "#F0F4F7" }), _jsx("circle", { cx: "29.5", cy: "98.4", r: "1.9", fill: "#DDE2E8" }), _jsx("circle", { cx: "24.3", cy: "29.7", r: "1.3", fill: "#DDE2E8" }), _jsx("circle", { cx: "96.7", cy: "23.1", r: "1.3", fill: "#DDE2E8" }), _jsx("circle", { cx: "103.9", cy: "86.3", r: "1.3", fill: "#EBEEF1" })] }))); };
|
|
15
|
+
export var DataGridNoData = function (_a) {
|
|
16
|
+
var _b = _a.title, title = _b === void 0 ? 'Нет данных' : _b, _c = _a.noDataIcon, noDataIcon = _c === void 0 ? BaseNoDataIcon() : _c, _d = _a.noDataIconWidth, noDataIconWidth = _d === void 0 ? 250 : _d;
|
|
17
|
+
return (_jsx(DataGridNoDataWrapper, { children: _jsxs(DataGridNoDataFigure, { children: [_jsx(DataGridNoDataIcon, __assign({ noDataIconWidth: noDataIconWidth }, { children: noDataIcon })), _jsx(DataGridNoDataFigcaption, __assign({ component: "figcaption", variant: "h4" }, { children: title }))] }) }));
|
|
18
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './DataGridNoData';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './DataGridNoData';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { TypographyProps } from '../../Typography';
|
|
3
|
+
export declare const DataGridNoDataWrapper: import("@emotion/styled").StyledComponent<{
|
|
4
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
5
|
+
as?: import("react").ElementType<any> | undefined;
|
|
6
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>, {}>;
|
|
7
|
+
export declare const DataGridNoDataFigure: import("@emotion/styled").StyledComponent<{
|
|
8
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
9
|
+
as?: import("react").ElementType<any> | undefined;
|
|
10
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, {}>;
|
|
11
|
+
export declare const DataGridNoDataIcon: import("@emotion/styled").StyledComponent<{
|
|
12
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
13
|
+
as?: import("react").ElementType<any> | undefined;
|
|
14
|
+
} & {
|
|
15
|
+
noDataIconWidth: number;
|
|
16
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
17
|
+
export declare const DataGridNoDataFigcaption: import("@emotion/styled").StyledComponent<Pick<TypographyProps, string | number | symbol> & import("react").RefAttributes<HTMLElement> & {
|
|
18
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
19
|
+
} & Omit<import("@mui/material/OverridableComponent").OverrideProps<import("@mui/material").TypographyTypeMap<{}, "span">, import("react").ElementType<any>>, "color" | "variant"> & {
|
|
20
|
+
variant?: import("@mui/material").TypographyVariant | keyof import("@mui/material").TypographyPropsVariantOverrides | undefined;
|
|
21
|
+
component?: import("react").ElementType<any> | undefined;
|
|
22
|
+
color?: "primary" | "secondary" | "error" | "warning" | "info" | "success" | "text" | "textSecondary" | ((theme: import("@mui/material").Theme) => string) | undefined;
|
|
23
|
+
}, {}, {}>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
2
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
|
+
return cooked;
|
|
4
|
+
};
|
|
5
|
+
import { Typography } from '../../Typography';
|
|
6
|
+
import { styled } from '../../styles';
|
|
7
|
+
export var DataGridNoDataWrapper = styled.tr(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: sticky;\n top: 50%;\n left: 50%;\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n transform: translate(-50%, -50%);\n"], ["\n position: sticky;\n top: 50%;\n left: 50%;\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n transform: translate(-50%, -50%);\n"])));
|
|
8
|
+
export var DataGridNoDataFigure = styled.figure(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n position: absolute;\n\n display: flex;\n flex-direction: column;\n align-items: center;\n"], ["\n position: absolute;\n\n display: flex;\n flex-direction: column;\n align-items: center;\n"])));
|
|
9
|
+
export var DataGridNoDataIcon = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n svg {\n width: ", ";\n height: auto;\n }\n"], ["\n svg {\n width: ", ";\n height: auto;\n }\n"])), function (_a) {
|
|
10
|
+
var noDataIconWidth = _a.noDataIconWidth;
|
|
11
|
+
return "".concat(noDataIconWidth, "px");
|
|
12
|
+
});
|
|
13
|
+
export var DataGridNoDataFigcaption = styled(Typography)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n color: ", ";\n"], ["\n color: ", ";\n"])), function (_a) {
|
|
14
|
+
var theme = _a.theme;
|
|
15
|
+
return theme.palette.grey[600];
|
|
16
|
+
});
|
|
17
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ElementType } from 'react';
|
|
2
2
|
import { ListItemButtonProps as MuiListItemButtonProps } from '@mui/material/ListItemButton/ListItemButton';
|
|
3
3
|
export declare type ListItemButtonProps = Omit<MuiListItemButtonProps, 'disableRipple'> & {
|
|
4
|
-
component
|
|
4
|
+
component?: ElementType;
|
|
5
5
|
};
|
|
6
6
|
export declare const ListItemButton: import("react").ForwardRefExoticComponent<Pick<ListItemButtonProps, "disabled" | "action" | "alignItems" | "color" | "translate" | "divider" | "onFocusVisible" | "tabIndex" | "children" | "className" | "slot" | "style" | "title" | "key" | "css" | "autoFocus" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "component" | "selected" | "classes" | "centerRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "sx" | "TouchRippleProps" | "touchRippleRef" | "dense" | "disableGutters"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -13,5 +13,5 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
13
13
|
import { forwardRef } from 'react';
|
|
14
14
|
import { ListItemButton as MuiListItemButton } from '@mui/material';
|
|
15
15
|
export var ListItemButton = forwardRef(function (props, ref) {
|
|
16
|
-
return _jsx(MuiListItemButton, __assign({ ref: ref }, props, { disableRipple: true }));
|
|
16
|
+
return (_jsx(MuiListItemButton, __assign({ ref: ref, component: "div" }, props, { disableRipple: true })));
|
|
17
17
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astral/ui",
|
|
3
|
-
"version": "1.13.0",
|
|
4
3
|
"browser": "./src/index.ts",
|
|
5
4
|
"jest": {
|
|
6
5
|
"moduleNameMapper": {
|
|
@@ -8,7 +7,7 @@
|
|
|
8
7
|
}
|
|
9
8
|
},
|
|
10
9
|
"dependencies": {
|
|
11
|
-
"@astral/icons": "^1.
|
|
10
|
+
"@astral/icons": "^1.14.0",
|
|
12
11
|
"@emotion/cache": "11.7.1",
|
|
13
12
|
"@emotion/react": "11.9.0",
|
|
14
13
|
"@emotion/server": "11.4.0",
|
|
@@ -37,6 +36,7 @@
|
|
|
37
36
|
"require": "./server/index.js"
|
|
38
37
|
}
|
|
39
38
|
},
|
|
39
|
+
"version": "1.14.0",
|
|
40
40
|
"author": "Astral.Soft",
|
|
41
41
|
"license": "MIT",
|
|
42
42
|
"repository": {
|