@mui/x-data-grid 8.0.0-alpha.12 → 8.0.0-alpha.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +430 -0
- package/DataGrid/DataGrid.js +31 -22
- package/DataGrid/useDataGridProps.js +1 -1
- package/colDef/gridActionsColDef.js +1 -1
- package/colDef/gridBooleanColDef.js +1 -1
- package/colDef/gridCheckboxSelectionColDef.js +2 -4
- package/components/GridFooter.js +1 -1
- package/components/GridHeader.js +1 -1
- package/components/GridPagination.js +5 -6
- package/components/GridRowCount.js +4 -5
- package/components/GridScrollArea.js +4 -3
- package/components/GridSelectedRowCount.js +5 -6
- package/components/GridShadowScrollArea.d.ts +8 -0
- package/components/GridShadowScrollArea.js +82 -0
- package/components/cell/GridEditInputCell.js +2 -3
- package/components/columnSelection/GridHeaderCheckbox.js +51 -17
- package/components/columnsManagement/GridColumnsManagement.js +60 -61
- package/components/columnsPanel/ColumnsPanelTrigger.d.ts +33 -0
- package/components/columnsPanel/ColumnsPanelTrigger.js +209 -0
- package/components/columnsPanel/index.d.ts +1 -0
- package/components/columnsPanel/index.js +16 -0
- package/components/containers/GridOverlay.js +6 -8
- package/components/containers/GridRoot.js +4 -2
- package/components/containers/GridRootStyles.d.ts +1 -2
- package/components/containers/GridRootStyles.js +77 -100
- package/components/containers/GridToolbarContainer.js +5 -6
- package/components/export/ExportCsv.d.ts +30 -0
- package/components/export/ExportCsv.js +196 -0
- package/components/export/ExportPrint.d.ts +30 -0
- package/components/export/ExportPrint.js +196 -0
- package/components/export/index.d.ts +2 -0
- package/components/export/index.js +27 -0
- package/components/filterPanel/FilterPanelTrigger.d.ts +37 -0
- package/components/filterPanel/FilterPanelTrigger.js +212 -0
- package/components/filterPanel/index.d.ts +1 -0
- package/components/filterPanel/index.js +16 -0
- package/components/index.d.ts +6 -1
- package/components/index.js +60 -0
- package/components/menu/GridMenu.js +7 -6
- package/components/menu/columnMenu/GridColumnHeaderMenu.js +4 -3
- package/components/panel/GridPanel.js +18 -20
- package/components/panel/GridPanelContent.js +6 -8
- package/components/panel/GridPanelFooter.js +5 -6
- package/components/panel/GridPanelHeader.js +4 -5
- package/components/panel/filterPanel/GridFilterForm.js +13 -20
- package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.d.ts +2 -2
- package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +10 -39
- package/components/panel/filterPanel/GridFilterInputMultipleValue.d.ts +2 -2
- package/components/panel/filterPanel/GridFilterInputMultipleValue.js +20 -45
- package/components/panel/filterPanel/GridFilterInputValue.js +3 -6
- package/components/quickFilter/QuickFilter.d.ts +41 -0
- package/components/quickFilter/QuickFilter.js +110 -0
- package/components/quickFilter/QuickFilterClear.d.ts +28 -0
- package/components/quickFilter/QuickFilterClear.js +161 -0
- package/components/quickFilter/QuickFilterContext.d.ts +13 -0
- package/components/quickFilter/QuickFilterContext.js +17 -0
- package/components/quickFilter/QuickFilterControl.d.ts +28 -0
- package/components/quickFilter/QuickFilterControl.js +104 -0
- package/components/quickFilter/index.d.ts +3 -0
- package/components/quickFilter/index.js +38 -0
- package/components/toolbar/GridToolbar.d.ts +1 -1
- package/components/toolbar/GridToolbar.js +2 -2
- package/components/toolbar/GridToolbarFilterButton.js +5 -6
- package/components/toolbar/GridToolbarQuickFilter.js +57 -97
- package/components/toolbarV8/GridToolbar.d.ts +11 -0
- package/components/toolbarV8/GridToolbar.js +142 -0
- package/components/toolbarV8/Toolbar.d.ts +32 -0
- package/components/toolbarV8/Toolbar.js +132 -0
- package/components/toolbarV8/ToolbarButton.d.ts +23 -0
- package/components/toolbarV8/ToolbarButton.js +179 -0
- package/components/toolbarV8/ToolbarContext.d.ts +9 -0
- package/components/toolbarV8/ToolbarContext.js +17 -0
- package/components/toolbarV8/index.d.ts +2 -0
- package/components/toolbarV8/index.js +27 -0
- package/components/virtualization/GridVirtualScrollbar.js +15 -6
- package/components/virtualization/GridVirtualScrollerFiller.js +2 -1
- package/constants/cssVariables.d.ts +294 -0
- package/constants/cssVariables.js +168 -0
- package/constants/dataGridPropsDefaultValues.js +1 -0
- package/constants/defaultGridSlotsComponents.js +2 -1
- package/constants/gridClasses.d.ts +17 -0
- package/constants/gridClasses.js +1 -1
- package/context/GridContextProvider.js +4 -1
- package/esm/DataGrid/DataGrid.js +31 -22
- package/esm/DataGrid/useDataGridProps.js +1 -1
- package/esm/colDef/gridActionsColDef.js +1 -1
- package/esm/colDef/gridBooleanColDef.js +1 -1
- package/esm/colDef/gridCheckboxSelectionColDef.js +2 -4
- package/esm/components/GridFooter.js +2 -2
- package/esm/components/GridHeader.js +1 -1
- package/esm/components/GridPagination.js +5 -6
- package/esm/components/GridRowCount.js +4 -5
- package/esm/components/GridScrollArea.js +2 -1
- package/esm/components/GridSelectedRowCount.js +5 -6
- package/esm/components/GridShadowScrollArea.d.ts +8 -0
- package/esm/components/GridShadowScrollArea.js +74 -0
- package/esm/components/cell/GridEditInputCell.js +2 -3
- package/esm/components/columnSelection/GridHeaderCheckbox.js +51 -17
- package/esm/components/columnsManagement/GridColumnsManagement.js +61 -62
- package/esm/components/columnsPanel/ColumnsPanelTrigger.d.ts +33 -0
- package/esm/components/columnsPanel/ColumnsPanelTrigger.js +202 -0
- package/esm/components/columnsPanel/index.d.ts +1 -0
- package/esm/components/columnsPanel/index.js +1 -0
- package/esm/components/containers/GridOverlay.js +6 -8
- package/esm/components/containers/GridRoot.js +4 -2
- package/esm/components/containers/GridRootStyles.d.ts +1 -2
- package/esm/components/containers/GridRootStyles.js +78 -101
- package/esm/components/containers/GridToolbarContainer.js +5 -6
- package/esm/components/export/ExportCsv.d.ts +30 -0
- package/esm/components/export/ExportCsv.js +189 -0
- package/esm/components/export/ExportPrint.d.ts +30 -0
- package/esm/components/export/ExportPrint.js +189 -0
- package/esm/components/export/index.d.ts +2 -0
- package/esm/components/export/index.js +2 -0
- package/esm/components/filterPanel/FilterPanelTrigger.d.ts +37 -0
- package/esm/components/filterPanel/FilterPanelTrigger.js +205 -0
- package/esm/components/filterPanel/index.d.ts +1 -0
- package/esm/components/filterPanel/index.js +1 -0
- package/esm/components/index.d.ts +6 -1
- package/esm/components/index.js +6 -1
- package/esm/components/menu/GridMenu.js +7 -6
- package/esm/components/menu/columnMenu/GridColumnHeaderMenu.js +2 -1
- package/esm/components/panel/GridPanel.js +18 -20
- package/esm/components/panel/GridPanelContent.js +6 -8
- package/esm/components/panel/GridPanelFooter.js +5 -6
- package/esm/components/panel/GridPanelHeader.js +4 -5
- package/esm/components/panel/filterPanel/GridFilterForm.js +13 -20
- package/esm/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.d.ts +2 -2
- package/esm/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +10 -39
- package/esm/components/panel/filterPanel/GridFilterInputMultipleValue.d.ts +2 -2
- package/esm/components/panel/filterPanel/GridFilterInputMultipleValue.js +19 -44
- package/esm/components/panel/filterPanel/GridFilterInputValue.js +3 -6
- package/esm/components/quickFilter/QuickFilter.d.ts +41 -0
- package/esm/components/quickFilter/QuickFilter.js +103 -0
- package/esm/components/quickFilter/QuickFilterClear.d.ts +28 -0
- package/esm/components/quickFilter/QuickFilterClear.js +154 -0
- package/esm/components/quickFilter/QuickFilterContext.d.ts +13 -0
- package/esm/components/quickFilter/QuickFilterContext.js +9 -0
- package/esm/components/quickFilter/QuickFilterControl.d.ts +28 -0
- package/esm/components/quickFilter/QuickFilterControl.js +97 -0
- package/esm/components/quickFilter/index.d.ts +3 -0
- package/esm/components/quickFilter/index.js +3 -0
- package/esm/components/toolbar/GridToolbar.d.ts +1 -1
- package/esm/components/toolbar/GridToolbar.js +2 -2
- package/esm/components/toolbar/GridToolbarFilterButton.js +5 -6
- package/esm/components/toolbar/GridToolbarQuickFilter.js +59 -97
- package/esm/components/toolbarV8/GridToolbar.d.ts +11 -0
- package/esm/components/toolbarV8/GridToolbar.js +135 -0
- package/esm/components/toolbarV8/Toolbar.d.ts +32 -0
- package/esm/components/toolbarV8/Toolbar.js +125 -0
- package/esm/components/toolbarV8/ToolbarButton.d.ts +23 -0
- package/esm/components/toolbarV8/ToolbarButton.js +172 -0
- package/esm/components/toolbarV8/ToolbarContext.d.ts +9 -0
- package/esm/components/toolbarV8/ToolbarContext.js +9 -0
- package/esm/components/toolbarV8/index.d.ts +2 -0
- package/esm/components/toolbarV8/index.js +2 -0
- package/esm/components/virtualization/GridVirtualScrollbar.js +10 -2
- package/esm/components/virtualization/GridVirtualScrollerFiller.js +2 -1
- package/esm/constants/cssVariables.d.ts +294 -0
- package/esm/constants/cssVariables.js +161 -0
- package/esm/constants/dataGridPropsDefaultValues.js +1 -0
- package/esm/constants/defaultGridSlotsComponents.js +2 -1
- package/esm/constants/gridClasses.d.ts +17 -0
- package/esm/constants/gridClasses.js +1 -1
- package/esm/context/GridContextProvider.js +4 -1
- package/esm/hooks/features/clipboard/useGridClipboard.js +3 -2
- package/esm/hooks/features/columnHeaders/useGridColumnHeaders.js +2 -2
- package/esm/hooks/features/columnResize/useGridColumnResize.js +2 -1
- package/esm/hooks/features/columns/gridColumnsInterfaces.d.ts +1 -0
- package/esm/hooks/features/columns/gridColumnsSelector.d.ts +7 -0
- package/esm/hooks/features/columns/gridColumnsSelector.js +8 -0
- package/esm/hooks/features/columns/gridColumnsUtils.d.ts +3 -1
- package/esm/hooks/features/columns/gridColumnsUtils.js +6 -3
- package/esm/hooks/features/columns/index.d.ts +1 -1
- package/esm/hooks/features/columns/index.js +1 -1
- package/esm/hooks/features/columns/useGridColumns.js +4 -2
- package/esm/hooks/features/dataSource/gridDataSourceError.d.ts +31 -0
- package/esm/hooks/features/dataSource/gridDataSourceError.js +32 -0
- package/esm/hooks/features/dataSource/index.d.ts +2 -0
- package/esm/hooks/features/dataSource/index.js +2 -0
- package/esm/hooks/features/dataSource/models.d.ts +1 -1
- package/esm/hooks/features/dataSource/useGridDataSourceBase.d.ts +1 -1
- package/esm/hooks/features/dataSource/useGridDataSourceBase.js +27 -17
- package/esm/hooks/features/dimensions/useGridDimensions.js +11 -10
- package/esm/hooks/features/editing/useGridCellEditing.js +2 -1
- package/esm/hooks/features/editing/useGridRowEditing.js +2 -1
- package/esm/hooks/features/export/utils.js +4 -2
- package/esm/hooks/features/focus/useGridFocus.js +3 -2
- package/esm/hooks/features/index.d.ts +1 -1
- package/esm/hooks/features/index.js +1 -1
- package/esm/hooks/features/rowSelection/gridRowSelectionSelector.d.ts +3 -3
- package/esm/hooks/features/rowSelection/gridRowSelectionSelector.js +27 -7
- package/esm/hooks/features/rowSelection/useGridRowSelection.js +148 -81
- package/esm/hooks/features/rowSelection/utils.d.ts +2 -2
- package/esm/hooks/features/rowSelection/utils.js +11 -11
- package/esm/hooks/features/rows/gridRowsInterfaces.d.ts +1 -1
- package/esm/hooks/features/rows/gridRowsUtils.d.ts +2 -1
- package/esm/hooks/features/rows/gridRowsUtils.js +8 -0
- package/esm/hooks/features/rows/useGridParamsApi.js +2 -8
- package/esm/hooks/features/rows/useGridRowAriaAttributes.js +2 -4
- package/esm/hooks/features/rows/useGridRows.d.ts +2 -2
- package/esm/hooks/features/rows/useGridRows.js +7 -7
- package/esm/hooks/features/rows/useGridRowsMeta.js +8 -0
- package/esm/hooks/features/virtualization/useGridVirtualScroller.d.ts +0 -2
- package/esm/hooks/features/virtualization/useGridVirtualScroller.js +5 -11
- package/esm/hooks/utils/index.d.ts +2 -1
- package/esm/hooks/utils/useGridComponentRenderer.d.ts +12 -0
- package/esm/hooks/utils/useGridComponentRenderer.js +36 -0
- package/esm/hooks/utils/useGridSelector.js +4 -1
- package/esm/hooks/utils/useIsSSR.js +4 -1
- package/esm/index.js +1 -1
- package/esm/internals/demo/TailwindDemoContainer.d.ts +11 -0
- package/esm/internals/demo/TailwindDemoContainer.js +55 -0
- package/esm/internals/demo/index.d.ts +1 -0
- package/esm/internals/demo/index.js +1 -0
- package/esm/internals/index.d.ts +6 -1
- package/esm/internals/index.js +5 -1
- package/esm/internals/utils/propValidation.js +1 -1
- package/esm/locales/bnBD.d.ts +2 -0
- package/esm/locales/bnBD.js +167 -0
- package/esm/locales/deDE.js +3 -5
- package/esm/locales/huHU.js +10 -13
- package/esm/locales/index.d.ts +1 -0
- package/esm/locales/index.js +1 -0
- package/esm/locales/ruRU.js +17 -21
- package/esm/material/icons/index.d.ts +3 -3
- package/esm/material/icons/index.js +6 -6
- package/esm/material/index.d.ts +1 -0
- package/esm/material/index.js +167 -52
- package/esm/material/variables.d.ts +5 -0
- package/esm/material/variables.js +89 -0
- package/esm/models/api/gridRowSelectionApi.d.ts +4 -2
- package/esm/models/api/gridSortApi.d.ts +1 -1
- package/esm/models/configuration/gridConfiguration.d.ts +7 -1
- package/esm/models/gridBaseSlots.d.ts +61 -7
- package/esm/models/gridDataSource.d.ts +9 -4
- package/esm/models/gridIconSlotsComponent.d.ts +1 -1
- package/esm/models/gridRowSelectionManager.d.ts +9 -0
- package/esm/models/gridRowSelectionManager.js +36 -0
- package/esm/models/gridRowSelectionModel.d.ts +4 -2
- package/esm/models/gridSlotsComponent.d.ts +7 -28
- package/esm/models/gridSlotsComponentsProps.d.ts +3 -11
- package/esm/models/gridSortModel.d.ts +1 -1
- package/esm/models/index.d.ts +2 -1
- package/esm/models/index.js +2 -3
- package/esm/models/props/DataGridProps.d.ts +22 -17
- package/esm/utils/css/context.d.ts +14 -0
- package/esm/utils/css/context.js +54 -0
- package/esm/utils/index.d.ts +2 -1
- package/esm/utils/index.js +1 -1
- package/hooks/features/clipboard/useGridClipboard.js +3 -2
- package/hooks/features/columnHeaders/useGridColumnHeaders.js +2 -2
- package/hooks/features/columnResize/useGridColumnResize.js +28 -27
- package/hooks/features/columns/gridColumnsInterfaces.d.ts +1 -0
- package/hooks/features/columns/gridColumnsSelector.d.ts +7 -0
- package/hooks/features/columns/gridColumnsSelector.js +9 -1
- package/hooks/features/columns/gridColumnsUtils.d.ts +3 -1
- package/hooks/features/columns/gridColumnsUtils.js +6 -3
- package/hooks/features/columns/index.d.ts +1 -1
- package/hooks/features/columns/index.js +94 -10
- package/hooks/features/columns/useGridColumns.js +4 -2
- package/hooks/features/dataSource/gridDataSourceError.d.ts +31 -0
- package/hooks/features/dataSource/gridDataSourceError.js +40 -0
- package/hooks/features/dataSource/index.d.ts +2 -0
- package/hooks/features/dataSource/index.js +25 -0
- package/hooks/features/dataSource/models.d.ts +1 -1
- package/hooks/features/dataSource/useGridDataSourceBase.d.ts +1 -1
- package/hooks/features/dataSource/useGridDataSourceBase.js +27 -17
- package/hooks/features/dimensions/useGridDimensions.js +19 -18
- package/hooks/features/editing/useGridCellEditing.js +10 -9
- package/hooks/features/editing/useGridRowEditing.js +11 -10
- package/hooks/features/export/utils.js +4 -2
- package/hooks/features/focus/useGridFocus.js +8 -7
- package/hooks/features/index.d.ts +1 -1
- package/hooks/features/index.js +11 -28
- package/hooks/features/rowSelection/gridRowSelectionSelector.d.ts +3 -3
- package/hooks/features/rowSelection/gridRowSelectionSelector.js +27 -7
- package/hooks/features/rowSelection/useGridRowSelection.js +146 -79
- package/hooks/features/rowSelection/utils.d.ts +2 -2
- package/hooks/features/rowSelection/utils.js +10 -10
- package/hooks/features/rows/gridRowsInterfaces.d.ts +1 -1
- package/hooks/features/rows/gridRowsUtils.d.ts +2 -1
- package/hooks/features/rows/gridRowsUtils.js +10 -1
- package/hooks/features/rows/useGridParamsApi.js +2 -8
- package/hooks/features/rows/useGridRowAriaAttributes.js +2 -4
- package/hooks/features/rows/useGridRows.d.ts +2 -2
- package/hooks/features/rows/useGridRows.js +7 -7
- package/hooks/features/rows/useGridRowsMeta.js +8 -0
- package/hooks/features/virtualization/useGridVirtualScroller.d.ts +0 -2
- package/hooks/features/virtualization/useGridVirtualScroller.js +21 -27
- package/hooks/utils/index.d.ts +2 -1
- package/hooks/utils/useGridComponentRenderer.d.ts +12 -0
- package/hooks/utils/useGridComponentRenderer.js +44 -0
- package/hooks/utils/useGridSelector.js +6 -2
- package/hooks/utils/useIsSSR.js +6 -2
- package/index.js +1 -1
- package/internals/demo/TailwindDemoContainer.d.ts +11 -0
- package/internals/demo/TailwindDemoContainer.js +63 -0
- package/internals/demo/index.d.ts +1 -0
- package/internals/demo/index.js +12 -0
- package/internals/index.d.ts +6 -1
- package/internals/index.js +43 -0
- package/internals/utils/propValidation.js +1 -1
- package/locales/bnBD.d.ts +2 -0
- package/locales/bnBD.js +173 -0
- package/locales/deDE.js +3 -5
- package/locales/huHU.js +10 -13
- package/locales/index.d.ts +1 -0
- package/locales/index.js +11 -0
- package/locales/ruRU.js +17 -21
- package/material/icons/index.d.ts +3 -3
- package/material/icons/index.js +7 -7
- package/material/index.d.ts +1 -0
- package/material/index.js +172 -51
- package/material/variables.d.ts +5 -0
- package/material/variables.js +95 -0
- package/models/api/gridRowSelectionApi.d.ts +4 -2
- package/models/api/gridSortApi.d.ts +1 -1
- package/models/configuration/gridConfiguration.d.ts +7 -1
- package/models/gridBaseSlots.d.ts +61 -7
- package/models/gridDataSource.d.ts +9 -4
- package/models/gridIconSlotsComponent.d.ts +1 -1
- package/models/gridRowSelectionManager.d.ts +9 -0
- package/models/gridRowSelectionManager.js +43 -0
- package/models/gridRowSelectionModel.d.ts +4 -2
- package/models/gridSlotsComponent.d.ts +7 -28
- package/models/gridSlotsComponentsProps.d.ts +3 -11
- package/models/gridSortModel.d.ts +1 -1
- package/models/index.d.ts +2 -1
- package/models/index.js +34 -11
- package/models/props/DataGridProps.d.ts +22 -17
- package/modern/DataGrid/DataGrid.js +31 -22
- package/modern/DataGrid/useDataGridProps.js +1 -1
- package/modern/colDef/gridActionsColDef.js +1 -1
- package/modern/colDef/gridBooleanColDef.js +1 -1
- package/modern/colDef/gridCheckboxSelectionColDef.js +2 -4
- package/modern/components/GridFooter.js +2 -2
- package/modern/components/GridHeader.js +1 -1
- package/modern/components/GridPagination.js +5 -6
- package/modern/components/GridRowCount.js +4 -5
- package/modern/components/GridScrollArea.js +2 -1
- package/modern/components/GridSelectedRowCount.js +5 -6
- package/modern/components/GridShadowScrollArea.d.ts +8 -0
- package/modern/components/GridShadowScrollArea.js +74 -0
- package/modern/components/cell/GridEditInputCell.js +2 -3
- package/modern/components/columnSelection/GridHeaderCheckbox.js +51 -17
- package/modern/components/columnsManagement/GridColumnsManagement.js +61 -62
- package/modern/components/columnsPanel/ColumnsPanelTrigger.d.ts +33 -0
- package/modern/components/columnsPanel/ColumnsPanelTrigger.js +202 -0
- package/modern/components/columnsPanel/index.d.ts +1 -0
- package/modern/components/columnsPanel/index.js +1 -0
- package/modern/components/containers/GridOverlay.js +6 -8
- package/modern/components/containers/GridRoot.js +4 -2
- package/modern/components/containers/GridRootStyles.d.ts +1 -2
- package/modern/components/containers/GridRootStyles.js +78 -101
- package/modern/components/containers/GridToolbarContainer.js +5 -6
- package/modern/components/export/ExportCsv.d.ts +30 -0
- package/modern/components/export/ExportCsv.js +189 -0
- package/modern/components/export/ExportPrint.d.ts +30 -0
- package/modern/components/export/ExportPrint.js +189 -0
- package/modern/components/export/index.d.ts +2 -0
- package/modern/components/export/index.js +2 -0
- package/modern/components/filterPanel/FilterPanelTrigger.d.ts +37 -0
- package/modern/components/filterPanel/FilterPanelTrigger.js +205 -0
- package/modern/components/filterPanel/index.d.ts +1 -0
- package/modern/components/filterPanel/index.js +1 -0
- package/modern/components/index.d.ts +6 -1
- package/modern/components/index.js +6 -1
- package/modern/components/menu/GridMenu.js +7 -6
- package/modern/components/menu/columnMenu/GridColumnHeaderMenu.js +2 -1
- package/modern/components/panel/GridPanel.js +18 -20
- package/modern/components/panel/GridPanelContent.js +6 -8
- package/modern/components/panel/GridPanelFooter.js +5 -6
- package/modern/components/panel/GridPanelHeader.js +4 -5
- package/modern/components/panel/filterPanel/GridFilterForm.js +13 -20
- package/modern/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.d.ts +2 -2
- package/modern/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +10 -39
- package/modern/components/panel/filterPanel/GridFilterInputMultipleValue.d.ts +2 -2
- package/modern/components/panel/filterPanel/GridFilterInputMultipleValue.js +19 -44
- package/modern/components/panel/filterPanel/GridFilterInputValue.js +3 -6
- package/modern/components/quickFilter/QuickFilter.d.ts +41 -0
- package/modern/components/quickFilter/QuickFilter.js +103 -0
- package/modern/components/quickFilter/QuickFilterClear.d.ts +28 -0
- package/modern/components/quickFilter/QuickFilterClear.js +154 -0
- package/modern/components/quickFilter/QuickFilterContext.d.ts +13 -0
- package/modern/components/quickFilter/QuickFilterContext.js +9 -0
- package/modern/components/quickFilter/QuickFilterControl.d.ts +28 -0
- package/modern/components/quickFilter/QuickFilterControl.js +97 -0
- package/modern/components/quickFilter/index.d.ts +3 -0
- package/modern/components/quickFilter/index.js +3 -0
- package/modern/components/toolbar/GridToolbar.d.ts +1 -1
- package/modern/components/toolbar/GridToolbar.js +2 -2
- package/modern/components/toolbar/GridToolbarFilterButton.js +5 -6
- package/modern/components/toolbar/GridToolbarQuickFilter.js +59 -97
- package/modern/components/toolbarV8/GridToolbar.d.ts +11 -0
- package/modern/components/toolbarV8/GridToolbar.js +135 -0
- package/modern/components/toolbarV8/Toolbar.d.ts +32 -0
- package/modern/components/toolbarV8/Toolbar.js +125 -0
- package/modern/components/toolbarV8/ToolbarButton.d.ts +23 -0
- package/modern/components/toolbarV8/ToolbarButton.js +172 -0
- package/modern/components/toolbarV8/ToolbarContext.d.ts +9 -0
- package/modern/components/toolbarV8/ToolbarContext.js +9 -0
- package/modern/components/toolbarV8/index.d.ts +2 -0
- package/modern/components/toolbarV8/index.js +2 -0
- package/modern/components/virtualization/GridVirtualScrollbar.js +10 -2
- package/modern/components/virtualization/GridVirtualScrollerFiller.js +2 -1
- package/modern/constants/cssVariables.d.ts +294 -0
- package/modern/constants/cssVariables.js +161 -0
- package/modern/constants/dataGridPropsDefaultValues.js +1 -0
- package/modern/constants/defaultGridSlotsComponents.js +2 -1
- package/modern/constants/gridClasses.d.ts +17 -0
- package/modern/constants/gridClasses.js +1 -1
- package/modern/context/GridContextProvider.js +4 -1
- package/modern/hooks/features/clipboard/useGridClipboard.js +3 -2
- package/modern/hooks/features/columnHeaders/useGridColumnHeaders.js +2 -2
- package/modern/hooks/features/columnResize/useGridColumnResize.js +2 -1
- package/modern/hooks/features/columns/gridColumnsInterfaces.d.ts +1 -0
- package/modern/hooks/features/columns/gridColumnsSelector.d.ts +7 -0
- package/modern/hooks/features/columns/gridColumnsSelector.js +8 -0
- package/modern/hooks/features/columns/gridColumnsUtils.d.ts +3 -1
- package/modern/hooks/features/columns/gridColumnsUtils.js +6 -3
- package/modern/hooks/features/columns/index.d.ts +1 -1
- package/modern/hooks/features/columns/index.js +1 -1
- package/modern/hooks/features/columns/useGridColumns.js +4 -2
- package/modern/hooks/features/dataSource/gridDataSourceError.d.ts +31 -0
- package/modern/hooks/features/dataSource/gridDataSourceError.js +32 -0
- package/modern/hooks/features/dataSource/index.d.ts +2 -0
- package/modern/hooks/features/dataSource/index.js +2 -0
- package/modern/hooks/features/dataSource/models.d.ts +1 -1
- package/modern/hooks/features/dataSource/useGridDataSourceBase.d.ts +1 -1
- package/modern/hooks/features/dataSource/useGridDataSourceBase.js +27 -17
- package/modern/hooks/features/dimensions/useGridDimensions.js +11 -10
- package/modern/hooks/features/editing/useGridCellEditing.js +2 -1
- package/modern/hooks/features/editing/useGridRowEditing.js +2 -1
- package/modern/hooks/features/export/utils.js +4 -2
- package/modern/hooks/features/focus/useGridFocus.js +3 -2
- package/modern/hooks/features/index.d.ts +1 -1
- package/modern/hooks/features/index.js +1 -1
- package/modern/hooks/features/rowSelection/gridRowSelectionSelector.d.ts +3 -3
- package/modern/hooks/features/rowSelection/gridRowSelectionSelector.js +27 -7
- package/modern/hooks/features/rowSelection/useGridRowSelection.js +148 -81
- package/modern/hooks/features/rowSelection/utils.d.ts +2 -2
- package/modern/hooks/features/rowSelection/utils.js +11 -11
- package/modern/hooks/features/rows/gridRowsInterfaces.d.ts +1 -1
- package/modern/hooks/features/rows/gridRowsUtils.d.ts +2 -1
- package/modern/hooks/features/rows/gridRowsUtils.js +8 -0
- package/modern/hooks/features/rows/useGridParamsApi.js +2 -8
- package/modern/hooks/features/rows/useGridRowAriaAttributes.js +2 -4
- package/modern/hooks/features/rows/useGridRows.d.ts +2 -2
- package/modern/hooks/features/rows/useGridRows.js +7 -7
- package/modern/hooks/features/rows/useGridRowsMeta.js +8 -0
- package/modern/hooks/features/virtualization/useGridVirtualScroller.d.ts +0 -2
- package/modern/hooks/features/virtualization/useGridVirtualScroller.js +5 -11
- package/modern/hooks/utils/index.d.ts +2 -1
- package/modern/hooks/utils/useGridComponentRenderer.d.ts +12 -0
- package/modern/hooks/utils/useGridComponentRenderer.js +36 -0
- package/modern/hooks/utils/useGridSelector.js +4 -1
- package/modern/hooks/utils/useIsSSR.js +4 -1
- package/modern/index.js +1 -1
- package/modern/internals/demo/TailwindDemoContainer.d.ts +11 -0
- package/modern/internals/demo/TailwindDemoContainer.js +55 -0
- package/modern/internals/demo/index.d.ts +1 -0
- package/modern/internals/demo/index.js +1 -0
- package/modern/internals/index.d.ts +6 -1
- package/modern/internals/index.js +5 -1
- package/modern/internals/utils/propValidation.js +1 -1
- package/modern/locales/bnBD.d.ts +2 -0
- package/modern/locales/bnBD.js +167 -0
- package/modern/locales/deDE.js +3 -5
- package/modern/locales/huHU.js +10 -13
- package/modern/locales/index.d.ts +1 -0
- package/modern/locales/index.js +1 -0
- package/modern/locales/ruRU.js +17 -21
- package/modern/material/icons/index.d.ts +3 -3
- package/modern/material/icons/index.js +6 -6
- package/modern/material/index.d.ts +1 -0
- package/modern/material/index.js +167 -52
- package/modern/material/variables.d.ts +5 -0
- package/modern/material/variables.js +89 -0
- package/modern/models/api/gridRowSelectionApi.d.ts +4 -2
- package/modern/models/api/gridSortApi.d.ts +1 -1
- package/modern/models/configuration/gridConfiguration.d.ts +7 -1
- package/modern/models/gridBaseSlots.d.ts +61 -7
- package/modern/models/gridDataSource.d.ts +9 -4
- package/modern/models/gridIconSlotsComponent.d.ts +1 -1
- package/modern/models/gridRowSelectionManager.d.ts +9 -0
- package/modern/models/gridRowSelectionManager.js +36 -0
- package/modern/models/gridRowSelectionModel.d.ts +4 -2
- package/modern/models/gridSlotsComponent.d.ts +7 -28
- package/modern/models/gridSlotsComponentsProps.d.ts +3 -11
- package/modern/models/gridSortModel.d.ts +1 -1
- package/modern/models/index.d.ts +2 -1
- package/modern/models/index.js +2 -3
- package/modern/models/props/DataGridProps.d.ts +22 -17
- package/modern/utils/css/context.d.ts +14 -0
- package/modern/utils/css/context.js +54 -0
- package/modern/utils/index.d.ts +2 -1
- package/modern/utils/index.js +1 -1
- package/package.json +2 -2
- package/tsconfig.build.tsbuildinfo +1 -1
- package/utils/css/context.d.ts +14 -0
- package/utils/css/context.js +64 -0
- package/utils/index.d.ts +2 -1
- package/utils/index.js +8 -1
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
+
const _excluded = ["render", "className"];
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import PropTypes from 'prop-types';
|
|
6
|
+
import { styled } from '@mui/material/styles';
|
|
7
|
+
import composeClasses from '@mui/utils/composeClasses';
|
|
8
|
+
import clsx from 'clsx';
|
|
9
|
+
import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
10
|
+
import { vars } from "../../constants/cssVariables.js";
|
|
11
|
+
import { getDataGridUtilityClass } from "../../constants/gridClasses.js";
|
|
12
|
+
import { useGridComponentRenderer } from "../../hooks/utils/useGridComponentRenderer.js";
|
|
13
|
+
import { ToolbarContext } from "./ToolbarContext.js";
|
|
14
|
+
import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
|
|
15
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
|
+
const useUtilityClasses = ownerState => {
|
|
17
|
+
const {
|
|
18
|
+
classes
|
|
19
|
+
} = ownerState;
|
|
20
|
+
const slots = {
|
|
21
|
+
root: ['toolbar']
|
|
22
|
+
};
|
|
23
|
+
return composeClasses(slots, getDataGridUtilityClass, classes);
|
|
24
|
+
};
|
|
25
|
+
const ToolbarRoot = styled('div', {
|
|
26
|
+
name: 'MuiDataGrid',
|
|
27
|
+
slot: 'Toolbar'
|
|
28
|
+
})({
|
|
29
|
+
flex: 0,
|
|
30
|
+
display: 'flex',
|
|
31
|
+
alignItems: 'center',
|
|
32
|
+
gap: vars.spacing(0.25),
|
|
33
|
+
padding: vars.spacing(0.75),
|
|
34
|
+
borderBottom: `1px solid ${vars.colors.border.base}`
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* The top level Toolbar component that provides context to child components.
|
|
39
|
+
* It renders a styled `<div />` element.
|
|
40
|
+
*
|
|
41
|
+
* Demos:
|
|
42
|
+
*
|
|
43
|
+
* - [Toolbar](https://mui.com/x/react-data-grid/components/toolbar/)
|
|
44
|
+
*
|
|
45
|
+
* API:
|
|
46
|
+
*
|
|
47
|
+
* - [Toolbar API](https://mui.com/x/api/data-grid/toolbar/)
|
|
48
|
+
*/
|
|
49
|
+
const Toolbar = forwardRef(function Toolbar(props, ref) {
|
|
50
|
+
const {
|
|
51
|
+
render,
|
|
52
|
+
className
|
|
53
|
+
} = props,
|
|
54
|
+
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
55
|
+
const rootProps = useGridRootProps();
|
|
56
|
+
const classes = useUtilityClasses(rootProps);
|
|
57
|
+
const [focusableItemId, setFocusableItemId] = React.useState(null);
|
|
58
|
+
const [items, setItems] = React.useState([]);
|
|
59
|
+
const registerItem = React.useCallback(item => {
|
|
60
|
+
setItems(prevItems => [...prevItems, item]);
|
|
61
|
+
}, []);
|
|
62
|
+
const unregisterItem = React.useCallback(item => {
|
|
63
|
+
setItems(prevItems => prevItems.filter(i => i !== item));
|
|
64
|
+
if (focusableItemId === item) {
|
|
65
|
+
setFocusableItemId(null);
|
|
66
|
+
}
|
|
67
|
+
}, [focusableItemId]);
|
|
68
|
+
const onItemKeyDown = React.useCallback(event => {
|
|
69
|
+
if (!focusableItemId) {
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
if (event.key === 'ArrowRight') {
|
|
73
|
+
event.preventDefault();
|
|
74
|
+
const nextIndex = items.indexOf(focusableItemId) + 1;
|
|
75
|
+
setFocusableItemId(items[nextIndex < items.length ? nextIndex : 0]);
|
|
76
|
+
}
|
|
77
|
+
if (event.key === 'ArrowLeft') {
|
|
78
|
+
event.preventDefault();
|
|
79
|
+
const prevIndex = items.indexOf(focusableItemId) - 1;
|
|
80
|
+
setFocusableItemId(items[prevIndex < 0 ? items.length - 1 : prevIndex]);
|
|
81
|
+
}
|
|
82
|
+
if (event.key === 'Home') {
|
|
83
|
+
event.preventDefault();
|
|
84
|
+
setFocusableItemId(items[0]);
|
|
85
|
+
}
|
|
86
|
+
if (event.key === 'End') {
|
|
87
|
+
event.preventDefault();
|
|
88
|
+
setFocusableItemId(items[items.length - 1]);
|
|
89
|
+
}
|
|
90
|
+
}, [items, focusableItemId]);
|
|
91
|
+
const contextValue = React.useMemo(() => ({
|
|
92
|
+
focusableItemId,
|
|
93
|
+
registerItem,
|
|
94
|
+
unregisterItem,
|
|
95
|
+
onItemKeyDown
|
|
96
|
+
}), [registerItem, unregisterItem, focusableItemId, onItemKeyDown]);
|
|
97
|
+
const element = useGridComponentRenderer(ToolbarRoot, render, _extends({
|
|
98
|
+
role: 'toolbar',
|
|
99
|
+
'aria-orientation': 'horizontal',
|
|
100
|
+
className: clsx(classes.root, className),
|
|
101
|
+
ownerState: rootProps
|
|
102
|
+
}, other, {
|
|
103
|
+
ref
|
|
104
|
+
}));
|
|
105
|
+
React.useEffect(() => {
|
|
106
|
+
if (items.length > 0) {
|
|
107
|
+
setFocusableItemId(items[0]);
|
|
108
|
+
}
|
|
109
|
+
}, [items]);
|
|
110
|
+
return /*#__PURE__*/_jsx(ToolbarContext.Provider, {
|
|
111
|
+
value: contextValue,
|
|
112
|
+
children: element
|
|
113
|
+
});
|
|
114
|
+
});
|
|
115
|
+
process.env.NODE_ENV !== "production" ? Toolbar.propTypes = {
|
|
116
|
+
// ----------------------------- Warning --------------------------------
|
|
117
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
118
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
119
|
+
// ----------------------------------------------------------------------
|
|
120
|
+
/**
|
|
121
|
+
* A function to customize rendering of the component.
|
|
122
|
+
*/
|
|
123
|
+
render: PropTypes.oneOfType([PropTypes.element, PropTypes.func])
|
|
124
|
+
} : void 0;
|
|
125
|
+
export { Toolbar };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { RenderProp } from "../../hooks/utils/useGridComponentRenderer.js";
|
|
3
|
+
import type { GridSlotProps } from '../../models';
|
|
4
|
+
export type ToolbarButtonProps = GridSlotProps['baseIconButton'] & {
|
|
5
|
+
/**
|
|
6
|
+
* A function to customize rendering of the component.
|
|
7
|
+
*/
|
|
8
|
+
render?: RenderProp<GridSlotProps['baseIconButton']>;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* A button for performing actions from the toolbar.
|
|
12
|
+
* It renders the `baseIconButton` slot.
|
|
13
|
+
*
|
|
14
|
+
* Demos:
|
|
15
|
+
*
|
|
16
|
+
* - [Toolbar](https://mui.com/x/react-data-grid/components/toolbar/)
|
|
17
|
+
*
|
|
18
|
+
* API:
|
|
19
|
+
*
|
|
20
|
+
* - [ToolbarButton API](https://mui.com/x/api/data-grid/toolbar-button/)
|
|
21
|
+
*/
|
|
22
|
+
declare const ToolbarButton: React.ForwardRefExoticComponent<ToolbarButtonProps> | React.ForwardRefExoticComponent<Omit<ToolbarButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
23
|
+
export { ToolbarButton };
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
+
const _excluded = ["render"];
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import PropTypes from 'prop-types';
|
|
6
|
+
import { unstable_useForkRef as useForkRef } from '@mui/utils';
|
|
7
|
+
import useId from '@mui/utils/useId';
|
|
8
|
+
import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
9
|
+
import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
|
|
10
|
+
import { useGridComponentRenderer } from "../../hooks/utils/useGridComponentRenderer.js";
|
|
11
|
+
import { useToolbarContext } from "./ToolbarContext.js";
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
/**
|
|
14
|
+
* A button for performing actions from the toolbar.
|
|
15
|
+
* It renders the `baseIconButton` slot.
|
|
16
|
+
*
|
|
17
|
+
* Demos:
|
|
18
|
+
*
|
|
19
|
+
* - [Toolbar](https://mui.com/x/react-data-grid/components/toolbar/)
|
|
20
|
+
*
|
|
21
|
+
* API:
|
|
22
|
+
*
|
|
23
|
+
* - [ToolbarButton API](https://mui.com/x/api/data-grid/toolbar-button/)
|
|
24
|
+
*/
|
|
25
|
+
const ToolbarButton = forwardRef(function ToolbarButton(props, ref) {
|
|
26
|
+
const {
|
|
27
|
+
render
|
|
28
|
+
} = props,
|
|
29
|
+
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
30
|
+
const id = useId();
|
|
31
|
+
const rootProps = useGridRootProps();
|
|
32
|
+
const buttonRef = React.useRef(null);
|
|
33
|
+
const handleRef = useForkRef(buttonRef, ref);
|
|
34
|
+
const {
|
|
35
|
+
focusableItemId,
|
|
36
|
+
registerItem,
|
|
37
|
+
unregisterItem,
|
|
38
|
+
onItemKeyDown
|
|
39
|
+
} = useToolbarContext();
|
|
40
|
+
React.useEffect(() => {
|
|
41
|
+
registerItem(id);
|
|
42
|
+
return () => unregisterItem(id);
|
|
43
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
44
|
+
}, []);
|
|
45
|
+
const isInitialFocus = React.useRef(true);
|
|
46
|
+
React.useEffect(() => {
|
|
47
|
+
// Do not focus the item on initial render
|
|
48
|
+
if (focusableItemId && isInitialFocus.current) {
|
|
49
|
+
isInitialFocus.current = false;
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
if (focusableItemId === id) {
|
|
53
|
+
buttonRef.current?.focus();
|
|
54
|
+
}
|
|
55
|
+
}, [focusableItemId, id]);
|
|
56
|
+
const element = useGridComponentRenderer(rootProps.slots.baseIconButton, render, _extends({}, rootProps.slotProps?.baseIconButton, {
|
|
57
|
+
tabIndex: focusableItemId === id ? 0 : -1,
|
|
58
|
+
onKeyDown: onItemKeyDown
|
|
59
|
+
}, other, {
|
|
60
|
+
ref: handleRef
|
|
61
|
+
}));
|
|
62
|
+
return /*#__PURE__*/_jsx(React.Fragment, {
|
|
63
|
+
children: element
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
process.env.NODE_ENV !== "production" ? ToolbarButton.propTypes = {
|
|
67
|
+
// ----------------------------- Warning --------------------------------
|
|
68
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
69
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
70
|
+
// ----------------------------------------------------------------------
|
|
71
|
+
/**
|
|
72
|
+
* A ref for imperative actions.
|
|
73
|
+
* It currently only supports `focusVisible()` action.
|
|
74
|
+
*/
|
|
75
|
+
action: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
|
|
76
|
+
current: PropTypes.shape({
|
|
77
|
+
focusVisible: PropTypes.func.isRequired
|
|
78
|
+
})
|
|
79
|
+
})]),
|
|
80
|
+
/**
|
|
81
|
+
* If `true`, the ripples are centered.
|
|
82
|
+
* They won't start at the cursor interaction position.
|
|
83
|
+
* @default false
|
|
84
|
+
*/
|
|
85
|
+
centerRipple: PropTypes.bool,
|
|
86
|
+
className: PropTypes.string,
|
|
87
|
+
/**
|
|
88
|
+
* The color of the component.
|
|
89
|
+
* It supports both default and custom theme colors, which can be added as shown in the
|
|
90
|
+
* [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
|
|
91
|
+
*/
|
|
92
|
+
color: PropTypes.oneOf(['default', 'inherit', 'primary']),
|
|
93
|
+
component: PropTypes.elementType,
|
|
94
|
+
/**
|
|
95
|
+
* If `true`, the component is disabled.
|
|
96
|
+
*/
|
|
97
|
+
disabled: PropTypes.bool,
|
|
98
|
+
/**
|
|
99
|
+
* If `true`, the keyboard focus ripple is disabled.
|
|
100
|
+
* @default false
|
|
101
|
+
*/
|
|
102
|
+
disableFocusRipple: PropTypes.bool,
|
|
103
|
+
/**
|
|
104
|
+
* If `true`, the ripple effect is disabled.
|
|
105
|
+
*
|
|
106
|
+
* ⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure
|
|
107
|
+
* to highlight the element by applying separate styles with the `.Mui-focusVisible` class.
|
|
108
|
+
* @default false
|
|
109
|
+
*/
|
|
110
|
+
disableRipple: PropTypes.bool,
|
|
111
|
+
/**
|
|
112
|
+
* If `true`, the touch ripple effect is disabled.
|
|
113
|
+
* @default false
|
|
114
|
+
*/
|
|
115
|
+
disableTouchRipple: PropTypes.bool,
|
|
116
|
+
/**
|
|
117
|
+
* If given, uses a negative margin to counteract the padding on one
|
|
118
|
+
* side (this is often helpful for aligning the left or right
|
|
119
|
+
* side of the icon with content above or below, without ruining the border
|
|
120
|
+
* size and shape).
|
|
121
|
+
*/
|
|
122
|
+
edge: PropTypes.oneOf(['end', 'start', false]),
|
|
123
|
+
/**
|
|
124
|
+
* If `true`, the base button will have a keyboard focus ripple.
|
|
125
|
+
* @default false
|
|
126
|
+
*/
|
|
127
|
+
focusRipple: PropTypes.bool,
|
|
128
|
+
/**
|
|
129
|
+
* This prop can help identify which element has keyboard focus.
|
|
130
|
+
* The class name will be applied when the element gains the focus through keyboard interaction.
|
|
131
|
+
* It's a polyfill for the [CSS :focus-visible selector](https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo).
|
|
132
|
+
* The rationale for using this feature [is explained here](https://github.com/WICG/focus-visible/blob/HEAD/explainer.md).
|
|
133
|
+
* A [polyfill can be used](https://github.com/WICG/focus-visible) to apply a `focus-visible` class to other components
|
|
134
|
+
* if needed.
|
|
135
|
+
*/
|
|
136
|
+
focusVisibleClassName: PropTypes.string,
|
|
137
|
+
label: PropTypes.string,
|
|
138
|
+
/**
|
|
139
|
+
* The component used to render a link when the `href` prop is provided.
|
|
140
|
+
* @default 'a'
|
|
141
|
+
*/
|
|
142
|
+
LinkComponent: PropTypes.elementType,
|
|
143
|
+
/**
|
|
144
|
+
* Callback fired when the component is focused with a keyboard.
|
|
145
|
+
* We trigger a `onFocus` callback too.
|
|
146
|
+
*/
|
|
147
|
+
onFocusVisible: PropTypes.func,
|
|
148
|
+
/**
|
|
149
|
+
* A function to customize rendering of the component.
|
|
150
|
+
*/
|
|
151
|
+
render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]),
|
|
152
|
+
/**
|
|
153
|
+
* The size of the component.
|
|
154
|
+
* `small` is equivalent to the dense button styling.
|
|
155
|
+
*/
|
|
156
|
+
size: PropTypes.oneOf(['large', 'medium', 'small']),
|
|
157
|
+
style: PropTypes.object,
|
|
158
|
+
/**
|
|
159
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
160
|
+
*/
|
|
161
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
162
|
+
tabIndex: PropTypes.number,
|
|
163
|
+
/**
|
|
164
|
+
* Props applied to the `TouchRipple` element.
|
|
165
|
+
*/
|
|
166
|
+
TouchRippleProps: PropTypes.object,
|
|
167
|
+
/**
|
|
168
|
+
* A ref that points to the `TouchRipple` element.
|
|
169
|
+
*/
|
|
170
|
+
touchRippleRef: PropTypes.any
|
|
171
|
+
} : void 0;
|
|
172
|
+
export { ToolbarButton };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface ToolbarContextValue {
|
|
3
|
+
focusableItemId: string | null;
|
|
4
|
+
registerItem: (itemId: string) => void;
|
|
5
|
+
unregisterItem: (itemId: string) => void;
|
|
6
|
+
onItemKeyDown: (event: React.KeyboardEvent<HTMLButtonElement>) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const ToolbarContext: React.Context<ToolbarContextValue | undefined>;
|
|
9
|
+
export declare function useToolbarContext(): ToolbarContextValue;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export const ToolbarContext = /*#__PURE__*/React.createContext(undefined);
|
|
3
|
+
export function useToolbarContext() {
|
|
4
|
+
const context = React.useContext(ToolbarContext);
|
|
5
|
+
if (context === undefined) {
|
|
6
|
+
throw new Error('MUI X: Missing context. Toolbar subcomponents must be placed within a <Toolbar /> component.');
|
|
7
|
+
}
|
|
8
|
+
return context;
|
|
9
|
+
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { styled } from '@mui/system';
|
|
3
|
-
import
|
|
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";
|
|
@@ -130,7 +132,13 @@ const GridVirtualScrollbar = forwardRef(function GridVirtualScrollbar(props, ref
|
|
|
130
132
|
top: 0
|
|
131
133
|
} : undefined,
|
|
132
134
|
tabIndex: -1,
|
|
133
|
-
"aria-hidden": "true"
|
|
135
|
+
"aria-hidden": "true"
|
|
136
|
+
// tabIndex does not prevent focus with a mouse click, throwing a console error
|
|
137
|
+
// https://github.com/mui/mui-x/issues/16706
|
|
138
|
+
,
|
|
139
|
+
onFocus: event => {
|
|
140
|
+
event.target.blur();
|
|
141
|
+
},
|
|
134
142
|
children: /*#__PURE__*/_jsx("div", {
|
|
135
143
|
ref: contentRef,
|
|
136
144
|
className: classes.content
|
|
@@ -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:
|
|
21
|
+
backgroundColor: vars.cell.background.pinned
|
|
21
22
|
});
|
|
22
23
|
const PinnedLeft = styled(Pinned)({
|
|
23
24
|
left: 0,
|