@mui/x-data-grid 8.0.0-alpha.12 → 8.0.0-alpha.13

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 (348) hide show
  1. package/CHANGELOG.md +299 -0
  2. package/DataGrid/DataGrid.js +31 -22
  3. package/DataGrid/useDataGridProps.js +1 -1
  4. package/colDef/gridCheckboxSelectionColDef.js +1 -3
  5. package/components/GridFooter.js +1 -1
  6. package/components/GridHeader.js +1 -1
  7. package/components/GridPagination.js +5 -6
  8. package/components/GridRowCount.js +4 -5
  9. package/components/GridScrollArea.js +4 -3
  10. package/components/GridSelectedRowCount.js +5 -6
  11. package/components/GridShadowScrollArea.d.ts +8 -0
  12. package/components/GridShadowScrollArea.js +82 -0
  13. package/components/cell/GridEditInputCell.js +2 -3
  14. package/components/columnSelection/GridHeaderCheckbox.js +51 -17
  15. package/components/columnsManagement/GridColumnsManagement.js +59 -61
  16. package/components/containers/GridOverlay.js +6 -8
  17. package/components/containers/GridRoot.js +4 -2
  18. package/components/containers/GridRootStyles.d.ts +1 -2
  19. package/components/containers/GridRootStyles.js +77 -100
  20. package/components/containers/GridToolbarContainer.js +5 -6
  21. package/components/menu/GridMenu.js +7 -6
  22. package/components/menu/columnMenu/GridColumnHeaderMenu.js +4 -3
  23. package/components/panel/GridPanel.js +18 -20
  24. package/components/panel/GridPanelContent.js +6 -8
  25. package/components/panel/GridPanelFooter.js +5 -6
  26. package/components/panel/GridPanelHeader.js +4 -5
  27. package/components/panel/filterPanel/GridFilterForm.js +13 -20
  28. package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.d.ts +2 -2
  29. package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +10 -39
  30. package/components/panel/filterPanel/GridFilterInputMultipleValue.d.ts +2 -2
  31. package/components/panel/filterPanel/GridFilterInputMultipleValue.js +20 -45
  32. package/components/panel/filterPanel/GridFilterInputValue.js +3 -6
  33. package/components/toolbar/GridToolbarFilterButton.js +5 -6
  34. package/components/toolbar/GridToolbarQuickFilter.js +23 -30
  35. package/components/virtualization/GridVirtualScrollbar.js +8 -5
  36. package/components/virtualization/GridVirtualScrollerFiller.js +2 -1
  37. package/constants/cssVariables.d.ts +294 -0
  38. package/constants/cssVariables.js +168 -0
  39. package/constants/dataGridPropsDefaultValues.js +1 -0
  40. package/constants/defaultGridSlotsComponents.js +1 -1
  41. package/constants/gridClasses.d.ts +13 -0
  42. package/constants/gridClasses.js +1 -1
  43. package/context/GridContextProvider.js +4 -1
  44. package/esm/DataGrid/DataGrid.js +31 -22
  45. package/esm/DataGrid/useDataGridProps.js +1 -1
  46. package/esm/colDef/gridCheckboxSelectionColDef.js +1 -3
  47. package/esm/components/GridFooter.js +2 -2
  48. package/esm/components/GridHeader.js +1 -1
  49. package/esm/components/GridPagination.js +5 -6
  50. package/esm/components/GridRowCount.js +4 -5
  51. package/esm/components/GridScrollArea.js +2 -1
  52. package/esm/components/GridSelectedRowCount.js +5 -6
  53. package/esm/components/GridShadowScrollArea.d.ts +8 -0
  54. package/esm/components/GridShadowScrollArea.js +74 -0
  55. package/esm/components/cell/GridEditInputCell.js +2 -3
  56. package/esm/components/columnSelection/GridHeaderCheckbox.js +51 -17
  57. package/esm/components/columnsManagement/GridColumnsManagement.js +60 -62
  58. package/esm/components/containers/GridOverlay.js +6 -8
  59. package/esm/components/containers/GridRoot.js +4 -2
  60. package/esm/components/containers/GridRootStyles.d.ts +1 -2
  61. package/esm/components/containers/GridRootStyles.js +78 -101
  62. package/esm/components/containers/GridToolbarContainer.js +5 -6
  63. package/esm/components/menu/GridMenu.js +7 -6
  64. package/esm/components/menu/columnMenu/GridColumnHeaderMenu.js +2 -1
  65. package/esm/components/panel/GridPanel.js +18 -20
  66. package/esm/components/panel/GridPanelContent.js +6 -8
  67. package/esm/components/panel/GridPanelFooter.js +5 -6
  68. package/esm/components/panel/GridPanelHeader.js +4 -5
  69. package/esm/components/panel/filterPanel/GridFilterForm.js +13 -20
  70. package/esm/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.d.ts +2 -2
  71. package/esm/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +10 -39
  72. package/esm/components/panel/filterPanel/GridFilterInputMultipleValue.d.ts +2 -2
  73. package/esm/components/panel/filterPanel/GridFilterInputMultipleValue.js +19 -44
  74. package/esm/components/panel/filterPanel/GridFilterInputValue.js +3 -6
  75. package/esm/components/toolbar/GridToolbarFilterButton.js +5 -6
  76. package/esm/components/toolbar/GridToolbarQuickFilter.js +23 -30
  77. package/esm/components/virtualization/GridVirtualScrollbar.js +3 -1
  78. package/esm/components/virtualization/GridVirtualScrollerFiller.js +2 -1
  79. package/esm/constants/cssVariables.d.ts +294 -0
  80. package/esm/constants/cssVariables.js +161 -0
  81. package/esm/constants/dataGridPropsDefaultValues.js +1 -0
  82. package/esm/constants/defaultGridSlotsComponents.js +2 -2
  83. package/esm/constants/gridClasses.d.ts +13 -0
  84. package/esm/constants/gridClasses.js +1 -1
  85. package/esm/context/GridContextProvider.js +4 -1
  86. package/esm/hooks/features/clipboard/useGridClipboard.js +3 -2
  87. package/esm/hooks/features/columnHeaders/useGridColumnHeaders.js +2 -2
  88. package/esm/hooks/features/columnResize/useGridColumnResize.js +2 -1
  89. package/esm/hooks/features/columns/gridColumnsInterfaces.d.ts +1 -0
  90. package/esm/hooks/features/columns/gridColumnsSelector.d.ts +7 -0
  91. package/esm/hooks/features/columns/gridColumnsSelector.js +8 -0
  92. package/esm/hooks/features/columns/gridColumnsUtils.d.ts +3 -1
  93. package/esm/hooks/features/columns/gridColumnsUtils.js +6 -3
  94. package/esm/hooks/features/columns/index.d.ts +1 -1
  95. package/esm/hooks/features/columns/index.js +1 -1
  96. package/esm/hooks/features/columns/useGridColumns.js +4 -2
  97. package/esm/hooks/features/dataSource/gridDataSourceError.d.ts +31 -0
  98. package/esm/hooks/features/dataSource/gridDataSourceError.js +32 -0
  99. package/esm/hooks/features/dataSource/index.d.ts +2 -0
  100. package/esm/hooks/features/dataSource/index.js +2 -0
  101. package/esm/hooks/features/dataSource/models.d.ts +1 -1
  102. package/esm/hooks/features/dataSource/useGridDataSourceBase.d.ts +1 -1
  103. package/esm/hooks/features/dataSource/useGridDataSourceBase.js +27 -17
  104. package/esm/hooks/features/dimensions/useGridDimensions.js +11 -10
  105. package/esm/hooks/features/editing/useGridCellEditing.js +2 -1
  106. package/esm/hooks/features/editing/useGridRowEditing.js +2 -1
  107. package/esm/hooks/features/export/utils.js +4 -2
  108. package/esm/hooks/features/focus/useGridFocus.js +3 -2
  109. package/esm/hooks/features/index.d.ts +1 -1
  110. package/esm/hooks/features/index.js +1 -1
  111. package/esm/hooks/features/rowSelection/gridRowSelectionSelector.d.ts +3 -3
  112. package/esm/hooks/features/rowSelection/gridRowSelectionSelector.js +27 -7
  113. package/esm/hooks/features/rowSelection/useGridRowSelection.js +148 -81
  114. package/esm/hooks/features/rowSelection/utils.d.ts +2 -2
  115. package/esm/hooks/features/rowSelection/utils.js +11 -11
  116. package/esm/hooks/features/rows/gridRowsInterfaces.d.ts +1 -1
  117. package/esm/hooks/features/rows/gridRowsUtils.d.ts +2 -1
  118. package/esm/hooks/features/rows/gridRowsUtils.js +8 -0
  119. package/esm/hooks/features/rows/useGridParamsApi.js +2 -8
  120. package/esm/hooks/features/rows/useGridRowAriaAttributes.js +2 -4
  121. package/esm/hooks/features/rows/useGridRows.d.ts +2 -2
  122. package/esm/hooks/features/rows/useGridRows.js +7 -7
  123. package/esm/hooks/features/virtualization/useGridVirtualScroller.js +5 -9
  124. package/esm/hooks/utils/useGridSelector.js +4 -1
  125. package/esm/hooks/utils/useIsSSR.js +4 -1
  126. package/esm/index.js +1 -1
  127. package/esm/internals/index.d.ts +2 -1
  128. package/esm/internals/index.js +2 -1
  129. package/esm/internals/utils/propValidation.js +1 -1
  130. package/esm/locales/bnBD.d.ts +2 -0
  131. package/esm/locales/bnBD.js +167 -0
  132. package/esm/locales/deDE.js +3 -5
  133. package/esm/locales/huHU.js +10 -13
  134. package/esm/locales/index.d.ts +1 -0
  135. package/esm/locales/index.js +1 -0
  136. package/esm/locales/ruRU.js +17 -21
  137. package/esm/material/index.d.ts +1 -0
  138. package/esm/material/index.js +164 -49
  139. package/esm/material/variables.d.ts +5 -0
  140. package/esm/material/variables.js +89 -0
  141. package/esm/models/api/gridRowSelectionApi.d.ts +4 -2
  142. package/esm/models/api/gridSortApi.d.ts +1 -1
  143. package/esm/models/configuration/gridConfiguration.d.ts +7 -1
  144. package/esm/models/gridBaseSlots.d.ts +56 -6
  145. package/esm/models/gridDataSource.d.ts +9 -4
  146. package/esm/models/gridRowSelectionManager.d.ts +9 -0
  147. package/esm/models/gridRowSelectionManager.js +36 -0
  148. package/esm/models/gridRowSelectionModel.d.ts +4 -2
  149. package/esm/models/gridSlotsComponent.d.ts +7 -27
  150. package/esm/models/gridSlotsComponentsProps.d.ts +3 -11
  151. package/esm/models/gridSortModel.d.ts +1 -1
  152. package/esm/models/index.d.ts +2 -1
  153. package/esm/models/index.js +2 -3
  154. package/esm/models/props/DataGridProps.d.ts +22 -17
  155. package/esm/utils/css/context.d.ts +14 -0
  156. package/esm/utils/css/context.js +54 -0
  157. package/esm/utils/index.d.ts +2 -1
  158. package/esm/utils/index.js +1 -1
  159. package/hooks/features/clipboard/useGridClipboard.js +3 -2
  160. package/hooks/features/columnHeaders/useGridColumnHeaders.js +2 -2
  161. package/hooks/features/columnResize/useGridColumnResize.js +28 -27
  162. package/hooks/features/columns/gridColumnsInterfaces.d.ts +1 -0
  163. package/hooks/features/columns/gridColumnsSelector.d.ts +7 -0
  164. package/hooks/features/columns/gridColumnsSelector.js +9 -1
  165. package/hooks/features/columns/gridColumnsUtils.d.ts +3 -1
  166. package/hooks/features/columns/gridColumnsUtils.js +6 -3
  167. package/hooks/features/columns/index.d.ts +1 -1
  168. package/hooks/features/columns/index.js +94 -10
  169. package/hooks/features/columns/useGridColumns.js +4 -2
  170. package/hooks/features/dataSource/gridDataSourceError.d.ts +31 -0
  171. package/hooks/features/dataSource/gridDataSourceError.js +40 -0
  172. package/hooks/features/dataSource/index.d.ts +2 -0
  173. package/hooks/features/dataSource/index.js +25 -0
  174. package/hooks/features/dataSource/models.d.ts +1 -1
  175. package/hooks/features/dataSource/useGridDataSourceBase.d.ts +1 -1
  176. package/hooks/features/dataSource/useGridDataSourceBase.js +27 -17
  177. package/hooks/features/dimensions/useGridDimensions.js +19 -18
  178. package/hooks/features/editing/useGridCellEditing.js +10 -9
  179. package/hooks/features/editing/useGridRowEditing.js +11 -10
  180. package/hooks/features/export/utils.js +4 -2
  181. package/hooks/features/focus/useGridFocus.js +8 -7
  182. package/hooks/features/index.d.ts +1 -1
  183. package/hooks/features/index.js +11 -28
  184. package/hooks/features/rowSelection/gridRowSelectionSelector.d.ts +3 -3
  185. package/hooks/features/rowSelection/gridRowSelectionSelector.js +27 -7
  186. package/hooks/features/rowSelection/useGridRowSelection.js +146 -79
  187. package/hooks/features/rowSelection/utils.d.ts +2 -2
  188. package/hooks/features/rowSelection/utils.js +10 -10
  189. package/hooks/features/rows/gridRowsInterfaces.d.ts +1 -1
  190. package/hooks/features/rows/gridRowsUtils.d.ts +2 -1
  191. package/hooks/features/rows/gridRowsUtils.js +10 -1
  192. package/hooks/features/rows/useGridParamsApi.js +2 -8
  193. package/hooks/features/rows/useGridRowAriaAttributes.js +2 -4
  194. package/hooks/features/rows/useGridRows.d.ts +2 -2
  195. package/hooks/features/rows/useGridRows.js +7 -7
  196. package/hooks/features/virtualization/useGridVirtualScroller.js +21 -25
  197. package/hooks/utils/useGridSelector.js +6 -2
  198. package/hooks/utils/useIsSSR.js +6 -2
  199. package/index.js +1 -1
  200. package/internals/index.d.ts +2 -1
  201. package/internals/index.js +15 -0
  202. package/internals/utils/propValidation.js +1 -1
  203. package/locales/bnBD.d.ts +2 -0
  204. package/locales/bnBD.js +173 -0
  205. package/locales/deDE.js +3 -5
  206. package/locales/huHU.js +10 -13
  207. package/locales/index.d.ts +1 -0
  208. package/locales/index.js +11 -0
  209. package/locales/ruRU.js +17 -21
  210. package/material/index.d.ts +1 -0
  211. package/material/index.js +170 -49
  212. package/material/variables.d.ts +5 -0
  213. package/material/variables.js +95 -0
  214. package/models/api/gridRowSelectionApi.d.ts +4 -2
  215. package/models/api/gridSortApi.d.ts +1 -1
  216. package/models/configuration/gridConfiguration.d.ts +7 -1
  217. package/models/gridBaseSlots.d.ts +56 -6
  218. package/models/gridDataSource.d.ts +9 -4
  219. package/models/gridRowSelectionManager.d.ts +9 -0
  220. package/models/gridRowSelectionManager.js +43 -0
  221. package/models/gridRowSelectionModel.d.ts +4 -2
  222. package/models/gridSlotsComponent.d.ts +7 -27
  223. package/models/gridSlotsComponentsProps.d.ts +3 -11
  224. package/models/gridSortModel.d.ts +1 -1
  225. package/models/index.d.ts +2 -1
  226. package/models/index.js +34 -11
  227. package/models/props/DataGridProps.d.ts +22 -17
  228. package/modern/DataGrid/DataGrid.js +31 -22
  229. package/modern/DataGrid/useDataGridProps.js +1 -1
  230. package/modern/colDef/gridCheckboxSelectionColDef.js +1 -3
  231. package/modern/components/GridFooter.js +2 -2
  232. package/modern/components/GridHeader.js +1 -1
  233. package/modern/components/GridPagination.js +5 -6
  234. package/modern/components/GridRowCount.js +4 -5
  235. package/modern/components/GridScrollArea.js +2 -1
  236. package/modern/components/GridSelectedRowCount.js +5 -6
  237. package/modern/components/GridShadowScrollArea.d.ts +8 -0
  238. package/modern/components/GridShadowScrollArea.js +74 -0
  239. package/modern/components/cell/GridEditInputCell.js +2 -3
  240. package/modern/components/columnSelection/GridHeaderCheckbox.js +51 -17
  241. package/modern/components/columnsManagement/GridColumnsManagement.js +60 -62
  242. package/modern/components/containers/GridOverlay.js +6 -8
  243. package/modern/components/containers/GridRoot.js +4 -2
  244. package/modern/components/containers/GridRootStyles.d.ts +1 -2
  245. package/modern/components/containers/GridRootStyles.js +78 -101
  246. package/modern/components/containers/GridToolbarContainer.js +5 -6
  247. package/modern/components/menu/GridMenu.js +7 -6
  248. package/modern/components/menu/columnMenu/GridColumnHeaderMenu.js +2 -1
  249. package/modern/components/panel/GridPanel.js +18 -20
  250. package/modern/components/panel/GridPanelContent.js +6 -8
  251. package/modern/components/panel/GridPanelFooter.js +5 -6
  252. package/modern/components/panel/GridPanelHeader.js +4 -5
  253. package/modern/components/panel/filterPanel/GridFilterForm.js +13 -20
  254. package/modern/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.d.ts +2 -2
  255. package/modern/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +10 -39
  256. package/modern/components/panel/filterPanel/GridFilterInputMultipleValue.d.ts +2 -2
  257. package/modern/components/panel/filterPanel/GridFilterInputMultipleValue.js +19 -44
  258. package/modern/components/panel/filterPanel/GridFilterInputValue.js +3 -6
  259. package/modern/components/toolbar/GridToolbarFilterButton.js +5 -6
  260. package/modern/components/toolbar/GridToolbarQuickFilter.js +23 -30
  261. package/modern/components/virtualization/GridVirtualScrollbar.js +3 -1
  262. package/modern/components/virtualization/GridVirtualScrollerFiller.js +2 -1
  263. package/modern/constants/cssVariables.d.ts +294 -0
  264. package/modern/constants/cssVariables.js +161 -0
  265. package/modern/constants/dataGridPropsDefaultValues.js +1 -0
  266. package/modern/constants/defaultGridSlotsComponents.js +2 -2
  267. package/modern/constants/gridClasses.d.ts +13 -0
  268. package/modern/constants/gridClasses.js +1 -1
  269. package/modern/context/GridContextProvider.js +4 -1
  270. package/modern/hooks/features/clipboard/useGridClipboard.js +3 -2
  271. package/modern/hooks/features/columnHeaders/useGridColumnHeaders.js +2 -2
  272. package/modern/hooks/features/columnResize/useGridColumnResize.js +2 -1
  273. package/modern/hooks/features/columns/gridColumnsInterfaces.d.ts +1 -0
  274. package/modern/hooks/features/columns/gridColumnsSelector.d.ts +7 -0
  275. package/modern/hooks/features/columns/gridColumnsSelector.js +8 -0
  276. package/modern/hooks/features/columns/gridColumnsUtils.d.ts +3 -1
  277. package/modern/hooks/features/columns/gridColumnsUtils.js +6 -3
  278. package/modern/hooks/features/columns/index.d.ts +1 -1
  279. package/modern/hooks/features/columns/index.js +1 -1
  280. package/modern/hooks/features/columns/useGridColumns.js +4 -2
  281. package/modern/hooks/features/dataSource/gridDataSourceError.d.ts +31 -0
  282. package/modern/hooks/features/dataSource/gridDataSourceError.js +32 -0
  283. package/modern/hooks/features/dataSource/index.d.ts +2 -0
  284. package/modern/hooks/features/dataSource/index.js +2 -0
  285. package/modern/hooks/features/dataSource/models.d.ts +1 -1
  286. package/modern/hooks/features/dataSource/useGridDataSourceBase.d.ts +1 -1
  287. package/modern/hooks/features/dataSource/useGridDataSourceBase.js +27 -17
  288. package/modern/hooks/features/dimensions/useGridDimensions.js +11 -10
  289. package/modern/hooks/features/editing/useGridCellEditing.js +2 -1
  290. package/modern/hooks/features/editing/useGridRowEditing.js +2 -1
  291. package/modern/hooks/features/export/utils.js +4 -2
  292. package/modern/hooks/features/focus/useGridFocus.js +3 -2
  293. package/modern/hooks/features/index.d.ts +1 -1
  294. package/modern/hooks/features/index.js +1 -1
  295. package/modern/hooks/features/rowSelection/gridRowSelectionSelector.d.ts +3 -3
  296. package/modern/hooks/features/rowSelection/gridRowSelectionSelector.js +27 -7
  297. package/modern/hooks/features/rowSelection/useGridRowSelection.js +148 -81
  298. package/modern/hooks/features/rowSelection/utils.d.ts +2 -2
  299. package/modern/hooks/features/rowSelection/utils.js +11 -11
  300. package/modern/hooks/features/rows/gridRowsInterfaces.d.ts +1 -1
  301. package/modern/hooks/features/rows/gridRowsUtils.d.ts +2 -1
  302. package/modern/hooks/features/rows/gridRowsUtils.js +8 -0
  303. package/modern/hooks/features/rows/useGridParamsApi.js +2 -8
  304. package/modern/hooks/features/rows/useGridRowAriaAttributes.js +2 -4
  305. package/modern/hooks/features/rows/useGridRows.d.ts +2 -2
  306. package/modern/hooks/features/rows/useGridRows.js +7 -7
  307. package/modern/hooks/features/virtualization/useGridVirtualScroller.js +5 -9
  308. package/modern/hooks/utils/useGridSelector.js +4 -1
  309. package/modern/hooks/utils/useIsSSR.js +4 -1
  310. package/modern/index.js +1 -1
  311. package/modern/internals/index.d.ts +2 -1
  312. package/modern/internals/index.js +2 -1
  313. package/modern/internals/utils/propValidation.js +1 -1
  314. package/modern/locales/bnBD.d.ts +2 -0
  315. package/modern/locales/bnBD.js +167 -0
  316. package/modern/locales/deDE.js +3 -5
  317. package/modern/locales/huHU.js +10 -13
  318. package/modern/locales/index.d.ts +1 -0
  319. package/modern/locales/index.js +1 -0
  320. package/modern/locales/ruRU.js +17 -21
  321. package/modern/material/index.d.ts +1 -0
  322. package/modern/material/index.js +164 -49
  323. package/modern/material/variables.d.ts +5 -0
  324. package/modern/material/variables.js +89 -0
  325. package/modern/models/api/gridRowSelectionApi.d.ts +4 -2
  326. package/modern/models/api/gridSortApi.d.ts +1 -1
  327. package/modern/models/configuration/gridConfiguration.d.ts +7 -1
  328. package/modern/models/gridBaseSlots.d.ts +56 -6
  329. package/modern/models/gridDataSource.d.ts +9 -4
  330. package/modern/models/gridRowSelectionManager.d.ts +9 -0
  331. package/modern/models/gridRowSelectionManager.js +36 -0
  332. package/modern/models/gridRowSelectionModel.d.ts +4 -2
  333. package/modern/models/gridSlotsComponent.d.ts +7 -27
  334. package/modern/models/gridSlotsComponentsProps.d.ts +3 -11
  335. package/modern/models/gridSortModel.d.ts +1 -1
  336. package/modern/models/index.d.ts +2 -1
  337. package/modern/models/index.js +2 -3
  338. package/modern/models/props/DataGridProps.d.ts +22 -17
  339. package/modern/utils/css/context.d.ts +14 -0
  340. package/modern/utils/css/context.js +54 -0
  341. package/modern/utils/index.d.ts +2 -1
  342. package/modern/utils/index.js +1 -1
  343. package/package.json +2 -2
  344. package/tsconfig.build.tsbuildinfo +1 -1
  345. package/utils/css/context.d.ts +14 -0
  346. package/utils/css/context.js +64 -0
  347. package/utils/index.d.ts +2 -1
  348. package/utils/index.js +8 -1
@@ -4,10 +4,11 @@ const _excluded = ["item", "hasMultipleFilters", "deleteFilter", "applyFilterCha
4
4
  _excluded2 = ["InputComponentProps"];
5
5
  import * as React from 'react';
6
6
  import PropTypes from 'prop-types';
7
+ import clsx from 'clsx';
7
8
  import { unstable_composeClasses as composeClasses, unstable_useId as useId, unstable_capitalize as capitalize } from '@mui/utils';
8
9
  import { styled } from '@mui/material/styles';
9
- import clsx from 'clsx';
10
10
  import { forwardRef } from '@mui/x-internals/forwardRef';
11
+ import { vars } from "../../../constants/cssVariables.js";
11
12
  import { gridFilterableColumnDefinitionsSelector, gridColumnLookupSelector } from "../../../hooks/features/columns/gridColumnsSelector.js";
12
13
  import { gridFilterModelSelector } from "../../../hooks/features/filter/gridFilterSelector.js";
13
14
  import { useGridSelector } from "../../../hooks/utils/useGridSelector.js";
@@ -36,19 +37,19 @@ const GridFilterFormRoot = styled('div', {
36
37
  name: 'MuiDataGrid',
37
38
  slot: 'FilterForm',
38
39
  overridesResolver: (props, styles) => styles.filterForm
39
- })(({
40
- theme
41
- }) => ({
40
+ })({
42
41
  display: 'flex',
43
- gap: theme.spacing(1.5)
44
- }));
42
+ gap: vars.spacing(1.5)
43
+ });
45
44
  const FilterFormDeleteIcon = styled('div', {
46
45
  name: 'MuiDataGrid',
47
46
  slot: 'FilterFormDeleteIcon',
48
47
  overridesResolver: (_, styles) => styles.filterFormDeleteIcon
49
48
  })({
50
49
  flexShrink: 0,
51
- justifyContent: 'center'
50
+ display: 'flex',
51
+ justifyContent: 'center',
52
+ alignItems: 'center'
52
53
  });
53
54
  const FilterFormLogicOperatorInput = styled('div', {
54
55
  name: 'MuiDataGrid',
@@ -126,7 +127,6 @@ const GridFilterForm = forwardRef(function GridFilterForm(props, ref) {
126
127
  const filterSelectorRef = React.useRef(null);
127
128
  const multiFilterOperator = filterModel.logicOperator ?? GridLogicOperator.And;
128
129
  const hasLogicOperatorColumn = hasMultipleFilters && logicOperators.length > 0;
129
- const baseFormControlProps = rootProps.slotProps?.baseFormControl || {};
130
130
  const baseSelectProps = rootProps.slotProps?.baseSelect || {};
131
131
  const isBaseSelectNative = baseSelectProps.native ?? false;
132
132
  const baseSelectOptionProps = rootProps.slotProps?.baseSelectOption || {};
@@ -255,10 +255,8 @@ const GridFilterForm = forwardRef(function GridFilterForm(props, ref) {
255
255
  ownerState: rootProps
256
256
  }, other, {
257
257
  ref: ref,
258
- children: [/*#__PURE__*/_jsx(FilterFormDeleteIcon, _extends({
259
- as: rootProps.slots.baseFormControl
260
- }, baseFormControlProps, deleteIconProps, {
261
- className: clsx(classes.deleteIcon, baseFormControlProps.className, deleteIconProps.className),
258
+ children: [/*#__PURE__*/_jsx(FilterFormDeleteIcon, _extends({}, deleteIconProps, {
259
+ className: clsx(classes.deleteIcon, deleteIconProps.className),
262
260
  ownerState: rootProps,
263
261
  children: /*#__PURE__*/_jsx(rootProps.slots.baseIconButton, _extends({
264
262
  "aria-label": apiRef.current.getLocaleText('filterPanelDeleteIconLabel'),
@@ -321,9 +319,8 @@ const GridFilterForm = forwardRef(function GridFilterForm(props, ref) {
321
319
  value: col.field
322
320
  }), getColumnLabel(col)))
323
321
  })), /*#__PURE__*/_jsx(FilterFormOperatorInput, _extends({
324
- variant: "outlined",
325
- size: "small",
326
- as: rootProps.slots.baseSelect
322
+ as: rootProps.slots.baseSelect,
323
+ size: "small"
327
324
  }, operatorInputProps, {
328
325
  className: clsx(classes.operatorInput, operatorInputProps.className),
329
326
  ownerState: rootProps,
@@ -341,11 +338,7 @@ const GridFilterForm = forwardRef(function GridFilterForm(props, ref) {
341
338
  key: operator.value,
342
339
  value: operator.value
343
340
  }), operator.label || apiRef.current.getLocaleText(`filterOperator${capitalize(operator.value)}`)))
344
- })), /*#__PURE__*/_jsx(FilterFormValueInput, _extends({
345
- variant: "outlined",
346
- size: "small",
347
- as: rootProps.slots.baseFormControl
348
- }, valueInputPropsOther, {
341
+ })), /*#__PURE__*/_jsx(FilterFormValueInput, _extends({}, valueInputPropsOther, {
349
342
  className: clsx(classes.valueInput, valueInputPropsOther.className),
350
343
  ownerState: rootProps,
351
344
  children: currentOperator?.InputComponent ? /*#__PURE__*/_jsx(currentOperator.InputComponent, _extends({
@@ -1,8 +1,8 @@
1
1
  import * as React from 'react';
2
- import { AutocompleteProps } from '@mui/material/Autocomplete';
2
+ import { AutocompleteProps } from "../../../models/gridBaseSlots.js";
3
3
  import { GridFilterInputValueProps } from "../../../models/gridFilterInputComponent.js";
4
4
  import type { ValueOptions } from '../../../models/colDef/gridColDef';
5
- export type GridFilterInputMultipleSingleSelectProps = GridFilterInputValueProps<Omit<AutocompleteProps<ValueOptions, true, false, true>, 'options' | 'renderInput'>> & {
5
+ export type GridFilterInputMultipleSingleSelectProps = GridFilterInputValueProps<Omit<AutocompleteProps<ValueOptions, true, false, true>, 'options'>> & {
6
6
  type?: 'singleSelect';
7
7
  };
8
8
  declare function GridFilterInputMultipleSingleSelect(props: GridFilterInputMultipleSingleSelectProps): React.JSX.Element;
@@ -1,16 +1,12 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
- const _excluded = ["item", "applyValue", "type", "apiRef", "focusElementRef", "slotProps"],
4
- _excluded2 = ["key"],
5
- _excluded3 = ["inputProps", "InputProps", "InputLabelProps"];
3
+ const _excluded = ["item", "applyValue", "type", "apiRef", "focusElementRef", "slotProps"];
6
4
  import * as React from 'react';
7
5
  import PropTypes from 'prop-types';
8
- import Autocomplete, { createFilterOptions } from '@mui/material/Autocomplete';
9
6
  import { unstable_useId as useId } from '@mui/utils';
10
- import { getValueOptions, isSingleSelectColDef } from "./filterPanelUtils.js";
11
7
  import { useGridRootProps } from "../../../hooks/utils/useGridRootProps.js";
8
+ import { getValueOptions, isSingleSelectColDef } from "./filterPanelUtils.js";
12
9
  import { jsx as _jsx } from "react/jsx-runtime";
13
- const filter = createFilterOptions();
14
10
  function GridFilterInputMultipleSingleSelect(props) {
15
11
  const {
16
12
  item,
@@ -56,47 +52,22 @@ function GridFilterInputMultipleSingleSelect(props) {
56
52
  value: value.map(getOptionValue)
57
53
  }));
58
54
  }, [applyValue, item, getOptionValue]);
59
- return /*#__PURE__*/_jsx(Autocomplete, _extends({
55
+ const BaseAutocomplete = rootProps.slots.baseAutocomplete;
56
+ return /*#__PURE__*/_jsx(BaseAutocomplete, _extends({
60
57
  multiple: true,
61
58
  options: resolvedValueOptions,
62
59
  isOptionEqualToValue: isOptionEqualToValue,
63
- filterOptions: filter,
64
60
  id: id,
65
61
  value: filteredValues,
66
62
  onChange: handleChange,
67
63
  getOptionLabel: getOptionLabel,
68
- renderTags: (value, getTagProps) => value.map((option, index) => {
69
- const _getTagProps = getTagProps({
70
- index
71
- }),
72
- {
73
- key
74
- } = _getTagProps,
75
- tagProps = _objectWithoutPropertiesLoose(_getTagProps, _excluded2);
76
- return /*#__PURE__*/_jsx(rootProps.slots.baseChip, _extends({
77
- variant: "outlined",
78
- size: "small",
79
- label: getOptionLabel(option)
80
- }, tagProps), key);
81
- }),
82
- renderInput: params => {
83
- const {
84
- inputProps,
85
- InputProps,
86
- InputLabelProps
87
- } = params,
88
- rest = _objectWithoutPropertiesLoose(params, _excluded3);
89
- return /*#__PURE__*/_jsx(rootProps.slots.baseTextField, _extends({}, rest, {
90
- label: apiRef.current.getLocaleText('filterPanelInputLabel'),
91
- placeholder: apiRef.current.getLocaleText('filterPanelInputPlaceholder'),
92
- inputRef: focusElementRef,
64
+ label: apiRef.current.getLocaleText('filterPanelInputLabel'),
65
+ placeholder: apiRef.current.getLocaleText('filterPanelInputPlaceholder'),
66
+ slotProps: {
67
+ textField: {
93
68
  type: type || 'text',
94
- slotProps: {
95
- input: InputProps,
96
- inputLabel: InputLabelProps,
97
- htmlInput: inputProps
98
- }
99
- }, rootProps.slotProps?.baseTextField));
69
+ inputRef: focusElementRef
70
+ }
100
71
  }
101
72
  }, other, slotProps?.root));
102
73
  }
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
- import { AutocompleteProps } from '@mui/material/Autocomplete';
2
+ import { AutocompleteProps } from "../../../models/gridBaseSlots.js";
3
3
  import { GridFilterInputValueProps } from "../../../models/gridFilterInputComponent.js";
4
- export type GridFilterInputMultipleValueProps = GridFilterInputValueProps<Omit<AutocompleteProps<string, true, false, true>, 'options' | 'renderInput'>> & {
4
+ export type GridFilterInputMultipleValueProps = GridFilterInputValueProps<Omit<AutocompleteProps<string, true, false, true>, 'options'>> & {
5
5
  type?: 'text' | 'number' | 'date' | 'datetime-local';
6
6
  };
7
7
  declare function GridFilterInputMultipleValue(props: GridFilterInputMultipleValueProps): React.JSX.Element;
@@ -1,10 +1,6 @@
1
- import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
2
1
  import _extends from "@babel/runtime/helpers/esm/extends";
3
- const _excluded = ["key"],
4
- _excluded2 = ["inputProps", "InputProps", "InputLabelProps"];
5
2
  import * as React from 'react';
6
3
  import PropTypes from 'prop-types';
7
- import Autocomplete from '@mui/material/Autocomplete';
8
4
  import { unstable_useId as useId } from '@mui/utils';
9
5
  import { useGridRootProps } from "../../../hooks/utils/useGridRootProps.js";
10
6
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -17,8 +13,9 @@ function GridFilterInputMultipleValue(props) {
17
13
  focusElementRef,
18
14
  slotProps
19
15
  } = props;
20
- const [filterValueState, setFilterValueState] = React.useState(item.value || []);
21
16
  const id = useId();
17
+ const [options, setOptions] = React.useState([]);
18
+ const [filterValueState, setFilterValueState] = React.useState(item.value || []);
22
19
  const rootProps = useGridRootProps();
23
20
  React.useEffect(() => {
24
21
  const itemValue = item.value ?? [];
@@ -30,51 +27,29 @@ function GridFilterInputMultipleValue(props) {
30
27
  value: [...value.map(filterItemValue => type === 'number' ? Number(filterItemValue) : filterItemValue)]
31
28
  }));
32
29
  }, [applyValue, item, type]);
33
- return /*#__PURE__*/_jsx(Autocomplete, _extends({
30
+ const handleInputChange = React.useCallback((event, value) => {
31
+ if (value === '') {
32
+ setOptions([]);
33
+ } else {
34
+ setOptions([value]);
35
+ }
36
+ }, [setOptions]);
37
+ const BaseAutocomplete = rootProps.slots.baseAutocomplete;
38
+ return /*#__PURE__*/_jsx(BaseAutocomplete, _extends({
34
39
  multiple: true,
35
40
  freeSolo: true,
36
- options: [],
37
- filterOptions: (options, params) => {
38
- const {
39
- inputValue
40
- } = params;
41
- return inputValue == null || inputValue === '' ? [] : [inputValue];
42
- },
41
+ options: options,
43
42
  id: id,
44
43
  value: filterValueState,
45
44
  onChange: handleChange,
46
- renderTags: (value, getTagProps) => value.map((option, index) => {
47
- const _getTagProps = getTagProps({
48
- index
49
- }),
50
- {
51
- key
52
- } = _getTagProps,
53
- tagProps = _objectWithoutPropertiesLoose(_getTagProps, _excluded);
54
- return /*#__PURE__*/_jsx(rootProps.slots.baseChip, _extends({
55
- variant: "outlined",
56
- size: "small",
57
- label: option
58
- }, tagProps), key);
59
- }),
60
- renderInput: params => {
61
- const {
62
- inputProps,
63
- InputProps,
64
- InputLabelProps
65
- } = params,
66
- rest = _objectWithoutPropertiesLoose(params, _excluded2);
67
- return /*#__PURE__*/_jsx(rootProps.slots.baseTextField, _extends({}, rest, {
68
- label: apiRef.current.getLocaleText('filterPanelInputLabel'),
69
- placeholder: apiRef.current.getLocaleText('filterPanelInputPlaceholder'),
70
- inputRef: focusElementRef,
45
+ onInputChange: handleInputChange,
46
+ label: apiRef.current.getLocaleText('filterPanelInputLabel'),
47
+ placeholder: apiRef.current.getLocaleText('filterPanelInputPlaceholder'),
48
+ slotProps: {
49
+ textField: {
71
50
  type: type || 'text',
72
- slotProps: {
73
- input: InputProps,
74
- inputLabel: InputLabelProps,
75
- htmlInput: inputProps
76
- }
77
- }, rootProps.slotProps?.baseTextField));
51
+ inputRef: focusElementRef
52
+ }
78
53
  }
79
54
  }, slotProps?.root));
80
55
  }
@@ -57,12 +57,9 @@ function GridFilterInputValue(props) {
57
57
  disabled: disabled,
58
58
  slotProps: _extends({}, textFieldProps?.slotProps, {
59
59
  input: _extends({
60
- endAdornment: applying ? /*#__PURE__*/_jsx(rootProps.slots.baseInputAdornment, {
61
- position: "end",
62
- children: /*#__PURE__*/_jsx(rootProps.slots.loadIcon, {
63
- fontSize: "small",
64
- color: "action"
65
- })
60
+ endAdornment: applying ? /*#__PURE__*/_jsx(rootProps.slots.loadIcon, {
61
+ fontSize: "small",
62
+ color: "action"
66
63
  }) : null
67
64
  }, textFieldProps?.slotProps?.input),
68
65
  htmlInput: _extends({
@@ -4,6 +4,7 @@ import PropTypes from 'prop-types';
4
4
  import { styled } from '@mui/material/styles';
5
5
  import { unstable_composeClasses as composeClasses, unstable_capitalize as capitalize, unstable_useId as useId } from '@mui/utils';
6
6
  import { forwardRef } from '@mui/x-internals/forwardRef';
7
+ import { vars } from "../../constants/cssVariables.js";
7
8
  import { gridColumnLookupSelector } from "../../hooks/features/columns/gridColumnsSelector.js";
8
9
  import { useGridSelector } from "../../hooks/utils/useGridSelector.js";
9
10
  import { gridFilterActiveItemsSelector } from "../../hooks/features/filter/gridFilterSelector.js";
@@ -26,12 +27,10 @@ const GridToolbarFilterListRoot = styled('ul', {
26
27
  name: 'MuiDataGrid',
27
28
  slot: 'ToolbarFilterList',
28
29
  overridesResolver: (_props, styles) => styles.toolbarFilterList
29
- })(({
30
- theme
31
- }) => ({
32
- margin: theme.spacing(1, 1, 0.5),
33
- padding: theme.spacing(0, 1)
34
- }));
30
+ })({
31
+ margin: vars.spacing(1, 1, 0.5),
32
+ padding: vars.spacing(0, 1)
33
+ });
35
34
 
36
35
  // FIXME(v8:romgrk): override slotProps
37
36
 
@@ -8,6 +8,7 @@ import { styled } from '@mui/material/styles';
8
8
  import { unstable_debounce as debounce } from '@mui/utils';
9
9
  import composeClasses from '@mui/utils/composeClasses';
10
10
  import { outlinedInputClasses } from '@mui/material/OutlinedInput';
11
+ import { vars } from "../../constants/cssVariables.js";
11
12
  import { getDataGridUtilityClass } from "../../constants/index.js";
12
13
  import { useGridApiContext } from "../../hooks/utils/useGridApiContext.js";
13
14
  import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
@@ -28,20 +29,18 @@ const GridToolbarQuickFilterRoot = styled('div', {
28
29
  name: 'MuiDataGrid',
29
30
  slot: 'ToolbarQuickFilter',
30
31
  overridesResolver: (props, styles) => styles.toolbarQuickFilter
31
- })(({
32
- theme
33
- }) => ({
32
+ })({
34
33
  [`.${outlinedInputClasses.root}`]: {
35
- fontSize: theme.typography.body2.fontSize
34
+ fontSize: vars.typography.body.fontSize
36
35
  },
37
36
  [`& input[type="search"]::-webkit-search-decoration,
38
- & input[type="search"]::-webkit-search-cancel-button,
39
- & input[type="search"]::-webkit-search-results-button,
40
- & input[type="search"]::-webkit-search-results-decoration`]: {
37
+ & input[type="search"]::-webkit-search-cancel-button,
38
+ & input[type="search"]::-webkit-search-results-button,
39
+ & input[type="search"]::-webkit-search-results-decoration`]: {
41
40
  /* clears the 'X' icon from Chrome */
42
41
  display: 'none'
43
42
  }
44
- }));
43
+ });
45
44
  const defaultSearchValueParser = searchText => searchText.split(' ').filter(word => word !== '');
46
45
  const defaultSearchValueFormatter = values => values.join(' ');
47
46
  function GridToolbarQuickFilter(props) {
@@ -97,30 +96,24 @@ function GridToolbarQuickFilter(props) {
97
96
  }, other, {
98
97
  slotProps: _extends({}, slotProps?.root.slotProps, {
99
98
  input: _extends({
100
- startAdornment: /*#__PURE__*/_jsx(rootProps.slots.baseInputAdornment, {
101
- position: "start",
102
- children: /*#__PURE__*/_jsx(rootProps.slots.quickFilterIcon, {
99
+ startAdornment: /*#__PURE__*/_jsx(rootProps.slots.quickFilterIcon, {
100
+ fontSize: "small"
101
+ }),
102
+ endAdornment: /*#__PURE__*/_jsx(rootProps.slots.baseIconButton, _extends({
103
+ "aria-label": apiRef.current.getLocaleText('toolbarQuickFilterDeleteIconLabel'),
104
+ size: "small",
105
+ edge: "end",
106
+ style: searchValue ? {
107
+ visibility: 'visible'
108
+ } : {
109
+ visibility: 'hidden'
110
+ },
111
+ onClick: handleSearchReset
112
+ }, rootProps.slotProps?.baseIconButton, {
113
+ children: /*#__PURE__*/_jsx(rootProps.slots.quickFilterClearIcon, {
103
114
  fontSize: "small"
104
115
  })
105
- }),
106
- endAdornment: /*#__PURE__*/_jsx(rootProps.slots.baseInputAdornment, {
107
- position: "end",
108
- children: /*#__PURE__*/_jsx(rootProps.slots.baseIconButton, _extends({
109
- "aria-label": apiRef.current.getLocaleText('toolbarQuickFilterDeleteIconLabel'),
110
- size: "small",
111
- edge: "end",
112
- style: searchValue ? {
113
- visibility: 'visible'
114
- } : {
115
- visibility: 'hidden'
116
- },
117
- onClick: handleSearchReset
118
- }, rootProps.slotProps?.baseIconButton, {
119
- children: /*#__PURE__*/_jsx(rootProps.slots.quickFilterClearIcon, {
120
- fontSize: "small"
121
- })
122
- }))
123
- })
116
+ }))
124
117
  }, slotProps?.root.slotProps?.input)
125
118
  })
126
119
  }, rootProps.slotProps?.baseTextField));
@@ -1,6 +1,8 @@
1
1
  import * as React from 'react';
2
2
  import { styled } from '@mui/system';
3
- import { unstable_composeClasses as composeClasses, unstable_useForkRef as useForkRef, unstable_useEventCallback as useEventCallback } from '@mui/utils';
3
+ import useEventCallback from '@mui/utils/useEventCallback';
4
+ import useForkRef from '@mui/utils/useForkRef';
5
+ import composeClasses from '@mui/utils/composeClasses';
4
6
  import { forwardRef } from '@mui/x-internals/forwardRef';
5
7
  import { useOnMount } from "../../hooks/utils/useOnMount.js";
6
8
  import { useGridPrivateApiContext } from "../../hooks/utils/useGridPrivateApiContext.js";
@@ -1,6 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { styled } from '@mui/system';
3
3
  import { fastMemo } from '@mui/x-internals/fastMemo';
4
+ import { vars } from "../../constants/cssVariables.js";
4
5
  import { useGridSelector } from "../../hooks/utils/useGridSelector.js";
5
6
  import { useGridApiContext } from "../../hooks/utils/useGridApiContext.js";
6
7
  import { gridDimensionsSelector } from "../../hooks/features/dimensions/index.js";
@@ -17,7 +18,7 @@ const Pinned = styled('div')({
17
18
  height: '100%',
18
19
  boxSizing: 'border-box',
19
20
  borderTop: '1px solid var(--rowBorderColor)',
20
- backgroundColor: 'var(--DataGrid-pinnedBackground)'
21
+ backgroundColor: vars.cell.background.pinned
21
22
  });
22
23
  const PinnedLeft = styled(Pinned)({
23
24
  left: 0,