neue Homepage auf react basis

This commit is contained in:
2026-08-07 21:39:30 +02:00
parent 164bdd19ad
commit ee89442c04
52191 changed files with 1230242 additions and 58 deletions
+100
View File
@@ -0,0 +1,100 @@
import type { AutocompleteProps } from '@mui/material/Autocomplete';
import type { BadgeProps } from '@mui/material/Badge';
import type { CheckboxProps } from '@mui/material/Checkbox';
import type { ChipProps } from '@mui/material/Chip';
import type { CircularProgressProps } from '@mui/material/CircularProgress';
import type { DividerProps } from '@mui/material/Divider';
import type { LinearProgressProps } from '@mui/material/LinearProgress';
import type { MenuListProps } from '@mui/material/MenuList';
import type { MenuItemProps } from '@mui/material/MenuItem';
import type { ModalProps } from '@mui/material/Modal';
import type { TextFieldProps } from '@mui/material/TextField';
import type { SwitchProps } from '@mui/material/Switch';
import type { ButtonProps } from '@mui/material/Button';
import type { IconButtonProps } from '@mui/material/IconButton';
import type { TablePaginationProps } from '@mui/material/TablePagination';
import type { PopperProps } from '@mui/material/Popper';
import type { TooltipProps } from '@mui/material/Tooltip';
import type { InputProps } from '@mui/material/Input';
import type { TextareaAutosizeProps } from '@mui/material/TextareaAutosize';
import type { SelectProps } from '@mui/material/Select';
import type { SkeletonProps } from '@mui/material/Skeleton';
import type { ToggleButtonProps } from '@mui/material/ToggleButton';
import type { TabsProps } from '@mui/material/Tabs';
declare module '@mui/x-data-grid' {
interface BaseAutocompletePropsOverrides {
material?: Partial<AutocompleteProps<string, true, false, true>>;
}
interface BaseBadgePropsOverrides {
material?: Partial<BadgeProps>;
}
interface BaseCheckboxPropsOverrides {
material?: Partial<CheckboxProps>;
}
interface RowCheckboxPropsOverrides {
material?: Partial<CheckboxProps>;
}
interface BaseChipPropsOverrides {
material?: Partial<ChipProps>;
}
interface BaseCircularProgressPropsOverrides {
material?: Partial<CircularProgressProps>;
}
interface BaseDividerPropsOverrides {
material?: Partial<DividerProps>;
}
interface BaseLinearProgressPropsOverrides {
material?: Partial<LinearProgressProps>;
}
interface BaseMenuListPropsOverrides {
material?: Partial<MenuListProps>;
}
interface BaseMenuItemPropsOverrides {
material?: Partial<MenuItemProps>;
}
interface BaseModalPropsOverrides {
material?: Partial<ModalProps>;
}
interface BaseTextFieldPropsOverrides {
material?: Partial<TextFieldProps>;
}
interface BaseSwitchPropsOverrides {
material?: Partial<SwitchProps>;
}
interface BaseButtonPropsOverrides {
material?: Partial<ButtonProps>;
}
interface BaseToggleButtonPropsOverrides {
material?: Partial<ToggleButtonProps>;
}
interface BaseTabsPropsOverrides {
material?: Partial<TabsProps>;
}
interface BaseIconButtonPropsOverrides {
material?: Partial<IconButtonProps>;
}
interface BasePaginationPropsOverrides {
material?: Partial<TablePaginationProps>;
}
interface BasePopperPropsOverrides {
material?: Partial<PopperProps>;
}
interface BaseTooltipPropsOverrides {
material?: Partial<TooltipProps>;
}
interface BaseInputPropsOverrides {
material?: Partial<InputProps>;
}
interface BaseTextareaPropsOverrides {
material?: Partial<TextareaAutosizeProps>;
}
interface BaseSelectPropsOverrides {
material?: Partial<SelectProps>;
}
interface BaseSkeletonPropsOverrides {
material?: Partial<SkeletonProps>;
}
interface BaseChipPropsOverrides {
material?: Partial<ChipProps>;
}
}
+100
View File
@@ -0,0 +1,100 @@
import type { AutocompleteProps } from '@mui/material/Autocomplete';
import type { BadgeProps } from '@mui/material/Badge';
import type { CheckboxProps } from '@mui/material/Checkbox';
import type { ChipProps } from '@mui/material/Chip';
import type { CircularProgressProps } from '@mui/material/CircularProgress';
import type { DividerProps } from '@mui/material/Divider';
import type { LinearProgressProps } from '@mui/material/LinearProgress';
import type { MenuListProps } from '@mui/material/MenuList';
import type { MenuItemProps } from '@mui/material/MenuItem';
import type { ModalProps } from '@mui/material/Modal';
import type { TextFieldProps } from '@mui/material/TextField';
import type { SwitchProps } from '@mui/material/Switch';
import type { ButtonProps } from '@mui/material/Button';
import type { IconButtonProps } from '@mui/material/IconButton';
import type { TablePaginationProps } from '@mui/material/TablePagination';
import type { PopperProps } from '@mui/material/Popper';
import type { TooltipProps } from '@mui/material/Tooltip';
import type { InputProps } from '@mui/material/Input';
import type { TextareaAutosizeProps } from '@mui/material/TextareaAutosize';
import type { SelectProps } from '@mui/material/Select';
import type { SkeletonProps } from '@mui/material/Skeleton';
import type { ToggleButtonProps } from '@mui/material/ToggleButton';
import type { TabsProps } from '@mui/material/Tabs';
declare module '@mui/x-data-grid' {
interface BaseAutocompletePropsOverrides {
material?: Partial<AutocompleteProps<string, true, false, true>>;
}
interface BaseBadgePropsOverrides {
material?: Partial<BadgeProps>;
}
interface BaseCheckboxPropsOverrides {
material?: Partial<CheckboxProps>;
}
interface RowCheckboxPropsOverrides {
material?: Partial<CheckboxProps>;
}
interface BaseChipPropsOverrides {
material?: Partial<ChipProps>;
}
interface BaseCircularProgressPropsOverrides {
material?: Partial<CircularProgressProps>;
}
interface BaseDividerPropsOverrides {
material?: Partial<DividerProps>;
}
interface BaseLinearProgressPropsOverrides {
material?: Partial<LinearProgressProps>;
}
interface BaseMenuListPropsOverrides {
material?: Partial<MenuListProps>;
}
interface BaseMenuItemPropsOverrides {
material?: Partial<MenuItemProps>;
}
interface BaseModalPropsOverrides {
material?: Partial<ModalProps>;
}
interface BaseTextFieldPropsOverrides {
material?: Partial<TextFieldProps>;
}
interface BaseSwitchPropsOverrides {
material?: Partial<SwitchProps>;
}
interface BaseButtonPropsOverrides {
material?: Partial<ButtonProps>;
}
interface BaseToggleButtonPropsOverrides {
material?: Partial<ToggleButtonProps>;
}
interface BaseTabsPropsOverrides {
material?: Partial<TabsProps>;
}
interface BaseIconButtonPropsOverrides {
material?: Partial<IconButtonProps>;
}
interface BasePaginationPropsOverrides {
material?: Partial<TablePaginationProps>;
}
interface BasePopperPropsOverrides {
material?: Partial<PopperProps>;
}
interface BaseTooltipPropsOverrides {
material?: Partial<TooltipProps>;
}
interface BaseInputPropsOverrides {
material?: Partial<InputProps>;
}
interface BaseTextareaPropsOverrides {
material?: Partial<TextareaAutosizeProps>;
}
interface BaseSelectPropsOverrides {
material?: Partial<SelectProps>;
}
interface BaseSkeletonPropsOverrides {
material?: Partial<SkeletonProps>;
}
interface BaseChipPropsOverrides {
material?: Partial<ChipProps>;
}
}
+5
View File
@@ -0,0 +1,5 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
+1
View File
@@ -0,0 +1 @@
export {};
@@ -0,0 +1,2 @@
import type { GridBaseIconProps } from "../../models/gridSlotsComponentsProps.mjs";
export declare const createSvgIcon: (path: React.ReactNode, displayName?: string) => (props: GridBaseIconProps) => React.ReactNode;
@@ -0,0 +1,2 @@
import type { GridBaseIconProps } from "../../models/gridSlotsComponentsProps.js";
export declare const createSvgIcon: (path: React.ReactNode, displayName?: string) => (props: GridBaseIconProps) => React.ReactNode;
@@ -0,0 +1,8 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.createSvgIcon = void 0;
var _utils = require("@mui/material/utils");
const createSvgIcon = exports.createSvgIcon = _utils.createSvgIcon;
@@ -0,0 +1,2 @@
import { createSvgIcon as createSvgIconMaterial } from '@mui/material/utils';
export const createSvgIcon = createSvgIconMaterial;
+32
View File
@@ -0,0 +1,32 @@
export declare const GridArrowUpwardIcon: (props: import("@mui/x-data-grid").GridBaseIconProps) => React.ReactNode;
export declare const GridArrowDownwardIcon: (props: import("@mui/x-data-grid").GridBaseIconProps) => React.ReactNode;
export declare const GridKeyboardArrowRight: (props: import("@mui/x-data-grid").GridBaseIconProps) => React.ReactNode;
export declare const GridExpandMoreIcon: (props: import("@mui/x-data-grid").GridBaseIconProps) => React.ReactNode;
export declare const GridFilterListIcon: (props: import("@mui/x-data-grid").GridBaseIconProps) => React.ReactNode;
export declare const GridFilterAltIcon: (props: import("@mui/x-data-grid").GridBaseIconProps) => React.ReactNode;
export declare const GridSearchIcon: (props: import("@mui/x-data-grid").GridBaseIconProps) => React.ReactNode;
export declare const GridMenuIcon: (props: import("@mui/x-data-grid").GridBaseIconProps) => React.ReactNode;
export declare const GridCheckCircleIcon: (props: import("@mui/x-data-grid").GridBaseIconProps) => React.ReactNode;
export declare const GridUndoIcon: (props: import("@mui/x-data-grid").GridBaseIconProps) => React.ReactNode;
export declare const GridRedoIcon: (props: import("@mui/x-data-grid").GridBaseIconProps) => React.ReactNode;
export declare const GridColumnIcon: (props: import("@mui/x-data-grid").GridBaseIconProps) => React.ReactNode;
export declare const GridSeparatorIcon: (props: import("@mui/x-data-grid").GridBaseIconProps) => React.ReactNode;
export declare const GridViewHeadlineIcon: (props: import("@mui/x-data-grid").GridBaseIconProps) => React.ReactNode;
export declare const GridTableRowsIcon: (props: import("@mui/x-data-grid").GridBaseIconProps) => React.ReactNode;
export declare const GridViewStreamIcon: (props: import("@mui/x-data-grid").GridBaseIconProps) => React.ReactNode;
export declare const GridTripleDotsVerticalIcon: (props: import("@mui/x-data-grid").GridBaseIconProps) => React.ReactNode;
export declare const GridCloseIcon: (props: import("@mui/x-data-grid").GridBaseIconProps) => React.ReactNode;
export declare const GridAddIcon: (props: import("@mui/x-data-grid").GridBaseIconProps) => React.ReactNode;
export declare const GridRemoveIcon: (props: import("@mui/x-data-grid").GridBaseIconProps) => React.ReactNode;
export declare const GridLoadIcon: (props: import("@mui/x-data-grid").GridBaseIconProps) => React.ReactNode;
export declare const GridDragIcon: (props: import("@mui/x-data-grid").GridBaseIconProps) => React.ReactNode;
export declare const GridCheckIcon: (props: import("@mui/x-data-grid").GridBaseIconProps) => React.ReactNode;
export declare const GridMoreVertIcon: (props: import("@mui/x-data-grid").GridBaseIconProps) => React.ReactNode;
export declare const GridVisibilityOffIcon: (props: import("@mui/x-data-grid").GridBaseIconProps) => React.ReactNode;
export declare const GridViewColumnIcon: (props: import("@mui/x-data-grid").GridBaseIconProps) => React.ReactNode;
export declare const GridClearIcon: (props: import("@mui/x-data-grid").GridBaseIconProps) => React.ReactNode;
export declare const GridDeleteIcon: (props: import("@mui/x-data-grid").GridBaseIconProps) => React.ReactNode;
export declare const GridDeleteForeverIcon: (props: import("@mui/x-data-grid").GridBaseIconProps) => React.ReactNode;
export declare const GridDownloadIcon: (props: import("@mui/x-data-grid").GridBaseIconProps) => React.ReactNode;
export declare const GridLongTextCellExpandIcon: (props: import("@mui/x-data-grid").GridBaseIconProps) => React.ReactNode;
export declare const GridLongTextCellCollapseIcon: (props: import("@mui/x-data-grid").GridBaseIconProps) => React.ReactNode;
+32
View File
@@ -0,0 +1,32 @@
export declare const GridArrowUpwardIcon: (props: import("@mui/x-data-grid").GridBaseIconProps) => React.ReactNode;
export declare const GridArrowDownwardIcon: (props: import("@mui/x-data-grid").GridBaseIconProps) => React.ReactNode;
export declare const GridKeyboardArrowRight: (props: import("@mui/x-data-grid").GridBaseIconProps) => React.ReactNode;
export declare const GridExpandMoreIcon: (props: import("@mui/x-data-grid").GridBaseIconProps) => React.ReactNode;
export declare const GridFilterListIcon: (props: import("@mui/x-data-grid").GridBaseIconProps) => React.ReactNode;
export declare const GridFilterAltIcon: (props: import("@mui/x-data-grid").GridBaseIconProps) => React.ReactNode;
export declare const GridSearchIcon: (props: import("@mui/x-data-grid").GridBaseIconProps) => React.ReactNode;
export declare const GridMenuIcon: (props: import("@mui/x-data-grid").GridBaseIconProps) => React.ReactNode;
export declare const GridCheckCircleIcon: (props: import("@mui/x-data-grid").GridBaseIconProps) => React.ReactNode;
export declare const GridUndoIcon: (props: import("@mui/x-data-grid").GridBaseIconProps) => React.ReactNode;
export declare const GridRedoIcon: (props: import("@mui/x-data-grid").GridBaseIconProps) => React.ReactNode;
export declare const GridColumnIcon: (props: import("@mui/x-data-grid").GridBaseIconProps) => React.ReactNode;
export declare const GridSeparatorIcon: (props: import("@mui/x-data-grid").GridBaseIconProps) => React.ReactNode;
export declare const GridViewHeadlineIcon: (props: import("@mui/x-data-grid").GridBaseIconProps) => React.ReactNode;
export declare const GridTableRowsIcon: (props: import("@mui/x-data-grid").GridBaseIconProps) => React.ReactNode;
export declare const GridViewStreamIcon: (props: import("@mui/x-data-grid").GridBaseIconProps) => React.ReactNode;
export declare const GridTripleDotsVerticalIcon: (props: import("@mui/x-data-grid").GridBaseIconProps) => React.ReactNode;
export declare const GridCloseIcon: (props: import("@mui/x-data-grid").GridBaseIconProps) => React.ReactNode;
export declare const GridAddIcon: (props: import("@mui/x-data-grid").GridBaseIconProps) => React.ReactNode;
export declare const GridRemoveIcon: (props: import("@mui/x-data-grid").GridBaseIconProps) => React.ReactNode;
export declare const GridLoadIcon: (props: import("@mui/x-data-grid").GridBaseIconProps) => React.ReactNode;
export declare const GridDragIcon: (props: import("@mui/x-data-grid").GridBaseIconProps) => React.ReactNode;
export declare const GridCheckIcon: (props: import("@mui/x-data-grid").GridBaseIconProps) => React.ReactNode;
export declare const GridMoreVertIcon: (props: import("@mui/x-data-grid").GridBaseIconProps) => React.ReactNode;
export declare const GridVisibilityOffIcon: (props: import("@mui/x-data-grid").GridBaseIconProps) => React.ReactNode;
export declare const GridViewColumnIcon: (props: import("@mui/x-data-grid").GridBaseIconProps) => React.ReactNode;
export declare const GridClearIcon: (props: import("@mui/x-data-grid").GridBaseIconProps) => React.ReactNode;
export declare const GridDeleteIcon: (props: import("@mui/x-data-grid").GridBaseIconProps) => React.ReactNode;
export declare const GridDeleteForeverIcon: (props: import("@mui/x-data-grid").GridBaseIconProps) => React.ReactNode;
export declare const GridDownloadIcon: (props: import("@mui/x-data-grid").GridBaseIconProps) => React.ReactNode;
export declare const GridLongTextCellExpandIcon: (props: import("@mui/x-data-grid").GridBaseIconProps) => React.ReactNode;
export declare const GridLongTextCellCollapseIcon: (props: import("@mui/x-data-grid").GridBaseIconProps) => React.ReactNode;
+109
View File
@@ -0,0 +1,109 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.GridVisibilityOffIcon = exports.GridViewStreamIcon = exports.GridViewHeadlineIcon = exports.GridViewColumnIcon = exports.GridUndoIcon = exports.GridTripleDotsVerticalIcon = exports.GridTableRowsIcon = exports.GridSeparatorIcon = exports.GridSearchIcon = exports.GridRemoveIcon = exports.GridRedoIcon = exports.GridMoreVertIcon = exports.GridMenuIcon = exports.GridLongTextCellExpandIcon = exports.GridLongTextCellCollapseIcon = exports.GridLoadIcon = exports.GridKeyboardArrowRight = exports.GridFilterListIcon = exports.GridFilterAltIcon = exports.GridExpandMoreIcon = exports.GridDragIcon = exports.GridDownloadIcon = exports.GridDeleteIcon = exports.GridDeleteForeverIcon = exports.GridColumnIcon = exports.GridCloseIcon = exports.GridClearIcon = exports.GridCheckIcon = exports.GridCheckCircleIcon = exports.GridArrowUpwardIcon = exports.GridArrowDownwardIcon = exports.GridAddIcon = void 0;
var _createSvgIcon = require("./createSvgIcon");
var _jsxRuntime = require("react/jsx-runtime");
const GridArrowUpwardIcon = exports.GridArrowUpwardIcon = (0, _createSvgIcon.createSvgIcon)(/*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
d: "M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z"
}), 'ArrowUpward');
const GridArrowDownwardIcon = exports.GridArrowDownwardIcon = (0, _createSvgIcon.createSvgIcon)(/*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
d: "M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"
}), 'ArrowDownward');
const GridKeyboardArrowRight = exports.GridKeyboardArrowRight = (0, _createSvgIcon.createSvgIcon)(/*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
d: "M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"
}), 'KeyboardArrowRight');
const GridExpandMoreIcon = exports.GridExpandMoreIcon = (0, _createSvgIcon.createSvgIcon)(/*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
d: "M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"
}), 'ExpandMore');
const GridFilterListIcon = exports.GridFilterListIcon = (0, _createSvgIcon.createSvgIcon)(/*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
d: "M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z"
}), 'FilterList');
const GridFilterAltIcon = exports.GridFilterAltIcon = (0, _createSvgIcon.createSvgIcon)(/*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
d: "M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61z"
}), 'FilterAlt');
const GridSearchIcon = exports.GridSearchIcon = (0, _createSvgIcon.createSvgIcon)(/*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"
}), 'Search');
const GridMenuIcon = exports.GridMenuIcon = (0, _createSvgIcon.createSvgIcon)(/*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
d: "M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"
}), 'Menu');
const GridCheckCircleIcon = exports.GridCheckCircleIcon = (0, _createSvgIcon.createSvgIcon)(/*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"
}), 'CheckCircle');
const GridUndoIcon = exports.GridUndoIcon = (0, _createSvgIcon.createSvgIcon)(/*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
d: "M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8"
}), 'Undo');
const GridRedoIcon = exports.GridRedoIcon = (0, _createSvgIcon.createSvgIcon)(/*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
d: "M18.4 10.6C16.55 8.99 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16c1.05-3.19 4.05-5.5 7.6-5.5 1.95 0 3.73.72 5.12 1.88L13 16h9V7z"
}), 'Redo');
const GridColumnIcon = exports.GridColumnIcon = (0, _createSvgIcon.createSvgIcon)(/*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
d: "M14.67 5v14H9.33V5zm1 14H21V5h-5.33zm-7.34 0V5H3v14z"
}), 'ColumnIcon');
const GridSeparatorIcon = exports.GridSeparatorIcon = (0, _createSvgIcon.createSvgIcon)(/*#__PURE__*/(0, _jsxRuntime.jsx)("rect", {
width: "1",
height: "24",
x: "11.5",
rx: "0.5"
}), 'Separator');
const GridViewHeadlineIcon = exports.GridViewHeadlineIcon = (0, _createSvgIcon.createSvgIcon)(/*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
d: "M4 15h16v-2H4v2zm0 4h16v-2H4v2zm0-8h16V9H4v2zm0-6v2h16V5H4z"
}), 'ViewHeadline');
const GridTableRowsIcon = exports.GridTableRowsIcon = (0, _createSvgIcon.createSvgIcon)(/*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
d: "M21,8H3V4h18V8z M21,10H3v4h18V10z M21,16H3v4h18V16z"
}), 'TableRows');
const GridViewStreamIcon = exports.GridViewStreamIcon = (0, _createSvgIcon.createSvgIcon)(/*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
d: "M4 18h17v-6H4v6zM4 5v6h17V5H4z"
}), 'ViewStream');
const GridTripleDotsVerticalIcon = exports.GridTripleDotsVerticalIcon = (0, _createSvgIcon.createSvgIcon)(/*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
d: "M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"
}), 'TripleDotsVertical');
const GridCloseIcon = exports.GridCloseIcon = (0, _createSvgIcon.createSvgIcon)(/*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"
}), 'Close');
const GridAddIcon = exports.GridAddIcon = (0, _createSvgIcon.createSvgIcon)(/*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
d: "M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"
}), 'Add');
const GridRemoveIcon = exports.GridRemoveIcon = (0, _createSvgIcon.createSvgIcon)(/*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
d: "M19 13H5v-2h14v2z"
}), 'Remove');
const GridLoadIcon = exports.GridLoadIcon = (0, _createSvgIcon.createSvgIcon)(/*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
d: "M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3z"
}), 'Load');
const GridDragIcon = exports.GridDragIcon = (0, _createSvgIcon.createSvgIcon)(/*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
d: "M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2zm-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"
}), 'Drag');
const GridCheckIcon = exports.GridCheckIcon = (0, _createSvgIcon.createSvgIcon)(/*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
d: "M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"
}), 'Check');
const GridMoreVertIcon = exports.GridMoreVertIcon = (0, _createSvgIcon.createSvgIcon)(/*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
d: "M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"
}), 'MoreVert');
const GridVisibilityOffIcon = exports.GridVisibilityOffIcon = (0, _createSvgIcon.createSvgIcon)(/*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
d: "M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"
}), 'VisibilityOff');
const GridViewColumnIcon = exports.GridViewColumnIcon = (0, _createSvgIcon.createSvgIcon)(/*#__PURE__*/(0, _jsxRuntime.jsx)("g", {
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
d: "M14.67,5v14H9.33V5H14.67z M15.67,19H21V5h-5.33V19z M8.33,19V5H3v14H8.33z"
})
}), 'ViewColumn');
const GridClearIcon = exports.GridClearIcon = (0, _createSvgIcon.createSvgIcon)(/*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
d: "M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z"
}), 'Clear');
const GridDeleteIcon = exports.GridDeleteIcon = (0, _createSvgIcon.createSvgIcon)(/*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
d: "M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"
}), 'Delete');
const GridDeleteForeverIcon = exports.GridDeleteForeverIcon = (0, _createSvgIcon.createSvgIcon)(/*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
d: "M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zm2.46-7.12l1.41-1.41L12 12.59l2.12-2.12 1.41 1.41L13.41 14l2.12 2.12-1.41 1.41L12 15.41l-2.12 2.12-1.41-1.41L10.59 14l-2.13-2.12zM15.5 4l-1-1h-5l-1 1H5v2h14V4z"
}), 'Delete');
const GridDownloadIcon = exports.GridDownloadIcon = (0, _createSvgIcon.createSvgIcon)(/*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
d: "M5 20h14v-2H5zM19 9h-4V3H9v6H5l7 7z"
}), 'Download');
const GridLongTextCellExpandIcon = exports.GridLongTextCellExpandIcon = (0, _createSvgIcon.createSvgIcon)(/*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
d: "M21 11V3h-8l3.29 3.29-10 10L3 13v8h8l-3.29-3.29 10-10z"
}), 'OpenInFull');
const GridLongTextCellCollapseIcon = exports.GridLongTextCellCollapseIcon = (0, _createSvgIcon.createSvgIcon)(/*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
d: "M5 15h2V8.41L18.59 20 20 18.59 8.41 7H15V5H5z"
}), 'NorthWest');
+103
View File
@@ -0,0 +1,103 @@
import { createSvgIcon } from "./createSvgIcon.mjs";
import { jsx as _jsx } from "react/jsx-runtime";
export const GridArrowUpwardIcon = createSvgIcon(/*#__PURE__*/_jsx("path", {
d: "M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z"
}), 'ArrowUpward');
export const GridArrowDownwardIcon = createSvgIcon(/*#__PURE__*/_jsx("path", {
d: "M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"
}), 'ArrowDownward');
export const GridKeyboardArrowRight = createSvgIcon(/*#__PURE__*/_jsx("path", {
d: "M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"
}), 'KeyboardArrowRight');
export const GridExpandMoreIcon = createSvgIcon(/*#__PURE__*/_jsx("path", {
d: "M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"
}), 'ExpandMore');
export const GridFilterListIcon = createSvgIcon(/*#__PURE__*/_jsx("path", {
d: "M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z"
}), 'FilterList');
export const GridFilterAltIcon = createSvgIcon(/*#__PURE__*/_jsx("path", {
d: "M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61z"
}), 'FilterAlt');
export const GridSearchIcon = createSvgIcon(/*#__PURE__*/_jsx("path", {
d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"
}), 'Search');
export const GridMenuIcon = createSvgIcon(/*#__PURE__*/_jsx("path", {
d: "M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"
}), 'Menu');
export const GridCheckCircleIcon = createSvgIcon(/*#__PURE__*/_jsx("path", {
d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"
}), 'CheckCircle');
export const GridUndoIcon = createSvgIcon(/*#__PURE__*/_jsx("path", {
d: "M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8"
}), 'Undo');
export const GridRedoIcon = createSvgIcon(/*#__PURE__*/_jsx("path", {
d: "M18.4 10.6C16.55 8.99 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16c1.05-3.19 4.05-5.5 7.6-5.5 1.95 0 3.73.72 5.12 1.88L13 16h9V7z"
}), 'Redo');
export const GridColumnIcon = createSvgIcon(/*#__PURE__*/_jsx("path", {
d: "M14.67 5v14H9.33V5zm1 14H21V5h-5.33zm-7.34 0V5H3v14z"
}), 'ColumnIcon');
export const GridSeparatorIcon = createSvgIcon(/*#__PURE__*/_jsx("rect", {
width: "1",
height: "24",
x: "11.5",
rx: "0.5"
}), 'Separator');
export const GridViewHeadlineIcon = createSvgIcon(/*#__PURE__*/_jsx("path", {
d: "M4 15h16v-2H4v2zm0 4h16v-2H4v2zm0-8h16V9H4v2zm0-6v2h16V5H4z"
}), 'ViewHeadline');
export const GridTableRowsIcon = createSvgIcon(/*#__PURE__*/_jsx("path", {
d: "M21,8H3V4h18V8z M21,10H3v4h18V10z M21,16H3v4h18V16z"
}), 'TableRows');
export const GridViewStreamIcon = createSvgIcon(/*#__PURE__*/_jsx("path", {
d: "M4 18h17v-6H4v6zM4 5v6h17V5H4z"
}), 'ViewStream');
export const GridTripleDotsVerticalIcon = createSvgIcon(/*#__PURE__*/_jsx("path", {
d: "M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"
}), 'TripleDotsVertical');
export const GridCloseIcon = createSvgIcon(/*#__PURE__*/_jsx("path", {
d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"
}), 'Close');
export const GridAddIcon = createSvgIcon(/*#__PURE__*/_jsx("path", {
d: "M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"
}), 'Add');
export const GridRemoveIcon = createSvgIcon(/*#__PURE__*/_jsx("path", {
d: "M19 13H5v-2h14v2z"
}), 'Remove');
export const GridLoadIcon = createSvgIcon(/*#__PURE__*/_jsx("path", {
d: "M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3z"
}), 'Load');
export const GridDragIcon = createSvgIcon(/*#__PURE__*/_jsx("path", {
d: "M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2zm-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"
}), 'Drag');
export const GridCheckIcon = createSvgIcon(/*#__PURE__*/_jsx("path", {
d: "M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"
}), 'Check');
export const GridMoreVertIcon = createSvgIcon(/*#__PURE__*/_jsx("path", {
d: "M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"
}), 'MoreVert');
export const GridVisibilityOffIcon = createSvgIcon(/*#__PURE__*/_jsx("path", {
d: "M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"
}), 'VisibilityOff');
export const GridViewColumnIcon = createSvgIcon(/*#__PURE__*/_jsx("g", {
children: /*#__PURE__*/_jsx("path", {
d: "M14.67,5v14H9.33V5H14.67z M15.67,19H21V5h-5.33V19z M8.33,19V5H3v14H8.33z"
})
}), 'ViewColumn');
export const GridClearIcon = createSvgIcon(/*#__PURE__*/_jsx("path", {
d: "M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z"
}), 'Clear');
export const GridDeleteIcon = createSvgIcon(/*#__PURE__*/_jsx("path", {
d: "M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"
}), 'Delete');
export const GridDeleteForeverIcon = createSvgIcon(/*#__PURE__*/_jsx("path", {
d: "M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zm2.46-7.12l1.41-1.41L12 12.59l2.12-2.12 1.41 1.41L13.41 14l2.12 2.12-1.41 1.41L12 15.41l-2.12 2.12-1.41-1.41L10.59 14l-2.13-2.12zM15.5 4l-1-1h-5l-1 1H5v2h14V4z"
}), 'Delete');
export const GridDownloadIcon = createSvgIcon(/*#__PURE__*/_jsx("path", {
d: "M5 20h14v-2H5zM19 9h-4V3H9v6H5l7 7z"
}), 'Download');
export const GridLongTextCellExpandIcon = createSvgIcon(/*#__PURE__*/_jsx("path", {
d: "M21 11V3h-8l3.29 3.29-10 10L3 13v8h8l-3.29-3.29 10-10z"
}), 'OpenInFull');
export const GridLongTextCellCollapseIcon = createSvgIcon(/*#__PURE__*/_jsx("path", {
d: "M5 15h2V8.41L18.59 20 20 18.59 8.41 7H15V5H5z"
}), 'NorthWest');
+6
View File
@@ -0,0 +1,6 @@
import type { GridIconSlotsComponent } from "../models/index.mjs";
import type { GridBaseSlots } from "../models/gridSlotsComponent.mjs";
import "./augmentation.mjs";
export { useMaterialCSSVariables } from "./variables.mjs";
declare const materialSlots: GridBaseSlots & GridIconSlotsComponent;
export default materialSlots;
+6
View File
@@ -0,0 +1,6 @@
import type { GridIconSlotsComponent } from "../models/index.js";
import type { GridBaseSlots } from "../models/gridSlotsComponent.js";
import "./augmentation.js";
export { useMaterialCSSVariables } from "./variables.js";
declare const materialSlots: GridBaseSlots & GridIconSlotsComponent;
export default materialSlots;
+906
View File
@@ -0,0 +1,906 @@
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
Object.defineProperty(exports, "useMaterialCSSVariables", {
enumerable: true,
get: function () {
return _variables.useMaterialCSSVariables;
}
});
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
var React = _interopRequireWildcard(require("react"));
var _clsx = _interopRequireDefault(require("clsx"));
var _useForkRef = _interopRequireDefault(require("@mui/utils/useForkRef"));
var _useEventCallback = _interopRequireDefault(require("@mui/utils/useEventCallback"));
var _styles = require("@mui/material/styles");
var _Autocomplete = _interopRequireDefault(require("@mui/material/Autocomplete"));
var _Badge = _interopRequireDefault(require("@mui/material/Badge"));
var _Checkbox = _interopRequireDefault(require("@mui/material/Checkbox"));
var _Chip = _interopRequireDefault(require("@mui/material/Chip"));
var _CircularProgress = _interopRequireDefault(require("@mui/material/CircularProgress"));
var _Divider = _interopRequireDefault(require("@mui/material/Divider"));
var _InputBase = _interopRequireDefault(require("@mui/material/InputBase"));
var _Unstable_TrapFocus = _interopRequireDefault(require("@mui/material/Unstable_TrapFocus"));
var _LinearProgress = _interopRequireDefault(require("@mui/material/LinearProgress"));
var _ListItemIcon = _interopRequireDefault(require("@mui/material/ListItemIcon"));
var _ListItemText = _interopRequireWildcard(require("@mui/material/ListItemText"));
var _MenuList = _interopRequireDefault(require("@mui/material/MenuList"));
var _MenuItem = _interopRequireDefault(require("@mui/material/MenuItem"));
var _Modal = _interopRequireDefault(require("@mui/material/Modal"));
var _TextField = _interopRequireDefault(require("@mui/material/TextField"));
var _TextareaAutosize = _interopRequireDefault(require("@mui/material/TextareaAutosize"));
var _FormControl = _interopRequireDefault(require("@mui/material/FormControl"));
var _FormControlLabel = _interopRequireWildcard(require("@mui/material/FormControlLabel"));
var _Select = _interopRequireDefault(require("@mui/material/Select"));
var _Switch = _interopRequireDefault(require("@mui/material/Switch"));
var _Button = _interopRequireDefault(require("@mui/material/Button"));
var _IconButton = _interopRequireWildcard(require("@mui/material/IconButton"));
var _InputAdornment = _interopRequireWildcard(require("@mui/material/InputAdornment"));
var _Tooltip = _interopRequireDefault(require("@mui/material/Tooltip"));
var _TablePagination = _interopRequireWildcard(require("@mui/material/TablePagination"));
var _Popper = _interopRequireDefault(require("@mui/material/Popper"));
var _ClickAwayListener = _interopRequireDefault(require("@mui/material/ClickAwayListener"));
var _Grow = _interopRequireDefault(require("@mui/material/Grow"));
var _Paper = _interopRequireDefault(require("@mui/material/Paper"));
var _InputLabel = _interopRequireDefault(require("@mui/material/InputLabel"));
var _Skeleton = _interopRequireDefault(require("@mui/material/Skeleton"));
var _Tabs = _interopRequireDefault(require("@mui/material/Tabs"));
var _Tab = _interopRequireDefault(require("@mui/material/Tab"));
var _ToggleButton = _interopRequireDefault(require("@mui/material/ToggleButton"));
var _forwardRef = require("@mui/x-internals/forwardRef");
var _useId = _interopRequireDefault(require("@mui/utils/useId"));
var _icons = require("./icons");
var _GridColumnUnsortedIcon = require("../components/GridColumnUnsortedIcon");
var _useGridApiContext = require("../hooks/utils/useGridApiContext");
var _useGridRootProps = require("../hooks/utils/useGridRootProps");
require("./augmentation");
var _jsxRuntime = require("react/jsx-runtime");
var _variables = require("./variables");
const _excluded = ["id", "label", "labelId", "material", "disabled", "multiple", "slotProps", "onChange", "onKeyDown", "onOpen", "onClose", "renderValue", "size", "style", "fullWidth"],
_excluded2 = ["onRowsPerPageChange", "material", "disabled"],
_excluded3 = ["material"],
_excluded4 = ["autoFocus", "label", "fullWidth", "slotProps", "className", "material", "inputRef"],
_excluded5 = ["material"],
_excluded6 = ["material"],
_excluded7 = ["material"],
_excluded8 = ["material"],
_excluded9 = ["material"],
_excluded0 = ["material"],
_excluded1 = ["material"],
_excluded10 = ["material"],
_excluded11 = ["material"],
_excluded12 = ["material", "label", "className"],
_excluded13 = ["material"],
_excluded14 = ["inert", "iconStart", "iconEnd", "children", "material"],
_excluded15 = ["material"],
_excluded16 = ["slotProps", "material"],
_excluded17 = ["id", "multiple", "freeSolo", "options", "getOptionLabel", "isOptionEqualToValue", "value", "onChange", "label", "placeholder", "slotProps", "material"],
_excluded18 = ["key"],
_excluded19 = ["slotProps"],
_excluded20 = ["slotProps"],
_excluded21 = ["slotProps"],
_excluded22 = ["slotProps", "material"],
_excluded23 = ["material"],
_excluded24 = ["open", "children", "className", "clickAwayTouchEvent", "clickAwayMouseEvent", "flip", "focusTrap", "onExited", "onClickAway", "onDidShow", "onDidHide", "id", "target", "transition", "placement", "material"],
_excluded25 = ["native"],
_excluded26 = ["children", "value", "active"],
_excluded27 = ["items", "value", "material"];
/* eslint-disable mui/disallow-react-api-in-server-components */
const InputAdornment = (0, _styles.styled)(_InputAdornment.default, {
slot: 'internal'
})(({
theme
}) => ({
[`&.${_InputAdornment.inputAdornmentClasses.positionEnd} .${_IconButton.iconButtonClasses.sizeSmall}`]: {
marginRight: theme.spacing(-0.75)
}
}));
const FormControlLabel = (0, _styles.styled)(_FormControlLabel.default, {
slot: 'internal',
shouldForwardProp: prop => prop !== 'fullWidth'
})(({
theme
}) => ({
gap: theme.spacing(0.5),
margin: 0,
overflow: 'hidden',
[`& .${_FormControlLabel.formControlLabelClasses.label}`]: {
fontSize: theme.typography.pxToRem(14),
overflow: 'hidden',
textOverflow: 'ellipsis',
whiteSpace: 'nowrap'
},
variants: [{
props: {
fullWidth: true
},
style: {
width: '100%'
}
}]
}));
const Checkbox = (0, _styles.styled)(_Checkbox.default, {
slot: 'internal',
shouldForwardProp: prop => prop !== 'density'
})(({
theme
}) => ({
variants: [{
props: {
density: 'compact'
},
style: {
padding: theme.spacing(0.5)
}
}]
}));
const ListItemText = (0, _styles.styled)(_ListItemText.default, {
slot: 'internal'
})({
[`& .${_ListItemText.listItemTextClasses.primary}`]: {
overflowX: 'clip',
textOverflow: 'ellipsis',
maxWidth: '300px'
}
});
const BaseSelect = (0, _forwardRef.forwardRef)(function BaseSelect(props, ref) {
const {
id,
label,
labelId,
material,
disabled,
multiple,
slotProps,
onChange,
onKeyDown,
onOpen,
onClose,
renderValue,
size,
style,
fullWidth
} = props,
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
const theme = (0, _styles.useTheme)();
const textFieldDefaults = theme.components?.MuiTextField?.defaultProps ?? {};
const computedSize = size ?? textFieldDefaults.size;
const computedVariant = textFieldDefaults.variant ?? 'outlined';
const menuProps = {
slotProps: {
paper: {
onKeyDown
}
}
};
if (onClose) {
menuProps.onClose = onClose;
}
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_FormControl.default, {
size: computedSize,
fullWidth: fullWidth,
style: style,
disabled: disabled,
ref: ref,
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_InputLabel.default, {
id: labelId,
htmlFor: id,
shrink: true,
variant: computedVariant,
children: label
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Select.default, (0, _extends2.default)({
id: id,
labelId: labelId,
label: label,
displayEmpty: true,
multiple: multiple,
onChange: onChange,
renderValue: renderValue,
variant: computedVariant
}, other, {
inputProps: slotProps?.htmlInput,
onOpen: onOpen,
MenuProps: menuProps,
size: computedSize
}, material))]
});
});
if (process.env.NODE_ENV !== "production") BaseSelect.displayName = "BaseSelect";
const StyledPagination = (0, _styles.styled)(_TablePagination.default, {
slot: 'internal'
})(({
theme
}) => ({
[`& .${_TablePagination.tablePaginationClasses.selectLabel}`]: {
display: 'none',
[theme.breakpoints.up('sm')]: {
display: 'block'
}
},
[`& .${_TablePagination.tablePaginationClasses.input}`]: {
display: 'none',
[theme.breakpoints.up('sm')]: {
display: 'inline-flex'
}
}
}));
const BasePagination = (0, _forwardRef.forwardRef)(function BasePagination(props, ref) {
const {
onRowsPerPageChange,
material,
disabled
} = props,
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded2);
const computedProps = React.useMemo(() => {
if (!disabled) {
return undefined;
}
return {
slotProps: {
actions: {
previousButton: {
disabled: true
},
nextButton: {
disabled: true
}
}
}
};
}, [disabled]);
const apiRef = (0, _useGridApiContext.useGridApiContext)();
const rootProps = (0, _useGridRootProps.useGridRootProps)();
const {
estimatedRowCount
} = rootProps;
return /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledPagination, (0, _extends2.default)({
component: "div",
onRowsPerPageChange: (0, _useEventCallback.default)(event => {
onRowsPerPageChange?.(Number(event.target.value));
}),
labelRowsPerPage: apiRef.current.getLocaleText('paginationRowsPerPage'),
labelDisplayedRows: params => apiRef.current.getLocaleText('paginationDisplayedRows')((0, _extends2.default)({}, params, {
estimated: estimatedRowCount
})),
getItemAriaLabel: apiRef.current.getLocaleText('paginationItemAriaLabel')
}, computedProps, other, material, {
ref: ref
}));
});
if (process.env.NODE_ENV !== "production") BasePagination.displayName = "BasePagination";
const BaseBadge = (0, _forwardRef.forwardRef)(function BaseBadge(props, ref) {
const {
material
} = props,
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded3);
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Badge.default, (0, _extends2.default)({}, other, material, {
ref: ref
}));
});
if (process.env.NODE_ENV !== "production") BaseBadge.displayName = "BaseBadge";
const BaseCheckbox = (0, _forwardRef.forwardRef)(function BaseCheckbox(props, ref) {
const {
autoFocus,
label,
fullWidth,
slotProps,
className,
material,
inputRef
} = props,
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded4);
const elementRef = React.useRef(null);
const handleRef = (0, _useForkRef.default)(elementRef, ref);
const rippleRef = React.useRef(null);
const combinedInputRef = (0, _useForkRef.default)(inputRef, slotProps?.htmlInput?.ref, material?.slotProps?.input?.ref);
React.useEffect(() => {
if (autoFocus) {
const input = elementRef.current?.querySelector('input');
input?.focus({
preventScroll: true
});
} else if (autoFocus === false && rippleRef.current) {
// Only available in @mui/material v5.4.1 or later
// @ts-ignore
rippleRef.current.stop({});
}
}, [autoFocus]);
const checkboxSlotProps = React.useMemo(() => (0, _extends2.default)({}, material?.slotProps, {
input: (0, _extends2.default)({}, material?.slotProps?.input, slotProps?.htmlInput, {
ref: combinedInputRef
})
}), [material?.slotProps, slotProps?.htmlInput, combinedInputRef]);
if (!label) {
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Checkbox, (0, _extends2.default)({}, other, material, {
className: (0, _clsx.default)(className, material?.className),
slotProps: checkboxSlotProps,
ref: handleRef,
touchRippleRef: rippleRef
}));
}
return /*#__PURE__*/(0, _jsxRuntime.jsx)(FormControlLabel, {
className: className,
control: /*#__PURE__*/(0, _jsxRuntime.jsx)(Checkbox, (0, _extends2.default)({}, other, material, {
slotProps: checkboxSlotProps,
ref: handleRef,
touchRippleRef: rippleRef
})),
label: label,
fullWidth: fullWidth
});
});
if (process.env.NODE_ENV !== "production") BaseCheckbox.displayName = "BaseCheckbox";
const BaseCircularProgress = (0, _forwardRef.forwardRef)(function BaseCircularProgress(props, ref) {
const {
material
} = props,
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded5);
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_CircularProgress.default, (0, _extends2.default)({}, other, material, {
ref: ref
}));
});
if (process.env.NODE_ENV !== "production") BaseCircularProgress.displayName = "BaseCircularProgress";
const BaseDivider = (0, _forwardRef.forwardRef)(function BaseDivider(props, ref) {
const {
material
} = props,
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded6);
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Divider.default, (0, _extends2.default)({}, other, material, {
ref: ref
}));
});
if (process.env.NODE_ENV !== "production") BaseDivider.displayName = "BaseDivider";
const BaseLinearProgress = (0, _forwardRef.forwardRef)(function BaseLinearProgress(props, ref) {
const {
material
} = props,
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded7);
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_LinearProgress.default, (0, _extends2.default)({}, other, material, {
ref: ref
}));
});
if (process.env.NODE_ENV !== "production") BaseLinearProgress.displayName = "BaseLinearProgress";
const BaseButton = (0, _forwardRef.forwardRef)(function BaseButton(props, ref) {
const {
material
} = props,
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded8);
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.default, (0, _extends2.default)({}, other, material, {
ref: ref
}));
});
if (process.env.NODE_ENV !== "production") BaseButton.displayName = "BaseButton";
const StyledToggleButton = (0, _styles.styled)(_ToggleButton.default, {
slot: 'internal'
})(({
theme
}) => ({
gap: theme.spacing(1),
border: 0
}));
const BaseToggleButton = (0, _forwardRef.forwardRef)(function BaseToggleButton(props, ref) {
const {
material
} = props,
rest = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded9);
return /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledToggleButton, (0, _extends2.default)({
size: "small",
color: "primary"
}, rest, material, {
ref: ref
}));
});
if (process.env.NODE_ENV !== "production") BaseToggleButton.displayName = "BaseToggleButton";
const BaseChip = (0, _forwardRef.forwardRef)(function BaseChip(props, ref) {
const {
material
} = props,
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded0);
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Chip.default, (0, _extends2.default)({}, other, material, {
ref: ref
}));
});
if (process.env.NODE_ENV !== "production") BaseChip.displayName = "BaseChip";
const BaseIconButton = (0, _forwardRef.forwardRef)(function BaseIconButton(props, ref) {
const {
material
} = props,
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded1);
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_IconButton.default, (0, _extends2.default)({}, other, material, {
ref: ref
}));
});
if (process.env.NODE_ENV !== "production") BaseIconButton.displayName = "BaseIconButton";
const BaseTooltip = (0, _forwardRef.forwardRef)(function BaseTooltip(props, ref) {
const {
material
} = props,
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded10);
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Tooltip.default, (0, _extends2.default)({}, other, material, {
ref: ref
}));
});
if (process.env.NODE_ENV !== "production") BaseTooltip.displayName = "BaseTooltip";
const BaseSkeleton = (0, _forwardRef.forwardRef)(function BaseSkeleton(props, ref) {
const {
material
} = props,
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded11);
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Skeleton.default, (0, _extends2.default)({}, other, material, {
ref: ref
}));
});
if (process.env.NODE_ENV !== "production") BaseSkeleton.displayName = "BaseSkeleton";
const BaseSwitch = (0, _forwardRef.forwardRef)(function BaseSwitch(props, ref) {
const {
material,
label,
className
} = props,
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded12);
if (!label) {
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Switch.default, (0, _extends2.default)({}, other, material, {
className: className,
ref: ref
}));
}
return /*#__PURE__*/(0, _jsxRuntime.jsx)(FormControlLabel, {
className: className,
control: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Switch.default, (0, _extends2.default)({}, other, material, {
ref: ref
})),
label: label
});
});
if (process.env.NODE_ENV !== "production") BaseSwitch.displayName = "BaseSwitch";
const BaseMenuList = (0, _forwardRef.forwardRef)(function BaseMenuList(props, ref) {
const {
material
} = props,
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded13);
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_MenuList.default, (0, _extends2.default)({}, other, material, {
ref: ref
}));
});
if (process.env.NODE_ENV !== "production") BaseMenuList.displayName = "BaseMenuList";
function BaseMenuItem(props) {
const {
inert,
iconStart,
iconEnd,
children,
material
} = props,
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded14);
if (inert) {
other.disableRipple = true;
}
return /*#__PURE__*/React.createElement(_MenuItem.default, (0, _extends2.default)({}, other, material), [iconStart && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ListItemIcon.default, {
children: iconStart
}, "1"), /*#__PURE__*/(0, _jsxRuntime.jsx)(ListItemText, {
children: children
}, "2"), iconEnd && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ListItemIcon.default, {
children: iconEnd
}, "3")]);
}
function BaseModal(props) {
const {
material
} = props,
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded15);
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Modal.default, (0, _extends2.default)({}, other, material));
}
function BaseTextField(props) {
const {
slotProps,
material
} = props,
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded16);
const theme = (0, _styles.useTheme)();
const textFieldDefaults = theme.components?.MuiTextField?.defaultProps ?? {};
const computedVariant = other.variant ?? textFieldDefaults.variant ?? 'outlined';
const computedSize = other.size ?? textFieldDefaults.size;
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_TextField.default, (0, _extends2.default)({
variant: computedVariant,
size: computedSize
}, other, material, {
slotProps: {
htmlInput: slotProps?.htmlInput,
input: transformInputProps(slotProps?.input),
inputLabel: (0, _extends2.default)({
shrink: true
}, slotProps?.inputLabel)
}
}));
}
function BaseAutocomplete(props) {
const rootProps = (0, _useGridRootProps.useGridRootProps)();
const {
id,
multiple,
freeSolo,
options,
getOptionLabel,
isOptionEqualToValue,
value,
onChange,
label,
placeholder,
slotProps,
material
} = props,
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded17);
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Autocomplete.default, (0, _extends2.default)({
id: id,
multiple: multiple,
freeSolo: freeSolo,
options: options,
getOptionLabel: getOptionLabel,
isOptionEqualToValue: isOptionEqualToValue,
value: value,
onChange: onChange,
renderValue: (currentValue, getTagProps) => currentValue.map((option, index) => {
const _getTagProps = getTagProps({
index
}),
{
key
} = _getTagProps,
tagProps = (0, _objectWithoutPropertiesLoose2.default)(_getTagProps, _excluded18);
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Chip.default, (0, _extends2.default)({
variant: "outlined",
size: "small",
label: typeof option === 'string' ? option : getOptionLabel?.(option)
}, tagProps, typeof slotProps?.chip === 'function' ? slotProps.chip(option, index) : slotProps?.chip), key);
}),
renderInput: params => {
const {
slotProps: autocompleteSlotProps
} = params,
inputRest = (0, _objectWithoutPropertiesLoose2.default)(params, _excluded19);
const _ref = slotProps?.textField ?? {},
{
slotProps: textFieldSlotProps
} = _ref,
textFieldRest = (0, _objectWithoutPropertiesLoose2.default)(_ref, _excluded20);
const _ref2 = rootProps.slotProps?.baseTextField ?? {},
{
slotProps: baseTextFieldSlotProps
} = _ref2,
baseTextFieldRest = (0, _objectWithoutPropertiesLoose2.default)(_ref2, _excluded21);
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_TextField.default, (0, _extends2.default)({}, inputRest, {
label: label,
placeholder: placeholder
}, textFieldRest, baseTextFieldRest, {
slotProps: {
htmlInput: (0, _extends2.default)({}, autocompleteSlotProps.htmlInput, textFieldSlotProps?.htmlInput, baseTextFieldSlotProps?.htmlInput),
input: (0, _extends2.default)({}, transformInputProps(autocompleteSlotProps.input, false), textFieldSlotProps?.input, baseTextFieldSlotProps?.input),
inputLabel: (0, _extends2.default)({
shrink: true
}, autocompleteSlotProps.inputLabel, textFieldSlotProps?.inputLabel, baseTextFieldSlotProps?.inputLabel)
}
}));
}
}, other, material));
}
function BaseInput(props) {
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_InputBase.default, (0, _extends2.default)({}, transformInputProps(props)));
}
function transformInputProps(props, wrapAdornments = true) {
if (!props) {
return undefined;
}
const {
slotProps,
material
} = props,
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded22);
const result = other;
if (wrapAdornments) {
if (result.startAdornment) {
result.startAdornment = /*#__PURE__*/(0, _jsxRuntime.jsx)(InputAdornment, {
position: "start",
children: result.startAdornment
});
}
if (result.endAdornment) {
result.endAdornment = /*#__PURE__*/(0, _jsxRuntime.jsx)(InputAdornment, {
position: "end",
children: result.endAdornment
});
}
}
for (const k in material) {
if (Object.hasOwn(material, k)) {
result[k] = material[k];
}
}
if (slotProps?.htmlInput) {
if (result.inputProps) {
result.inputProps = (0, _extends2.default)({}, result.inputProps, slotProps?.htmlInput);
} else {
result.inputProps = slotProps?.htmlInput;
}
}
return result;
}
const BaseTextarea = (0, _forwardRef.forwardRef)(function BaseTextarea(props, ref) {
const {
material
} = props,
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded23);
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_TextareaAutosize.default, (0, _extends2.default)({}, other, material, {
ref: ref
}));
});
if (process.env.NODE_ENV !== "production") BaseTextarea.displayName = "BaseTextarea";
const transformOrigin = {
'bottom-start': 'top left',
'bottom-end': 'top right'
};
const BasePopper = (0, _forwardRef.forwardRef)(function BasePopper(props, ref) {
const {
open,
children,
className,
flip,
onExited,
onDidShow,
onDidHide,
id,
target,
transition,
placement,
material
} = props,
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded24);
const modifiers = React.useMemo(() => {
const result = [{
name: 'preventOverflow',
options: {
padding: 8
}
}];
if (flip) {
result.push({
name: 'flip',
enabled: true
});
}
if (onDidShow || onDidHide) {
result.push({
name: 'isPlaced',
enabled: true,
phase: 'main',
fn: () => {
onDidShow?.();
},
effect: () => () => {
onDidHide?.();
}
});
}
return result;
}, [flip, onDidShow, onDidHide]);
let content;
if (!transition) {
content = wrappers(props, children);
} else {
const handleExited = popperOnExited => node => {
if (popperOnExited) {
popperOnExited();
}
if (onExited) {
onExited(node);
}
};
content = p => wrappers(props, /*#__PURE__*/(0, _jsxRuntime.jsx)(_Grow.default, (0, _extends2.default)({}, p.TransitionProps, {
style: {
transformOrigin: transformOrigin[p.placement]
},
onExited: handleExited(p.TransitionProps?.onExited),
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Paper.default, {
children: children
})
})));
}
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Popper.default, (0, _extends2.default)({
id: id,
className: className,
open: open,
anchorEl: target,
transition: transition,
placement: placement,
modifiers: modifiers
}, other, material, {
ref: ref,
children: content
}));
});
if (process.env.NODE_ENV !== "production") BasePopper.displayName = "BasePopper";
function wrappers(props, content) {
return focusTrapWrapper(props, clickAwayWrapper(props, content));
}
function clickAwayWrapper(props, content) {
if (props.onClickAway === undefined) {
return content;
}
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ClickAwayListener.default, {
onClickAway: props.onClickAway,
touchEvent: props.clickAwayTouchEvent,
mouseEvent: props.clickAwayMouseEvent,
children: content
});
}
function focusTrapWrapper(props, content) {
if (props.focusTrap === undefined) {
return content;
}
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Unstable_TrapFocus.default, {
open: true,
disableEnforceFocus: true,
disableAutoFocus: true,
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
tabIndex: -1,
children: content
})
});
}
function BaseSelectOption(_ref3) {
let {
native
} = _ref3,
props = (0, _objectWithoutPropertiesLoose2.default)(_ref3, _excluded25);
if (native) {
return /*#__PURE__*/(0, _jsxRuntime.jsx)("option", (0, _extends2.default)({}, props));
}
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_MenuItem.default, (0, _extends2.default)({}, props));
}
const StyledTabs = (0, _styles.styled)(_Tabs.default, {
name: 'MuiDataGrid',
slot: 'Tabs'
})(({
theme
}) => ({
borderBottom: `1px solid ${(theme.vars || theme).palette.divider}`
}));
const StyledTab = (0, _styles.styled)(_Tab.default, {
name: 'MuiDataGrid',
slot: 'Tab'
})({
flex: 1,
minWidth: 'fit-content'
});
const StyledTabPanel = (0, _styles.styled)('div', {
name: 'MuiDataGrid',
slot: 'TabPanel'
})({
flex: 1,
display: 'flex',
flexDirection: 'column',
overflow: 'hidden'
});
function TabPanel(props) {
const {
children,
active
} = props,
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded26);
return /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledTabPanel, (0, _extends2.default)({
role: "tabpanel",
style: {
display: active ? 'flex' : 'none'
}
}, other, {
children: children
}));
}
function BaseTabs(_ref4) {
let {
items,
value,
material
} = _ref4,
props = (0, _objectWithoutPropertiesLoose2.default)(_ref4, _excluded27);
const id = (0, _useId.default)();
const labelId = `${id}-tab-${value}`;
const panelId = `${id}-tabpanel-${value}`;
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(StyledTabs, (0, _extends2.default)({}, props, {
value: value,
variant: "scrollable",
scrollButtons: "auto"
}, material, {
children: items.map(item => /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledTab, {
value: item.value,
label: item.label,
id: labelId,
"aria-controls": panelId
}, item.value))
})), items.map(item => /*#__PURE__*/(0, _jsxRuntime.jsx)(TabPanel, {
value: item.value,
active: value === item.value,
id: panelId,
"aria-labelledby": labelId,
children: item.children
}, item.value))]
});
}
const iconSlots = {
booleanCellTrueIcon: _icons.GridCheckIcon,
booleanCellFalseIcon: _icons.GridCloseIcon,
columnMenuIcon: _icons.GridTripleDotsVerticalIcon,
openFilterButtonIcon: _icons.GridFilterListIcon,
filterPanelDeleteIcon: _icons.GridCloseIcon,
undoIcon: _icons.GridUndoIcon,
redoIcon: _icons.GridRedoIcon,
columnFilteredIcon: _icons.GridFilterAltIcon,
columnSelectorIcon: _icons.GridColumnIcon,
columnUnsortedIcon: _GridColumnUnsortedIcon.GridColumnUnsortedIcon,
columnSortedAscendingIcon: _icons.GridArrowUpwardIcon,
columnSortedDescendingIcon: _icons.GridArrowDownwardIcon,
columnResizeIcon: _icons.GridSeparatorIcon,
densityCompactIcon: _icons.GridViewHeadlineIcon,
densityStandardIcon: _icons.GridTableRowsIcon,
densityComfortableIcon: _icons.GridViewStreamIcon,
exportIcon: _icons.GridDownloadIcon,
moreActionsIcon: _icons.GridMoreVertIcon,
treeDataCollapseIcon: _icons.GridExpandMoreIcon,
treeDataExpandIcon: _icons.GridKeyboardArrowRight,
groupingCriteriaCollapseIcon: _icons.GridExpandMoreIcon,
groupingCriteriaExpandIcon: _icons.GridKeyboardArrowRight,
detailPanelExpandIcon: _icons.GridAddIcon,
detailPanelCollapseIcon: _icons.GridRemoveIcon,
rowReorderIcon: _icons.GridDragIcon,
quickFilterIcon: _icons.GridSearchIcon,
quickFilterClearIcon: _icons.GridClearIcon,
columnMenuHideIcon: _icons.GridVisibilityOffIcon,
columnMenuSortAscendingIcon: _icons.GridArrowUpwardIcon,
columnMenuSortDescendingIcon: _icons.GridArrowDownwardIcon,
columnMenuUnsortIcon: null,
columnMenuFilterIcon: _icons.GridFilterAltIcon,
columnMenuManageColumnsIcon: _icons.GridViewColumnIcon,
columnMenuClearIcon: _icons.GridClearIcon,
loadIcon: _icons.GridLoadIcon,
filterPanelAddIcon: _icons.GridAddIcon,
filterPanelRemoveAllIcon: _icons.GridDeleteForeverIcon,
columnReorderIcon: _icons.GridDragIcon,
menuItemCheckIcon: _icons.GridCheckIcon,
longTextCellExpandIcon: _icons.GridLongTextCellExpandIcon,
longTextCellCollapseIcon: _icons.GridLongTextCellCollapseIcon
};
const baseSlots = {
baseAutocomplete: BaseAutocomplete,
baseBadge: BaseBadge,
baseCheckbox: BaseCheckbox,
baseChip: BaseChip,
baseCircularProgress: BaseCircularProgress,
baseDivider: BaseDivider,
baseInput: BaseInput,
baseTextarea: BaseTextarea,
baseLinearProgress: BaseLinearProgress,
baseMenuList: BaseMenuList,
baseMenuItem: BaseMenuItem,
baseModal: BaseModal,
baseTextField: BaseTextField,
baseButton: BaseButton,
baseIconButton: BaseIconButton,
baseToggleButton: BaseToggleButton,
baseTooltip: BaseTooltip,
baseTabs: BaseTabs,
basePagination: BasePagination,
basePopper: BasePopper,
baseSelect: BaseSelect,
baseSelectOption: BaseSelectOption,
baseSkeleton: BaseSkeleton,
baseSwitch: BaseSwitch
};
const materialSlots = (0, _extends2.default)({}, baseSlots, iconSlots);
var _default = exports.default = materialSlots;
+893
View File
@@ -0,0 +1,893 @@
import _extends from "@babel/runtime/helpers/esm/extends";
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
const _excluded = ["id", "label", "labelId", "material", "disabled", "multiple", "slotProps", "onChange", "onKeyDown", "onOpen", "onClose", "renderValue", "size", "style", "fullWidth"],
_excluded2 = ["onRowsPerPageChange", "material", "disabled"],
_excluded3 = ["material"],
_excluded4 = ["autoFocus", "label", "fullWidth", "slotProps", "className", "material", "inputRef"],
_excluded5 = ["material"],
_excluded6 = ["material"],
_excluded7 = ["material"],
_excluded8 = ["material"],
_excluded9 = ["material"],
_excluded0 = ["material"],
_excluded1 = ["material"],
_excluded10 = ["material"],
_excluded11 = ["material"],
_excluded12 = ["material", "label", "className"],
_excluded13 = ["material"],
_excluded14 = ["inert", "iconStart", "iconEnd", "children", "material"],
_excluded15 = ["material"],
_excluded16 = ["slotProps", "material"],
_excluded17 = ["id", "multiple", "freeSolo", "options", "getOptionLabel", "isOptionEqualToValue", "value", "onChange", "label", "placeholder", "slotProps", "material"],
_excluded18 = ["key"],
_excluded19 = ["slotProps"],
_excluded20 = ["slotProps"],
_excluded21 = ["slotProps"],
_excluded22 = ["slotProps", "material"],
_excluded23 = ["material"],
_excluded24 = ["open", "children", "className", "clickAwayTouchEvent", "clickAwayMouseEvent", "flip", "focusTrap", "onExited", "onClickAway", "onDidShow", "onDidHide", "id", "target", "transition", "placement", "material"],
_excluded25 = ["native"],
_excluded26 = ["children", "value", "active"],
_excluded27 = ["items", "value", "material"];
import * as React from 'react';
import clsx from 'clsx';
import useForkRef from '@mui/utils/useForkRef';
import useEventCallback from '@mui/utils/useEventCallback';
import { styled, useTheme } from '@mui/material/styles';
import MUIAutocomplete from '@mui/material/Autocomplete';
import MUIBadge from '@mui/material/Badge';
import MUICheckbox from '@mui/material/Checkbox';
import MUIChip from '@mui/material/Chip';
import MUICircularProgress from '@mui/material/CircularProgress';
import MUIDivider from '@mui/material/Divider';
import MUIInputBase from '@mui/material/InputBase';
import MUIFocusTrap from '@mui/material/Unstable_TrapFocus';
import MUILinearProgress from '@mui/material/LinearProgress';
import MUIListItemIcon from '@mui/material/ListItemIcon';
import MUIListItemText, { listItemTextClasses } from '@mui/material/ListItemText';
import MUIMenuList from '@mui/material/MenuList';
import MUIMenuItem from '@mui/material/MenuItem';
import MUIModal from '@mui/material/Modal';
import MUITextField from '@mui/material/TextField';
import MUITextareaAutosize from '@mui/material/TextareaAutosize';
import MUIFormControl from '@mui/material/FormControl';
import MUIFormControlLabel, { formControlLabelClasses } from '@mui/material/FormControlLabel';
import MUISelect from '@mui/material/Select';
import MUISwitch from '@mui/material/Switch';
import MUIButton from '@mui/material/Button';
import MUIIconButton, { iconButtonClasses } from '@mui/material/IconButton';
import MUIInputAdornment, { inputAdornmentClasses } from '@mui/material/InputAdornment';
import MUITooltip from '@mui/material/Tooltip';
import MUIPagination, { tablePaginationClasses } from '@mui/material/TablePagination';
import MUIPopper from '@mui/material/Popper';
import ClickAwayListener from '@mui/material/ClickAwayListener';
import MUIGrow from '@mui/material/Grow';
import MUIPaper from '@mui/material/Paper';
import MUIInputLabel from '@mui/material/InputLabel';
import MUISkeleton from '@mui/material/Skeleton';
import MUITabs from '@mui/material/Tabs';
import MUITab from '@mui/material/Tab';
import MUIToggleButton from '@mui/material/ToggleButton';
import { forwardRef } from '@mui/x-internals/forwardRef';
import useId from '@mui/utils/useId';
import { GridAddIcon, GridArrowDownwardIcon, GridArrowUpwardIcon, GridCheckIcon, GridCloseIcon, GridUndoIcon, GridRedoIcon, GridColumnIcon, GridDragIcon, GridExpandMoreIcon, GridFilterAltIcon, GridFilterListIcon, GridKeyboardArrowRight, GridMoreVertIcon, GridRemoveIcon, GridSearchIcon, GridSeparatorIcon, GridTableRowsIcon, GridTripleDotsVerticalIcon, GridViewHeadlineIcon, GridViewStreamIcon, GridVisibilityOffIcon, GridViewColumnIcon, GridClearIcon, GridLoadIcon, GridDeleteForeverIcon, GridDownloadIcon, GridLongTextCellExpandIcon, GridLongTextCellCollapseIcon } from "./icons/index.mjs";
import { GridColumnUnsortedIcon } from "../components/GridColumnUnsortedIcon.mjs";
import { useGridApiContext } from "../hooks/utils/useGridApiContext.mjs";
import { useGridRootProps } from "../hooks/utils/useGridRootProps.mjs";
import "./augmentation.mjs";
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
export { useMaterialCSSVariables } from "./variables.mjs";
/* eslint-disable mui/disallow-react-api-in-server-components */
const InputAdornment = styled(MUIInputAdornment, {
slot: 'internal'
})(({
theme
}) => ({
[`&.${inputAdornmentClasses.positionEnd} .${iconButtonClasses.sizeSmall}`]: {
marginRight: theme.spacing(-0.75)
}
}));
const FormControlLabel = styled(MUIFormControlLabel, {
slot: 'internal',
shouldForwardProp: prop => prop !== 'fullWidth'
})(({
theme
}) => ({
gap: theme.spacing(0.5),
margin: 0,
overflow: 'hidden',
[`& .${formControlLabelClasses.label}`]: {
fontSize: theme.typography.pxToRem(14),
overflow: 'hidden',
textOverflow: 'ellipsis',
whiteSpace: 'nowrap'
},
variants: [{
props: {
fullWidth: true
},
style: {
width: '100%'
}
}]
}));
const Checkbox = styled(MUICheckbox, {
slot: 'internal',
shouldForwardProp: prop => prop !== 'density'
})(({
theme
}) => ({
variants: [{
props: {
density: 'compact'
},
style: {
padding: theme.spacing(0.5)
}
}]
}));
const ListItemText = styled(MUIListItemText, {
slot: 'internal'
})({
[`& .${listItemTextClasses.primary}`]: {
overflowX: 'clip',
textOverflow: 'ellipsis',
maxWidth: '300px'
}
});
const BaseSelect = forwardRef(function BaseSelect(props, ref) {
const {
id,
label,
labelId,
material,
disabled,
multiple,
slotProps,
onChange,
onKeyDown,
onOpen,
onClose,
renderValue,
size,
style,
fullWidth
} = props,
other = _objectWithoutPropertiesLoose(props, _excluded);
const theme = useTheme();
const textFieldDefaults = theme.components?.MuiTextField?.defaultProps ?? {};
const computedSize = size ?? textFieldDefaults.size;
const computedVariant = textFieldDefaults.variant ?? 'outlined';
const menuProps = {
slotProps: {
paper: {
onKeyDown
}
}
};
if (onClose) {
menuProps.onClose = onClose;
}
return /*#__PURE__*/_jsxs(MUIFormControl, {
size: computedSize,
fullWidth: fullWidth,
style: style,
disabled: disabled,
ref: ref,
children: [/*#__PURE__*/_jsx(MUIInputLabel, {
id: labelId,
htmlFor: id,
shrink: true,
variant: computedVariant,
children: label
}), /*#__PURE__*/_jsx(MUISelect, _extends({
id: id,
labelId: labelId,
label: label,
displayEmpty: true,
multiple: multiple,
onChange: onChange,
renderValue: renderValue,
variant: computedVariant
}, other, {
inputProps: slotProps?.htmlInput,
onOpen: onOpen,
MenuProps: menuProps,
size: computedSize
}, material))]
});
});
if (process.env.NODE_ENV !== "production") BaseSelect.displayName = "BaseSelect";
const StyledPagination = styled(MUIPagination, {
slot: 'internal'
})(({
theme
}) => ({
[`& .${tablePaginationClasses.selectLabel}`]: {
display: 'none',
[theme.breakpoints.up('sm')]: {
display: 'block'
}
},
[`& .${tablePaginationClasses.input}`]: {
display: 'none',
[theme.breakpoints.up('sm')]: {
display: 'inline-flex'
}
}
}));
const BasePagination = forwardRef(function BasePagination(props, ref) {
const {
onRowsPerPageChange,
material,
disabled
} = props,
other = _objectWithoutPropertiesLoose(props, _excluded2);
const computedProps = React.useMemo(() => {
if (!disabled) {
return undefined;
}
return {
slotProps: {
actions: {
previousButton: {
disabled: true
},
nextButton: {
disabled: true
}
}
}
};
}, [disabled]);
const apiRef = useGridApiContext();
const rootProps = useGridRootProps();
const {
estimatedRowCount
} = rootProps;
return /*#__PURE__*/_jsx(StyledPagination, _extends({
component: "div",
onRowsPerPageChange: useEventCallback(event => {
onRowsPerPageChange?.(Number(event.target.value));
}),
labelRowsPerPage: apiRef.current.getLocaleText('paginationRowsPerPage'),
labelDisplayedRows: params => apiRef.current.getLocaleText('paginationDisplayedRows')(_extends({}, params, {
estimated: estimatedRowCount
})),
getItemAriaLabel: apiRef.current.getLocaleText('paginationItemAriaLabel')
}, computedProps, other, material, {
ref: ref
}));
});
if (process.env.NODE_ENV !== "production") BasePagination.displayName = "BasePagination";
const BaseBadge = forwardRef(function BaseBadge(props, ref) {
const {
material
} = props,
other = _objectWithoutPropertiesLoose(props, _excluded3);
return /*#__PURE__*/_jsx(MUIBadge, _extends({}, other, material, {
ref: ref
}));
});
if (process.env.NODE_ENV !== "production") BaseBadge.displayName = "BaseBadge";
const BaseCheckbox = forwardRef(function BaseCheckbox(props, ref) {
const {
autoFocus,
label,
fullWidth,
slotProps,
className,
material,
inputRef
} = props,
other = _objectWithoutPropertiesLoose(props, _excluded4);
const elementRef = React.useRef(null);
const handleRef = useForkRef(elementRef, ref);
const rippleRef = React.useRef(null);
const combinedInputRef = useForkRef(inputRef, slotProps?.htmlInput?.ref, material?.slotProps?.input?.ref);
React.useEffect(() => {
if (autoFocus) {
const input = elementRef.current?.querySelector('input');
input?.focus({
preventScroll: true
});
} else if (autoFocus === false && rippleRef.current) {
// Only available in @mui/material v5.4.1 or later
// @ts-ignore
rippleRef.current.stop({});
}
}, [autoFocus]);
const checkboxSlotProps = React.useMemo(() => _extends({}, material?.slotProps, {
input: _extends({}, material?.slotProps?.input, slotProps?.htmlInput, {
ref: combinedInputRef
})
}), [material?.slotProps, slotProps?.htmlInput, combinedInputRef]);
if (!label) {
return /*#__PURE__*/_jsx(Checkbox, _extends({}, other, material, {
className: clsx(className, material?.className),
slotProps: checkboxSlotProps,
ref: handleRef,
touchRippleRef: rippleRef
}));
}
return /*#__PURE__*/_jsx(FormControlLabel, {
className: className,
control: /*#__PURE__*/_jsx(Checkbox, _extends({}, other, material, {
slotProps: checkboxSlotProps,
ref: handleRef,
touchRippleRef: rippleRef
})),
label: label,
fullWidth: fullWidth
});
});
if (process.env.NODE_ENV !== "production") BaseCheckbox.displayName = "BaseCheckbox";
const BaseCircularProgress = forwardRef(function BaseCircularProgress(props, ref) {
const {
material
} = props,
other = _objectWithoutPropertiesLoose(props, _excluded5);
return /*#__PURE__*/_jsx(MUICircularProgress, _extends({}, other, material, {
ref: ref
}));
});
if (process.env.NODE_ENV !== "production") BaseCircularProgress.displayName = "BaseCircularProgress";
const BaseDivider = forwardRef(function BaseDivider(props, ref) {
const {
material
} = props,
other = _objectWithoutPropertiesLoose(props, _excluded6);
return /*#__PURE__*/_jsx(MUIDivider, _extends({}, other, material, {
ref: ref
}));
});
if (process.env.NODE_ENV !== "production") BaseDivider.displayName = "BaseDivider";
const BaseLinearProgress = forwardRef(function BaseLinearProgress(props, ref) {
const {
material
} = props,
other = _objectWithoutPropertiesLoose(props, _excluded7);
return /*#__PURE__*/_jsx(MUILinearProgress, _extends({}, other, material, {
ref: ref
}));
});
if (process.env.NODE_ENV !== "production") BaseLinearProgress.displayName = "BaseLinearProgress";
const BaseButton = forwardRef(function BaseButton(props, ref) {
const {
material
} = props,
other = _objectWithoutPropertiesLoose(props, _excluded8);
return /*#__PURE__*/_jsx(MUIButton, _extends({}, other, material, {
ref: ref
}));
});
if (process.env.NODE_ENV !== "production") BaseButton.displayName = "BaseButton";
const StyledToggleButton = styled(MUIToggleButton, {
slot: 'internal'
})(({
theme
}) => ({
gap: theme.spacing(1),
border: 0
}));
const BaseToggleButton = forwardRef(function BaseToggleButton(props, ref) {
const {
material
} = props,
rest = _objectWithoutPropertiesLoose(props, _excluded9);
return /*#__PURE__*/_jsx(StyledToggleButton, _extends({
size: "small",
color: "primary"
}, rest, material, {
ref: ref
}));
});
if (process.env.NODE_ENV !== "production") BaseToggleButton.displayName = "BaseToggleButton";
const BaseChip = forwardRef(function BaseChip(props, ref) {
const {
material
} = props,
other = _objectWithoutPropertiesLoose(props, _excluded0);
return /*#__PURE__*/_jsx(MUIChip, _extends({}, other, material, {
ref: ref
}));
});
if (process.env.NODE_ENV !== "production") BaseChip.displayName = "BaseChip";
const BaseIconButton = forwardRef(function BaseIconButton(props, ref) {
const {
material
} = props,
other = _objectWithoutPropertiesLoose(props, _excluded1);
return /*#__PURE__*/_jsx(MUIIconButton, _extends({}, other, material, {
ref: ref
}));
});
if (process.env.NODE_ENV !== "production") BaseIconButton.displayName = "BaseIconButton";
const BaseTooltip = forwardRef(function BaseTooltip(props, ref) {
const {
material
} = props,
other = _objectWithoutPropertiesLoose(props, _excluded10);
return /*#__PURE__*/_jsx(MUITooltip, _extends({}, other, material, {
ref: ref
}));
});
if (process.env.NODE_ENV !== "production") BaseTooltip.displayName = "BaseTooltip";
const BaseSkeleton = forwardRef(function BaseSkeleton(props, ref) {
const {
material
} = props,
other = _objectWithoutPropertiesLoose(props, _excluded11);
return /*#__PURE__*/_jsx(MUISkeleton, _extends({}, other, material, {
ref: ref
}));
});
if (process.env.NODE_ENV !== "production") BaseSkeleton.displayName = "BaseSkeleton";
const BaseSwitch = forwardRef(function BaseSwitch(props, ref) {
const {
material,
label,
className
} = props,
other = _objectWithoutPropertiesLoose(props, _excluded12);
if (!label) {
return /*#__PURE__*/_jsx(MUISwitch, _extends({}, other, material, {
className: className,
ref: ref
}));
}
return /*#__PURE__*/_jsx(FormControlLabel, {
className: className,
control: /*#__PURE__*/_jsx(MUISwitch, _extends({}, other, material, {
ref: ref
})),
label: label
});
});
if (process.env.NODE_ENV !== "production") BaseSwitch.displayName = "BaseSwitch";
const BaseMenuList = forwardRef(function BaseMenuList(props, ref) {
const {
material
} = props,
other = _objectWithoutPropertiesLoose(props, _excluded13);
return /*#__PURE__*/_jsx(MUIMenuList, _extends({}, other, material, {
ref: ref
}));
});
if (process.env.NODE_ENV !== "production") BaseMenuList.displayName = "BaseMenuList";
function BaseMenuItem(props) {
const {
inert,
iconStart,
iconEnd,
children,
material
} = props,
other = _objectWithoutPropertiesLoose(props, _excluded14);
if (inert) {
other.disableRipple = true;
}
return /*#__PURE__*/React.createElement(MUIMenuItem, _extends({}, other, material), [iconStart && /*#__PURE__*/_jsx(MUIListItemIcon, {
children: iconStart
}, "1"), /*#__PURE__*/_jsx(ListItemText, {
children: children
}, "2"), iconEnd && /*#__PURE__*/_jsx(MUIListItemIcon, {
children: iconEnd
}, "3")]);
}
function BaseModal(props) {
const {
material
} = props,
other = _objectWithoutPropertiesLoose(props, _excluded15);
return /*#__PURE__*/_jsx(MUIModal, _extends({}, other, material));
}
function BaseTextField(props) {
const {
slotProps,
material
} = props,
other = _objectWithoutPropertiesLoose(props, _excluded16);
const theme = useTheme();
const textFieldDefaults = theme.components?.MuiTextField?.defaultProps ?? {};
const computedVariant = other.variant ?? textFieldDefaults.variant ?? 'outlined';
const computedSize = other.size ?? textFieldDefaults.size;
return /*#__PURE__*/_jsx(MUITextField, _extends({
variant: computedVariant,
size: computedSize
}, other, material, {
slotProps: {
htmlInput: slotProps?.htmlInput,
input: transformInputProps(slotProps?.input),
inputLabel: _extends({
shrink: true
}, slotProps?.inputLabel)
}
}));
}
function BaseAutocomplete(props) {
const rootProps = useGridRootProps();
const {
id,
multiple,
freeSolo,
options,
getOptionLabel,
isOptionEqualToValue,
value,
onChange,
label,
placeholder,
slotProps,
material
} = props,
other = _objectWithoutPropertiesLoose(props, _excluded17);
return /*#__PURE__*/_jsx(MUIAutocomplete, _extends({
id: id,
multiple: multiple,
freeSolo: freeSolo,
options: options,
getOptionLabel: getOptionLabel,
isOptionEqualToValue: isOptionEqualToValue,
value: value,
onChange: onChange,
renderValue: (currentValue, getTagProps) => currentValue.map((option, index) => {
const _getTagProps = getTagProps({
index
}),
{
key
} = _getTagProps,
tagProps = _objectWithoutPropertiesLoose(_getTagProps, _excluded18);
return /*#__PURE__*/_jsx(MUIChip, _extends({
variant: "outlined",
size: "small",
label: typeof option === 'string' ? option : getOptionLabel?.(option)
}, tagProps, typeof slotProps?.chip === 'function' ? slotProps.chip(option, index) : slotProps?.chip), key);
}),
renderInput: params => {
const {
slotProps: autocompleteSlotProps
} = params,
inputRest = _objectWithoutPropertiesLoose(params, _excluded19);
const _ref = slotProps?.textField ?? {},
{
slotProps: textFieldSlotProps
} = _ref,
textFieldRest = _objectWithoutPropertiesLoose(_ref, _excluded20);
const _ref2 = rootProps.slotProps?.baseTextField ?? {},
{
slotProps: baseTextFieldSlotProps
} = _ref2,
baseTextFieldRest = _objectWithoutPropertiesLoose(_ref2, _excluded21);
return /*#__PURE__*/_jsx(MUITextField, _extends({}, inputRest, {
label: label,
placeholder: placeholder
}, textFieldRest, baseTextFieldRest, {
slotProps: {
htmlInput: _extends({}, autocompleteSlotProps.htmlInput, textFieldSlotProps?.htmlInput, baseTextFieldSlotProps?.htmlInput),
input: _extends({}, transformInputProps(autocompleteSlotProps.input, false), textFieldSlotProps?.input, baseTextFieldSlotProps?.input),
inputLabel: _extends({
shrink: true
}, autocompleteSlotProps.inputLabel, textFieldSlotProps?.inputLabel, baseTextFieldSlotProps?.inputLabel)
}
}));
}
}, other, material));
}
function BaseInput(props) {
return /*#__PURE__*/_jsx(MUIInputBase, _extends({}, transformInputProps(props)));
}
function transformInputProps(props, wrapAdornments = true) {
if (!props) {
return undefined;
}
const {
slotProps,
material
} = props,
other = _objectWithoutPropertiesLoose(props, _excluded22);
const result = other;
if (wrapAdornments) {
if (result.startAdornment) {
result.startAdornment = /*#__PURE__*/_jsx(InputAdornment, {
position: "start",
children: result.startAdornment
});
}
if (result.endAdornment) {
result.endAdornment = /*#__PURE__*/_jsx(InputAdornment, {
position: "end",
children: result.endAdornment
});
}
}
for (const k in material) {
if (Object.hasOwn(material, k)) {
result[k] = material[k];
}
}
if (slotProps?.htmlInput) {
if (result.inputProps) {
result.inputProps = _extends({}, result.inputProps, slotProps?.htmlInput);
} else {
result.inputProps = slotProps?.htmlInput;
}
}
return result;
}
const BaseTextarea = forwardRef(function BaseTextarea(props, ref) {
const {
material
} = props,
other = _objectWithoutPropertiesLoose(props, _excluded23);
return /*#__PURE__*/_jsx(MUITextareaAutosize, _extends({}, other, material, {
ref: ref
}));
});
if (process.env.NODE_ENV !== "production") BaseTextarea.displayName = "BaseTextarea";
const transformOrigin = {
'bottom-start': 'top left',
'bottom-end': 'top right'
};
const BasePopper = forwardRef(function BasePopper(props, ref) {
const {
open,
children,
className,
flip,
onExited,
onDidShow,
onDidHide,
id,
target,
transition,
placement,
material
} = props,
other = _objectWithoutPropertiesLoose(props, _excluded24);
const modifiers = React.useMemo(() => {
const result = [{
name: 'preventOverflow',
options: {
padding: 8
}
}];
if (flip) {
result.push({
name: 'flip',
enabled: true
});
}
if (onDidShow || onDidHide) {
result.push({
name: 'isPlaced',
enabled: true,
phase: 'main',
fn: () => {
onDidShow?.();
},
effect: () => () => {
onDidHide?.();
}
});
}
return result;
}, [flip, onDidShow, onDidHide]);
let content;
if (!transition) {
content = wrappers(props, children);
} else {
const handleExited = popperOnExited => node => {
if (popperOnExited) {
popperOnExited();
}
if (onExited) {
onExited(node);
}
};
content = p => wrappers(props, /*#__PURE__*/_jsx(MUIGrow, _extends({}, p.TransitionProps, {
style: {
transformOrigin: transformOrigin[p.placement]
},
onExited: handleExited(p.TransitionProps?.onExited),
children: /*#__PURE__*/_jsx(MUIPaper, {
children: children
})
})));
}
return /*#__PURE__*/_jsx(MUIPopper, _extends({
id: id,
className: className,
open: open,
anchorEl: target,
transition: transition,
placement: placement,
modifiers: modifiers
}, other, material, {
ref: ref,
children: content
}));
});
if (process.env.NODE_ENV !== "production") BasePopper.displayName = "BasePopper";
function wrappers(props, content) {
return focusTrapWrapper(props, clickAwayWrapper(props, content));
}
function clickAwayWrapper(props, content) {
if (props.onClickAway === undefined) {
return content;
}
return /*#__PURE__*/_jsx(ClickAwayListener, {
onClickAway: props.onClickAway,
touchEvent: props.clickAwayTouchEvent,
mouseEvent: props.clickAwayMouseEvent,
children: content
});
}
function focusTrapWrapper(props, content) {
if (props.focusTrap === undefined) {
return content;
}
return /*#__PURE__*/_jsx(MUIFocusTrap, {
open: true,
disableEnforceFocus: true,
disableAutoFocus: true,
children: /*#__PURE__*/_jsx("div", {
tabIndex: -1,
children: content
})
});
}
function BaseSelectOption(_ref3) {
let {
native
} = _ref3,
props = _objectWithoutPropertiesLoose(_ref3, _excluded25);
if (native) {
return /*#__PURE__*/_jsx("option", _extends({}, props));
}
return /*#__PURE__*/_jsx(MUIMenuItem, _extends({}, props));
}
const StyledTabs = styled(MUITabs, {
name: 'MuiDataGrid',
slot: 'Tabs'
})(({
theme
}) => ({
borderBottom: `1px solid ${(theme.vars || theme).palette.divider}`
}));
const StyledTab = styled(MUITab, {
name: 'MuiDataGrid',
slot: 'Tab'
})({
flex: 1,
minWidth: 'fit-content'
});
const StyledTabPanel = styled('div', {
name: 'MuiDataGrid',
slot: 'TabPanel'
})({
flex: 1,
display: 'flex',
flexDirection: 'column',
overflow: 'hidden'
});
function TabPanel(props) {
const {
children,
active
} = props,
other = _objectWithoutPropertiesLoose(props, _excluded26);
return /*#__PURE__*/_jsx(StyledTabPanel, _extends({
role: "tabpanel",
style: {
display: active ? 'flex' : 'none'
}
}, other, {
children: children
}));
}
function BaseTabs(_ref4) {
let {
items,
value,
material
} = _ref4,
props = _objectWithoutPropertiesLoose(_ref4, _excluded27);
const id = useId();
const labelId = `${id}-tab-${value}`;
const panelId = `${id}-tabpanel-${value}`;
return /*#__PURE__*/_jsxs(React.Fragment, {
children: [/*#__PURE__*/_jsx(StyledTabs, _extends({}, props, {
value: value,
variant: "scrollable",
scrollButtons: "auto"
}, material, {
children: items.map(item => /*#__PURE__*/_jsx(StyledTab, {
value: item.value,
label: item.label,
id: labelId,
"aria-controls": panelId
}, item.value))
})), items.map(item => /*#__PURE__*/_jsx(TabPanel, {
value: item.value,
active: value === item.value,
id: panelId,
"aria-labelledby": labelId,
children: item.children
}, item.value))]
});
}
const iconSlots = {
booleanCellTrueIcon: GridCheckIcon,
booleanCellFalseIcon: GridCloseIcon,
columnMenuIcon: GridTripleDotsVerticalIcon,
openFilterButtonIcon: GridFilterListIcon,
filterPanelDeleteIcon: GridCloseIcon,
undoIcon: GridUndoIcon,
redoIcon: GridRedoIcon,
columnFilteredIcon: GridFilterAltIcon,
columnSelectorIcon: GridColumnIcon,
columnUnsortedIcon: GridColumnUnsortedIcon,
columnSortedAscendingIcon: GridArrowUpwardIcon,
columnSortedDescendingIcon: GridArrowDownwardIcon,
columnResizeIcon: GridSeparatorIcon,
densityCompactIcon: GridViewHeadlineIcon,
densityStandardIcon: GridTableRowsIcon,
densityComfortableIcon: GridViewStreamIcon,
exportIcon: GridDownloadIcon,
moreActionsIcon: GridMoreVertIcon,
treeDataCollapseIcon: GridExpandMoreIcon,
treeDataExpandIcon: GridKeyboardArrowRight,
groupingCriteriaCollapseIcon: GridExpandMoreIcon,
groupingCriteriaExpandIcon: GridKeyboardArrowRight,
detailPanelExpandIcon: GridAddIcon,
detailPanelCollapseIcon: GridRemoveIcon,
rowReorderIcon: GridDragIcon,
quickFilterIcon: GridSearchIcon,
quickFilterClearIcon: GridClearIcon,
columnMenuHideIcon: GridVisibilityOffIcon,
columnMenuSortAscendingIcon: GridArrowUpwardIcon,
columnMenuSortDescendingIcon: GridArrowDownwardIcon,
columnMenuUnsortIcon: null,
columnMenuFilterIcon: GridFilterAltIcon,
columnMenuManageColumnsIcon: GridViewColumnIcon,
columnMenuClearIcon: GridClearIcon,
loadIcon: GridLoadIcon,
filterPanelAddIcon: GridAddIcon,
filterPanelRemoveAllIcon: GridDeleteForeverIcon,
columnReorderIcon: GridDragIcon,
menuItemCheckIcon: GridCheckIcon,
longTextCellExpandIcon: GridLongTextCellExpandIcon,
longTextCellCollapseIcon: GridLongTextCellCollapseIcon
};
const baseSlots = {
baseAutocomplete: BaseAutocomplete,
baseBadge: BaseBadge,
baseCheckbox: BaseCheckbox,
baseChip: BaseChip,
baseCircularProgress: BaseCircularProgress,
baseDivider: BaseDivider,
baseInput: BaseInput,
baseTextarea: BaseTextarea,
baseLinearProgress: BaseLinearProgress,
baseMenuList: BaseMenuList,
baseMenuItem: BaseMenuItem,
baseModal: BaseModal,
baseTextField: BaseTextField,
baseButton: BaseButton,
baseIconButton: BaseIconButton,
baseToggleButton: BaseToggleButton,
baseTooltip: BaseTooltip,
baseTabs: BaseTabs,
basePagination: BasePagination,
basePopper: BasePopper,
baseSelect: BaseSelect,
baseSelectOption: BaseSelectOption,
baseSkeleton: BaseSkeleton,
baseSwitch: BaseSwitch
};
const materialSlots = _extends({}, baseSlots, iconSlots);
export default materialSlots;
+5
View File
@@ -0,0 +1,5 @@
import type { GridCSSVariablesInterface } from "../constants/cssVariables.mjs";
export declare function useMaterialCSSVariables(): {
id: string;
variables: GridCSSVariablesInterface;
};
+5
View File
@@ -0,0 +1,5 @@
import type { GridCSSVariablesInterface } from "../constants/cssVariables.js";
export declare function useMaterialCSSVariables(): {
id: string;
variables: GridCSSVariablesInterface;
};
+138
View File
@@ -0,0 +1,138 @@
"use strict";
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.useMaterialCSSVariables = useMaterialCSSVariables;
var React = _interopRequireWildcard(require("react"));
var _styles = require("@mui/material/styles");
var _hash = require("@mui/x-internals/hash");
var _cssVariables = require("../constants/cssVariables");
var _GridRootStyles = require("../components/containers/GridRootStyles");
function useMaterialCSSVariables() {
const theme = (0, _styles.useTheme)();
return React.useMemo(() => {
const id = (0, _hash.hash)(stringifyTheme(theme));
const variables = transformTheme(theme);
return {
id,
variables
};
}, [theme]);
}
function transformTheme(t) {
const borderColor = getBorderColor(t);
const dataGridPalette = (t.vars || t).palette.DataGrid;
const paperColor = (t.vars || t).palette.background.paper;
const backgroundBase = dataGridPalette?.bg ?? (t.palette.mode === 'dark' ? (0, _GridRootStyles.colorMixIfSupported)(`color-mix(in srgb, ${paperColor} 95%, #fff)`, paperColor) : paperColor);
const backgroundHeader = dataGridPalette?.headerBg ?? backgroundBase;
const backgroundPinned = dataGridPalette?.pinnedBg ?? backgroundBase;
const backgroundBackdrop = t.alpha((t.vars || t).palette.background.default, (t.vars || t).palette.action.disabledOpacity);
const backgroundOverlay = t.palette.mode === 'dark' ? (0, _GridRootStyles.colorMixIfSupported)(`color-mix(in srgb, ${paperColor} 90%, #fff)`, paperColor) : paperColor;
const selectedColor = (t.vars || t).palette.primary.main;
const radius = getRadius(t);
const fontBody = t.vars?.font?.body2 ?? formatFont(t.typography.body2);
const fontSmall = t.vars?.font?.caption ?? formatFont(t.typography.caption);
const fontLarge = t.vars?.font?.body1 ?? formatFont(t.typography.body1);
const k = _cssVariables.vars.keys;
return {
[k.spacingUnit]: t.vars ? t.vars.spacing ?? t.spacing(1) : t.spacing(1),
[k.colors.border.base]: borderColor,
[k.colors.background.base]: backgroundBase,
[k.colors.background.overlay]: backgroundOverlay,
[k.colors.background.backdrop]: backgroundBackdrop,
[k.colors.foreground.base]: (t.vars || t).palette.text.primary,
[k.colors.foreground.muted]: (t.vars || t).palette.text.secondary,
[k.colors.foreground.accent]: (t.vars || t).palette.primary.dark,
[k.colors.foreground.disabled]: (t.vars || t).palette.text.disabled,
[k.colors.foreground.error]: (t.vars || t).palette.error.dark,
[k.colors.interactive.hover]: _GridRootStyles.supportsColorMix ? (t.vars || t).palette.action.hover : (t.vars || t).palette.grey[t.palette.mode === 'dark' ? 800 : 100],
[k.colors.interactive.hoverOpacity]: (t.vars || t).palette.action.hoverOpacity,
[k.colors.interactive.focus]: removeOpacity((t.vars || t).palette.primary.main),
[k.colors.interactive.focusOpacity]: (t.vars || t).palette.action.focusOpacity,
[k.colors.interactive.disabled]: removeOpacity((t.vars || t).palette.action.disabled),
[k.colors.interactive.disabledOpacity]: (t.vars || t).palette.action.disabledOpacity,
[k.colors.interactive.selected]: _GridRootStyles.supportsColorMix ? selectedColor : (t.vars || t).palette.grey[t.palette.mode === 'dark' ? 700 : 200],
[k.colors.interactive.selectedOpacity]: (t.vars || t).palette.action.selectedOpacity,
[k.header.background.base]: backgroundHeader,
[k.cell.background.pinned]: backgroundPinned,
[k.radius.base]: radius,
[k.typography.fontFamily.base]: t.typography.fontFamily,
[k.typography.fontWeight.light]: t.typography.fontWeightLight,
[k.typography.fontWeight.regular]: t.typography.fontWeightRegular,
[k.typography.fontWeight.medium]: t.typography.fontWeightMedium,
[k.typography.fontWeight.bold]: t.typography.fontWeightBold,
[k.typography.font.body]: fontBody,
[k.typography.font.small]: fontSmall,
[k.typography.font.large]: fontLarge,
[k.transitions.easing.easeIn]: t.transitions.easing.easeIn,
[k.transitions.easing.easeOut]: t.transitions.easing.easeOut,
[k.transitions.easing.easeInOut]: t.transitions.easing.easeInOut,
[k.transitions.duration.short]: `${t.transitions.duration.shorter}ms`,
[k.transitions.duration.base]: `${t.transitions.duration.short}ms`,
[k.transitions.duration.long]: `${t.transitions.duration.standard}ms`,
[k.shadows.base]: (t.vars || t).shadows[2],
[k.shadows.overlay]: (t.vars || t).shadows[8],
[k.zIndex.panel]: (t.vars || t).zIndex.modal,
[k.zIndex.menu]: (t.vars || t).zIndex.modal,
[k.zIndex.modal]: (t.vars || t).zIndex.modal
};
}
function getRadius(theme) {
if (theme.vars) {
return theme.vars.shape.borderRadius;
}
return typeof theme.shape.borderRadius === 'number' ? `${theme.shape.borderRadius}px` : theme.shape.borderRadius;
}
function getBorderColor(theme) {
if (theme.vars) {
return theme.vars.palette.TableCell.border;
}
if (theme.palette.mode === 'light') {
return theme.lighten(theme.alpha(theme.palette.divider, 1), 0.88);
}
return theme.darken(theme.alpha(theme.palette.divider, 1), 0.68);
}
function setOpacity(color, opacity) {
return `rgba(from ${color} r g b / ${opacity})`;
}
function removeOpacity(color) {
return setOpacity(color, 1);
}
function formatFont(font) {
// Accounts for disabled typography variants
// See: https://github.com/mui/mui-x/issues/17812
if (!font) {
return undefined;
}
const fontSize = typeof font.fontSize === 'number' ? `${font.fontSize}px` : font.fontSize;
return `${font.fontWeight} ${fontSize} / ${font.lineHeight} ${font.fontFamily}`;
}
/**
* A version of JSON.stringify for theme objects.
* Fixes: https://github.com/mui/mui-x/issues/17521
* Source: https://www.30secondsofcode.org/js/s/stringify-circular-json/
*/
function stringifyTheme(input) {
const seen = new WeakSet();
return JSON.stringify(input, (_, v) => {
// https://github.com/mui/mui-x/issues/17855
if (typeof window !== 'undefined' && v === window || typeof document !== 'undefined' && v === document) {
return v.toString();
}
if (v !== null && typeof v === 'object') {
// Do not attempt to serialize React elements due to performance concerns.
// Fixes https://github.com/mui/mui-x/issues/19414
if (/*#__PURE__*/React.isValidElement(v)) {
return null;
}
if (seen.has(v)) {
return null;
}
seen.add(v);
}
return v;
});
}
+131
View File
@@ -0,0 +1,131 @@
import * as React from 'react';
import { useTheme } from '@mui/material/styles';
import { hash } from '@mui/x-internals/hash';
import { vars } from "../constants/cssVariables.mjs";
import { colorMixIfSupported, supportsColorMix } from "../components/containers/GridRootStyles.mjs";
export function useMaterialCSSVariables() {
const theme = useTheme();
return React.useMemo(() => {
const id = hash(stringifyTheme(theme));
const variables = transformTheme(theme);
return {
id,
variables
};
}, [theme]);
}
function transformTheme(t) {
const borderColor = getBorderColor(t);
const dataGridPalette = (t.vars || t).palette.DataGrid;
const paperColor = (t.vars || t).palette.background.paper;
const backgroundBase = dataGridPalette?.bg ?? (t.palette.mode === 'dark' ? colorMixIfSupported(`color-mix(in srgb, ${paperColor} 95%, #fff)`, paperColor) : paperColor);
const backgroundHeader = dataGridPalette?.headerBg ?? backgroundBase;
const backgroundPinned = dataGridPalette?.pinnedBg ?? backgroundBase;
const backgroundBackdrop = t.alpha((t.vars || t).palette.background.default, (t.vars || t).palette.action.disabledOpacity);
const backgroundOverlay = t.palette.mode === 'dark' ? colorMixIfSupported(`color-mix(in srgb, ${paperColor} 90%, #fff)`, paperColor) : paperColor;
const selectedColor = (t.vars || t).palette.primary.main;
const radius = getRadius(t);
const fontBody = t.vars?.font?.body2 ?? formatFont(t.typography.body2);
const fontSmall = t.vars?.font?.caption ?? formatFont(t.typography.caption);
const fontLarge = t.vars?.font?.body1 ?? formatFont(t.typography.body1);
const k = vars.keys;
return {
[k.spacingUnit]: t.vars ? t.vars.spacing ?? t.spacing(1) : t.spacing(1),
[k.colors.border.base]: borderColor,
[k.colors.background.base]: backgroundBase,
[k.colors.background.overlay]: backgroundOverlay,
[k.colors.background.backdrop]: backgroundBackdrop,
[k.colors.foreground.base]: (t.vars || t).palette.text.primary,
[k.colors.foreground.muted]: (t.vars || t).palette.text.secondary,
[k.colors.foreground.accent]: (t.vars || t).palette.primary.dark,
[k.colors.foreground.disabled]: (t.vars || t).palette.text.disabled,
[k.colors.foreground.error]: (t.vars || t).palette.error.dark,
[k.colors.interactive.hover]: supportsColorMix ? (t.vars || t).palette.action.hover : (t.vars || t).palette.grey[t.palette.mode === 'dark' ? 800 : 100],
[k.colors.interactive.hoverOpacity]: (t.vars || t).palette.action.hoverOpacity,
[k.colors.interactive.focus]: removeOpacity((t.vars || t).palette.primary.main),
[k.colors.interactive.focusOpacity]: (t.vars || t).palette.action.focusOpacity,
[k.colors.interactive.disabled]: removeOpacity((t.vars || t).palette.action.disabled),
[k.colors.interactive.disabledOpacity]: (t.vars || t).palette.action.disabledOpacity,
[k.colors.interactive.selected]: supportsColorMix ? selectedColor : (t.vars || t).palette.grey[t.palette.mode === 'dark' ? 700 : 200],
[k.colors.interactive.selectedOpacity]: (t.vars || t).palette.action.selectedOpacity,
[k.header.background.base]: backgroundHeader,
[k.cell.background.pinned]: backgroundPinned,
[k.radius.base]: radius,
[k.typography.fontFamily.base]: t.typography.fontFamily,
[k.typography.fontWeight.light]: t.typography.fontWeightLight,
[k.typography.fontWeight.regular]: t.typography.fontWeightRegular,
[k.typography.fontWeight.medium]: t.typography.fontWeightMedium,
[k.typography.fontWeight.bold]: t.typography.fontWeightBold,
[k.typography.font.body]: fontBody,
[k.typography.font.small]: fontSmall,
[k.typography.font.large]: fontLarge,
[k.transitions.easing.easeIn]: t.transitions.easing.easeIn,
[k.transitions.easing.easeOut]: t.transitions.easing.easeOut,
[k.transitions.easing.easeInOut]: t.transitions.easing.easeInOut,
[k.transitions.duration.short]: `${t.transitions.duration.shorter}ms`,
[k.transitions.duration.base]: `${t.transitions.duration.short}ms`,
[k.transitions.duration.long]: `${t.transitions.duration.standard}ms`,
[k.shadows.base]: (t.vars || t).shadows[2],
[k.shadows.overlay]: (t.vars || t).shadows[8],
[k.zIndex.panel]: (t.vars || t).zIndex.modal,
[k.zIndex.menu]: (t.vars || t).zIndex.modal,
[k.zIndex.modal]: (t.vars || t).zIndex.modal
};
}
function getRadius(theme) {
if (theme.vars) {
return theme.vars.shape.borderRadius;
}
return typeof theme.shape.borderRadius === 'number' ? `${theme.shape.borderRadius}px` : theme.shape.borderRadius;
}
function getBorderColor(theme) {
if (theme.vars) {
return theme.vars.palette.TableCell.border;
}
if (theme.palette.mode === 'light') {
return theme.lighten(theme.alpha(theme.palette.divider, 1), 0.88);
}
return theme.darken(theme.alpha(theme.palette.divider, 1), 0.68);
}
function setOpacity(color, opacity) {
return `rgba(from ${color} r g b / ${opacity})`;
}
function removeOpacity(color) {
return setOpacity(color, 1);
}
function formatFont(font) {
// Accounts for disabled typography variants
// See: https://github.com/mui/mui-x/issues/17812
if (!font) {
return undefined;
}
const fontSize = typeof font.fontSize === 'number' ? `${font.fontSize}px` : font.fontSize;
return `${font.fontWeight} ${fontSize} / ${font.lineHeight} ${font.fontFamily}`;
}
/**
* A version of JSON.stringify for theme objects.
* Fixes: https://github.com/mui/mui-x/issues/17521
* Source: https://www.30secondsofcode.org/js/s/stringify-circular-json/
*/
function stringifyTheme(input) {
const seen = new WeakSet();
return JSON.stringify(input, (_, v) => {
// https://github.com/mui/mui-x/issues/17855
if (typeof window !== 'undefined' && v === window || typeof document !== 'undefined' && v === document) {
return v.toString();
}
if (v !== null && typeof v === 'object') {
// Do not attempt to serialize React elements due to performance concerns.
// Fixes https://github.com/mui/mui-x/issues/19414
if (/*#__PURE__*/React.isValidElement(v)) {
return null;
}
if (seen.has(v)) {
return null;
}
seen.add(v);
}
return v;
});
}