@mui/x-data-grid 9.4.0 → 9.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/CHANGELOG.md +100 -0
  2. package/colDef/gridColumnTypesRegistry.d.mts +8 -0
  3. package/colDef/gridColumnTypesRegistry.d.ts +8 -0
  4. package/colDef/gridColumnTypesRegistry.js +44 -0
  5. package/colDef/gridColumnTypesRegistry.mjs +34 -0
  6. package/colDef/gridDefaultColumnTypes.d.mts +1 -1
  7. package/colDef/gridDefaultColumnTypes.d.ts +1 -1
  8. package/colDef/gridDefaultColumnTypes.js +11 -23
  9. package/colDef/gridDefaultColumnTypes.mjs +4 -22
  10. package/components/cell/GridActionsCell.js +1 -1
  11. package/components/cell/GridActionsCell.mjs +1 -1
  12. package/components/cell/GridLongTextCell.js +2 -0
  13. package/components/cell/GridLongTextCell.mjs +2 -0
  14. package/components/containers/GridRootStyles.js +29 -0
  15. package/components/containers/GridRootStyles.mjs +29 -0
  16. package/components/panel/filterPanel/GridFilterInputSingleSelect.js +2 -4
  17. package/components/panel/filterPanel/GridFilterInputSingleSelect.mjs +2 -4
  18. package/components/panel/filterPanel/filterPanelUtils.d.mts +3 -2
  19. package/components/panel/filterPanel/filterPanelUtils.d.ts +3 -2
  20. package/components/panel/filterPanel/filterPanelUtils.js +4 -0
  21. package/components/panel/filterPanel/filterPanelUtils.mjs +3 -0
  22. package/constants/cssVariables.d.mts +3 -0
  23. package/constants/cssVariables.d.ts +3 -0
  24. package/constants/cssVariables.js +2 -1
  25. package/constants/cssVariables.mjs +2 -1
  26. package/constants/gridClasses.d.mts +48 -0
  27. package/constants/gridClasses.d.ts +48 -0
  28. package/constants/gridClasses.js +1 -1
  29. package/constants/gridClasses.mjs +1 -1
  30. package/hooks/core/useGridProps.js +5 -3
  31. package/hooks/core/useGridProps.mjs +5 -3
  32. package/hooks/features/columns/gridColumnsUtils.js +18 -10
  33. package/hooks/features/columns/gridColumnsUtils.mjs +19 -11
  34. package/hooks/features/columns/useGridColumns.js +11 -0
  35. package/hooks/features/columns/useGridColumns.mjs +11 -0
  36. package/hooks/features/dataSource/useGridDataSourceBase.js +2 -2
  37. package/hooks/features/dataSource/useGridDataSourceBase.mjs +2 -2
  38. package/hooks/features/editing/useGridCellEditing.js +1 -1
  39. package/hooks/features/editing/useGridCellEditing.mjs +1 -1
  40. package/hooks/features/editing/useGridRowEditing.js +1 -1
  41. package/hooks/features/editing/useGridRowEditing.mjs +1 -1
  42. package/hooks/features/export/serializers/csvSerializer.js +3 -1
  43. package/hooks/features/export/serializers/csvSerializer.mjs +3 -1
  44. package/hooks/features/filter/gridFilterUtils.js +5 -3
  45. package/hooks/features/filter/gridFilterUtils.mjs +5 -3
  46. package/hooks/features/listView/useGridListView.js +1 -1
  47. package/hooks/features/listView/useGridListView.mjs +1 -1
  48. package/hooks/features/sorting/gridSortingUtils.js +3 -1
  49. package/hooks/features/sorting/gridSortingUtils.mjs +3 -1
  50. package/hooks/utils/useGridSelector.js +26 -23
  51. package/hooks/utils/useGridSelector.mjs +25 -23
  52. package/index.js +1 -1
  53. package/index.mjs +1 -1
  54. package/internals/index.d.mts +9 -4
  55. package/internals/index.d.ts +9 -4
  56. package/internals/index.js +62 -2
  57. package/internals/index.mjs +8 -4
  58. package/internals/utils/propValidation.js +3 -0
  59. package/internals/utils/propValidation.mjs +3 -0
  60. package/material/augmentation.d.mts +4 -0
  61. package/material/augmentation.d.ts +4 -0
  62. package/material/index.js +38 -24
  63. package/material/index.mjs +38 -24
  64. package/material/variables.js +2 -1
  65. package/material/variables.mjs +2 -1
  66. package/models/colDef/gridColDef.d.mts +35 -3
  67. package/models/colDef/gridColDef.d.ts +35 -3
  68. package/models/colDef/gridColType.d.mts +1 -0
  69. package/models/colDef/gridColType.d.ts +1 -0
  70. package/models/colDef/gridColumnTypesRecord.d.mts +1 -1
  71. package/models/colDef/gridColumnTypesRecord.d.ts +1 -1
  72. package/models/colDef/index.d.mts +1 -1
  73. package/models/colDef/index.d.ts +1 -1
  74. package/models/gridBaseSlots.d.mts +46 -0
  75. package/models/gridBaseSlots.d.ts +46 -0
  76. package/models/gridSlotsComponent.d.mts +5 -0
  77. package/models/gridSlotsComponent.d.ts +5 -0
  78. package/models/gridSlotsComponentsProps.d.mts +3 -1
  79. package/models/gridSlotsComponentsProps.d.ts +3 -1
  80. package/models/gridStateCommunity.d.mts +1 -1
  81. package/models/gridStateCommunity.d.ts +1 -1
  82. package/package.json +3 -3
package/material/index.js CHANGED
@@ -32,6 +32,7 @@ var _ListItemIcon = _interopRequireDefault(require("@mui/material/ListItemIcon")
32
32
  var _ListItemText = _interopRequireWildcard(require("@mui/material/ListItemText"));
33
33
  var _MenuList = _interopRequireDefault(require("@mui/material/MenuList"));
34
34
  var _MenuItem = _interopRequireDefault(require("@mui/material/MenuItem"));
35
+ var _Modal = _interopRequireDefault(require("@mui/material/Modal"));
35
36
  var _TextField = _interopRequireDefault(require("@mui/material/TextField"));
36
37
  var _TextareaAutosize = _interopRequireDefault(require("@mui/material/TextareaAutosize"));
37
38
  var _FormControl = _interopRequireDefault(require("@mui/material/FormControl"));
@@ -61,7 +62,7 @@ var _useGridRootProps = require("../hooks/utils/useGridRootProps");
61
62
  require("./augmentation");
62
63
  var _jsxRuntime = require("react/jsx-runtime");
63
64
  var _variables = require("./variables");
64
- const _excluded = ["id", "label", "labelId", "material", "disabled", "slotProps", "onChange", "onKeyDown", "onOpen", "onClose", "size", "style", "fullWidth"],
65
+ const _excluded = ["id", "label", "labelId", "material", "disabled", "multiple", "slotProps", "onChange", "onKeyDown", "onOpen", "onClose", "renderValue", "size", "style", "fullWidth"],
65
66
  _excluded2 = ["onRowsPerPageChange", "material", "disabled"],
66
67
  _excluded3 = ["material"],
67
68
  _excluded4 = ["autoFocus", "label", "fullWidth", "slotProps", "className", "material", "inputRef"],
@@ -77,18 +78,19 @@ const _excluded = ["id", "label", "labelId", "material", "disabled", "slotProps"
77
78
  _excluded12 = ["material", "label", "className"],
78
79
  _excluded13 = ["material"],
79
80
  _excluded14 = ["inert", "iconStart", "iconEnd", "children", "material"],
80
- _excluded15 = ["slotProps", "material"],
81
- _excluded16 = ["id", "multiple", "freeSolo", "options", "getOptionLabel", "isOptionEqualToValue", "value", "onChange", "label", "placeholder", "slotProps", "material"],
82
- _excluded17 = ["key"],
83
- _excluded18 = ["slotProps"],
81
+ _excluded15 = ["material"],
82
+ _excluded16 = ["slotProps", "material"],
83
+ _excluded17 = ["id", "multiple", "freeSolo", "options", "getOptionLabel", "isOptionEqualToValue", "value", "onChange", "label", "placeholder", "slotProps", "material"],
84
+ _excluded18 = ["key"],
84
85
  _excluded19 = ["slotProps"],
85
86
  _excluded20 = ["slotProps"],
86
- _excluded21 = ["slotProps", "material"],
87
- _excluded22 = ["material"],
88
- _excluded23 = ["ref", "open", "children", "className", "clickAwayTouchEvent", "clickAwayMouseEvent", "flip", "focusTrap", "onExited", "onClickAway", "onDidShow", "onDidHide", "id", "target", "transition", "placement", "material"],
89
- _excluded24 = ["native"],
90
- _excluded25 = ["children", "value", "active"],
91
- _excluded26 = ["items", "value", "material"];
87
+ _excluded21 = ["slotProps"],
88
+ _excluded22 = ["slotProps", "material"],
89
+ _excluded23 = ["material"],
90
+ _excluded24 = ["ref", "open", "children", "className", "clickAwayTouchEvent", "clickAwayMouseEvent", "flip", "focusTrap", "onExited", "onClickAway", "onDidShow", "onDidHide", "id", "target", "transition", "placement", "material"],
91
+ _excluded25 = ["native"],
92
+ _excluded26 = ["children", "value", "active"],
93
+ _excluded27 = ["items", "value", "material"];
92
94
  /* eslint-disable mui/disallow-react-api-in-server-components */
93
95
 
94
96
  const InputAdornment = (0, _styles.styled)(_InputAdornment.default, {
@@ -155,11 +157,13 @@ const BaseSelect = (0, _forwardRef.forwardRef)(function BaseSelect(props, ref) {
155
157
  labelId,
156
158
  material,
157
159
  disabled,
160
+ multiple,
158
161
  slotProps,
159
162
  onChange,
160
163
  onKeyDown,
161
164
  onOpen,
162
165
  onClose,
166
+ renderValue,
163
167
  size,
164
168
  style,
165
169
  fullWidth
@@ -196,7 +200,9 @@ const BaseSelect = (0, _forwardRef.forwardRef)(function BaseSelect(props, ref) {
196
200
  labelId: labelId,
197
201
  label: label,
198
202
  displayEmpty: true,
203
+ multiple: multiple,
199
204
  onChange: onChange,
205
+ renderValue: renderValue,
200
206
  variant: computedVariant
201
207
  }, other, {
202
208
  inputProps: slotProps?.htmlInput,
@@ -484,12 +490,19 @@ function BaseMenuItem(props) {
484
490
  children: iconEnd
485
491
  }, "3")]);
486
492
  }
493
+ function BaseModal(props) {
494
+ const {
495
+ material
496
+ } = props,
497
+ other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded15);
498
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Modal.default, (0, _extends2.default)({}, other, material));
499
+ }
487
500
  function BaseTextField(props) {
488
501
  const {
489
502
  slotProps,
490
503
  material
491
504
  } = props,
492
- other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded15);
505
+ other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded16);
493
506
  const theme = (0, _styles.useTheme)();
494
507
  const textFieldDefaults = theme.components?.MuiTextField?.defaultProps ?? {};
495
508
  const computedVariant = other.variant ?? textFieldDefaults.variant ?? 'outlined';
@@ -523,7 +536,7 @@ function BaseAutocomplete(props) {
523
536
  slotProps,
524
537
  material
525
538
  } = props,
526
- other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded16);
539
+ other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded17);
527
540
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Autocomplete.default, (0, _extends2.default)({
528
541
  id: id,
529
542
  multiple: multiple,
@@ -540,28 +553,28 @@ function BaseAutocomplete(props) {
540
553
  {
541
554
  key
542
555
  } = _getTagProps,
543
- tagProps = (0, _objectWithoutPropertiesLoose2.default)(_getTagProps, _excluded17);
556
+ tagProps = (0, _objectWithoutPropertiesLoose2.default)(_getTagProps, _excluded18);
544
557
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Chip.default, (0, _extends2.default)({
545
558
  variant: "outlined",
546
559
  size: "small",
547
560
  label: typeof option === 'string' ? option : getOptionLabel?.(option)
548
- }, tagProps), key);
561
+ }, tagProps, typeof slotProps?.chip === 'function' ? slotProps.chip(option, index) : slotProps?.chip), key);
549
562
  }),
550
563
  renderInput: params => {
551
564
  const {
552
565
  slotProps: autocompleteSlotProps
553
566
  } = params,
554
- inputRest = (0, _objectWithoutPropertiesLoose2.default)(params, _excluded18);
567
+ inputRest = (0, _objectWithoutPropertiesLoose2.default)(params, _excluded19);
555
568
  const _ref = slotProps?.textField ?? {},
556
569
  {
557
570
  slotProps: textFieldSlotProps
558
571
  } = _ref,
559
- textFieldRest = (0, _objectWithoutPropertiesLoose2.default)(_ref, _excluded19);
572
+ textFieldRest = (0, _objectWithoutPropertiesLoose2.default)(_ref, _excluded20);
560
573
  const _ref2 = rootProps.slotProps?.baseTextField ?? {},
561
574
  {
562
575
  slotProps: baseTextFieldSlotProps
563
576
  } = _ref2,
564
- baseTextFieldRest = (0, _objectWithoutPropertiesLoose2.default)(_ref2, _excluded20);
577
+ baseTextFieldRest = (0, _objectWithoutPropertiesLoose2.default)(_ref2, _excluded21);
565
578
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_TextField.default, (0, _extends2.default)({}, inputRest, {
566
579
  label: label,
567
580
  placeholder: placeholder
@@ -588,7 +601,7 @@ function transformInputProps(props, wrapAdornments = true) {
588
601
  slotProps,
589
602
  material
590
603
  } = props,
591
- other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded21);
604
+ other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded22);
592
605
  const result = other;
593
606
  if (wrapAdornments) {
594
607
  if (result.startAdornment) {
@@ -622,7 +635,7 @@ const BaseTextarea = (0, _forwardRef.forwardRef)(function BaseTextarea(props, re
622
635
  const {
623
636
  material
624
637
  } = props,
625
- other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded22);
638
+ other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded23);
626
639
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_TextareaAutosize.default, (0, _extends2.default)({}, other, material, {
627
640
  ref: ref
628
641
  }));
@@ -647,7 +660,7 @@ function BasePopper(props) {
647
660
  placement,
648
661
  material
649
662
  } = props,
650
- other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded23);
663
+ other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded24);
651
664
  const modifiers = React.useMemo(() => {
652
665
  const result = [{
653
666
  name: 'preventOverflow',
@@ -742,7 +755,7 @@ function BaseSelectOption(_ref3) {
742
755
  let {
743
756
  native
744
757
  } = _ref3,
745
- props = (0, _objectWithoutPropertiesLoose2.default)(_ref3, _excluded24);
758
+ props = (0, _objectWithoutPropertiesLoose2.default)(_ref3, _excluded25);
746
759
  if (native) {
747
760
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("option", (0, _extends2.default)({}, props));
748
761
  }
@@ -777,7 +790,7 @@ function TabPanel(props) {
777
790
  children,
778
791
  active
779
792
  } = props,
780
- other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded25);
793
+ other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded26);
781
794
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledTabPanel, (0, _extends2.default)({
782
795
  role: "tabpanel",
783
796
  style: {
@@ -793,7 +806,7 @@ function BaseTabs(_ref4) {
793
806
  value,
794
807
  material
795
808
  } = _ref4,
796
- props = (0, _objectWithoutPropertiesLoose2.default)(_ref4, _excluded26);
809
+ props = (0, _objectWithoutPropertiesLoose2.default)(_ref4, _excluded27);
797
810
  const id = (0, _useId.default)();
798
811
  const labelId = `${id}-tab-${value}`;
799
812
  const panelId = `${id}-tabpanel-${value}`;
@@ -873,6 +886,7 @@ const baseSlots = {
873
886
  baseLinearProgress: BaseLinearProgress,
874
887
  baseMenuList: BaseMenuList,
875
888
  baseMenuItem: BaseMenuItem,
889
+ baseModal: BaseModal,
876
890
  baseTextField: BaseTextField,
877
891
  baseButton: BaseButton,
878
892
  baseIconButton: BaseIconButton,
@@ -1,6 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
- const _excluded = ["id", "label", "labelId", "material", "disabled", "slotProps", "onChange", "onKeyDown", "onOpen", "onClose", "size", "style", "fullWidth"],
3
+ const _excluded = ["id", "label", "labelId", "material", "disabled", "multiple", "slotProps", "onChange", "onKeyDown", "onOpen", "onClose", "renderValue", "size", "style", "fullWidth"],
4
4
  _excluded2 = ["onRowsPerPageChange", "material", "disabled"],
5
5
  _excluded3 = ["material"],
6
6
  _excluded4 = ["autoFocus", "label", "fullWidth", "slotProps", "className", "material", "inputRef"],
@@ -16,18 +16,19 @@ const _excluded = ["id", "label", "labelId", "material", "disabled", "slotProps"
16
16
  _excluded12 = ["material", "label", "className"],
17
17
  _excluded13 = ["material"],
18
18
  _excluded14 = ["inert", "iconStart", "iconEnd", "children", "material"],
19
- _excluded15 = ["slotProps", "material"],
20
- _excluded16 = ["id", "multiple", "freeSolo", "options", "getOptionLabel", "isOptionEqualToValue", "value", "onChange", "label", "placeholder", "slotProps", "material"],
21
- _excluded17 = ["key"],
22
- _excluded18 = ["slotProps"],
19
+ _excluded15 = ["material"],
20
+ _excluded16 = ["slotProps", "material"],
21
+ _excluded17 = ["id", "multiple", "freeSolo", "options", "getOptionLabel", "isOptionEqualToValue", "value", "onChange", "label", "placeholder", "slotProps", "material"],
22
+ _excluded18 = ["key"],
23
23
  _excluded19 = ["slotProps"],
24
24
  _excluded20 = ["slotProps"],
25
- _excluded21 = ["slotProps", "material"],
26
- _excluded22 = ["material"],
27
- _excluded23 = ["ref", "open", "children", "className", "clickAwayTouchEvent", "clickAwayMouseEvent", "flip", "focusTrap", "onExited", "onClickAway", "onDidShow", "onDidHide", "id", "target", "transition", "placement", "material"],
28
- _excluded24 = ["native"],
29
- _excluded25 = ["children", "value", "active"],
30
- _excluded26 = ["items", "value", "material"];
25
+ _excluded21 = ["slotProps"],
26
+ _excluded22 = ["slotProps", "material"],
27
+ _excluded23 = ["material"],
28
+ _excluded24 = ["ref", "open", "children", "className", "clickAwayTouchEvent", "clickAwayMouseEvent", "flip", "focusTrap", "onExited", "onClickAway", "onDidShow", "onDidHide", "id", "target", "transition", "placement", "material"],
29
+ _excluded25 = ["native"],
30
+ _excluded26 = ["children", "value", "active"],
31
+ _excluded27 = ["items", "value", "material"];
31
32
  import * as React from 'react';
32
33
  import clsx from 'clsx';
33
34
  import useForkRef from '@mui/utils/useForkRef';
@@ -46,6 +47,7 @@ import MUIListItemIcon from '@mui/material/ListItemIcon';
46
47
  import MUIListItemText, { listItemTextClasses } from '@mui/material/ListItemText';
47
48
  import MUIMenuList from '@mui/material/MenuList';
48
49
  import MUIMenuItem from '@mui/material/MenuItem';
50
+ import MUIModal from '@mui/material/Modal';
49
51
  import MUITextField from '@mui/material/TextField';
50
52
  import MUITextareaAutosize from '@mui/material/TextareaAutosize';
51
53
  import MUIFormControl from '@mui/material/FormControl';
@@ -142,11 +144,13 @@ const BaseSelect = forwardRef(function BaseSelect(props, ref) {
142
144
  labelId,
143
145
  material,
144
146
  disabled,
147
+ multiple,
145
148
  slotProps,
146
149
  onChange,
147
150
  onKeyDown,
148
151
  onOpen,
149
152
  onClose,
153
+ renderValue,
150
154
  size,
151
155
  style,
152
156
  fullWidth
@@ -183,7 +187,9 @@ const BaseSelect = forwardRef(function BaseSelect(props, ref) {
183
187
  labelId: labelId,
184
188
  label: label,
185
189
  displayEmpty: true,
190
+ multiple: multiple,
186
191
  onChange: onChange,
192
+ renderValue: renderValue,
187
193
  variant: computedVariant
188
194
  }, other, {
189
195
  inputProps: slotProps?.htmlInput,
@@ -471,12 +477,19 @@ function BaseMenuItem(props) {
471
477
  children: iconEnd
472
478
  }, "3")]);
473
479
  }
480
+ function BaseModal(props) {
481
+ const {
482
+ material
483
+ } = props,
484
+ other = _objectWithoutPropertiesLoose(props, _excluded15);
485
+ return /*#__PURE__*/_jsx(MUIModal, _extends({}, other, material));
486
+ }
474
487
  function BaseTextField(props) {
475
488
  const {
476
489
  slotProps,
477
490
  material
478
491
  } = props,
479
- other = _objectWithoutPropertiesLoose(props, _excluded15);
492
+ other = _objectWithoutPropertiesLoose(props, _excluded16);
480
493
  const theme = useTheme();
481
494
  const textFieldDefaults = theme.components?.MuiTextField?.defaultProps ?? {};
482
495
  const computedVariant = other.variant ?? textFieldDefaults.variant ?? 'outlined';
@@ -510,7 +523,7 @@ function BaseAutocomplete(props) {
510
523
  slotProps,
511
524
  material
512
525
  } = props,
513
- other = _objectWithoutPropertiesLoose(props, _excluded16);
526
+ other = _objectWithoutPropertiesLoose(props, _excluded17);
514
527
  return /*#__PURE__*/_jsx(MUIAutocomplete, _extends({
515
528
  id: id,
516
529
  multiple: multiple,
@@ -527,28 +540,28 @@ function BaseAutocomplete(props) {
527
540
  {
528
541
  key
529
542
  } = _getTagProps,
530
- tagProps = _objectWithoutPropertiesLoose(_getTagProps, _excluded17);
543
+ tagProps = _objectWithoutPropertiesLoose(_getTagProps, _excluded18);
531
544
  return /*#__PURE__*/_jsx(MUIChip, _extends({
532
545
  variant: "outlined",
533
546
  size: "small",
534
547
  label: typeof option === 'string' ? option : getOptionLabel?.(option)
535
- }, tagProps), key);
548
+ }, tagProps, typeof slotProps?.chip === 'function' ? slotProps.chip(option, index) : slotProps?.chip), key);
536
549
  }),
537
550
  renderInput: params => {
538
551
  const {
539
552
  slotProps: autocompleteSlotProps
540
553
  } = params,
541
- inputRest = _objectWithoutPropertiesLoose(params, _excluded18);
554
+ inputRest = _objectWithoutPropertiesLoose(params, _excluded19);
542
555
  const _ref = slotProps?.textField ?? {},
543
556
  {
544
557
  slotProps: textFieldSlotProps
545
558
  } = _ref,
546
- textFieldRest = _objectWithoutPropertiesLoose(_ref, _excluded19);
559
+ textFieldRest = _objectWithoutPropertiesLoose(_ref, _excluded20);
547
560
  const _ref2 = rootProps.slotProps?.baseTextField ?? {},
548
561
  {
549
562
  slotProps: baseTextFieldSlotProps
550
563
  } = _ref2,
551
- baseTextFieldRest = _objectWithoutPropertiesLoose(_ref2, _excluded20);
564
+ baseTextFieldRest = _objectWithoutPropertiesLoose(_ref2, _excluded21);
552
565
  return /*#__PURE__*/_jsx(MUITextField, _extends({}, inputRest, {
553
566
  label: label,
554
567
  placeholder: placeholder
@@ -575,7 +588,7 @@ function transformInputProps(props, wrapAdornments = true) {
575
588
  slotProps,
576
589
  material
577
590
  } = props,
578
- other = _objectWithoutPropertiesLoose(props, _excluded21);
591
+ other = _objectWithoutPropertiesLoose(props, _excluded22);
579
592
  const result = other;
580
593
  if (wrapAdornments) {
581
594
  if (result.startAdornment) {
@@ -609,7 +622,7 @@ const BaseTextarea = forwardRef(function BaseTextarea(props, ref) {
609
622
  const {
610
623
  material
611
624
  } = props,
612
- other = _objectWithoutPropertiesLoose(props, _excluded22);
625
+ other = _objectWithoutPropertiesLoose(props, _excluded23);
613
626
  return /*#__PURE__*/_jsx(MUITextareaAutosize, _extends({}, other, material, {
614
627
  ref: ref
615
628
  }));
@@ -634,7 +647,7 @@ function BasePopper(props) {
634
647
  placement,
635
648
  material
636
649
  } = props,
637
- other = _objectWithoutPropertiesLoose(props, _excluded23);
650
+ other = _objectWithoutPropertiesLoose(props, _excluded24);
638
651
  const modifiers = React.useMemo(() => {
639
652
  const result = [{
640
653
  name: 'preventOverflow',
@@ -729,7 +742,7 @@ function BaseSelectOption(_ref3) {
729
742
  let {
730
743
  native
731
744
  } = _ref3,
732
- props = _objectWithoutPropertiesLoose(_ref3, _excluded24);
745
+ props = _objectWithoutPropertiesLoose(_ref3, _excluded25);
733
746
  if (native) {
734
747
  return /*#__PURE__*/_jsx("option", _extends({}, props));
735
748
  }
@@ -764,7 +777,7 @@ function TabPanel(props) {
764
777
  children,
765
778
  active
766
779
  } = props,
767
- other = _objectWithoutPropertiesLoose(props, _excluded25);
780
+ other = _objectWithoutPropertiesLoose(props, _excluded26);
768
781
  return /*#__PURE__*/_jsx(StyledTabPanel, _extends({
769
782
  role: "tabpanel",
770
783
  style: {
@@ -780,7 +793,7 @@ function BaseTabs(_ref4) {
780
793
  value,
781
794
  material
782
795
  } = _ref4,
783
- props = _objectWithoutPropertiesLoose(_ref4, _excluded26);
796
+ props = _objectWithoutPropertiesLoose(_ref4, _excluded27);
784
797
  const id = useId();
785
798
  const labelId = `${id}-tab-${value}`;
786
799
  const panelId = `${id}-tabpanel-${value}`;
@@ -860,6 +873,7 @@ const baseSlots = {
860
873
  baseLinearProgress: BaseLinearProgress,
861
874
  baseMenuList: BaseMenuList,
862
875
  baseMenuItem: BaseMenuItem,
876
+ baseModal: BaseModal,
863
877
  baseTextField: BaseTextField,
864
878
  baseButton: BaseButton,
865
879
  baseIconButton: BaseIconButton,
@@ -75,7 +75,8 @@ function transformTheme(t) {
75
75
  [k.shadows.base]: (t.vars || t).shadows[2],
76
76
  [k.shadows.overlay]: (t.vars || t).shadows[8],
77
77
  [k.zIndex.panel]: (t.vars || t).zIndex.modal,
78
- [k.zIndex.menu]: (t.vars || t).zIndex.modal
78
+ [k.zIndex.menu]: (t.vars || t).zIndex.modal,
79
+ [k.zIndex.modal]: (t.vars || t).zIndex.modal
79
80
  };
80
81
  }
81
82
  function getRadius(theme) {
@@ -68,7 +68,8 @@ function transformTheme(t) {
68
68
  [k.shadows.base]: (t.vars || t).shadows[2],
69
69
  [k.shadows.overlay]: (t.vars || t).shadows[8],
70
70
  [k.zIndex.panel]: (t.vars || t).zIndex.modal,
71
- [k.zIndex.menu]: (t.vars || t).zIndex.modal
71
+ [k.zIndex.menu]: (t.vars || t).zIndex.modal,
72
+ [k.zIndex.modal]: (t.vars || t).zIndex.modal
72
73
  };
73
74
  }
74
75
  function getRadius(theme) {
@@ -250,7 +250,6 @@ export interface GridBaseColDef<R extends GridValidRowModel = GridValidRowModel,
250
250
  export interface GridActionsColDef<R extends GridValidRowModel = any, V = any, F = V> extends GridBaseColDef<R, V, F> {
251
251
  /**
252
252
  * The type of the column.
253
- * @default 'actions'
254
253
  */
255
254
  type: 'actions';
256
255
  /**
@@ -282,7 +281,6 @@ export interface GridActionsColDef<R extends GridValidRowModel = any, V = any, F
282
281
  export interface GridSingleSelectColDef<R extends GridValidRowModel = any, V = any, F = V> extends GridBaseColDef<R, V, F> {
283
282
  /**
284
283
  * The type of the column.
285
- * @default 'singleSelect'
286
284
  */
287
285
  type: 'singleSelect';
288
286
  /**
@@ -304,12 +302,46 @@ export interface GridSingleSelectColDef<R extends GridValidRowModel = any, V = a
304
302
  */
305
303
  getOptionValue: (value: ValueOptions) => any;
306
304
  }
305
+ /**
306
+ * Column Definition interface used for columns with the `multiSelect` type.
307
+ * @demos
308
+ * - [Special column properties](/x/react-data-grid/column-definition/#special-properties)
309
+ */
310
+ export interface GridMultiSelectColDef<R extends GridValidRowModel = any, V = (string | number)[], F = string> extends GridBaseColDef<R, V, F> {
311
+ /**
312
+ * The type of the column.
313
+ */
314
+ type: 'multiSelect';
315
+ /**
316
+ * To be used in combination with `type: 'multiSelect'`. This is an array (or a function returning an array) of the possible cell values and labels.
317
+ */
318
+ valueOptions?: Array<ValueOptions> | ((params: GridValueOptionsParams<R>) => Array<ValueOptions>);
319
+ /**
320
+ * Used to determine the label displayed for a given value option.
321
+ * @param {ValueOptions} value The current value option.
322
+ * @returns {string} The text to be displayed.
323
+ * @default {defaultGetOptionLabel}
324
+ */
325
+ getOptionLabel: (value: ValueOptions) => string;
326
+ /**
327
+ * Used to determine the value used for a value option.
328
+ * @param {ValueOptions} value The current value option.
329
+ * @returns {string | number} The value to be used.
330
+ * @default {defaultGetOptionValue}
331
+ */
332
+ getOptionValue: (value: ValueOptions) => string | number;
333
+ /**
334
+ * The separator used to join array values for display and export.
335
+ * @default ','
336
+ */
337
+ separator?: string;
338
+ }
307
339
  /**
308
340
  * Column Definition interface.
309
341
  * @demos
310
342
  * - [Column definition](/x/react-data-grid/column-definition/)
311
343
  */
312
- export type GridColDef<R extends GridValidRowModel = any, V = any, F = V> = GridBaseColDef<R, V, F> | GridActionsColDef<R, V, F> | GridSingleSelectColDef<R, V, F>;
344
+ export type GridColDef<R extends GridValidRowModel = any, V = any, F = V> = GridBaseColDef<R, V, F> | GridActionsColDef<R, V, F> | GridSingleSelectColDef<R, V, F> | GridMultiSelectColDef<R, V, F>;
313
345
  /**
314
346
  * Column Definition interface used for the list view column.
315
347
  * @demos
@@ -250,7 +250,6 @@ export interface GridBaseColDef<R extends GridValidRowModel = GridValidRowModel,
250
250
  export interface GridActionsColDef<R extends GridValidRowModel = any, V = any, F = V> extends GridBaseColDef<R, V, F> {
251
251
  /**
252
252
  * The type of the column.
253
- * @default 'actions'
254
253
  */
255
254
  type: 'actions';
256
255
  /**
@@ -282,7 +281,6 @@ export interface GridActionsColDef<R extends GridValidRowModel = any, V = any, F
282
281
  export interface GridSingleSelectColDef<R extends GridValidRowModel = any, V = any, F = V> extends GridBaseColDef<R, V, F> {
283
282
  /**
284
283
  * The type of the column.
285
- * @default 'singleSelect'
286
284
  */
287
285
  type: 'singleSelect';
288
286
  /**
@@ -304,12 +302,46 @@ export interface GridSingleSelectColDef<R extends GridValidRowModel = any, V = a
304
302
  */
305
303
  getOptionValue: (value: ValueOptions) => any;
306
304
  }
305
+ /**
306
+ * Column Definition interface used for columns with the `multiSelect` type.
307
+ * @demos
308
+ * - [Special column properties](/x/react-data-grid/column-definition/#special-properties)
309
+ */
310
+ export interface GridMultiSelectColDef<R extends GridValidRowModel = any, V = (string | number)[], F = string> extends GridBaseColDef<R, V, F> {
311
+ /**
312
+ * The type of the column.
313
+ */
314
+ type: 'multiSelect';
315
+ /**
316
+ * To be used in combination with `type: 'multiSelect'`. This is an array (or a function returning an array) of the possible cell values and labels.
317
+ */
318
+ valueOptions?: Array<ValueOptions> | ((params: GridValueOptionsParams<R>) => Array<ValueOptions>);
319
+ /**
320
+ * Used to determine the label displayed for a given value option.
321
+ * @param {ValueOptions} value The current value option.
322
+ * @returns {string} The text to be displayed.
323
+ * @default {defaultGetOptionLabel}
324
+ */
325
+ getOptionLabel: (value: ValueOptions) => string;
326
+ /**
327
+ * Used to determine the value used for a value option.
328
+ * @param {ValueOptions} value The current value option.
329
+ * @returns {string | number} The value to be used.
330
+ * @default {defaultGetOptionValue}
331
+ */
332
+ getOptionValue: (value: ValueOptions) => string | number;
333
+ /**
334
+ * The separator used to join array values for display and export.
335
+ * @default ','
336
+ */
337
+ separator?: string;
338
+ }
307
339
  /**
308
340
  * Column Definition interface.
309
341
  * @demos
310
342
  * - [Column definition](/x/react-data-grid/column-definition/)
311
343
  */
312
- export type GridColDef<R extends GridValidRowModel = any, V = any, F = V> = GridBaseColDef<R, V, F> | GridActionsColDef<R, V, F> | GridSingleSelectColDef<R, V, F>;
344
+ export type GridColDef<R extends GridValidRowModel = any, V = any, F = V> = GridBaseColDef<R, V, F> | GridActionsColDef<R, V, F> | GridSingleSelectColDef<R, V, F> | GridMultiSelectColDef<R, V, F>;
313
345
  /**
314
346
  * Column Definition interface used for the list view column.
315
347
  * @demos
@@ -5,6 +5,7 @@ export interface GridColumnTypes {
5
5
  dateTime: 'dateTime';
6
6
  boolean: 'boolean';
7
7
  singleSelect: 'singleSelect';
8
+ multiSelect: 'multiSelect';
8
9
  actions: 'actions';
9
10
  custom: 'custom';
10
11
  longText: 'longText';
@@ -5,6 +5,7 @@ export interface GridColumnTypes {
5
5
  dateTime: 'dateTime';
6
6
  boolean: 'boolean';
7
7
  singleSelect: 'singleSelect';
8
+ multiSelect: 'multiSelect';
8
9
  actions: 'actions';
9
10
  custom: 'custom';
10
11
  longText: 'longText';
@@ -1,3 +1,3 @@
1
1
  import type { GridColTypeDef } from "./gridColDef.mjs";
2
2
  import type { GridColType } from "./gridColType.mjs";
3
- export type GridColumnTypesRecord = Record<GridColType, GridColTypeDef>;
3
+ export interface GridColumnTypesRecord extends Omit<Record<GridColType, GridColTypeDef>, 'multiSelect'> {}
@@ -1,3 +1,3 @@
1
1
  import type { GridColTypeDef } from "./gridColDef.js";
2
2
  import type { GridColType } from "./gridColType.js";
3
- export type GridColumnTypesRecord = Record<GridColType, GridColTypeDef>;
3
+ export interface GridColumnTypesRecord extends Omit<Record<GridColType, GridColTypeDef>, 'multiSelect'> {}
@@ -1,3 +1,3 @@
1
- export type { GridAlignment, ValueOptions, GridKeyValue, GridColDef, GridListViewColDef, GridColTypeDef, GridColumnsMeta, GridSingleSelectColDef, GridActionsColDef, GetApplyQuickFilterFn, GridValueGetter, GridValueFormatter, GridValueSetter, GridValueParser, GridColSpanFn } from "./gridColDef.mjs";
1
+ export type { GridAlignment, ValueOptions, GridKeyValue, GridColDef, GridListViewColDef, GridColTypeDef, GridColumnsMeta, GridSingleSelectColDef, GridMultiSelectColDef, GridActionsColDef, GetApplyQuickFilterFn, GridValueGetter, GridValueFormatter, GridValueSetter, GridValueParser, GridColSpanFn } from "./gridColDef.mjs";
2
2
  export * from "./gridColType.mjs";
3
3
  export * from "./gridColumnTypesRecord.mjs";
@@ -1,3 +1,3 @@
1
- export type { GridAlignment, ValueOptions, GridKeyValue, GridColDef, GridListViewColDef, GridColTypeDef, GridColumnsMeta, GridSingleSelectColDef, GridActionsColDef, GetApplyQuickFilterFn, GridValueGetter, GridValueFormatter, GridValueSetter, GridValueParser, GridColSpanFn } from "./gridColDef.js";
1
+ export type { GridAlignment, ValueOptions, GridKeyValue, GridColDef, GridListViewColDef, GridColTypeDef, GridColumnsMeta, GridSingleSelectColDef, GridMultiSelectColDef, GridActionsColDef, GetApplyQuickFilterFn, GridValueGetter, GridValueFormatter, GridValueSetter, GridValueParser, GridColSpanFn } from "./gridColDef.js";
2
2
  export * from "./gridColType.js";
3
3
  export * from "./gridColumnTypesRecord.js";
@@ -54,10 +54,45 @@ export type AutocompleteProps<Value = string, Multiple extends boolean = false,
54
54
  * @param {string} value The new value of the input.
55
55
  */
56
56
  onInputChange?: (event: React.SyntheticEvent, value: string) => void;
57
+ /** Control the popup open state. */
58
+ open?: boolean;
59
+ /**
60
+ * Callback fired when the popup requests to be opened.
61
+ * @param {React.SyntheticEvent} event The event source of the callback.
62
+ */
63
+ onOpen?: (event: React.SyntheticEvent) => void;
64
+ /**
65
+ * Callback fired when the popup requests to be closed.
66
+ * @param {React.SyntheticEvent} event The event source of the callback.
67
+ * @param {string} reason The reason for closing.
68
+ */
69
+ onClose?: (event: React.SyntheticEvent, reason: string) => void;
70
+ /** If true, the popup won't close when a value is selected. */
71
+ disableCloseOnSelect?: boolean;
72
+ /** If true, the popup opens when the input is focused. */
73
+ openOnFocus?: boolean;
74
+ /**
75
+ * Render the option, use `getOptionLabel` by default.
76
+ * @param {React.HTMLAttributes<HTMLLIElement> & { key: any }} props The props to apply on the li element.
77
+ * @param {Value} option The option to render.
78
+ * @param {object} state The state of each option.
79
+ * @param {string} state.inputValue The input value.
80
+ * @param {number} state.index The index of the option in the list.
81
+ * @param {boolean} state.selected Whether the option is selected.
82
+ * @returns {React.ReactNode} react node to render
83
+ */
84
+ renderOption?: (props: React.HTMLAttributes<HTMLLIElement> & {
85
+ key: any;
86
+ }, option: Value, state: {
87
+ inputValue: string;
88
+ index: number;
89
+ selected: boolean;
90
+ }) => React.ReactNode;
57
91
  label?: React.ReactNode;
58
92
  placeholder?: string;
59
93
  slotProps?: {
60
94
  textField: TextFieldProps;
95
+ chip?: ChipProps | ((value: Value, index: number) => ChipProps);
61
96
  };
62
97
  };
63
98
  export type BadgeProps = CommonProps & {
@@ -182,6 +217,15 @@ export type PopperProps = CommonProps & {
182
217
  /** @default 'bottom' */
183
218
  placement?: Placement;
184
219
  };
220
+ export type ModalProps = CommonProps & {
221
+ open: boolean;
222
+ children: React.ReactElement<unknown>;
223
+ onClose?: (event: object, reason: 'backdropClick' | 'escapeKeyDown') => void;
224
+ keepMounted?: boolean;
225
+ disableAutoFocus?: boolean;
226
+ disableEnforceFocus?: boolean;
227
+ disableRestoreFocus?: boolean;
228
+ };
185
229
  export type CircularProgressProps = CommonProps & {
186
230
  /**
187
231
  * Pixels or CSS value.
@@ -225,9 +269,11 @@ export type SelectProps = CommonProps & {
225
269
  open?: boolean;
226
270
  error?: boolean;
227
271
  disabled?: boolean;
272
+ multiple?: boolean;
228
273
  onChange?: React.ChangeEventHandler;
229
274
  onOpen?: (event: React.SyntheticEvent) => void;
230
275
  onClose?: (event: React.KeyboardEvent, reason: 'backdropClick' | 'escapeKeyDown' | 'tabKeyDown') => void;
276
+ renderValue?: (value: any) => React.ReactNode;
231
277
  label?: React.ReactNode;
232
278
  labelId?: string;
233
279
  native?: boolean;